diff --git a/src/Containers.jsx b/src/Containers.jsx index 568fccdf4..0f6bb83ee 100644 --- a/src/Containers.jsx +++ b/src/Containers.jsx @@ -542,19 +542,16 @@ class Containers extends React.Component { // Convert to the search result output let localImages = null; if (this.props.images) { - localImages = Object.keys(this.props.images).map(id => { + localImages = Object.keys(this.props.images).reduce((images, id) => { const img = this.props.images[id]; if (img.RepoTags) { img.Index = img.RepoTags[0].split('/')[0]; img.Name = img.RepoTags[0]; - } else { - img.Name = ""; - img.Index = ""; + img.toString = function imgToString() { return this.Name }; + images.push(img); } - img.toString = function imgToString() { return this.Name }; - - return img; - }); + return images; + }, []); } const createContainer = (inPod) => { diff --git a/test/check-application b/test/check-application index 2e68f3fb5..58f8f81f5 100755 --- a/test/check-application +++ b/test/check-application @@ -667,6 +667,13 @@ class TestApplication(testlib.MachineCase): b.click(".listing-action button:contains('Hide intermediate images')") b.wait_not_in_text("#containers-images", ":") + # Intermediate images are not shown in create container dialog + b.click("#containers-containers-create-container-btn") + b.wait_visible('div.pf-c-modal-box header:contains("Create container")') + b.click("#create-image-image-select-typeahead") + b.wait_visible(".pf-c-select__menu-item:contains('registry:2')") + b.wait_not_present(".pf-c-select__menu-item:contains('none')") + @testlib.nondestructive def testCommitUser(self): self._testCommit(False)