aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src/main/js/components/SourceViewer/views/measures-overlay.js
diff options
context:
space:
mode:
authorStas Vilchik <stas.vilchik@sonarsource.com>2017-09-15 15:00:45 +0200
committerTeryk Bellahsene <teryk@users.noreply.github.com>2017-09-20 09:15:23 +0200
commit15705813665581d67d67bff133d31d235dd16535 (patch)
treebbe2d5d6be6eeffdc667bab66e584b0f24c851e3 /server/sonar-web/src/main/js/components/SourceViewer/views/measures-overlay.js
parent4c2dafad1f82d5a79a061335908ca0e7ea80b6ee (diff)
downloadsonarqube-15705813665581d67d67bff133d31d235dd16535.tar.gz
sonarqube-15705813665581d67d67bff133d31d235dd16535.zip
SONAR-9812 display activity page for portfolios (#2510)
Diffstat (limited to 'server/sonar-web/src/main/js/components/SourceViewer/views/measures-overlay.js')
-rw-r--r--server/sonar-web/src/main/js/components/SourceViewer/views/measures-overlay.js31
1 files changed, 15 insertions, 16 deletions
diff --git a/server/sonar-web/src/main/js/components/SourceViewer/views/measures-overlay.js b/server/sonar-web/src/main/js/components/SourceViewer/views/measures-overlay.js
index e9db36ae7b7..e2ab2a305cd 100644
--- a/server/sonar-web/src/main/js/components/SourceViewer/views/measures-overlay.js
+++ b/server/sonar-web/src/main/js/components/SourceViewer/views/measures-overlay.js
@@ -152,22 +152,21 @@ export default ModalView.extend({
.filter(metric => metric.type !== 'DATA' && !metric.hidden)
.map(metric => metric.key);
- return getMeasures(
- this.options.component.key,
- metricsToRequest,
- this.options.branch
- ).then(measures => {
- let nextMeasures = this.options.component.measures || {};
- measures.forEach(measure => {
- const metric = metrics.find(metric => metric.key === measure.metric);
- nextMeasures[metric.key] = formatMeasure(measure.value, metric.type);
- nextMeasures[metric.key + '_raw'] = measure.value;
- metric.value = nextMeasures[metric.key];
- });
- nextMeasures = this.calcAdditionalMeasures(nextMeasures);
- this.measures = nextMeasures;
- this.measuresToDisplay = this.prepareMetrics(metrics);
- });
+ return getMeasures(this.options.component.key, metricsToRequest, this.options.branch).then(
+ measures => {
+ let nextMeasures = this.options.component.measures || {};
+ measures.forEach(measure => {
+ const metric = metrics.find(metric => metric.key === measure.metric);
+ nextMeasures[metric.key] = formatMeasure(measure.value, metric.type);
+ nextMeasures[metric.key + '_raw'] = measure.value;
+ metric.value = nextMeasures[metric.key];
+ });
+ nextMeasures = this.calcAdditionalMeasures(nextMeasures);
+ this.measures = nextMeasures;
+ this.measuresToDisplay = this.prepareMetrics(metrics);
+ },
+ () => {}
+ );
});
},