Update the machine tokens instead of rerending the entire machine view.
Inverted the machine add method to allow us to use the YUI event system as intended
Merge pull request #285 from hatched/machine-view-render-changes

Original PR: https://github.com/juju/juju-gui/pull/280

Machine tokens should be updated instead of re-rendering the entire machine view on every machine model change.
Apply final machine view rendering fixes from bad rebase.
Show add relation menu even if we're on the il flag.
Merge pull request #287 from huwshimi/fix-build-relation-popup

The build relation menu is still required when we're using the il flag, but we don't want to shrink or expand the inspector.

QA:
Deploy mysql and wordpress.
Click on the canvas so that the Build Relation menu disappears.
Now click on a service and the menu should appear again.
Click on the Build Relation menu and you should be able to create a relation between the two services.
Merge pull request #286 from huwshimi/fix-rebase

This is the final set of changes meant to be in the machine view rendering branch that got lost in a bad rebase.

This branch adds missing code comments and also sets the header labels through the widget setLabel rather than poking at the DOM. This required refactoring how we set up the headers so we can access them directly.

QA:
Add or remove some machines and the machine count in the header should update correctly.
Selecting a machine should set the container count correctly in the container header.
Added changes to deployer bar

- Track when new things are done
- Track the number of changes
Disable deployer bar tests for now
Merge pull request #288 from mitechie/qa-deployer-bar

- Track when new things are done
- Track the number of changes
Add drop states to the machine view headers.
Machine and Container tokens can now be marked as uncommitted.
Global units model list.
Merge pull request #290 from huwshimi/machine-view-uncommitted-state

This branch adds the ability to mark and unmark machine and container tokens as uncommitted.

I did a bit of style refactoring to remove the duplication between the two tokens.

This is not currently hooked up to anything, but is there for when we introduce the uncommitted state of these tokens.
Merge pull request #291 from huwshimi/header-drop-states

Adding in the drop states in the machine view headers. These states are not currently hooked up to anything, but are ready for when drag and drop is implemented.
Merge pull request #282 from frankban/unit-list

The db.units lazy model list includes all known units.
Also implement helper methods to add/remove units, and filter them by machine/container.

I was not able to properly live test this, but I am still proposing the code in order to unblock other branches.
For this reason please be very meticulous when QAing the branch: all the units-related GUI parts (showing units in the inspector, adding/removing them) should be tested for regressions, in both sandbox and real environments.

This does not include changes in the machine panel (wire service unit tokens etc.): the diff is already too long (my apologies). I changed my card description and created another one in "Ready to code" to reflect this.
Tests.
Update css/html for service units.
Wire in service unit display.