Added default alerts, updated UI to show alerts with checks, added auto sync for manual file editing
This commit is contained in:
@@ -275,6 +275,16 @@ func (r *Replicator) applyLocally(kind transport.MutationKind, payload json.RawM
|
||||
c.Peers = append(c.Peers, p)
|
||||
return nil
|
||||
|
||||
case transport.MutationReplaceConfig:
|
||||
var incoming config.ClusterConfig
|
||||
if err := json.Unmarshal(payload, &incoming); err != nil {
|
||||
return fmt.Errorf("decode replace_config: %w", err)
|
||||
}
|
||||
c.Peers = append([]config.PeerInfo(nil), incoming.Peers...)
|
||||
c.Checks = append([]config.Check(nil), incoming.Checks...)
|
||||
c.Alerts = append([]config.Alert(nil), incoming.Alerts...)
|
||||
return nil
|
||||
|
||||
case transport.MutationRemovePeer:
|
||||
var target string
|
||||
if err := json.Unmarshal(payload, &target); err != nil {
|
||||
|
||||
Reference in New Issue
Block a user