mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-06 06:31:33 -04:00
Previously, the AJAX update for the dashboard was returning a big blob of JSON with one key. This commit splits it up to return: - one key for each section of the page - each containing a smaller chunk of HTML rendered from a partial The jobs page was already working this way (pretty much) but just needed a little tweaking to get it the same.
28 lines
1.3 KiB
HTML
28 lines
1.3 KiB
HTML
{% from "components/big-number.html" import big_number_with_status %}
|
|
{% from "components/message-count-label.html" import message_count_label %}
|
|
|
|
<div class="grid-row">
|
|
<div class="column-half">
|
|
{{ big_number_with_status(
|
|
statistics.emails_requested,
|
|
message_count_label(statistics.emails_requested, 'email', suffix=''),
|
|
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, message_type='email', status='failed'),
|
|
link=url_for(".view_notifications", service_id=current_service.id, message_type='email', status='sending,delivered,failed')
|
|
) }}
|
|
</div>
|
|
<div class="column-half">
|
|
{{ big_number_with_status(
|
|
statistics.sms_requested,
|
|
message_count_label(statistics.sms_requested, 'sms', suffix=''),
|
|
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, message_type='sms', status='failed'),
|
|
link=url_for(".view_notifications", service_id=current_service.id, message_type='sms', status='sending,delivered,failed')
|
|
) }}
|
|
</div>
|
|
</div>
|