2017-07-21 10:30:55 +01:00
|
|
|
{% extends "views/platform-admin/_base_template.html" %}
|
2017-07-21 09:14:29 +01:00
|
|
|
{% from "components/page-footer.html" import page_footer %}
|
2023-12-16 22:28:28 -05:00
|
|
|
{% from "components/big-number.html" import big_number %}
|
2017-07-21 09:14:29 +01:00
|
|
|
{% from "components/table.html" import mapping_table, field, stats_fields, row_group, row, right_aligned_field_heading, hidden_field_heading, text_field %}
|
2018-09-19 12:39:36 +01:00
|
|
|
{% from "components/form.html" import form_wrapper %}
|
2023-08-30 11:07:38 -04:00
|
|
|
{% from "components/components/button/macro.njk" import usaButton %}
|
|
|
|
|
{% from "components/components/details/macro.njk" import usaDetails %}
|
2017-07-21 09:14:29 +01:00
|
|
|
|
|
|
|
|
{% macro services_table(services, caption) %}
|
2024-07-26 10:38:00 -04:00
|
|
|
<div class="table-overflow-x-auto">
|
2017-07-21 09:14:29 +01:00
|
|
|
{% call(item, row_number) mapping_table(
|
|
|
|
|
caption=caption,
|
|
|
|
|
caption_visible=False,
|
|
|
|
|
field_headings=[
|
2020-06-24 11:20:22 +01:00
|
|
|
right_aligned_field_heading('Emails'),
|
|
|
|
|
right_aligned_field_heading('Text messages'),
|
2017-07-21 09:14:29 +01:00
|
|
|
],
|
2020-06-24 11:20:22 +01:00
|
|
|
field_headings_visible=False,
|
2017-07-21 09:14:29 +01:00
|
|
|
) %}
|
|
|
|
|
|
|
|
|
|
{% for service in services %}
|
|
|
|
|
|
|
|
|
|
{% call row_group() %}
|
|
|
|
|
|
|
|
|
|
{% call row() %}
|
2020-06-24 11:20:22 +01:00
|
|
|
{% call field(border=False, colspan=3) %}
|
2023-08-25 10:40:56 -04:00
|
|
|
<a href="{{ url_for('main.service_dashboard', service_id=service['id']) }}" class="file-list-filename-large usa-link">{{ service['name'] }}</a>
|
2020-06-24 10:41:12 +01:00
|
|
|
{% if not service['active'] %}
|
|
|
|
|
<span class="heading-medium hint"> Archived</span>
|
|
|
|
|
{% endif %}
|
2024-08-30 09:50:01 -07:00
|
|
|
{% if service['name'] == 'Test service' %}
|
|
|
|
|
<a class="usa-link" href="{{ url_for('main.load_test') }}">Load Test</a>
|
2024-09-02 07:51:57 -07:00
|
|
|
{% endif %}
|
2024-08-30 09:50:01 -07:00
|
|
|
|
2017-07-21 09:14:29 +01:00
|
|
|
{% endcall %}
|
|
|
|
|
|
|
|
|
|
{% endcall %}
|
|
|
|
|
|
|
|
|
|
{% call row() %}
|
2022-12-05 15:33:44 -05:00
|
|
|
{% for channel in ('email', 'sms') %}
|
2020-06-24 11:20:22 +01:00
|
|
|
{% call field(border=False) %}
|
|
|
|
|
{{ big_number(
|
|
|
|
|
service['stats'][channel]['requested'],
|
|
|
|
|
smallest=True,
|
2021-01-06 13:41:16 +00:00
|
|
|
label=service['stats'][channel]['requested']|message_count_label(channel)
|
2020-06-24 11:20:22 +01:00
|
|
|
) }}
|
|
|
|
|
{% endcall %}
|
|
|
|
|
{% endfor %}
|
2017-11-01 16:33:06 +00:00
|
|
|
{% endcall %}
|
|
|
|
|
|
2017-07-21 09:14:29 +01:00
|
|
|
{% endcall %}
|
|
|
|
|
|
|
|
|
|
{% endfor %}
|
|
|
|
|
|
|
|
|
|
{% endcall %}
|
2024-07-25 15:36:31 -04:00
|
|
|
</div>
|
2017-07-21 09:14:29 +01:00
|
|
|
{% endmacro %}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
{% block per_page_title %}
|
|
|
|
|
{{ page_title|capitalize }}
|
|
|
|
|
{% endblock %}
|
|
|
|
|
|
2017-07-21 10:30:55 +01:00
|
|
|
{% block platform_admin_content %}
|
2017-07-21 09:14:29 +01:00
|
|
|
|
2023-08-16 12:49:36 -04:00
|
|
|
<h1 class="font-body-2xl">
|
2017-07-21 09:14:29 +01:00
|
|
|
{{ page_title|capitalize }}
|
|
|
|
|
</h1>
|
|
|
|
|
|
2019-11-14 16:22:06 +00:00
|
|
|
|
|
|
|
|
{% set details_content %}
|
|
|
|
|
{% call form_wrapper(method="get") %}
|
2020-08-07 10:24:56 +01:00
|
|
|
{{ form.start_date(param_extensions={"hint": {"text": "Enter start date in format YYYY-MM-DD"}}) }}
|
|
|
|
|
{{ form.end_date(param_extensions={"hint": {"text": "Enter end date in format YYYY-MM-DD"}}) }}
|
2020-04-09 16:31:19 +01:00
|
|
|
{{ form.include_from_test_key }}
|
2023-08-30 11:07:38 -04:00
|
|
|
{{ usaButton({ "text": "Filter", "classes": "margin-y-2" }) }}
|
2019-11-14 16:22:06 +00:00
|
|
|
{% endcall %}
|
|
|
|
|
{% endset %}
|
|
|
|
|
|
2023-08-30 11:07:38 -04:00
|
|
|
{{ usaDetails({
|
2019-11-14 16:22:06 +00:00
|
|
|
"summaryText": "Apply filters",
|
|
|
|
|
"html": details_content
|
|
|
|
|
}) }}
|
2017-07-21 09:14:29 +01:00
|
|
|
|
|
|
|
|
{% include "views/platform-admin/_global_stats.html" %}
|
|
|
|
|
|
|
|
|
|
{{ services_table(services, page_title|capitalize) }}
|
|
|
|
|
|
|
|
|
|
{% endblock %}
|