chore: adjust deployment modal form

This commit is contained in:
jialin
2025-09-16 11:26:17 +08:00
parent ed49e03802
commit 29b74f85c5
39 changed files with 1574 additions and 786 deletions
@@ -11,7 +11,6 @@ import {
ClusterListItem as ListItem
} from '../config/types';
import CloudProvider from './cloud-provider-form';
import K8SProvider from './k8s-provider-form';
type AddModalProps = {
title: string;
@@ -34,7 +33,7 @@ const AddCluster: React.FC<AddModalProps> = ({
const [form] = Form.useForm();
const intl = useIntl();
const handleSumit = () => {
const handleSubmit = () => {
form.submit();
};
@@ -62,7 +61,7 @@ const AddCluster: React.FC<AddModalProps> = ({
width={600}
styles={{}}
footer={
<ModalFooter onOk={handleSumit} onCancel={onCancel}></ModalFooter>
<ModalFooter onOk={handleSubmit} onCancel={onCancel}></ModalFooter>
}
>
<Form form={form} onFinish={onOk} preserve={false}>
@@ -85,8 +84,9 @@ const AddCluster: React.FC<AddModalProps> = ({
required
></SealInput.Input>
</Form.Item>
{provider === 'digitalocean' && <CloudProvider></CloudProvider>}
{provider === 'kubernetes' && <K8SProvider></K8SProvider>}
{provider === 'digitalocean' && (
<CloudProvider provider={provider}></CloudProvider>
)}
<Form.Item<FormData> name="description" rules={[{ required: false }]}>
<SealInput.TextArea
label={intl.formatMessage({ id: 'common.table.description' })}