From c28cab14ef77f43574366fcbdf1149207f918000 Mon Sep 17 00:00:00 2001 From: Jelle van der Waa Date: Wed, 3 Apr 2024 17:19:43 +0200 Subject: [PATCH] Pass all local images for container integration details On some systems a toolbox container has an intermediate image as image which since 17d258855fac34556d66337f9015d47741dd482c is no longer passed to the renderRow. Closes #1649 --- src/Containers.jsx | 23 +++++++++++------------ test/check-application | 2 ++ 2 files changed, 13 insertions(+), 12 deletions(-) diff --git a/src/Containers.jsx b/src/Containers.jsx index b18f40675..608267997 100644 --- a/src/Containers.jsx +++ b/src/Containers.jsx @@ -677,28 +677,27 @@ class Containers extends React.Component { // Convert to the search result output let localImages = null; + let nonIntermediateImages = null; if (this.props.images) { - localImages = Object.keys(this.props.images).reduce((images, id) => { + localImages = Object.keys(this.props.images).map(id => { const img = this.props.images[id]; - if (img.RepoTags) { - img.Index = img.RepoTags[0].split('/')[0]; - img.Name = img.RepoTags[0]; - img.toString = function imgToString() { return this.Name }; - images.push(img); - } - return images; + img.Index = img.RepoTags ? img.RepoTags[0].split('/')[0] : ""; + img.Name = utils.image_name(img); + img.toString = function imgToString() { return this.Name }; + return img; }, []); + nonIntermediateImages = localImages.filter(img => img.Index !== ""); } const createContainer = (inPod) => { - if (localImages) + if (nonIntermediateImages) Dialogs.show( {(podmanInfo) => ( {(Dialogs) => ( @@ -825,7 +824,7 @@ class Containers extends React.Component { {_(podStatus)} diff --git a/test/check-application b/test/check-application index 66ec0d01b..facc31d6d 100755 --- a/test/check-application +++ b/test/check-application @@ -861,6 +861,8 @@ class TestApplication(testlib.MachineCase): b.wait_not_present("div.pf-v5-c-modal-box") self.waitContainerRow(IMG_INTERMEDIATE) + # Integration tab should crash with an intermediate image + # Delete intermediate image which is in use self.execute(auth, f"podman untag {IMG_INTERMEDIATE}") clickDeleteImage(intermediate_image_sel)