Browse Source

fix(nc-gui): review changes

pull/9265/head
Ramesh Mane 3 months ago
parent
commit
e0c2bdf5d2
  1. 3
      packages/nc-gui/components/dashboard/settings/data-sources/CreateBase.vue
  2. 4
      packages/nc-gui/components/dashboard/settings/data-sources/EditBase.vue

3
packages/nc-gui/components/dashboard/settings/data-sources/CreateBase.vue

@ -360,7 +360,6 @@ const changeIntegration = (triggerTestConnection = false) => {
formState.value.dataSource = { formState.value.dataSource = {
client: selectedIntegration.value.sub_type, client: selectedIntegration.value.sub_type,
connection: { connection: {
client: selectedIntegration.value.sub_type,
database: selectedIntegrationDb.value, database: selectedIntegrationDb.value,
}, },
searchPath: selectedIntegration.value.config?.searchPath, searchPath: selectedIntegration.value.config?.searchPath,
@ -426,7 +425,7 @@ const isIntgrationDisabled = (integration: IntegrationType = {}) => {
case ClientType.SQLITE: case ClientType.SQLITE:
return { return {
isDisabled: integration?.source_count && integration.source_count > 0, isDisabled: integration?.source_count && integration.source_count > 0,
msg: 'Sqlite support only 1 database per integration', msg: 'Sqlite support only 1 database per connection',
} }
default: default:

4
packages/nc-gui/components/dashboard/settings/data-sources/EditBase.vue

@ -294,11 +294,9 @@ onMounted(async () => {
.filter(([key]) => !definedParameters.includes(key)) .filter(([key]) => !definedParameters.includes(key))
.map(([key, value]) => ({ key: key as string, value: value as string })) .map(([key, value]) => ({ key: key as string, value: value as string }))
const client = activeBase.config?.client || activeBase.config?.connection?.client
formState.value = { formState.value = {
title: activeBase.alias || '', title: activeBase.alias || '',
dataSource: { client, connection: {}, ...(activeBase.config || {}), searchPath: activeBase.config?.searchPath || [] }, dataSource: { connection: {}, ...(activeBase.config || {}), searchPath: activeBase.config?.searchPath || [] },
inflection: { inflection: {
inflectionColumn: activeBase.inflection_column, inflectionColumn: activeBase.inflection_column,
inflectionTable: activeBase.inflection_table, inflectionTable: activeBase.inflection_table,

Loading…
Cancel
Save