1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-08-02 04:15:28 +02:00

feat(docker/images): show used tag correctly [EE-5396] (#10305)

This commit is contained in:
Chaim Lev-Ari 2023-10-03 15:55:23 +03:00 committed by GitHub
parent b895e88075
commit 9bf2957ea7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
29 changed files with 383 additions and 287 deletions

View file

@ -14,12 +14,17 @@ function ImageHelperFactory() {
return tag.match(/^(?![\.\-])([a-zA-Z0-9\_\.\-])+$/g);
}
/**
*
* @param {import('@/react/docker/images/queries/useImages').ImagesListResponse[]} images
* @returns {{names: string[]}}}
*/
function getImagesNamesForDownload(images) {
var names = images.map(function (image) {
return image.RepoTags[0] !== '<none>:<none>' ? image.RepoTags[0] : image.Id;
return image.tags[0] !== '<none>:<none>' ? image.tags[0] : image.id;
});
return {
names: names,
names,
};
}