Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-08-06 21:09:57 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2021-08-06 21:09:57 +0300
commit7e75943bd8ade38611f7b953aa3b4e664bbcb7a8 (patch)
tree9b239cf93da408561c17b04bc80eac4f492832f8 /app/assets/javascripts/api
parent07e0fae35c51cff088d6b2cbc6d844f421e16617 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/api')
-rw-r--r--app/assets/javascripts/api/analytics_api.js12
1 files changed, 9 insertions, 3 deletions
diff --git a/app/assets/javascripts/api/analytics_api.js b/app/assets/javascripts/api/analytics_api.js
index 11786f6c365..e10439f699d 100644
--- a/app/assets/javascripts/api/analytics_api.js
+++ b/app/assets/javascripts/api/analytics_api.js
@@ -1,4 +1,5 @@
import axios from '~/lib/utils/axios_utils';
+import { joinPaths } from '~/lib/utils/url_utility';
import { buildApiUrl } from './api_utils';
const PROJECT_VSA_PATH_BASE = '/:request_path/-/analytics/value_stream_analytics/value_streams';
@@ -33,7 +34,7 @@ export const getProjectValueStreamStages = (requestPath, valueStreamId) => {
// NOTE: legacy VSA request use a different path
// the `requestPath` provides a full url for the request
export const getProjectValueStreamStageData = ({ requestPath, stageId, params }) =>
- axios.get(`${requestPath}/events/${stageId}`, { params });
+ axios.get(joinPaths(requestPath, 'events', stageId), { params });
export const getProjectValueStreamMetrics = (requestPath, params) =>
axios.get(requestPath, { params });
@@ -46,7 +47,7 @@ export const getProjectValueStreamMetrics = (requestPath, params) =>
export const getValueStreamStageMedian = ({ requestPath, valueStreamId, stageId }, params = {}) => {
const stageBase = buildValueStreamStageDataPath({ requestPath, valueStreamId, stageId });
- return axios.get(`${stageBase}/median`, { params });
+ return axios.get(joinPaths(stageBase, 'median'), { params });
};
export const getValueStreamStageRecords = (
@@ -54,5 +55,10 @@ export const getValueStreamStageRecords = (
params = {},
) => {
const stageBase = buildValueStreamStageDataPath({ requestPath, valueStreamId, stageId });
- return axios.get(`${stageBase}/records`, { params });
+ return axios.get(joinPaths(stageBase, 'records'), { params });
+};
+
+export const getValueStreamStageCounts = ({ requestPath, valueStreamId, stageId }, params = {}) => {
+ const stageBase = buildValueStreamStageDataPath({ requestPath, valueStreamId, stageId });
+ return axios.get(joinPaths(stageBase, 'count'), { params });
};