2013-06-13 14:10:05 +00:00
|
|
|
{{define "head"}}
|
2015-06-01 10:23:13 +00:00
|
|
|
<link type="text/css" rel="stylesheet" href="{{ pathPrefix }}/static/css/alerts.css">
|
|
|
|
<script src="{{ pathPrefix }}/static/js/alerts.js"></script>
|
2013-06-13 14:10:05 +00:00
|
|
|
{{end}}
|
|
|
|
|
|
|
|
{{define "content"}}
|
2013-07-24 01:14:40 +00:00
|
|
|
<div class="container-fluid">
|
|
|
|
<h2>Alerts</h2>
|
|
|
|
<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>
|
2013-06-13 14:10:05 +00:00
|
|
|
<div class="alert_description">
|
2015-05-18 17:44:40 +00:00
|
|
|
<span class="label alert_rule">{{.HTMLSnippet pathPrefix}}</span>
|
2013-07-24 10:23:35 +00:00
|
|
|
<a href="#" class="silence_children_link">Silence All Children…</a>
|
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>
|
2013-07-24 10:23:35 +00:00
|
|
|
<th>Silence</th>
|
2013-06-13 14:10:05 +00:00
|
|
|
</tr>
|
|
|
|
{{range $activeAlerts}}
|
2013-07-24 01:14:40 +00:00
|
|
|
<tr class="{{index $alertStateToRowClass .State}}">
|
2013-06-13 14:10:05 +00:00
|
|
|
<td>{{.Labels}}</td>
|
|
|
|
<td>{{.State}}</td>
|
|
|
|
<td>{{.ActiveSince}}</td>
|
|
|
|
<td>{{.Value}}</td>
|
2013-07-24 10:23:35 +00:00
|
|
|
<td><a href="#" class="silence_alert_link">Silence…</button><td>
|
2013-06-13 14:10:05 +00:00
|
|
|
</tr>
|
|
|
|
{{end}}
|
|
|
|
</table>
|
|
|
|
{{end}}
|
2013-07-24 01:14:40 +00:00
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
{{end}}
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
</div>
|
2013-06-13 14:10:05 +00:00
|
|
|
{{end}}
|