## 🍒 Summary
This is a PR for #169728, it refactors the transforms to use an enrich
policy to inject fields from the SLO definition in the ingest pipeline
for both the SLI and summary indices. I also added the `event.ingested`
field to the SLI data to see how that would work with the summary
transform.
### 🐰 Prerequisites
https://github.com/elastic/elasticsearch/pull/101682Fixes#169956Fixes#166687Fixes#166955Fixes#169728
---------
Co-authored-by: Kevin Delemme <kevin.delemme@elastic.co>
## Summary
Fixes https://github.com/elastic/kibana/issues/170516
This PR updates how the ILM tab is rendered on the index details page to
make it look more fitting with other tabs.
### Screenshots
#### ILM is waiting for a step to complete
<img width="1448" alt="Screenshot 2023-11-14 at 15 06 10"
src="47642cd5-3a22-44ee-b49f-0a87713eba3b">
#### ILM has an error
<img width="1450" alt="Screenshot 2023-11-14 at 15 05 23"
src="78a7af30-5ba1-4a74-b5fe-c359341f20f4">
#### ILM has no errors and is not waiting for a step
<img width="1460" alt="Screenshot 2023-11-14 at 15 04 57"
src="43b215e0-d56f-4fb8-927f-35a7c2b1b313">
### How to test
I recommend using a chrome extension to mock the backend responses, for
example https://tweak-extension.com/docs/intro.
To mock the response of the index request, configure the extension to
mock the url `/internal/index_management/indices/` and let it return
various ilm configurations:
<details>
<summary>index with ILM that is waiting for a step to complete
</summary>
```json
{
"health": "green",
"status": "open",
"name": "test",
"uuid": "cJYz9o4jTjuAZaMNS3ERyQ",
"primary": "1",
"replica": "0",
"documents": 23654,
"documents_deleted": 0,
"size": "248b",
"primary_size": "248b",
"isFrozen": false,
"aliases": "none",
"hidden": false,
"isRollupIndex": false,
"ilm": {
"index": "test-000020",
"index_creation_date_millis": 1538475653281,
"time_since_index_creation": "4.12m",
"managed": true,
"policy": "my_lifecycle3",
"lifecycle_date_millis": 1538475653281,
"lifecycle_date": "2018-10-15T13:45:21.981Z",
"age": "4.12m",
"phase": "warm",
"phase_time_millis": 1538475653317,
"phase_time": "2018-10-15T13:45:22.577Z",
"action": "allocate",
"action_time_millis": 1538475653317,
"action_time": "2018-10-15T13:45:22.577Z",
"step": "check-allocation",
"step_time_millis": 1538475653317,
"step_time": "2018-10-15T13:45:22.577Z",
"step_info": {
"message": "Waiting for all shard copies to be active",
"shards_left_to_allocate": -1,
"all_shards_active": false,
"number_of_replicas": 2
},
"phase_execution": {
"policy": "my_lifecycle3",
"phase_definition": {
"min_age": "0ms",
"actions": {
"allocate": {
"number_of_replicas": 2,
"include": {
"box_type": "warm"
},
"exclude": {},
"require": {}
},
"forcemerge": {
"max_num_segments": 1
}
}
},
"version": 2,
"modified_date": "2018-10-15T13:20:02.489Z",
"modified_date_in_millis": 1539609602489
}
},
"isFollowerIndex": false
}
```
</details>
<details>
<summary>index with ILM that has an error</summary>
```json
{
"health": "green",
"status": "open",
"name": "test",
"uuid": "cJYz9o4jTjuAZaMNS3ERyQ",
"primary": "1",
"replica": "0",
"documents": 23654,
"documents_deleted": 0,
"size": "248b",
"primary_size": "248b",
"isFrozen": false,
"aliases": "none",
"hidden": false,
"isRollupIndex": false,
"ilm": {
"index": "test-000056",
"index_creation_date_millis": 1538475653281,
"time_since_index_creation": "50.1d",
"managed": true,
"policy": "my_lifecycle3",
"lifecycle_date_millis": 1538475653281,
"lifecycle_date": "2018-10-15T13:45:21.981Z",
"age": "50.1d",
"phase": "hot",
"phase_time_millis": 1538475653317,
"phase_time": "2018-10-15T13:45:22.577Z",
"action": "rollover",
"action_time_millis": 1538475653317,
"action_time": "2018-10-15T13:45:22.577Z",
"step": "ERROR",
"step_time_millis": 1538475653317,
"step_time": "2018-10-15T13:45:22.577Z",
"failed_step": "check-rollover-ready",
"is_auto_retryable_error": true,
"failed_step_retry_count": 1,
"step_info": {
"type": "cluster_block_exception",
"reason": "index [test-000057/H7lF9n36Rzqa-KfKcnGQMg] blocked by: [FORBIDDEN/5/index read-only (api)",
"index_uuid": "H7lF9n36Rzqa-KfKcnGQMg",
"index": "test-000057"
},
"phase_execution": {
"policy": "my_lifecycle3",
"phase_definition": {
"min_age": "0ms",
"actions": {
"rollover": {
"max_age": "30s"
}
}
},
"version": 3,
"modified_date": "2018-10-15T13:21:41.576Z",
"modified_date_in_millis": 1539609701576
}
},
"isFollowerIndex": false
}
```
</details>
### Checklist
- [ ] 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)
- [ ]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
- [ ] [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
- [ ] Any UI touched in this PR is usable by keyboard only (learn more
about [keyboard accessibility](https://webaim.org/techniques/keyboard/))
- [ ] 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))
- [ ] If a plugin configuration key changed, check if it needs to be
allowlisted in the cloud and added to the [docker
list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)
- [ ] 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))
- [ ] This was checked for [cross-browser
compatibility](https://www.elastic.co/support/matrix#matrix_browsers)
### Risk Matrix
Delete this section if it is not applicable to this PR.
Before closing this PR, invite QA, stakeholders, and other developers to
identify risks that should be tested prior to the change/feature
release.
When forming the risk matrix, consider some of the following examples
and how they may potentially impact the change:
| Risk | Probability | Severity | Mitigation/Notes |
|---------------------------|-------------|----------|-------------------------|
| Multiple Spaces—unexpected behavior in non-default Kibana Space.
| Low | High | Integration tests will verify that all features are still
supported in non-default Kibana Space and when user switches between
spaces. |
| Multiple nodes—Elasticsearch polling might have race conditions
when multiple Kibana nodes are polling for the same tasks. | High | Low
| Tasks are idempotent, so executing them multiple times will not result
in logical error, but will degrade performance. To test for this case we
add plenty of unit tests around this logic and document manual testing
procedure. |
| Code should gracefully handle cases when feature X or plugin Y are
disabled. | Medium | High | Unit tests will verify that any feature flag
or plugin combination still results in our service operational. |
| [See more potential risk
examples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx) |
### For maintainers
- [ ] This was checked for breaking API changes and was [labeled
appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
### Release Note
The ILM summary on the index page is now displayed in a separate tab.
---------
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
## Summary
This PR removes the [duplicated RedirectAppLinks
component](https://github.com/elastic/kibana/blob/v8.10.4/src/plugins/kibana_react/public/app_links/redirect_app_link.tsx)
which has been marked as deprecated since
74a00fad20.
All references to the previous import declaration from
`@kbn/kibana-react-plugin/public` have been replaced with
`@kbn/shared-ux-link-redirect-app`, this change ensures that the current
app behaviour is preserved, and changes to match the expectation of the
new component have been applied where necessary.
Changes relating to the new `RedirectAppLinks` component;
- The component does not accept a `className` anymore as it is not a
presentational component despite it being used as one previously,
there's change to make accommodation for how it had been used.
- The component introduces a`data-test-subj` attribute with the value
`kbnRedirectAppLink` on the dom node that wraps it's children.
### Checklist
<!--
Delete any items that are not applicable to this PR.
~- [ ] 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]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
- [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
<!--
~- [ ] Any UI touched in this PR is usable by keyboard only (learn more
about [keyboard
accessibility](https://webaim.org/techniques/keyboard/))~
~- [ ] 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))~
~- [ ] If a plugin configuration key changed, check if it needs to be
allowlisted in the cloud and added to the [docker
list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)~
~- [ ] 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))~
~- [ ] This was checked for [cross-browser
compatibility](https://www.elastic.co/support/matrix#matrix_browsers)~
### Risk Matrix
Delete this section if it is not applicable to this PR.
Before closing this PR, invite QA, stakeholders, and other developers to
identify risks that should be tested prior to the change/feature
release.
When forming the risk matrix, consider some of the following examples
and how they may potentially impact the change:
| Risk | Probability | Severity | Mitigation/Notes |
|---------------------------|-------------|----------|-------------------------|
| Multiple Spaces—unexpected behavior in non-default Kibana Space.
| Low | High | Integration tests will verify that all features are still
supported in non-default Kibana Space and when user switches between
spaces. |
| Multiple nodes—Elasticsearch polling might have race conditions
when multiple Kibana nodes are polling for the same tasks. | High | Low
| Tasks are idempotent, so executing them multiple times will not result
in logical error, but will degrade performance. To test for this case we
add plenty of unit tests around this logic and document manual testing
procedure. |
| Code should gracefully handle cases when feature X or plugin Y are
disabled. | Medium | High | Unit tests will verify that any feature flag
or plugin combination still results in our service operational. |
| [See more potential risk
examples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx) |
### For maintainers
- [ ] This was checked for breaking API changes and was [labeled
appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
-->
---------
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
## Summary
Fixes https://github.com/elastic/kibana/issues/168704
This PR adds a function to the extensions service that allows to render
custom content on overview tab of the index details page. When custom
content is set, it will be rendered instead of the code block describing
adding documents to the index. This PR also moves the ILM content from
the overview tab to a separate tab. We will work on the design of this
tab in a follow up PR.
### How to test
To test the custom content apply changes in this
[commit](16769d6c39).
### Screenshots
#### Custom content (example)
<img width="1357" alt="Screenshot 2023-11-01 at 19 03 32"
src="71372458-4cc2-413d-bf5f-bb29bff73095">
#### ILM tab
<img width="1129" alt="Screenshot 2023-11-01 at 18 54 07"
src="52c09a73-7d75-4f5f-8d52-b704cd9e6859">
### Checklist
- [ ] 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)
- [ ]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
- [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
- [ ] Any UI touched in this PR is usable by keyboard only (learn more
about [keyboard accessibility](https://webaim.org/techniques/keyboard/))
- [ ] 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))
- [ ] If a plugin configuration key changed, check if it needs to be
allowlisted in the cloud and added to the [docker
list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)
- [ ] 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))
- [ ] This was checked for [cross-browser
compatibility](https://www.elastic.co/support/matrix#matrix_browsers)
### Risk Matrix
Delete this section if it is not applicable to this PR.
Before closing this PR, invite QA, stakeholders, and other developers to
identify risks that should be tested prior to the change/feature
release.
When forming the risk matrix, consider some of the following examples
and how they may potentially impact the change:
| Risk | Probability | Severity | Mitigation/Notes |
|---------------------------|-------------|----------|-------------------------|
| Multiple Spaces—unexpected behavior in non-default Kibana Space.
| Low | High | Integration tests will verify that all features are still
supported in non-default Kibana Space and when user switches between
spaces. |
| Multiple nodes—Elasticsearch polling might have race conditions
when multiple Kibana nodes are polling for the same tasks. | High | Low
| Tasks are idempotent, so executing them multiple times will not result
in logical error, but will degrade performance. To test for this case we
add plenty of unit tests around this logic and document manual testing
procedure. |
| Code should gracefully handle cases when feature X or plugin Y are
disabled. | Medium | High | Unit tests will verify that any feature flag
or plugin combination still results in our service operational. |
| [See more potential risk
examples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx) |
### For maintainers
- [ ] This was checked for breaking API changes and was [labeled
appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
---------
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Alison Goryachev <alisonmllr20@gmail.com>
## Summary
This PR implements a new design for the Overview tab on the index
details page. There are 4 cards, but only 3 can be displayed at one
time: Storage, Status and Aliases/Data Stream (a backing index of the
data stream can't have any aliases). On Serverless, there is no Storage
and Status cards, so the whole section is either empty or 1 card is
displayed for Aliases or Data Stream.
### Screenshots
#### (Stateful) Index without aliases and data stream
<img width="1335" alt="Screenshot 2023-10-27 at 17 25 56"
src="38e4f96b-d612-42a7-9d2d-431d3ff4cd7b">
#### (Stateful) Index with aliases
<img width="1332" alt="Screenshot 2023-10-27 at 17 27 05"
src="4a3b03ec-8da8-47dd-b343-ba83ddfe5efd">
Aliases flyout
<img width="645" alt="Screenshot 2023-10-27 at 17 27 39"
src="4f4770dd-ce3e-4bf7-9e50-d2a58645ea0b">
#### (Stateful) Backing index of a data stream
<img width="1340" alt="Screenshot 2023-10-27 at 17 28 16"
src="434e3aec-06bb-479f-be2e-37d3d2b74951">
#### (Serverless) Index without cards
<img width="1264" alt="Screenshot 2023-10-09 at 16 16 04"
src="5b40f61e-0e14-47ee-9ac5-a91ffe14775b">
#### (Serverless) Index with aliases
<img width="1260" alt="Screenshot 2023-10-09 at 16 16 34"
src="193b6a6f-8caa-4e77-9ec8-31c133584e75">
#### (Serverless) Backing index of a data stream
<img width="1598" alt="Screenshot 2023-10-24 at 17 29 53"
src="602c09fb-1b85-4d12-88b2-bf9eb78639b4">
### Screen recordings
#### (Stateful) Index with aliases
c44dc6a7-dc2b-4297-88ae-1ecc22f828da
#### (Stateful) Backing index of a data stream
5206e427-b373-4ec8-a2ca-253b125afaee
### How to test
- Start either a stateful or serverless ES and Kibana: `yarn es
snapshot` and `yarn start` or `yarn es serverless --ssl` and `yarn
serverless-es --ssl`
- Use following commands in Dev Tools Console to create an index and add
some aliases
```
PUT /test_index
POST _aliases
{
"actions": [
{
"add": {
"index": "test_index",
"alias": "test_alias_1"
}
}
]
}
```
- Use following commdans in Dev Tools to create a data stream
```
PUT _index_template/test-index-template
{
"index_patterns": ["test-data-stream*"],
"data_stream": { },
"priority": 500
}
PUT _data_stream/test-data-stream
```
### 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)
- [ ]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
- [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
- [ ] Any UI touched in this PR is usable by keyboard only (learn more
about [keyboard accessibility](https://webaim.org/techniques/keyboard/))
- [ ] 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))
- [ ] If a plugin configuration key changed, check if it needs to be
allowlisted in the cloud and added to the [docker
list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)
- [ ] 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))
- [ ] This was checked for [cross-browser
compatibility](https://www.elastic.co/support/matrix#matrix_browsers)
---------
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Ignacio Rivas <rivasign@gmail.com>
## Summary
Fixes https://github.com/elastic/kibana/issues/22173
This PR adds a formatting to the index size column of the indices list.
The number formatting is done according to the default locale in the
browser. I decided against aligning the column right because this would
looked misaligned to other columns. And aligning all of the columns
right doesn't look good either (see screenshots).
### Screenshot
#### Formatted index size
<img width="438" alt="Screenshot 2023-10-27 at 13 32 42"
src="87ff1b31-36b0-4951-b6aa-3cdc0c9b545e">
<details>
#### Aligning the size column right (not implemented)
<img width="413" alt="Screenshot 2023-10-27 at 13 34 18"
src="df76a308-a927-45bd-8987-7da86a94c46f">
#### Aligning all columns right (not implemented)
<img width="1296" alt="Screenshot 2023-10-27 at 13 34 42"
src="2604ac48-015c-49eb-9e8c-003a5c989fb1">
</details>
### Checklist
- [ ] 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)
- [ ]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
- [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
- [ ] Any UI touched in this PR is usable by keyboard only (learn more
about [keyboard accessibility](https://webaim.org/techniques/keyboard/))
- [ ] 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))
- [ ] If a plugin configuration key changed, check if it needs to be
allowlisted in the cloud and added to the [docker
list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)
- [ ] 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))
- [ ] This was checked for [cross-browser
compatibility](https://www.elastic.co/support/matrix#matrix_browsers)
### Risk Matrix
Delete this section if it is not applicable to this PR.
Before closing this PR, invite QA, stakeholders, and other developers to
identify risks that should be tested prior to the change/feature
release.
When forming the risk matrix, consider some of the following examples
and how they may potentially impact the change:
| Risk | Probability | Severity | Mitigation/Notes |
|---------------------------|-------------|----------|-------------------------|
| Multiple Spaces—unexpected behavior in non-default Kibana Space.
| Low | High | Integration tests will verify that all features are still
supported in non-default Kibana Space and when user switches between
spaces. |
| Multiple nodes—Elasticsearch polling might have race conditions
when multiple Kibana nodes are polling for the same tasks. | High | Low
| Tasks are idempotent, so executing them multiple times will not result
in logical error, but will degrade performance. To test for this case we
add plenty of unit tests around this logic and document manual testing
procedure. |
| Code should gracefully handle cases when feature X or plugin Y are
disabled. | Medium | High | Unit tests will verify that any feature flag
or plugin combination still results in our service operational. |
| [See more potential risk
examples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx) |
### For maintainers
- [ ] This was checked for breaking API changes and was [labeled
appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
## Summary
Fixes https://github.com/elastic/kibana/issues/168699
This PR adds a new function to the extensions service in Index
Management to register additional tabs into the index details page. I
think we will be adding more content using this service and it might
change the interface of the service later on.
To add a new tab, add Index Management as a dependency to your plugin
and use the `addIndexDetailsTab` function in the extensions service. The
interface for the tab is as follows:
```ts
export interface IndexDetailsTab {
// a unique key to identify the tab
id: IndexDetailsTabIds;
// a text that is displayed on the tab label, usually a Formatted message component
name: ReactNode;
// a function that renders the content of the tab
renderTabContent: (indexName: string, index: Index) => ReactNode;
// a number to specify the order of the tabs
order: number;
}
```
### How to test
1. Add a test tab from the ILM plugin using this test commit
74a771db65
2. Start Kibana and ES with `yarn es snapshot` and `yarn start`
3. Navigate to Index Management and click on any index name
4. Verify that the tab is displayed correctly and the tab header is in
the correct order
###
Screenshot
<img width="1042" alt="Screenshot 2023-10-24 at 15 59 10"
src="7929f5db-8d2a-41d9-9e6d-4d1f74a93a35">
### Screen recording
6826f68c-c90d-47b1-ae3e-da6e6981d7ba
### Checklist
- [ ] 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)
- [ ]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
- [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
- [ ] Any UI touched in this PR is usable by keyboard only (learn more
about [keyboard accessibility](https://webaim.org/techniques/keyboard/))
- [ ] 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))
- [ ] If a plugin configuration key changed, check if it needs to be
allowlisted in the cloud and added to the [docker
list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)
- [ ] 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))
- [ ] This was checked for [cross-browser
compatibility](https://www.elastic.co/support/matrix#matrix_browsers)
### Risk Matrix
Delete this section if it is not applicable to this PR.
Before closing this PR, invite QA, stakeholders, and other developers to
identify risks that should be tested prior to the change/feature
release.
When forming the risk matrix, consider some of the following examples
and how they may potentially impact the change:
| Risk | Probability | Severity | Mitigation/Notes |
|---------------------------|-------------|----------|-------------------------|
| Multiple Spaces—unexpected behavior in non-default Kibana Space.
| Low | High | Integration tests will verify that all features are still
supported in non-default Kibana Space and when user switches between
spaces. |
| Multiple nodes—Elasticsearch polling might have race conditions
when multiple Kibana nodes are polling for the same tasks. | High | Low
| Tasks are idempotent, so executing them multiple times will not result
in logical error, but will degrade performance. To test for this case we
add plenty of unit tests around this logic and document manual testing
procedure. |
| Code should gracefully handle cases when feature X or plugin Y are
disabled. | Medium | High | Unit tests will verify that any feature flag
or plugin combination still results in our service operational. |
| [See more potential risk
examples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx) |
### For maintainers
- [ ] This was checked for breaking API changes and was [labeled
appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
Fixes https://github.com/elastic/kibana/issues/167654
## Summary
This PR removes the Storage size column in Data stream in serverless as
the data stream stats API on serverless doesn't currently return the
storage size.
### How to test:
Verify that the column is not displayed in serverless:
1. Start Es with `yarn es serverless` and Kibana with `yarn
serverless-{es/oblt/security}`
2. Go to Stack Management -> Index Management -> Data Streams
3. Switch on the "Include stats" toggle
4. Verify that the "Storage size" column is not shown in the table.
Verify that the column is displayed in stateful:
1. Start Es with `yarn es snapshot` and Kibana with `yarn start`
2. Go to Stack Management -> Index Management -> Data Streams
3. Switch on the "Include stats" toggle
4. Verify that the "Storage size" column is shown in the table.
<!---
### Checklist
Delete any items that are not applicable to this PR.
- [ ] 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)
- [ ]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
- [ ] [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
- [ ] Any UI touched in this PR is usable by keyboard only (learn more
about [keyboard accessibility](https://webaim.org/techniques/keyboard/))
- [ ] 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))
- [ ] If a plugin configuration key changed, check if it needs to be
allowlisted in the cloud and added to the [docker
list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)
- [ ] 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))
- [ ] This was checked for [cross-browser
compatibility](https://www.elastic.co/support/matrix#matrix_browsers)
### Risk Matrix
Delete this section if it is not applicable to this PR.
Before closing this PR, invite QA, stakeholders, and other developers to
identify risks that should be tested prior to the change/feature
release.
When forming the risk matrix, consider some of the following examples
and how they may potentially impact the change:
| Risk | Probability | Severity | Mitigation/Notes |
|---------------------------|-------------|----------|-------------------------|
| Multiple Spaces—unexpected behavior in non-default Kibana Space.
| Low | High | Integration tests will verify that all features are still
supported in non-default Kibana Space and when user switches between
spaces. |
| Multiple nodes—Elasticsearch polling might have race conditions
when multiple Kibana nodes are polling for the same tasks. | High | Low
| Tasks are idempotent, so executing them multiple times will not result
in logical error, but will degrade performance. To test for this case we
add plenty of unit tests around this logic and document manual testing
procedure. |
| Code should gracefully handle cases when feature X or plugin Y are
disabled. | Medium | High | Unit tests will verify that any feature flag
or plugin combination still results in our service operational. |
| [See more potential risk
examples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx) |
### For maintainers
- [ ] This was checked for breaking API changes and was [labeled
appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
-->
## Summary
Fixes https://github.com/elastic/kibana/issues/165905
This PR hides the columns "primaries" and "replicas" in the indices list
on Serverless. I decided to reuse the config value
`xpack.index_management.enableIndexStats` because these values fall
closely together with other hidden columns on Serverless like "health",
"storage size" etc. I also removed the width css for the index name
column in that case to fix the table view, otherwise the column would
stay always the 25% width of the table.
### Screeenshots
<img width="1130" alt="Screenshot 2023-10-18 at 16 00 19"
src="29a9eb83-ad46-48a4-8102-684570f51733">
### How to test
1. Start ES and Kibana in Serverless mode with `yarn es serverless
--ssl` and `yarn serverless-es --ssl`
2. Navigate to Index Management and toggle the switch to display hidden
indices because those have data stream names.
---------
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
## Summary
Fixes https://github.com/elastic/kibana/issues/165895
This PR limits which index settings are displayed on the index details
page, "Settings" tab in the edit mode. On serverless only a handful of
index settings will be editable by the user. The UI only prevents
displaying some index settings, but it's still possible for the user to
type in a setting that can't be edited. That is the case on dedicated as
well.
### How to test
1. Start Serverless ES and Kibana
2. Navigate to Index Management and create a test index
3. Click on the index name and on the details page click the tab
"Settings"
4. Toggle the "Edit mode" switch and verify that only editable settings
are displayed.
#### Screenshot
<img width="527" alt="Screenshot 2023-10-16 at 20 25 49"
src="e6678cca-3494-4c63-ae66-ace9c823d12d">
## Summary
This PR removes the feature flag and enables the new index details page
by default. The index details page was implemented in following PRs:
- https://github.com/elastic/kibana/pull/163521
- https://github.com/elastic/kibana/pull/163955
- https://github.com/elastic/kibana/pull/164741
- https://github.com/elastic/kibana/pull/165027
- https://github.com/elastic/kibana/pull/165038
- https://github.com/elastic/kibana/pull/165456
In this PR we completely remove now obsolete code for the old index
details flyout: react components and corresponding redux code. All
related tests are updated and cleaned up. The config value for Index
Management plugin `xpack.index_management.dev.enableIndexDetailsPage` is
deprecated as unused and can be removed in v9.0.
### How to test
1. Start ES and Kibana with `yarn es snapshot` and `yarn start`
3. Navigate to Index Management and create an index
4. Click the index name in the table and check the tabs of the details
page
### Screenshots
#### Stateful
Overview
<img width="1387" alt="Screenshot 2023-09-27 at 14 41 57"
src="e58b15e7-d10c-4473-873c-d0f128392404">
Mappings
<img width="1392" alt="Screenshot 2023-09-27 at 14 42 05"
src="441157cb-5a26-47c3-8da0-b4df51ebec5d">
Settings
<img width="1385" alt="Screenshot 2023-09-27 at 14 42 13"
src="da66a2eb-1f21-44c1-9356-484c66caab88">
Statistics
<img width="1380" alt="Screenshot 2023-09-27 at 14 42 22"
src="ec93d85c-e754-4c21-88ab-0124dc114fc9">
Error loading data
<img width="1333" alt="Screenshot 2023-09-26 at 19 05 37"
src="fc1804b3-6aa0-4019-bae6-e7bb40113b28">
<img width="1327" alt="Screenshot 2023-09-26 at 19 06 07"
src="ca711697-cc74-4ba8-b17c-ec9b01f3026e">
<img width="1329" alt="Screenshot 2023-09-26 at 19 06 28"
src="0cb46b09-8542-452a-8845-40d060057e95">
<img width="1331" alt="Screenshot 2023-09-26 at 19 06 48"
src="87de8d3d-b6e5-4e8f-b27c-18a1c6e950d8">
Error saving index settings
<img width="1332" alt="Screenshot 2023-09-26 at 19 07 31"
src="e6e4b3d0-c237-4d0a-995a-4562bc78f88e">
### Serverless
Overview
<img width="1336" alt="Screenshot 2023-09-26 at 19 51 47"
src="6c76c23b-4be6-4ab3-ae1d-c7ae751e100d">
Mappings
<img width="1336" alt="Screenshot 2023-09-26 at 19 23 51"
src="625fa703-506f-4389-9df0-86441a655074">
Settings
<img width="1332" alt="Screenshot 2023-09-26 at 19 24 02"
src="c496ab09-f2db-4c1b-9fb6-1e9b64b1c142">
# Release note
Index details can now be viewed on a new index details page in Index
Management.
<img width="1387" alt="Screenshot 2023-09-27 at 14 41 57"
src="b90c706d-8b15-49e4-8f6a-cb66f3ed1822">
---------
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
## Summary
Fixes https://github.com/elastic/kibana/issues/166100
This PR adds a workaround fix for the new index details page when
opening for index names with special characters, for example
`test_index%`. Because of how encoding/decoding works, we can't use the
index name as a part of the url like `/indices/${indexName}` (see for
more details). Instead we have to pass the index name in a query
parameter like `/indices/index_details?indexName=${indexName}. The
downside of this workaround is that the url semantics doesn't reflect
that the index name is mandatory for the page to work. Once
https://github.com/elastic/kibana/issues/132600 is resolved, we should
revert this workaround and use the index name as a url segment again.
Note for reviewers: The jest tests for this fix are part of
https://github.com/elastic/kibana/pull/165705
### How to test
1. Add `xpack.index_management.dev.enableIndexDetailsPage: true` to the
file `config/kibana.dev.yml` to enable the new index details page
2. Navigate to Index Management and use the "create index" button
3. Type a name with special characters, for example `test%`
4. Click the new index name in the list and check that the details page
and all tabs work
5. Also reload the page completely and check that the page still loads
correctly
---------
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Alison Goryachev <alisonmllr20@gmail.com>
## Summary
Fixes https://github.com/elastic/kibana/issues/166103
This PR implements the logic to render summaries added via the extension
service on the new index details page. Currently, only the ILM plugin
registers a summary for an index. The extension service will probably be
refactored when working on
https://github.com/elastic/kibana/issues/165107.
I needed to convert the component `IndexLifecycleSummary` from the class
component to the function component. Otherwise there were errors while
rendering the page and I was not able to check for `null` to not render
an empty card.
### Screenshots
#### When no ILM info or ILM plugin is disabled (no changes to the
Overview tab)
<img width="1029" alt="Screenshot 2023-09-19 at 18 51 14"
src="1f619580-415a-4704-befc-a75a3a37efe6">
#### When there is ILM policy
<img width="1027" alt="Screenshot 2023-09-19 at 18 51 32"
src="05105dbf-e6ca-4a1d-ae53-bd42ec030974">
## Summary
Fixes https://github.com/elastic/kibana/issues/165844
Partially addresses https://github.com/elastic/kibana/issues/122577
This PR fixes the inconsistency with breadcrumbs in Index Management.
Previously, the breadcrumbs were updated only when an index template or
a component template was being created/edited. This PR adds breadcrumbs
for each of 4 main tabs: indices, data streams, index templates,
component templates. It also adds breadcrumbs for the new index details
page.
**Note for reviewers:** Tabs "Documents" and "Pipelines" on the new
index details page will not be implemented for now, so there are no
breadcrumbs for them.
**Note for copy review**: This PR can be reviewed only in terms on
breadcrumbs in Index Management. The copy review for the new index
details page can be done in this
[PR](https://github.com/elastic/kibana/pull/165705).
### Screenshots
#### Indices list
Breadcrumbs "Indices"
<img width="1318" alt="Screenshot 2023-09-07 at 17 22 56"
src="1a670df6-b0b2-4272-b7ec-e50719884ad8">
#### Index details - overview tab
Breadcrumbs "Indices" (link) => "Index details" -> "Overview"
<img width="1130" alt="Screenshot 2023-09-08 at 17 20 45"
src="87b75a2c-d3e2-454d-8ad5-979feb3dc8a5">
#### Index details - mappings tab
Breadcrumbs "Indices"(link) -> "Index details" -> "Mappings"
<img width="1319" alt="Screenshot 2023-09-07 at 17 23 53"
src="d42baf78-9133-4c87-bdbd-1aedad119e62">
#### Index details - settings tab
Breadcrumbs "Indices"(link) -> "Index details" -> "Settings"
<img width="1305" alt="Screenshot 2023-09-07 at 17 24 00"
src="bf94497c-4ca3-413c-be57-37499c0839ba">
#### Index details - stats tab
Breadcrumbs "Indices"(link) -> "Index details" -> "Stats"
<img width="1300" alt="Screenshot 2023-09-07 at 17 24 12"
src="c1798ac2-7169-4bfe-8732-ed3f8e6d812e">
#### Data streams
Breadcrumbs "Data streams"
<img width="1319" alt="Screenshot 2023-09-07 at 17 23 03"
src="f4d0230e-994f-4537-a43d-065d364ffc7c">
#### Index templates
Breadcrumbs "Templates"
<img width="1319" alt="Screenshot 2023-09-07 at 17 23 10"
src="610c609c-1213-4388-9c73-68711c2c4bb6">
#### Component templates
Breadcrumbs "Component templates"
<img width="1303" alt="Screenshot 2023-09-07 at 17 23 28"
src="4f90eadb-a409-4e53-84f0-92b5f40b7639">
### 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
---------
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
## Summary
Fixes https://github.com/elastic/kibana/issues/164573
This PR implements the Settings tab on the new index details page. The
tab load the settings from the API and displays them in a code block.
When "edit mode" is enabled, a subset of settings that can be changed
are displayed in a code editor. When the "save" button is clicked, only
updated settings are sent to the API. I also added a button to reset the
changes in the code editor.
### How to test
1. Add `xpack.index_management.dev.enableIndexDetailsPage: true` to the
file `./config/kibana.dev.yml`
2. Start ES and Kibana `yarn es snapshot` and `yarn start`
3. Add at least one sample data set
4. Navigate to index management and click any index name in the indices
list
5. Click the "Settings" tab
6. Enable "edit mode"
7. Try saving the updated settings
8. Try saving without changing any settings (for example by deleting a
line from the editor, no settings are actually changed, but the editor
content is changed which enables the "save" button)
9. Try saving an incorrect setting value, for example `index.priority:
test`.
### Screenshots
#### Loading indicator
4743e470-0f4f-48e7-a8ef-37a562431e1e
#### Loading error
<img width="1629" alt="Screenshot 2023-09-01 at 18 37 14"
src="56e787d1-877d-479f-8d8a-83cd9433b66d">
#### Read only mode
<img width="1629" alt="Screenshot 2023-09-01 at 18 31 27"
src="0a9095c0-5e2a-4422-a058-46dcdfc4ee7a">
#### Edit mode
<img width="1635" alt="Screenshot 2023-09-01 at 18 31 40"
src="2502e65b-c05b-4774-9a50-000a789b20be">
#### Loading indicator while updating the settings
1aa976e8-24ed-4a7a-bfad-93daf25627f1
#### No settings changed warning
f9731e58-8c42-4395-9f99-34fdb5f4fff4
#### Error updating the settings
<img width="1632" alt="Screenshot 2023-09-01 at 18 32 05"
src="66970c61-d4ca-412c-a677-d16692043484">
### 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
## Summary
Addresses https://github.com/elastic/kibana/issues/164572
This PR implements the mappings displayed in the Mappings tab of the
index details page. The mappings are loaded from the existing route
`api/index_management/mapping/:indexName`. There is a loading indicator
and an error prompt for the API request. There is a link to the mappings
docs on the right side of the tab. We need to add an Ent Search specific
docs link to the right side of the tab which will be addressed as a
separate PR ([issue](https://github.com/elastic/kibana/issues/165107)).
Also any potential performance issues with displaying the mappings
object in the code block will be addressed in a separate PR
([issue](https://github.com/elastic/kibana/issues/165112)).
### Screenshots
#### Small mappings object
<img width="1590" alt="Screenshot 2023-08-29 at 15 54 33"
src="1b2b950c-446c-4534-8606-94df548ef2ab">
#### Large mappings object
<img width="1576" alt="Screenshot 2023-08-29 at 15 54 20"
src="35933fec-eb8d-439c-9cec-e03a3b7dd938">
#### Loading
<img width="1336" alt="Screenshot 2023-08-29 at 17 07 17"
src="4e723b72-2437-45c3-8e0e-54028bd3944b">
#### Error loading mappings
<img width="1337" alt="Screenshot 2023-08-29 at 17 07 44"
src="2f611081-f11f-41b1-b66e-3086927b1bf0">
### Checklist
- [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
---------
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
## Summary
Addresses https://github.com/elastic/kibana/issues/164546
Follow up to https://github.com/elastic/kibana/pull/163521 and
https://github.com/elastic/kibana/pull/163955
This PR re-implements index actions in the context menu on the index
details page. The actions are implemented without redux which is used in
the old index details flyout (to be removed when this work is complete)
and in the indices list. The PR introduces a declaration file to list
all props of the component `IndexActionsContextMenu` written in JS.
There is also a new component `ManageIndexButton` that implements index
actions specifically to be executed on the new index details page. In
the future most of the code in the component `ManageIndexButton` can be
re-used when more refactorings will be made (switching to TS and not
using redux in the indices list).
All index actions are async and I added a loading indicator to the
context menu button to indicate that requests are in flight updating the
index.
### Screen recordings
c39f1450-b495-4c50-b4ca-8989a2259ed5
Add/remove ILM policy actions with a confirmation modal
964931c9-b926-4ed4-aa5c-218f52881131
### How to test
1. Add `xpack.index_management.dev.enableIndexDetailsPage: true` to your
`/config/kibana.dev.yml` file
7. Start ES and Kibana with `yarn es snapshot` and `yarn start`
8. Add several indices to test with the command `PUT /test_index` in Dev
Tools Console
9. Navigate to Index Management and click the name of any index
10. Check index actions:
- [x] Close index
- [x] Open index
- [x] Force merge index
- [x] Refresh index
- [x] Clear index cache
- [x] Flush index
- [ ] Unfreeze index (not sure how to add a frozen index)
- [x] Delete index
- [x] ILM: add lifecycle policy
- [x] ILM: remove lifecycle policy
- [x] ILM: retry lifecycle policy (add any built-in policy and wait a
couple of minutes until the rollover fails)
### Checklist
- [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