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 "Stats" tab #165027

Merged

Conversation

alisonelizabeth
Copy link
Contributor

@alisonelizabeth alisonelizabeth commented Aug 28, 2023

This PR adds the "Stats" tab to the index details page. This tab will only be visible on stateful, as the index stats API is restricted on serverless.

Fixes #164576

Screenshots

// "Stats" tab will only display on stateful
Screenshot 2023-08-29 at 11 44 39 AM
Screenshot 2023-08-28 at 1 37 30 PM
Screenshot 2023-08-28 at 1 39 30 PM

// On serverless, "Stats" tab should not display
Screenshot 2023-08-28 at 1 30 41 PM

@alisonelizabeth alisonelizabeth 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 labels Aug 29, 2023
@alisonelizabeth alisonelizabeth marked this pull request as ready for review August 29, 2023 16:57
@alisonelizabeth alisonelizabeth requested review from a team as code owners August 29, 2023 16:57
@elasticmachine
Copy link
Contributor

Pinging @elastic/platform-deployment-management (Team:Deployment Management)

Copy link
Contributor

@jrodewig jrodewig left a comment

Choose a reason for hiding this comment

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

Docs link LGTM.


const statsTab = {
id: IndexDetailsSection.Stats,
name: <FormattedMessage id="xpack.idxMgmt.indexDetails.statsTitle" defaultMessage="Stats" />,
Copy link
Contributor

@gchaps gchaps Aug 29, 2023

Choose a reason for hiding this comment

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

Elsewhere we spell out statistics. For example, Field Statistics in Discover, and the Statistics tab in the Inspector. Should we spell it out for this tab as well?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That's a good point. I agree we should be consistent if "Statistics" is used elsewhere in Kibana.

This PR is part of a larger effort to make UX improvements to Index Management. I'm going to hold off on making this change here, as @yuliacech had planned to do an overall copy review with the docs team once the initial work is complete.

<EuiText color="subdued">
<FormattedMessage
id="xpack.idxMgmt.indexDetails.stats.errorDescription"
defaultMessage="There was an error loading stats for index {indexName}."
Copy link
Contributor

@gchaps gchaps Aug 29, 2023

Choose a reason for hiding this comment

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

How about "We encountered an error loading the stats for index {indexName}."

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed

Copy link
Contributor Author

Choose a reason for hiding this comment

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

cc @yuliacech this might also be applicable to the Mappings tab

Copy link
Contributor

@yuliacech yuliacech left a comment

Choose a reason for hiding this comment

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

Thanks a lot for implementing the stats tab, @alisonelizabeth! I tested locally and everything looks great 🎉
The only minor thing I noticed: the stats tab is disabled in the flyout for a closed index. The reason is that the stats request fails for a closed index. We could either disable the tab as well or display a more informative error message when we know that the request fails for this specific reason.

@alisonelizabeth
Copy link
Contributor Author

Thanks for the review @yuliacech! And great catch about the closed index behavior. I addressed that via bbdb196. I had to make some changes to how the data is fetched so that the API won't be called if the index is closed. I also decided to render a warning message, rather than just disabling the tab. Here's a screenshot (will need copy review at some point):

Screenshot 2023-08-30 at 9 37 35 AM

@kibana-ci
Copy link
Collaborator

💚 Build Succeeded

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
indexManagement 498 499 +1

Async chunks

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

id before after diff
indexManagement 529.7KB 533.8KB +4.1KB
lists 146.4KB 146.4KB +36.0B
total +4.1KB

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
core 381.1KB 381.1KB +36.0B

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

@yuliacech
Copy link
Contributor

The new warning for the closed index LGTM, thanks @alisonelizabeth!

@alisonelizabeth alisonelizabeth merged commit 81aceaa into elastic:main Aug 31, 2023
23 checks passed
@alisonelizabeth alisonelizabeth deleted the index_management/stats_tab branch August 31, 2023 12:23
@kibanamachine kibanamachine added v8.11.0 backport:skip This commit does not require backporting labels Aug 31, 2023
bryce-b pushed a commit to bryce-b/kibana that referenced this pull request Sep 19, 2023
Ikuni17 pushed a commit that referenced this pull request Sep 27, 2023
## 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:
- #163521
- #163955
- #164741
- #165027
- #165038
- #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="https://github.com/elastic/kibana/assets/6585477/e58b15e7-d10c-4473-873c-d0f128392404">


Mappings
<img width="1392" alt="Screenshot 2023-09-27 at 14 42 05"
src="https://github.com/elastic/kibana/assets/6585477/441157cb-5a26-47c3-8da0-b4df51ebec5d">


Settings 
<img width="1385" alt="Screenshot 2023-09-27 at 14 42 13"
src="https://github.com/elastic/kibana/assets/6585477/da66a2eb-1f21-44c1-9356-484c66caab88">


Statistics
<img width="1380" alt="Screenshot 2023-09-27 at 14 42 22"
src="https://github.com/elastic/kibana/assets/6585477/ec93d85c-e754-4c21-88ab-0124dc114fc9">


Error loading data
<img width="1333" alt="Screenshot 2023-09-26 at 19 05 37"
src="https://github.com/elastic/kibana/assets/6585477/fc1804b3-6aa0-4019-bae6-e7bb40113b28">
<img width="1327" alt="Screenshot 2023-09-26 at 19 06 07"
src="https://github.com/elastic/kibana/assets/6585477/ca711697-cc74-4ba8-b17c-ec9b01f3026e">
<img width="1329" alt="Screenshot 2023-09-26 at 19 06 28"
src="https://github.com/elastic/kibana/assets/6585477/0cb46b09-8542-452a-8845-40d060057e95">
<img width="1331" alt="Screenshot 2023-09-26 at 19 06 48"
src="https://github.com/elastic/kibana/assets/6585477/87de8d3d-b6e5-4e8f-b27c-18a1c6e950d8">


Error saving index settings
<img width="1332" alt="Screenshot 2023-09-26 at 19 07 31"
src="https://github.com/elastic/kibana/assets/6585477/e6e4b3d0-c237-4d0a-995a-4562bc78f88e">


### Serverless
Overview 
<img width="1336" alt="Screenshot 2023-09-26 at 19 51 47"
src="https://github.com/elastic/kibana/assets/6585477/6c76c23b-4be6-4ab3-ae1d-c7ae751e100d">


Mappings
<img width="1336" alt="Screenshot 2023-09-26 at 19 23 51"
src="https://github.com/elastic/kibana/assets/6585477/625fa703-506f-4389-9df0-86441a655074">


Settings
<img width="1332" alt="Screenshot 2023-09-26 at 19 24 02"
src="https://github.com/elastic/kibana/assets/6585477/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="https://github.com/elastic/kibana/assets/6585477/b90c706d-8b15-49e4-8f6a-cb66f3ed1822">

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:skip This commit does not require backporting 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 v8.11.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Index details page] Implement the "stats" tab
7 participants