Skip to content

Commit

Permalink
adding cancel button to change policy
Browse files Browse the repository at this point in the history
Signed-off-by: kohinoor98 <[email protected]>
  • Loading branch information
kohinoor98 committed Nov 7, 2023
1 parent 44abf1d commit c9365dd
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down Expand Up @@ -115,6 +115,8 @@ export default class ChangePolicy extends Component<ChangePolicyProps, ChangePol
}
};

onCancel = () => this.props.history.goBack();

onSubmit = async () => {
const { selectedPolicies, selectedManagedIndices } = this.state;

Expand Down Expand Up @@ -175,6 +177,11 @@ export default class ChangePolicy extends Component<ChangePolicyProps, ChangePol
<EuiSpacer />

<EuiFlexGroup alignItems="center" justifyContent="flexEnd">
<EuiFlexItem grow={false}>
<EuiButtonEmpty onClick={this.onCancel} data-test-subj="changePolicyCancelButton">
Cancel
</EuiButtonEmpty>
</EuiFlexItem>
<EuiFlexItem grow={false}>
<EuiButton fill onClick={this.onSubmit} data-test-subj="changePolicyChangeButton">
Change
Expand Down

0 comments on commit c9365dd

Please sign in to comment.