summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStas Vilchik <vilchiks@gmail.com>2016-04-06 15:14:29 +0200
committerStas Vilchik <vilchiks@gmail.com>2016-04-06 15:14:29 +0200
commit83f002f5b25f7b89fcbd6b08c6f86a1e35192659 (patch)
treeebe7656e7ba8ba2c3bee7a9ccf66f2b30422f36b
parentbe5e4eb724549ef654d161fcee933dd79ec53b02 (diff)
downloadsonarqube-83f002f5b25f7b89fcbd6b08c6f86a1e35192659.tar.gz
sonarqube-83f002f5b25f7b89fcbd6b08c6f86a1e35192659.zip
SONAR-7401 display total remediation effort
-rw-r--r--server/sonar-web/src/main/js/components/source-viewer/measures-overlay.js5
-rw-r--r--server/sonar-web/src/main/js/components/source-viewer/templates/measures/_source-viewer-measures-issues.hbs2
2 files changed, 6 insertions, 1 deletions
diff --git a/server/sonar-web/src/main/js/components/source-viewer/measures-overlay.js b/server/sonar-web/src/main/js/components/source-viewer/measures-overlay.js
index 5ab4958e57e..2fbcd936ab1 100644
--- a/server/sonar-web/src/main/js/components/source-viewer/measures-overlay.js
+++ b/server/sonar-web/src/main/js/components/source-viewer/measures-overlay.js
@@ -120,6 +120,11 @@ export default ModalView.extend({
},
calcAdditionalMeasures (measures) {
+ measures.issuesRemediationEffort =
+ (measures.sqale_index_raw || 0) +
+ (measures.reliability_remediation_effort_raw || 0) +
+ (measures.security_remediation_effort_raw || 0);
+
if (measures.lines_to_cover && measures.uncovered_lines) {
measures.covered_lines = measures.lines_to_cover_raw - measures.uncovered_lines_raw;
}
diff --git a/server/sonar-web/src/main/js/components/source-viewer/templates/measures/_source-viewer-measures-issues.hbs b/server/sonar-web/src/main/js/components/source-viewer/templates/measures/_source-viewer-measures-issues.hbs
index 58f0df051a6..1ea0ab41d0e 100644
--- a/server/sonar-web/src/main/js/components/source-viewer/templates/measures/_source-viewer-measures-issues.hbs
+++ b/server/sonar-web/src/main/js/components/source-viewer/templates/measures/_source-viewer-measures-issues.hbs
@@ -5,7 +5,7 @@
<span class="measure-name">{{t 'metric.violations.name'}}</span>
</div>
<div class="measure measure-big" data-metric="sqale_index">
- <span class="measure-value">{{default measures.sqale_index 0}}</span>
+ <span class="measure-value">{{formatMeasure measures.issuesRemediationEffort 'SHORT_WORK_DUR'}}</span>
<span class="measure-name">{{t 'metric.sqale_index.short_name'}}</span>
</div>
</div>