Add separate pages to view live/trial services

We have a lot of services now. Mostly we want to look at what live
services are doing. So loading up the trial mode services every time
slows things – generating, rendering and using the page – right down.

This commit adds two new pages, one to view only live services, and one
to view trial mode services.
This commit is contained in:
Chris Hill-Scott
2017-07-21 09:14:29 +01:00
parent 6dd4ae7410
commit 26b333512c
6 changed files with 239 additions and 38 deletions

View File

@@ -1,9 +1,8 @@
{% extends "withoutnav_template.html" %}
{% from "components/textbox.html" import textbox %}
{% from "components/big-number.html" import big_number %}
{% from "components/checkbox.html" import checkbox %}
{% from "components/page-footer.html" import page_footer %}
{% from "components/big-number.html" import big_number, big_number_with_status %}
{% from "components/message-count-label.html" import message_count_label %}
{% from "components/table.html" import mapping_table, field, stats_fields, row_group, row, right_aligned_field_heading, hidden_field_heading, text_field %}
{% macro stats_fields(channel, data) -%}
@@ -101,26 +100,7 @@
</form>
</details>
<div class="grid-row bottom-gutter">
<div class="column-half">
{{ big_number_with_status(
global_stats.email.delivered + global_stats.email.failed,
message_count_label(global_stats.email.delivered, 'email'),
global_stats.email.failed,
global_stats.email.failure_rate,
global_stats.email.failure_rate|float > 3,
) }}
</div>
<div class="column-half">
{{ big_number_with_status(
global_stats.sms.delivered + global_stats.sms.failed,
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>
{% include "views/platform-admin/_global_stats.html" %}
{{ services_table(live_services, 'Live services') }}