Skip to content

Commit a7ded75

Browse files
committed
Removed extra SSL mode enum file
1 parent 8d1db64 commit a7ded75

File tree

3 files changed

+8
-13
lines changed

3 files changed

+8
-13
lines changed

β€Žwren-ui/src/components/pages/setup/dataSources/MySQLProperties.tsx

+8-7
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@ import { Form, Input, Select, Button, Upload } from 'antd';
33
import UploadOutlined from '@ant-design/icons/UploadOutlined';
44
import { UploadFile } from 'antd/lib/upload/interface';
55
import { ERROR_TEXTS } from '@/utils/error';
6-
import { FORM_MODE, SSL_MODE } from '@/utils/enum';
6+
import { FORM_MODE } from '@/utils/enum';
77
import { hostValidator } from '@/utils/validator';
8+
import { SSLMode } from '@/apollo/server/types';
89

910
interface Props {
1011
mode?: FORM_MODE;
@@ -65,7 +66,7 @@ const UploadSSL = (props) => {
6566
export default function MySQLProperties(props: Props) {
6667
const { mode } = props;
6768
const isEditMode = mode === FORM_MODE.EDIT;
68-
const [sslMode, setSSLMode] = useState<string>(SSL_MODE.DISABLED);
69+
const [sslMode, setSSLMode] = useState<string>(SSLMode.DISABLED);
6970
const onSSLModeChange = (value: string) => setSSLMode(value)
7071
return (
7172
<>
@@ -146,20 +147,20 @@ export default function MySQLProperties(props: Props) {
146147
>
147148
<Input placeholder="MySQL database name" disabled={isEditMode} />
148149
</Form.Item>
149-
<Form.Item label="SSL mode" name="sslMode" initialValue={SSL_MODE.DISABLED}>
150+
<Form.Item label="SSL mode" name="sslMode" initialValue={SSLMode.DISABLED}>
150151
<Select
151152
style={{ width: 120 }}
152153
onChange={onSSLModeChange}
153154
disabled={isEditMode}
154155
options={[
155-
{ value: SSL_MODE.DISABLED, label: 'Disabled' },
156-
{ value: SSL_MODE.ENABLED, label: 'Enabled' },
157-
{ value: SSL_MODE.VERIFY_CA, label: 'Verify CA' },
156+
{ value: SSLMode.DISABLED, label: 'Disabled' },
157+
{ value: SSLMode.ENABLED, label: 'Enabled' },
158+
{ value: SSLMode.VERIFY_CA, label: 'Verify CA' },
158159
]}
159160
/>
160161
</Form.Item>
161162
{
162-
sslMode === SSL_MODE.VERIFY_CA &&
163+
sslMode === SSLMode.VERIFY_CA &&
163164
<Form.Item
164165
label="SSL CA file"
165166
name="sslCA"

β€Žwren-ui/src/utils/enum/index.ts

-1
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,3 @@ export * from './path';
77
export * from './diagram';
88
export * from './home';
99
export * from './settings';
10-
export * from './sslMode';

β€Žwren-ui/src/utils/enum/sslMode.ts

-5
This file was deleted.

0 commit comments

Comments
Β (0)