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. (opensearch-project#328)

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

Signed-off-by: AWSHurneyt <[email protected]>
  • Loading branch information
AWSHurneyt committed Dec 5, 2022
1 parent 7b1e72a commit d544f42
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 d544f42

Please sign in to comment.