aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src/main/js
diff options
context:
space:
mode:
authorStas Vilchik <vilchiks@gmail.com>2016-07-15 15:01:30 +0200
committerGitHub <noreply@github.com>2016-07-15 15:01:30 +0200
commitfedaff73566aa885eb2151d2470a0549ea584c28 (patch)
tree0682a485541b986055c37c6100c8a31b01777da2 /server/sonar-web/src/main/js
parent0f8478f0b413b2a2b4905462342d71183e8eb755 (diff)
downloadsonarqube-fedaff73566aa885eb2151d2470a0549ea584c28.tar.gz
sonarqube-fedaff73566aa885eb2151d2470a0549ea584c28.zip
SONAR-7888 Do not format measures in WS api/components/app (#1103)
Diffstat (limited to 'server/sonar-web/src/main/js')
-rw-r--r--server/sonar-web/src/main/js/components/source-viewer/templates/source-viewer-header.hbs10
1 files changed, 5 insertions, 5 deletions
diff --git a/server/sonar-web/src/main/js/components/source-viewer/templates/source-viewer-header.hbs b/server/sonar-web/src/main/js/components/source-viewer/templates/source-viewer-header.hbs
index 2d012cfe8c2..e276c7e938b 100644
--- a/server/sonar-web/src/main/js/components/source-viewer/templates/source-viewer-header.hbs
+++ b/server/sonar-web/src/main/js/components/source-viewer/templates/source-viewer-header.hbs
@@ -34,14 +34,14 @@
<div class="source-viewer-header-measures">
{{#if isUnitTest}}
<div class="source-viewer-header-measure">
- <span class="source-viewer-header-measure-value">{{measures.tests}}</span>
+ <span class="source-viewer-header-measure-value">{{formatMeasure measures.tests 'SHORT_INT'}}</span>
<span class="source-viewer-header-measure-label">{{t 'metric.tests.name'}}</span>
</div>
{{/if}}
{{#unless isUnitTest}}
<div class="source-viewer-header-measure">
- <span class="source-viewer-header-measure-value">{{default measures.lines}}</span>
+ <span class="source-viewer-header-measure-value">{{formatMeasure measures.lines 'SHORT_INT'}}</span>
<span class="source-viewer-header-measure-label">{{t 'metric.lines.name'}}</span>
</div>
{{/unless}}
@@ -50,7 +50,7 @@
<span class="source-viewer-header-measure-value">
<a class="source-viewer-header-external-link" target="_blank"
href="{{link '/issues/search#resolved=false|fileUuids=' uuid}}">
- {{default measures.issues 0}}&nbsp;<i class="icon-detach"></i>
+ {{#if measures.issues}}{{formatMeasure measures.issues 'SHORT_INT'}}{{else}}0{{/if}}&nbsp;<i class="icon-detach"></i>
</a>
</span>
<span class="source-viewer-header-measure-label">{{t 'metric.violations.name'}}</span>
@@ -58,14 +58,14 @@
{{#notNull measures.coverage}}
<div class="source-viewer-header-measure">
- <span class="source-viewer-header-measure-value">{{default measures.coverage}}</span>
+ <span class="source-viewer-header-measure-value">{{formatMeasure measures.coverage 'PERCENT'}}</span>
<span class="source-viewer-header-measure-label">{{t 'metric.coverage.name'}}</span>
</div>
{{/notNull}}
{{#notNull measures.duplicationDensity}}
<div class="source-viewer-header-measure">
- <span class="source-viewer-header-measure-value">{{default measures.duplicationDensity}}</span>
+ <span class="source-viewer-header-measure-value">{{formatMeasure measures.duplicationDensity 'PERCENT'}}</span>
<span class="source-viewer-header-measure-label">{{t 'duplications'}}</span>
</div>
{{/notNull}}