Browse Source

DEC-20200 fix: 【迭代】【驱动管理】新建数据连接,选择自定义驱动,保存后显示默认驱动

feature/10.0
dailer 3 years ago
parent
commit
fa2a113f09
  1. 3
      src/modules/pages/connection/connection_jdbc/connection_jdbc.ts
  2. 1
      src/modules/pages/maintain/forms/components/form.jdbc.ts

3
src/modules/pages/connection/connection_jdbc/connection_jdbc.ts

@ -23,6 +23,7 @@ export class ConnectionJdbc extends BI.Widget {
const connectionData = this.model.connectionSelectedOne.connectionData as ConnectionJDBC;
const {
driver,
driverSource,
database,
user,
originalCharsetName,
@ -45,7 +46,7 @@ export class ConnectionJdbc extends BI.Widget {
{
type: FormItem.xtype,
name: BI.i18nText('Dec-Dcm_Connection_Form_Driver'),
value: driver,
value: BI.isKey(driverSource) ? `${driver} (${driverSource})` : driver,
},
{
type: FormItem.xtype,

1
src/modules/pages/maintain/forms/components/form.jdbc.ts

@ -148,6 +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);
// DEC-2020
const url = (connectionType.urls && connectionType.urls[value.driver]) || connectionType.url;
this.form.url.setValue(url);
const urlInfo = resolveUrlInfo(url, connectionData.database);

Loading…
Cancel
Save