From 866acfb68030ac4c6d59642b6d3192fe83fcb727 Mon Sep 17 00:00:00 2001 From: "opensearch-trigger-bot[bot]" <98922864+opensearch-trigger-bot[bot]@users.noreply.github.com> Date: Tue, 6 Dec 2022 14:55:12 -0800 Subject: [PATCH] Fixed a bug that prevented the throttling settings from displaying for PER_ALERT bucket level trigger actions. (#328) (#397) (#404) Signed-off-by: AWSHurneyt Signed-off-by: AWSHurneyt Signed-off-by: AWSHurneyt (cherry picked from commit d6191234396f932f8fd8a9dbbc3b9cfea60d2910) Co-authored-by: AWSHurneyt --- .../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);