|
|
@ -98,13 +98,12 @@ export class FormJdbc extends BI.Widget { |
|
|
|
const value = this.form.driver.getValue(); |
|
|
|
const value = this.form.driver.getValue(); |
|
|
|
const connectionData = this.options.formData.connectionData as ConnectionJDBC; |
|
|
|
const connectionData = this.options.formData.connectionData as ConnectionJDBC; |
|
|
|
const connectionType = getJdbcDatabaseType(connectionData.database, connectionData.driver); |
|
|
|
const connectionType = getJdbcDatabaseType(connectionData.database, connectionData.driver); |
|
|
|
if (connectionType.urls) { |
|
|
|
const url = connectionType.urls ? connectionType.urls[value] : connectionType.url; |
|
|
|
this.form.url.setValue(connectionType.urls[value]); |
|
|
|
this.form.url.setValue(url); |
|
|
|
const urlInfo = resolveUrlInfo(connectionType.urls[value]); |
|
|
|
const urlInfo = resolveUrlInfo(url); |
|
|
|
this.form.host.setValue(urlInfo.host); |
|
|
|
this.form.host.setValue(urlInfo.host); |
|
|
|
this.form.database.setValue(urlInfo.databaseName); |
|
|
|
this.form.database.setValue(urlInfo.databaseName); |
|
|
|
this.form.port.setValue(urlInfo.port); |
|
|
|
this.form.port.setValue(urlInfo.port); |
|
|
|
} |
|
|
|
|
|
|
|
}, |
|
|
|
}, |
|
|
|
}], |
|
|
|
}], |
|
|
|
}], |
|
|
|
}], |
|
|
@ -375,6 +374,7 @@ export class FormJdbc extends BI.Widget { |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
{ |
|
|
|
type: CollapseXtype, |
|
|
|
type: CollapseXtype, |
|
|
|
|
|
|
|
bgap: -15, |
|
|
|
width: 70, |
|
|
|
width: 70, |
|
|
|
name: BI.i18nText('Dec-Dcm_Connection_Form_Database_Advanced_Setting'), |
|
|
|
name: BI.i18nText('Dec-Dcm_Connection_Form_Database_Advanced_Setting'), |
|
|
|
listeners: [ |
|
|
|
listeners: [ |
|
|
@ -397,6 +397,7 @@ export class FormJdbc extends BI.Widget { |
|
|
|
items: [ |
|
|
|
items: [ |
|
|
|
{ |
|
|
|
{ |
|
|
|
type: FormItemXtype, |
|
|
|
type: FormItemXtype, |
|
|
|
|
|
|
|
tgap: 15, |
|
|
|
name: BI.i18nText('Dec-Dcm_Connection_Form_Database_Initial_Size'), |
|
|
|
name: BI.i18nText('Dec-Dcm_Connection_Form_Database_Initial_Size'), |
|
|
|
forms: [{ |
|
|
|
forms: [{ |
|
|
|
type: TextCheckerXtype, |
|
|
|
type: TextCheckerXtype, |
|
|
@ -692,11 +693,13 @@ export class FormJdbc extends BI.Widget { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private onHostPortChange(databaseType) { |
|
|
|
private onHostPortChange(databaseType) { |
|
|
|
const { url = '' } = databaseType; |
|
|
|
const { urls, url } = databaseType; |
|
|
|
|
|
|
|
const driver = this.form.driver.getValue(); |
|
|
|
|
|
|
|
const selectUrl = BI.get(urls, driver) || url; |
|
|
|
const host = this.form.host.getValue(); |
|
|
|
const host = this.form.host.getValue(); |
|
|
|
const port = this.form.port.getValue(); |
|
|
|
const port = this.form.port.getValue(); |
|
|
|
const database = this.form.database.getValue(); |
|
|
|
const database = this.form.database.getValue(); |
|
|
|
this.form.url.setValue(splitUrl(host, port, database, url)); |
|
|
|
this.form.url.setValue(splitUrl(host, port, database, selectUrl)); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public setSchemas(schemas: string[]) { |
|
|
|
public setSchemas(schemas: string[]) { |
|
|
|