master
1<div class="row">
2 <div class="col-3">
3 <%= render partial: "my/shared/my_nav" %>
4 </div>
5 <div class="col-9">
6 <h1>Jobs <small><%= Time.now.utc %></small></h1>
7 <table class="table table-condensed">
8 <thead>
9 <tr>
10 <th>id</th>
11 <th>attempts</th>
12 <th>status</th>
13 <th>locked by</th>
14 <th>queue</th>
15 <th>run at</th>
16 <th>locked at</th>
17 <th>created at</th>
18 <th>updated at</th>
19 </tr>
20 </thead>
21 <tbody>
22 <% @jobs.find_each do |job| %>
23 <tr>
24 <td><%= link_to job.id, admin_job_path(job) %></td>
25 <td><%= job.attempts %></td>
26 <td><%= job.last_error.present? ? link_to('FAILED', admin_job_path(job)) : '' %></td>
27 <td><%= job.locked_by %> </td>
28 <td><%= job.queue %></td>
29 <td><%= job.run_at.try(:to_formatted_s, :short) %></td>
30 <td><%= job.locked_at.try(:to_formatted_s, :short) %></td>
31 <td><%= job.created_at.try(:to_formatted_s, :short) %></td>
32 <td><%= job.updated_at.try(:to_formatted_s, :short) %></td>
33 <td>
34 <%= link_to "Retry", admin_job_path(job), method: :put, class: 'btn btn-primary', disable_with: 'Retrying...' %>
35 <%= link_to "Destroy", admin_job_path(job), method: :delete, class: 'btn btn-danger', disable_with: 'Deleting...' %>
36 </td>
37 </tr>
38 <% end %>
39 </tbody>
40 </table>
41 </div>
42</div>