mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-09-02 17:48:50 -04:00
Merge branch 'master' into platform-admin
This commit is contained in:
@@ -45,9 +45,7 @@ def view_job(service_id, job_id):
|
|||||||
notifications=notifications['notifications'],
|
notifications=notifications['notifications'],
|
||||||
counts={
|
counts={
|
||||||
'queued': 0 if finished else job['notification_count'],
|
'queued': 0 if finished else job['notification_count'],
|
||||||
'sent': job['notification_count'] if finished else 0,
|
'sent': job['notification_count'] if finished else 0
|
||||||
'failed': 0,
|
|
||||||
'cost': u'£0.00'
|
|
||||||
},
|
},
|
||||||
uploaded_at=job['created_at'],
|
uploaded_at=job['created_at'],
|
||||||
finished_at=job['updated_at'] if finished else None,
|
finished_at=job['updated_at'] if finished else None,
|
||||||
@@ -74,9 +72,7 @@ def view_job_updates(service_id, job_id):
|
|||||||
'partials/jobs/count.html',
|
'partials/jobs/count.html',
|
||||||
counts={
|
counts={
|
||||||
'queued': 0 if finished else job['notification_count'],
|
'queued': 0 if finished else job['notification_count'],
|
||||||
'sent': job['notification_count'] if finished else 0,
|
'sent': job['notification_count'] if finished else 0
|
||||||
'failed': 0,
|
|
||||||
'cost': u'£0.00'
|
|
||||||
}
|
}
|
||||||
),
|
),
|
||||||
'notifications': render_template(
|
'notifications': render_template(
|
||||||
|
|||||||
@@ -7,18 +7,7 @@
|
|||||||
</li>
|
</li>
|
||||||
<li class="column-one-quarter">
|
<li class="column-one-quarter">
|
||||||
{{ big_number(
|
{{ big_number(
|
||||||
counts.sent, 'sent'
|
counts.sent, 'processed'
|
||||||
)}}
|
|
||||||
</li>
|
|
||||||
<li class="column-one-quarter">
|
|
||||||
{{ big_number(
|
|
||||||
counts.failed,
|
|
||||||
'failed'
|
|
||||||
)}}
|
|
||||||
</li>
|
|
||||||
<li class="column-one-quarter">
|
|
||||||
{{ big_number(
|
|
||||||
counts.cost, 'total cost'
|
|
||||||
)}}
|
)}}
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
jobs,
|
jobs,
|
||||||
caption="Recent batch jobs",
|
caption="Recent batch jobs",
|
||||||
empty_message='You haven’t sent any text messages yet',
|
empty_message='You haven’t sent any text messages yet',
|
||||||
field_headings=['File', 'Started', right_aligned_field_heading('Rows'), right_aligned_field_heading('Sent')]
|
field_headings=['File', 'Started', right_aligned_field_heading('Rows')]
|
||||||
) %}
|
) %}
|
||||||
{% 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>
|
||||||
@@ -15,9 +15,6 @@
|
|||||||
{% call field(align='right') %}
|
{% call field(align='right') %}
|
||||||
{{ item.notification_count }}
|
{{ item.notification_count }}
|
||||||
{% endcall %}
|
{% endcall %}
|
||||||
{% call field(align='right') %}
|
|
||||||
{{ item.notifications_sent }}
|
|
||||||
{% endcall %}
|
|
||||||
{% endcall %}
|
{% endcall %}
|
||||||
{% if more_jobs_to_show %}
|
{% if more_jobs_to_show %}
|
||||||
{% if current_user.has_permissions(['send_texts', 'send_emails', 'send_letters']) %}
|
{% if current_user.has_permissions(['send_texts', 'send_emails', 'send_letters']) %}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{% extends "withoutnav_template.html" %}
|
{% extends "withoutnav_template.html" %}
|
||||||
|
|
||||||
{% block page_title %}
|
{% block page_title %}
|
||||||
Cookies – GOV.UK Notify
|
Help – GOV.UK Notify
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block maincolumn_content %}
|
{% block maincolumn_content %}
|
||||||
|
|||||||
@@ -27,12 +27,7 @@
|
|||||||
} if not service.active else {
|
} if not service.active else {
|
||||||
'title': 'Reactivate API keys',
|
'title': 'Reactivate API keys',
|
||||||
'link': url_for('.service_status_change', service_id=service_id)
|
'link': url_for('.service_status_change', service_id=service_id)
|
||||||
},
|
}
|
||||||
{
|
|
||||||
'title': 'Delete this service from GOV.UK Notify',
|
|
||||||
'link': url_for('.service_delete', service_id=service_id),
|
|
||||||
'destructive': True
|
|
||||||
},
|
|
||||||
]) }}
|
]) }}
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|||||||
@@ -74,9 +74,8 @@ def test_should_show_updates_for_one_job_as_json(
|
|||||||
|
|
||||||
assert response.status_code == 200
|
assert response.status_code == 200
|
||||||
content = json.loads(response.get_data(as_text=True))
|
content = json.loads(response.get_data(as_text=True))
|
||||||
assert 'sent' in content['counts']
|
assert 'processed' in content['counts']
|
||||||
assert 'queued' in content['counts']
|
assert 'queued' in content['counts']
|
||||||
assert 'failed' in content['counts']
|
|
||||||
assert 'Recipient' in content['notifications']
|
assert 'Recipient' in content['notifications']
|
||||||
assert 'Status' in content['notifications']
|
assert 'Status' in content['notifications']
|
||||||
assert 'Started' in content['status']
|
assert 'Started' in content['status']
|
||||||
|
|||||||
Reference in New Issue
Block a user