InseeFrLab / onyxia

🔬 Data science environment for k8s
https://onyxia.sh
MIT License
458 stars 80 forks source link

Add pause and resume buttons #793

Closed olevitt closed 4 months ago

olevitt commented 5 months ago

https://github.com/InseeFrLab/onyxia-api/pull/413 will introduce 2 new endpoints to the API : my-lab/app/pause & my-lab/app/resume that let the user pause and resume any pausable service.
This PR will also introduce 2 new booleans pausable and paused that indicates whether a service is pausable (meaning it's possible to call the previous endpoints to pause / resume it) and it's current state : paused or not.
UI should implement a "play" button in service card to resume a paused service and a pause button to pause. Those buttons should only be visible if the service is pausable.
See https://datalab.sspcloud.fr/api/swagger-ui/index.html#/ for a working swagger and https://github.com/InseeFrLab/helm-charts-dev/tree/main/charts/vscode-python for a pausable package (This commit makes it pausable)