From 841805bffcc9f99c8d2b079f58d9dfb46397a878 Mon Sep 17 00:00:00 2001 From: Witold Bedyk Date: Thu, 29 Mar 2018 17:26:08 +0200 Subject: [PATCH] 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 --- .../templates/alarms/alarm_history.html | 20 +++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/monitoring/alarms/templates/alarms/alarm_history.html b/monitoring/alarms/templates/alarms/alarm_history.html index 66ba819a..bb5c06d3 100644 --- a/monitoring/alarms/templates/alarms/alarm_history.html +++ b/monitoring/alarms/templates/alarms/alarm_history.html @@ -12,10 +12,26 @@
{% trans "Name" %}
{{ alarm.alarm_definition.name|default:_("None") }}
+
{% trans "Associated Metrics" %}
+
    {% for metric in alarm.metrics %} -
    {% trans "Metric Name" %} {{forloop.counter}}
    -
    {{ metric.name }}
    + {% if metric.dimensions %} +
  • + {{ metric.name }} + { + {% for k, v in metric.dimensions.items %} + {{ k }}={{ v }} + {% if not forloop.last %} + {{ ',' }} + {% endif %} + {% endfor %} + } +
  • + {% else %} +
  • {{ metric.name }}
  • + {% endif %} {% endfor %} +
{% endblock page_header %}