mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 09:19:04 -04:00
fixing issue with cancel button on revert to basic license modal (#18718)
This commit is contained in:
parent
d77cc5676b
commit
411b2455d6
4 changed files with 13 additions and 4 deletions
|
@ -13,7 +13,7 @@ import {
|
|||
shouldShowRevertToBasicLicense,
|
||||
getStartBasicMessages
|
||||
} from '../../../store/reducers/licenseManagement';
|
||||
import { startBasicLicense } from '../../../store/actions/start_basic';
|
||||
import { startBasicLicense, cancelStartBasicLicense } from '../../../store/actions/start_basic';
|
||||
|
||||
const mapStateToProps = state => {
|
||||
return {
|
||||
|
@ -25,7 +25,8 @@ const mapStateToProps = state => {
|
|||
};
|
||||
|
||||
const mapDispatchToProps = {
|
||||
startBasicLicense
|
||||
startBasicLicense,
|
||||
cancelStartBasicLicense
|
||||
};
|
||||
|
||||
export const RevertToBasic = connect(mapStateToProps, mapDispatchToProps)(
|
||||
|
|
|
@ -26,6 +26,7 @@ export class RevertToBasic extends React.PureComponent {
|
|||
needsAcknowledgement,
|
||||
messages: [firstLine, ...messages] = [],
|
||||
startBasicLicense,
|
||||
cancelStartBasicLicense,
|
||||
licenseType
|
||||
} = this.props;
|
||||
if (!needsAcknowledgement) {
|
||||
|
@ -35,7 +36,7 @@ export class RevertToBasic extends React.PureComponent {
|
|||
<EuiOverlayMask>
|
||||
<EuiConfirmModal
|
||||
title="Confirm Revert to Basic License"
|
||||
onCancel={this.cancel}
|
||||
onCancel={cancelStartBasicLicense}
|
||||
onConfirm={() => startBasicLicense(licenseType, HTMLMarqueeElement)}
|
||||
cancelButtonText="Cancel"
|
||||
confirmButtonText="Confirm"
|
||||
|
|
|
@ -12,6 +12,10 @@ export const startBasicLicenseStatus = createAction(
|
|||
'LICENSE_MANAGEMENT_START_BASIC_LICENSE_STATUS'
|
||||
);
|
||||
|
||||
export const cancelStartBasicLicense = createAction(
|
||||
'LICENSE_MANAGEMENT_CANCEL_START_BASIC_LICENSE'
|
||||
);
|
||||
|
||||
export const startBasicLicense = (currentLicenseType, ack) => async (
|
||||
dispatch,
|
||||
getState,
|
||||
|
|
|
@ -6,11 +6,14 @@
|
|||
|
||||
import { handleActions } from 'redux-actions';
|
||||
|
||||
import { startBasicLicenseStatus } from '../actions/start_basic';
|
||||
import { startBasicLicenseStatus, cancelStartBasicLicense } from '../actions/start_basic';
|
||||
|
||||
export const startBasicStatus = handleActions({
|
||||
[startBasicLicenseStatus](state, { payload }) {
|
||||
return payload;
|
||||
},
|
||||
[cancelStartBasicLicense]() {
|
||||
return {};
|
||||
}
|
||||
}, {});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue