import React from 'react'; import { Modal, Button } from '@patternfly/react-core'; import { translate as __ } from 'foremanReact/common/I18n'; import { Table, Thead, Tr, Th, Tbody, Td } from '@patternfly/react-table'; import PropTypes from 'prop-types'; import ProxmoxComputeSelectors from '../../ProxmoxComputeSelectors'; const CPUFlagsModal = ({ isOpen, onClose, flags, handleChange }) => { const resetFlags = () => { Object.keys(flags).forEach(key => { handleChange({ target: { name: flags[key].name, value: '0', }, }); }); }; return (
{__('Confirm')} , , ]} > {Object.keys(flags).map(key => { const item = flags[key]; return ( ); })}
Name Description
{item.label} {item.description}
); }; CPUFlagsModal.propTypes = { isOpen: PropTypes.bool.isRequired, onClose: PropTypes.func.isRequired, flags: PropTypes.objectOf( PropTypes.shape({ name: PropTypes.string.isRequired, label: PropTypes.string.isRequired, value: PropTypes.string.isRequired, description: PropTypes.string.isRequired, }) ).isRequired, handleChange: PropTypes.func.isRequired, }; export default CPUFlagsModal;