<%= form_with(url: mass_update_jobs_path(filter.to_params), method: :put, local: true, data: { "checkbox-toggle": "job_ids" }) do |form| %>
<%= check_box_tag('toggle_job_ids', "1", false, data: { "checkbox-toggle-all": "job_ids" }) %> <%= label_tag('toggle_job_ids', t(".toggle_all_jobs"), class: "visually-hidden") %>
<%= form.button type: 'submit', name: 'mass_action', value: 'reschedule', class: 'ms-1 btn btn-sm btn-outline-secondary', title: t(".actions.reschedule_all"), data: { confirm: t(".actions.confirm_reschedule_all"), disable: true } do %> <%= render_icon "skip_forward" %> <%= t "good_job.actions.reschedule" %> <% end %> <%= form.button type: 'submit', name: 'mass_action', value: 'retry', class: 'btn btn-sm btn-outline-secondary', title: t(".actions.retry_all"), data: { confirm: t(".actions.confirm_retry_all"), disable: true } do %> <%= render_icon "arrow_clockwise" %> <%= t "good_job.actions.retry" %> <% end %>
<%= form.button type: 'submit', name: 'mass_action', value: 'discard', class: 'btn btn-sm btn-outline-secondary', title: t(".actions.discard_all"), data: { confirm: t(".actions.confirm_discard_all"), disable: true } do %> <%= render_icon "stop" %> <%= t "good_job.actions.discard" %> <% end %>
<%= 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" %> <%= t "good_job.actions.inspect" %> <% end %>
<% if jobs.present? %> <% jobs.each do |job| %> <%= label_tag dom_id(job, :checkbox), id: dom_id(job), role: "row", class: "list-group-item list-group-item-action py-3" do %>
<%= check_box_tag 'job_ids[]', job.id, false, id: dom_id(job, :checkbox), data: { "checkbox-toggle-each": "job_ids" } %>
<%= 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" %> <% if job.error %>
<%= t "good_job.shared.error" %>: <%= job.error %>
<% end %>
<%= t "good_job.models.job.queue" %>
<%= job.queue_name %>
<%= t "good_job.models.job.priority" %>
<%= job.priority %>
<%= t "good_job.models.job.attempts" %>
<% if job.executions_count > 0 && job.status != :succeeded %> <%= 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.display_error, } %> <% else %> <%= job.executions_count %> <% end %>
<%= tag.span relative_time(job.last_status_at), class: "small mt-1" %>
<%= status_badge job.status %> <% if job.status == :discarded && job.class.error_event_migrated? && job.error_event %>
<%= t(job.error_event, scope: 'good_job.error_event') %>
<% end %>
<% end %> <%= 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 %>
<% end %>