fix: api access info
This commit is contained in:
@@ -58,7 +58,6 @@ import {
|
||||
SourceType
|
||||
} from '../config/types';
|
||||
import useFormInitialValues from '../hooks/use-form-initial-values';
|
||||
import useGenericProxy from '../hooks/use-generic-proxy';
|
||||
import useModelsColumns from '../hooks/use-models-columns';
|
||||
import AccessControlModal from './access-control-modal';
|
||||
import APIAccessInfoModal from './api-access-info';
|
||||
@@ -196,8 +195,6 @@ const Models: React.FC<ModelsProps> = ({
|
||||
});
|
||||
const modalRef = useRef<any>(null);
|
||||
|
||||
const { GenericProxyModal, openProxyModal } = useGenericProxy();
|
||||
|
||||
useEffect(() => {
|
||||
if (deleteIds?.length) {
|
||||
rowSelection.removeSelectedKey(deleteIds);
|
||||
@@ -429,12 +426,7 @@ const Models: React.FC<ModelsProps> = ({
|
||||
const handleViewAPIInfo = useCallback((row: ListItem) => {
|
||||
setAPIAccessInfo({
|
||||
show: true,
|
||||
data: {
|
||||
id: row.id,
|
||||
name: row.name,
|
||||
categories: row.categories,
|
||||
url: `${MODELS_API}/${row.id}/instances`
|
||||
}
|
||||
data: row
|
||||
});
|
||||
}, []);
|
||||
const handleSelect = useMemoizedFn(async (val: any, row: ListItem) => {
|
||||
@@ -459,10 +451,6 @@ const Models: React.FC<ModelsProps> = ({
|
||||
handleViewAPIInfo(row);
|
||||
}
|
||||
|
||||
if (val === 'proxy') {
|
||||
openProxyModal(row);
|
||||
}
|
||||
|
||||
if (val === 'stop') {
|
||||
modalRef.current?.show({
|
||||
content: 'models.instances',
|
||||
@@ -796,7 +784,6 @@ const Models: React.FC<ModelsProps> = ({
|
||||
currentData={openAccessControlModal.currentData}
|
||||
action={openAccessControlModal.action}
|
||||
></AccessControlModal>
|
||||
{GenericProxyModal}
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user