Update service unit aggregate function to use new service unit location

Bug #1212897 reported by Jeff Pihach
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
juju-gui
Triaged
Low
Unassigned

Bug Description

=== modified file 'app/models/models.js'
--- app/models/models.js 2013-08-14 20:30:56 +0000
+++ app/models/models.js 2013-08-16 00:48:00 +0000
@@ -394,12 +394,12 @@
      */
     update_service_unit_aggregates: function(service) {
       var aggregate = this.get_informative_states_for_service(service);
- var sum = Y.Array.reduce(
- Y.Object.values(aggregate), 0, function(a, b) {return a + b;});
+ var units = service.get('units');
+ var sum = units && units.size() || 0;

Simply making this change causes the Google Analytics test to fail because at this point the delta hasn't propagated through to the service so it's units are still 0.

a possible solution:

bcsaller: move the _gaq code into the handlers module and do it on a serviceunitslist after change

Gary Poster (gary)
Changed in juju-gui:
status: New → Triaged
importance: Undecided → Low
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.