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

Service support for admin actions #415

Open
amcclain opened this issue Oct 15, 2024 · 0 comments
Open

Service support for admin actions #415

amcclain opened this issue Oct 15, 2024 · 0 comments
Assignees

Comments

@amcclain
Copy link
Member

amcclain commented Oct 15, 2024

Goal is to build a better version of clearCaches, where a HoistService can spec out a set of actions it wishes to expose via the Hoist Admin Console "Services" tab.

Each "action" could map onto a method on the server. Actions could be given an admin-friendly displayName, which I envision Hoist React rendering as the text on a button. Any HOIST_ADMIN could call any defined action via the Services tab, without app devs needing to write a dedicated controller.

Actions could also be spec'd as primaryOnly, meaning they would only be enabled on the primary instance.

Could also consider supporting:

  • description - explanation / hint as to what it does, if name not enough
  • intent - or potentially some flag like isDisruptive (???) - mainly I want a way to signal that some service actions are "fine to do anytime - don't hesitate to press this green button to request a refresh" vs. "this will drop the core business data cache and all users will start seeing failed refreshes or exceptions until state can be rebuilt". Could be handled by description or name, just like the idea of green vs. red button TBH

Would want to decide / plan ahead as to support for accepting args. I am wary of growing the scope in that way - seems like a significant additional complexity - but understand that certain actions might need an arg to be useful - although some use cases could be handled by adding additional methods.

If successful, could replace ambiguous clearCaches entirely.

@amcclain amcclain self-assigned this Oct 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant