aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src/main/js/overview/models/state.js
diff options
context:
space:
mode:
Diffstat (limited to 'server/sonar-web/src/main/js/overview/models/state.js')
-rw-r--r--server/sonar-web/src/main/js/overview/models/state.js8
1 files changed, 7 insertions, 1 deletions
diff --git a/server/sonar-web/src/main/js/overview/models/state.js b/server/sonar-web/src/main/js/overview/models/state.js
index c8b2f228aeb..b62181ada55 100644
--- a/server/sonar-web/src/main/js/overview/models/state.js
+++ b/server/sonar-web/src/main/js/overview/models/state.js
@@ -24,6 +24,7 @@ define(function () {
SIZE_METRIC = 'ncloc',
ISSUES_METRIC = 'violations',
DEBT_METRIC = 'sqale_index',
+ SQALE_RATING_METRIC = 'sqale_rating',
COVERAGE_METRIC = 'overall_coverage',
NEW_COVERAGE_METRIC = 'new_overall_coverage',
DUPLICATIONS_METRIC = 'duplicated_lines_density';
@@ -67,6 +68,7 @@ define(function () {
GATE_METRIC,
SIZE_METRIC,
DEBT_METRIC,
+ SQALE_RATING_METRIC,
COVERAGE_METRIC,
NEW_COVERAGE_METRIC,
DUPLICATIONS_METRIC
@@ -153,7 +155,8 @@ define(function () {
},
parseDebt: function (msr) {
- var debtMeasure = _.findWhere(msr, { key: DEBT_METRIC });
+ var debtMeasure = _.findWhere(msr, { key: DEBT_METRIC }),
+ sqaleRatingMeasure = _.findWhere(msr, { key: SQALE_RATING_METRIC });
if (debtMeasure != null) {
this.set({
debt: debtMeasure.val,
@@ -162,6 +165,9 @@ define(function () {
debt3: debtMeasure.var3
});
}
+ if (sqaleRatingMeasure != null) {
+ this.set({ sqaleRating: sqaleRatingMeasure.val });
+ }
},
parseCoverage: function (msr) {