juju/juju-gui — pull request #215 by frankban (2014-04-01 13:17:44+00:00)
Title: Observe pending/in progress bundle deployments.

Start observing scheduled/started deployments
right after a successful login.
Also notify recently occurred errors.

This way the GUI is able to provide bundle
progress information to the user even if
the user refreshes after deploying a bundle,
or if the bundle deployment itself wasn't
started from the GUI (e.g. from quickstart).

Also did some clean up on the Deployer:Status
related code.

QA:
- juju-quickstart an environment:
`juju quickstart`;
- switch the GUI to this branch:
`juju set juju-gui juju-gui-source="https://github.com/frankban/juju-gui.git deployer-status-api"`;
- wait for the GUI to be ready
(`tailf ~/.juju/local/log/unit-juju-gui-0.log`) can help;
- deploy a bundle from quickstart:
`juju quickstart bundle:mediawiki/single`;
- when the GUI opens in the browser,
you should see a "bundle in progress" notification;
- now deploy a bundle from the GUI, e.g.: search for "rails"
and drag the "example-single" bundle;
- you should see a notification;
- refresh to check both pending and in progress bundle are notified;
- wait for the first bundle to be deployed;
- refresh and you should see an "in progress" notification for
the second one;
- destroy the mediawiki service, and wait for it to be gone;
- wait for the remaining deployment to be completed;
- deploy the failing bundle in http://dpaste.com/1767335/plain/:
`juju quickstart http://dpaste.com/1767335/plain/`;
- when the GUI opens, you should see an "invalid relation" error for
the last bundle;
- this error will be visible on each refresh for one hour,
and then it will go away: wait if you want, or just
trust me and destroy the environment.

Done, thank you!