mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-09-07 19:28:25 -04:00
Merge pull request #1022 from alphagov/deactivate-services-plat-admin
Deactivate services plat admin
This commit is contained in:
@@ -18,7 +18,7 @@ def platform_admin():
|
||||
'views/platform-admin.html',
|
||||
**get_statistics(sorted(
|
||||
services,
|
||||
key=lambda service: service['created_at'],
|
||||
key=lambda service: (service['active'], service['created_at']),
|
||||
reverse=True
|
||||
))
|
||||
)
|
||||
@@ -27,12 +27,12 @@ def platform_admin():
|
||||
def get_statistics(services):
|
||||
return {
|
||||
'global_stats': create_global_stats(services),
|
||||
'live_services': format_stats_by_service([
|
||||
'live_services': format_stats_by_service(
|
||||
service for service in services if not service['restricted']
|
||||
]),
|
||||
'trial_mode_services': format_stats_by_service([
|
||||
),
|
||||
'trial_mode_services': format_stats_by_service(
|
||||
service for service in services if service['restricted']
|
||||
]),
|
||||
),
|
||||
}
|
||||
|
||||
|
||||
@@ -74,5 +74,6 @@ def format_stats_by_service(services):
|
||||
},
|
||||
'restricted': service['restricted'],
|
||||
'research_mode': service['research_mode'],
|
||||
'created_at': service['created_at']
|
||||
'created_at': service['created_at'],
|
||||
'active': service['active']
|
||||
}
|
||||
|
||||
@@ -51,15 +51,17 @@
|
||||
{% endcall %}
|
||||
|
||||
{% call row() %}
|
||||
{% if service['research_mode'] %}
|
||||
{% if not service['active'] %}
|
||||
{% call field(status='default') %}
|
||||
<span class="heading-medium">archived</span>
|
||||
{% endcall %}
|
||||
{% elif service['research_mode'] %}
|
||||
{% call field(border=False) %}
|
||||
<span class="research-mode">research mode</span>
|
||||
{% endcall %}
|
||||
{% elif not service['restricted'] %}
|
||||
{% call field(status='error') %}
|
||||
<span class="heading-medium">
|
||||
Live
|
||||
</span>
|
||||
<span class="heading-medium">Live</span>
|
||||
{% endcall %}
|
||||
{% else %}
|
||||
{{ text_field('') }}
|
||||
|
||||
Reference in New Issue
Block a user