import React, { useEffect } from 'react'; import PropTypes from 'prop-types'; import { Text, TextVariants, Popover, Button } from '@patternfly/react-core'; import { InfoAltIcon, CaretRightIcon } from '@patternfly/react-icons'; import { FormGroup, Grid } from 'patternfly-react'; import { translate as __ } from 'foremanReact/common/I18n'; import { foremanUrl } from '../../../ForemanRhCloudHelpers'; import Switcher from '../../../common/Switcher'; import AdvancedSettings from './components/AdvancedSettings'; const InventoryAutoUploadSwitcher = ({ autoUploadEnabled, handleToggle, fetchSettings, }) => { useEffect(() => { fetchSettings(); }, [fetchSettings]); return (

{__('Red Hat Cloud Inventory')}


handleToggle(autoUploadEnabled)} labelCol={5} /> Advanced Inventory Settings} bodyContent={ } position="right" >
{__('More details can be found in')}{' '} {__('Configure')} {' > '} {__('Inventory Upload')}
); }; InventoryAutoUploadSwitcher.propTypes = { autoUploadEnabled: PropTypes.bool, handleToggle: PropTypes.func.isRequired, fetchSettings: PropTypes.func.isRequired, }; InventoryAutoUploadSwitcher.defaultProps = { autoUploadEnabled: true, }; export default InventoryAutoUploadSwitcher;