1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-07-23 15:29:42 +02:00

fix(services): pre fill service registry and image [EE-1769] (#5798)

fix(services): pre fill service registry and image [EE-1769]  (#5798)
This commit is contained in:
Marcelo Rydel 2021-10-14 09:42:10 -03:00 committed by GitHub
parent 12e7aa6b60
commit edb25ee10d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 29 additions and 12 deletions

View file

@ -15,12 +15,14 @@ class porImageRegistryController {
this.Notifications = Notifications;
this.onRegistryChange = this.onRegistryChange.bind(this);
this.onImageChange = this.onImageChange.bind(this);
this.registries = [];
this.images = [];
this.defaultRegistry = new DockerHubViewModel();
this.$scope.$watch(() => this.model.Registry, this.onRegistryChange);
this.$scope.$watch(() => this.model.Image, this.onImageChange);
}
isKnownRegistry(registry) {
@ -62,6 +64,12 @@ class porImageRegistryController {
}
}
async onImageChange() {
if (!this.isDockerHubRegistry()) {
this.setValidity(true);
}
}
displayedRegistryURL() {
return this.getRegistryURL(this.model.Registry) || 'docker.io';
}