feat(app/portainer): backport portainer/models changes
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
export function DockerHubViewModel(data) {
|
||||
this.Name = 'DockerHub';
|
||||
this.URL = '';
|
||||
this.Authentication = data.Authentication;
|
||||
this.Username = data.Username;
|
||||
this.Password = data.Password;
|
||||
import { RegistryTypes } from './registryTypes';
|
||||
|
||||
export function DockerHubViewModel() {
|
||||
this.Type = RegistryTypes.ANONYMOUS;
|
||||
this.Name = 'DockerHub (anonymous)';
|
||||
this.URL = 'docker.io';
|
||||
}
|
||||
|
||||
@@ -9,10 +9,7 @@ export function RegistryViewModel(data) {
|
||||
this.Authentication = data.Authentication;
|
||||
this.Username = data.Username;
|
||||
this.Password = data.Password;
|
||||
this.AuthorizedUsers = data.AuthorizedUsers;
|
||||
this.AuthorizedTeams = data.AuthorizedTeams;
|
||||
this.UserAccessPolicies = data.UserAccessPolicies;
|
||||
this.TeamAccessPolicies = data.TeamAccessPolicies;
|
||||
this.RegistryAccesses = data.RegistryAccesses; // map[EndpointID]{UserAccessPolicies, TeamAccessPolicies, NamespaceAccessPolicies}
|
||||
this.Checked = false;
|
||||
this.Gitlab = data.Gitlab;
|
||||
this.Quay = data.Quay;
|
||||
@@ -39,7 +36,7 @@ export function RegistryManagementConfigurationDefaultModel(registry) {
|
||||
}
|
||||
}
|
||||
|
||||
export function RegistryDefaultModel() {
|
||||
export function RegistryCreateFormValues() {
|
||||
this.Type = RegistryTypes.CUSTOM;
|
||||
this.URL = '';
|
||||
this.Name = '';
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
export const RegistryTypes = Object.freeze({
|
||||
ANONYMOUS: 0, // not backend replicated, only for frontend
|
||||
QUAY: 1,
|
||||
AZURE: 2,
|
||||
CUSTOM: 3,
|
||||
GITLAB: 4,
|
||||
DOCKERHUB: 5,
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user