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:
parent
12e7aa6b60
commit
edb25ee10d
7 changed files with 29 additions and 12 deletions
|
@ -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';
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue