Skip to content

[Index details page] Implement "settings" tab#165456

Merged
yuliacech merged 11 commits intoelastic:mainfrom
yuliacech:im/details_page/settings_tab
Sep 6, 2023
Merged

[Index details page] Implement "settings" tab#165456
yuliacech merged 11 commits intoelastic:mainfrom
yuliacech:im/details_page/settings_tab

Conversation

@yuliacech
Copy link
Contributor

@yuliacech yuliacech commented Sep 1, 2023

Summary

Fixes #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

Screen.Recording.2023-09-01.at.18.36.47.mov

Loading error

Screenshot 2023-09-01 at 18 37 14

Read only mode

Screenshot 2023-09-01 at 18 31 27

Edit mode

Screenshot 2023-09-01 at 18 31 40

Loading indicator while updating the settings

Screen.Recording.2023-09-01.at.18.32.58.mov

No settings changed warning

Screen.Recording.2023-09-01.at.18.35.32.mov

Error updating the settings

Screenshot 2023-09-01 at 18 32 05

Checklist

@yuliacech yuliacech added Feature:Index Management Index and index templates UI Team:Kibana Management Dev Tools, Index Management, Upgrade Assistant, ILM, Ingest Node Pipelines, and more t// release_note:skip Skip the PR/issue when compiling release notes v8.11.0 labels Sep 1, 2023
@yuliacech yuliacech marked this pull request as ready for review September 1, 2023 16:44
@yuliacech yuliacech requested a review from a team as a code owner September 1, 2023 16:44
@elasticmachine
Copy link
Contributor

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

Copy link
Contributor

@alisonelizabeth alisonelizabeth left a comment

Choose a reason for hiding this comment

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

Great work @yuliacech! Tested locally and everything LGTM. I left a few comments in the code, if you don't mind taking a look before merging.

return find('indexDetailsSettingsEditor').prop('data-currentvalue');
},
updateCodeEditorContent: async (value: string) => {
find('indexDetailsSettingsEditor').getDOMNode().setAttribute('data-currentvalue', value);
Copy link
Contributor

Choose a reason for hiding this comment

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

Is it worth adding a comment here indicating this is needed for the mock?

{updateError && (
<>
<EuiSpacer size="m" />
<EuiCallOut title="Unable to save the settings" color="danger" iconType="error">
Copy link
Contributor

Choose a reason for hiding this comment

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

i18n here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good catch, thanks a lot!

Copy link
Contributor

Choose a reason for hiding this comment

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

Would these settings differ on serverless?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good question, let me check if there are an differences.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've got a doc with settings list that I'll use when updating the UI (still not sure what the best approach is) and I opened this issue to track the work.

@yuliacech
Copy link
Contributor Author

Thanks a lot for your review, @alisonelizabeth! I've asked the ES team about any differences in the index settings that can be updated on serverless. I'll merge this PR as soon as I've confirmed with them.

@kibana-ci
Copy link

💛 Build succeeded, but was flaky

Failed CI Steps

Test Failures

  • [job] [logs] Serverless Security Cypress Tests #2 / Manage lists from "Shared Exception Lists" page Create/Export/Delete List "before each" hook for "Export exception list" "before each" hook for "Export exception list"
  • [job] [logs] Serverless Security Investigations Cypress Tests #2 / Row renderers "before each" hook for "Row renderers should be enabled by default" "before each" hook for "Row renderers should be enabled by default"

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
indexManagement 499 501 +2

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 186 189 +3

Async chunks

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

id before after diff
indexManagement 533.8KB 539.1KB +5.3KB
Unknown metric groups

API count

id before after diff
indexManagement 191 194 +3

History

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

@yuliacech
Copy link
Contributor Author

Opened #165895 for work to follow up with index settings on serverless.

@yuliacech yuliacech merged commit d3031e7 into elastic:main Sep 6, 2023
@kibanamachine kibanamachine added the backport:skip This PR does not require backporting label Sep 6, 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>
@yuliacech yuliacech deleted the im/details_page/settings_tab branch February 15, 2024 12:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport:skip This PR 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 t// v8.11.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Index details page] Implement the "settings" tab

5 participants