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

feat(UX): add an image autocomplete feature for services and containers (#1389)

This commit is contained in:
Yassir Hannoun 2017-11-20 14:34:14 +01:00 committed by Anthony Lapenna
parent a2d41e5316
commit 6b9f3dad7a
8 changed files with 53 additions and 35 deletions

View file

@ -152,5 +152,14 @@ angular.module('portainer.services')
return deferred.promise;
};
service.getUniqueTagListFromImages = function (availableImages) {
return _.flatten(_.map(availableImages, function (image) {
_.remove(image.RepoTags, function (item) {
return item.indexOf('<none>') !== -1;
});
return image.RepoTags ? _.uniqWith(image.RepoTags, _.isEqual) : [];
}));
};
return service;
}]);