Use new hypervisor endpoint for UI occupancy.

* Split up calculation of occupancy and retrieving occupancy.
* Apply formatting after calculating.
* Use switch instead of nested ifs.

	modified:   resources/js/cf2/utils.js