Admin app uses the new API response formats.

This commit is contained in:
Martyn Inglis
2016-08-18 15:30:57 +01:00
parent d78c98970d
commit 55c4443a05
5 changed files with 73 additions and 87 deletions
@@ -17,18 +17,18 @@
) %}
{% call row_heading() %}
<span class="spark-bar-label">
<a href="{{ url_for('.view_template', service_id=current_service.id, template_id=item.template.id) }}">{{ item.template.name }}</a>
<a href="{{ url_for('.view_template', service_id=current_service.id, template_id=item.template_id) }}">{{ item.template_name }}</a>
<span class="file-list-hint">
{{ message_count_label(1, item.template.template_type, suffix='template')|capitalize }}
{{ message_count_label(1, item.template_type, suffix='template')|capitalize }}
</span>
</span>
{% endcall %}
{% call field() %}
{% if template_statistics|length > 1 %}
<span class="spark-bar">
<span style="width: {{ item.usage_count / most_used_template_count * 100 }}%">
<span style="width: {{ item.count / most_used_template_count * 100 }}%">
{{ big_number(
item.usage_count,
item.count,
smallest=True
) }}
</span>
@@ -36,7 +36,7 @@
{% else %}
<span class="heading-small">
{{ big_number(
item.usage_count,
item.count,
smallest=True
) }}
</span>