<%= t("good_job.models.batch.jobs") %>
<%= t "good_job.models.job.queue" %>
<%= t "good_job.models.job.priority" %>
<%= t "good_job.models.job.attempts" %>
<%= tag.button type: "button", class: "btn btn-sm text-muted", role: "button", data: { bs_toggle: "collapse", bs_target: ".job-params" }, aria: { expanded: false, controls: jobs.map { |job| "##{dom_id(job, 'params')}" }.join(" ") } do %> <%= render_icon "info" %> Inspect <% end %>
<% if jobs.present? %> <% jobs.each do |job| %>
<%= tag.code link_to(job.id, job_path(job), class: "small text-muted text-decoration-none") %> <%= tag.h5 tag.code(link_to(job.display_name, job_path(job), class: "text-reset text-decoration-none")), class: "text-reset mb-0" %>
<%= t "good_job.models.job.queue" %>
<%= job.queue_name %>
<%= t "good_job.models.job.priority" %>Priority
<%= job.priority %>
<%= t "good_job.models.job.attempts" %>
<% if job.executions_count > 0 && job.status != :finished %> <%= tag.span job.executions_count, class: "badge rounded-pill bg-danger", data: { bs_toggle: "popover", bs_trigger: "hover focus click", bs_placement: "bottom", bs_content: job.recent_error, } %> <% else %> <%= job.executions_count %> <% end %>
<%= tag.span relative_time(job.last_status_at), class: "small" %> <%= status_badge job.status %>
<%= tag.div id: dom_id(job, "params"), class: "job-params list-group-item collapse small bg-dark text-light" do %> <%= tag.pre JSON.pretty_generate(job.display_serialized_params) %> <% end %> <% end %> <% else %>
<%= t ".no_jobs_found" %>
<% end %>