Class: Trackguard::Admin::DashboardsController
- Inherits:
-
BaseController
- Object
- ActionController::Base
- BaseController
- Trackguard::Admin::DashboardsController
- Includes:
- Overridable
- Defined in:
- app/controllers/trackguard/admin/dashboards_controller.rb
Instance Method Summary collapse
Instance Method Details
#show ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'app/controllers/trackguard/admin/dashboards_controller.rb', line 6 def show query = AnalyticsQuery.call( scope: page_view_scope, time_scope: page_view_scope.last_30, limit: 5 ) @total_today = query.totals[:today] @total_week = query.totals[:week] @total_month = query.totals[:month] @top_pages = query.top_pages @top_referrers = query.top_referrers @top_sources = query.top_sources @recent = query.recent end |