Remove list of services from platform admin index

We have two new pages for live and trial services that:
- are faster loading
- are now linked to

So the list of services doesn’t need to be on the platform admin index
page any more.
This commit is contained in:
Chris Hill-Scott
2017-07-21 09:28:08 +01:00
parent cfc572d4f7
commit 05707a1700
3 changed files with 28 additions and 123 deletions

View File

@@ -33,11 +33,7 @@ def platform_admin():
'views/platform-admin/index.html',
include_from_test_key=form.include_from_test_key.data,
form=form,
**get_statistics(sorted(
services,
key=lambda service: (service['active'], sum_service_usage(service), service['created_at']),
reverse=True
))
global_stats=create_global_stats(services),
)
@@ -79,18 +75,6 @@ def sum_service_usage(service):
return total
def get_statistics(services):
return {
'global_stats': create_global_stats(services),
'live_services': format_stats_by_service(
service for service in services if not service['restricted']
),
'trial_mode_services': format_stats_by_service(
service for service in services if service['restricted']
),
}
def filter_and_sort_services(services, trial_mode_services=False):
return (
service for service in sorted(