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 details page] Re-implement context menu actions without redux #164546

Closed
yuliacech opened this issue Aug 23, 2023 · 3 comments
Closed

[Index details page] Re-implement context menu actions without redux #164546

yuliacech opened this issue Aug 23, 2023 · 3 comments
Assignees
Labels
enhancement New value added to drive a business result Feature:Index Management Index and index templates UI Team:Kibana Management Dev Tools, Index Management, Upgrade Assistant, ILM, Ingest Node Pipelines, and more

Comments

@yuliacech
Copy link
Contributor

yuliacech commented Aug 23, 2023

After #163955 is merged, the new details index page will have a button "manage index". When this button is clicked, a context menu with index actions is displayed. The actions need to be re-implemented without using redux. The options should work the same as they work currently in the index details flyout (including actions added by the extension service). The context menu should not display options that are not available on serverless (same as current implementation).

  • Close / open index
  • Force merge index
  • Refresh index
  • Clear index cache
  • Flush index
  • Delete index
  • Unfreeze index (only if frozen)
  • ILM extension actions: add lifecycle policy, remove lifecycle policy, retry lifecycle step

Screenshot

Screenshot 2023-08-23 at 12 00 24
@yuliacech yuliacech added enhancement New value added to drive a business result Feature:Index Management Index and index templates UI Team:Kibana Management Dev Tools, Index Management, Upgrade Assistant, ILM, Ingest Node Pipelines, and more labels Aug 23, 2023
@yuliacech yuliacech self-assigned this Aug 23, 2023
@elasticmachine
Copy link
Contributor

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

yuliacech added a commit that referenced this issue Aug 28, 2023
## Summary

Addresses #164546

Follow up to #163521 and
#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


https://github.com/elastic/kibana/assets/6585477/c39f1450-b495-4c50-b4ca-8989a2259ed5

Add/remove ILM policy actions with a confirmation modal



https://github.com/elastic/kibana/assets/6585477/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
@alisonelizabeth
Copy link
Contributor

@yuliacech can we close this one now?

@yuliacech
Copy link
Contributor Author

Yes 🎉
Completed via #164741

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New value added to drive a business result Feature:Index Management Index and index templates UI Team:Kibana Management Dev Tools, Index Management, Upgrade Assistant, ILM, Ingest Node Pipelines, and more
Projects
None yet
Development

No branches or pull requests

3 participants