Skip to content

Commit

Permalink
Modify enum names
Browse files Browse the repository at this point in the history
  • Loading branch information
ongdisheng committed Jan 11, 2025
1 parent 226eee2 commit 342b8c4
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
6 changes: 3 additions & 3 deletions wren-ui/src/apollo/server/types/sslMode.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export enum SSLMode {
DISABLE = 'Disable',
REQUIRE = 'Require',
VERIFY_CA = 'Verify CA',
DISABLED = 'disabled',
ENABLED = 'enabled',
VERIFY_CA = 'verify_ca',
}
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ const UploadSSL = (props) => {
export default function MySQLProperties(props: Props) {
const { mode } = props;
const isEditMode = mode === FORM_MODE.EDIT;
const [sslMode, setSSLMode] = useState<string>(SSL_MODE.DISABLE);
const [sslMode, setSSLMode] = useState<string>(SSL_MODE.DISABLED);
const onSSLModeChange = (value: string) => setSSLMode(value)
return (
<>
Expand Down Expand Up @@ -146,15 +146,15 @@ export default function MySQLProperties(props: Props) {
>
<Input placeholder="MySQL database name" disabled={isEditMode} />
</Form.Item>
<Form.Item label="SSL mode" name="sslMode" initialValue={SSL_MODE.DISABLE}>
<Form.Item label="SSL mode" name="sslMode" initialValue={SSL_MODE.DISABLED}>
<Select
style={{ width: 120 }}
onChange={onSSLModeChange}
disabled={isEditMode}
options={[
{ value: SSL_MODE.DISABLE },
{ value: SSL_MODE.REQUIRE },
{ value: SSL_MODE.VERIFY_CA },
{ value: SSL_MODE.DISABLED, label: 'Disabled' },
{ value: SSL_MODE.ENABLED, label: 'Enabled' },
{ value: SSL_MODE.VERIFY_CA, label: 'Verify CA' },
]}
/>
</Form.Item>
Expand Down
6 changes: 3 additions & 3 deletions wren-ui/src/utils/enum/sslMode.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export enum SSL_MODE {
DISABLE = 'Disable',
REQUIRE = 'Require',
VERIFY_CA = 'Verify CA',
DISABLED = 'disabled',
ENABLED = 'enabled',
VERIFY_CA = 'verify_ca',
}

0 comments on commit 342b8c4

Please sign in to comment.