2016-04-20 15:37:17 +01:00
|
|
|
{% from "components/big-number.html" import big_number, big_number_with_status %}
|
2016-05-11 15:05:40 +01:00
|
|
|
{% from "components/show-more.html" import show_more %}
|
2016-05-13 09:58:07 +01:00
|
|
|
{% from "components/message-count-label.html" import message_count_label %}
|
2016-05-25 13:36:35 +01:00
|
|
|
{% from "components/table.html" import list_table, field, right_aligned_field_heading, hidden_field_heading %}
|
2016-03-17 11:45:48 +00:00
|
|
|
|
2016-04-27 09:28:42 +01:00
|
|
|
<div
|
2016-06-10 12:31:35 +01:00
|
|
|
{#data-module="update-content"
|
2016-04-27 09:28:42 +01:00
|
|
|
data-resource="{{url_for(".service_dashboard_updates", service_id=current_service.id)}}"
|
|
|
|
|
data-key="today"
|
2016-06-10 12:31:35 +01:00
|
|
|
data-interval-seconds="2"#}
|
2016-04-27 09:43:27 +01:00
|
|
|
aria-live="polite"
|
2016-04-27 09:28:42 +01:00
|
|
|
>
|
2016-05-03 13:25:22 +01:00
|
|
|
<div class="grid-row">
|
2016-04-27 09:28:42 +01:00
|
|
|
<div class="column-half">
|
|
|
|
|
{{ big_number_with_status(
|
2016-04-28 08:38:13 +01:00
|
|
|
statistics.emails_requested,
|
2016-05-13 09:58:07 +01:00
|
|
|
message_count_label(statistics.emails_requested, 'email'),
|
2016-04-27 12:25:08 +01:00
|
|
|
statistics.emails_failed,
|
2016-04-27 09:28:42 +01:00
|
|
|
statistics.get('emails_failure_rate', 0.0),
|
|
|
|
|
statistics.get('emails_failure_rate', 0)|float > 3,
|
2016-06-07 11:17:33 +01:00
|
|
|
failure_link=url_for(".view_notifications", service_id=current_service.id, message_type='email', status='failed'),
|
Add filters for ‘processed’ and sending states
- _Processed_ is all the notifications that we know about, ie sending,
failed and delivered
- _Sending_ is notifications that we have either put into a queue or are
waiting to hear back from the provider about.
The big numbers on the dashboard are a count of all the messages we’ve
processed. So when you click them, the table of notifications you see
on the dashboard should contain that number of notifications.
This also gets the activity page one step closer to being like the job
page:
| Before | After
---------|----------------------------|---------------------------------
Activity | Sending, failed, both | Processed, sending, failed, delivered
Job page | Sending, failed, delivered | Sending, failed, delivered
2016-06-07 12:01:43 +01:00
|
|
|
label_link=url_for(".view_notifications", service_id=current_service.id, message_type='email', status='sending,delivered,failed')
|
2016-04-27 09:28:42 +01:00
|
|
|
) }}
|
|
|
|
|
</div>
|
|
|
|
|
<div class="column-half">
|
|
|
|
|
{{ big_number_with_status(
|
2016-04-28 08:38:13 +01:00
|
|
|
statistics.sms_requested,
|
2016-05-13 09:58:07 +01:00
|
|
|
message_count_label(statistics.sms_requested, 'sms'),
|
2016-04-27 12:25:08 +01:00
|
|
|
statistics.sms_failed,
|
2016-04-27 09:28:42 +01:00
|
|
|
statistics.get('sms_failure_rate', 0.0),
|
|
|
|
|
statistics.get('sms_failure_rate', 0)|float > 3,
|
2016-06-07 11:17:33 +01:00
|
|
|
failure_link=url_for(".view_notifications", service_id=current_service.id, message_type='sms', status='failed'),
|
Add filters for ‘processed’ and sending states
- _Processed_ is all the notifications that we know about, ie sending,
failed and delivered
- _Sending_ is notifications that we have either put into a queue or are
waiting to hear back from the provider about.
The big numbers on the dashboard are a count of all the messages we’ve
processed. So when you click them, the table of notifications you see
on the dashboard should contain that number of notifications.
This also gets the activity page one step closer to being like the job
page:
| Before | After
---------|----------------------------|---------------------------------
Activity | Sending, failed, both | Processed, sending, failed, delivered
Job page | Sending, failed, delivered | Sending, failed, delivered
2016-06-07 12:01:43 +01:00
|
|
|
label_link=url_for(".view_notifications", service_id=current_service.id, message_type='sms', status='sending,delivered,failed')
|
2016-04-27 09:28:42 +01:00
|
|
|
) }}
|
|
|
|
|
</div>
|
2016-05-03 13:25:22 +01:00
|
|
|
<div class="column-whole">
|
2016-05-11 15:05:40 +01:00
|
|
|
{{ show_more(
|
|
|
|
|
url_for('.weekly', service_id=current_service.id),
|
|
|
|
|
'Compare to previous weeks'
|
|
|
|
|
) }}
|
2016-05-03 13:25:22 +01:00
|
|
|
</div>
|
2016-03-17 11:45:48 +00:00
|
|
|
</div>
|
2016-05-25 13:36:35 +01:00
|
|
|
|
2016-05-13 10:11:56 +01:00
|
|
|
{% if template_statistics|length %}
|
2016-04-27 09:28:42 +01:00
|
|
|
{% include 'views/dashboard/template-statistics.html' %}
|
2016-05-11 15:05:40 +01:00
|
|
|
{{ show_more(
|
|
|
|
|
url_for('.template_history', service_id=current_service.id),
|
|
|
|
|
'See all templates sent this year'
|
|
|
|
|
) }}
|
|
|
|
|
{% endif %}
|
2016-04-20 15:37:17 +01:00
|
|
|
|
2016-05-25 13:36:35 +01:00
|
|
|
{% if jobs %}
|
|
|
|
|
{% include 'views/dashboard/_jobs.html' %}
|
|
|
|
|
{{ show_more(
|
|
|
|
|
url_for('.view_jobs', service_id=current_service.id),
|
|
|
|
|
'See all uploaded files'
|
|
|
|
|
) }}
|
|
|
|
|
{% endif %}
|
|
|
|
|
|
2016-04-20 15:37:17 +01:00
|
|
|
{% if current_user.has_permissions(['manage_settings'], admin_override=True) %}
|
2016-05-25 13:36:35 +01:00
|
|
|
<h2 class='heading-medium'>This year</h2>
|
2016-04-20 15:37:17 +01:00
|
|
|
|
|
|
|
|
<div class='grid-row'>
|
|
|
|
|
<div class='column-half'>
|
|
|
|
|
<div class="keyline-block">
|
2016-05-05 10:34:15 +01:00
|
|
|
{{ big_number("Unlimited", 'free email allowance', smaller=True) }}
|
2016-04-20 15:37:17 +01:00
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class='column-half'>
|
|
|
|
|
<div class="keyline-block">
|
|
|
|
|
{% if sms_chargeable %}
|
|
|
|
|
{{ big_number(
|
|
|
|
|
(sms_chargeable * sms_rate),
|
|
|
|
|
'spent on text messages',
|
|
|
|
|
currency="£",
|
2016-05-05 10:34:15 +01:00
|
|
|
smaller=True
|
2016-04-20 15:37:17 +01:00
|
|
|
) }}
|
|
|
|
|
{% else %}
|
2016-05-05 10:34:15 +01:00
|
|
|
{{ big_number(sms_allowance_remaining, 'free text messages left', smaller=True) }}
|
2016-04-20 15:37:17 +01:00
|
|
|
{% endif %}
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2016-05-11 15:05:40 +01:00
|
|
|
{{ show_more(
|
|
|
|
|
url_for(".usage", service_id=current_service['id']),
|
|
|
|
|
'See usage breakdown'
|
|
|
|
|
) }}
|
2016-04-20 15:37:17 +01:00
|
|
|
{% endif %}
|
|
|
|
|
|
2016-03-17 11:45:48 +00:00
|
|
|
</div>
|