Files
notifications-admin/app/templates/views/dashboard/dashboard.html
Chris Hill-Scott 889d601475 Put usage summary back on the dashboard
This reverts 1b1839ad30, which removed
the usage from the dashboard because it was causing performance
problems:

> **The yearly usage section on the dashboard page takes too log as a
> result services with large yearly stats are timing out.**
>
> As a short term fix we have taken the yearly stats off the dashboard.
>
> There is a plan to create permanent statistic tables to warehouse the
> data.

The long term fix (the fact tables) is now in place, so it should be OK
to bring this back.

This is part of a wider piece of work to refresh the dashboard page now
that jobs are moving to their own page.
2019-11-04 14:54:16 +00:00

58 lines
1.8 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 service_page_title %}
Dashboard
{% endblock %}
{% block maincolumn_content %}
<div class="dashboard">
<h1 class="visuallyhidden">Dashboard</h1>
{% if current_user.has_permissions('manage_templates') and not current_service.all_templates %}
{% include 'views/dashboard/write-first-messages.html' %}
{% endif %}
{{ ajax_block(partials, updates_url, 'upcoming', interval=5) }}
<h2 class="heading-medium">
In the last 7 days
</h2>
{{ ajax_block(partials, updates_url, 'inbox', interval=5) }}
{{ ajax_block(partials, updates_url, 'totals', interval=5) }}
{{ show_more(
url_for('.monthly', service_id=current_service.id),
'See messages sent per month'
) }}
{{ ajax_block(partials, updates_url, 'template-statistics', interval=5) }}
{% if partials['has_jobs'] %}
{{ ajax_block(partials, updates_url, 'jobs', interval=5) }}
{{ show_more(
url_for('.view_jobs', service_id=current_service.id),
'See all uploaded files'
) }}
{% endif %}
{% if current_user.has_permissions('manage_service') %}
<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'
) }}
{% endif %}
</div>
{% endblock %}