Browse Source

DEC-21498 fix: 【FR配合】连接池配置优化

feature/x
dailer 3 years ago
parent
commit
bef463ad19
  1. 42
      src/modules/pages/connection/connection_jdbc/connection_jdbc.ts
  2. 162
      src/modules/pages/maintain/forms/components/form.jdbc.ts

42
src/modules/pages/connection/connection_jdbc/connection_jdbc.ts

@ -97,6 +97,27 @@ export class ConnectionJdbc extends BI.Widget {
name: BI.i18nText('Dec-Dcm_Connection_Form_Database_URL'), name: BI.i18nText('Dec-Dcm_Connection_Form_Database_URL'),
value: url, value: url,
}, },
{
type: FormItem.xtype,
name: BI.i18nText('Dec-Dcm_Connection_Form_Database_Max_Active'),
value: connectionPoolAttr.maxActive,
},
{
type: FormItem.xtype,
name: BI.i18nText('Dec-Dcm_Connection_Form_Database_Test_On_Borrow'),
value: connectionPoolAttr.testOnBorrow ? BI.i18nText('Dec-Dcm_Yes') : BI.i18nText('Dec-Dcm_No'),
},
{
type: FormItem.xtype,
name: BI.i18nText('Dec-Dcm_Connection_Form_Database_Validation_Query'),
value: api.getPlain(connectionPoolAttr.validationQuery || ''),
},
{
type: FormItem.xtype,
name: BI.i18nText('Dec-Dcm_Connection_Form_Database_Max_Wait'),
value: connectionPoolAttr.maxWait,
unit: BI.i18nText('Dec-Dcm_Millisecond'),
},
{ {
type: Collapse.xtype, type: Collapse.xtype,
width: 70, width: 70,
@ -124,11 +145,6 @@ export class ConnectionJdbc extends BI.Widget {
name: BI.i18nText('Dec-Dcm_Connection_Form_Database_Initial_Size'), name: BI.i18nText('Dec-Dcm_Connection_Form_Database_Initial_Size'),
value: connectionPoolAttr.initialSize, value: connectionPoolAttr.initialSize,
}, },
{
type: FormItem.xtype,
name: BI.i18nText('Dec-Dcm_Connection_Form_Database_Max_Active'),
value: connectionPoolAttr.maxActive,
},
{ {
type: FormItem.xtype, type: FormItem.xtype,
name: BI.i18nText('Dec-Dcm_Connection_Form_Database_Max_Idle'), name: BI.i18nText('Dec-Dcm_Connection_Form_Database_Max_Idle'),
@ -139,22 +155,6 @@ export class ConnectionJdbc extends BI.Widget {
name: BI.i18nText('Dec-Dcm_Connection_Form_Database_Min_Idle'), name: BI.i18nText('Dec-Dcm_Connection_Form_Database_Min_Idle'),
value: connectionPoolAttr.minIdle, value: connectionPoolAttr.minIdle,
}, },
{
type: FormItem.xtype,
name: BI.i18nText('Dec-Dcm_Connection_Form_Database_Max_Wait'),
value: connectionPoolAttr.maxWait,
unit: BI.i18nText('Dec-Dcm_Millisecond'),
},
{
type: FormItem.xtype,
name: BI.i18nText('Dec-Dcm_Connection_Form_Database_Validation_Query'),
value: api.getPlain(connectionPoolAttr.validationQuery || ''),
},
{
type: FormItem.xtype,
name: BI.i18nText('Dec-Dcm_Connection_Form_Database_Test_On_Borrow'),
value: connectionPoolAttr.testOnBorrow ? BI.i18nText('Dec-Dcm_Yes') : BI.i18nText('Dec-Dcm_No'),
},
{ {
type: FormItem.xtype, type: FormItem.xtype,
name: BI.i18nText('Dec-Dcm_Connection_Form_Database_Test_On_Return'), name: BI.i18nText('Dec-Dcm_Connection_Form_Database_Test_On_Return'),

162
src/modules/pages/maintain/forms/components/form.jdbc.ts

@ -437,6 +437,87 @@ 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_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_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, type: Collapse.xtype,
bgap: -15, bgap: -15,
@ -481,26 +562,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, type: FormItem.xtype,
name: BI.i18nText('Dec-Dcm_Connection_Form_Database_Max_Idle'), name: BI.i18nText('Dec-Dcm_Connection_Form_Database_Max_Idle'),
@ -541,67 +602,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, type: FormItem.xtype,
name: BI.i18nText('Dec-Dcm_Connection_Form_Database_Test_On_Return'), name: BI.i18nText('Dec-Dcm_Connection_Form_Database_Test_On_Return'),

Loading…
Cancel
Save