|
|
|
@ -79,6 +79,8 @@ const validators = computed(() => {
|
|
|
|
|
? { |
|
|
|
|
'dataSource.connection.connection.filename': [fieldRequiredValidator()], |
|
|
|
|
} |
|
|
|
|
: formState.dataSource.client === ClientType.SNOWFLAKE |
|
|
|
|
? {} |
|
|
|
|
: { |
|
|
|
|
'dataSource.connection.host': [fieldRequiredValidator()], |
|
|
|
|
'dataSource.connection.port': [fieldRequiredValidator()], |
|
|
|
@ -385,6 +387,43 @@ onMounted(async () => {
|
|
|
|
|
<a-input v-model:value="formState.dataSource.connection.connection.filename" /> |
|
|
|
|
</a-form-item> |
|
|
|
|
|
|
|
|
|
<template v-else-if="formState.dataSource.client === ClientType.SNOWFLAKE"> |
|
|
|
|
<!-- Account --> |
|
|
|
|
<a-form-item label="Account"> |
|
|
|
|
<a-input v-model:value="formState.dataSource.connection.account" class="nc-extdb-account" /> |
|
|
|
|
</a-form-item> |
|
|
|
|
|
|
|
|
|
<!-- Username --> |
|
|
|
|
<a-form-item :label="$t('labels.username')" v-bind="validateInfos['dataSource.connection.user']"> |
|
|
|
|
<a-input v-model:value="formState.dataSource.connection.username" class="nc-extdb-host-user" /> |
|
|
|
|
</a-form-item> |
|
|
|
|
|
|
|
|
|
<!-- Password --> |
|
|
|
|
<a-form-item :label="$t('labels.password')"> |
|
|
|
|
<a-input-password v-model:value="formState.dataSource.connection.password" class="nc-extdb-host-password" /> |
|
|
|
|
</a-form-item> |
|
|
|
|
|
|
|
|
|
<!-- Warehouse --> |
|
|
|
|
<a-form-item label="Warehouse"> |
|
|
|
|
<a-input v-model:value="formState.dataSource.connection.warehouse" /> |
|
|
|
|
</a-form-item> |
|
|
|
|
|
|
|
|
|
<!-- Database --> |
|
|
|
|
<a-form-item :label="$t('labels.database')" v-bind="validateInfos['dataSource.connection.database']"> |
|
|
|
|
<!-- Database : create if not exists --> |
|
|
|
|
<a-input |
|
|
|
|
v-model:value="formState.dataSource.connection.database" |
|
|
|
|
:placeholder="$t('labels.dbCreateIfNotExists')" |
|
|
|
|
class="nc-extdb-host-database" |
|
|
|
|
/> |
|
|
|
|
</a-form-item> |
|
|
|
|
|
|
|
|
|
<!-- Schema name --> |
|
|
|
|
<a-form-item :label="$t('labels.schemaName')"> |
|
|
|
|
<a-input v-model:value="formState.dataSource.connection.schema" /> |
|
|
|
|
</a-form-item> |
|
|
|
|
</template> |
|
|
|
|
|
|
|
|
|
<template v-else> |
|
|
|
|
<!-- Host Address --> |
|
|
|
|
<a-form-item :label="$t('labels.hostAddress')" v-bind="validateInfos['dataSource.connection.host']"> |
|
|
|
|