Change calling convention to explicitly indicate whether the attributes are for the <th> element or the <td> element. Fixes various cases where the two were mixed up. * Fix .col-expand classes not being set correctly on the /post_versions, /pool_versions, and /notes pages. * Fix .updater and .updated-at classes not being set correctly on the /forum_topics page. * Fix the name param being ignored (noticeable in the post count field on the /tags page). * Don't pass empty string when column has no name.
44 lines
1.5 KiB
Plaintext
44 lines
1.5 KiB
Plaintext
<div id="c-delayed-jobs">
|
|
<div id="a-index">
|
|
<h1>Delayed Jobs</h1>
|
|
|
|
<%= table_for @delayed_jobs, {class: "striped autofit"} do |t| %>
|
|
<% t.column :queue %>
|
|
<% t.column "Name" do |job| %>
|
|
<%= raw print_name(job) %>
|
|
<% end %>
|
|
<% t.column "Handler", td: {class: "col-expand"} do |job| %>
|
|
<%= raw print_handler(job) %>
|
|
<% end %>
|
|
<% t.column :attempts %>
|
|
<% t.column "Last error", td: {class: "col-expand"} do |job| %>
|
|
<% if job.last_error %>
|
|
<%= job.last_error.split(/\n/)[0] %>
|
|
<%= job.last_error.split(/\n/)[1..-1].grep(/releases/).join("\n") %>
|
|
<% end %>
|
|
<% end %>
|
|
<% t.column "Failed at" do |job| %>
|
|
<%= time_ago_in_words_tagged(job.failed_at) if job.failed_at %>
|
|
<% end %>
|
|
<% t.column "Run at" do |job| %>
|
|
<%= time_ago_in_words_tagged(job.run_at) %>
|
|
<% end %>
|
|
<% t.column do |job| %>
|
|
<% if CurrentUser.is_admin? %>
|
|
<% if job.locked_at? %>
|
|
Running
|
|
<% elsif job.failed? %>
|
|
<%= link_to "Retry", retry_delayed_job_path(job), method: :put, remote: true %> |
|
|
<%= link_to "Delete", delayed_job_path(job), method: :delete, remote: true %>
|
|
<% else %>
|
|
<%= link_to "Run", run_delayed_job_path(job), method: :put, remote: true %> |
|
|
<%= link_to "Cancel", cancel_delayed_job_path(job), method: :put, remote: true %>
|
|
<% end %>
|
|
<% end %>
|
|
<% end %>
|
|
<% end %>
|
|
|
|
<%= numbered_paginator(@delayed_jobs) %>
|
|
</div>
|
|
</div>
|