Skip to content

Commit

Permalink
Do not show intermediate images in create container dialog
Browse files Browse the repository at this point in the history
  • Loading branch information
marusak authored and jelly committed Aug 22, 2022
1 parent 404bae7 commit 17d2588
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
13 changes: 5 additions & 8 deletions src/Containers.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 = "<none:none>";
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) => {
Expand Down
7 changes: 7 additions & 0 deletions test/check-application
Original file line number Diff line number Diff line change
Expand Up @@ -667,6 +667,13 @@ class TestApplication(testlib.MachineCase):
b.click(".listing-action button:contains('Hide intermediate images')")
b.wait_not_in_text("#containers-images", "<none>:<none>")

# 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)
Expand Down

0 comments on commit 17d2588

Please sign in to comment.