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
+11
View File
@@ -136,6 +136,13 @@ const (
MutationRemoveAlert MutationKind = "remove_alert"
MutationAddPeer MutationKind = "add_peer"
MutationRemovePeer MutationKind = "remove_peer"
// MutationReplaceConfig overwrites the editable portions
// (peers/checks/alerts) of cluster.yaml in one shot. The replicated
// version, updated_at, and updated_by are still set by the master.
// Used by the manual-edit watcher: an operator edits cluster.yaml
// directly, the daemon detects it, and forwards the parsed snapshot
// to the master through this mutation.
MutationReplaceConfig MutationKind = "replace_config"
)
// ProposeMutationRequest is a follower-to-master message. The payload
@@ -199,4 +206,8 @@ type CheckSnapshot struct {
OKCount int `json:"ok_count"`
Total int `json:"total"`
Detail string `json:"detail,omitempty"`
// Alerts holds one display string per effective alert. Names of
// default-attached alerts are suffixed with "*" so the operator can
// see which fired without lookup.
Alerts []string `json:"alerts,omitempty"`
}