mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 01:38:56 -04:00
# Backport This will backport the following commits from `main` to `8.7`: - [[Alerting Flyout] Fix interval parsing while editing (#152459)](https://github.com/elastic/kibana/pull/152459) <!--- Backport version: 8.9.7 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Shahzad","email":"shahzad31comp@gmail.com"},"sourceCommit":{"committedDate":"2023-03-07T21:15:50Z","message":"[Alerting Flyout] Fix interval parsing while editing (#152459)\n\nCo-authored-by: Ying Mao <ying.mao@elastic.co>","sha":"5da80301fcc7876b0828591dcc0d330c05ed7c8c","branchLabelMapping":{"^v8.8.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v8.7.0","v8.8.0"],"number":152459,"url":"https://github.com/elastic/kibana/pull/152459","mergeCommit":{"message":"[Alerting Flyout] Fix interval parsing while editing (#152459)\n\nCo-authored-by: Ying Mao <ying.mao@elastic.co>","sha":"5da80301fcc7876b0828591dcc0d330c05ed7c8c"}},"sourceBranch":"main","suggestedTargetBranches":["8.7"],"targetPullRequestStates":[{"branch":"8.7","label":"v8.7.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.8.0","labelRegex":"^v8.8.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/152459","number":152459,"mergeCommit":{"message":"[Alerting Flyout] Fix interval parsing while editing (#152459)\n\nCo-authored-by: Ying Mao <ying.mao@elastic.co>","sha":"5da80301fcc7876b0828591dcc0d330c05ed7c8c"}}]}] BACKPORT--> Co-authored-by: Shahzad <shahzad31comp@gmail.com>
This commit is contained in:
parent
9bbc509149
commit
55ece59683
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