Sha256: e4585129617f1ccd22256b532e1f71fffc1fc731718429a317a0728ea2f45919
Contents?: true
Size: 1.08 KB
Versions: 1
Compression:
Stored size: 1.08 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 { getHostsPageUrl } from 'foremanReact/Root/Context/ForemanContext'; const ViewSelectedHostsLink = ({ hostIdsParam, isAllHostsSelected, defaultFailedHostsSearch, }) => { const search = isAllHostsSelected ? defaultFailedHostsSearch : hostIdsParam; const url = foremanUrl(`${getHostsPageUrl(false)}?search=${search}`); return ( <Button 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
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
foreman_openscap-8.0.0 | webpack/components/OpenscapRemediationWizard/ViewSelectedHostsLink.js |