From 473488a91ac7e28a390ebec300ce44094ce1de9a Mon Sep 17 00:00:00 2001 From: aniket Date: Thu, 7 Aug 2025 15:02:05 +0530 Subject: [PATCH] feat(cumulative): added cumulative window --- pkg/types/ruletypes/api_params.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/types/ruletypes/api_params.go b/pkg/types/ruletypes/api_params.go index 0303ed7a54b9..cf51225c2122 100644 --- a/pkg/types/ruletypes/api_params.go +++ b/pkg/types/ruletypes/api_params.go @@ -144,7 +144,7 @@ func ParseIntoRule(initRule PostableRule, content []byte, kind RuleDataKind) (*P //added alerts v2 fields rule.RuleCondition.Thresholds = append(rule.RuleCondition.Thresholds, - NewBasicRuleThreshold(rule.AlertName, rule.RuleCondition.Target, 0, rule.RuleCondition.MatchType, rule.RuleCondition.CompareOp, rule.RuleCondition.SelectedQuery, rule.RuleCondition.TargetUnit, rule.RuleCondition.CompositeQuery.Unit)) + NewBasicRuleThreshold(rule.AlertName, rule.RuleCondition.Target, nil, rule.RuleCondition.MatchType, rule.RuleCondition.CompareOp, rule.RuleCondition.SelectedQuery, rule.RuleCondition.TargetUnit, rule.RuleCondition.CompositeQuery.Unit)) rule.Evaluation = NewEvaluation("rolling", RollingWindow{EvalWindow: rule.EvalWindow, Frequency: rule.Frequency, RequiredNumPoints: rule.RuleCondition.RequiredNumPoints, RequireMinPoints: rule.RuleCondition.RequireMinPoints}) return rule, nil }