aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src/main/js/api/measures.js
diff options
context:
space:
mode:
Diffstat (limited to 'server/sonar-web/src/main/js/api/measures.js')
-rw-r--r--server/sonar-web/src/main/js/api/measures.js16
1 files changed, 8 insertions, 8 deletions
diff --git a/server/sonar-web/src/main/js/api/measures.js b/server/sonar-web/src/main/js/api/measures.js
index 0916c4998c1..aeb33eb0ca9 100644
--- a/server/sonar-web/src/main/js/api/measures.js
+++ b/server/sonar-web/src/main/js/api/measures.js
@@ -2,11 +2,11 @@ import { getJSON } from '../helpers/request.js';
export function getMeasures (componentKey, metrics) {
- let url = baseUrl + '/api/resources/index';
- let data = { resource: componentKey, metrics: metrics.join(',') };
+ const url = baseUrl + '/api/resources/index';
+ const data = { resource: componentKey, metrics: metrics.join(',') };
return getJSON(url, data).then(r => {
- let msr = r[0].msr || [];
- let measures = {};
+ const msr = r[0].msr || [];
+ const measures = {};
msr.forEach(measure => {
measures[measure.key] = measure.val || measure.data;
});
@@ -16,11 +16,11 @@ export function getMeasures (componentKey, metrics) {
export function getMeasuresAndVariations (componentKey, metrics) {
- let url = baseUrl + '/api/resources/index';
- let data = { resource: componentKey, metrics: metrics.join(','), includetrends: 'true' };
+ const url = baseUrl + '/api/resources/index';
+ const data = { resource: componentKey, metrics: metrics.join(','), includetrends: 'true' };
return getJSON(url, data).then(r => {
- let msr = r[0].msr || [];
- let measures = {};
+ const msr = r[0].msr || [];
+ const measures = {};
msr.forEach(measure => {
measures[measure.key] = {
value: measure.val != null ? measure.val : measure.data,