mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-07-24 01:49:15 -04:00
Show count of cancelled letters on dashboard
This commit is contained in:
@@ -34,7 +34,8 @@
|
||||
link=None,
|
||||
show_failures=True,
|
||||
smaller=False,
|
||||
smallest=False
|
||||
smallest=False,
|
||||
failed_as_cancelled=False
|
||||
) %}
|
||||
<div class="big-number-with-status">
|
||||
{{ big_number(number, label, link=link, smaller=smaller, smallest=smallest) }}
|
||||
@@ -43,13 +44,27 @@
|
||||
{% if failures %}
|
||||
{% if failure_link %}
|
||||
<a href="{{ failure_link }}">
|
||||
{{ "{:,}".format(failures) }} failed – {{ failure_percentage }}%
|
||||
{{ "{:,}".format(failures) }}
|
||||
{% if failed_as_cancelled %}
|
||||
cancelled
|
||||
{% else %}
|
||||
failed – {{ failure_percentage }}%
|
||||
{% endif %}
|
||||
</a>
|
||||
{% else %}
|
||||
{{ "{:,}".format(failures) }} failed – {{ failure_percentage }}%
|
||||
{{ "{:,}".format(failures) }}
|
||||
{% if failed_as_cancelled %}
|
||||
cancelled
|
||||
{% else %}
|
||||
failed – {{ failure_percentage }}%
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% else %}
|
||||
No failures
|
||||
{% if failed_as_cancelled %}
|
||||
0 cancelled
|
||||
{% else %}
|
||||
No failures
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
@@ -37,7 +37,8 @@
|
||||
statistics['letter']['show_warning'],
|
||||
failure_link=url_for(".view_notifications", service_id=service_id, message_type='letter', status='failed'),
|
||||
link=url_for(".view_notifications", service_id=service_id, message_type='letter', status=''),
|
||||
smaller=smaller_font_size
|
||||
smaller=smaller_font_size,
|
||||
failed_as_cancelled=True
|
||||
) }}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
Reference in New Issue
Block a user