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)) %>
|
2014-04-25 01:16:34 -04:00
|
|
|
<% if @queue.paused? %>
|
|
|
|
<span class="label label-danger"><%= t('Paused') %></span>
|
|
|
|
<% end %>
|
2018-08-13 18:13:51 -04:00
|
|
|
<span class="badge badge-secondary"><%= number_with_delimiter(@total_size) %></span>
|
2013-08-21 18:38:52 -04:00
|
|
|
</h3>
|
|
|
|
</div>
|
2017-03-16 16:51:29 -04:00
|
|
|
<div class="col-sm-4 pull-right flip">
|
2017-01-24 13:27:50 -05:00
|
|
|
<%= erb :_paging, locals: { url: "#{root_path}queues/#{CGI.escape(@name)}" } %>
|
2013-08-21 18:38:52 -04:00
|
|
|
</div>
|
|
|
|
</header>
|
2015-05-13 19:48:17 -04:00
|
|
|
<div class="table_container">
|
|
|
|
<table class="queue table table-hover table-bordered table-striped">
|
|
|
|
<thead>
|
2019-09-09 18:34:35 -04:00
|
|
|
<th><a href="<%= url %>?direction=<%= params[:direction] == 'asc' ? 'desc' : 'asc' %>"># <%= sort_direction_label %></a></th>
|
2015-05-13 19:48:17 -04:00
|
|
|
<th><%= t('Job') %></th>
|
|
|
|
<th><%= t('Arguments') %></th>
|
|
|
|
<th></th>
|
|
|
|
</thead>
|
|
|
|
<% @messages.each_with_index do |msg, index| %>
|
|
|
|
<tr>
|
2019-09-08 09:27:09 -04:00
|
|
|
<% if params[:direction] == 'asc' %>
|
|
|
|
<td><%= @count * (@current_page - 1) + index + 1 %></td>
|
|
|
|
<% else %>
|
|
|
|
<td><%= @total_size - (@count * (@current_page - 1) + index) %></td>
|
|
|
|
<% end %>
|
2019-09-21 17:03:59 -04:00
|
|
|
<td>
|
|
|
|
<%= h(msg.display_class) %>
|
2019-09-23 17:52:15 -04:00
|
|
|
<%= display_tags(msg, nil) %>
|
2019-09-21 17:03:59 -04:00
|
|
|
</td>
|
2015-05-13 19:48:17 -04:00
|
|
|
<td>
|
2017-04-24 19:39:57 -04:00
|
|
|
<% a = msg.display_args %>
|
|
|
|
<% if a.inspect.size > 100 %>
|
|
|
|
<span class="worker_<%= index %>"><%= h(a.inspect[0..100]) + "... " %></span>
|
2016-12-20 12:20:40 -05:00
|
|
|
<button data-toggle="collapse" data-target=".worker_<%= index %>" class="btn btn-default btn-xs"><%= t('ShowAll') %></button>
|
2017-04-24 19:39:57 -04:00
|
|
|
<div class="toggle worker_<%= index %>"><%= display_args(a) %></div>
|
2015-05-13 19:48:17 -04:00
|
|
|
<% else %>
|
2017-04-24 19:39:57 -04:00
|
|
|
<%= display_args(msg.display_args) %>
|
2015-05-13 19:48:17 -04:00
|
|
|
<% end %>
|
|
|
|
</td>
|
|
|
|
<td>
|
2017-01-24 13:27:50 -05:00
|
|
|
<form action="<%= root_path %>queues/<%= CGI.escape(@name) %>/delete" method="post">
|
2015-07-06 18:52:41 -04:00
|
|
|
<%= csrf_tag %>
|
2017-01-17 17:58:08 -05:00
|
|
|
<input name="key_val" value="<%= h msg.value %>" type="hidden" />
|
2015-05-13 19:48:17 -04:00
|
|
|
<input class="btn btn-danger btn-xs" type="submit" name="delete" value="<%= t('Delete') %>" data-confirm="<%= t('AreYouSure') %>" />
|
|
|
|
</form>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<% end %>
|
|
|
|
</table>
|
|
|
|
</div>
|
2016-07-28 22:36:21 -04:00
|
|
|
<%= erb :_paging, locals: { url: "#{root_path}queues/#{@name}" } %>
|