fix: re-request catalog specs after changing cluster

This commit is contained in:
jialin
2025-11-18 11:28:37 +08:00
parent e22b5ed516
commit 78c8b60121
18 changed files with 535 additions and 79 deletions
+4 -1
View File
@@ -69,12 +69,13 @@ interface DataFormProps {
sourceDisable?: boolean;
sourceList?: Global.BaseOption<string>[];
clusterList: Global.BaseOption<number>[];
fields?: string[];
fields?: string[]; // control some fields to show in the form
clearCacheFormValues?: () => void;
onValuesChange?: (changedValues: any, allValues: any) => void;
onSourceChange?: (value: string) => void;
onOk: (values: FormData) => void;
onBackendChange?: (value: string) => void;
onClusterChange?: (value: number) => void;
}
const TABKeysMap = {
@@ -99,6 +100,7 @@ const DataForm: React.FC<DataFormProps> = forwardRef((props, ref) => {
onBackendChange,
onSourceChange,
onValuesChange,
onClusterChange,
onOk
} = props;
const {
@@ -259,6 +261,7 @@ const DataForm: React.FC<DataFormProps> = forwardRef((props, ref) => {
};
const handleClusterChange = async (value: number) => {
await onClusterChange?.(value);
getGPUOptionList({ clusterId: value });
getBackendOptions({ cluster_id: value });
if (scheduleType === ScheduleValueMap.Manual) {