From 0c0eb376f090d685f0f6aacc203e6dd97e0f7b93 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sat, 11 Nov 2023 02:33:35 +0000 Subject: [PATCH] adding cancel button to change policy (#919) * adding cancel button to change policy Signed-off-by: kohinoor98 * updated ChangePolicy snapshot to incl Cancel's div Signed-off-by: kohinoor98 * auto fixing the ChangePolicy.test snapshot Signed-off-by: kohinoor98 --------- Signed-off-by: kohinoor98 Co-authored-by: bowenlan-amzn (cherry picked from commit 1c8f0c660a6a7ef4960862e67ab8140a8d156691) Signed-off-by: github-actions[bot] --- .../containers/ChangePolicy/ChangePolicy.tsx | 9 ++++++++- .../__snapshots__/ChangePolicy.test.tsx.snap | 19 +++++++++++++++++++ 2 files changed, 27 insertions(+), 1 deletion(-) diff --git a/public/pages/ChangePolicy/containers/ChangePolicy/ChangePolicy.tsx b/public/pages/ChangePolicy/containers/ChangePolicy/ChangePolicy.tsx index b32f5a45b..df7fe9f9e 100644 --- a/public/pages/ChangePolicy/containers/ChangePolicy/ChangePolicy.tsx +++ b/public/pages/ChangePolicy/containers/ChangePolicy/ChangePolicy.tsx @@ -5,7 +5,7 @@ import React, { Component } from "react"; import { RouteComponentProps } from "react-router-dom"; -import { EuiSpacer, EuiTitle, EuiButton, EuiFlexGroup, EuiFlexItem } from "@elastic/eui"; +import { EuiSpacer, EuiTitle, EuiButton, EuiFlexGroup, EuiFlexItem, EuiButtonEmpty } from "@elastic/eui"; import { IndexService, ManagedIndexService } from "../../../../services"; import ChangeManagedIndices from "../../components/ChangeManagedIndices"; import NewPolicy from "../../components/NewPolicy"; @@ -115,6 +115,8 @@ export default class ChangePolicy extends Component this.props.history.goBack(); + onSubmit = async () => { const { selectedPolicies, selectedManagedIndices } = this.state; @@ -175,6 +177,11 @@ export default class ChangePolicy extends Component + + + Cancel + + Change diff --git a/public/pages/ChangePolicy/containers/ChangePolicy/__snapshots__/ChangePolicy.test.tsx.snap b/public/pages/ChangePolicy/containers/ChangePolicy/__snapshots__/ChangePolicy.test.tsx.snap index fc49473fa..1f40cb70b 100644 --- a/public/pages/ChangePolicy/containers/ChangePolicy/__snapshots__/ChangePolicy.test.tsx.snap +++ b/public/pages/ChangePolicy/containers/ChangePolicy/__snapshots__/ChangePolicy.test.tsx.snap @@ -428,6 +428,25 @@ exports[` spec renders the component 1`] = `
+
+ +