import React from 'react'; import PropTypes from 'prop-types'; import { Switch, Level, LevelItem } from '@patternfly/react-core'; import { OverlayTrigger, Tooltip, Icon } from 'patternfly-react'; import { translate as __ } from 'foremanReact/common/I18n'; import { Col, ControlLabel } from 'react-bootstrap'; const SimpleContentAccess = (props) => { const { canToggleSimpleContentAccess, isSimpleContentAccessEnabled, enableSimpleContentAccess, disableSimpleContentAccess, } = props; const toggleSimpleContentAccess = () => { if (isSimpleContentAccessEnabled) { disableSimpleContentAccess(); } else { enableSimpleContentAccess(); } }; return (
{__('Simple Content Access')} {__('When Simple Content Access is enabled, hosts can consume from all repositories in their Content View regardless of subscription status.')} } placement="bottom" trigger={['hover', 'focus']} rootClose={false} >
{__('Toggling Simple Content Access will refresh your manifest.')}
); }; SimpleContentAccess.propTypes = { enableSimpleContentAccess: PropTypes.func.isRequired, disableSimpleContentAccess: PropTypes.func.isRequired, isSimpleContentAccessEnabled: PropTypes.bool.isRequired, canToggleSimpleContentAccess: PropTypes.bool.isRequired, }; export default SimpleContentAccess;