Compare commits

...

2 Commits

Author SHA1 Message Date
Prabhat Khera
07ce57d59f registry order corrected 2021-11-25 10:10:50 +13:00
waysonwei
d896cba617 fix order of registries in dropdown menu 2021-10-21 11:07:45 +13:00

View File

@@ -72,10 +72,14 @@ class porImageRegistryController {
let showDefaultRegistry = false;
this.registries = await this.EndpointService.registries(this.endpoint.Id, this.namespace);
// Sort the registries by Name
this.registries.sort((a, b) => a.Name.localeCompare(b.Name));
// hide default(anonymous) dockerhub registry if user has an authenticated one
if (!this.registries.some((registry) => registry.Type === RegistryTypes.DOCKERHUB)) {
showDefaultRegistry = true;
this.registries.push(this.defaultRegistry);
// Add dockerhub on top
this.registries.splice(0, 0, this.defaultRegistry);
}
const id = this.model.Registry.Id;