add stats boxes to platform admin page

moved a couple of stats summary functions from dashboard to a shared statistics_utils file
This commit is contained in:
Leo Hemsted
2016-05-25 16:51:09 +01:00
parent 6d43067688
commit 83b151982e
7 changed files with 128 additions and 52 deletions

View File

@@ -1,4 +1,6 @@
{% extends "withoutnav_template.html" %}
{% from "components/big-number.html" import big_number_with_status %}
{% from "components/message-count-label.html" import message_count_label %}
{% from "components/browse-list.html" import browse_list %}
{% block page_title %}
@@ -22,4 +24,27 @@
},
]) }}
<div class="grid-row">
<div class="column-half">
{{ big_number_with_status(
global_stats.emails_delivered,
message_count_label(global_stats.emails_delivered, 'email'),
global_stats.emails_failed,
global_stats.emails_failure_rate,
global_stats.emails_failure_rate|float > 3,
) }}
</div>
<div class="column-half">
{{ big_number_with_status(
global_stats.sms_delivered,
message_count_label(global_stats.sms_delivered, 'sms'),
global_stats.sms_failed,
global_stats.sms_failure_rate,
global_stats.sms_failure_rate|float > 3,
) }}
</div>
</div>
{% endblock %}