improving warnings for delete and force merge (#20264) (#20347)

* improving warnings for delete and force merge

* PR feedback
This commit is contained in:
Bill McConaghy 2018-06-29 12:09:17 -04:00 committed by GitHub
parent 2b85a2ada9
commit 807f71bb84
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -9,12 +9,14 @@ import { all } from 'lodash';
import pluralize from 'pluralize';
import {
EuiButton,
EuiCallOut,
EuiContextMenu,
EuiFieldText,
EuiForm,
EuiFormRow,
EuiIcon,
EuiPopover,
EuiSpacer,
EuiConfirmModal,
EuiOverlayMask
} from '@elastic/eui';
@ -207,7 +209,7 @@ export class IndexActionsContextMenu extends Component {
return (
<EuiOverlayMask>
<EuiConfirmModal
title={`Set number of segments for force merge`}
title={`Force merge`}
onCancel={this.closeForcemergeSegmentsModal}
onConfirm={() => {
if (!this.forcemergeSegmentsError()) {
@ -233,12 +235,24 @@ export class IndexActionsContextMenu extends Component {
<li key={indexName}>{indexName}</li>
))}
</ul>
<EuiCallOut
title="Proceed with caution!"
color="warning"
iconType="help"
>
<p>
Force merging a large index or an index that is not read-only can
potentially cause performance and stability issues in the cluster
if it is not run properly (run against non-read-only indices) or run during peak hours.
</p>
</EuiCallOut>
<EuiSpacer size="m" />
<EuiForm
isInvalid={this.forcemergeSegmentsError()}
error={this.forcemergeSegmentsError()}
>
<EuiFormRow
label="Maximum number of segments"
label="Maximum number of segments per shard"
helpText={helpText}
>
<EuiFieldText
@ -282,10 +296,16 @@ export class IndexActionsContextMenu extends Component {
<li key={indexName}>{indexName}</li>
))}
</ul>
<p>
This operation cannot be undone. Make sure you have appropriate
backups.
</p>
<EuiCallOut
title="Proceed with caution!"
color="warning"
iconType="help"
>
<p>
This operation cannot be undone. Make sure you have appropriate
backups.
</p>
</EuiCallOut>
</div>
</EuiConfirmModal>
</EuiOverlayMask>