Email is green if only none firing (#1475)

Signed-off-by: Benjamin Chess <bchess@gmail.com>
This commit is contained in:
Ben Chess 2018-07-23 14:06:46 +02:00 committed by Max Leonard Inden
parent 2d3385f9dd
commit f10ebba89d
No known key found for this signature in database
GPG Key ID: 5403C5464810BC26
1 changed files with 4 additions and 0 deletions

View File

@ -323,7 +323,11 @@ a {
<div class="content"> <div class="content">
<table class="main" width="100%" cellpadding="0" cellspacing="0"> <table class="main" width="100%" cellpadding="0" cellspacing="0">
<tr> <tr>
{{ if gt (len .Alerts.Firing) 0 }}
<td class="alert alert-warning"> <td class="alert alert-warning">
{{ else }}
<td class="alert alert-good">
{{ end }}
{{ .Alerts | len }} alert{{ if gt (len .Alerts) 1 }}s{{ end }} for {{ range .GroupLabels.SortedPairs }} {{ .Alerts | len }} alert{{ if gt (len .Alerts) 1 }}s{{ end }} for {{ range .GroupLabels.SortedPairs }}
{{ .Name }}={{ .Value }} {{ .Name }}={{ .Value }}
{{ end }} {{ end }}