mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-07-29 04:09:07 -04:00
The previous, weekly activity breakdown was what we reckoned might be useful. But now that we have people using the platform it feels like aggregating a service’s usage by month is: - matches the timeframe users report on within their organisation - is consistent with the usage page And like the usage page this commit also limits the page to only show one financial year’s worth of data at once (rather than data for all time). This commit also makes some changes to the jobs view code so that our aggregation of failure states is consistent between the dashboard pages and the jobs pages.
66 lines
2.1 KiB
HTML
66 lines
2.1 KiB
HTML
{% extends "withnav_template.html" %}
|
||
|
||
{% from "components/big-number.html" import big_number, big_number_with_status %}
|
||
{% from "components/show-more.html" import show_more %}
|
||
{% from "components/message-count-label.html" import message_count_label %}
|
||
{% from "components/table.html" import list_table, field, right_aligned_field_heading, hidden_field_heading %}
|
||
{% from "components/ajax-block.html" import ajax_block %}
|
||
|
||
{% block page_title %}
|
||
Dashboard – GOV.UK Notify
|
||
{% endblock %}
|
||
|
||
{% block maincolumn_content %}
|
||
|
||
<div class="dashboard">
|
||
|
||
<h1 class="visuallyhidden">Dashboard</h1>
|
||
{% if current_user.has_permissions(['manage_templates'], admin_override=True) %}
|
||
{% if not templates %}
|
||
{% include 'views/dashboard/write-first-messages.html' %}
|
||
{% endif %}
|
||
{% elif not current_user.has_permissions(['send_texts', 'send_emails', 'send_letters', 'manage_api_keys'], any_=True) %}
|
||
{% include 'views/dashboard/no-permissions-banner.html' %}
|
||
{% endif %}
|
||
|
||
{{ ajax_block(partials, updates_url, 'upcoming') }}
|
||
|
||
<h2 class="heading-medium">
|
||
In the last 7 days
|
||
</h2>
|
||
|
||
{{ ajax_block(partials, updates_url, 'totals') }}
|
||
{{ show_more(
|
||
url_for('.monthly', service_id=current_service.id),
|
||
'See activity breakdown'
|
||
) }}
|
||
|
||
{% if partials['has_template_statistics'] %}
|
||
{{ ajax_block(partials, updates_url, 'template-statistics') }}
|
||
{{ show_more(
|
||
url_for('.template_history', service_id=current_service.id),
|
||
'See all templates used this year'
|
||
) }}
|
||
{% endif %}
|
||
|
||
{% if partials['has_jobs'] %}
|
||
{{ ajax_block(partials, updates_url, 'jobs') }}
|
||
{{ show_more(
|
||
url_for('.view_jobs', service_id=current_service.id),
|
||
'See all uploaded files'
|
||
) }}
|
||
{% endif %}
|
||
|
||
{% if current_user.has_permissions(['manage_settings'], admin_override=True) %}
|
||
<h2 class='heading-medium'>This year</h2>
|
||
{{ ajax_block(partials, updates_url, 'usage') }}
|
||
{{ show_more(
|
||
url_for(".usage", service_id=current_service['id']),
|
||
'See usage breakdown'
|
||
) }}
|
||
{% endif %}
|
||
|
||
</div>
|
||
|
||
{% endblock %}
|