Class: RailsExecution::DashboardsController
- Inherits:
-
BaseController
- Object
- ApplicationController
- BaseController
- RailsExecution::DashboardsController
- Defined in:
- app/controllers/rails_execution/dashboards_controller.rb
Instance Method Summary collapse
Methods included from PolicyHelper
#can_close_task?, #can_create_task?, #can_edit_task?, #can_execute_task?, #can_remove_scheduled_job?, #can_schedule_task?, #display_decide?, #display_owner?, #display_reviewers?, #how_to_executable, #how_to_schedulable, #in_solo_mode?, #show_form_sidebar?
Methods included from BaseHelper
#current_owner, #normal_labels
Instance Method Details
#home ⇒ Object
6 7 8 9 |
# File 'app/controllers/rails_execution/dashboards_controller.rb', line 6 def home @in_processing_count = ::RailsExecution::Task.processing.count @tasks_count = ::RailsExecution::Task.group(:status).count end |
#insights ⇒ Object
11 12 13 14 15 16 17 |
# File 'app/controllers/rails_execution/dashboards_controller.rb', line 11 def insights @tasks_by_week = ::RailsExecution::Task .where(created_at: 10.weeks.ago.beginning_of_day..Time.current) .group('YEAR(created_at)', 'WEEK(created_at)') .count respond_to(&:json) end |