From 18010ada1adb192ced03e6e634e133adef29fe9b Mon Sep 17 00:00:00 2001 From: AWSHurneyt Date: Tue, 29 Nov 2022 20:44:21 -0500 Subject: [PATCH] Fixed a bug that prevented the throttling settings from displaying for PER_ALERT bucket level trigger actions. (#328) Signed-off-by: AWSHurneyt Signed-off-by: AWSHurneyt (cherry picked from commit 6287bd52699cba135d67a186d15942e4bf6f91f6) --- .../pages/CreateTrigger/components/Action/actions/Message.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/public/pages/CreateTrigger/components/Action/actions/Message.js b/public/pages/CreateTrigger/components/Action/actions/Message.js index 60b4debc0..d754125d0 100644 --- a/public/pages/CreateTrigger/components/Action/actions/Message.js +++ b/public/pages/CreateTrigger/components/Action/actions/Message.js @@ -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: @@ -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);