-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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 index mode field in index template form #199521
[Index Management] Add index mode field in index template form #199521
Conversation
207ee92
to
c73ae20
Compare
Pinging @elastic/kibana-management (Team:Kibana Management) |
adc10b9
to
364b5b0
Compare
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.
Overall the code looks good and works well but I have a few questions. I'm not sure anything will change but I figure its at least worth a conversation.
I'm a bit confused by what the 'Create Data Stream' toggle does. I see that it corresponds to the ES api which leaves me similarly confused. I thought it might create a data stream but it doesn't seem to have done that. Or perhaps I did something wrong or I'm otherwise confused.
Is the callout about index.mode
being set really needed? I could see displaying it if the user attempted to set the value but most of the time we're probably telling people not to do something they have no intention of doing. IMO it would be better to display it only if someone was trying to set it.
I noticed that the index settings mode will show the index.mode
setting when an index template is edited but not on initial creation. Ideally the content would be the same.
My understanding of the docs is that if the data_stream object is included, this template can be used for creating data streams that match the index pattern of this index template.
That was a bit of a last-minute decision with the idea that we might update this depending on usage evaluations. cc: @bitzandeb
Do you mean that the editor doesn't have the index mode setting prepopulated with the selected index mode field? If so, this is a bit too complex, given that there are different formats of inputting the settings (i.e. "index.mode" or "index": {"mode"...}) and we would need to parse and modify any existing input that the user has added. For the sake of merging the changes on time, we decided to only display the warning callout as we don't know how these interactions are going to play out. |
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.
x-pack/test_serverless/api_integration/services/index_management/svl_templates.helpers.ts
changes LGTM
Starting backport for target branches: 8.x |
💚 Build Succeeded
Metrics [docs]Module Count
Public APIs missing comments
Async chunks
Page load bundle
History
cc @ElenaStoeva |
…ic#199521) Closes elastic#198620 ## Summary This PR adds a field for index mode setting in the Logistics step in Index Template form. https://github.com/user-attachments/assets/ee38bdec-66ff-468d-a55e-abf5354c3da2 **How to test:** 1. Go to Index Management -> Index Templates and start creating an index template 2. Verify that the index mode is only enabled if the data stream toggle is on. 3. Verify that typing the `logs-*-*` index pattern sets the index mode to "LogsDB": <img width="1401" alt="Screenshot 2024-11-13 at 13 00 10" src="https://github.com/user-attachments/assets/d1825d08-5039-4c43-80a8-653233e0b677"> 4. Go to the Settings step and verify that the index mode callout is displayed correctly. 5. Go to Review step and verify that Index mode is displayed correctly in both the summary and the preview request. 6. Save the template and verify that the template details tab correctly displays the index mode. <img width="1565" alt="Screenshot 2024-11-13 at 17 22 54" src="https://github.com/user-attachments/assets/2055501b-32c9-463c-b61d-541b9687b459"> <img width="1565" alt="Screenshot 2024-11-13 at 17 22 31" src="https://github.com/user-attachments/assets/21c9cf9e-5858-4403-9106-57ed8ccf3639"> ### Checklist Delete any items that are not applicable to this PR. - [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] 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) (cherry picked from commit 16127fc)
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
…199521) (#200244) # Backport This will backport the following commits from `main` to `8.x`: - [[Index Management] Add index mode field in index template form (#199521)](#199521) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Elena Stoeva","email":"59341489+ElenaStoeva@users.noreply.github.com"},"sourceCommit":{"committedDate":"2024-11-14T18:58:42Z","message":"[Index Management] Add index mode field in index template form (#199521)\n\nCloses https://github.com/elastic/kibana/issues/198620\r\n\r\n## Summary\r\n\r\nThis PR adds a field for index mode setting in the Logistics step in\r\nIndex Template form.\r\n\r\n\r\n\r\nhttps://github.com/user-attachments/assets/ee38bdec-66ff-468d-a55e-abf5354c3da2\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. Verify that the index mode is only enabled if the data stream toggle\r\nis on.\r\n3. Verify that typing the `logs-*-*` index pattern sets the index mode\r\nto \"LogsDB\":\r\n\r\n<img width=\"1401\" alt=\"Screenshot 2024-11-13 at 13 00 10\"\r\nsrc=\"https://github.com/user-attachments/assets/d1825d08-5039-4c43-80a8-653233e0b677\">\r\n\r\n\r\n\r\n4. Go to the Settings step and verify that the index mode callout is\r\ndisplayed correctly.\r\n5. Go to Review step and verify that Index mode is displayed correctly\r\nin both the summary and the preview request.\r\n6. Save the template and verify that the template details tab correctly\r\ndisplays the index mode.\r\n\r\n<img width=\"1565\" alt=\"Screenshot 2024-11-13 at 17 22 54\"\r\nsrc=\"https://github.com/user-attachments/assets/2055501b-32c9-463c-b61d-541b9687b459\">\r\n\r\n<img width=\"1565\" alt=\"Screenshot 2024-11-13 at 17 22 31\"\r\nsrc=\"https://github.com/user-attachments/assets/21c9cf9e-5858-4403-9106-57ed8ccf3639\">\r\n\r\n\r\n\r\n\r\n\r\n### Checklist\r\n\r\nDelete any items that are not applicable to this PR.\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] 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)","sha":"16127fcc8faf128cfd9d2feffc6086eb6330c11f","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","v8.17.0"],"title":"[Index Management] Add index mode field in index template form","number":199521,"url":"https://github.com/elastic/kibana/pull/199521","mergeCommit":{"message":"[Index Management] Add index mode field in index template form (#199521)\n\nCloses https://github.com/elastic/kibana/issues/198620\r\n\r\n## Summary\r\n\r\nThis PR adds a field for index mode setting in the Logistics step in\r\nIndex Template form.\r\n\r\n\r\n\r\nhttps://github.com/user-attachments/assets/ee38bdec-66ff-468d-a55e-abf5354c3da2\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. Verify that the index mode is only enabled if the data stream toggle\r\nis on.\r\n3. Verify that typing the `logs-*-*` index pattern sets the index mode\r\nto \"LogsDB\":\r\n\r\n<img width=\"1401\" alt=\"Screenshot 2024-11-13 at 13 00 10\"\r\nsrc=\"https://github.com/user-attachments/assets/d1825d08-5039-4c43-80a8-653233e0b677\">\r\n\r\n\r\n\r\n4. Go to the Settings step and verify that the index mode callout is\r\ndisplayed correctly.\r\n5. Go to Review step and verify that Index mode is displayed correctly\r\nin both the summary and the preview request.\r\n6. Save the template and verify that the template details tab correctly\r\ndisplays the index mode.\r\n\r\n<img width=\"1565\" alt=\"Screenshot 2024-11-13 at 17 22 54\"\r\nsrc=\"https://github.com/user-attachments/assets/2055501b-32c9-463c-b61d-541b9687b459\">\r\n\r\n<img width=\"1565\" alt=\"Screenshot 2024-11-13 at 17 22 31\"\r\nsrc=\"https://github.com/user-attachments/assets/21c9cf9e-5858-4403-9106-57ed8ccf3639\">\r\n\r\n\r\n\r\n\r\n\r\n### Checklist\r\n\r\nDelete any items that are not applicable to this PR.\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] 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)","sha":"16127fcc8faf128cfd9d2feffc6086eb6330c11f"}},"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/199521","number":199521,"mergeCommit":{"message":"[Index Management] Add index mode field in index template form (#199521)\n\nCloses https://github.com/elastic/kibana/issues/198620\r\n\r\n## Summary\r\n\r\nThis PR adds a field for index mode setting in the Logistics step in\r\nIndex Template form.\r\n\r\n\r\n\r\nhttps://github.com/user-attachments/assets/ee38bdec-66ff-468d-a55e-abf5354c3da2\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. Verify that the index mode is only enabled if the data stream toggle\r\nis on.\r\n3. Verify that typing the `logs-*-*` index pattern sets the index mode\r\nto \"LogsDB\":\r\n\r\n<img width=\"1401\" alt=\"Screenshot 2024-11-13 at 13 00 10\"\r\nsrc=\"https://github.com/user-attachments/assets/d1825d08-5039-4c43-80a8-653233e0b677\">\r\n\r\n\r\n\r\n4. Go to the Settings step and verify that the index mode callout is\r\ndisplayed correctly.\r\n5. Go to Review step and verify that Index mode is displayed correctly\r\nin both the summary and the preview request.\r\n6. Save the template and verify that the template details tab correctly\r\ndisplays the index mode.\r\n\r\n<img width=\"1565\" alt=\"Screenshot 2024-11-13 at 17 22 54\"\r\nsrc=\"https://github.com/user-attachments/assets/2055501b-32c9-463c-b61d-541b9687b459\">\r\n\r\n<img width=\"1565\" alt=\"Screenshot 2024-11-13 at 17 22 31\"\r\nsrc=\"https://github.com/user-attachments/assets/21c9cf9e-5858-4403-9106-57ed8ccf3639\">\r\n\r\n\r\n\r\n\r\n\r\n### Checklist\r\n\r\nDelete any items that are not applicable to this PR.\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] 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)","sha":"16127fcc8faf128cfd9d2feffc6086eb6330c11f"}},{"branch":"8.x","label":"v8.17.0","branchLabelMappingKey":"^v8.17.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Elena Stoeva <59341489+ElenaStoeva@users.noreply.github.com>
Closes #198620
Summary
This PR adds a field for index mode setting in the Logistics step in Index Template form.
Screen.Recording.2024-11-13.at.13.32.52.mov
How to test:
logs-*-*
index pattern sets the index mode to "LogsDB":Checklist
Delete any items that are not applicable to this PR.