1
0
Fork 0
mirror of https://github.com/mperham/sidekiq.git synced 2022-11-09 13:52:34 -05:00
mperham--sidekiq/web/views/queue.erb

47 lines
1.8 KiB
Text
Raw Normal View History

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>
2015-05-04 11:38:51 -04:00
<%= t('CurrentMessagesInQueue', :queue => h(@name)) %>
<% if @queue.paused? %>
<span class="label label-danger"><%= t('Paused') %></span>
<% end %>
<span class="badge badge-secondary"><%= number_with_delimiter(@total_size) %></span>
2013-08-21 18:38:52 -04:00
</h3>
</div>
<div class="col-sm-4 pull-right flip">
<%= erb :_paging, locals: { url: "#{root_path}queues/#{CGI.escape(@name)}" } %>
2013-08-21 18:38:52 -04:00
</div>
</header>
<div class="table_container">
<table class="queue table table-hover table-bordered table-striped">
<thead>
<th><%= t('Job') %></th>
<th><%= t('Arguments') %></th>
<th></th>
</thead>
<% @messages.each_with_index do |msg, index| %>
<tr>
<td><%= h(msg.display_class) %></td>
<td>
<% a = msg.display_args %>
<% if a.inspect.size > 100 %>
<span class="worker_<%= index %>"><%= h(a.inspect[0..100]) + "... " %></span>
<button data-toggle="collapse" data-target=".worker_<%= index %>" class="btn btn-default btn-xs"><%= t('ShowAll') %></button>
<div class="toggle worker_<%= index %>"><%= display_args(a) %></div>
<% else %>
<%= display_args(msg.display_args) %>
<% end %>
</td>
<td>
<form action="<%= root_path %>queues/<%= CGI.escape(@name) %>/delete" method="post">
<%= csrf_tag %>
<input name="key_val" value="<%= h msg.value %>" type="hidden" />
<input class="btn btn-danger btn-xs" type="submit" name="delete" value="<%= t('Delete') %>" data-confirm="<%= t('AreYouSure') %>" />
</form>
</td>
</tr>
<% end %>
</table>
</div>
<%= erb :_paging, locals: { url: "#{root_path}queues/#{@name}" } %>