Skip to content

Commit

Permalink
Fixed a bug that prevented the throttling settings from displaying fo…
Browse files Browse the repository at this point in the history
…r PER_ALERT bucket level trigger actions. (#328) (#397) (#404)

Signed-off-by: AWSHurneyt <[email protected]>

Signed-off-by: AWSHurneyt <[email protected]>

Signed-off-by: AWSHurneyt <[email protected]>
(cherry picked from commit d619123)

Co-authored-by: AWSHurneyt <[email protected]>
  • Loading branch information
opensearch-trigger-bot[bot] and AWSHurneyt authored Dec 6, 2022
1 parent dba9da7 commit 866acfb
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,7 @@ export default function Message(
switch (monitorType) {
case MONITOR_TYPE.BUCKET_LEVEL:
displayActionableAlertsOptions = true;
displayThrottlingSettings = actionExecutionScopeId === NOTIFY_OPTIONS_VALUES.PER_ALERT;
actionableAlertsSelections = _.get(values, actionableAlertsSelectionsPath);
break;
case MONITOR_TYPE.DOC_LEVEL:
Expand All @@ -194,6 +195,8 @@ export default function Message(
_.set(values, actionableAlertsSelectionsPath, actionableAlertsSelections);
}

if (!displayThrottlingSettings) _.set(values, `${actionPath}.throttle_enabled`, false);

let preview = '';
try {
preview = Mustache.render(action.message_template.source, context);
Expand Down

0 comments on commit 866acfb

Please sign in to comment.