Color source buttons based on alert state in each

This commit is contained in:
Łukasz Mierzwa
2017-07-01 12:53:51 -07:00
parent 4036137984
commit 4330972277
2 changed files with 8 additions and 2 deletions

View File

@@ -66,7 +66,13 @@
<% if (alert.state === "suppressed") { cls_indicator = 'incident-indicator-success' } %>
<div class="alert-static-elements">
<% _.each(alert.alertmanager, function(am){ %>
<a class="label label-list label-primary"
<% var labelCls = "label-primary" %>
<% if (am.state === "suppressed") { %>
<% labelCls = "label-success" %>
<% } else if (am.state === "unprocessed") { %>
<% labelCls = "label-default" %>
<% } %>
<a class="label label-list <%- labelCls %>"
href="<%= am.source %>"
target="_blank"
title="Go to the alert source"

File diff suppressed because one or more lines are too long