|
|
|
@ -2,7 +2,7 @@
|
|
|
|
|
import type { SourceType } from 'nocodb-sdk' |
|
|
|
|
import { Form, message } from 'ant-design-vue' |
|
|
|
|
import type { SelectHandler } from 'ant-design-vue/es/vc-select/Select' |
|
|
|
|
import type { DefaultConnection, ProjectCreateForm, SQLiteConnection } from '#imports' |
|
|
|
|
import type { DefaultConnection, ProjectCreateForm, SQLiteConnection, SnowflakeConnection } from '#imports' |
|
|
|
|
import { |
|
|
|
|
CertTypes, |
|
|
|
|
ClientType, |
|
|
|
@ -387,6 +387,56 @@ onMounted(async () => {
|
|
|
|
|
<a-input v-model:value="(formState.dataSource.connection as SQLiteConnection).connection.filename" /> |
|
|
|
|
</a-form-item> |
|
|
|
|
|
|
|
|
|
<template v-else-if="formState.dataSource.client === ClientType.SNOWFLAKE"> |
|
|
|
|
<!-- Account --> |
|
|
|
|
<a-form-item :label="$t('labels.account')" v-bind="validateInfos['dataSource.connection.account']"> |
|
|
|
|
<a-input |
|
|
|
|
v-model:value="(formState.dataSource.connection as SnowflakeConnection).account" |
|
|
|
|
class="nc-extdb-host-address" |
|
|
|
|
/> |
|
|
|
|
</a-form-item> |
|
|
|
|
|
|
|
|
|
<!-- Username --> |
|
|
|
|
<a-form-item :label="$t('labels.username')" v-bind="validateInfos['dataSource.connection.username']"> |
|
|
|
|
<a-input |
|
|
|
|
v-model:value="(formState.dataSource.connection as SnowflakeConnection).username" |
|
|
|
|
class="nc-extdb-host-user" |
|
|
|
|
/> |
|
|
|
|
</a-form-item> |
|
|
|
|
|
|
|
|
|
<!-- Password --> |
|
|
|
|
<a-form-item :label="$t('labels.password')" v-bind="validateInfos['dataSource.connection.password']"> |
|
|
|
|
<a-input-password |
|
|
|
|
v-model:value="(formState.dataSource.connection as SnowflakeConnection).password" |
|
|
|
|
class="nc-extdb-host-password" |
|
|
|
|
/> |
|
|
|
|
</a-form-item> |
|
|
|
|
|
|
|
|
|
<!-- Warehouse --> |
|
|
|
|
<a-form-item label="Warehouse" v-bind="validateInfos['dataSource.connection.warehouse']"> |
|
|
|
|
<a-input |
|
|
|
|
v-model:value="(formState.dataSource.connection as SnowflakeConnection).warehouse" |
|
|
|
|
class="nc-extdb-host-database" |
|
|
|
|
/> |
|
|
|
|
</a-form-item> |
|
|
|
|
|
|
|
|
|
<!-- Database --> |
|
|
|
|
<a-form-item :label="$t('labels.database')" v-bind="validateInfos['dataSource.connection.database']"> |
|
|
|
|
<a-input |
|
|
|
|
v-model:value="(formState.dataSource.connection as SnowflakeConnection).database" |
|
|
|
|
class="nc-extdb-host-database" |
|
|
|
|
/> |
|
|
|
|
</a-form-item> |
|
|
|
|
|
|
|
|
|
<!-- Schema --> |
|
|
|
|
<a-form-item label="Schema" v-bind="validateInfos['dataSource.connection.schema']"> |
|
|
|
|
<a-input |
|
|
|
|
v-model:value="(formState.dataSource.connection as SnowflakeConnection).schema" |
|
|
|
|
class="nc-extdb-host-database" |
|
|
|
|
/> |
|
|
|
|
</a-form-item> |
|
|
|
|
</template> |
|
|
|
|
|
|
|
|
|
<template v-else> |
|
|
|
|
<!-- Host Address --> |
|
|
|
|
<a-form-item :label="$t('labels.hostAddress')" v-bind="validateInfos['dataSource.connection.host']"> |
|
|
|
|