fix(registry): #4371 fix broken GITLAB registry (#4935)

Co-authored-by: Simon Meng <simon.meng@portainer.io>
snyk-fix-d3a07bfe2eea4450b0c42fa6adb9007c
cong meng 2021-03-25 11:50:34 +13:00 committed by GitHub
parent f5aa6c4dc2
commit ad2910f3f0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 2 deletions

View File

@ -40,8 +40,7 @@ angular.module('portainer.docker').factory('ImageHelper', [
if (registry.Registry.Type === RegistryTypes.GITLAB) {
const slash = _.startsWith(registry.Image, ':') ? '' : '/';
fullImageName = registry.Registry.URL + '/' + registry.Registry.Gitlab.ProjectPath + slash + registry.Image;
}
if (registry.Registry.Type === RegistryTypes.QUAY) {
} else if (registry.Registry.Type === RegistryTypes.QUAY) {
const name = registry.Registry.Quay.UseOrganisation ? registry.Registry.Quay.OrganisationName : registry.Registry.Username;
const url = registry.Registry.URL ? registry.Registry.URL + '/' : '';
fullImageName = url + name + '/' + registry.Image;