-
Notifications
You must be signed in to change notification settings - Fork 91
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
Register action hook #64
Register action hook #64
Conversation
Signed-off-by: bowenlan-amzn <bowenlan23@gmail.com>
public/plugin.ts
Outdated
} | ||
|
||
public start(core: CoreStart): IndexManagementPluginStart { | ||
// https://www.digitalocean.com/community/tutorials/js-js-singletons | ||
Object.freeze(actionRepoSingleton); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does start happen after all other plugins have potentially "registered" their own actions?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Asking because I would like to see us freeze the repository after registrations have happened so it can't accidentally be modified. Or make it non accessible without calling registerAction
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Other plugins should register their own action in their setup
, so freeze in start
here which is after other plugins' setups finished.
Did experiment, I should freeze actionRepoSingleton.repository
, then registerAction after freeze will cause Uncaught error.
|
|
Integration test temporarily blocked, ongoing update for our backend github workflow. So running locally. One flaky failure. |
Can we fix the workflow for now in this PR? I think it was just a one line change we can do to get it passing by changing common utils ref from 1.0 to main |
eaad074
to
2f4f203
Compare
This reverts commit c1b76de.
* Revert "Register action hook (#64)" This reverts commit c1b76de. * Revert "Added PolicyDetails page (#62)" This reverts commit 0e173f4. * Revert "Adds VisualCreatePolicy page, missing backend routes/configs, updates… (#61)" This reverts commit 69d8fe1. * Revert "Added PolicySettings and DeleteModal components for PolicyDetails UI (#50)" This reverts commit b9645f1. * Revert "Adds create state container and removes unused props from modal and c… (#60)" This reverts commit ea320d4. * Revert "Adds modal for choosing between visual and json editor (#58)" This reverts commit 0f3e89c. * Revert "Adds create transition container (#59)" This reverts commit 72c200c. * Revert "Adds transition component (#57)" This reverts commit 131becf. * Revert "Adds create action container shown in flyout (#56)" This reverts commit 19883f7. * Revert "Adds ISM Templates UI component (#55)" This reverts commit a90e65f. * Revert "Adds State UI component (#54)" This reverts commit 96ff81c. * Revert "Adds timeout retry settings component used in action flyout (#52)" This reverts commit 6142d13. * Revert "Adds single state UI component (#53)" This reverts commit a25e3fe. * Revert "Adds individual ISM template UI component (#51)" This reverts commit c70a926. * Revert "Adds UI actions for all the supported ISM actions (#49)" This reverts commit 0d6b814. * Revert "Adds draggable transitions and transition content (#48)" This reverts commit dfca9f4. * Revert "Adds error notification UI container and updates snapshots (#47)" This reverts commit 4b6724b. * Revert "Adds policy info section for new UI (#45)" This reverts commit 72e4639. * Revert "Adds new UI for Channel Notification (#44)" This reverts commit 39df0ae. * Revert "Adds notification service to make backend call for getting list of channels for Index Management (#46)" This reverts commit c6fc887. * Revert "Adds draggable action component (#43)" This reverts commit 4c25961. * Revert "Adds legacy notification UI input (#42)" This reverts commit ff15676. * Revert "Adds a small Badge component (#39)" This reverts commit bb691d2. * Revert "Adds reusable flyout footer (#41)" This reverts commit c9fefc9. * Revert "Adds custom label to use with EuiForm component (#40)" This reverts commit 6299cd0.
Signed-off-by: bowenlan-amzn bowenlan23@gmail.com
Description
Expose a
registerAction
hook for other plugins to add more Action into ISM UX dynamically.Having a singleton
actionRepoSingleton
initialized during plugin setup, which will be used for providing UIAction in several places acrossCreateState
,CreateAction
,State
Issues Resolved
[List any issues this PR will resolve]
Check List
--signoff
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.