diff --git a/src/pages/cluster-management/clusters.tsx b/src/pages/cluster-management/clusters.tsx index 4b6942cd..63c0cc90 100644 --- a/src/pages/cluster-management/clusters.tsx +++ b/src/pages/cluster-management/clusters.tsx @@ -72,6 +72,7 @@ const Credentials: React.FC = () => { const intl = useIntl(); const [registerClusterStatus, setRegisterClusterStatus] = useState<{ open: boolean; + provider: ProviderType; registrationInfo: { token: string; image: string; @@ -80,6 +81,7 @@ const Credentials: React.FC = () => { }; }>({ open: false, + provider: null, registrationInfo: { token: '', image: '', @@ -224,6 +226,7 @@ const Credentials: React.FC = () => { const info = await queryClusterToken({ id: row.id }); setRegisterClusterStatus({ open: true, + provider: row.provider as ProviderType, registrationInfo: { ...info, cluster_id: row.id @@ -410,10 +413,12 @@ const Credentials: React.FC = () => { { setRegisterClusterStatus({ open: false, + provider: null, registrationInfo: { token: '', image: '', diff --git a/src/pages/cluster-management/components/add-worker-step.tsx b/src/pages/cluster-management/components/add-worker-step.tsx index e8fb2d96..79f1c965 100644 --- a/src/pages/cluster-management/components/add-worker-step.tsx +++ b/src/pages/cluster-management/components/add-worker-step.tsx @@ -39,7 +39,6 @@ const Container = styled.div` .command-info { margin-top: 24px; margin-bottom: 8px; - // font-weight: 500; color: var(--ant-color-text-secondary); } `; diff --git a/src/pages/cluster-management/components/register-cluster.tsx b/src/pages/cluster-management/components/register-cluster.tsx index faccc3ed..405047bc 100644 --- a/src/pages/cluster-management/components/register-cluster.tsx +++ b/src/pages/cluster-management/components/register-cluster.tsx @@ -1,10 +1,12 @@ import ScrollerModal from '@/components/scroller-modal/index'; import React from 'react'; -import RegisterClusterInner from './register-cluster-inner'; +import { ProviderType } from '../config'; +import AddWorkerStep from './add-worker-step'; type AddModalProps = { title: string; open: boolean; + provider: ProviderType; registrationInfo: { token: string; image: string; @@ -16,6 +18,7 @@ type AddModalProps = { const AddCluster: React.FC = ({ title, open, + provider, registrationInfo, onCancel }) => { @@ -32,10 +35,10 @@ const AddCluster: React.FC = ({ closeIcon={true} maskClosable={false} keyboard={false} - width={600} + width={860} footer={false} > - + ); };