2012-10-29 16:50:21 -04:00
|
|
|
table class="workers table table-hover table-bordered table-striped table-white"
|
2012-09-30 08:57:51 -04:00
|
|
|
thead
|
2013-04-04 00:26:44 -04:00
|
|
|
th = t('Worker')
|
|
|
|
th = t('Queue')
|
|
|
|
th = t('Class')
|
|
|
|
th = t('Arguments')
|
|
|
|
th = t('Started')
|
2012-10-23 13:26:33 -04:00
|
|
|
- workers.each_with_index do |(worker, msg), index|
|
2012-07-26 19:08:15 -04:00
|
|
|
tr
|
|
|
|
td= worker
|
2012-09-30 08:57:51 -04:00
|
|
|
td
|
2012-11-01 13:26:15 -04:00
|
|
|
a href="#{root_path}queues/#{msg['queue']}" = msg['queue']
|
2012-07-26 19:08:15 -04:00
|
|
|
td= msg['payload']['class']
|
2012-10-23 13:26:33 -04:00
|
|
|
td
|
|
|
|
- if msg['payload']['args'].to_s.size > 100
|
|
|
|
= msg['payload']['args'].inspect[0..100] + "... "
|
2013-04-04 00:26:44 -04:00
|
|
|
button data-toggle="collapse" data-target="#worker_#{index}" class="btn btn-mini" = t('ShowAll')
|
2013-01-28 16:55:14 -05:00
|
|
|
.toggle[id="worker_#{index}" style="display: none;max-width: 750px;"]= msg['payload']['args']
|
2012-10-23 13:26:33 -04:00
|
|
|
- else
|
|
|
|
= msg['payload']['args']
|
2012-08-19 21:19:59 -04:00
|
|
|
td== relative_time(msg['run_at'].is_a?(Numeric) ? Time.at(msg['run_at']) : Time.parse(msg['run_at']))
|