diff --git a/app/models/good_job/job.rb b/app/models/good_job/job.rb index fadf6eb37..57eabbd2d 100644 --- a/app/models/good_job/job.rb +++ b/app/models/good_job/job.rb @@ -149,6 +149,12 @@ def display_serialized_params }) end + # Used when displaying this job in the GoodJob dashboard. + # @return [String] + def display_name + job_class + end + # Tests whether the job is being executed right now. # @return [Boolean] def running? diff --git a/app/views/good_job/batches/_jobs.erb b/app/views/good_job/batches/_jobs.erb index 9455b4577..fa40b14d5 100644 --- a/app/views/good_job/batches/_jobs.erb +++ b/app/views/good_job/batches/_jobs.erb @@ -23,7 +23,7 @@
<%= 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.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" %>
diff --git a/app/views/good_job/jobs/_table.erb b/app/views/good_job/jobs/_table.erb index 38c77007b..cc486a7b3 100644 --- a/app/views/good_job/jobs/_table.erb +++ b/app/views/good_job/jobs/_table.erb @@ -64,7 +64,7 @@ <%= 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.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" %>: diff --git a/app/views/good_job/jobs/show.html.erb b/app/views/good_job/jobs/show.html.erb index 2e59f45db..7a5dee116 100644 --- a/app/views/good_job/jobs/show.html.erb +++ b/app/views/good_job/jobs/show.html.erb @@ -13,7 +13,7 @@
-

<%= tag.code @job.job_class %>

+

<%= tag.code @job.display_name %>

<%= t "good_job.models.job.queue" %>