From 7e27700ca8240ec3ef5e9c44e03f734ffe7d2853 Mon Sep 17 00:00:00 2001 From: Martyn Inglis Date: Fri, 4 Mar 2016 15:59:56 +0000 Subject: [PATCH] Show how complete a job is on dashboard --- app/templates/views/service_dashboard.html | 4 ++-- tests/__init__.py | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/app/templates/views/service_dashboard.html b/app/templates/views/service_dashboard.html index bc70de076..b860e7f8b 100644 --- a/app/templates/views/service_dashboard.html +++ b/app/templates/views/service_dashboard.html @@ -56,7 +56,7 @@ jobs, caption="Recent text messages", empty_message='You haven’t sent any text messages yet', - field_headings=['Job', 'Created', right_aligned_field_heading('Status')] + field_headings=['Job', 'Created', right_aligned_field_heading('completion')] ) %} {% call field() %} {{ item.original_file_name }} @@ -65,7 +65,7 @@ {{ item.created_at|format_datetime }} {% endcall %} {% call field(align='right') %} - {{ item.status }} + {{ (item.notifications_sent / item.notification_count * 100)|round|int }}% {% endcall %} {% endcall %} {% if more_jobs_to_show %} diff --git a/tests/__init__.py b/tests/__init__.py index f5028b65b..9d1530349 100644 --- a/tests/__init__.py +++ b/tests/__init__.py @@ -110,6 +110,7 @@ def job_json(): 'file_name': '{}.csv'.format(job_id), 'created_at': created_at, 'notification_count': 1, + 'notifications_sent': 1, 'status': '' } return data