Refactor Desktop API functionality out of the component
I would suggest a refactor which goal would be to enable using Desktop-like functionality in Dashboard instance. There would be something like BeeManager interface that would be passed via props into the Dashboard component that we use. This BeeManager would be tasked to perform all the Desktop API's functionality. In Desktop it would be implemented that it would call its APIs, but in Dashboard it could be implemented in a way that Modal window with instruction on what to do (eq. restart your node, set these values into your config) would be shown instead.
This seems quite reasonable, and I'll take note of the 'desktop' label again this time :wink:
I'd say that this refactor would be handy for future proofing, such that:
- From a dappnode perspective, we could integrate with the dappnode manager API for
envsetup / container restarts etc. - There may be other integrations that would like to apply Desktop API functionality.
Though this would streamline things for users across different domains, from a developer's perspective, I think that the BeeManager should be optional, or at least allow basic props to be overwritten for test environments / mock environments / static environments etc.
Thanks for the input!
Though this would streamline things for users across different domains, from a developer's perspective, I think that the BeeManager should be optional, or at least allow basic props to be overwritten for test environments / mock environments / static environments etc.
Yes, agree. Basically, if BeeManager would not be supplied then the Dashboard would operate in the same mode as it does now (eq. not in Desktop mode), hence hiding all the advanced functionality.