Class: ActiveInsights::JpmController

Inherits:
ApplicationController show all
Defined in:
app/controllers/active_insights/jpm_controller.rb

Instance Method Summary collapse

Instance Method Details

#indexObject



5
6
7
8
9
10
11
# File 'app/controllers/active_insights/jpm_controller.rb', line 5

def index
  @minutes =
    base_jobs_scope.minute_by_minute.select("COUNT(id) AS jpm").
    select_started_at.map do |minute|
      [minute.started_at.strftime("%-l:%M%P"), minute.jpm]
    end
end

#redirectionObject



13
14
15
# File 'app/controllers/active_insights/jpm_controller.rb', line 13

def redirection
  redirect_to jpm_path(params[:date])
end