Module: MissionControlHelper

Defined in:
lib/generators/maquina/mission_control_jobs/templates/app/helpers/mission_control_helper.rb

Instance Method Summary collapse

Instance Method Details

#job_status_badge_variant(status) ⇒ Object



4
5
6
7
8
9
10
11
12
13
14
# File 'lib/generators/maquina/mission_control_jobs/templates/app/helpers/mission_control_helper.rb', line 4

def job_status_badge_variant(status)
  case status.to_s
  when "failed" then :destructive
  when "blocked" then :warning
  when "in_progress" then :primary
  when "scheduled" then :secondary
  when "finished" then :success
  when "queued", "pending" then :default
  else :outline
  end
end


16
17
18
19
20
21
22
23
# File 'lib/generators/maquina/mission_control_jobs/templates/app/helpers/mission_control_helper.rb', line 16

def nav_icon_for_section(key)
  case key.to_s
  when "queues" then :inbox
  when "workers" then :activity
  when "recurring_tasks" then :clock
  else :list
  end
end