core(alerting): AlertRule.withEvalState wither for cursor threading
This commit is contained in:
@@ -35,4 +35,15 @@ public record AlertRule(
|
||||
targets = targets == null ? List.of() : List.copyOf(targets);
|
||||
evalState = evalState == null ? Map.of() : Map.copyOf(evalState);
|
||||
}
|
||||
|
||||
public AlertRule withEvalState(Map<String, Object> newEvalState) {
|
||||
return new AlertRule(
|
||||
id, environmentId, name, description, severity, enabled,
|
||||
conditionKind, condition, evaluationIntervalSeconds,
|
||||
forDurationSeconds, reNotifyMinutes,
|
||||
notificationTitleTmpl, notificationMessageTmpl,
|
||||
webhooks, targets, nextEvaluationAt, claimedBy, claimedUntil,
|
||||
newEvalState,
|
||||
createdAt, createdBy, updatedAt, updatedBy);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user