fix: add pool not work

This commit is contained in:
jialin
2025-09-16 11:26:17 +08:00
parent c467280170
commit f1bb305cbc
18 changed files with 185 additions and 79 deletions
@@ -1,6 +1,8 @@
import { useIntl } from '@umijs/max';
import React from 'react';
import styled from 'styled-components';
import { ProviderType, ProviderValueMap } from '../config';
import AddWorkerCommand from './add-worker-command';
import RegisterClusterInner from './register-cluster-inner';
import SupportedHardware from './support-hardware';
@@ -11,6 +13,7 @@ const Title = styled.div`
`;
type AddModalProps = {
provider: ProviderType;
registrationInfo: {
token: string;
image: string;
@@ -18,12 +21,19 @@ type AddModalProps = {
cluster_id: number;
};
};
const AddWorkerStep: React.FC<AddModalProps> = ({ registrationInfo }) => {
const AddWorkerStep: React.FC<AddModalProps> = ({
provider,
registrationInfo
}) => {
const intl = useIntl();
return (
<div>
<Title>{intl.formatMessage({ id: 'clusters.create.execCommand' })}</Title>
<RegisterClusterInner registrationInfo={registrationInfo} />
{provider === ProviderValueMap.Kubernetes ? (
<RegisterClusterInner registrationInfo={registrationInfo} />
) : (
<AddWorkerCommand registrationInfo={registrationInfo} />
)}
<Title style={{ marginTop: 32 }}>
{intl.formatMessage({ id: 'clusters.create.supportedGpu' })}
</Title>