Skip to content
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

Merged
merged 19 commits into from
Oct 31, 2024

Conversation

ElenaStoeva
Copy link
Contributor

@ElenaStoeva ElenaStoeva commented Oct 25, 2024

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).

Screenshot 2024-10-28 at 14 39 18 Screenshot 2024-10-28 at 19 05 29 Screenshot 2024-10-28 at 14 41 01 Screenshot 2024-10-28 at 14 41 09

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
    }
  }
}
  1. Go to last step (review) and verify that the index mode is correctly displayed in Summary. Save the template.
  2. In the template flyout, verify that the index mode displays the correct label.
  3. Go to Console and create a data stream that mathes the index pattern of the created index template: PUT _data_stream/test-tsds
  4. Go to Index Management -> Data streams
  5. In the data streams table, verify that the index mode column is correct for the new data stream.
  6. Open the new data stream and verify that the details flyout displays the correct index mode.

Checklist

@ElenaStoeva ElenaStoeva added Feature:Index Management Index and index templates UI Team:Kibana Management Dev Tools, Index Management, Upgrade Assistant, ILM, Ingest Node Pipelines, and more release_note:skip Skip the PR/issue when compiling release notes backport:prev-minor Backport to (8.x) the previous minor version (i.e. one version back from main) labels Oct 25, 2024
@ElenaStoeva ElenaStoeva self-assigned this Oct 25, 2024
@bitzandeb
Copy link

Hey @ElenaStoeva - could we update the value formatting in the UI so they are like this?

  • Time series
  • LogsDB
  • Standard

Thank you!

Copy link
Contributor

@florent-leborgne florent-leborgne left a 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

@ElenaStoeva ElenaStoeva marked this pull request as ready for review October 28, 2024 19:08
@ElenaStoeva ElenaStoeva requested a review from a team as a code owner October 28, 2024 19:08
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-management (Team:Kibana Management)

@kibanamachine
Copy link
Contributor

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.

see run history


export interface IndexModule {
Copy link
Contributor Author

@ElenaStoeva ElenaStoeva Oct 29, 2024

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>({
Copy link
Contributor Author

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.

@@ -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
Copy link
Contributor

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

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added with 2590ba4.

Copy link
Contributor

@mattkime mattkime left a 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.

@ElenaStoeva ElenaStoeva requested a review from a team as a code owner October 30, 2024 11:44
@botelastic botelastic bot added ci:project-deploy-observability Create an Observability project Team:obs-ux-management Observability Management User Experience Team labels Oct 30, 2024
@elasticmachine
Copy link
Contributor

Pinging @elastic/obs-ux-management-team (Team:obs-ux-management)

Copy link
Contributor

🤖 GitHub comments

Expand to view the GitHub comments

Just comment with:

  • /oblt-deploy : Deploy a Kibana instance using the Observability test environments.
  • run docs-build : Re-trigger the docs validation. (use unformatted text in the comment!)

@ElenaStoeva ElenaStoeva requested a review from mattkime October 30, 2024 12:02
@ElenaStoeva
Copy link
Contributor Author

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.

@elasticmachine
Copy link
Contributor

elasticmachine commented Oct 30, 2024

💚 Build Succeeded

  • Buildkite Build
  • Commit: ab31a8f
  • Kibana Serverless Image: docker.elastic.co/kibana-ci/kibana-serverless:pr-197874-ab31a8f91f55

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
indexManagement 694 695 +1

Public APIs missing comments

Total count of every public API that lacks a comment. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats comments for more detailed information.

id before after diff
indexManagement 245 236 -9

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
indexManagement 688.3KB 690.0KB +1.7KB
synthetics 1.1MB 1.1MB +21.0B
total +1.7KB
Unknown metric groups

API count

id before after diff
indexManagement 250 241 -9

History

cc @ElenaStoeva

Copy link
Contributor

@mattkime mattkime left a 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!

@ElenaStoeva ElenaStoeva merged commit 40ddfbc into elastic:main Oct 31, 2024
28 checks passed
@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.x

https://github.com/elastic/kibana/actions/runs/11609320372

kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Oct 31, 2024
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)
@kibanamachine
Copy link
Contributor

💚 All backports created successfully

Status Branch Result
8.x

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

kibanamachine added a commit that referenced this pull request Oct 31, 2024
# 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]>
ElenaStoeva added a commit that referenced this pull request Dec 11, 2024
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.
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Dec 11, 2024
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)
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Dec 11, 2024
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)
kibanamachine added a commit that referenced this pull request Dec 11, 2024
…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]>
kibanamachine added a commit that referenced this pull request Dec 11, 2024
…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]>
CAWilson94 pushed a commit to CAWilson94/kibana that referenced this pull request Dec 12, 2024
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:prev-minor Backport to (8.x) the previous minor version (i.e. one version back from main) ci:project-deploy-observability Create an Observability project Feature:Index Management Index and index templates UI release_note:skip Skip the PR/issue when compiling release notes Team:Kibana Management Dev Tools, Index Management, Upgrade Assistant, ILM, Ingest Node Pipelines, and more Team:obs-ux-management Observability Management User Experience Team v8.17.0 v9.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Index Management] Support for index mode
8 participants