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:
evazion
2022-01-02 21:19:27 -06:00
parent f7784d2340
commit 21a9bb2c63
9 changed files with 17 additions and 16 deletions

View File

@@ -0,0 +1 @@
location.reload();

View File

@@ -0,0 +1 @@
location.reload();

View 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>

View File

@@ -0,0 +1 @@
location.reload();

View File

@@ -0,0 +1 @@
location.reload();