bee-dashboard icon indicating copy to clipboard operation
bee-dashboard copied to clipboard

Refactor Desktop API functionality out of the component

Open AuHau opened this issue 3 years ago • 2 comments

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.

AuHau avatar Sep 11 '22 06:09 AuHau

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:

  1. From a dappnode perspective, we could integrate with the dappnode manager API for env setup / container restarts etc.
  2. 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.

mfw78 avatar Sep 14 '22 11:09 mfw78

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.

AuHau avatar Sep 14 '22 13:09 AuHau