2013-08-21 18:38:52 -04:00
|
|
|
<table class="workers table table-hover table-bordered table-striped table-white">
|
|
|
|
<thead>
|
|
|
|
<th><%= t('Worker') %></th>
|
|
|
|
<th><%= t('Queue') %></th>
|
|
|
|
<th><%= t('Class') %></th>
|
|
|
|
<th><%= t('Arguments') %></th>
|
|
|
|
<th><%= t('Started') %></th>
|
|
|
|
</thead>
|
|
|
|
<% workers.each_with_index do |(worker, msg), index| %>
|
|
|
|
<tr>
|
|
|
|
<td><%= worker %></td>
|
|
|
|
<td>
|
2013-08-26 12:14:35 -04:00
|
|
|
<a href="<%= root_path %>queues/<%= msg['queue'] %>"><%= msg['queue'] %></a>
|
2013-08-21 18:38:52 -04:00
|
|
|
</td>
|
|
|
|
|
|
|
|
<td><%= msg['payload']['class'] %></td>
|
|
|
|
<td>
|
|
|
|
<% if msg['payload']['args'].to_s.size > 100 %>
|
2013-10-30 18:11:12 -04:00
|
|
|
<%= h(msg['payload']['args'].inspect[0..100]) + "... " %>
|
2013-10-01 00:43:24 -04:00
|
|
|
<button data-toggle="collapse" data-target="#worker_<%= index %>" class="btn btn-default btn-xs"><%= t('ShowAll') %></button>
|
2013-10-30 18:11:12 -04:00
|
|
|
<div class="toggle" id="worker_<%= index %>" style="display: none;max-width: 750px;"><%= h(msg['payload']['args']) %></div>
|
2013-08-21 18:38:52 -04:00
|
|
|
<% else %>
|
2013-10-30 18:11:12 -04:00
|
|
|
<%= h(msg['payload']['args']) %>
|
2013-08-21 18:38:52 -04:00
|
|
|
<% end %>
|
|
|
|
</td>
|
|
|
|
<td><%= relative_time(msg['run_at'].is_a?(Numeric) ? Time.at(msg['run_at']) : Time.parse(msg['run_at'])) %></td>
|
|
|
|
</tr>
|
|
|
|
<% end %>
|
|
|
|
</table>
|