|
|
|
@ -98,13 +98,12 @@ 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); |
|
|
|
|
if (connectionType.urls) { |
|
|
|
|
this.form.url.setValue(connectionType.urls[value]); |
|
|
|
|
const urlInfo = resolveUrlInfo(connectionType.urls[value]); |
|
|
|
|
const url = connectionType.urls ? connectionType.urls[value] : connectionType.url; |
|
|
|
|
this.form.url.setValue(url); |
|
|
|
|
const urlInfo = resolveUrlInfo(url); |
|
|
|
|
this.form.host.setValue(urlInfo.host); |
|
|
|
|
this.form.database.setValue(urlInfo.databaseName); |
|
|
|
|
this.form.port.setValue(urlInfo.port); |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
}], |
|
|
|
|
}], |
|
|
|
@ -692,11 +691,13 @@ export class FormJdbc extends BI.Widget {
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
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 port = this.form.port.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[]) { |
|
|
|
|