|
|
|
@ -54,7 +54,6 @@ export class FormJdbc extends BI.Widget {
|
|
|
|
|
url: null, |
|
|
|
|
initialSize: null, |
|
|
|
|
maxActive: null, |
|
|
|
|
maxIdle: null, |
|
|
|
|
maxWait: null, |
|
|
|
|
validationQuery: null, |
|
|
|
|
testOnBorrow: null, |
|
|
|
@ -87,7 +86,6 @@ export class FormJdbc extends BI.Widget {
|
|
|
|
|
const { |
|
|
|
|
initialSize, |
|
|
|
|
maxActive, |
|
|
|
|
maxIdle, |
|
|
|
|
maxWait, |
|
|
|
|
validationQuery, |
|
|
|
|
testOnBorrow, |
|
|
|
@ -437,11 +435,92 @@ export class FormJdbc extends BI.Widget {
|
|
|
|
|
}], |
|
|
|
|
}], |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
type: FormItem.xtype, |
|
|
|
|
name: BI.i18nText('Dec-Dcm_Connection_Form_Database_Max_Active'), |
|
|
|
|
forms: [{ |
|
|
|
|
type: TextChecker.xtype, |
|
|
|
|
$value: 'max-active', |
|
|
|
|
width: 300, |
|
|
|
|
allowBlank: false, |
|
|
|
|
value: maxActive, |
|
|
|
|
watermark: BI.i18nText('Dec-Dcm_Connection_Form_Database_Max_Active'), |
|
|
|
|
validationChecker: [{ |
|
|
|
|
errorText: BI.i18nText('Dec-Dcm_Connection_Check_Integer'), |
|
|
|
|
checker: (value: string) => this.checkInteger(value), |
|
|
|
|
autoFix: true, |
|
|
|
|
}, valueRangeConfig], |
|
|
|
|
ref: (_ref: TextChecker) => { |
|
|
|
|
this.form.maxActive = _ref; |
|
|
|
|
}, |
|
|
|
|
}], |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
type: FormItem.xtype, |
|
|
|
|
name: BI.i18nText('Dec-Dcm_Connection_Form_Database_Test_On_Borrow'), |
|
|
|
|
forms: [{ |
|
|
|
|
type: BI.TextValueCombo.xtype, |
|
|
|
|
$value: 'check', |
|
|
|
|
width: 300, |
|
|
|
|
allowBlank: true, |
|
|
|
|
value: testOnBorrow, |
|
|
|
|
items: this.getBooleanItem(), |
|
|
|
|
watermark: BI.i18nText('Dec-Dcm_Connection_Form_Database_Test_On_Borrow'), |
|
|
|
|
ref: (_ref: TextValueCombo) => { |
|
|
|
|
this.form.testOnBorrow = _ref; |
|
|
|
|
}, |
|
|
|
|
}], |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
type: FormItem.xtype, |
|
|
|
|
name: BI.i18nText('Dec-Dcm_Connection_Form_SQL_Validation_Query'), |
|
|
|
|
forms: [{ |
|
|
|
|
type: BI.TextAreaEditor.xtype, |
|
|
|
|
$value: 'validation-query', |
|
|
|
|
cls: 'bi-border', |
|
|
|
|
allowBlank: true, |
|
|
|
|
watermark: BI.i18nText('Dec-Dcm_Connection_Form_SQL_Validation_Query_Watermark'), |
|
|
|
|
value: api.getPlain(validationQuery || ''), |
|
|
|
|
width: 300, |
|
|
|
|
height: 100, |
|
|
|
|
ref: (_ref: TextAreaEditor) => { |
|
|
|
|
this.form.validationQuery = _ref; |
|
|
|
|
}, |
|
|
|
|
}], |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
type: FormItem.xtype, |
|
|
|
|
name: BI.i18nText('Dec-Dcm_Connection_Form_Database_Max_Wait'), |
|
|
|
|
forms: [ |
|
|
|
|
{ |
|
|
|
|
type: TextChecker.xtype, |
|
|
|
|
$value: 'max-wait', |
|
|
|
|
width: 300, |
|
|
|
|
allowBlank: false, |
|
|
|
|
value: maxWait, |
|
|
|
|
watermark: BI.i18nText('Dec-Dcm_Connection_Form_Database_Max_Wait'), |
|
|
|
|
validationChecker: [{ |
|
|
|
|
errorText: BI.i18nText('Dec-Dcm_Connection_Check_Integer'), |
|
|
|
|
checker: (value: string) => this.checkInteger(value), |
|
|
|
|
autoFix: true, |
|
|
|
|
}, valueRangeConfig], |
|
|
|
|
ref: (_ref: TextChecker) => { |
|
|
|
|
this.form.maxWait = _ref; |
|
|
|
|
}, |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
type: BI.Label.xtype, |
|
|
|
|
lgap: 5, |
|
|
|
|
height: CONNECTION_LAYOUT.labelHeight, |
|
|
|
|
text: BI.i18nText('Dec-Dcm_Millisecond'), |
|
|
|
|
}, |
|
|
|
|
], |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
type: Collapse.xtype, |
|
|
|
|
bgap: -15, |
|
|
|
|
width: 70, |
|
|
|
|
name: BI.i18nText('Dec-Dcm_Connection_Form_Database_Advanced_Setting'), |
|
|
|
|
name: BI.i18nText('Dec-Dcm_Connection_Form_Database_More_Setting'), |
|
|
|
|
listeners: [ |
|
|
|
|
{ |
|
|
|
|
eventName: EVENT_CHANGE, |
|
|
|
@ -481,46 +560,6 @@ export class FormJdbc extends BI.Widget {
|
|
|
|
|
}, |
|
|
|
|
}], |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
type: FormItem.xtype, |
|
|
|
|
name: BI.i18nText('Dec-Dcm_Connection_Form_Database_Max_Active'), |
|
|
|
|
forms: [{ |
|
|
|
|
type: TextChecker.xtype, |
|
|
|
|
$value: 'max-active', |
|
|
|
|
width: 300, |
|
|
|
|
allowBlank: false, |
|
|
|
|
value: maxActive, |
|
|
|
|
watermark: BI.i18nText('Dec-Dcm_Connection_Form_Database_Max_Active'), |
|
|
|
|
validationChecker: [{ |
|
|
|
|
errorText: BI.i18nText('Dec-Dcm_Connection_Check_Integer'), |
|
|
|
|
checker: (value: string) => this.checkInteger(value), |
|
|
|
|
autoFix: true, |
|
|
|
|
}, valueRangeConfig], |
|
|
|
|
ref: (_ref: TextChecker) => { |
|
|
|
|
this.form.maxActive = _ref; |
|
|
|
|
}, |
|
|
|
|
}], |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
type: FormItem.xtype, |
|
|
|
|
name: BI.i18nText('Dec-Dcm_Connection_Form_Database_Max_Idle'), |
|
|
|
|
forms: [{ |
|
|
|
|
type: TextChecker.xtype, |
|
|
|
|
$value: 'max-idle', |
|
|
|
|
width: 300, |
|
|
|
|
allowBlank: false, |
|
|
|
|
value: maxIdle, |
|
|
|
|
watermark: BI.i18nText('Dec-Dcm_Connection_Form_Database_Max_Idle'), |
|
|
|
|
validationChecker: [{ |
|
|
|
|
errorText: BI.i18nText('Dec-Dcm_Connection_Check_Integer'), |
|
|
|
|
checker: (value: string) => this.checkInteger(value), |
|
|
|
|
autoFix: true, |
|
|
|
|
}, valueRangeConfig], |
|
|
|
|
ref: (_ref: TextChecker) => { |
|
|
|
|
this.form.maxIdle = _ref; |
|
|
|
|
}, |
|
|
|
|
}], |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
type: FormItem.xtype, |
|
|
|
|
name: BI.i18nText('Dec-Dcm_Connection_Form_Database_Min_Idle'), |
|
|
|
@ -541,67 +580,6 @@ export class FormJdbc extends BI.Widget {
|
|
|
|
|
}, |
|
|
|
|
}], |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
type: FormItem.xtype, |
|
|
|
|
name: BI.i18nText('Dec-Dcm_Connection_Form_Database_Max_Wait'), |
|
|
|
|
forms: [ |
|
|
|
|
{ |
|
|
|
|
type: TextChecker.xtype, |
|
|
|
|
$value: 'max-wait', |
|
|
|
|
width: 300, |
|
|
|
|
allowBlank: false, |
|
|
|
|
value: maxWait, |
|
|
|
|
watermark: BI.i18nText('Dec-Dcm_Connection_Form_Database_Max_Wait'), |
|
|
|
|
validationChecker: [{ |
|
|
|
|
errorText: BI.i18nText('Dec-Dcm_Connection_Check_Integer'), |
|
|
|
|
checker: (value: string) => this.checkInteger(value), |
|
|
|
|
autoFix: true, |
|
|
|
|
}, valueRangeConfig], |
|
|
|
|
ref: (_ref: TextChecker) => { |
|
|
|
|
this.form.maxWait = _ref; |
|
|
|
|
}, |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
type: BI.Label.xtype, |
|
|
|
|
lgap: 5, |
|
|
|
|
height: CONNECTION_LAYOUT.labelHeight, |
|
|
|
|
text: BI.i18nText('Dec-Dcm_Millisecond'), |
|
|
|
|
}, |
|
|
|
|
], |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
type: FormItem.xtype, |
|
|
|
|
name: BI.i18nText('Dec-Dcm_Connection_Form_SQL_Validation_Query'), |
|
|
|
|
forms: [{ |
|
|
|
|
type: BI.TextAreaEditor.xtype, |
|
|
|
|
$value: 'validation-query', |
|
|
|
|
cls: 'bi-border', |
|
|
|
|
allowBlank: true, |
|
|
|
|
watermark: BI.i18nText('Dec-Dcm_Connection_Form_Place_Input'), |
|
|
|
|
value: api.getPlain(validationQuery || ''), |
|
|
|
|
width: 300, |
|
|
|
|
height: 100, |
|
|
|
|
ref: (_ref: TextAreaEditor) => { |
|
|
|
|
this.form.validationQuery = _ref; |
|
|
|
|
}, |
|
|
|
|
}], |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
type: FormItem.xtype, |
|
|
|
|
name: BI.i18nText('Dec-Dcm_Connection_Form_Database_Test_On_Borrow'), |
|
|
|
|
forms: [{ |
|
|
|
|
type: BI.TextValueCombo.xtype, |
|
|
|
|
$value: 'check', |
|
|
|
|
width: 300, |
|
|
|
|
allowBlank: true, |
|
|
|
|
value: testOnBorrow, |
|
|
|
|
items: this.getBooleanItem(), |
|
|
|
|
watermark: BI.i18nText('Dec-Dcm_Connection_Form_Database_Test_On_Borrow'), |
|
|
|
|
ref: (_ref: TextValueCombo) => { |
|
|
|
|
this.form.testOnBorrow = _ref; |
|
|
|
|
}, |
|
|
|
|
}], |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
type: FormItem.xtype, |
|
|
|
|
name: BI.i18nText('Dec-Dcm_Connection_Form_Database_Test_On_Return'), |
|
|
|
@ -862,7 +840,6 @@ export class FormJdbc extends BI.Widget {
|
|
|
|
|
connectionPoolAttr: { |
|
|
|
|
initialSize: this.form.initialSize.getValue(), |
|
|
|
|
maxActive: this.form.maxActive.getValue(), |
|
|
|
|
maxIdle: this.form.maxIdle.getValue(), |
|
|
|
|
minIdle: this.form.minIdle.getValue(), |
|
|
|
|
maxWait: this.form.maxWait.getValue(), |
|
|
|
|
validationQuery: api.getCipher(this.form.validationQuery.getValue()), |
|
|
|
|