mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-23 15:57:23 -04:00
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:
@@ -5,7 +5,7 @@ from statistics import mean
|
|||||||
|
|
||||||
from flask import render_template
|
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
|
from app.main import main
|
||||||
|
|
||||||
|
|
||||||
@@ -32,6 +32,9 @@ def performance():
|
|||||||
row['percentage_under_10_seconds']
|
row['percentage_under_10_seconds']
|
||||||
for row in stats['processing_time']
|
for row in stats['processing_time']
|
||||||
] or [0])
|
] or [0])
|
||||||
|
stats['count_of_live_services_and_organisations'] = (
|
||||||
|
status_api_client.get_count_of_live_services_and_organisations()
|
||||||
|
)
|
||||||
return render_template(
|
return render_template(
|
||||||
'views/performance.html',
|
'views/performance.html',
|
||||||
**stats
|
**stats
|
||||||
|
|||||||
@@ -118,6 +118,18 @@
|
|||||||
<h2 class="govuk-heading-m">
|
<h2 class="govuk-heading-m">
|
||||||
Organisations using Notify
|
Organisations using Notify
|
||||||
</h2>
|
</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">
|
<div class="dashboard-table">
|
||||||
{% call(item, row_number) list_table(
|
{% call(item, row_number) list_table(
|
||||||
organisations_using_notify,
|
organisations_using_notify,
|
||||||
|
|||||||
@@ -146,6 +146,8 @@ def test_should_render_performance_page(
|
|||||||
'Only showing the last 7 days '
|
'Only showing the last 7 days '
|
||||||
''
|
''
|
||||||
'Organisations using Notify '
|
'Organisations using Notify '
|
||||||
|
'Organisations 111 organisations '
|
||||||
|
'Services 9,999 services '
|
||||||
'Organisation Number of live services '
|
'Organisation Number of live services '
|
||||||
'Department of Examples and Patterns 2 '
|
'Department of Examples and Patterns 2 '
|
||||||
'Department of One Service 1'
|
'Department of One Service 1'
|
||||||
|
|||||||
Reference in New Issue
Block a user