2013-08-21 18:38:52 -04:00
|
|
|
<header class="row">
|
|
|
|
<div class="span5">
|
|
|
|
<h3>
|
|
|
|
<%= t('CurrentMessagesInQueue', :queue => @name) %>
|
|
|
|
</h3>
|
|
|
|
</div>
|
|
|
|
<div class="span4 pull-right">
|
|
|
|
<%= erb :_paging, :locals => { :url => "#{root_path}queues/#{@name}" } %>
|
|
|
|
</div>
|
|
|
|
</header>
|
|
|
|
<table class="queue table table-hover table-bordered table-striped">
|
|
|
|
<thead>
|
|
|
|
<th><%= t('Class') %></th>
|
|
|
|
<th><%= t('Arguments') %></th>
|
|
|
|
<th></th>
|
|
|
|
</thead>
|
|
|
|
<% @messages.each_with_index do |msg, index| %>
|
|
|
|
<tr>
|
|
|
|
<td><%= msg['class'] %></td>
|
|
|
|
<td>
|
|
|
|
<% if msg['args'] and msg['args'].to_s.size > 100 %>
|
|
|
|
<%= msg['args'].inspect[0..100] + "... " %>
|
|
|
|
<button data-toggle="collapse" data-target="#worker_<%= index %>" class="btn btn-mini"><%= t('ShowAll') %></button>
|
|
|
|
<div class="toggle" id="worker_<%= index %>" style="display: none;"><%= msg['args'] %></div>
|
|
|
|
<% else %>
|
|
|
|
<%= msg['args'] %>
|
|
|
|
<% end %>
|
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
<form action="<%= root_path %>queues/<%= @name %>/delete" method="post">
|
2013-08-22 03:32:42 -04:00
|
|
|
<input name="key_val" value="<%= h Sidekiq.dump_json(msg) %>" type="hidden" />
|
2013-08-21 18:38:52 -04:00
|
|
|
<input class="btn btn-danger btn-mini" type="submit" name="delete" value="<%= t('Delete') %>" data-confirm="<%= t('AreYouSure') %>" />
|
|
|
|
</form>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<% end %>
|
|
|
|
</table>
|
|
|
|
<%= erb :_paging, :locals => { :url => "#{root_path}queues/#{@name}" } %>
|