Files
notifications-admin/app/templates/views/dashboard/dashboard.html
Chris Hill-Scott d0f3875d29 Slow down the update interval on the dashboard
Dashboard is the most intensive page we AJAX, and also the highest
traffic one. We’ve already slowed it from 2 to 5 seconds, this slows it
further to 20 seconds to reduce the load.

This leaves other pages (for example looking at a single job) at the
platform-level default of 5 seconds, because we think they cause less
load and the real-timelyness isn’t critical to people’s business
processes.

For looking at a single notification we know from research that someone
sending these one-at-a-time often waits to see if they’re delivered,
so let’s bring this back down to the previous value of 2 seconds.
2020-03-19 12:35:34 +00:00

50 lines
1.5 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="govuk-visually-hidden">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=20) }}
<h2 class="heading-medium">
In the last 7 days
</h2>
{{ ajax_block(partials, updates_url, 'inbox', interval=20) }}
{{ ajax_block(partials, updates_url, 'totals', interval=20) }}
{{ show_more(
url_for('.monthly', service_id=current_service.id),
'See messages sent per month'
) }}
{{ ajax_block(partials, updates_url, 'template-statistics', interval=20) }}
{% if current_user.has_permissions('manage_service') %}
<h2 class='heading-medium'>This year</h2>
{{ ajax_block(partials, updates_url, 'usage', interval=20) }}
{{ show_more(
url_for(".usage", service_id=current_service['id']),
'See usage'
) }}
{% endif %}
</div>
{% endblock %}