Added default alerts, updated UI to show alerts with checks, added auto sync for manual file editing

This commit is contained in:
2026-05-14 00:25:43 +00:00
parent bd437f49e4
commit 1dc3ad1215
9 changed files with 282 additions and 21 deletions
+8
View File
@@ -169,6 +169,7 @@ func (d *Daemon) buildStatus() transport.StatusResponse {
})
}
for _, c := range snap.Checks {
check := c
cs := transport.CheckSnapshot{CheckID: c.ID, Name: c.Name, State: "unknown"}
if agg, ok := d.aggregator.SnapshotFor(c.ID); ok {
cs.State = string(agg.State)
@@ -176,6 +177,13 @@ func (d *Daemon) buildStatus() transport.StatusResponse {
cs.Total = agg.Reports
cs.Detail = agg.Detail
}
for _, a := range d.cluster.EffectiveAlertsFor(&check) {
label := a.Name
if a.Default {
label += "*"
}
cs.Alerts = append(cs.Alerts, label)
}
out.Checks = append(out.Checks, cs)
}
return out