-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathprober.tmpl
41 lines (39 loc) · 1006 Bytes
/
prober.tmpl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
{{/* prober.tmpl: shows probe results */}}
{{define "prober"}}
<h1>Probe results</h1>
<a href="#" class="show hidden">Show probe results</a>
<a href="#" class="hide">Hide probe results</a>
<div id="probe_info">
{{range $i, $p := .}}
<h2><a href="#{{$p.Name}}">{{$p.Name}}</a></h2>
<a name="{{$p.Name}}" />
{{if $p.Disabled}}
<p class="bad">Disabled</p>
{{else}}
<p>{{$p.Desc}}</p>
<h3 {{with $p.IsAlerting}}class="bad"{{end}}>Badness: {{$p.Badness}}</h3>
{{range $j, $r := $p.Records }}
{{if $r.Result.Passed}}
<div class="probe_result good">
<strong title="{{$r.Timestamp}} ({{$r.Ago}})">✓</strong>
</div>
{{else}}
<div class="probe_result bad">
<strong title="{{$r.Timestamp}} ({{$r.Ago}})">x</strong>
</div>
{{end}}
{{end}}
<br class="fixfloat" />
{{with $p.Records.RecentFailures}}
<h3>Recent {{$p.Name}} failures</h3>
{{range $i, $r := .}}
<div class="probe_failure">
<h3>{{$r.Timestamp}} ({{$r.Ago}})</h3>
<p>{{$r.Result.Info}}</p>
</div>
{{end}}
{{end}}
{{end}}
{{end}}
</div>
{{end}}