diff options
author | Gibheer <gibheer+git@zero-knowledge.org> | 2021-12-02 17:54:14 +0100 |
---|---|---|
committer | Gibheer <gibheer+git@zero-knowledge.org> | 2021-12-02 17:54:14 +0100 |
commit | fa05045d31c05c8928020f05f1d281901d983b2b (patch) | |
tree | 2ed3bac60302bfb14535a169f4b3e10d18fc6120 /cmd/monfront/templates/check.html | |
parent | 41d4805d584161ca16b8187194385e47c36422a6 (diff) |
cmd/monfront - import monfront from separate repository
This is the import from the separate monfront repository. The history
could not be imported, but this should suffice.
Diffstat (limited to 'cmd/monfront/templates/check.html')
-rw-r--r-- | cmd/monfront/templates/check.html | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/cmd/monfront/templates/check.html b/cmd/monfront/templates/check.html new file mode 100644 index 0000000..e30f62a --- /dev/null +++ b/cmd/monfront/templates/check.html @@ -0,0 +1,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" . }} |