fix: filter modelInstance by cluster in benchmark form

This commit is contained in:
jialin
2026-06-11 14:13:08 +08:00
committed by jialin
parent 12649c7ccf
commit 2ba5118bc2
3 changed files with 41 additions and 27 deletions
+13 -1
View File
@@ -48,6 +48,15 @@ const BasicForm: React.FC = () => {
);
}, [orgScoped, scopedClusterList, clusterList, scopeOrgId]);
const handleOnOrgChange = (value: any) => {
form.setFieldsValue({
model_name: undefined,
model_id: undefined,
model_instance_name: undefined,
model_instance: undefined
});
};
useEffect(() => {
if (action === PageAction.CREATE && orgScoped) {
fetchScopedClusters({ page: -1 });
@@ -108,7 +117,10 @@ const BasicForm: React.FC = () => {
required
></CInput.Input>
</Form.Item>
<PluginExtraFields name="CreateOrgScopeField" context={{ action }} />
<PluginExtraFields
name="CreateOrgScopeField"
context={{ action, onChange: handleOnOrgChange }}
/>
<Form.Item<FormData>
name="cluster_id"
rules={[