diff options
author | Gibheer <gibheer+git@zero-knowledge.org> | 2019-01-10 05:48:25 +0100 |
---|---|---|
committer | Gibheer <gibheer+git@zero-knowledge.org> | 2019-01-10 05:48:25 +0100 |
commit | bfe455d93627bc9ec8df59be4ec2e80b24f7e0c6 (patch) | |
tree | 58c96c8a34ce3f60335af1ea6a9ddd337f75d71f /cmd/monfront/main.go | |
parent | 96d853fad68565257102fd2b722b01636f131852 (diff) |
monfront - add css to make check detail view nicer
Now all the fields are shown in a column like view, which makes viewing
them much nicer to the eye.
Diffstat (limited to 'cmd/monfront/main.go')
-rw-r--r-- | cmd/monfront/main.go | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/cmd/monfront/main.go b/cmd/monfront/main.go index a3fd50d..ec35925 100644 --- a/cmd/monfront/main.go +++ b/cmd/monfront/main.go @@ -542,9 +542,8 @@ var ( margin-right: 0.5em; background-size: contain; } - .mute { - background-image: url(/static/icon-mute); - } + .mute { background-image: url(/static/icon-mute); } + .detail > div { display: grid; grid-template-columns: 25% auto; } /* state background colors */ {{ range $mapId, $mapping := .Mappings -}} {{ range $target, $val := $mapping -}} @@ -672,11 +671,11 @@ var ( {{ template "footer" . }}`, "check": `{{ template "header" . }} {{ template "checkformheader" . }} - <content> + <content class="details"> {{ $mapping := .Mappings }} {{ with .CheckDetails }} <input type="hidden" name="check_id" value="{{ .Id }}" /> - <article> + <article class="detail"> <h1>check</h1> <div><span class="label">current state</span><span class="value state-{{ .MappingId }}-{{ index .States 0 }}">{{ (index $mapping .MappingId (index .States 0) ).Title }}</span></div> <div><span class="label">current notice</span><span class="value">{{ if .Notice }}{{ .Notice.String }}{{ end }}</span></div> @@ -687,14 +686,14 @@ var ( <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> + <article class="detail"> <h1>node {{ .NodeName }}</h1> <div><span class="label">Message</span><span class="value">{{ .NodeMessage }}</span></div> </article> - <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">{{ .CommandLine }}</span></div> + <div><span class="label">command line</span><span class="value"><code>{{ join .CommandLine " " }}</code></span></div> </article> States []int64 Notifiers []notifier |