mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-07-31 11:49:58 -04:00
The dashboard should only talk about notifications that are *successful* or *failed*. It should not count notifications that are still queued. This will stop: - a situation like ‘0 emails, 14.1% failed’ - the big numbers and the template statistics numbers not adding up to the same total
42 lines
1.5 KiB
HTML
42 lines
1.5 KiB
HTML
{% from "components/big-number.html" import big_number_with_status %}
|
|
|
|
<div
|
|
data-module="update-content"
|
|
data-resource="{{url_for(".service_dashboard_updates", service_id=current_service.id)}}"
|
|
data-key="today"
|
|
data-interval-seconds="2"
|
|
aria-live="polite"
|
|
>
|
|
<h2 class="heading-medium">
|
|
In the last 7 days
|
|
</h2>
|
|
<div class="grid-row bottom-gutter">
|
|
<div class="column-half">
|
|
{{ big_number_with_status(
|
|
statistics.emails_sent,
|
|
'email' if statistics.emails_sent == 1 else 'emails',
|
|
statistics.emails_failed,
|
|
statistics.get('emails_failure_rate', 0.0),
|
|
statistics.get('emails_failure_rate', 0)|float > 3,
|
|
failure_link=url_for(".view_notifications", service_id=current_service.id, template_type='email', status='failed')
|
|
) }}
|
|
</div>
|
|
<div class="column-half">
|
|
{{ big_number_with_status(
|
|
statistics.sms_sent,
|
|
'text message' if statistics.sms_sent == 1 else 'text messages',
|
|
statistics.sms_failed,
|
|
statistics.get('sms_failure_rate', 0.0),
|
|
statistics.get('sms_failure_rate', 0)|float > 3,
|
|
failure_link=url_for(".view_notifications", service_id=current_service.id, template_type='sms', status='failed')
|
|
) }}
|
|
</div>
|
|
</div>
|
|
{% with period = "in the last 7 days" %}
|
|
{% include 'views/dashboard/template-statistics.html' %}
|
|
{% endwith %}
|
|
<p class='table-show-more-link'>
|
|
<a href="{{ url_for('.template_history', service_id=current_service.id) }}">See all templates used this year</a>
|
|
</p>
|
|
</div>
|