yellow team mailing list archive
-
yellow team
-
Mailing list archive
-
Message #01138
[Merge] lp:~makyo/juju-gui/consistent-health-graph into lp:juju-gui
Matthew Scott has proposed merging lp:~makyo/juju-gui/consistent-health-graph into lp:juju-gui.
Requested reviews:
Juju GUI Hackers (juju-gui)
For more details, see:
https://code.launchpad.net/~makyo/juju-gui/consistent-health-graph/+merge/130005
Service health graphs consistently rendered
d3 was sorting by the largest value, now sorts in the proper order: error - pending - running
https://codereview.appspot.com/6718048/
--
https://code.launchpad.net/~makyo/juju-gui/consistent-health-graph/+merge/130005
Your team Juju GUI Hackers is requested to review the proposed merge of lp:~makyo/juju-gui/consistent-health-graph into lp:juju-gui.
=== modified file 'app/views/environment.js'
--- app/views/environment.js 2012-10-15 19:22:40 +0000
+++ app/views/environment.js 2012-10-16 23:03:21 +0000
@@ -775,7 +775,13 @@
});
var status_chart_layout = d3.layout.pie()
- .value(function(d) { return (d.value ? d.value : 1); });
+ .value(function(d) { return (d.value ? d.value : 1); })
+ .sort(function(a, b) {
+ // Ensure that the service health graphs will be renders in
+ // the correct order: error - pending - running.
+ var states = {error: 0, pending: 1, running: 2};
+ return states[a.name] - states[b.name];
+ });
// Append to status charts to non-subordinate services
var status_chart = node.append('g')
Follow ups