-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ILM] Added readonly field in hot phase (#85419)
* [ILM] Added readonly field in hot phase * [ILM] Added readonly field in warm phase * Update x-pack/plugins/index_lifecycle_management/public/application/sections/edit_policy/components/phases/shared_fields/readonly_field.tsx Co-authored-by: Alison Goryachev <alisonmllr20@gmail.com> * Update x-pack/plugins/index_lifecycle_management/public/application/sections/edit_policy/form/schema.ts Co-authored-by: Alison Goryachev <alisonmllr20@gmail.com> * Update x-pack/plugins/index_lifecycle_management/public/application/sections/edit_policy/components/phases/hot_phase/hot_phase.tsx Co-authored-by: Alison Goryachev <alisonmllr20@gmail.com> * Updated labels for the form Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> Co-authored-by: Alison Goryachev <alisonmllr20@gmail.com>
- Loading branch information
1 parent
eed6844
commit 8858749
Showing
13 changed files
with
114 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
47 changes: 47 additions & 0 deletions
47
...ublic/application/sections/edit_policy/components/phases/shared_fields/readonly_field.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License; | ||
* you may not use this file except in compliance with the Elastic License. | ||
*/ | ||
|
||
import React from 'react'; | ||
import { FormattedMessage } from '@kbn/i18n/react'; | ||
import { EuiTextColor } from '@elastic/eui'; | ||
import { LearnMoreLink } from '../../learn_more_link'; | ||
import { ToggleFieldWithDescribedFormRow } from '../../described_form_row'; | ||
|
||
interface Props { | ||
phase: 'hot' | 'warm'; | ||
} | ||
|
||
export const ReadonlyField: React.FunctionComponent<Props> = ({ phase }) => { | ||
return ( | ||
<ToggleFieldWithDescribedFormRow | ||
title={ | ||
<h3> | ||
<FormattedMessage | ||
id="xpack.indexLifecycleMgmt.editPolicy.readonlyTitle" | ||
defaultMessage="Read only" | ||
/> | ||
</h3> | ||
} | ||
description={ | ||
<EuiTextColor color="subdued"> | ||
<FormattedMessage | ||
id="xpack.indexLifecycleMgmt.editPolicy.readonlyDescription" | ||
defaultMessage="Enable to make the index and index metadata read only, disable to allow writes and metadata changes." | ||
/>{' '} | ||
<LearnMoreLink docPath="ilm-readonly.html" /> | ||
</EuiTextColor> | ||
} | ||
fullWidth | ||
titleSize="xs" | ||
switchProps={{ | ||
'data-test-subj': `${phase}-readonlySwitch`, | ||
path: `_meta.${phase}.readonlyEnabled`, | ||
}} | ||
> | ||
<div /> | ||
</ToggleFieldWithDescribedFormRow> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters