chore: generic_prox ux
This commit is contained in:
@@ -58,6 +58,7 @@ 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';
|
||||
@@ -195,6 +196,8 @@ const Models: React.FC<ModelsProps> = ({
|
||||
});
|
||||
const modalRef = useRef<any>(null);
|
||||
|
||||
const { GenericProxyModal, openProxyModal } = useGenericProxy();
|
||||
|
||||
useEffect(() => {
|
||||
if (deleteIds?.length) {
|
||||
rowSelection.removeSelectedKey(deleteIds);
|
||||
@@ -456,6 +459,10 @@ const Models: React.FC<ModelsProps> = ({
|
||||
handleViewAPIInfo(row);
|
||||
}
|
||||
|
||||
if (val === 'proxy') {
|
||||
openProxyModal(row);
|
||||
}
|
||||
|
||||
if (val === 'stop') {
|
||||
modalRef.current?.show({
|
||||
content: 'models.instances',
|
||||
@@ -789,6 +796,7 @@ const Models: React.FC<ModelsProps> = ({
|
||||
currentData={openAccessControlModal.currentData}
|
||||
action={openAccessControlModal.action}
|
||||
></AccessControlModal>
|
||||
{GenericProxyModal}
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user