Press n or j to go to the next uncovered block, b, p or k for the previous block.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 | 37x 37x 37x 37x 37x 37x 20x 37x 177x 37x 102x 37x 96x 37x 2098x 37x 690x 690x 37x 37x 88x 88x 88x 37x 89x 89x 89x 37x 90x 90x 90x 37x 1408x 37x 33x 33x 33x 37x 682x 682x 682x 37x 3x 3x 37x 3x 3x 37x 3x 3x 37x 99x 99x 37x 693x 693x 693x 37x 20x 20x 20x | import { METRIC_TYPE_SUMMARY } from '~/api/analytics_api'; import { buildApiUrl } from '~/api/api_utils'; import axios from '~/lib/utils/axios_utils'; import { joinPaths } from '~/lib/utils/url_utility'; const NAMESPACE_PATH = '/:namespace_path'; const NAMESPACE_ANALYTICS_PATH = `${NAMESPACE_PATH}/-/analytics`; const NAMESPACE_VALUE_STREAMS_PATH = `${NAMESPACE_ANALYTICS_PATH}/value_stream_analytics/value_streams`; const NAMESPACE_SELECTED_VALUE_STREAM_PATH = `${NAMESPACE_VALUE_STREAMS_PATH}/:value_stream_id`; const NAMESPACE_VALUE_STREAM_STAGE_PATH = `${NAMESPACE_SELECTED_VALUE_STREAM_PATH}/stages/:stage_id`; const buildPath = ({ namespacePath }) => buildApiUrl(NAMESPACE_PATH).replace(':namespace_path', namespacePath); const buildAnalyticsPath = ({ namespacePath }) => buildApiUrl(NAMESPACE_ANALYTICS_PATH).replace(':namespace_path', namespacePath); const buildValueStreamRootPath = ({ namespacePath }) => buildApiUrl(NAMESPACE_VALUE_STREAMS_PATH).replace(':namespace_path', namespacePath); const buildValueStreamPath = ({ namespacePath, valueStreamId = null }) => buildApiUrl(NAMESPACE_SELECTED_VALUE_STREAM_PATH) .replace(':namespace_path', namespacePath) .replace(':value_stream_id', valueStreamId); const buildValueStreamStagePath = ({ namespacePath, valueStreamId = null, stageId = null }) => buildApiUrl(NAMESPACE_VALUE_STREAM_STAGE_PATH) .replace(':namespace_path', namespacePath) .replace(':value_stream_id', valueStreamId) .replace(':stage_id', stageId); export const getValueStreamStageMedian = ( { namespacePath, valueStreamId, stageId }, params = {}, ) => { const stageBase = buildValueStreamStagePath({ namespacePath, valueStreamId, stageId }); return axios.get(`${stageBase}/median`, { params }); }; export const getValueStreamMetrics = ({ endpoint = METRIC_TYPE_SUMMARY, requestPath: namespacePath, params = {}, }) => axios.get(joinPaths(buildAnalyticsPath({ namespacePath }), 'value_stream_analytics', endpoint), { params, }); export const getTypeOfWorkTasksByType = (namespacePath, params = {}) => { const endpoint = '/type_of_work/tasks_by_type'; const url = joinPaths(buildAnalyticsPath({ namespacePath }), endpoint); return axios.get(url, { params }); }; export const getTypeOfWorkTopLabels = (namespacePath, params = {}) => { const endpoint = '/type_of_work/tasks_by_type/top_labels'; const url = joinPaths(buildAnalyticsPath({ namespacePath }), endpoint); return axios.get(url, { params }); }; export const getStagesAndEvents = ({ namespacePath, valueStreamId, params = {} }) => { const endpoint = '/stages'; const url = joinPaths(buildValueStreamPath({ namespacePath, valueStreamId }), endpoint); return axios.get(url, { params }); }; const stageUrl = ({ namespacePath, valueStreamId, stageId }) => { return buildValueStreamStagePath({ namespacePath, valueStreamId, stageId }); }; export const getStageEvents = ({ namespacePath, valueStreamId, stageId, params = {} }) => { const stageBase = stageUrl({ namespacePath, valueStreamId, stageId }); const url = `${stageBase}/records`; return axios.get(url, { params }); }; export const getStageCount = ({ namespacePath, valueStreamId, stageId, params = {} }) => { const stageBase = stageUrl({ namespacePath, valueStreamId, stageId }); const url = `${stageBase}/count`; return axios.get(url, { params }); }; export const createValueStream = (namespacePath, data) => { const url = buildValueStreamRootPath({ namespacePath }); return axios.post(url, data); }; export const updateValueStream = ({ namespacePath, valueStreamId, data }) => { const url = buildValueStreamPath({ namespacePath, valueStreamId }); return axios.put(url, data); }; export const deleteValueStream = (namespacePath, valueStreamId) => { const url = buildValueStreamPath({ namespacePath, valueStreamId }); return axios.delete(url); }; export const getValueStreams = (namespacePath, data) => { const url = buildValueStreamRootPath({ namespacePath }); return axios.get(url, data); }; export const getDurationChart = ({ namespacePath, valueStreamId, stageId, params = {} }) => { const stageBase = stageUrl({ namespacePath, valueStreamId, stageId }); const url = `${stageBase}/average_duration_chart`; return axios.get(url, { params }); }; export const getGroupLabels = (namespacePath, params = { search: null }) => { // TODO: This can be removed when we resolve the labels endpoint // https://gitlab.com/gitlab-org/gitlab/-/merge_requests/25746 const endpoint = '/-/labels.json'; const url = joinPaths(buildPath({ namespacePath }), endpoint); return axios.get(url, { params, }); }; |