2013-08-21 18:38:52 -04:00
<h3><%= t('Queues') %></h3>
2015-05-13 19:48:17 -04:00
<div class="table_container">
2020-08-25 12:31:05 -04:00
<table class="queues table table-hover table-bordered table-striped">
2015-05-13 19:48:17 -04:00
<thead>
<th><%= t('Queue') %></th>
<th><%= t('Size') %></th>
2017-10-19 05:32:06 -04:00
<th><%= t('Latency') %></th>
2015-05-13 19:48:17 -04:00
<th><%= t('Actions') %></th>
</thead>
<% @queues.each do |queue| %>
<tr>
<td>
2017-01-24 13:27:50 -05:00
<a href="<%= root_path %>queues/<%= CGI.escape(queue.name) %>"><%= h queue.name %></a>
2015-05-13 19:48:17 -04:00
<% if queue.paused? %>
<span class="label label-danger"><%= t('Paused') %></span>
<% end %>
</td>
<td><%= number_with_delimiter(queue.size) %> </td>
2019-02-28 13:06:41 -05:00
<td><% queue_latency = queue.latency %><%= number_with_delimiter(queue_latency.round(2)) %><%= (queue_latency < 60) ? '' : " (#{relative_time(Time.at(Time.now.to_f - queue_latency))})" %> </td>
2016-08-04 11:18:07 -04:00
<td class="delete-confirm">
2017-01-24 13:27:50 -05:00
<form action="<%=root_path %>queues/<%= CGI.escape(queue.name) %>" method="post">
2015-07-06 18:52:41 -04:00
<%= csrf_tag %>
2021-11-05 12:03:26 -04:00
<input class="btn btn-danger" type="submit" name="delete" title="This will delete all jobs within the queue, it will reappear if you push more jobs to it in the future." value="<%= t('Delete') %>" data-confirm="<%= t('AreYouSureDeleteQueue', :queue => h(queue.name)) %>" />
2019-11-14 13:06:53 -05:00
<% if Sidekiq.pro? %>
<% if queue.paused? %>
2021-06-22 12:59:09 -04:00
<input class="btn btn-danger" type="submit" name="unpause" value="<%= t('Unpause') %>" />
2019-11-14 13:06:53 -05:00
<% else %>
2021-06-22 12:59:09 -04:00
<input class="btn btn-danger" type="submit" name="pause" value="<%= t('Pause') %>" />
2019-11-14 13:06:53 -05:00
<% end %>
<% end %>
2015-05-13 19:48:17 -04:00
</form>
</td>
</tr>
<% end %>
</table>
</div>