reminder: uses UpdatedAt to track state changes.

This commit is contained in:
bergquist
2018-10-02 11:19:09 +02:00
parent 9e09b2b969
commit 7f1d7cefc0
7 changed files with 21 additions and 25 deletions

View File

@@ -102,6 +102,7 @@ func NewRuleFromDBAlert(ruleDef *m.Alert) (*Rule, error) {
model.State = ruleDef.State
model.NoDataState = m.NoDataOption(ruleDef.Settings.Get("noDataState").MustString("no_data"))
model.ExecutionErrorState = m.ExecutionErrorOption(ruleDef.Settings.Get("executionErrorState").MustString("alerting"))
model.StateChanges = ruleDef.StateChanges
for _, v := range ruleDef.Settings.Get("notifications").MustArray() {
jsonModel := simplejson.NewFromAny(v)