import PropTypes from 'prop-types'; import React from 'react'; import CardTemplate from 'foremanReact/components/HostDetails/Templates/CardItem/CardTemplate'; import { DescriptionList, DescriptionListTerm, DescriptionListGroup, DescriptionListDescription, } from '@patternfly/react-core'; import SkeletonLoader from 'foremanReact/components/common/SkeletonLoader'; import DefaultLoaderEmptyState from 'foremanReact/components/HostDetails/DetailsCard/DefaultLoaderEmptyState'; import { STATUS } from 'foremanReact/constants'; import { translate as __ } from 'foremanReact/common/I18n'; const DescriptionCard = ({ proxyName, caProxy, proxyId, caProxyId, env, status, }) => ( {__('Puppet environment')} } status={status} > {env && ( {env} )} {__('Puppet Smart Proxy')} } status={status} > {proxyName && ( {proxyName} )} {__('Puppet CA Smart Proxy')} } status={status} > {caProxy && ( {caProxy} )} ); DescriptionCard.propTypes = { caProxy: PropTypes.string, caProxyId: PropTypes.number, env: PropTypes.string, proxyId: PropTypes.number, proxyName: PropTypes.string, status: PropTypes.string, }; DescriptionCard.defaultProps = { caProxy: undefined, caProxyId: undefined, env: undefined, proxyId: undefined, proxyName: undefined, status: STATUS.PENDING, }; export default DescriptionCard;