mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-24 16:24:08 -04:00
Report performance platform report
We used to upload this to performance platform to show the list of services and organisations. There is no longer a performance platform to upload this file to.
This commit is contained in:
@@ -245,33 +245,6 @@ def live_services_csv():
|
||||
}
|
||||
|
||||
|
||||
@main.route("/platform-admin/reports/performance-platform.xlsx")
|
||||
@user_is_platform_admin
|
||||
def performance_platform_xlsx():
|
||||
results = service_api_client.get_live_services_data()["data"]
|
||||
live_services_columns = ["service_id", "agency", "service_name", "_timestamp", "service", "count"]
|
||||
live_services_data = []
|
||||
live_services_data.append(live_services_columns)
|
||||
for row in results:
|
||||
live_services_data.append([
|
||||
row["service_id"],
|
||||
row["organisation_name"],
|
||||
row["service_name"],
|
||||
datetime.strptime(
|
||||
row["live_date"], '%a, %d %b %Y %X %Z'
|
||||
).strftime("%Y-%m-%dT%H:%M:%S") + "Z" if row["live_date"] else None,
|
||||
"govuk-notify",
|
||||
1
|
||||
])
|
||||
|
||||
return Spreadsheet.from_rows(live_services_data).as_excel_file, 200, {
|
||||
'Content-Type': 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
|
||||
'Content-Disposition': 'attachment; filename="{} performance platform report.xlsx"'.format(
|
||||
format_date_numeric(datetime.now().strftime("%Y-%m-%dT%H:%M:%S.%fZ")),
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
@main.route("/platform-admin/reports/notifications-sent-by-service", methods=['GET', 'POST'])
|
||||
@user_is_platform_admin
|
||||
def notifications_sent_by_service():
|
||||
|
||||
@@ -96,7 +96,6 @@ class HeaderNavigation(Navigation):
|
||||
'live_services',
|
||||
'live_services_csv',
|
||||
'notifications_sent_by_service',
|
||||
'performance_platform_xlsx',
|
||||
'usage_for_all_services',
|
||||
'organisations',
|
||||
'platform_admin',
|
||||
@@ -650,7 +649,6 @@ class MainNavigation(Navigation):
|
||||
'organisation_settings',
|
||||
'organisations',
|
||||
'performance',
|
||||
'performance_platform_xlsx',
|
||||
'platform_admin',
|
||||
'platform_admin_list_complaints',
|
||||
'platform_admin_reports',
|
||||
@@ -919,7 +917,6 @@ class CaseworkNavigation(Navigation):
|
||||
'organisation_settings',
|
||||
'organisations',
|
||||
'performance',
|
||||
'performance_platform_xlsx',
|
||||
'platform_admin_list_complaints',
|
||||
'platform_admin_reports',
|
||||
'platform_admin_returned_letters',
|
||||
@@ -1239,7 +1236,6 @@ class OrgNavigation(Navigation):
|
||||
'old_using_notify',
|
||||
'organisations',
|
||||
'performance',
|
||||
'performance_platform_xlsx',
|
||||
'platform_admin',
|
||||
'platform_admin_list_complaints',
|
||||
'platform_admin_reports',
|
||||
|
||||
@@ -13,14 +13,9 @@
|
||||
<p class="govuk-body">
|
||||
<a class="govuk-link govuk-link--no-visited-state" target="_blank" href="{{ url_for('main.live_services_csv') }}">Download live services csv report</a>
|
||||
</p>
|
||||
|
||||
<p class="govuk-body">
|
||||
<a class="govuk-link govuk-link--no-visited-state" target="_blank" href="{{ url_for('main.performance_platform_xlsx') }}">Download performance platform report (.xlsx)</a>
|
||||
<p class="govuk-body">
|
||||
|
||||
<p class="govuk-body">
|
||||
<a class="govuk-link govuk-link--no-visited-state" href="{{ url_for('main.notifications_sent_by_service') }}">Monthly notification statuses for live services</a>
|
||||
<p class="govuk-body">
|
||||
</p>
|
||||
<p class="govuk-body">
|
||||
<a class="govuk-link govuk-link--no-visited-state" href="{{ url_for('main.usage_for_all_services') }}">Usage for all services</a>
|
||||
</p>
|
||||
|
||||
Reference in New Issue
Block a user