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/_job_info.erb
Mike Perham 2513884aa0 Unwrap Delayed jobs for presentation in UI, fixes #1718
No more massive numbers of Sidekiq::Extensions::DelayedClass jobs!  Now you’ll see the underlying Class.method call instead so the UI is much more intuitive.

This might also be necessary for ActiveJob.
2014-05-19 20:54:28 -07:00

82 lines
2 KiB
Text

<header>
<h3><%= t('Job') %></h3>
</header>
<table class="table table-bordered table-striped">
<tbody>
<tr>
<th><%= t('Queue') %></th>
<td>
<a href="<%= root_path %>queues/<%= job.queue %>"><%= job.queue %></a>
</td>
</tr>
<tr>
<th><%= t('Job') %></th>
<td>
<code><%= job.display_class %></code>
</td>
</tr>
<tr>
<th><%= t('Arguments') %></th>
<td>
<code class="code-wrap">
<!-- We don't want to truncate any job arguments when viewing a single job's status page -->
<div class="args-extended"><%= display_args(job.display_args, nil) %></div>
</code>
</td>
</tr>
<tr>
<th>JID</th>
<td>
<code><%= job.jid %></code>
</td>
</tr>
<tr>
<th><%= t('Enqueued') %></th>
<td><%= relative_time(job.enqueued_at) %></td>
</tr>
<% unless retry_extra_items(job).empty? %>
<tr>
<th><%= t('Extras') %></th>
<td>
<code>
<%= retry_extra_items(job).inspect %>
</code>
</td>
</tr>
<% end %>
<% if type == :retry %>
<% if job['retry_count'] && job['retry_count'] > 0 %>
<tr>
<th><%= t('RetryCount') %></th>
<td><%= job['retry_count'] %></td>
</tr>
<tr>
<th><%= t('LastRetry') %></th>
<td><%= relative_time(Time.at(job['retried_at'])) %></td>
</tr>
<% else %>
<tr>
<th><%= t('OriginallyFailed') %></th>
<td><%= relative_time(Time.at(job['failed_at'])) %></td>
</tr>
<% end %>
<tr>
<th><%= t('NextRetry') %></th>
<td><%= relative_time(job.at) %></td>
</tr>
<% end %>
<% if type == :scheduled %>
<tr>
<th><%= t('Scheduled') %></th>
<td><%= relative_time(job.at) %></td>
</tr>
<% end %>
<% if type == :dead %>
<tr>
<th><%= t('LastRetry') %></th>
<td><%= relative_time(job.at) %></td>
</tr>
<% end %>
</tbody>
</table>