Skip to content

Commit

Permalink
[Uptime] Update ML flyout to add cancel button (#61627)
Browse files Browse the repository at this point in the history
* update button

* fix type

* update snaps

* update layout
  • Loading branch information
shahzad31 committed Mar 30, 2020
1 parent 57d4dc4 commit dcf509e
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 4 deletions.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import React, { useContext } from 'react';
import {
EuiButton,
EuiButtonEmpty,
EuiFlexGroup,
EuiFlexItem,
EuiFlyout,
Expand Down Expand Up @@ -64,11 +65,15 @@ export function MLFlyoutView({ isCreatingJob, onClickCreate, onClose, canCreateM
<em>{labels.TAKE_SOME_TIME_TEXT}</em>
</p>
</EuiText>

<EuiSpacer />
</EuiFlyoutBody>
<EuiFlyoutFooter>
<EuiFlexGroup justifyContent="spaceBetween" alignItems="flexEnd">
<EuiFlexGroup justifyContent="spaceBetween">
<EuiFlexItem grow={false}>
<EuiButtonEmpty onClick={() => onClose()} disabled={isCreatingJob || isLoadingMLJob}>
{labels.CANCEL_LABEL}
</EuiButtonEmpty>
</EuiFlexItem>
<EuiFlexItem grow={false}>
<EuiButton
onClick={() => onClickCreate()}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,13 @@ export const CREATE_NEW_JOB = i18n.translate(
}
);

export const CANCEL_LABEL = i18n.translate(
'xpack.uptime.ml.enableAnomalyDetectionPanel.cancelLabel',
{
defaultMessage: 'Cancel',
}
);

export const CREAT_ML_JOB_DESC = i18n.translate(
'xpack.uptime.ml.enableAnomalyDetectionPanel.createMLJobDescription',
{
Expand Down

0 comments on commit dcf509e

Please sign in to comment.