aboutsummaryrefslogtreecommitdiff
path: root/cmd/monfront/templates/check.html
blob: e30f62aa42328f470f04aaad0ef1a96c9c5f1e89 (plain) (blame)
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
42
43
44
45
46
47
48
49
50
51
    {{ template "header" . }}
		<section id="content">
      {{ template "checkformheader" . }}
			{{ $mapping := .Mappings }}
			{{ with .CheckDetails }}
				<input type="hidden" name="checks" value="{{ .Id }}" />
				<article class="detail">
          <h1>check for service {{ .Name }}</h1>
					<div><span class="label">current state</span><span class="value state-{{ index .States 0 }}"></span></div>
					<div><span class="label">current notice</span><span class="value">{{ if .Notice }}{{ .Notice.String }}{{ end }}</span></div>
					<div><span class="label">Message</span><span class="value">{{ .Message }}</span></div>
					<div><span class="label">enabled</span><span class="value">{{ .Enabled }}</span></div>
					<div><span class="label">updated</span><span class="value">{{ .Updated.Format "2006.01.02 15:04:05" }}</span></div>
					<div><span class="label">next check</span><span class="value">{{ .NextTime.Format "2006.01.02 15:04:05" }}</span></div>
					<div><span class="label">last refresh</span><span class="value">{{ .LastRefresh.Format "2006.01.02 15:04:05" }}</span></div>
					<div><span class="label">mapping</span><span class="value">{{ .MappingId }}</span></div>
				</article>
				<article class="detail">
					<h1>node <a href="/checks?node_id={{ .NodeId }}">{{ .NodeName }}</a></h1>
					<div><span class="label">Message</span><span class="value">{{ .NodeMessage }}</span></div>
				</article>
				<article class="detail">
					<h1>command {{ .CommandName }}</h1>
					<div><span class="label">Message</span><span class="value">{{ .CommandMessage }}</span></div>
					<div><span class="label">command line</span><span class="value"><code>{{ join .CommandLine " " }}</code></span></div>
				</article>
        <article class="detail">
          <h1>checker {{ .CheckerName }}</h1>
          <div><span class="label">Description</span><span class="value">{{ .CheckerMsg }}</span></div>
        </article>
				<article>
					<h1>notifications</h1>
					<table>
						<thead><tr><th>notifier</th><th>state</th><th>created</th><th>sent</th><th>output</th></thead>
						<tbody>
							{{ range .Notifications -}}
								<tr>
									<td>{{ .NotifierName }}</td>
									<td class="state-{{ .MappingId }}-{{ .State }}">{{ (index $mapping .MappingId .State).Title }}</td>
									<td>{{ .Inserted.Format "2006.01.02 15:04:05"  }}</td>
									<td>{{ if .Sent.Valid }}{{ .Sent.Time.Format "2006.01.02 15:04:05"  }}{{ end }}</td>
									<td>{{ .Output }}</td>
								</tr>
							{{ end -}}
						</tbody>
					</table>
				</article>
			{{ end }}
      {{ template "checkformfooter" . }}
		</section>
		{{ template "footer" . }}