From 86a8eee1b8bd43a1fe962905eb97a1f478cc050b Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Thu, 10 Dec 2020 14:52:44 +0000 Subject: Add latest changes from gitlab-org/gitlab@13-6-stable-ee --- app/assets/javascripts/registry/explorer/utils.js | 11 ++++++++++- .../vue_merge_request_widget/mr_widget_options.vue | 5 ++++- 2 files changed, 14 insertions(+), 2 deletions(-) (limited to 'app/assets/javascripts') diff --git a/app/assets/javascripts/registry/explorer/utils.js b/app/assets/javascripts/registry/explorer/utils.js index 2c89d508c31..a48da51caae 100644 --- a/app/assets/javascripts/registry/explorer/utils.js +++ b/app/assets/javascripts/registry/explorer/utils.js @@ -1,3 +1,5 @@ +import { joinPaths } from '~/lib/utils/url_utility'; + export const pathGenerator = (imageDetails, ending = '?format=json') => { // this method is a temporary workaround, to be removed with graphql implementation // https://gitlab.com/gitlab-org/gitlab/-/issues/276432 @@ -12,5 +14,12 @@ export const pathGenerator = (imageDetails, ending = '?format=json') => { return acc; }, []) .join('/'); - return `/${basePath}/registry/repository/${imageDetails.id}/tags${ending}`; + + return joinPaths( + window.gon.relative_url_root, + `/${basePath}`, + '/registry/repository/', + `${imageDetails.id}`, + `tags${ending}`, + ); }; diff --git a/app/assets/javascripts/vue_merge_request_widget/mr_widget_options.vue b/app/assets/javascripts/vue_merge_request_widget/mr_widget_options.vue index 190d790f584..e7f0977778e 100644 --- a/app/assets/javascripts/vue_merge_request_widget/mr_widget_options.vue +++ b/app/assets/javascripts/vue_merge_request_widget/mr_widget_options.vue @@ -202,6 +202,9 @@ export default { shouldShowAccessibilityReport() { return this.mr.accessibilityReportPath; }, + formattedHumanAccess() { + return (this.mr.humanAccess || '').toLowerCase(); + }, }, watch: { state(newVal, oldVal) { @@ -439,7 +442,7 @@ export default { class="mr-widget-workflow" :pipeline-path="mr.mergeRequestAddCiConfigPath" :pipeline-svg-path="mr.pipelinesEmptySvgPath" - :human-access="mr.humanAccess.toLowerCase()" + :human-access="formattedHumanAccess" :user-callouts-path="mr.userCalloutsPath" :user-callout-feature-id="mr.suggestPipelineFeatureId" @dismiss="dismissSuggestPipelines" -- cgit v1.2.3