+
|
@@ -89,7 +84,7 @@
{% for job in job_and_notifications[:5] %}
{% if job.job_id and job.notifications %}
{% set notification = job.notifications[0] %}
- |
+
{{ notification.job.original_file_name[:12] if notification.job.original_file_name else 'Manually entered number'}}
@@ -127,17 +122,7 @@
|
- Message count
- {% if current_user.has_permissions('manage_service') %}
-
- {{ ajax_block(partials, updates_url, 'usage') }}
- During the pilot period, each service has an allowance of 250,000 message parts. Once this allowance is met, the
- application will stop delivering messages. There's no monthly charge, no setup fee, and no procurement cost.
-
- What counts as 1 text message part?
- See pricing.
-
- {% endif %}
-
+ Recent templates
+ {{ ajax_block(partials, updates_url, 'template-statistics') }}
{% endblock %}
diff --git a/app/templates/views/dashboard/template-statistics.html b/app/templates/views/dashboard/template-statistics.html
index 86192d421..6d249145e 100644
--- a/app/templates/views/dashboard/template-statistics.html
+++ b/app/templates/views/dashboard/template-statistics.html
@@ -6,7 +6,8 @@
{% call(item, row_number) list_table(
template_statistics,
caption="Messages sent by template",
- caption_visible=True,
+ caption_visible=False,
+ border_visible=True,
empty_message='',
field_headings=[
'Template',
diff --git a/tests/app/main/views/test_dashboard.py b/tests/app/main/views/test_dashboard.py
index 6e0f83a6a..e09791d91 100644
--- a/tests/app/main/views/test_dashboard.py
+++ b/tests/app/main/views/test_dashboard.py
@@ -653,20 +653,24 @@ def test_should_not_show_recent_templates_on_dashboard_if_only_one_template_used
mock_template_stats.assert_called_once_with(SERVICE_ONE_ID, limit_days=7)
- assert stats[0]["template_name"] == "one", f"Expected template_name to be 'one', but got {stats[0]['template_name']}"
+ assert (
+ stats[0]["template_name"] == "one"
+ ), f"Expected template_name to be 'one', but got {stats[0]['template_name']}"
# Debugging: print the main content to understand where "one" is appearing
print(f"Main content: {main}")
# Check that "one" is not in the main content
- assert stats[0]["template_name"] in main, f"Expected 'one' to not be in main, but it was found in: {main}"
+ assert (
+ stats[0]["template_name"] in main
+ ), f"Expected 'one' to not be in main, but it was found in: {main}"
# count appears as total, but not per template
expected_count = stats[0]["count"]
assert expected_count == 50, f"Expected count to be 50, but got {expected_count}"
assert normalize_spaces(page.select_one("#total-sms .big-number-smaller").text) == (
"{} text messages sent in the last seven days".format(expected_count)
-)
+ )
@freeze_time("2016-07-01 12:00") # 4 months into 2016 financial year