- content_for :title, 'Kuroko Workers'
- content_for :content_title do
Kuroko Workers
.box#workers
.box-header
h3.box-title Kuroko Workers
.box-body.table-responsive
table.table.table-hover
tbody
tr
th.col-md-2 Hostname
th.col-md-1 WID
th.col-md-2 Queue
th.col-md-1 Status
th.col-md-4 Execution
th.col-md-1
th.col-md-1
- for worker in @workers
tr
td.no-decorate= link_to worker.hostname, execution_histories_path(hostname: worker.hostname)
td= worker.worker_id
td.no-decorate= link_to worker.queue, execution_histories_path(queue: worker.queue)
td
- if worker.suspended
span.label.label-warning SUSPENDED
- elsif worker.working
span.label.label-primary WORKING
- else
'
td
- if worker.execution
.log= worker.execution.shell
- elsif worker.execution_id?
span.text-danger Couldn't find Execution with 'id'=#{worker.execution_id}.
- else
'
td
- if worker.execution
= link_to(raw(' Details'),
job_definition_job_instance_path(job_definition_id: worker.execution.job_definition_id, id: worker.execution.job_instance_id),
role: 'button', class: 'btn btn-sm btn-default')
- else
'
td
- if !worker.suspendable
'
- elsif !worker.suspended
= button_to('Suspend',
worker_path(worker),
method: :patch,
params: { suspended: true },
role: 'button',
class: 'btn btn-xs btn-default',
data: { confirm: 'Continue suspending the worker?' })
- else
= button_to('Unsuspend',
worker_path(worker),
method: :patch,
params: { suspended: false },
role: 'button',
class: 'btn btn-xs btn-default',
data: { confirm: 'Continue unsuspending the worker?' })