Merge branch 'add-project-selection-to-cycle-analytics-service' into 'master'

Add projectIds to CA service

See merge request gitlab-org/gitlab-ce!30894
This commit is contained in:
Mike Greiling 2019-07-24 13:59:28 +00:00
commit f987e03c42
1 changed files with 6 additions and 2 deletions

View File

@ -8,22 +8,26 @@ export default class CycleAnalyticsService {
}
fetchCycleAnalyticsData(options = { startDate: 30 }) {
const { startDate, projectIds } = options;
return this.axios
.get('', {
params: {
'cycle_analytics[start_date]': options.startDate,
'cycle_analytics[start_date]': startDate,
'cycle_analytics[project_ids]': projectIds,
},
})
.then(x => x.data);
}
fetchStageData(options) {
const { stage, startDate } = options;
const { stage, startDate, projectIds } = options;
return this.axios
.get(`events/${stage.name}.json`, {
params: {
'cycle_analytics[start_date]': startDate,
'cycle_analytics[project_ids]': projectIds,
},
})
.then(x => x.data);