diff --git a/app/views/good_job/batches/_jobs.erb b/app/views/good_job/batches/_jobs.erb index 37c864cf9..0910338cb 100644 --- a/app/views/good_job/batches/_jobs.erb +++ b/app/views/good_job/batches/_jobs.erb @@ -3,9 +3,9 @@
Jobs
-
Queue
-
Priority
-
Attempts
+
Queue
+
Priority
+
Attempts
<%= tag.button type: "button", class: "btn btn-sm text-muted", role: "button", data: { bs_toggle: "collapse", bs_target: ".job-params" }, @@ -21,18 +21,20 @@ <% 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.job_class, job_path(job), class: "text-reset text-decoration-none")), class: "text-reset mb-0" %>
-
+
+
Queue
<%= job.queue_name %>
-
+
+
Priority
<%= job.priority %> - Priority
-
+
+
Attempts
<% if job.executions_count > 0 && job.status != :finished %> <%= tag.span job.executions_count, class: "badge rounded-pill bg-danger", data: { bs_toggle: "popover", @@ -43,13 +45,11 @@ <% else %> <%= job.executions_count %> <% end %> - Attemp
-
+
<%= tag.span relative_time(job.last_status_at), class: "small" %> <%= status_badge job.status %> -
-
+ <% end %> - +
diff --git a/app/views/good_job/batches/_table.erb b/app/views/good_job/batches/_table.erb index d419bf154..d69e53de9 100644 --- a/app/views/good_job/batches/_table.erb +++ b/app/views/good_job/batches/_table.erb @@ -3,11 +3,11 @@
Name
-
Created
-
Enqueued
-
Discarded
-
Finished
-
Jobs
+
Created
+
Enqueued
+
Discarded
+
Finished
+
Jobs
<%= tag.button type: "button", class: "btn btn-sm text-muted", role: "button", data: { bs_toggle: "collapse", bs_target: ".batch-properties" }, @@ -23,7 +23,7 @@ <% batches.each do |batch| %>
-
+
<%= link_to batch_path(batch), class: "text-decoration-none" do %> <%= batch.id %> @@ -32,34 +32,34 @@
<%= batch.description %>
<% end %>
-
-
Created at
+
+
Created at
<%= relative_time(batch.created_at) %>
-
+
<% if batch.enqueued_at %> -
Enqueued at
+
Enqueued at
<%= relative_time(batch.enqueued_at) %> <% end %>
-
+
<% if batch.discarded_at %> -
Discarded at
+
Discarded at
<%= relative_time(batch.discarded_at) %> <% end %>
-
+
<% if batch.finished_at %> -
Finished at
+
Finished at
<%= relative_time(batch.finished_at) %> <% end %>
-
-
Jobs
+
+
Jobs
<%= batch.jobs.count %>
- <%= tag.button type: "button", class: "btn btn-sm text-muted ms-auto", role: "button", + <%= tag.button type: "button", class: "btn btn-sm text-muted", role: "button", title: "Inspect", data: { bs_toggle: "collapse", bs_target: "##{dom_id(batch, 'properties')}" }, aria: { expanded: false, controls: dom_id(batch, "state") } do %> diff --git a/app/views/good_job/cron_entries/index.html.erb b/app/views/good_job/cron_entries/index.html.erb index ccf78be57..2f036edd9 100644 --- a/app/views/good_job/cron_entries/index.html.erb +++ b/app/views/good_job/cron_entries/index.html.erb @@ -6,11 +6,11 @@
-
-
Class
-
Schedule
-
Next scheduled
-
Last run
+
+
Class
+
Schedule
+
Next scheduled
+
Last run
<%= tag.button type: "button", class: "btn btn-sm text-muted", role: "button", data: { bs_toggle: "collapse", bs_target: ".cron-entry-properties" }, @@ -24,15 +24,22 @@ <% @cron_entries.each do |cron_entry| %>
-
+
<%= cron_entry.key %>
-
<%= cron_entry.description %>
+
<%= cron_entry.description %>
-
<%= tag.span tag.code(cron_entry.job_class), class: "fs-5 mb-0" %>
-
<%= cron_entry.schedule %>
-
<%= relative_time cron_entry.next_at %>
-
+
<%= tag.span tag.code(cron_entry.job_class), class: "fs-5 mb-0" %>
+
+
Schedule
+ <%= cron_entry.schedule %> +
+
+
Next scheduled
+ <%= relative_time cron_entry.next_at %> +
+
<% if cron_entry.last_job.present? %> +
Last run
<%= link_to relative_time(cron_entry.last_at), cron_entry_path(cron_entry), title: "Job #{cron_entry.last_job.id}" %> <% end %>
diff --git a/app/views/good_job/jobs/_executions.erb b/app/views/good_job/jobs/_executions.erb index 3b3edf830..4c1594d07 100644 --- a/app/views/good_job/jobs/_executions.erb +++ b/app/views/good_job/jobs/_executions.erb @@ -23,7 +23,7 @@ <%= tag.span relative_time(execution.last_status_at, include_seconds: true), class: "small" %> <%= status_badge execution.status %> - <%= tag.button type: "button", class: "btn btn-sm text-muted ms-auto", role: "button", + <%= tag.button type: "button", class: "btn btn-sm text-muted", role: "button", title: "Inspect", data: { bs_toggle: "collapse", bs_target: "##{dom_id(execution, 'params')}" }, aria: { expanded: false, controls: dom_id(execution, "params") } do %> diff --git a/app/views/good_job/jobs/_table.erb b/app/views/good_job/jobs/_table.erb index 5d6ec0b80..2f88ab8ed 100644 --- a/app/views/good_job/jobs/_table.erb +++ b/app/views/good_job/jobs/_table.erb @@ -3,12 +3,11 @@
-
+
<%= label_tag('toggle_job_ids', "Toggle all jobs", class: "visually-hidden") %> <%= check_box_tag('toggle_job_ids', "1", false, data: { "checkbox-toggle-all": "job_ids" }) %> -
-
- <%= form.button type: 'submit', name: 'mass_action', value: 'reschedule', class: 'btn btn-sm btn-outline-secondary', title: "Reschedule all", data: { confirm: "Are you sure you want to reschedule the selected jobs?", disable: true } do %> + + <%= form.button type: 'submit', name: 'mass_action', value: 'reschedule', class: 'ms-1 btn btn-sm btn-outline-secondary', title: "Reschedule all", data: { confirm: "Are you sure you want to reschedule the selected jobs?", disable: true } do %> <%= render_icon "skip_forward" %> Reschedule <% end %> @@ -33,9 +32,9 @@
-
Queue
-
Priority
-
Attempts
+
Queue
+
Priority
+
Attempts
<%= tag.button type: "button", class: "btn btn-sm text-muted", role: "button", data: { bs_toggle: "collapse", bs_target: ".job-params" }, @@ -61,21 +60,23 @@ <% 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.job_class, job_path(job), class: "text-reset text-decoration-none")), class: "text-reset mb-0" %> +
-
- <%= tag.code link_to(job.id, job_path(job), class: "small text-muted text-decoration-none") %> - <%= tag.h5 tag.code(link_to(job.job_class, job_path(job), class: "text-reset text-decoration-none")), class: "text-reset mb-0" %> -
-
+
+
Queue
<%= job.queue_name %>
-
- <%= job.priority %> - Priority +
+
Priority
+ <%= job.priority %>
-
+
+
Attempts
<% if job.executions_count > 0 && job.status != :succeeded %> <%= tag.span job.executions_count, class: "badge rounded-pill bg-danger", data: { bs_toggle: "popover", @@ -86,56 +87,56 @@ <% else %> <%= job.executions_count %> <% end %> - Attemp -
-
- <%= tag.span relative_time(job.last_status_at), class: "small" %> - <%= status_badge job.status %>
-
-