aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStas Vilchik <vilchiks@gmail.com>2015-02-26 10:32:57 +0100
committerStas Vilchik <vilchiks@gmail.com>2015-02-26 12:28:08 +0100
commitdb689b5569356ee116f8b7de1f5cac83b47df25b (patch)
tree3a94747cbfe5e77d8cada82ee4aacf3d1efcd37c
parentbf13a2c530528cd6d1b899ecbe1cff52a6bdcada (diff)
downloadsonarqube-db689b5569356ee116f8b7de1f5cac83b47df25b.tar.gz
sonarqube-db689b5569356ee116f8b7de1f5cac83b47df25b.zip
sort extra measures categories by name
-rw-r--r--server/sonar-web/src/main/js/source-viewer/measures-overlay.js16
1 files changed, 10 insertions, 6 deletions
diff --git a/server/sonar-web/src/main/js/source-viewer/measures-overlay.js b/server/sonar-web/src/main/js/source-viewer/measures-overlay.js
index 77abd254563..5887c20af28 100644
--- a/server/sonar-web/src/main/js/source-viewer/measures-overlay.js
+++ b/server/sonar-web/src/main/js/source-viewer/measures-overlay.js
@@ -94,12 +94,15 @@ define([
metrics = _.filter(metrics, function (metric) {
return metric.value != null;
});
- return _.map(_.pairs(_.groupBy(metrics, 'domain')), function (domain) {
- return {
- name: domain[0],
- metrics: domain[1]
- };
- });
+ return _.sortBy(
+ _.map(_.pairs(_.groupBy(metrics, 'domain')), function (domain) {
+ return {
+ name: domain[0],
+ metrics: domain[1]
+ };
+ }),
+ 'name'
+ );
},
@@ -125,6 +128,7 @@ define([
measures: measures,
measuresToDisplay: that.prepareMetrics(metrics)
});
+ console.log(that.model.get('measuresToDisplay'));
});
},