Show how complete a job is on dashboard

This commit is contained in:
Martyn Inglis
2016-03-04 15:59:56 +00:00
parent 8a46031203
commit 7e27700ca8
2 changed files with 3 additions and 2 deletions

View File

@@ -56,7 +56,7 @@
jobs, jobs,
caption="Recent text messages", caption="Recent text messages",
empty_message='You havent sent any text messages yet', empty_message='You havent 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() %} {% call field() %}
<a href="{{ url_for('.view_job', service_id=service_id, job_id=item.id) }}">{{ item.original_file_name }}</a> <a href="{{ url_for('.view_job', service_id=service_id, job_id=item.id) }}">{{ item.original_file_name }}</a>
@@ -65,7 +65,7 @@
{{ item.created_at|format_datetime }} {{ item.created_at|format_datetime }}
{% endcall %} {% endcall %}
{% call field(align='right') %} {% call field(align='right') %}
{{ item.status }} {{ (item.notifications_sent / item.notification_count * 100)|round|int }}%
{% endcall %} {% endcall %}
{% endcall %} {% endcall %}
{% if more_jobs_to_show %} {% if more_jobs_to_show %}

View File

@@ -110,6 +110,7 @@ def job_json():
'file_name': '{}.csv'.format(job_id), 'file_name': '{}.csv'.format(job_id),
'created_at': created_at, 'created_at': created_at,
'notification_count': 1, 'notification_count': 1,
'notifications_sent': 1,
'status': '' 'status': ''
} }
return data return data