diff --git a/app/main/views/jobs.py b/app/main/views/jobs.py index 393ab813e..5d60ba998 100644 --- a/app/main/views/jobs.py +++ b/app/main/views/jobs.py @@ -29,7 +29,7 @@ from app import ( notification_api_client, service_api_client, ) -from app.formatters import get_time_left +from app.formatters import get_time_left, message_count_noun from app.main import main from app.main.forms import SearchNotificationsForm from app.models.job import Job @@ -336,6 +336,7 @@ def get_status_filters(service, message_type, statistics): def _get_job_counts(job): + job_type = job.template_type return [ ( label, @@ -349,19 +350,27 @@ def _get_job_counts(job): count ) for label, query_param, count in [ [ - 'total', '', + f'''total + {message_count_noun(job.notification_count, job_type)}''', + '', job.notification_count ], [ - 'sending', 'sending', + f'''sending + {message_count_noun(job.notifications_sending, job_type)}''', + 'sending', job.notifications_sending ], [ - 'delivered', 'delivered', + f'''delivered + {message_count_noun(job.notifications_delivered, job_type)}''', + 'delivered', job.notifications_delivered ], [ - 'failed', 'failed', + f'''failed + {message_count_noun(job.notifications_failed, job_type)}''', + 'failed', job.notifications_failed ] ] diff --git a/app/templates/components/pill.html b/app/templates/components/pill.html index 7024fc494..a07d0e8e0 100644 --- a/app/templates/components/pill.html +++ b/app/templates/components/pill.html @@ -18,7 +18,7 @@ {% if show_count %} {{ big_number(count, **big_number_args) }} {% endif %} -