diff options
| author | Paul Buetow <paul@buetow.org> | 2026-01-17 17:52:11 +0200 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2026-01-17 17:52:11 +0200 |
| commit | 6708b0760eeaca068e70d71395b155caa08e33dc (patch) | |
| tree | de8c4dd4ae9cb8a19627c6240c4a8e478bd248a0 | |
| parent | bcb4bbb3214e106255756c63f9a9f2a16c685444 (diff) | |
Add OK checks section to HTML report
| -rw-r--r-- | internal/html.go | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/internal/html.go b/internal/html.go index 1c8626a..753a5b0 100644 --- a/internal/html.go +++ b/internal/html.go @@ -109,6 +109,18 @@ func (s state) htmlReport(subject string) string { } sb.WriteString(`</div>` + "\n\n") + // OK checks section + sb.WriteString(`<div class="section">` + "\n") + sb.WriteString(`<h2>OK checks</h2>` + "\n") + if numOK == 0 { + sb.WriteString(`<p>There are no OK checks...</p>` + "\n") + } else { + s.htmlReportBy(&sb, false, false, func(cs checkState) bool { + return cs.Status == nagiosOk + }) + } + sb.WriteString(`</div>` + "\n\n") + sb.WriteString(htmlFooter()) return sb.String() |
