mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 17:28:26 -04:00
[Alerting Flyout] Fix interval parsing while editing (#152459)
Co-authored-by: Ying Mao <ying.mao@elastic.co>
This commit is contained in:
parent
157a36573d
commit
5da80301fc
1 changed files with 4 additions and 3 deletions
|
@ -61,9 +61,10 @@ export function validateBaseProperties(
|
|||
|
||||
const invalidThrottleActions = ruleObject.actions.filter((a) => {
|
||||
const throttleDuration = a.frequency?.throttle ? parseDuration(a.frequency.throttle) : 0;
|
||||
const intervalDuration = ruleObject.schedule.interval
|
||||
? parseDuration(ruleObject.schedule.interval)
|
||||
: 0;
|
||||
const intervalDuration =
|
||||
ruleObject.schedule.interval && ruleObject.schedule.interval.length > 1
|
||||
? parseDuration(ruleObject.schedule.interval)
|
||||
: 0;
|
||||
return (
|
||||
a.frequency?.notifyWhen === RuleNotifyWhen.THROTTLE && throttleDuration < intervalDuration
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue