-
Notifications
You must be signed in to change notification settings - Fork 8.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Index Management] Add support for index mode #197874
Conversation
Hey @ElenaStoeva - could we update the value formatting in the UI so they are like this?
Thank you! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copy LGTM overall. I'm just wondering if we can make the tooltip a bit clearer? I don't know if my suggestion makes sense, but happy to brainstorm if needed
...ication/sections/home/data_stream_list/data_stream_detail_panel/data_stream_detail_panel.tsx
Outdated
Show resolved
Hide resolved
Pinging @elastic/kibana-management (Team:Kibana Management) |
Flaky Test Runner Stats🎉 All tests passed! - kibana-flaky-test-suite-runner#7288[✅] x-pack/test/functional/apps/index_management/config.ts: 200/200 tests passed. |
|
||
export interface IndexModule { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removing this manual type in favor of IndicesIndexSettingsKeys
type from Es client since the manual one has missing properties (e.g. mode
).
@@ -27,7 +27,7 @@ export const IndexTablePagination = ({ | |||
readURLParams, | |||
setURLParam, | |||
}: IndexTablePaginationProps) => { | |||
const { pageSize, onTableChange } = useEuiTablePersist<IndexModule>({ | |||
const { pageSize, onTableChange } = useEuiTablePersist<Index>({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems here we used an incorrect type - it should be Index
.
x-pack/plugins/index_management/public/application/lib/index_mode_labels.ts
Show resolved
Hide resolved
@@ -88,6 +88,16 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => { | |||
await testSubjects.click('closeDetailsButton'); | |||
}); | |||
|
|||
it('shows the correct index mode in the details flyout', async () => { | |||
// Open details flyout |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be good to have tests that also check for logsdb
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added with 2590ba4.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left some minor change requests and it could use a couple more tests.
Pinging @elastic/obs-ux-management-team (Team:obs-ux-management) |
🤖 GitHub commentsExpand to view the GitHub comments
Just comment with:
|
Thanks for the review @mattkime! I added a test as suggested and responded to your questions. Let me know if you have any other suggestions. |
💚 Build Succeeded
Metrics [docs]Module Count
Public APIs missing comments
Async chunks
History
cc @ElenaStoeva |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes look good and work well!
Starting backport for target branches: 8.x https://github.com/elastic/kibana/actions/runs/11609320372 |
Closes elastic#195772 ## Summary This PR displays the index mode setting in Index templates (at Review step in creation flow and at template details flyout) and Data streams (in ds table and ds details flyout). <img width="1523" alt="Screenshot 2024-10-28 at 14 39 18" src="https://github.com/user-attachments/assets/9d40c1cd-d08a-4950-a679-29d9910ee845"> <img width="1523" alt="Screenshot 2024-10-28 at 19 05 29" src="https://github.com/user-attachments/assets/463e549d-68cd-4ddf-ae0a-cfe43e47af10"> <img width="1523" alt="Screenshot 2024-10-28 at 14 41 01" src="https://github.com/user-attachments/assets/4ccf8727-5913-4857-9dc2-48c40da3a356"> <img width="1523" alt="Screenshot 2024-10-28 at 14 41 09" src="https://github.com/user-attachments/assets/a6b6a0a9-7ae2-4201-8ff9-3bead915fb2a"> ### How to test: **Creating a Logsdb index template and data stream:** 1. Go to Index Managament -> Index templates and start creating a new template 2. Add a name and an index pattern `test-logsdb` and then go to the Settings step 3. Add the setting `"index.mode": "logsdb`. 4. Go to last step (review) and verify that the index mode is correctly displayed in Summary. Save the template. 5. In the template flyout, verify that the index mode displays the correct label. 6. Go to Console and create a data stream that mathes the index pattern of the created index template: `PUT _data_stream/test-logsdb` 7. Go to Index Management -> Data streams 8. In the data streams table, verify that the index mode column is correct for the new data stream. 9. Open the new data stream and verify that the details flyout displays the correct index mode. **Creating a Time series index template and data stream:** 1. Go to Index Managament -> Index templates and start creating a new template 2. Add a name and an index pattern `test-tsds` and then go to the Settings step 3. Add the setting `"index.mode": "time_series`. 4. For time series index template, we also need to add a mapping with a `time_series_dimension` property. Go to the Mappings step, click on "Load JSON" and add the following mappings object: ``` { "properties": { "id": { "type": "keyword", "time_series_dimension": true } } } ``` 6. Go to last step (review) and verify that the index mode is correctly displayed in Summary. Save the template. 7. In the template flyout, verify that the index mode displays the correct label. 8. Go to Console and create a data stream that mathes the index pattern of the created index template: `PUT _data_stream/test-tsds` 9. Go to Index Management -> Data streams 10. In the data streams table, verify that the index mode column is correct for the new data stream. 11. Open the new data stream and verify that the details flyout displays the correct index mode. ### Checklist - [x] Any text added follows [EUI's writing guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses sentence case text and includes [i18n support](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md) - [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios - [x] [Flaky Test Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was used on any tests changed: https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/7288 - [x] Any UI touched in this PR is usable by keyboard only (learn more about [keyboard accessibility](https://webaim.org/techniques/keyboard/)) - [x] Any UI touched in this PR does not create any new axe failures (run axe in browser: [FF](https://addons.mozilla.org/en-US/firefox/addon/axe-devtools/), [Chrome](https://chrome.google.com/webstore/detail/axe-web-accessibility-tes/lhdoppojpmngadmnindnejefpokejbdd?hl=en-US)) - [x] This renders correctly on smaller devices using a responsive layout. (You can test this [in your browser](https://www.browserstack.com/guide/responsive-testing-on-local-server)) - [x] This was checked for [cross-browser compatibility](https://www.elastic.co/support/matrix#matrix_browsers) --------- Co-authored-by: kibanamachine <[email protected]> (cherry picked from commit 40ddfbc)
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
# Backport This will backport the following commits from `main` to `8.x`: - [[Index Management] Add support for index mode (#197874)](#197874) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Elena Stoeva","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-10-31T09:25:16Z","message":"[Index Management] Add support for index mode (#197874)\n\nCloses https://github.com/elastic/kibana/issues/195772\r\n\r\n## Summary\r\n\r\nThis PR displays the index mode setting in Index templates (at Review\r\nstep in creation flow and at template details flyout) and Data streams\r\n(in ds table and ds details flyout).\r\n\r\n<img width=\"1523\" alt=\"Screenshot 2024-10-28 at 14 39 18\"\r\nsrc=\"https://github.com/user-attachments/assets/9d40c1cd-d08a-4950-a679-29d9910ee845\">\r\n<img width=\"1523\" alt=\"Screenshot 2024-10-28 at 19 05 29\"\r\nsrc=\"https://github.com/user-attachments/assets/463e549d-68cd-4ddf-ae0a-cfe43e47af10\">\r\n\r\n<img width=\"1523\" alt=\"Screenshot 2024-10-28 at 14 41 01\"\r\nsrc=\"https://github.com/user-attachments/assets/4ccf8727-5913-4857-9dc2-48c40da3a356\">\r\n<img width=\"1523\" alt=\"Screenshot 2024-10-28 at 14 41 09\"\r\nsrc=\"https://github.com/user-attachments/assets/a6b6a0a9-7ae2-4201-8ff9-3bead915fb2a\">\r\n\r\n### How to test:\r\n**Creating a Logsdb index template and data stream:**\r\n1. Go to Index Managament -> Index templates and start creating a new\r\ntemplate\r\n2. Add a name and an index pattern `test-logsdb` and then go to the\r\nSettings step\r\n3. Add the setting `\"index.mode\": \"logsdb`.\r\n4. Go to last step (review) and verify that the index mode is correctly\r\ndisplayed in Summary. Save the template.\r\n5. In the template flyout, verify that the index mode displays the\r\ncorrect label.\r\n6. Go to Console and create a data stream that mathes the index pattern\r\nof the created index template: `PUT _data_stream/test-logsdb`\r\n7. Go to Index Management -> Data streams\r\n8. In the data streams table, verify that the index mode column is\r\ncorrect for the new data stream.\r\n9. Open the new data stream and verify that the details flyout displays\r\nthe correct index mode.\r\n\r\n**Creating a Time series index template and data stream:**\r\n1. Go to Index Managament -> Index templates and start creating a new\r\ntemplate\r\n2. Add a name and an index pattern `test-tsds` and then go to the\r\nSettings step\r\n3. Add the setting `\"index.mode\": \"time_series`.\r\n4. For time series index template, we also need to add a mapping with a\r\n`time_series_dimension` property. Go to the Mappings step, click on\r\n\"Load JSON\" and add the following mappings object:\r\n```\r\n{\r\n \"properties\": {\r\n \"id\": {\r\n \"type\": \"keyword\",\r\n \"time_series_dimension\": true\r\n }\r\n }\r\n}\r\n```\r\n6. Go to last step (review) and verify that the index mode is correctly\r\ndisplayed in Summary. Save the template.\r\n7. In the template flyout, verify that the index mode displays the\r\ncorrect label.\r\n8. Go to Console and create a data stream that mathes the index pattern\r\nof the created index template: `PUT _data_stream/test-tsds`\r\n9. Go to Index Management -> Data streams\r\n10. In the data streams table, verify that the index mode column is\r\ncorrect for the new data stream.\r\n11. Open the new data stream and verify that the details flyout displays\r\nthe correct index mode.\r\n\r\n\r\n\r\n### Checklist\r\n\r\n- [x] Any text added follows [EUI's writing\r\nguidelines](https://elastic.github.io/eui/#/guidelines/writing), uses\r\nsentence case text and includes [i18n\r\nsupport](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)\r\n- [x] [Unit or functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere updated or added to match the most common scenarios\r\n- [x] [Flaky Test\r\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was\r\nused on any tests changed:\r\nhttps://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/7288\r\n- [x] Any UI touched in this PR is usable by keyboard only (learn more\r\nabout [keyboard accessibility](https://webaim.org/techniques/keyboard/))\r\n- [x] Any UI touched in this PR does not create any new axe failures\r\n(run axe in browser:\r\n[FF](https://addons.mozilla.org/en-US/firefox/addon/axe-devtools/),\r\n[Chrome](https://chrome.google.com/webstore/detail/axe-web-accessibility-tes/lhdoppojpmngadmnindnejefpokejbdd?hl=en-US))\r\n- [x] This renders correctly on smaller devices using a responsive\r\nlayout. (You can test this [in your\r\nbrowser](https://www.browserstack.com/guide/responsive-testing-on-local-server))\r\n- [x] This was checked for [cross-browser\r\ncompatibility](https://www.elastic.co/support/matrix#matrix_browsers)\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine <[email protected]>","sha":"40ddfbc044c7f9fed5cc39b57ecc7d0c479ea36d","branchLabelMapping":{"^v9.0.0$":"main","^v8.17.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Feature:Index Management","Team:Kibana Management","release_note:skip","v9.0.0","backport:prev-minor","ci:project-deploy-observability","Team:obs-ux-management","v8.17.0"],"title":"[Index Management] Add support for index mode","number":197874,"url":"https://github.com/elastic/kibana/pull/197874","mergeCommit":{"message":"[Index Management] Add support for index mode (#197874)\n\nCloses https://github.com/elastic/kibana/issues/195772\r\n\r\n## Summary\r\n\r\nThis PR displays the index mode setting in Index templates (at Review\r\nstep in creation flow and at template details flyout) and Data streams\r\n(in ds table and ds details flyout).\r\n\r\n<img width=\"1523\" alt=\"Screenshot 2024-10-28 at 14 39 18\"\r\nsrc=\"https://github.com/user-attachments/assets/9d40c1cd-d08a-4950-a679-29d9910ee845\">\r\n<img width=\"1523\" alt=\"Screenshot 2024-10-28 at 19 05 29\"\r\nsrc=\"https://github.com/user-attachments/assets/463e549d-68cd-4ddf-ae0a-cfe43e47af10\">\r\n\r\n<img width=\"1523\" alt=\"Screenshot 2024-10-28 at 14 41 01\"\r\nsrc=\"https://github.com/user-attachments/assets/4ccf8727-5913-4857-9dc2-48c40da3a356\">\r\n<img width=\"1523\" alt=\"Screenshot 2024-10-28 at 14 41 09\"\r\nsrc=\"https://github.com/user-attachments/assets/a6b6a0a9-7ae2-4201-8ff9-3bead915fb2a\">\r\n\r\n### How to test:\r\n**Creating a Logsdb index template and data stream:**\r\n1. Go to Index Managament -> Index templates and start creating a new\r\ntemplate\r\n2. Add a name and an index pattern `test-logsdb` and then go to the\r\nSettings step\r\n3. Add the setting `\"index.mode\": \"logsdb`.\r\n4. Go to last step (review) and verify that the index mode is correctly\r\ndisplayed in Summary. Save the template.\r\n5. In the template flyout, verify that the index mode displays the\r\ncorrect label.\r\n6. Go to Console and create a data stream that mathes the index pattern\r\nof the created index template: `PUT _data_stream/test-logsdb`\r\n7. Go to Index Management -> Data streams\r\n8. In the data streams table, verify that the index mode column is\r\ncorrect for the new data stream.\r\n9. Open the new data stream and verify that the details flyout displays\r\nthe correct index mode.\r\n\r\n**Creating a Time series index template and data stream:**\r\n1. Go to Index Managament -> Index templates and start creating a new\r\ntemplate\r\n2. Add a name and an index pattern `test-tsds` and then go to the\r\nSettings step\r\n3. Add the setting `\"index.mode\": \"time_series`.\r\n4. For time series index template, we also need to add a mapping with a\r\n`time_series_dimension` property. Go to the Mappings step, click on\r\n\"Load JSON\" and add the following mappings object:\r\n```\r\n{\r\n \"properties\": {\r\n \"id\": {\r\n \"type\": \"keyword\",\r\n \"time_series_dimension\": true\r\n }\r\n }\r\n}\r\n```\r\n6. Go to last step (review) and verify that the index mode is correctly\r\ndisplayed in Summary. Save the template.\r\n7. In the template flyout, verify that the index mode displays the\r\ncorrect label.\r\n8. Go to Console and create a data stream that mathes the index pattern\r\nof the created index template: `PUT _data_stream/test-tsds`\r\n9. Go to Index Management -> Data streams\r\n10. In the data streams table, verify that the index mode column is\r\ncorrect for the new data stream.\r\n11. Open the new data stream and verify that the details flyout displays\r\nthe correct index mode.\r\n\r\n\r\n\r\n### Checklist\r\n\r\n- [x] Any text added follows [EUI's writing\r\nguidelines](https://elastic.github.io/eui/#/guidelines/writing), uses\r\nsentence case text and includes [i18n\r\nsupport](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)\r\n- [x] [Unit or functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere updated or added to match the most common scenarios\r\n- [x] [Flaky Test\r\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was\r\nused on any tests changed:\r\nhttps://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/7288\r\n- [x] Any UI touched in this PR is usable by keyboard only (learn more\r\nabout [keyboard accessibility](https://webaim.org/techniques/keyboard/))\r\n- [x] Any UI touched in this PR does not create any new axe failures\r\n(run axe in browser:\r\n[FF](https://addons.mozilla.org/en-US/firefox/addon/axe-devtools/),\r\n[Chrome](https://chrome.google.com/webstore/detail/axe-web-accessibility-tes/lhdoppojpmngadmnindnejefpokejbdd?hl=en-US))\r\n- [x] This renders correctly on smaller devices using a responsive\r\nlayout. (You can test this [in your\r\nbrowser](https://www.browserstack.com/guide/responsive-testing-on-local-server))\r\n- [x] This was checked for [cross-browser\r\ncompatibility](https://www.elastic.co/support/matrix#matrix_browsers)\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine <[email protected]>","sha":"40ddfbc044c7f9fed5cc39b57ecc7d0c479ea36d"}},"sourceBranch":"main","suggestedTargetBranches":["8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/197874","number":197874,"mergeCommit":{"message":"[Index Management] Add support for index mode (#197874)\n\nCloses https://github.com/elastic/kibana/issues/195772\r\n\r\n## Summary\r\n\r\nThis PR displays the index mode setting in Index templates (at Review\r\nstep in creation flow and at template details flyout) and Data streams\r\n(in ds table and ds details flyout).\r\n\r\n<img width=\"1523\" alt=\"Screenshot 2024-10-28 at 14 39 18\"\r\nsrc=\"https://github.com/user-attachments/assets/9d40c1cd-d08a-4950-a679-29d9910ee845\">\r\n<img width=\"1523\" alt=\"Screenshot 2024-10-28 at 19 05 29\"\r\nsrc=\"https://github.com/user-attachments/assets/463e549d-68cd-4ddf-ae0a-cfe43e47af10\">\r\n\r\n<img width=\"1523\" alt=\"Screenshot 2024-10-28 at 14 41 01\"\r\nsrc=\"https://github.com/user-attachments/assets/4ccf8727-5913-4857-9dc2-48c40da3a356\">\r\n<img width=\"1523\" alt=\"Screenshot 2024-10-28 at 14 41 09\"\r\nsrc=\"https://github.com/user-attachments/assets/a6b6a0a9-7ae2-4201-8ff9-3bead915fb2a\">\r\n\r\n### How to test:\r\n**Creating a Logsdb index template and data stream:**\r\n1. Go to Index Managament -> Index templates and start creating a new\r\ntemplate\r\n2. Add a name and an index pattern `test-logsdb` and then go to the\r\nSettings step\r\n3. Add the setting `\"index.mode\": \"logsdb`.\r\n4. Go to last step (review) and verify that the index mode is correctly\r\ndisplayed in Summary. Save the template.\r\n5. In the template flyout, verify that the index mode displays the\r\ncorrect label.\r\n6. Go to Console and create a data stream that mathes the index pattern\r\nof the created index template: `PUT _data_stream/test-logsdb`\r\n7. Go to Index Management -> Data streams\r\n8. In the data streams table, verify that the index mode column is\r\ncorrect for the new data stream.\r\n9. Open the new data stream and verify that the details flyout displays\r\nthe correct index mode.\r\n\r\n**Creating a Time series index template and data stream:**\r\n1. Go to Index Managament -> Index templates and start creating a new\r\ntemplate\r\n2. Add a name and an index pattern `test-tsds` and then go to the\r\nSettings step\r\n3. Add the setting `\"index.mode\": \"time_series`.\r\n4. For time series index template, we also need to add a mapping with a\r\n`time_series_dimension` property. Go to the Mappings step, click on\r\n\"Load JSON\" and add the following mappings object:\r\n```\r\n{\r\n \"properties\": {\r\n \"id\": {\r\n \"type\": \"keyword\",\r\n \"time_series_dimension\": true\r\n }\r\n }\r\n}\r\n```\r\n6. Go to last step (review) and verify that the index mode is correctly\r\ndisplayed in Summary. Save the template.\r\n7. In the template flyout, verify that the index mode displays the\r\ncorrect label.\r\n8. Go to Console and create a data stream that mathes the index pattern\r\nof the created index template: `PUT _data_stream/test-tsds`\r\n9. Go to Index Management -> Data streams\r\n10. In the data streams table, verify that the index mode column is\r\ncorrect for the new data stream.\r\n11. Open the new data stream and verify that the details flyout displays\r\nthe correct index mode.\r\n\r\n\r\n\r\n### Checklist\r\n\r\n- [x] Any text added follows [EUI's writing\r\nguidelines](https://elastic.github.io/eui/#/guidelines/writing), uses\r\nsentence case text and includes [i18n\r\nsupport](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)\r\n- [x] [Unit or functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere updated or added to match the most common scenarios\r\n- [x] [Flaky Test\r\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was\r\nused on any tests changed:\r\nhttps://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/7288\r\n- [x] Any UI touched in this PR is usable by keyboard only (learn more\r\nabout [keyboard accessibility](https://webaim.org/techniques/keyboard/))\r\n- [x] Any UI touched in this PR does not create any new axe failures\r\n(run axe in browser:\r\n[FF](https://addons.mozilla.org/en-US/firefox/addon/axe-devtools/),\r\n[Chrome](https://chrome.google.com/webstore/detail/axe-web-accessibility-tes/lhdoppojpmngadmnindnejefpokejbdd?hl=en-US))\r\n- [x] This renders correctly on smaller devices using a responsive\r\nlayout. (You can test this [in your\r\nbrowser](https://www.browserstack.com/guide/responsive-testing-on-local-server))\r\n- [x] This was checked for [cross-browser\r\ncompatibility](https://www.elastic.co/support/matrix#matrix_browsers)\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine <[email protected]>","sha":"40ddfbc044c7f9fed5cc39b57ecc7d0c479ea36d"}},{"branch":"8.x","label":"v8.17.0","branchLabelMappingKey":"^v8.17.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Elena Stoeva <[email protected]>
Fixes #203553 ## Summary This PR fixes the template schema so that the server allows creating a template with undefined index mode. The issue is that when we exposed the index mode info in #197874, we assumed that, by default, the index mode is `standard` so `indexMode` was added as a required field. However, in #199521, we added the index mode field only if data streams toggle is enabled, so the `indexMode` is `undefined`. The PR also fixes a smaller issuer where Index mode is displayed even when it is undefined (when data streams are disabled): **Before:** <img width="905" alt="Screenshot 2024-12-10 at 19 01 09" src="https://github.com/user-attachments/assets/e22cab14-eade-4591-8da8-f9aec5ad6c43"> **Now:** <img width="905" alt="Screenshot 2024-12-10 at 18 19 29" src="https://github.com/user-attachments/assets/e7768cdc-9610-4a25-b403-0320b7137db5"> **How to test:** 1. Go to Index Management -> Index templates and start creating an index template. 2. Specify the name and the index pattern and disable the "Data streams" toggle. 3. Go to Review step and verify that index mode is not displayed in the summary and that creating the index template is successful.
Fixes elastic#203553 ## Summary This PR fixes the template schema so that the server allows creating a template with undefined index mode. The issue is that when we exposed the index mode info in elastic#197874, we assumed that, by default, the index mode is `standard` so `indexMode` was added as a required field. However, in elastic#199521, we added the index mode field only if data streams toggle is enabled, so the `indexMode` is `undefined`. The PR also fixes a smaller issuer where Index mode is displayed even when it is undefined (when data streams are disabled): **Before:** <img width="905" alt="Screenshot 2024-12-10 at 19 01 09" src="https://github.com/user-attachments/assets/e22cab14-eade-4591-8da8-f9aec5ad6c43"> **Now:** <img width="905" alt="Screenshot 2024-12-10 at 18 19 29" src="https://github.com/user-attachments/assets/e7768cdc-9610-4a25-b403-0320b7137db5"> **How to test:** 1. Go to Index Management -> Index templates and start creating an index template. 2. Specify the name and the index pattern and disable the "Data streams" toggle. 3. Go to Review step and verify that index mode is not displayed in the summary and that creating the index template is successful. (cherry picked from commit bdc8032)
Fixes elastic#203553 ## Summary This PR fixes the template schema so that the server allows creating a template with undefined index mode. The issue is that when we exposed the index mode info in elastic#197874, we assumed that, by default, the index mode is `standard` so `indexMode` was added as a required field. However, in elastic#199521, we added the index mode field only if data streams toggle is enabled, so the `indexMode` is `undefined`. The PR also fixes a smaller issuer where Index mode is displayed even when it is undefined (when data streams are disabled): **Before:** <img width="905" alt="Screenshot 2024-12-10 at 19 01 09" src="https://github.com/user-attachments/assets/e22cab14-eade-4591-8da8-f9aec5ad6c43"> **Now:** <img width="905" alt="Screenshot 2024-12-10 at 18 19 29" src="https://github.com/user-attachments/assets/e7768cdc-9610-4a25-b403-0320b7137db5"> **How to test:** 1. Go to Index Management -> Index templates and start creating an index template. 2. Specify the name and the index pattern and disable the "Data streams" toggle. 3. Go to Review step and verify that index mode is not displayed in the summary and that creating the index template is successful. (cherry picked from commit bdc8032)
…203724) # Backport This will backport the following commits from `main` to `8.17`: - [[Index Management] Fix schema for index templates (#203552)](#203552) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Elena Stoeva","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-12-11T09:06:46Z","message":"[Index Management] Fix schema for index templates (#203552)\n\nFixes https://github.com/elastic/kibana/issues/203553\r\n\r\n## Summary\r\n\r\nThis PR fixes the template schema so that the server allows creating a\r\ntemplate with undefined index mode. The issue is that when we exposed\r\nthe index mode info in #197874, we\r\nassumed that, by default, the index mode is `standard` so `indexMode`\r\nwas added as a required field. However, in\r\nhttps://github.com//pull/199521, we added the index mode\r\nfield only if data streams toggle is enabled, so the `indexMode` is\r\n`undefined`.\r\n\r\nThe PR also fixes a smaller issuer where Index mode is displayed even\r\nwhen it is undefined (when data streams are disabled):\r\n**Before:**\r\n<img width=\"905\" alt=\"Screenshot 2024-12-10 at 19 01 09\"\r\nsrc=\"https://github.com/user-attachments/assets/e22cab14-eade-4591-8da8-f9aec5ad6c43\">\r\n\r\n**Now:**\r\n<img width=\"905\" alt=\"Screenshot 2024-12-10 at 18 19 29\"\r\nsrc=\"https://github.com/user-attachments/assets/e7768cdc-9610-4a25-b403-0320b7137db5\">\r\n\r\n\r\n**How to test:**\r\n1. Go to Index Management -> Index templates and start creating an index\r\ntemplate.\r\n2. Specify the name and the index pattern and disable the \"Data streams\"\r\ntoggle.\r\n3. Go to Review step and verify that index mode is not displayed in the\r\nsummary and that creating the index template is successful.","sha":"bdc80322b08a99c763142b93e07179bed431f4dd","branchLabelMapping":{"^v9.0.0$":"main","^v8.18.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Feature:Index Management","Team:Kibana Management","release_note:skip","v9.0.0","backport:prev-minor","v8.17.0","v8.18.0","v8.17.1"],"title":"[Index Management] Fix schema for index templates","number":203552,"url":"https://github.com/elastic/kibana/pull/203552","mergeCommit":{"message":"[Index Management] Fix schema for index templates (#203552)\n\nFixes https://github.com/elastic/kibana/issues/203553\r\n\r\n## Summary\r\n\r\nThis PR fixes the template schema so that the server allows creating a\r\ntemplate with undefined index mode. The issue is that when we exposed\r\nthe index mode info in #197874, we\r\nassumed that, by default, the index mode is `standard` so `indexMode`\r\nwas added as a required field. However, in\r\nhttps://github.com//pull/199521, we added the index mode\r\nfield only if data streams toggle is enabled, so the `indexMode` is\r\n`undefined`.\r\n\r\nThe PR also fixes a smaller issuer where Index mode is displayed even\r\nwhen it is undefined (when data streams are disabled):\r\n**Before:**\r\n<img width=\"905\" alt=\"Screenshot 2024-12-10 at 19 01 09\"\r\nsrc=\"https://github.com/user-attachments/assets/e22cab14-eade-4591-8da8-f9aec5ad6c43\">\r\n\r\n**Now:**\r\n<img width=\"905\" alt=\"Screenshot 2024-12-10 at 18 19 29\"\r\nsrc=\"https://github.com/user-attachments/assets/e7768cdc-9610-4a25-b403-0320b7137db5\">\r\n\r\n\r\n**How to test:**\r\n1. Go to Index Management -> Index templates and start creating an index\r\ntemplate.\r\n2. Specify the name and the index pattern and disable the \"Data streams\"\r\ntoggle.\r\n3. Go to Review step and verify that index mode is not displayed in the\r\nsummary and that creating the index template is successful.","sha":"bdc80322b08a99c763142b93e07179bed431f4dd"}},"sourceBranch":"main","suggestedTargetBranches":["8.17","8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/203552","number":203552,"mergeCommit":{"message":"[Index Management] Fix schema for index templates (#203552)\n\nFixes https://github.com/elastic/kibana/issues/203553\r\n\r\n## Summary\r\n\r\nThis PR fixes the template schema so that the server allows creating a\r\ntemplate with undefined index mode. The issue is that when we exposed\r\nthe index mode info in #197874, we\r\nassumed that, by default, the index mode is `standard` so `indexMode`\r\nwas added as a required field. However, in\r\nhttps://github.com//pull/199521, we added the index mode\r\nfield only if data streams toggle is enabled, so the `indexMode` is\r\n`undefined`.\r\n\r\nThe PR also fixes a smaller issuer where Index mode is displayed even\r\nwhen it is undefined (when data streams are disabled):\r\n**Before:**\r\n<img width=\"905\" alt=\"Screenshot 2024-12-10 at 19 01 09\"\r\nsrc=\"https://github.com/user-attachments/assets/e22cab14-eade-4591-8da8-f9aec5ad6c43\">\r\n\r\n**Now:**\r\n<img width=\"905\" alt=\"Screenshot 2024-12-10 at 18 19 29\"\r\nsrc=\"https://github.com/user-attachments/assets/e7768cdc-9610-4a25-b403-0320b7137db5\">\r\n\r\n\r\n**How to test:**\r\n1. Go to Index Management -> Index templates and start creating an index\r\ntemplate.\r\n2. Specify the name and the index pattern and disable the \"Data streams\"\r\ntoggle.\r\n3. Go to Review step and verify that index mode is not displayed in the\r\nsummary and that creating the index template is successful.","sha":"bdc80322b08a99c763142b93e07179bed431f4dd"}},{"branch":"8.17","label":"v8.17.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.x","label":"v8.18.0","branchLabelMappingKey":"^v8.18.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Elena Stoeva <[email protected]>
…03725) # Backport This will backport the following commits from `main` to `8.x`: - [[Index Management] Fix schema for index templates (#203552)](#203552) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Elena Stoeva","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-12-11T09:06:46Z","message":"[Index Management] Fix schema for index templates (#203552)\n\nFixes https://github.com/elastic/kibana/issues/203553\r\n\r\n## Summary\r\n\r\nThis PR fixes the template schema so that the server allows creating a\r\ntemplate with undefined index mode. The issue is that when we exposed\r\nthe index mode info in #197874, we\r\nassumed that, by default, the index mode is `standard` so `indexMode`\r\nwas added as a required field. However, in\r\nhttps://github.com//pull/199521, we added the index mode\r\nfield only if data streams toggle is enabled, so the `indexMode` is\r\n`undefined`.\r\n\r\nThe PR also fixes a smaller issuer where Index mode is displayed even\r\nwhen it is undefined (when data streams are disabled):\r\n**Before:**\r\n<img width=\"905\" alt=\"Screenshot 2024-12-10 at 19 01 09\"\r\nsrc=\"https://github.com/user-attachments/assets/e22cab14-eade-4591-8da8-f9aec5ad6c43\">\r\n\r\n**Now:**\r\n<img width=\"905\" alt=\"Screenshot 2024-12-10 at 18 19 29\"\r\nsrc=\"https://github.com/user-attachments/assets/e7768cdc-9610-4a25-b403-0320b7137db5\">\r\n\r\n\r\n**How to test:**\r\n1. Go to Index Management -> Index templates and start creating an index\r\ntemplate.\r\n2. Specify the name and the index pattern and disable the \"Data streams\"\r\ntoggle.\r\n3. Go to Review step and verify that index mode is not displayed in the\r\nsummary and that creating the index template is successful.","sha":"bdc80322b08a99c763142b93e07179bed431f4dd","branchLabelMapping":{"^v9.0.0$":"main","^v8.18.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Feature:Index Management","Team:Kibana Management","release_note:skip","v9.0.0","backport:prev-minor","v8.17.0","v8.18.0","v8.17.1"],"title":"[Index Management] Fix schema for index templates","number":203552,"url":"https://github.com/elastic/kibana/pull/203552","mergeCommit":{"message":"[Index Management] Fix schema for index templates (#203552)\n\nFixes https://github.com/elastic/kibana/issues/203553\r\n\r\n## Summary\r\n\r\nThis PR fixes the template schema so that the server allows creating a\r\ntemplate with undefined index mode. The issue is that when we exposed\r\nthe index mode info in #197874, we\r\nassumed that, by default, the index mode is `standard` so `indexMode`\r\nwas added as a required field. However, in\r\nhttps://github.com//pull/199521, we added the index mode\r\nfield only if data streams toggle is enabled, so the `indexMode` is\r\n`undefined`.\r\n\r\nThe PR also fixes a smaller issuer where Index mode is displayed even\r\nwhen it is undefined (when data streams are disabled):\r\n**Before:**\r\n<img width=\"905\" alt=\"Screenshot 2024-12-10 at 19 01 09\"\r\nsrc=\"https://github.com/user-attachments/assets/e22cab14-eade-4591-8da8-f9aec5ad6c43\">\r\n\r\n**Now:**\r\n<img width=\"905\" alt=\"Screenshot 2024-12-10 at 18 19 29\"\r\nsrc=\"https://github.com/user-attachments/assets/e7768cdc-9610-4a25-b403-0320b7137db5\">\r\n\r\n\r\n**How to test:**\r\n1. Go to Index Management -> Index templates and start creating an index\r\ntemplate.\r\n2. Specify the name and the index pattern and disable the \"Data streams\"\r\ntoggle.\r\n3. Go to Review step and verify that index mode is not displayed in the\r\nsummary and that creating the index template is successful.","sha":"bdc80322b08a99c763142b93e07179bed431f4dd"}},"sourceBranch":"main","suggestedTargetBranches":["8.17","8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/203552","number":203552,"mergeCommit":{"message":"[Index Management] Fix schema for index templates (#203552)\n\nFixes https://github.com/elastic/kibana/issues/203553\r\n\r\n## Summary\r\n\r\nThis PR fixes the template schema so that the server allows creating a\r\ntemplate with undefined index mode. The issue is that when we exposed\r\nthe index mode info in #197874, we\r\nassumed that, by default, the index mode is `standard` so `indexMode`\r\nwas added as a required field. However, in\r\nhttps://github.com//pull/199521, we added the index mode\r\nfield only if data streams toggle is enabled, so the `indexMode` is\r\n`undefined`.\r\n\r\nThe PR also fixes a smaller issuer where Index mode is displayed even\r\nwhen it is undefined (when data streams are disabled):\r\n**Before:**\r\n<img width=\"905\" alt=\"Screenshot 2024-12-10 at 19 01 09\"\r\nsrc=\"https://github.com/user-attachments/assets/e22cab14-eade-4591-8da8-f9aec5ad6c43\">\r\n\r\n**Now:**\r\n<img width=\"905\" alt=\"Screenshot 2024-12-10 at 18 19 29\"\r\nsrc=\"https://github.com/user-attachments/assets/e7768cdc-9610-4a25-b403-0320b7137db5\">\r\n\r\n\r\n**How to test:**\r\n1. Go to Index Management -> Index templates and start creating an index\r\ntemplate.\r\n2. Specify the name and the index pattern and disable the \"Data streams\"\r\ntoggle.\r\n3. Go to Review step and verify that index mode is not displayed in the\r\nsummary and that creating the index template is successful.","sha":"bdc80322b08a99c763142b93e07179bed431f4dd"}},{"branch":"8.17","label":"v8.17.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.x","label":"v8.18.0","branchLabelMappingKey":"^v8.18.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Elena Stoeva <[email protected]>
Fixes elastic#203553 ## Summary This PR fixes the template schema so that the server allows creating a template with undefined index mode. The issue is that when we exposed the index mode info in elastic#197874, we assumed that, by default, the index mode is `standard` so `indexMode` was added as a required field. However, in elastic#199521, we added the index mode field only if data streams toggle is enabled, so the `indexMode` is `undefined`. The PR also fixes a smaller issuer where Index mode is displayed even when it is undefined (when data streams are disabled): **Before:** <img width="905" alt="Screenshot 2024-12-10 at 19 01 09" src="https://github.com/user-attachments/assets/e22cab14-eade-4591-8da8-f9aec5ad6c43"> **Now:** <img width="905" alt="Screenshot 2024-12-10 at 18 19 29" src="https://github.com/user-attachments/assets/e7768cdc-9610-4a25-b403-0320b7137db5"> **How to test:** 1. Go to Index Management -> Index templates and start creating an index template. 2. Specify the name and the index pattern and disable the "Data streams" toggle. 3. Go to Review step and verify that index mode is not displayed in the summary and that creating the index template is successful.
Closes #195772
Summary
This PR displays the index mode setting in Index templates (at Review step in creation flow and at template details flyout) and Data streams (in ds table and ds details flyout).
How to test:
Creating a Logsdb index template and data stream:
test-logsdb
and then go to the Settings step"index.mode": "logsdb
.PUT _data_stream/test-logsdb
Creating a Time series index template and data stream:
test-tsds
and then go to the Settings step"index.mode": "time_series
.time_series_dimension
property. Go to the Mappings step, click on "Load JSON" and add the following mappings object:PUT _data_stream/test-tsds
Checklist