diff --git a/src/modules/pages/maintain/components/driverselector/driverselector.ts b/src/modules/pages/maintain/components/driverselector/driverselector.ts index d59f956..c155878 100644 --- a/src/modules/pages/maintain/components/driverselector/driverselector.ts +++ b/src/modules/pages/maintain/components/driverselector/driverselector.ts @@ -101,7 +101,10 @@ export class DriverSelector extends BI.Widget { listeners: [ { eventName: BI.EditorIconCheckCombo.EVENT_CHANGE, - action: () => this.store.changeDefaultDriver(this.defaultDrivers.getValue()), + action: () => { + this.store.changeDefaultDriver(this.defaultDrivers.getValue()); + this.fireEvent('EVENT_CHANGE'); + }, }, ], }, @@ -124,7 +127,10 @@ export class DriverSelector extends BI.Widget { listeners: [ { eventName: BI.SearchTextValueCombo.EVENT_CHANGE, - action: () => this.store.changeCustomDriver(this.customDrivers.getValue()[0]), + action: () => { + this.store.changeCustomDriver(this.customDrivers.getValue()[0]); + this.fireEvent('EVENT_CHANGE'); + }, }, ], }, diff --git a/src/modules/pages/maintain/forms/components/form.jdbc.ts b/src/modules/pages/maintain/forms/components/form.jdbc.ts index baf83ff..c73ff73 100644 --- a/src/modules/pages/maintain/forms/components/form.jdbc.ts +++ b/src/modules/pages/maintain/forms/components/form.jdbc.ts @@ -148,7 +148,7 @@ export class FormJdbc extends BI.Widget { const value = this.form.driver.getValue(); const connectionData = this.options.formData.connectionData as ConnectionJDBC; const connectionType = getJdbcDatabaseType(connectionData.database, connectionData.driver); - const url = connectionType.urls ? connectionType.urls[value] : connectionType.url; + const url = connectionType.urls ? connectionType.urls[value.driver] : connectionType.url; this.form.url.setValue(url); const urlInfo = resolveUrlInfo(url, connectionData.database); this.form.host.setValue(urlInfo.host); @@ -806,7 +806,7 @@ export class FormJdbc extends BI.Widget { private onHostPortChange(databaseType) { const { urls, url } = databaseType; const driver = this.form.driver.getValue(); - const selectUrl = BI.get(urls, driver) || url; + const selectUrl = BI.get(urls, driver.driver) || url; const host = this.form.host.getValue(); const port = this.form.port.getValue(); const database = this.form.database.getValue();