summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2026-01-17 17:52:11 +0200
committerPaul Buetow <paul@buetow.org>2026-01-17 17:52:11 +0200
commit6708b0760eeaca068e70d71395b155caa08e33dc (patch)
treede8c4dd4ae9cb8a19627c6240c4a8e478bd248a0
parentbcb4bbb3214e106255756c63f9a9f2a16c685444 (diff)
Add OK checks section to HTML report
-rw-r--r--internal/html.go12
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()