2017-11-17 15:18:34 +00:00
|
|
|
{{define "head"}}
|
|
|
|
<link type="text/css" rel="stylesheet" href="{{ pathPrefix }}/static/css/rules.css?v={{ buildVersion }}">
|
|
|
|
{{end}}
|
2016-05-13 15:59:59 +00:00
|
|
|
|
|
|
|
{{define "content"}}
|
|
|
|
<div class="container-fluid">
|
2018-02-13 07:51:34 +00:00
|
|
|
<h2>Rules</h2>
|
2017-11-17 15:18:34 +00:00
|
|
|
<table class="table table-bordered">
|
|
|
|
{{range .RuleGroups}}
|
|
|
|
<thead>
|
|
|
|
<tr>
|
2019-05-16 19:47:33 +00:00
|
|
|
<td colspan="3"><h2><a href="#{{reReplaceAll "([^a-zA-Z0-9])" "$1" .Name}}" id="{{reReplaceAll "([^a-zA-Z0-9])" "$1" .Name}}">{{.Name}}</a></h2></td>
|
2018-10-12 16:26:59 +00:00
|
|
|
<td><h2>{{if .GetEvaluationTimestamp.IsZero}}Never{{else}}{{since .GetEvaluationTimestamp}} ago{{end}}</h2></td>
|
2018-07-25 16:25:43 +00:00
|
|
|
<td><h2>{{humanizeDuration .GetEvaluationDuration.Seconds}}</h2></td>
|
2017-11-17 15:18:34 +00:00
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
<tr>
|
|
|
|
<td style="font-weight:bold">Rule</td>
|
2018-08-06 22:33:45 +00:00
|
|
|
<td style="font-weight:bold">State</td>
|
|
|
|
<td style="font-weight:bold">Error</td>
|
2018-10-12 16:26:59 +00:00
|
|
|
<td style="font-weight:bold">Last Evaluation</td>
|
2017-11-17 15:18:34 +00:00
|
|
|
<td style="font-weight:bold">Evaluation Time</td>
|
|
|
|
</tr>
|
|
|
|
{{range .Rules}}
|
|
|
|
<tr>
|
|
|
|
<td class="rule_cell">{{.HTMLSnippet pathPrefix}}</td>
|
2018-08-06 22:33:45 +00:00
|
|
|
<td class="state">
|
|
|
|
<span class="alert alert-{{ .Health | ruleHealthToClass }} state_indicator text-uppercase">
|
|
|
|
{{.Health}}
|
|
|
|
</span>
|
|
|
|
</td>
|
|
|
|
<td class="errors">
|
|
|
|
{{if .LastError}}
|
|
|
|
<span class="alert alert-danger state_indicator">{{.LastError}}</span>
|
|
|
|
{{end}}
|
|
|
|
</td>
|
2018-10-12 16:26:59 +00:00
|
|
|
<td>
|
|
|
|
{{if .GetEvaluationTimestamp.IsZero}}Never{{else}}{{since .GetEvaluationTimestamp}} ago{{end}}
|
|
|
|
</td>
|
2018-07-25 16:25:43 +00:00
|
|
|
<td>{{humanizeDuration .GetEvaluationDuration.Seconds}}</td>
|
2017-11-17 15:18:34 +00:00
|
|
|
</tr>
|
|
|
|
{{end}}
|
2018-02-13 07:51:34 +00:00
|
|
|
{{else}}
|
|
|
|
<tr>
|
|
|
|
<td>
|
|
|
|
No rules defined
|
|
|
|
</td>
|
|
|
|
</tr>
|
2017-11-17 15:18:34 +00:00
|
|
|
{{end}}
|
2018-02-13 07:51:34 +00:00
|
|
|
</tbody>
|
2017-11-17 15:18:34 +00:00
|
|
|
</table>
|
2016-05-13 15:59:59 +00:00
|
|
|
</div>
|
|
|
|
{{end}}
|