2024-04-23 13:15:22 +10:00
|
|
|
{{- define "render_items" -}}
|
|
|
|
{{- range $title, $item := . -}}
|
|
|
|
<details open>
|
|
|
|
<summary>{{$title}}</summary>
|
|
|
|
<div class="itemdata">{{$item.Eval $.Ctx}}</div>
|
|
|
|
<div class="subitems">{{template "render_items" $item.Items}}</div>
|
|
|
|
</details>
|
|
|
|
{{- end -}}
|
|
|
|
{{- end -}}
|
|
|
|
<!DOCTYPE html>
|
|
|
|
<html>
|
|
|
|
<head>
|
2024-04-26 09:38:00 +10:00
|
|
|
<title>Status for {{.ExeName}}</title>
|
2024-04-23 13:15:22 +10:00
|
|
|
<style>
|
|
|
|
body {
|
|
|
|
font-family: sans-serif;
|
|
|
|
background: #fff;
|
|
|
|
}
|
|
|
|
h1 {
|
|
|
|
clear: both;
|
|
|
|
width: 100%;
|
|
|
|
text-align: center;
|
|
|
|
font-size: 120%;
|
|
|
|
background: #eef;
|
|
|
|
padding: 4px;
|
|
|
|
}
|
|
|
|
summary {
|
|
|
|
width: 100%;
|
|
|
|
font-size: 120%;
|
|
|
|
background: #eef;
|
|
|
|
padding: 0.2em;
|
|
|
|
border: 1px #eef solid;
|
|
|
|
}
|
|
|
|
details {
|
|
|
|
display: block;
|
|
|
|
padding: 1em 0;
|
|
|
|
}
|
|
|
|
details[open] > summary {
|
|
|
|
background: #fff;
|
|
|
|
border: 1px #000 solid;
|
|
|
|
}
|
|
|
|
.error {
|
|
|
|
background: #fee;
|
|
|
|
}
|
|
|
|
div {
|
|
|
|
padding: 0.2em;
|
|
|
|
}
|
|
|
|
div.warning {
|
|
|
|
background: #ffd;
|
|
|
|
}
|
2024-04-26 12:16:43 +10:00
|
|
|
table {
|
|
|
|
border-collapse: collapse;
|
|
|
|
border-style: solid none;
|
|
|
|
border-width: 2px;
|
|
|
|
}
|
|
|
|
table thead {
|
|
|
|
text-align: left;
|
|
|
|
}
|
|
|
|
table thead tr th {
|
|
|
|
border-bottom: 1px solid;
|
|
|
|
}
|
|
|
|
td,
|
|
|
|
th {
|
|
|
|
padding: 2px 8px;
|
|
|
|
}
|
2024-04-23 13:15:22 +10:00
|
|
|
.itemdata {
|
|
|
|
margin: 0 0 0.5em 0.86em;
|
|
|
|
padding: 0.5em 0em 0.5em 1.5em;
|
|
|
|
border-left: 0.1em #ccc dotted;
|
|
|
|
}
|
|
|
|
.subitems {
|
|
|
|
margin: 0 0 0.5em 0.86em;
|
|
|
|
padding: 0.5em 0em 0.5em 1.5em;
|
|
|
|
border-left: 0.1em #ccc dotted;
|
|
|
|
border-bottom: 0.1em #ccc dotted;
|
|
|
|
}
|
|
|
|
</style>
|
|
|
|
</head>
|
|
|
|
<body>
|
2024-04-26 09:38:00 +10:00
|
|
|
<h1>Status for {{.ExeName}}</h1>
|
2024-04-23 13:15:22 +10:00
|
|
|
<div class="summary">
|
|
|
|
{{.ExePath}}<br>
|
|
|
|
Started at {{.StartTime}} ({{.StartTimeAgo}} ago)<br>
|
|
|
|
Current time {{.CurrentTime}}<br>
|
|
|
|
Version {{.Version}}, build {{.Build}}<br>
|
|
|
|
Running in PID {{.PID}} as {{.Username}} on {{.Hostname}}<br>
|
|
|
|
{{.RuntimeVer}} on {{.GOOS}}/{{.GOARCH}} compiled by {{.Compiler}}<br>
|
|
|
|
{{.NumGoroutine}} goroutines running/{{.NumCPU}} logical CPUs usable<br>
|
|
|
|
</div>
|
|
|
|
{{template "render_items" .Items}}
|
|
|
|
</body>
|
|
|
|
</html>
|