2013-06-13 14:10:05 +00:00
|
|
|
{{define "head"}}
|
2017-03-03 20:36:06 +00:00
|
|
|
<link type="text/css" rel="stylesheet" href="{{ pathPrefix }}/static/css/alerts.css?v={{ buildVersion }}">
|
|
|
|
<script src="{{ pathPrefix }}/static/js/alerts.js?v={{ buildVersion }}"></script>
|
2013-06-13 14:10:05 +00:00
|
|
|
{{end}}
|
|
|
|
|
|
|
|
{{define "content"}}
|
2013-07-24 01:14:40 +00:00
|
|
|
<div class="container-fluid">
|
2018-03-01 15:26:36 +00:00
|
|
|
<h1>Alerts</h1>
|
|
|
|
<div class="filters">
|
|
|
|
<button type="button" class="targets btn btn-primary show-annotations">
|
|
|
|
<i class="glyphicon glyphicon-unchecked"></i> Show annotations
|
|
|
|
</button>
|
|
|
|
</div>
|
2013-07-24 01:14:40 +00:00
|
|
|
<table class="table table-bordered table-collapsed">
|
|
|
|
<tbody>
|
|
|
|
{{$alertStateToRowClass := .AlertStateToRowClass}}
|
|
|
|
{{range .AlertingRules}}
|
2013-06-13 14:10:05 +00:00
|
|
|
{{$activeAlerts := .ActiveAlerts}}
|
2013-07-24 01:14:40 +00:00
|
|
|
<tr class="{{index $alertStateToRowClass .State}} alert_header">
|
|
|
|
<td><i class="icon-chevron-down"></i> <b>{{.Name}}</b> ({{len $activeAlerts}} active)</td>
|
|
|
|
</tr>
|
|
|
|
<tr class="alert_details">
|
|
|
|
<td>
|
2015-06-23 15:46:57 +00:00
|
|
|
<div>
|
|
|
|
<pre><code>{{.HTMLSnippet pathPrefix}}</code></pre>
|
2013-06-13 14:10:05 +00:00
|
|
|
</div>
|
|
|
|
{{if $activeAlerts}}
|
2013-07-24 01:14:40 +00:00
|
|
|
<table class="table table-bordered table-hover table-condensed alert_elements_table">
|
|
|
|
<tr class="">
|
2013-06-13 14:10:05 +00:00
|
|
|
<th>Labels</th>
|
|
|
|
<th>State</th>
|
|
|
|
<th>Active Since</th>
|
|
|
|
<th>Value</th>
|
|
|
|
</tr>
|
|
|
|
{{range $activeAlerts}}
|
2015-06-23 15:46:57 +00:00
|
|
|
<tr>
|
|
|
|
<td>
|
2017-07-08 09:42:13 +00:00
|
|
|
{{range $label, $value := .Labels.Map}}
|
2015-06-23 15:46:57 +00:00
|
|
|
<span class="label label-primary">{{$label}}="{{$value}}"</span>
|
|
|
|
{{end}}
|
|
|
|
</td>
|
2015-06-24 15:22:16 +00:00
|
|
|
<td><span class="alert alert-{{ .State | alertStateToClass }} state_indicator text-uppercase">{{.State}}</span></td>
|
2017-05-10 13:30:10 +00:00
|
|
|
<td>{{.ActiveAt.UTC}}</td>
|
2013-06-13 14:10:05 +00:00
|
|
|
<td>{{.Value}}</td>
|
|
|
|
</tr>
|
2018-03-01 15:26:36 +00:00
|
|
|
{{ if .Annotations.Map}}
|
|
|
|
<tr style="display:none" class="alert_annotations">
|
|
|
|
<th colspan="4">Annotations</th>
|
|
|
|
</tr>
|
|
|
|
<tr style="display:none" class="alert_annotations">
|
|
|
|
<td colspan="4">
|
|
|
|
<dl>
|
|
|
|
{{range $label, $value := .Annotations.Map}}
|
|
|
|
<dt>{{$label}}</dt>
|
|
|
|
<dd>{{$value}}</dd>
|
|
|
|
{{end}}
|
|
|
|
</dl>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
{{end}}
|
2013-06-13 14:10:05 +00:00
|
|
|
{{end}}
|
|
|
|
</table>
|
|
|
|
{{end}}
|
2013-07-24 01:14:40 +00:00
|
|
|
</td>
|
|
|
|
</tr>
|
2016-07-27 10:53:28 +00:00
|
|
|
{{else}}
|
2018-02-14 06:15:39 +00:00
|
|
|
<tr>
|
2016-07-27 10:53:28 +00:00
|
|
|
<td>
|
|
|
|
No alerting rules defined
|
|
|
|
</td>
|
|
|
|
</tr>
|
2013-07-24 01:14:40 +00:00
|
|
|
{{end}}
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
</div>
|
2013-06-13 14:10:05 +00:00
|
|
|
{{end}}
|