chore: adjust deployment modal form
This commit is contained in:
@@ -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' })}
|
||||
|
||||
Reference in New Issue
Block a user