From 6e65e491f288125cbdc5127bacef037e53efd482 Mon Sep 17 00:00:00 2001 From: "opensearch-trigger-bot[bot]" <98922864+opensearch-trigger-bot[bot]@users.noreply.github.com> Date: Tue, 7 Jun 2022 14:17:28 -0700 Subject: [PATCH] Fixed a bug that was causing the action execution policy to be configurable for query and cluster metrics monitors. (#261) (#263) * Fixed a bug that was causing the action execution policy to be configurable for query and cluster metrics monitors. Signed-off-by: AWSHurneyt * Updated snapshots. Signed-off-by: AWSHurneyt (cherry picked from commit fdd52fe4efc63cc099d715159fb3e1fa319e6e40) Co-authored-by: AWSHurneyt --- .../Action/__snapshots__/Action.test.js.snap | 198 ++---------------- .../components/Action/actions/Message.js | 2 +- .../__snapshots__/Message.test.js.snap | 99 +-------- 3 files changed, 34 insertions(+), 265 deletions(-) diff --git a/public/pages/CreateTrigger/components/Action/__snapshots__/Action.test.js.snap b/public/pages/CreateTrigger/components/Action/__snapshots__/Action.test.js.snap index 7b7429067..f7c795f04 100644 --- a/public/pages/CreateTrigger/components/Action/__snapshots__/Action.test.js.snap +++ b/public/pages/CreateTrigger/components/Action/__snapshots__/Action.test.js.snap @@ -397,101 +397,24 @@ exports[`Action renders with Notifications plugin installed 1`] = `
-
-
- -
+
-
-
-
-
- -
- -
-
-
-
-
-
-
-
- -
- -
-
-
+ + Perform action + +
+ Per monitor execution
+
-
-
- -
+
-
-
-
-
- -
- -
-
-
-
-
-
-
-
- -
- -
-
-
+ + Perform action + +
+ Per monitor execution
+
setDisplayPreview(e.target.checked); const monitorType = _.get(context, 'ctx.monitor.monitor_type', MONITOR_TYPE.QUERY_LEVEL); const editableActionExecutionPolicy = - monitorType === MONITOR_TYPE.BUCKET_LEVEL || MONITOR_TYPE.DOC_LEVEL; + monitorType === MONITOR_TYPE.BUCKET_LEVEL || monitorType === MONITOR_TYPE.DOC_LEVEL; const actionPath = `${fieldPath}actions.${index}`; const actionExecutionPolicyPath = editableActionExecutionPolicy diff --git a/public/pages/CreateTrigger/components/Action/actions/__snapshots__/Message.test.js.snap b/public/pages/CreateTrigger/components/Action/actions/__snapshots__/Message.test.js.snap index e11394570..2d689a0b2 100644 --- a/public/pages/CreateTrigger/components/Action/actions/__snapshots__/Message.test.js.snap +++ b/public/pages/CreateTrigger/components/Action/actions/__snapshots__/Message.test.js.snap @@ -170,101 +170,24 @@ exports[`Message renders 1`] = `
-
+
- -
-
-
-
-
-
- -
- -
-
-
-
-
-
-
-
- -
- -
-
-
+ + Perform action + +
+ Per monitor execution
+