aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src/main/js/apps
diff options
context:
space:
mode:
authorStas Vilchik <vilchiks@gmail.com>2016-12-22 09:44:55 +0100
committerStas Vilchik <vilchiks@gmail.com>2016-12-22 09:44:55 +0100
commit360ea9d0f9e7771adb1699c9add28a05bac4c55d (patch)
tree92506054106bce0a71199d98f381dc97d75695f7 /server/sonar-web/src/main/js/apps
parent7c0c2c68dba8d2a9c365c37e8988b5033a606df0 (diff)
downloadsonarqube-360ea9d0f9e7771adb1699c9add28a05bac4c55d.tar.gz
sonarqube-360ea9d0f9e7771adb1699c9add28a05bac4c55d.zip
use new project activity WS on the measure history page
Diffstat (limited to 'server/sonar-web/src/main/js/apps')
-rw-r--r--server/sonar-web/src/main/js/apps/component-measures/details/history/MeasureHistory.js9
1 files changed, 5 insertions, 4 deletions
diff --git a/server/sonar-web/src/main/js/apps/component-measures/details/history/MeasureHistory.js b/server/sonar-web/src/main/js/apps/component-measures/details/history/MeasureHistory.js
index 2370fce1031..3e0f15fec20 100644
--- a/server/sonar-web/src/main/js/apps/component-measures/details/history/MeasureHistory.js
+++ b/server/sonar-web/src/main/js/apps/component-measures/details/history/MeasureHistory.js
@@ -24,7 +24,7 @@ import React from 'react';
import Spinner from './../../components/Spinner';
import Timeline from '../../../../components/charts/Timeline';
import { getTimeMachineData } from '../../../../api/time-machine';
-import { getEvents } from '../../../../api/events';
+import { getProjectActivity } from '../../../../api/projectActivity';
import { formatMeasure, getShortType } from '../../../../helpers/measures';
import { translate } from '../../../../helpers/l10n';
@@ -91,9 +91,10 @@ export default class MeasureHistory extends React.Component {
}
fetchEvents () {
- return getEvents(this.props.component.key, 'Version').then(r => {
- const events = r.map(event => {
- return { version: event.n, date: moment(event.dt).toDate() };
+ return getProjectActivity(this.props.component.key, { category: 'VERSION' }).then(({ analyses }) => {
+ const events = analyses.map(analysis => {
+ const version = analysis.events.find(event => event.category === 'VERSION');
+ return { version: version.name, date: moment(analysis.date).toDate() };
});
return sortBy(events, 'date');