]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-7401 display total remediation effort
authorStas Vilchik <vilchiks@gmail.com>
Wed, 6 Apr 2016 13:14:29 +0000 (15:14 +0200)
committerStas Vilchik <vilchiks@gmail.com>
Wed, 6 Apr 2016 13:14:29 +0000 (15:14 +0200)
server/sonar-web/src/main/js/components/source-viewer/measures-overlay.js
server/sonar-web/src/main/js/components/source-viewer/templates/measures/_source-viewer-measures-issues.hbs

index 5ab4958e57ef6e3f8cf774c4350914b9614f127e..2fbcd936ab13a5df853593c4e7c521bb324ee206 100644 (file)
@@ -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;
     }
index 58f0df051a66f12c41ce7b17113f6b443d847e99..1ea0ab41d0e8cf6959e121fd1bd5028b6fd72a24 100644 (file)
@@ -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>