1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-07-24 07:49:41 +02:00

feat(registry): gitlab support (#3107)

* feat(api): gitlab registry type

* feat(registries): early support for gitlab registries

* feat(app): registry service selector

* feat(registry): gitlab support : list repositories and tags - remove features missing

* feat(registry): gitlab registry remove features

* feat(registry): gitlab switch to registry V2 API for repositories and tags

* feat(api): use development extension binary

* fix(registry): avoid 401 on gitlab retrieve to disconnect the user

* feat(registry): gitlab browse projects without extension

* style(app): code cleaning

* refactor(app): PR review changes + refactor on types

* fix(gitlab): remove gitlab info from registrymanagementconfig and force gitlab type

* style(api): go fmt

* feat(api): update APIVersion and ExtensionDefinitionsURL

* fix(api): fix invalid RM extension URL

* feat(registry): PAT scope help

* feat(registry): defaults on registry creation

* style(registry-creation): update layout and text for Gitlab registry

* feat(registry-creation): update gitlab notice
This commit is contained in:
xAt0mZ 2019-11-12 04:28:31 +01:00 committed by Anthony Lapenna
parent 03d9d6afbb
commit 198e92c734
38 changed files with 1022 additions and 160 deletions

View file

@ -1,3 +1,4 @@
import _ from 'lodash-es';
import { RepositoryTagViewModel } from '../models/repositoryTag';
angular.module('portainer.extensions.registrymanagement')
@ -7,7 +8,7 @@ angular.module('portainer.extensions.registrymanagement')
var helper = {};
function historyRawToParsed(rawHistory) {
return angular.fromJson(rawHistory[0].v1Compatibility);
return _.map(rawHistory, (item) => angular.fromJson(item.v1Compatibility));
}
helper.manifestsToTag = function (manifests) {
@ -16,7 +17,7 @@ angular.module('portainer.extensions.registrymanagement')
var history = historyRawToParsed(v1.history);
var name = v1.tag;
var os = history.os;
var os = history[0].os;
var arch = v1.architecture;
var size = v2.layers.reduce(function (a, b) {
return {
@ -26,7 +27,7 @@ angular.module('portainer.extensions.registrymanagement')
var imageId = v2.config.digest;
var imageDigest = v2.digest;
return new RepositoryTagViewModel(name, os, arch, size, imageDigest, imageId, v2);
return new RepositoryTagViewModel(name, os, arch, size, imageDigest, imageId, v2, history);
};
return helper;