diff options
author | Julien Lancelot <julien.lancelot@sonarsource.com> | 2016-10-25 15:43:48 +0200 |
---|---|---|
committer | Julien Lancelot <julien.lancelot@sonarsource.com> | 2016-10-25 15:57:17 +0200 |
commit | 5f0f8f48729b4091048416f5c043d0076318f26b (patch) | |
tree | b0bc213844f6fe5ebd22ca07d15ae55aa9f6dbb5 /server/sonar-web/src/main | |
parent | 8836dd4591462784a67c9adc77764ca2b876f241 (diff) | |
download | sonarqube-5f0f8f48729b4091048416f5c043d0076318f26b.tar.gz sonarqube-5f0f8f48729b4091048416f5c043d0076318f26b.zip |
SONAR-8120 Replace component uuid by component key in measures list
Diffstat (limited to 'server/sonar-web/src/main')
-rw-r--r-- | server/sonar-web/src/main/js/apps/projects/store/actions.js | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/server/sonar-web/src/main/js/apps/projects/store/actions.js b/server/sonar-web/src/main/js/apps/projects/store/actions.js index a97261c73d2..a3437217d0b 100644 --- a/server/sonar-web/src/main/js/apps/projects/store/actions.js +++ b/server/sonar-web/src/main/js/apps/projects/store/actions.js @@ -49,15 +49,13 @@ const onFail = dispatch => error => { }; const onReceiveMeasures = (dispatch, projects) => response => { - const projectsById = keyBy(projects, 'id'); - const byComponentId = groupBy(response.measures, 'component'); + const byComponentKey = groupBy(response.measures, 'component'); const toStore = {}; - Object.keys(byComponentId).forEach(componentId => { - const componentKey = projectsById[componentId].key; + Object.keys(byComponentKey).forEach(componentKey => { const measures = {}; - byComponentId[componentId].forEach(measure => { + byComponentKey[componentKey].forEach(measure => { measures[measure.metric] = measure.value; }); toStore[componentKey] = measures; |