[8.x] [Index Management] Copy change for index mode field in index templates (#216624) (#216649)

# Backport

This will backport the following commits from `main` to `8.x`:
- [[Index Management] Copy change for index mode field in index
templates (#216624)](https://github.com/elastic/kibana/pull/216624)

<!--- Backport version: 9.6.6 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)

<!--BACKPORT [{"author":{"name":"Elena
Stoeva","email":"59341489+ElenaStoeva@users.noreply.github.com"},"sourceCommit":{"committedDate":"2025-04-01T13:31:25Z","message":"[Index
Management] Copy change for index mode field in index templates
(#216624)\n\n## Summary\n\nThis PR renames the title of the the index
mode field from \"Data stream\nindex mode\" to \"Index mode\" since this
field is no longer\nenabled/disabled based on the data streams field
(since\nhttps://github.com/elastic/kibana/pull/207413).\n\nWe also
switch the places of the index mode field and the data retention\nfield,
since the data retention field is displayed only when data\nstreams
toggle is switched on, so it makes sense that it is next to
this\nfield.\n\n<img width=\"1166\" alt=\"Screenshot 2025-04-01 at 11 46
45\"\nsrc=\"40e46c91-9120-44eb-b0de-ef700a5eeedd","sha":"c80325db10443d119eb83a0b1b4fd9c88c2699f0","branchLabelMapping":{"^v9.1.0$":"main","^v8.19.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Feature:Index
Management","Team:Kibana
Management","release_note:skip","backport:prev-minor","v9.1.0","v8.19.0"],"title":"[Index
Management] Copy change for index mode field in index
templates","number":216624,"url":"https://github.com/elastic/kibana/pull/216624","mergeCommit":{"message":"[Index
Management] Copy change for index mode field in index templates
(#216624)\n\n## Summary\n\nThis PR renames the title of the the index
mode field from \"Data stream\nindex mode\" to \"Index mode\" since this
field is no longer\nenabled/disabled based on the data streams field
(since\nhttps://github.com/elastic/kibana/pull/207413).\n\nWe also
switch the places of the index mode field and the data retention\nfield,
since the data retention field is displayed only when data\nstreams
toggle is switched on, so it makes sense that it is next to
this\nfield.\n\n<img width=\"1166\" alt=\"Screenshot 2025-04-01 at 11 46
45\"\nsrc=\"40e46c91-9120-44eb-b0de-ef700a5eeedd","sha":"c80325db10443d119eb83a0b1b4fd9c88c2699f0"}},"sourceBranch":"main","suggestedTargetBranches":["8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/216624","number":216624,"mergeCommit":{"message":"[Index
Management] Copy change for index mode field in index templates
(#216624)\n\n## Summary\n\nThis PR renames the title of the the index
mode field from \"Data stream\nindex mode\" to \"Index mode\" since this
field is no longer\nenabled/disabled based on the data streams field
(since\nhttps://github.com/elastic/kibana/pull/207413).\n\nWe also
switch the places of the index mode field and the data retention\nfield,
since the data retention field is displayed only when data\nstreams
toggle is switched on, so it makes sense that it is next to
this\nfield.\n\n<img width=\"1166\" alt=\"Screenshot 2025-04-01 at 11 46
45\"\nsrc=\"40e46c91-9120-44eb-b0de-ef700a5eeedd","sha":"c80325db10443d119eb83a0b1b4fd9c88c2699f0"}},{"branch":"8.x","label":"v8.19.0","branchLabelMappingKey":"^v8.19.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Elena Stoeva <59341489+ElenaStoeva@users.noreply.github.com>
This commit is contained in:
Kibana Machine 2025-04-01 17:27:57 +02:00 committed by GitHub
parent 5c3aeabe36
commit c374d67494
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -101,7 +101,7 @@ function getFieldsMeta(esDocsBase: string) {
},
indexMode: {
title: i18n.translate('xpack.idxMgmt.templateForm.stepLogistics.indexModeTitle', {
defaultMessage: 'Data stream index mode',
defaultMessage: 'Index mode',
}),
description: i18n.translate('xpack.idxMgmt.templateForm.stepLogistics.indexModeDescription', {
defaultMessage:
@ -401,19 +401,6 @@ export const StepLogistics: React.FunctionComponent<Props> = React.memo(
</FormRow>
)}
<FormRow title={indexMode.title} description={indexMode.description}>
<UseField
path="indexMode"
componentProps={{
euiFieldProps: {
hasDividers: true,
'data-test-subj': indexMode.testSubject,
options: indexMode.options,
},
}}
/>
</FormRow>
{/*
Since data stream and data retention are settings that are only allowed for non legacy,
we only need to check if data stream is set to true to show the data retention.
@ -469,6 +456,20 @@ export const StepLogistics: React.FunctionComponent<Props> = React.memo(
</FormRow>
)}
{/* Index mode */}
<FormRow title={indexMode.title} description={indexMode.description}>
<UseField
path="indexMode"
componentProps={{
euiFieldProps: {
hasDividers: true,
'data-test-subj': indexMode.testSubject,
options: indexMode.options,
},
}}
/>
</FormRow>
{/* Order */}
{isLegacy && (
<FormRow title={order.title} description={order.description}>