-
-
Notifications
You must be signed in to change notification settings - Fork 199
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dashboard: show more details about jobs #575
Changes from 3 commits
7e1e107
0b82c3e
66ccce0
c4df303
07beb37
4a259da
e4d268f
bcf4092
571b3a0
e017f31
2e06da6
c30bd21
3ad152e
251487d
3af97b9
3ea7011
53a50fb
592f034
6acdf6c
61fba24
27277f2
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,88 @@ | ||
<h1 class="mb-3">ActiveJob ID: <code><%= @executions.first.id %></code></h1> | ||
<div class="break-out bg-light border-bottom py-2 mb-3"> | ||
<div class="container-fluid pt-2"> | ||
<div class="d-flex align-items-center"> | ||
<div class="flex-fill"> | ||
<nav aria-label="breadcrumb"> | ||
<ol class="breadcrumb small mb-0"> | ||
<li class="breadcrumb-item"><%= link_to "Jobs", jobs_path %></li> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. FIXME: translation for "Jobs" |
||
<li class="breadcrumb-item active" aria-current="page">ActiveJob ID: <code><%= @job.id %></code></li> | ||
</ol> | ||
</nav> | ||
<h2 class="mb-1"><code><%= @job.job_class %></code></h2> | ||
<div> | ||
<%= status_badge @job.status %> | ||
<span class="small text-muted"> | ||
<%= relative_time @job.finished_at || @job.performed_at || @job.scheduled_at || @job.created_at, include_seconds: true %> | ||
|
||
<% if @job.runtime %> | ||
• <%= @job.runtime.round(2) %>s runtime | ||
<% end %> | ||
|
||
<% if @job.executions_count > 1 %> | ||
• <%= pluralize @job.executions_count, 'attempt' %> | ||
<% end %> | ||
</span> | ||
</div> | ||
</div> | ||
<div> | ||
<% job_reschedulable = @job.status.in? [:scheduled, :retried, :queued] %> | ||
<%= button_to reschedule_job_path(@job.id), method: :put, | ||
class: "btn btn-sm #{job_reschedulable ? 'btn-outline-primary' : 'btn-outline-secondary'}", | ||
form_class: "d-inline-block", | ||
disabled: !job_reschedulable, | ||
aria: { label: "Reschedule job" }, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. FIXME: translation for "Reschedule job" |
||
title: "Reschedule job", | ||
data: { confirm: "Confirm reschedule" } do %> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. FIXME: translation for "Confirm reschedule" |
||
<%= render "good_job/shared/icons/skip_forward" %> | ||
Reschedule | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. FIXME: translation for "Reschedule" |
||
<% end %> | ||
|
||
<% job_discardable = @job.status.in? [:scheduled, :retried, :queued] %> | ||
<%= button_to discard_job_path(@job.id), method: :put, class: "btn btn-sm #{job_discardable ? 'btn-outline-primary' : 'btn-outline-secondary'}", form_class: "d-inline-block", disabled: !job_discardable, aria: { label: "Discard job" }, title: "Discard job", data: { confirm: "Confirm discard" } do %> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. FIXME: translation for "Discard job" and "Confirm discard" |
||
<%= render "good_job/shared/icons/stop" %> | ||
Discard | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. FIXME: translation for "Discard" |
||
<% end %> | ||
|
||
<%= button_to retry_job_path(@job.id), method: :put, class: "btn btn-sm #{@job.status == :discarded ? 'btn-outline-primary' : 'btn-outline-secondary'}", form_class: "d-inline-block", disabled: @job.status != :discarded, aria: { label: "Retry job" }, title: "Retry job", data: { confirm: "Confirm retry" } do %> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. FIXME: translation for "Retry job" and "Confirm retry" |
||
<%= render "good_job/shared/icons/arrow_clockwise" %> | ||
Retry | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. FIXME: translation for "Retry" |
||
<% end %> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
<table class="table"> | ||
<tr> | ||
<th class="col-1">Queue</th> | ||
<td> | ||
<%= @job.queue_name %> | ||
<% if @job.latency %> | ||
<span class="text-muted small">(<%= @job.latency.round(2) %>s latency)</span> | ||
<% end %> | ||
</td> | ||
</tr> | ||
<tr> | ||
<th>Priority</th> | ||
<td><%= @job.priority %></td> | ||
</tr> | ||
|
||
<tr> | ||
<th>Arguments</th> | ||
<td><code><%= @job.serialized_params["arguments"].map(&:inspect).join(', ') %></code></td> | ||
</tr> | ||
|
||
<% if @job.recent_error %> | ||
<tr> | ||
<th>Error</th> | ||
<td><pre class="text-danger my-0"><%= @job.recent_error %></pre></td> | ||
</tr> | ||
<% end %> | ||
|
||
<tr> | ||
<th>Params</th> | ||
<td><%= tag.pre JSON.pretty_generate(@job.serialized_params) %></td> | ||
</tr> | ||
</table> | ||
|
||
<%= render 'good_job/executions/table', executions: @executions %> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FIXME: not new to this PR, but "in …" and "… ago" need translations