43 lines
1.3 KiB
Plaintext
43 lines
1.3 KiB
Plaintext
<div id="c-delayed-jobs">
|
|
<div id="a-index">
|
|
<h1>Delayed Jobs</h1>
|
|
|
|
<%= table_for @jobs, class: "striped autofit" do |t| %>
|
|
<% t.column "Name" do |job| %>
|
|
<%= job.job_class.titleize.delete_suffix(" Job") %>
|
|
<% end %>
|
|
|
|
<% t.column "Details", td: { class: "col-expand" } do |job| %>
|
|
<%= job.serialized_params["arguments"] %>
|
|
<% end %>
|
|
|
|
<% t.column "Error", td: { class: "col-expand" } do |job| %>
|
|
<% if job.error.present? %>
|
|
<%= job.error %>
|
|
<% end %>
|
|
<% end %>
|
|
|
|
<% t.column "Attempts" do |job| %>
|
|
<%= job.executions_count %>
|
|
<% end %>
|
|
|
|
<% t.column :status %>
|
|
|
|
<% t.column "Created" do |job| %>
|
|
<%= time_ago_in_words_tagged(job.created_at) %>
|
|
<% end %>
|
|
|
|
<% t.column column: "control" do |job| %>
|
|
<% if GoodJobPolicy.new(CurrentUser.user, job).update? %>
|
|
<%= link_to "Run", run_delayed_job_path(job), method: :put, remote: true %> |
|
|
<%= link_to "Retry", retry_delayed_job_path(job), method: :put, remote: true %> |
|
|
<%= link_to "Cancel", cancel_delayed_job_path(job), method: :put, remote: true %> |
|
|
<%= link_to "Delete", delayed_job_path(job), method: :delete, remote: true %>
|
|
<% end %>
|
|
<% end %>
|
|
<% end %>
|
|
|
|
<%= numbered_paginator(@jobs) %>
|
|
</div>
|
|
</div>
|