import React from 'react'; import cockpit from 'cockpit'; import * as utils from './util.js'; import { DescriptionList, DescriptionListDescription, DescriptionListGroup, DescriptionListTerm } from "@patternfly/react-core/dist/esm/components/DescriptionList"; import ImageUsedBy from './ImageUsedBy.jsx'; const _ = cockpit.gettext; const ImageDetails = ({ containers, image, showAll }) => { return ( {image.Command !== "" && {_("Command")} {utils.quote_cmdline(image.Command)} } {image.Entrypoint && {_("Entrypoint")} {image.Entrypoint.join(" ")} } {image.RepoTags && {_("Tags")} {image.RepoTags ? image.RepoTags.join(" ") : ""} } {containers && {_("Used by")} } {image.Ports.length !== 0 && {_("Ports")} {image.Ports.join(', ')} } ); }; export default ImageDetails;