2016-03-17 11:45:48 +00:00
|
|
|
{% extends "withnav_template.html" %}
|
|
|
|
|
|
2024-01-03 00:26:49 -08:00
|
|
|
{% from "components/table.html" import list_table, field, text_field, link_field, right_aligned_field_heading, hidden_field_heading, row_heading, notification_status_field, notification_carrier_field, notification_carrier_message_field %}
|
2016-06-28 09:21:46 +01:00
|
|
|
{% from "components/ajax-block.html" import ajax_block %}
|
2016-06-28 08:59:08 +01:00
|
|
|
|
2017-02-13 10:45:15 +00:00
|
|
|
{% block service_page_title %}
|
|
|
|
|
Dashboard
|
2016-03-17 11:45:48 +00:00
|
|
|
{% endblock %}
|
|
|
|
|
|
|
|
|
|
{% block maincolumn_content %}
|
2016-04-05 11:40:13 +01:00
|
|
|
|
2023-06-08 13:12:00 -04:00
|
|
|
<div class="dashboard margin-bottom-8">
|
2016-04-20 15:37:17 +01:00
|
|
|
|
2023-06-08 13:12:00 -04:00
|
|
|
<h1 class="usa-sr-only">Dashboard</h1>
|
2018-11-05 15:26:59 +00:00
|
|
|
{% if current_user.has_permissions('manage_templates') and not current_service.all_templates %}
|
2018-03-12 15:49:52 +00:00
|
|
|
{% include 'views/dashboard/write-first-messages.html' %}
|
2016-04-01 10:54:55 +01:00
|
|
|
{% endif %}
|
2016-03-17 11:45:48 +00:00
|
|
|
|
2020-04-08 17:55:53 +01:00
|
|
|
{{ ajax_block(partials, updates_url, 'upcoming') }}
|
2016-08-09 10:39:57 +01:00
|
|
|
|
2023-10-31 14:22:00 -04:00
|
|
|
<h2 class="font-body-xl margin-0">
|
|
|
|
|
Messages sent
|
2016-05-11 15:05:40 +01:00
|
|
|
</h2>
|
2023-10-31 14:22:00 -04:00
|
|
|
<p class="margin-top-0">In the last seven days</p>
|
2016-06-28 08:59:08 +01:00
|
|
|
|
2020-04-08 17:55:53 +01:00
|
|
|
{{ ajax_block(partials, updates_url, 'inbox') }}
|
2017-05-22 17:02:03 +01:00
|
|
|
|
2020-04-08 17:55:53 +01:00
|
|
|
{{ ajax_block(partials, updates_url, 'totals') }}
|
2016-06-28 08:59:08 +01:00
|
|
|
|
2020-04-08 17:55:53 +01:00
|
|
|
{{ ajax_block(partials, updates_url, 'template-statistics') }}
|
2024-01-19 11:44:25 -08:00
|
|
|
<h2 class="margin-top-4 margin-bottom-1">Recent Batches</h2>
|
2024-03-05 09:51:25 -05:00
|
|
|
<div class="table-wrapper">
|
2024-02-12 15:29:26 -08:00
|
|
|
<table class="usa-table usa-table--borderless job-table">
|
2024-01-25 15:32:44 -08:00
|
|
|
<thead class="table-field-headings">
|
|
|
|
|
<tr>
|
2024-02-12 16:33:41 -08:00
|
|
|
<th scope="col" class="table-field-heading-first">
|
2024-01-25 15:32:44 -08:00
|
|
|
<span>File name</span>
|
|
|
|
|
</th>
|
2024-02-12 16:33:41 -08:00
|
|
|
<th scope="col" class="table-field-heading">
|
2024-01-25 15:32:44 -08:00
|
|
|
<span>Template</span>
|
|
|
|
|
</th>
|
2024-02-12 16:33:41 -08:00
|
|
|
<th scope="col" class="table-field-heading">
|
2024-01-25 15:32:44 -08:00
|
|
|
<span>Time sent</span>
|
|
|
|
|
</th>
|
2024-02-12 16:33:41 -08:00
|
|
|
<th scope="col" class="table-field-heading">
|
2024-01-25 15:32:44 -08:00
|
|
|
<span>Sender</span>
|
|
|
|
|
</th>
|
2024-02-12 16:33:41 -08:00
|
|
|
<th scope="col" class="table-field-heading">
|
2024-01-25 15:32:44 -08:00
|
|
|
<span># of Recipients</span>
|
|
|
|
|
</th>
|
2024-02-12 16:33:41 -08:00
|
|
|
<th scope="col" class="table-field-heading">
|
2024-01-25 15:32:44 -08:00
|
|
|
<span>Report</span>
|
|
|
|
|
</th>
|
|
|
|
|
</tr>
|
|
|
|
|
</thead>
|
|
|
|
|
<tbody>
|
2024-02-12 15:29:26 -08:00
|
|
|
{% if job_and_notifications %}
|
2024-02-12 16:34:54 -08:00
|
|
|
{% for job in job_and_notifications[:5] %}
|
2024-02-12 15:29:26 -08:00
|
|
|
{% if job.job_id and job.notifications %}
|
|
|
|
|
{% set notification = job.notifications[0] %}
|
2024-02-09 17:09:48 -08:00
|
|
|
<tr class="table-row" id="{{ job.job_id }}">
|
2024-02-12 16:33:41 -08:00
|
|
|
<td class="table-field file-name">
|
2024-02-09 17:09:48 -08:00
|
|
|
{{ notification.job.original_file_name if notification.job.original_file_name else 'Manually entered number'}}
|
|
|
|
|
<br>
|
|
|
|
|
<a class="usa-link file-list-filename" href="{{ job.view_job_link }}">View Batch</a>
|
2024-02-12 15:29:26 -08:00
|
|
|
</td>
|
2024-02-12 16:33:41 -08:00
|
|
|
<td class="table-field template">
|
2024-02-09 17:09:48 -08:00
|
|
|
{{ notification.template.name }}
|
2024-02-12 15:29:26 -08:00
|
|
|
</td>
|
2024-02-12 16:33:41 -08:00
|
|
|
<td class="table-field time-sent">
|
2024-03-18 14:32:32 -07:00
|
|
|
{{ job.created_at | format_datetime_short }}
|
2024-02-12 15:29:26 -08:00
|
|
|
</td>
|
2024-02-12 16:33:41 -08:00
|
|
|
<td class="table-field sender">
|
2024-02-09 17:09:48 -08:00
|
|
|
{{ notification.created_by.name }}
|
2024-02-12 15:29:26 -08:00
|
|
|
</td>
|
2024-02-12 16:33:41 -08:00
|
|
|
<td class="table-field count-of-recipients">
|
2024-02-09 17:09:48 -08:00
|
|
|
{{ job.notification_count}}
|
2024-02-12 15:29:26 -08:00
|
|
|
</td>
|
2024-02-12 16:33:41 -08:00
|
|
|
<td class="table-field report">
|
2024-02-09 17:09:48 -08:00
|
|
|
{% if notification and job.time_left != "Data no longer available" %}
|
|
|
|
|
<a class="usa-link file-list-filename" href="{{ job.download_link }}">Download</a>
|
|
|
|
|
<span class="usa-hint">{{ job.time_left }}</span>
|
|
|
|
|
{% elif job %}
|
|
|
|
|
<span>{{ job.time_left }}</span>
|
|
|
|
|
{% endif %}
|
2024-02-12 15:29:26 -08:00
|
|
|
</td>
|
2024-02-09 17:09:48 -08:00
|
|
|
</tr>
|
2024-02-12 15:29:26 -08:00
|
|
|
{% endif %}
|
|
|
|
|
{% endfor %}
|
|
|
|
|
{% else %}
|
|
|
|
|
<tr class="table-row">
|
|
|
|
|
<td class="table-empty-message" colspan="10">No batched job messages found  (messages are kept for {{ service_data_retention_days }} days).</td>
|
|
|
|
|
</tr>
|
|
|
|
|
{% endif %}
|
2024-01-25 15:32:44 -08:00
|
|
|
</tbody>
|
|
|
|
|
</table>
|
2024-01-12 13:32:10 -08:00
|
|
|
</div>
|
|
|
|
|
|
2023-11-01 10:38:50 -04:00
|
|
|
<h2 class="margin-top-4 margin-bottom-1">Usage</h2>
|
2023-10-31 14:22:00 -04:00
|
|
|
<h3 class="margin-bottom-0">Daily</h3>
|
|
|
|
|
<p class="margin-0">Across all services</p>
|
2024-01-08 14:53:34 -08:00
|
|
|
<table class="usage-table usa-table usa-table--borderless margin-top-1 margin-bottom-5">
|
2023-10-31 14:22:00 -04:00
|
|
|
<caption class="usa-sr-only">
|
|
|
|
|
Daily
|
|
|
|
|
</caption>
|
|
|
|
|
<thead>
|
|
|
|
|
<tr>
|
|
|
|
|
<th scope="col">Usage</th>
|
|
|
|
|
<th scope="col">Remaining</th>
|
|
|
|
|
</tr>
|
|
|
|
|
</thead>
|
|
|
|
|
<tbody>
|
|
|
|
|
<tr>
|
2023-11-16 12:02:59 -05:00
|
|
|
<td>{{ global_message_limit - daily_global_messages_remaining }}</td>
|
2023-10-31 14:22:00 -04:00
|
|
|
<td>
|
|
|
|
|
{{ daily_global_messages_remaining }}
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
</tbody>
|
|
|
|
|
</table>
|
2023-10-31 12:03:21 -04:00
|
|
|
|
2019-10-25 13:27:46 +01:00
|
|
|
{% if current_user.has_permissions('manage_service') %}
|
2023-11-16 12:02:59 -05:00
|
|
|
<h3 class='margin-bottom-0' id="current-year"></h3>
|
2020-04-08 17:55:53 +01:00
|
|
|
{{ ajax_block(partials, updates_url, 'usage') }}
|
2023-12-18 21:56:40 -05:00
|
|
|
<a
|
|
|
|
|
href="{{ url_for('.usage', service_id=current_service['id']) }}"
|
|
|
|
|
class="usa-link show-more"
|
|
|
|
|
><span>See all usage</span></a>
|
2019-10-25 13:27:46 +01:00
|
|
|
{% endif %}
|
2016-04-20 15:37:17 +01:00
|
|
|
</div>
|
|
|
|
|
|
2016-03-17 11:45:48 +00:00
|
|
|
{% endblock %}
|