jobs: rename /delayed_jobs to /jobs.
Rename the /delayed_jobs endpoint to just /jobs since it's no longer based on DelayedJob.
This commit is contained in:
1
app/views/jobs/cancel.js.erb
Normal file
1
app/views/jobs/cancel.js.erb
Normal file
@@ -0,0 +1 @@
|
||||
location.reload();
|
||||
1
app/views/jobs/destroy.js.erb
Normal file
1
app/views/jobs/destroy.js.erb
Normal file
@@ -0,0 +1 @@
|
||||
location.reload();
|
||||
42
app/views/jobs/index.html.erb
Normal file
42
app/views/jobs/index.html.erb
Normal file
@@ -0,0 +1,42 @@
|
||||
<div id="c-jobs">
|
||||
<div id="a-index">
|
||||
<h1>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_job_path(job), method: :put, remote: true %> |
|
||||
<%= link_to "Retry", retry_job_path(job), method: :put, remote: true %> |
|
||||
<%= link_to "Cancel", cancel_job_path(job), method: :put, remote: true %> |
|
||||
<%= link_to "Delete", job_path(job), method: :delete, remote: true %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
<%= numbered_paginator(@jobs) %>
|
||||
</div>
|
||||
</div>
|
||||
1
app/views/jobs/retry.js.erb
Normal file
1
app/views/jobs/retry.js.erb
Normal file
@@ -0,0 +1 @@
|
||||
location.reload();
|
||||
1
app/views/jobs/run.js.erb
Normal file
1
app/views/jobs/run.js.erb
Normal file
@@ -0,0 +1 @@
|
||||
location.reload();
|
||||
Reference in New Issue
Block a user