import { Checkbox } from './Checkbox';
import Popup from './Popup';
import FeatureGroupInfo from './FeatureGroupInfo';
+import CreateFeatureGroup from '../create/CreateFeatureGroup';
import { deleteFeatureGroups } from './API_STATUS';
const ListFeatureGroup = props => {
const logger = props.logger;
const [featureGroups, setFeatureGroups] = useState([]);
const [infoPopup, setInfoPopup] = useState(false);
+ const [createPopup, setCreatePopup] = useState(false);
const closeInfoPopup = () => setInfoPopup(false);
+ const closeCreatePopup = () => setCreatePopup(false);
const [featureGroupName, setFeatureGroupName] = useState(null);
+
useEffect(() => {
logger('useEffect');
fetchFeatureGroups();
console.error(e);
}
};
+
+ const handleCreateClick = () => {
+ setCreatePopup(true);
+ };
+
const handleInfoClick = featuregroup_name => {
console.log('feature group name is : ', featuregroup_name);
setFeatureGroupName({
);
return (
<>
+ <Button variant='success' size='sm' onClick={handleCreateClick}>
+ Create
+ </Button>{' '}
<Button variant='success' size='sm' onClick={e => handleDelete(e)}>
Delete
</Button>{' '}
})}
</tbody>
</BTable>
+ <Popup show={createPopup} onHide={closeCreatePopup} title='Create Feature Group' size='lg'>
+ <CreateFeatureGroup logger={logger} />
+ </Popup>
<Popup show={infoPopup} onHide={closeInfoPopup} title='Feature Group Info'>
<FeatureGroupInfo featureGroupName={featureGroupName} />
</Popup>