{{/* The polled part of Health: two rows of boxes, in the page and in its fragment (GET /server/health/fragment) alike. panel.js polls the first row (data-poll, outerHTML) and htmx swaps the second into place by its id when the fragment marks it out of band (.Refresh) — the two rows are siblings, and a fragment can replace only the element that asked for it. The Notification mail card is the third thing the fragment swaps in by id: it sits in a row of the page with the static Configuration box, so it is a column of its own. */}} {{define "health_body"}}
{{template "box_open" .Machine}}
{{range .MachineRows}} {{end}}
ResourceUsageDetail
{{.Resource}}{{if .Gauge}}{{.Gauge.Text}}{{else if .Usage}}{{.Usage}}{{else}}—{{end}}{{range .Detail}}
{{.}}
{{end}}
{{template "box_close"}}
{{template "box_open" .Processes}} {{if .ProcessError}} {{template "body_open"}}

Could not ask supervisord for the process list.

{{template "body_close"}} {{else}}
{{range .ProcessRows}} {{end}}
ProgramStateDetail
{{.Name}}{{template "tag" .State}}{{.Detail}}
{{end}} {{template "box_close"}}
{{template "box_open" .Certificate}} {{template "body_open"}} {{if .CertFacts}}{{template "facts" .CertFacts}}{{end}}

{{.CertDetail}}

{{template "body_close"}} {{template "box_close"}}
{{template "box_open" .Sockets}}
{{range .SocketRows}} {{end}}
MilterState
{{.Name}}{{if .Note}} · {{.Note}}{{end}}
{{.Path}}{{if .Detail}}
{{.Detail}}{{end}}
{{template "tag" .State}}
{{template "box_close"}}
{{template "box_open" .Hostname}} {{template "body_open"}} {{template "facts" .HostFacts}} {{template "body_close"}} {{template "box_close"}}
{{if .Refresh}} {{template "health_mail" .}}{{end}}{{end}} {{/* health_mail is the Notification mail card (the page calls it inside its own row; the fragment sends it out of band). */}} {{define "health_mail"}}
{{template "box_open" .NotifyMail}}
{{range .NotifyRows}} {{end}}
RecordState
{{.Name}}
{{.Host}}
{{template "tag" .State}}
{{template "body_open"}}

{{template "inline" .NotifyNote}}

{{template "body_close"}} {{template "box_close"}}
{{end}}