diff --git a/src/pages/cluster-management/clusters.tsx b/src/pages/cluster-management/clusters.tsx index c3fd638e..765364d8 100644 --- a/src/pages/cluster-management/clusters.tsx +++ b/src/pages/cluster-management/clusters.tsx @@ -325,7 +325,7 @@ const Clusters: React.FC = () => { providerHint?: string; presetClusterType?: 'model' | 'gpu'; }>({ - providerHint: '', + providerHint: undefined, presetClusterType: undefined }); @@ -343,7 +343,7 @@ const Clusters: React.FC = () => { const handleClusterModalClose = () => { setPendingProviderHint({ - providerHint: '', + providerHint: undefined, presetClusterType: undefined }); closeClusterModal(); diff --git a/src/pages/gpu-service/storage-types/forms/nfs.tsx b/src/pages/gpu-service/storage-types/forms/nfs.tsx index 04d80e5f..cc8127bc 100644 --- a/src/pages/gpu-service/storage-types/forms/nfs.tsx +++ b/src/pages/gpu-service/storage-types/forms/nfs.tsx @@ -7,6 +7,7 @@ import { FormData } from '../config/types'; const NFSForm = ({ action }: { action: string }) => { const intl = useIntl(); const { getRuleMessage } = useAppUtils(); + const disabled = action === PageAction.EDIT; return ( <> @@ -24,6 +25,7 @@ const NFSForm = ({ action }: { action: string }) => { > { > { name={['spec', 'nfs', 'subDirectory']}> { name={['spec', 'nfs', 'mountPermissions']}> { name={['spec', 'nfs', 'mountOptions']}> { const intl = useIntl(); const form = Form.useFormInstance(); const { getRuleMessage } = useAppUtils(); + const disabled = action === PageAction.EDIT; const handleEndpointBlur = (e: any) => { const value: string = e.target.value; @@ -51,6 +52,7 @@ const S3Form = ({ action }: { action: string }) => { > {
name={['spec', 's3', 'region']}> { > @@ -111,6 +115,7 @@ const S3Form = ({ action }: { action: string }) => { name={['spec', 's3', 'accessKey']}> { name={['spec', 's3', 'secretKey']}> { style={{ marginBottom: 12 }} > { name={['spec', 's3', 'mountOptions']}>