forked from sidekiq/sidekiq
-
Notifications
You must be signed in to change notification settings - Fork 0
/
retries.erb
61 lines (58 loc) · 2.27 KB
/
retries.erb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
<header class="row">
<div class="col-sm-5">
<h3><%= t('Retries') %></h3>
</div>
<div class="col-sm-4">
<% if @retries.size > 0 %>
<%= erb :_paging, :locals => { :url => "#{root_path}retries" } %>
<% end %>
</div>
</header>
<% if @retries.size > 0 %>
<form action="<%= root_path %>retries" method="post">
<table class="table table-striped table-bordered table-white">
<tr>
<th width="20px">
<input type="checkbox" class="check_all" />
</th>
<th width="25%"><%= t('NextRetry') %></th>
<th width="11%"><%= t('RetryCount') %></th>
<th><%= t('Queue') %></th>
<th><%= t('Worker') %></th>
<th><%= t('Arguments') %></th>
<th><%= t('Error') %></th>
</tr>
<% @retries.each do |msg, score| %>
<tr>
<td>
<input type='checkbox' name='key[]' value='<%= job_params(msg, score) %>' />
</td>
<td>
<a href="<%= root_path %>retries/<%= job_params(msg, score) %>"><%= relative_time(Time.at(score)) %></a>
</td>
<td><%= msg['retry_count'] %></td>
<td>
<a href="<%= root_path %>queues/<%= msg['queue'] %>"><%= msg['queue'] %></a>
</td>
<td><%= msg['class'] %></td>
<td>
<div class="args"><%= display_args(msg['args']) %></div>
</td>
<td>
<div><%= truncate("#{msg['error_class']}: #{msg['error_message']}") %></div>
</td>
</tr>
<% end %>
</table>
<input class="btn btn-primary btn-xs pull-left" type="submit" name="retry" value="<%= t('RetryNow') %>" />
<input class="btn btn-danger btn-xs pull-left" type="submit" name="delete" value="<%= t('Delete') %>" />
</form>
<form action="<%= root_path %>retries/all/delete" method="post">
<input class="btn btn-danger btn-xs pull-right" type="submit" name="delete" value="<%= t('DeleteAll') %>" data-confirm="<%= t('AreYouSure') %>" />
</form>
<form action="<%= root_path %>retries/all/retry" method="post">
<input class="btn btn-danger btn-xs pull-right" type="submit" name="retry" value="<%= t('RetryAll') %>" data-confirm="<%= t('AreYouSure') %>" />
</form>
<% else %>
<div class="alert alert-success"><%= t('NoRetriesFound') %></div>
<% end %>