<%= form_with(url: mass_update_jobs_path(filter.to_params), method: :put, local: true, data: { "checkbox-toggle": "job_ids" }) do |form| %> <% if jobs.present? %> <% jobs.each do |job| %> <% end %> <% else %> <% end %>
<%= check_box_tag('toggle_job_ids', "1", false, data: { "checkbox-toggle-all": "job_ids" }) %> ActiveJob ID State Job Class Queue Scheduled At Executions Error ActiveJob Params  <%= tag.button "Toggle", type: "button", class: "btn btn-sm btn-outline-primary", role: "button", data: { bs_toggle: "collapse", bs_target: ".job-params" }, aria: { expanded: false, controls: jobs.map { |job| "##{dom_id(job, "params")}" }.join(" ") } %> Actions
<%= form.button type: 'submit', name: 'mass_action', value: 'reschedule', class: 'btn btn-sm btn-outline-primary', title: "Reschedule all", data: { confirm: "Confirm reschedule all", disable: true } do %> <%= render_icon "skip_forward" %> All <% end %> <%= form.button type: 'submit', name: 'mass_action', value: 'discard', class: 'btn btn-sm btn-outline-primary', title: "Discard all", data: { confirm: "Confirm discard all", disable: true } do %> <%= render_icon "stop" %> All <% end %> <%= form.button type: 'submit', name: 'mass_action', value: 'retry', class: 'btn btn-sm btn-outline-primary', title: "Retry all", data: { confirm: "Confirm retry all", disable: true } do %> <%= render_icon "arrow_clockwise" %> All <% end %>
<%= check_box_tag 'job_ids[]', job.id, false, data: { "checkbox-toggle-each": "job_ids" } %> <%= link_to job_path(job.id) do %> <%= job.id %> <% end %> <%= status_badge(job.status) %> <%= job.job_class %> <%= job.queue_name %> <%= relative_time(job.scheduled_at || job.created_at) %> <%= job.executions_count %> <%= truncate(job.recent_error, length: 1_000) %> <%= tag.button "Preview", type: "button", class: "btn btn-sm btn-outline-primary", role: "button", data: { bs_toggle: "collapse", bs_target: "##{dom_id(job, 'params')}" }, aria: { expanded: false, controls: dom_id(job, "params") } %> <%= tag.pre JSON.pretty_generate(job.serialized_params), id: dom_id(job, "params"), class: "collapse job-params" %>
<% if job.status.in? [:scheduled, :retried, :queued] %> <%= link_to reschedule_job_path(job.id), method: :put, class: "btn btn-sm btn-outline-primary", title: "Reschedule job", data: { confirm: "Confirm reschedule", disable: true } do %> <%= render_icon "skip_forward" %> <% end %> <% else %> <% end %> <% if job.status.in? [:scheduled, :retried, :queued] %> <%= link_to discard_job_path(job.id), method: :put, class: "btn btn-sm btn-outline-primary", title: "Discard job", data: { confirm: "Confirm discard", disable: true } do %> <%= render_icon "stop" %> <% end %> <% else %> <% end %> <% if job.status == :discarded %> <%= link_to retry_job_path(job.id), method: :put, class: "btn btn-sm btn-outline-primary", title: "Retry job", data: { confirm: "Confirm retry", disable: true } do %> <%= render_icon "arrow_clockwise" %> <% end %> <% else %> <% end %>
No jobs found.
<% end %>