mirror of
https://github.com/portainer/portainer.git
synced 2025-07-25 08:19:40 +02:00
revert(images): revert image autocompletion (#1367)
This commit is contained in:
parent
d06667218f
commit
6c6171c1f4
5 changed files with 8 additions and 16 deletions
|
@ -1,21 +1,16 @@
|
|||
angular.module('portainer')
|
||||
.controller('porImageRegistryController', ['$q', 'RegistryService', 'DockerHubService', 'ImageService', 'Notifications',
|
||||
function ($q, RegistryService, DockerHubService, ImageService, Notifications) {
|
||||
.controller('porImageRegistryController', ['$q', 'RegistryService', 'DockerHubService', 'Notifications',
|
||||
function ($q, RegistryService, DockerHubService, Notifications) {
|
||||
var ctrl = this;
|
||||
ctrl.availableImages = [];
|
||||
|
||||
|
||||
function initComponent() {
|
||||
$q.all({
|
||||
registries: RegistryService.registries(),
|
||||
dockerhub: DockerHubService.dockerhub(),
|
||||
availableImages: ctrl.autoComplete ? ImageService.images() : []
|
||||
dockerhub: DockerHubService.dockerhub()
|
||||
})
|
||||
.then(function success(data) {
|
||||
var dockerhub = data.dockerhub;
|
||||
var registries = data.registries;
|
||||
ctrl.availableImages = _.flatten(_.map(data.availableImages, function (image) {
|
||||
return image.RepoTags ? image.RepoTags : [];
|
||||
}));
|
||||
ctrl.availableRegistries = [dockerhub].concat(registries);
|
||||
if (!ctrl.registry.Id) {
|
||||
ctrl.registry = dockerhub;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue