mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
tech(alerting): set prev state when creating eval context
This commit is contained in:
@@ -39,6 +39,7 @@ func NewEvalContext(alertCtx context.Context, rule *Rule) *EvalContext {
|
||||
Logs: make([]*ResultLogEntry, 0),
|
||||
EvalMatches: make([]*EvalMatch, 0),
|
||||
log: log.New("alerting.evalContext"),
|
||||
PrevAlertState: rule.State,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -59,8 +59,6 @@ func (handler *DefaultResultHandler) GetStateFromEvaluation(evalContext *EvalCon
|
||||
}
|
||||
|
||||
func (handler *DefaultResultHandler) Handle(evalContext *EvalContext) error {
|
||||
evalContext.PrevAlertState = evalContext.Rule.State
|
||||
|
||||
executionError := ""
|
||||
annotationData := simplejson.New()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user