Sha256: d12fba943a113ee48954cddae6de346f3170b6b9c0c8e8c805827cff2f1caac6

Contents?: true

Size: 383 Bytes

Versions: 4

Compression:

Stored size: 383 Bytes

Contents

module RocketJobMissionControl
  module WorkersHelper

    def worker_card_class(worker)
      if worker.zombie?
        'callout-zombie-top'
      else
        map = {
          running:  'callout-success-top',
          paused:   'callout-warning-top',
          stopping: 'callout-alert-top',
        }
        map[worker.state] || 'callout-info-top'
      end
    end

  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
rocketjob_mission_control-1.2.4 app/helpers/rocket_job_mission_control/workers_helper.rb
rocketjob_mission_control-1.2.3 app/helpers/rocket_job_mission_control/workers_helper.rb
rocketjob_mission_control-1.2.2 app/helpers/rocket_job_mission_control/workers_helper.rb
rocketjob_mission_control-1.2.1 app/helpers/rocket_job_mission_control/workers_helper.rb