Class: Gricer::DashboardController

Inherits:
BaseController
  • Object
show all
Defined in:
app/controllers/gricer/dashboard_controller.rb

Overview

This controller contains the dashboard for the administration view

Instance Method Summary collapse

Methods inherited from BaseController

#process_stats, #spread_stats

Instance Method Details

#indexObject

This action renders the frame for the statistics tool



5
6
7
8
# File 'app/controllers/gricer/dashboard_controller.rb', line 5

def index
  @sessions = Gricer.config.session_model.browsers.between_dates(@stat_from, @stat_thru)
  @requests = Gricer.config.request_model.browsers.between_dates(@stat_from, @stat_thru)
end

#overviewObject

This action renderes the overview of some data in the statistics tool



11
12
13
14
15
16
# File 'app/controllers/gricer/dashboard_controller.rb', line 11

def overview
  @sessions = Gricer.config.session_model.browsers.between_dates(@stat_from, @stat_thru)
  @requests = Gricer.config.request_model.browsers.between_dates(@stat_from, @stat_thru)
  
  render partial: 'overview', formats: [:html], locals: {sessions: @sessions, requests: @requests}
end