project-rainstorm / rainstorm

The easiest way to own your cloud. Your data. Your cloud. Rainstorm.
Other
10 stars 5 forks source link

[API] services need 3 status: enabled, disabled, and uninstalled #50

Closed nullcount closed 4 years ago

nullcount commented 4 years ago

Currently, a service is enabled if it is running and disabled if it is not running. However, we need a third state for a service which was never enabled in the first place.

An enabled service is running now. A disabled service was once running. An uninstalled service has never been ran (or was uninstalled by the user).

We need this distinction so we know which services to show on the control panel and which services belong in the "store". Additionally, the API should accept a request to move a disabled service to uninstalled state. In case the user tries a service, doesn't like it and wants to "uninstall" it.

Perhaps this can be done by checking if the docker images for the service are present. When "uninstalling" maybe we can even delete those images from the system.

nullcount commented 4 years ago

Dropping this for the 2 state service