2013-06-13 07:10:05 -07:00
|
|
|
{{define "head"}}
|
2015-06-01 03:23:13 -07:00
|
|
|
<link type="text/css" rel="stylesheet" href="{{ pathPrefix }}/static/css/alerts.css">
|
|
|
|
<script src="{{ pathPrefix }}/static/js/alerts.js"></script>
|
2013-06-13 07:10:05 -07:00
|
|
|
{{end}}
|
|
|
|
|
|
|
|
{{define "content"}}
|
2013-07-23 18:14:40 -07:00
|
|
|
<div class="container-fluid">
|
|
|
|
<h2>Alerts</h2>
|
|
|
|
<table class="table table-bordered table-collapsed">
|
|
|
|
<tbody>
|
|
|
|
{{$alertStateToRowClass := .AlertStateToRowClass}}
|
|
|
|
{{range .AlertingRules}}
|
2013-06-13 07:10:05 -07:00
|
|
|
{{$activeAlerts := .ActiveAlerts}}
|
2013-07-23 18:14:40 -07: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 08:46:57 -07:00
|
|
|
<div>
|
|
|
|
<pre><code>{{.HTMLSnippet pathPrefix}}</code></pre>
|
2013-06-13 07:10:05 -07:00
|
|
|
</div>
|
|
|
|
{{if $activeAlerts}}
|
2013-07-23 18:14:40 -07:00
|
|
|
<table class="table table-bordered table-hover table-condensed alert_elements_table">
|
|
|
|
<tr class="">
|
2013-06-13 07:10:05 -07:00
|
|
|
<th>Labels</th>
|
|
|
|
<th>State</th>
|
|
|
|
<th>Active Since</th>
|
|
|
|
<th>Value</th>
|
|
|
|
</tr>
|
|
|
|
{{range $activeAlerts}}
|
2015-06-23 08:46:57 -07:00
|
|
|
<tr>
|
|
|
|
<td>
|
|
|
|
{{range $label, $value := .Labels}}
|
|
|
|
<span class="label label-primary">{{$label}}="{{$value}}"</span>
|
|
|
|
{{end}}
|
|
|
|
</td>
|
2015-06-24 08:22:16 -07:00
|
|
|
<td><span class="alert alert-{{ .State | alertStateToClass }} state_indicator text-uppercase">{{.State}}</span></td>
|
2015-12-15 10:46:03 -08:00
|
|
|
<td>{{.ActiveAt.Time.UTC}}</td>
|
2013-06-13 07:10:05 -07:00
|
|
|
<td>{{.Value}}</td>
|
|
|
|
</tr>
|
|
|
|
{{end}}
|
|
|
|
</table>
|
|
|
|
{{end}}
|
2013-07-23 18:14:40 -07:00
|
|
|
</td>
|
|
|
|
</tr>
|
2016-07-27 03:53:28 -07:00
|
|
|
{{else}}
|
|
|
|
<tr class="alert_header">
|
|
|
|
<td>
|
|
|
|
No alerting rules defined
|
|
|
|
</td>
|
|
|
|
</tr>
|
2013-07-23 18:14:40 -07:00
|
|
|
{{end}}
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
</div>
|
2013-06-13 07:10:05 -07:00
|
|
|
{{end}}
|