fix: add pool not work
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user