Fix Alarm Details section in Alarm History view

The change adds dimension key/value pairs to the list of associated
metrics in Alarm Details section of Alarm History view. Without this
list the output is incomplete and confusing.

Story: 2001804
Task: 12529

Change-Id: Ifeaa713a9921d95c1f4ed0b25f28fe9fc7fdd3fe
This commit is contained in:
Witold Bedyk 2018-03-29 17:26:08 +02:00
parent 4f13d35966
commit 841805bffc

View File

@ -12,10 +12,26 @@
<dl>
<dt>{% trans "Name" %}</dt>
<dd>{{ alarm.alarm_definition.name|default:_("None") }}</dd>
<dt>{% trans "Associated Metrics" %}</dt>
<dd><ul>
{% for metric in alarm.metrics %}
<dt>{% trans "Metric Name" %} {{forloop.counter}}</dt>
<dd>{{ metric.name }}</dd>
{% if metric.dimensions %}
<li>
{{ metric.name }}
{
{% for k, v in metric.dimensions.items %}
{{ k }}={{ v }}
{% if not forloop.last %}
{{ ',' }}
{% endif %}
{% endfor %}
}
</li>
{% else %}
<li>{{ metric.name }}</li>
{% endif %}
{% endfor %}
</ul></dd>
</dl>
{% endblock page_header %}