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