Add count of orgs and services

This uses the existing endpoint so it matches what’s on the homepage.
It will be more up-to-date than the list of services, but no-one’s going
to be adding things up to check they match exactly.
This commit is contained in:
Chris Hill-Scott
2021-03-11 13:29:46 +00:00
parent 8106d6fdf2
commit 5fa6639b52
3 changed files with 18 additions and 1 deletions

View File

@@ -5,7 +5,7 @@ from statistics import mean
from flask import render_template
from app import performance_dashboard_api_client
from app import performance_dashboard_api_client, status_api_client
from app.main import main
@@ -32,6 +32,9 @@ def performance():
row['percentage_under_10_seconds']
for row in stats['processing_time']
] or [0])
stats['count_of_live_services_and_organisations'] = (
status_api_client.get_count_of_live_services_and_organisations()
)
return render_template(
'views/performance.html',
**stats

View File

@@ -118,6 +118,18 @@
<h2 class="govuk-heading-m">
Organisations using Notify
</h2>
<div class="govuk-grid-row bottom-gutter">
<div class="govuk-grid-column-one-half">
<h3 class="govuk-visually-hidden">Organisations</h3>
<div class="product-page-big-number">{{ count_of_live_services_and_organisations.organisations|format_thousands }}</div>
organisations
</div>
<div class="govuk-grid-column-one-half">
<h3 class="govuk-visually-hidden">Services</h3>
<div class="product-page-big-number">{{ count_of_live_services_and_organisations.services|format_thousands }}</div>
services
</div>
</div>
<div class="dashboard-table">
{% call(item, row_number) list_table(
organisations_using_notify,

View File

@@ -146,6 +146,8 @@ def test_should_render_performance_page(
'Only showing the last 7 days '
''
'Organisations using Notify '
'Organisations 111 organisations '
'Services 9,999 services '
'Organisation Number of live services '
'Department of Examples and Patterns 2 '
'Department of One Service 1'