|
|
|
@ -64,13 +64,13 @@ export class FormJdbc extends BI.Widget {
|
|
|
|
|
this.oldPassword = password; |
|
|
|
|
const { host, port, databaseName } = resolveUrlInfo(url, database); |
|
|
|
|
const { hgap, vgap } = CONNECTION_LAYOUT; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const valueRangeConfig = { |
|
|
|
|
errorText: BI.i18nText('Dec-Dcm_Connection_Value_Out_Range'), |
|
|
|
|
checker: (value: string) => this.checkValueRange(value), |
|
|
|
|
autoFix: true, |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return { |
|
|
|
|
type: BI.VerticalLayout.xtype, |
|
|
|
|
hgap, |
|
|
|
@ -360,7 +360,7 @@ export class FormJdbc extends BI.Widget {
|
|
|
|
|
vgap: 15, |
|
|
|
|
disabled: true, |
|
|
|
|
value: schema, |
|
|
|
|
items: schema ? [{ text: schema, value:schema }] : [], |
|
|
|
|
items: schema ? [{ text: schema, value: schema }] : [], |
|
|
|
|
ref: (_ref: TextValueCombo) => { |
|
|
|
|
this.form.schema = _ref; |
|
|
|
|
}, |
|
|
|
@ -537,7 +537,7 @@ export class FormJdbc extends BI.Widget {
|
|
|
|
|
cls: 'bi-border', |
|
|
|
|
allowBlank: true, |
|
|
|
|
watermark: BI.i18nText('Dec-Dcm_Connection_Form_Place_Input'), |
|
|
|
|
value: validationQuery, |
|
|
|
|
value: api.getPlain(validationQuery || ''), |
|
|
|
|
width: 300, |
|
|
|
|
height: 100, |
|
|
|
|
ref: (_ref: TextAreaEditor) => { |
|
|
|
@ -715,7 +715,7 @@ export class FormJdbc extends BI.Widget {
|
|
|
|
|
...drivers, |
|
|
|
|
]; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return drivers; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -756,12 +756,12 @@ export class FormJdbc extends BI.Widget {
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public getSubmitValue():Connection { |
|
|
|
|
public getSubmitValue(): Connection { |
|
|
|
|
const connectionData = this.options.formData.connectionData as ConnectionJDBC; |
|
|
|
|
const connectionPoolAttr = connectionData.connectionPoolAttr; |
|
|
|
|
const originalCharsetName = this.form.originalCharsetName.getValue()[0] || ''; |
|
|
|
|
// TODO 获取表单数据这里待优化
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return { |
|
|
|
|
connectionType: connectionType.JDBC, |
|
|
|
|
connectionId: this.form.connectionName.getValue(), |
|
|
|
@ -788,7 +788,7 @@ export class FormJdbc extends BI.Widget {
|
|
|
|
|
maxIdle: this.form.maxIdle.getValue(), |
|
|
|
|
minIdle: this.form.minIdle.getValue(), |
|
|
|
|
maxWait: this.form.maxWait.getValue(), |
|
|
|
|
validationQuery: this.form.validationQuery.getValue(), |
|
|
|
|
validationQuery: api.getCipher(this.form.validationQuery.getValue()), |
|
|
|
|
testOnBorrow: BI.size(this.form.testOnBorrow.getValue()) > 0 ? this.form.testOnBorrow.getValue()[0] : connectionPoolAttr.testOnBorrow, |
|
|
|
|
testOnReturn: BI.size(this.form.testOnReturn.getValue()) > 0 ? this.form.testOnReturn.getValue()[0] : connectionPoolAttr.testOnReturn, |
|
|
|
|
testWhileIdle: BI.size(this.form.testWhileIdle.getValue()) > 0 ? this.form.testWhileIdle.getValue()[0] : connectionPoolAttr.testWhileIdle, |
|
|
|
|