Merge pull request #236 from alphagov/show-completion-of-job

Show how complete a job is on dashboard
This commit is contained in:
NIcholas Staples
2016-03-08 08:55:59 +00:00
2 changed files with 3 additions and 2 deletions

View File

@@ -56,7 +56,7 @@
jobs,
caption="Recent text messages",
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() %}
<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 }}
{% endcall %}
{% call field(align='right') %}
{{ item.status }}
{{ (item.notifications_sent / item.notification_count * 100)|round|int }}%
{% endcall %}
{% endcall %}
{% if more_jobs_to_show %}

View File

@@ -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