Add ids for dashboard numbers and stats to be used by the functional tests

This commit is contained in:
Imdad Ahad
2016-10-13 10:52:09 +01:00
parent 4a7273beb4
commit d099a080e6
2 changed files with 5 additions and 4 deletions

View File

@@ -2,7 +2,7 @@
{% from "components/message-count-label.html" import message_count_label %} {% from "components/message-count-label.html" import message_count_label %}
<div class="grid-row ajax-block-container"> <div class="grid-row ajax-block-container">
<div class="column-half"> <div id="total-email" class="column-half">
{{ big_number_with_status( {{ big_number_with_status(
statistics['email']['requested'], statistics['email']['requested'],
message_count_label(statistics['email']['requested'], 'email', suffix=''), message_count_label(statistics['email']['requested'], 'email', suffix=''),
@@ -13,7 +13,7 @@
link=url_for(".view_notifications", service_id=service_id, message_type='email', status='sending,delivered,failed') link=url_for(".view_notifications", service_id=service_id, message_type='email', status='sending,delivered,failed')
) }} ) }}
</div> </div>
<div class="column-half"> <div id="total-sms" class="column-half">
{{ big_number_with_status( {{ big_number_with_status(
statistics['sms']['requested'], statistics['sms']['requested'],
message_count_label(statistics['sms']['requested'], 'sms', suffix=''), message_count_label(statistics['sms']['requested'], 'sms', suffix=''),

View File

@@ -15,6 +15,7 @@
], ],
field_headings_visible=True field_headings_visible=True
) %} ) %}
{% call row_heading() %} {% call row_heading() %}
<span class="spark-bar-label"> <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>
@@ -25,7 +26,7 @@
{% endcall %} {% endcall %}
{% call field() %} {% call field() %}
{% if template_statistics|length > 1 %} {% if template_statistics|length > 1 %}
<span class="spark-bar"> <span id='{{item.template_id}}' class="spark-bar">
<span style="width: {{ item.count / most_used_template_count * 100 }}%"> <span style="width: {{ item.count / most_used_template_count * 100 }}%">
{{ big_number( {{ big_number(
item.count, item.count,
@@ -34,7 +35,7 @@
</span> </span>
</span> </span>
{% else %} {% else %}
<span class="heading-small"> <span id='{{item.template_id}}' class="heading-small">
{{ big_number( {{ big_number(
item.count, item.count,
smallest=True smallest=True