2013-08-21 18:38:52 -04:00
|
|
|
<header class="row">
|
2013-10-01 00:43:24 -04:00
|
|
|
<div class="col-sm-5">
|
2013-08-21 18:38:52 -04:00
|
|
|
<h3>
|
|
|
|
<%= t('CurrentMessagesInQueue', :queue => @name) %>
|
2014-04-25 01:16:34 -04:00
|
|
|
<% if @queue.paused? %>
|
|
|
|
<span class="label label-danger"><%= t('Paused') %></span>
|
|
|
|
<% end %>
|
2013-08-21 18:38:52 -04:00
|
|
|
</h3>
|
|
|
|
</div>
|
2013-10-01 00:43:24 -04:00
|
|
|
<div class="col-sm-4 pull-right">
|
2013-08-21 18:38:52 -04:00
|
|
|
<%= erb :_paging, :locals => { :url => "#{root_path}queues/#{@name}" } %>
|
|
|
|
</div>
|
|
|
|
</header>
|
|
|
|
<table class="queue table table-hover table-bordered table-striped">
|
|
|
|
<thead>
|
2014-05-19 23:54:28 -04:00
|
|
|
<th><%= t('Job') %></th>
|
2013-08-21 18:38:52 -04:00
|
|
|
<th><%= t('Arguments') %></th>
|
|
|
|
<th></th>
|
|
|
|
</thead>
|
|
|
|
<% @messages.each_with_index do |msg, index| %>
|
|
|
|
<tr>
|
2014-05-19 23:54:28 -04:00
|
|
|
<td><%= msg.display_class %></td>
|
2013-08-21 18:38:52 -04:00
|
|
|
<td>
|
2014-05-27 09:42:04 -04:00
|
|
|
<% a = msg.display_args.inspect %>
|
2014-05-19 23:54:28 -04:00
|
|
|
<% if a.size > 100 %>
|
|
|
|
<%= h(msg.display_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>
|
2014-05-19 23:54:28 -04:00
|
|
|
<div class="toggle" id="worker_<%= index %>" style="display: none;"><%= h(msg.display_args) %></div>
|
2013-08-21 18:38:52 -04:00
|
|
|
<% else %>
|
2014-05-19 23:54:28 -04:00
|
|
|
<%= h(msg.display_args) %>
|
2013-08-21 18:38:52 -04:00
|
|
|
<% end %>
|
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
<form action="<%= root_path %>queues/<%= @name %>/delete" method="post">
|
2014-05-19 23:54:28 -04:00
|
|
|
<input name="key_val" value="<%= h Sidekiq.dump_json(msg.item) %>" type="hidden" />
|
2013-10-01 00:43:24 -04:00
|
|
|
<input class="btn btn-danger btn-xs" type="submit" name="delete" value="<%= t('Delete') %>" data-confirm="<%= t('AreYouSure') %>" />
|
2013-08-21 18:38:52 -04:00
|
|
|
</form>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<% end %>
|
|
|
|
</table>
|
|
|
|
<%= erb :_paging, :locals => { :url => "#{root_path}queues/#{@name}" } %>
|