Refactor the sandbox management panel
Note: this PR depends on !92 (merged)
-
with this refactoring, all sandbox actions are made from the same endpoint so i renamed it as WebappSandboxPanel. It is an endpoint that accept GET and POST methods
-
GET is rendered using TemplateView (nothing magic)
-
POST is has an ad-hoc implementation that handles sandbox actions (start, commit, rollback, retry, abort)
-
all POST actions are followed with an HTTP redirect (to make a GET) so that actions are not repeated if the user refresh his browser window
-
regarding the GUI I move all sandbox related content inside the 'ssh' pane tab so that it is clearly independent from the 'Docker' tab
-
it's integrated with the controller & aio
-
I changed the initial status of newly created webapps to IDLE because power users who upload their docker image do not need to start a sandbox
Update 01-Aug-2018
-
finished the version selection & validation (now we have the same behaviour as in the rails app : 'replace version' and 'new version' are clearly distinct, users cannot unknowingly overwrite an existing version)
-
reformatted the commit form
-
report all results in flash messages
-
in the webapp detail page, i changed "Commit a new version" into "Create a new version" (because 'commit' is just a single step in the creation of a new version, and it may even be done outside allgo if the users pushes a docker image)
-
ask for confirmation before rollback
-
fixed redirection bug with chromium
-
enforce user permissions (sandbox ops should only be allowed to the app owner obviously)
-
added an information box in the webapp_detail page when the sandbox is up
close #240 (closed)