chore: model file components for updating

This commit is contained in:
jialin
2025-05-27 19:45:24 +08:00
parent 894dd1e353
commit 034a54bf4b
9 changed files with 54 additions and 205 deletions
@@ -93,6 +93,7 @@ interface ModelsProps {
onViewLogs: () => void;
onCancelViewLogs: () => void;
handleOnToggleExpandAll: () => void;
onStop?: (ids: number[]) => void;
queryParams: {
page: number;
perPage: number;
@@ -132,6 +133,7 @@ const Models: React.FC<ModelsProps> = ({
onCancelViewLogs,
handleCategoryChange,
handleOnToggleExpandAll,
onStop,
modelFileOptions,
deleteIds,
dataSource,
@@ -260,6 +262,7 @@ const Models: React.FC<ModelsProps> = ({
const handleStopModel = async (row: ListItem) => {
await updateModel(getFormattedData(row, { replicas: 0 }));
removeExpandedRowKey([row.id]);
onStop?.([row.id]);
};
const handleModalOk = useCallback(
@@ -576,6 +579,7 @@ const Models: React.FC<ModelsProps> = ({
async onOk() {
await handleBatchRequest(rowSelection.selectedRows, handleStopModel);
rowSelection.clearSelections();
onStop?.(rowSelection.selectedRowKeys as number[]);
}
});
};