Sha256: ed0fca8ebf6b1a9b9d620b565e23f2acec776587009be04434d5e871a4b713a7
Contents?: true
Size: 1.13 KB
Versions: 8
Compression:
Stored size: 1.13 KB
Contents
import React from 'react'; import PropTypes from 'prop-types'; import { ExternalLinkSquareAltIcon } from '@patternfly/react-icons'; import { Button } from '@patternfly/react-core'; import { translate as __ } from 'foremanReact/common/I18n'; import { foremanUrl } from 'foremanReact/common/helpers'; import { useForemanHostsPageUrl } from 'foremanReact/Root/Context/ForemanContext'; const ViewSelectedHostsLink = ({ hostIdsParam, isAllHostsSelected, defaultFailedHostsSearch, }) => { const search = isAllHostsSelected ? defaultFailedHostsSearch : hostIdsParam; const url = foremanUrl(`${useForemanHostsPageUrl()}?search=${search}`); return ( <Button ouiaId="oscap-rem-wiz-ext-link-to-hosts" component="a" variant="link" icon={<ExternalLinkSquareAltIcon />} iconPosition="right" target="_blank" href={url} > {__('View selected hosts')} </Button> ); }; ViewSelectedHostsLink.propTypes = { isAllHostsSelected: PropTypes.bool.isRequired, defaultFailedHostsSearch: PropTypes.string.isRequired, hostIdsParam: PropTypes.string.isRequired, }; export default ViewSelectedHostsLink;
Version data entries
8 entries across 8 versions & 1 rubygems