fix: cpu init value failed

This commit is contained in:
jialin
2026-06-05 23:08:45 +08:00
committed by Lawrence Li
parent d8f6064d5e
commit ce6388253c
3 changed files with 14 additions and 10 deletions
@@ -122,7 +122,7 @@ const GPUServiceInstanceForm: React.FC<InstanceFormProps> = forwardRef(
const formAction =
realAction === PageAction.CREATE ? PageAction.CREATE : action;
const sshEnabled = Form.useWatch('enable_ssh', form);
const description = Form.useWatch(['spec', 'description'], form);
const description = Form.useWatch(['description'], form);
// `organization_id` is owned by the create-scope picker slot; it only
// exists/changes when a platform admin retargets the form. Watch it
// so the parent can re-scope offerings (see onScopeChange).
@@ -151,6 +151,7 @@ const GPUServiceInstanceForm: React.FC<InstanceFormProps> = forwardRef(
const isGPUType = useMemo(() => {
const spec = parseJsonSafe(description || '{}', {} as any)?.spec;
console.log('derived spec from description', spec);
return spec?.acceleratable;
}, [description]);