mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-09-06 01:28:25 -04:00
Requested, delivered, and failed messages on dash
Requested, delivered and failed are the three states stored in the notification statistics table. They are not discrete, eg a message can be counted in delivered and failed. `requested` is incremented *when a notification is created*, and has no chance of being incremented twice for the same notification. The template statistics are incremented *when a notification is created only*. Therefore the only way to make the numbers line up is to count: - messages sent as being `requested` - failure rate being `failed`/`requested` *not* `failed`/`failed`+`delivered`
This commit is contained in:
@@ -13,8 +13,8 @@
|
||||
<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_requested,
|
||||
'email' if statistics.emails_requested == 1 else 'emails',
|
||||
statistics.emails_failed,
|
||||
statistics.get('emails_failure_rate', 0.0),
|
||||
statistics.get('emails_failure_rate', 0)|float > 3,
|
||||
@@ -23,8 +23,8 @@
|
||||
</div>
|
||||
<div class="column-half">
|
||||
{{ big_number_with_status(
|
||||
statistics.sms_sent,
|
||||
'text message' if statistics.sms_sent == 1 else 'text messages',
|
||||
statistics.sms_requested,
|
||||
'text message' if statistics.sms_requested == 1 else 'text messages',
|
||||
statistics.sms_failed,
|
||||
statistics.get('sms_failure_rate', 0.0),
|
||||
statistics.get('sms_failure_rate', 0)|float > 3,
|
||||
|
||||
Reference in New Issue
Block a user