mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-09-07 11:38:24 -04:00
remove big_number_with_status
This commit is contained in:
@@ -1,18 +1,23 @@
|
||||
{% from "components/big-number.html" import big_number_with_status %}
|
||||
{% from "components/big-number.html" import big_number %}
|
||||
|
||||
<div class="ajax-block-container">
|
||||
<div class="grid-row grid-gap">
|
||||
<div id="total-sms" class="grid-col-12">
|
||||
{{ big_number_with_status(
|
||||
statistics['sms']['requested'],
|
||||
statistics['sms']['requested']|message_count_label('sms', suffix='sent'),
|
||||
statistics['sms']['failed'],
|
||||
statistics['sms']['failed_percentage'],
|
||||
statistics['sms']['show_warning'],
|
||||
failure_link=url_for(".view_notifications", service_id=service_id, message_type='sms', status='failed'),
|
||||
link=url_for(".view_notifications", service_id=service_id, message_type='sms', status='sending,delivered,failed'),
|
||||
smaller=True,
|
||||
) }}
|
||||
<span class="big-number-with-status">
|
||||
{{ big_number(statistics['sms']['requested'], statistics['sms']['requested']|message_count_label('sms', suffix='sent'), link=url_for('.view_notifications', service_id=service_id, message_type='sms', status='sending,delivered,failed'), smaller=True, smallest=smallest) }}
|
||||
{% if show_failures %}
|
||||
<span class="big-number-status{% if statistics['sms']['show_warning'] is sameas true %} big-number-status--failing{% endif %}">
|
||||
{% if statistics['sms']['failed'] %}
|
||||
<a class="usa-link" href="{{ url_for('.view_notifications', service_id=service_id, message_type='sms', status='failed') }}">
|
||||
{{ "{:,}".format(statistics['sms']['failed']) }}
|
||||
failed – {{ statistics['sms']['failed_percentage'] }}%
|
||||
</a>
|
||||
{% else %}
|
||||
No failures
|
||||
{% endif %}
|
||||
</span>
|
||||
{% endif %}
|
||||
</span>
|
||||
</div>
|
||||
<!-- <div id="total-email" class="grid-col-6">
|
||||
<span class="big-number-with-status pilot-disabled">
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{% from "components/page-header.html" import page_header %}
|
||||
{% from "components/big-number.html" import big_number_with_status, big_number %}
|
||||
{% from "components/big-number.html" import big_number %}
|
||||
{% from "components/pill.html" import pill %}
|
||||
{% from "components/table.html" import list_table, field, hidden_field_heading, right_aligned_field_heading, row_heading %}
|
||||
|
||||
|
||||
@@ -1,24 +1,48 @@
|
||||
{% from "components/big-number.html" import big_number_with_status %}
|
||||
{% from "components/big-number.html" import big_number %}
|
||||
|
||||
<div class="grid-row bottom-gutter">
|
||||
<div class="grid-col-6">
|
||||
{{ big_number_with_status(
|
||||
global_stats.email.delivered + global_stats.email.failed,
|
||||
global_stats.email.delivered|message_count_label('email'),
|
||||
global_stats.email.failed,
|
||||
global_stats.email.failure_rate,
|
||||
global_stats.email.failure_rate|float > 3,
|
||||
smaller=True
|
||||
) }}
|
||||
<span class="big-number-with-status">
|
||||
{{ big_number({{ global_stats.email.delivered + global_stats.email.failed }}, {{global_stats.email.delivered|message_count_label('email')}}, link=link, smaller=True, smallest=False) }}
|
||||
{% if show_failures %}
|
||||
<span class="big-number-status{% if (global_stats.email.failure_rate|float > 3) is sameas true %} big-number-status--failing{% endif %}">
|
||||
{% if global_stats.email.failed %}
|
||||
{% if failure_link %}
|
||||
<a class="usa-link" href="{{ failure_link }}">
|
||||
{{ "{:,}".format(global_stats.email.failed) }}
|
||||
failed – {{ global_stats.email.failure_rate }}%
|
||||
</a>
|
||||
{% else %}
|
||||
{{ "{:,}".format(global_stats.email.failed) }}
|
||||
failed – {{ global_stats.email.failure_rate }}%
|
||||
{% endif %}
|
||||
{% else %}
|
||||
No failures
|
||||
{% endif %}
|
||||
</span>
|
||||
{% endif %}
|
||||
</span>
|
||||
</div>
|
||||
<div class="grid-col-6">
|
||||
{{ big_number_with_status(
|
||||
global_stats.sms.delivered + global_stats.sms.failed,
|
||||
global_stats.sms.delivered|message_count_label('sms'),
|
||||
global_stats.sms.failed,
|
||||
global_stats.sms.failure_rate,
|
||||
global_stats.sms.failure_rate|float > 3,
|
||||
smaller=True
|
||||
) }}
|
||||
<span class="big-number-with-status">
|
||||
{{ big_number({{global_stats.sms.delivered + global_stats.sms.failed}}, {{global_stats.sms.delivered|message_count_label('sms')}}, link=link, smaller=True, smallest=False) }}
|
||||
{% if show_failures %}
|
||||
<span class="big-number-status{% if (global_stats.sms.failure_rate|float > 3) is sameas true %} big-number-status--failing{% endif %}">
|
||||
{% if global_stats.sms.failed %}
|
||||
{% if failure_link %}
|
||||
<a class="usa-link" href="{{ failure_link }}">
|
||||
{{ "{:,}".format(global_stats.sms.failed) }}
|
||||
failed – {{ global_stats.sms.failure_rate }}%
|
||||
</a>
|
||||
{% else %}
|
||||
{{ "{:,}".format(global_stats.sms.failed) }}
|
||||
failed – {{ global_stats.sms.failure_rate }}%
|
||||
{% endif %}
|
||||
{% else %}
|
||||
No failures
|
||||
{% endif %}
|
||||
</span>
|
||||
{% endif %}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{% extends "views/platform-admin/_base_template.html" %}
|
||||
{% from "components/page-footer.html" import page_footer %}
|
||||
{% from "components/big-number.html" import big_number, big_number_with_status %}
|
||||
{% from "components/big-number.html" import big_number %}
|
||||
{% from "components/table.html" import mapping_table, field, stats_fields, row_group, row, right_aligned_field_heading, hidden_field_heading, text_field %}
|
||||
{% from "components/form.html" import form_wrapper %}
|
||||
{% from "components/components/button/macro.njk" import usaButton %}
|
||||
|
||||
Reference in New Issue
Block a user