-
Notifications
You must be signed in to change notification settings - Fork 211
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(wren-ui): Support Snowflake data source UI (#911)
- Loading branch information
1 parent
61faf74
commit 8f61841
Showing
12 changed files
with
188 additions
and
3 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,6 +11,7 @@ export const typeDefs = gql` | |
MSSQL | ||
CLICK_HOUSE | ||
TRINO | ||
SNOWFLAKE | ||
} | ||
enum ExpressionName { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
96 changes: 96 additions & 0 deletions
96
wren-ui/src/components/pages/setup/dataSources/SnowflakeProperties.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,96 @@ | ||
import { Form, Input } from 'antd'; | ||
import { ERROR_TEXTS } from '@/utils/error'; | ||
import { FORM_MODE } from '@/utils/enum'; | ||
|
||
interface Props { | ||
mode?: FORM_MODE; | ||
} | ||
|
||
export default function SnowflakeProperties(props: Props) { | ||
const { mode } = props; | ||
const isEditMode = mode === FORM_MODE.EDIT; | ||
return ( | ||
<> | ||
<Form.Item | ||
label="Display name" | ||
name="displayName" | ||
required | ||
rules={[ | ||
{ | ||
required: true, | ||
message: ERROR_TEXTS.CONNECTION.DISPLAY_NAME.REQUIRED, | ||
}, | ||
]} | ||
> | ||
<Input /> | ||
</Form.Item> | ||
<Form.Item | ||
label="Username" | ||
name="user" | ||
rules={[ | ||
{ | ||
required: true, | ||
message: ERROR_TEXTS.CONNECTION.USERNAME.REQUIRED, | ||
}, | ||
]} | ||
> | ||
<Input /> | ||
</Form.Item> | ||
<Form.Item | ||
label="Password" | ||
name="password" | ||
required | ||
rules={[ | ||
{ | ||
required: true, | ||
message: ERROR_TEXTS.CONNECTION.PASSWORD.REQUIRED, | ||
}, | ||
]} | ||
> | ||
<Input.Password placeholder="input password" /> | ||
</Form.Item> | ||
<Form.Item | ||
label="Account" | ||
name="account" | ||
required | ||
rules={[ | ||
{ | ||
required: true, | ||
message: ERROR_TEXTS.CONNECTION.ACCOUNT.REQUIRED, | ||
}, | ||
]} | ||
> | ||
<Input | ||
placeholder="<snowflake_org_id>-<snowflake_user_id>" | ||
disabled={isEditMode} | ||
/> | ||
</Form.Item> | ||
<Form.Item | ||
label="Database name" | ||
name="database" | ||
required | ||
rules={[ | ||
{ | ||
required: true, | ||
message: ERROR_TEXTS.CONNECTION.DATABASE.REQUIRED, | ||
}, | ||
]} | ||
> | ||
<Input placeholder="Snowflake database name" disabled={isEditMode} /> | ||
</Form.Item> | ||
<Form.Item | ||
label="Schema" | ||
name="schema" | ||
required | ||
rules={[ | ||
{ | ||
required: true, | ||
message: ERROR_TEXTS.CONNECTION.SCHEMA.REQUIRED, | ||
}, | ||
]} | ||
> | ||
<Input /> | ||
</Form.Item> | ||
</> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters