Method: Dbwatcher::DashboardController#index

Defined in:
app/controllers/dbwatcher/dashboard_controller.rb

#indexObject



5
6
7
8
9
10
11
12
13
14
15
16
17
18
# File 'app/controllers/dbwatcher/dashboard_controller.rb', line 5

def index
  dashboard_data = Dbwatcher::Services::DashboardDataAggregator.call
  @recent_sessions = dashboard_data[:recent_sessions]
  @active_tables = dashboard_data[:active_tables]
  @query_stats = dashboard_data[:query_stats]
  @active_tab = params[:tab] || "overview"

  # Add system information if enabled
  return unless Dbwatcher.configuration.system_info

  @system_info_summary = system_info_storage.summary
  @system_info = system_info_storage.cached_info
  @info_age = system_info_storage.info_age
end