Add live/trial flag on platform-admin page

Show 'Live' or 'Trial' under each service to easily identify services
This commit is contained in:
Leo Hemsted
2016-06-21 11:43:54 +01:00
parent a6219ecda2
commit c5f8e1a259
3 changed files with 10 additions and 4 deletions

View File

@@ -42,7 +42,8 @@ def format_stats_by_service(all_stats, services):
(stats['emails_requested'] - stats['emails_delivered'] - stats['emails_failed'])
),
'delivered': stats['sms_delivered'] + stats['emails_delivered'],
'failed': stats['sms_failed'] + stats['emails_failed']
'failed': stats['sms_failed'] + stats['emails_failed'],
'restricted': services[stats['service']]['restricted']
}
for stats in all_stats
]

View File

@@ -60,6 +60,9 @@
{% call field() %}
<div>
<a href="{{ url_for('main.service_dashboard', service_id=item['id']) }}" class="browse-list-link">{{ item['name'] }}</a>
<span class="file-list-hint">
{{ 'Trial' if item['restricted'] else 'Live' }}
</span>
</div>
{% endcall %}
{% call field(align='right') %}