prometheus/web/templates/alerts.html

47 lines
1.4 KiB
HTML
Raw Normal View History

{{define "head"}}
<link type="text/css" rel="stylesheet" href="/static/css/alerts.css">
<script src="/static/js/alerts.js"></script>
{{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}}
{{$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>
<div class="alert_description">
2013-07-24 01:14:40 +00:00
<span class="label alert_rule">{{.HTMLSnippet}}</span>
</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="">
<th>Labels</th>
<th>State</th>
<th>Active Since</th>
<th>Value</th>
</tr>
{{range $activeAlerts}}
2013-07-24 01:14:40 +00:00
<tr class="{{index $alertStateToRowClass .State}}">
<td>{{.Labels}}</td>
<td>{{.State}}</td>
<td>{{.ActiveSince}}</td>
<td>{{.Value}}</td>
</tr>
{{end}}
</table>
{{end}}
2013-07-24 01:14:40 +00:00
</td>
</tr>
{{end}}
</tbody>
</table>
</div>
{{end}}