|
|
@ -1,18 +1,19 @@ |
|
|
|
import { shortcut } from '@core/core'; |
|
|
|
import { shortcut } from '@core/core'; |
|
|
|
import { Vertical, TextEditor, TextValueCombo, Label, TextAreaEditor, Editor, EdirotIconCheckCombo, Left, TextButton, Layout } from 'ui'; |
|
|
|
import { Collapse, EVENT_CHANGE } from 'src/modules/components/collapse/collapse'; |
|
|
|
import { CollapseXtype, EVENT_CHANGE } from 'src/modules/components/collapse/collapse'; |
|
|
|
import { FormItem } from '../../components/form_item/form_item'; |
|
|
|
import { FormItemXtype } from '../../components/form_item/form_item'; |
|
|
|
|
|
|
|
import { Connection, ConnectionJDBC, ConnectionPoolJDBC } from 'src/modules/crud/crud.typings'; |
|
|
|
import { Connection, ConnectionJDBC, ConnectionPoolJDBC } from 'src/modules/crud/crud.typings'; |
|
|
|
import { connectionType } from '@constants/env'; |
|
|
|
import { connectionType } from '@constants/env'; |
|
|
|
import { CONNECT_CHARSET, CONNECTION_LAYOUT, INT_MAX_VALUE, INT_MIN_VALUE } from '@constants/constant'; |
|
|
|
import { CONNECT_CHARSET, CONNECTION_LAYOUT, INT_MAX_VALUE, INT_MIN_VALUE } from '@constants/constant'; |
|
|
|
import { getAllDatabaseTypes, getJdbcDatabaseType, resolveUrlInfo, splitUrl } from '../../../../app.service'; |
|
|
|
import { getAllDatabaseTypes, getJdbcDatabaseType, resolveUrlInfo, splitUrl } from '../../../../app.service'; |
|
|
|
import { TextCheckerXtype } from '../../../../components/text_checker/text_checker'; |
|
|
|
import { TextChecker } from '../../../../components/text_checker/text_checker'; |
|
|
|
import { ApiFactory } from 'src/modules/crud/apiFactory'; |
|
|
|
import { ApiFactory } from 'src/modules/crud/apiFactory'; |
|
|
|
|
|
|
|
import { Editor, EditorIconCheckCombo, Label, TextAreaEditor, TextEditor, TextValueCombo, VerticalLayout } from '@fui/core'; |
|
|
|
const api = new ApiFactory().create(); |
|
|
|
const api = new ApiFactory().create(); |
|
|
|
|
|
|
|
|
|
|
|
export const FormJdbcXtype = 'dec.dcm.maintain.form.jdbc'; |
|
|
|
@shortcut() |
|
|
|
@shortcut(FormJdbcXtype) |
|
|
|
|
|
|
|
export class FormJdbc extends BI.Widget { |
|
|
|
export class FormJdbc extends BI.Widget { |
|
|
|
|
|
|
|
static xtype = 'dec.dcm.maintain.form.jdbc'; |
|
|
|
|
|
|
|
|
|
|
|
props = { |
|
|
|
props = { |
|
|
|
formData: {} as Connection, |
|
|
|
formData: {} as Connection, |
|
|
|
} |
|
|
|
} |
|
|
@ -20,13 +21,12 @@ export class FormJdbc extends BI.Widget { |
|
|
|
oldPassword = ''; |
|
|
|
oldPassword = ''; |
|
|
|
allDatabaseTypes = getAllDatabaseTypes(); |
|
|
|
allDatabaseTypes = getAllDatabaseTypes(); |
|
|
|
|
|
|
|
|
|
|
|
testStatus: any; |
|
|
|
advancedSet: VerticalLayout; |
|
|
|
advancedSet: any; |
|
|
|
formUser: FormItem; |
|
|
|
formUser: any; |
|
|
|
formPassword: FormItem; |
|
|
|
formPassword: any; |
|
|
|
formPrincipal: FormItem; |
|
|
|
formPrincipal: any; |
|
|
|
formKeyPath: FormItem; |
|
|
|
formKeyPath: any; |
|
|
|
labelTips: Label; |
|
|
|
labelTips: any; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
form = { |
|
|
|
form = { |
|
|
|
connectionName: null, |
|
|
|
connectionName: null, |
|
|
@ -72,35 +72,35 @@ export class FormJdbc extends BI.Widget { |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
return { |
|
|
|
return { |
|
|
|
type: Vertical, |
|
|
|
type: BI.VerticalLayout.xtype, |
|
|
|
hgap, |
|
|
|
hgap, |
|
|
|
vgap, |
|
|
|
vgap, |
|
|
|
items: [ |
|
|
|
items: [ |
|
|
|
{ |
|
|
|
{ |
|
|
|
type: FormItemXtype, |
|
|
|
type: FormItem.xtype, |
|
|
|
name: BI.i18nText('Dec-Dcm_Connection_Name'), |
|
|
|
name: BI.i18nText('Dec-Dcm_Connection_Name'), |
|
|
|
forms: [{ |
|
|
|
forms: [{ |
|
|
|
type: TextCheckerXtype, |
|
|
|
type: TextChecker.xtype, |
|
|
|
$value: 'connection-name', |
|
|
|
$value: 'connection-name', |
|
|
|
width: 300, |
|
|
|
width: 300, |
|
|
|
value: connectionName, |
|
|
|
value: connectionName, |
|
|
|
allowBlank: true, |
|
|
|
allowBlank: true, |
|
|
|
ref: (_ref: any) => { |
|
|
|
ref: (_ref: TextChecker) => { |
|
|
|
this.form.connectionName = _ref; |
|
|
|
this.form.connectionName = _ref; |
|
|
|
}, |
|
|
|
}, |
|
|
|
watermark: BI.i18nText('Dec-Dcm_Data_Connections'), |
|
|
|
watermark: BI.i18nText('Dec-Dcm_Data_Connections'), |
|
|
|
}], |
|
|
|
}], |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
{ |
|
|
|
type: FormItemXtype, |
|
|
|
type: FormItem.xtype, |
|
|
|
name: BI.i18nText('Dec-Dcm_Connection_Form_Driver'), |
|
|
|
name: BI.i18nText('Dec-Dcm_Connection_Form_Driver'), |
|
|
|
forms: [{ |
|
|
|
forms: [{ |
|
|
|
type: EdirotIconCheckCombo, |
|
|
|
type: BI.EditorIconCheckCombo.xtype, |
|
|
|
$testId: 'dec-editor-icon-check-combo', |
|
|
|
$testId: 'dec-editor-icon-check-combo', |
|
|
|
$value: 'driver', |
|
|
|
$value: 'driver', |
|
|
|
width: 300, |
|
|
|
width: 300, |
|
|
|
value: driver, |
|
|
|
value: driver, |
|
|
|
ref: (_ref: any) => { |
|
|
|
ref: (_ref: EditorIconCheckCombo) => { |
|
|
|
this.form.driver = _ref; |
|
|
|
this.form.driver = _ref; |
|
|
|
}, |
|
|
|
}, |
|
|
|
items: this.getDrivers(), |
|
|
|
items: this.getDrivers(), |
|
|
@ -121,10 +121,10 @@ export class FormJdbc extends BI.Widget { |
|
|
|
}], |
|
|
|
}], |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
{ |
|
|
|
type: FormItemXtype, |
|
|
|
type: FormItem.xtype, |
|
|
|
name: BI.i18nText('Dec-Dcm_Connection_Form_Database_Name'), |
|
|
|
name: BI.i18nText('Dec-Dcm_Connection_Form_Database_Name'), |
|
|
|
forms: [{ |
|
|
|
forms: [{ |
|
|
|
type: TextEditor, |
|
|
|
type: BI.TextEditor.xtype, |
|
|
|
$value: 'database-name', |
|
|
|
$value: 'database-name', |
|
|
|
width: 300, |
|
|
|
width: 300, |
|
|
|
allowBlank: true, |
|
|
|
allowBlank: true, |
|
|
@ -142,10 +142,10 @@ export class FormJdbc extends BI.Widget { |
|
|
|
}], |
|
|
|
}], |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
{ |
|
|
|
type: FormItemXtype, |
|
|
|
type: FormItem.xtype, |
|
|
|
name: BI.i18nText('Dec-Dcm_Connection_Form_Host'), |
|
|
|
name: BI.i18nText('Dec-Dcm_Connection_Form_Host'), |
|
|
|
forms: [{ |
|
|
|
forms: [{ |
|
|
|
type: TextEditor, |
|
|
|
type: BI.TextEditor.xtype, |
|
|
|
$value: 'database-host', |
|
|
|
$value: 'database-host', |
|
|
|
width: 300, |
|
|
|
width: 300, |
|
|
|
allowBlank: true, |
|
|
|
allowBlank: true, |
|
|
@ -163,10 +163,10 @@ export class FormJdbc extends BI.Widget { |
|
|
|
}], |
|
|
|
}], |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
{ |
|
|
|
type: FormItemXtype, |
|
|
|
type: FormItem.xtype, |
|
|
|
name: BI.i18nText('Dec-Dcm_Connection_Form_Database_Port'), |
|
|
|
name: BI.i18nText('Dec-Dcm_Connection_Form_Database_Port'), |
|
|
|
forms: [{ |
|
|
|
forms: [{ |
|
|
|
type: TextCheckerXtype, |
|
|
|
type: TextChecker.xtype, |
|
|
|
$value: 'database-port', |
|
|
|
$value: 'database-port', |
|
|
|
width: 300, |
|
|
|
width: 300, |
|
|
|
allowBlank: true, |
|
|
|
allowBlank: true, |
|
|
@ -177,7 +177,7 @@ export class FormJdbc extends BI.Widget { |
|
|
|
checker: (value: string) => this.checkInteger(value), |
|
|
|
checker: (value: string) => this.checkInteger(value), |
|
|
|
autoFix: true, |
|
|
|
autoFix: true, |
|
|
|
}, valueRangeConfig], |
|
|
|
}, valueRangeConfig], |
|
|
|
ref: (_ref: any) => { |
|
|
|
ref: (_ref: TextChecker) => { |
|
|
|
this.form.port = _ref; |
|
|
|
this.form.port = _ref; |
|
|
|
}, |
|
|
|
}, |
|
|
|
listeners: [{ |
|
|
|
listeners: [{ |
|
|
@ -189,15 +189,15 @@ export class FormJdbc extends BI.Widget { |
|
|
|
}], |
|
|
|
}], |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
{ |
|
|
|
type: FormItemXtype, |
|
|
|
type: FormItem.xtype, |
|
|
|
name: BI.i18nText('Dec-Dcm_Connection_Form_AuthType'), |
|
|
|
name: BI.i18nText('Dec-Dcm_Connection_Form_AuthType'), |
|
|
|
invisible: !databaseType.kerberos, |
|
|
|
invisible: !databaseType.kerberos, |
|
|
|
forms: [{ |
|
|
|
forms: [{ |
|
|
|
type: TextValueCombo, |
|
|
|
type: BI.TextValueCombo.xtype, |
|
|
|
$value: 'auth-type', |
|
|
|
$value: 'auth-type', |
|
|
|
width: 300, |
|
|
|
width: 300, |
|
|
|
value: authType, |
|
|
|
value: authType, |
|
|
|
ref: (_ref: any) => { |
|
|
|
ref: (_ref: TextValueCombo) => { |
|
|
|
this.form.authType = _ref; |
|
|
|
this.form.authType = _ref; |
|
|
|
}, |
|
|
|
}, |
|
|
|
items: [ |
|
|
|
items: [ |
|
|
@ -226,33 +226,33 @@ export class FormJdbc extends BI.Widget { |
|
|
|
}], |
|
|
|
}], |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
{ |
|
|
|
type: FormItemXtype, |
|
|
|
type: FormItem.xtype, |
|
|
|
name: BI.i18nText('Dec-Dcm_Connection_Form_UserName'), |
|
|
|
name: BI.i18nText('Dec-Dcm_Connection_Form_UserName'), |
|
|
|
invisible: !!authType, |
|
|
|
invisible: !!authType, |
|
|
|
ref: (_ref: any) => { |
|
|
|
ref: (_ref: FormItem) => { |
|
|
|
this.formUser = _ref; |
|
|
|
this.formUser = _ref; |
|
|
|
}, |
|
|
|
}, |
|
|
|
forms: [{ |
|
|
|
forms: [{ |
|
|
|
type: TextEditor, |
|
|
|
type: BI.TextEditor.xtype, |
|
|
|
$value: 'username', |
|
|
|
$value: 'username', |
|
|
|
width: 300, |
|
|
|
width: 300, |
|
|
|
allowBlank: true, |
|
|
|
allowBlank: true, |
|
|
|
value: user, |
|
|
|
value: user, |
|
|
|
watermark: BI.i18nText('Dec-Dcm_Connection_Form_UserName'), |
|
|
|
watermark: BI.i18nText('Dec-Dcm_Connection_Form_UserName'), |
|
|
|
ref: (_ref: any) => { |
|
|
|
ref: (_ref: TextEditor) => { |
|
|
|
this.form.user = _ref; |
|
|
|
this.form.user = _ref; |
|
|
|
}, |
|
|
|
}, |
|
|
|
}], |
|
|
|
}], |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
{ |
|
|
|
type: FormItemXtype, |
|
|
|
type: FormItem.xtype, |
|
|
|
name: BI.i18nText('Dec-Dcm_Connection_Form_Password'), |
|
|
|
name: BI.i18nText('Dec-Dcm_Connection_Form_Password'), |
|
|
|
invisible: !!authType, |
|
|
|
invisible: !!authType, |
|
|
|
ref: (_ref: any) => { |
|
|
|
ref: (_ref: FormItem) => { |
|
|
|
this.formPassword = _ref; |
|
|
|
this.formPassword = _ref; |
|
|
|
}, |
|
|
|
}, |
|
|
|
forms: [{ |
|
|
|
forms: [{ |
|
|
|
type: Editor, |
|
|
|
type: BI.Editor.xtype, |
|
|
|
$value: 'password', |
|
|
|
$value: 'password', |
|
|
|
cls: 'bi-border bi-border-radius', |
|
|
|
cls: 'bi-border bi-border-radius', |
|
|
|
width: 300, |
|
|
|
width: 300, |
|
|
@ -262,39 +262,39 @@ export class FormJdbc extends BI.Widget { |
|
|
|
inputType: 'password', |
|
|
|
inputType: 'password', |
|
|
|
autocomplete: 'new-password', |
|
|
|
autocomplete: 'new-password', |
|
|
|
watermark: BI.i18nText('Dec-Dcm_Connection_Form_Password'), |
|
|
|
watermark: BI.i18nText('Dec-Dcm_Connection_Form_Password'), |
|
|
|
ref: (_ref: any) => { |
|
|
|
ref: (_ref: Editor) => { |
|
|
|
this.form.password = _ref; |
|
|
|
this.form.password = _ref; |
|
|
|
}, |
|
|
|
}, |
|
|
|
}], |
|
|
|
}], |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
{ |
|
|
|
type: FormItemXtype, |
|
|
|
type: FormItem.xtype, |
|
|
|
name: BI.i18nText('Dec-Dcm_Connection_Form_Principal'), |
|
|
|
name: BI.i18nText('Dec-Dcm_Connection_Form_Principal'), |
|
|
|
invisible: !authType, |
|
|
|
invisible: !authType, |
|
|
|
ref: (_ref: any) => { |
|
|
|
ref: (_ref: FormItem) => { |
|
|
|
this.formPrincipal = _ref; |
|
|
|
this.formPrincipal = _ref; |
|
|
|
}, |
|
|
|
}, |
|
|
|
forms: [{ |
|
|
|
forms: [{ |
|
|
|
type: TextEditor, |
|
|
|
type: BI.TextEditor.xtype, |
|
|
|
$value: 'principal', |
|
|
|
$value: 'principal', |
|
|
|
width: 300, |
|
|
|
width: 300, |
|
|
|
allowBlank: true, |
|
|
|
allowBlank: true, |
|
|
|
value: principal, |
|
|
|
value: principal, |
|
|
|
watermark: BI.i18nText('Dec-Dcm_Connection_Form_Principal'), |
|
|
|
watermark: BI.i18nText('Dec-Dcm_Connection_Form_Principal'), |
|
|
|
ref: (_ref: any) => { |
|
|
|
ref: (_ref: TextEditor) => { |
|
|
|
this.form.principal = _ref; |
|
|
|
this.form.principal = _ref; |
|
|
|
}, |
|
|
|
}, |
|
|
|
}], |
|
|
|
}], |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
{ |
|
|
|
type: FormItemXtype, |
|
|
|
type: FormItem.xtype, |
|
|
|
name: BI.i18nText('Dec-Dcm_Connection_Form_KeyPath'), |
|
|
|
name: BI.i18nText('Dec-Dcm_Connection_Form_KeyPath'), |
|
|
|
invisible: !authType, |
|
|
|
invisible: !authType, |
|
|
|
ref: (_ref: any) => { |
|
|
|
ref: (_ref: FormItem) => { |
|
|
|
this.formKeyPath = _ref; |
|
|
|
this.formKeyPath = _ref; |
|
|
|
}, |
|
|
|
}, |
|
|
|
forms: [{ |
|
|
|
forms: [{ |
|
|
|
type: Editor, |
|
|
|
type: BI.Editor.xtype, |
|
|
|
$value: 'key-path', |
|
|
|
$value: 'key-path', |
|
|
|
cls: 'bi-border', |
|
|
|
cls: 'bi-border', |
|
|
|
width: 300, |
|
|
|
width: 300, |
|
|
@ -302,87 +302,87 @@ export class FormJdbc extends BI.Widget { |
|
|
|
allowBlank: true, |
|
|
|
allowBlank: true, |
|
|
|
value: keyPath, |
|
|
|
value: keyPath, |
|
|
|
watermark: BI.i18nText('Dec-Dcm_Connection_Form_KeyPath'), |
|
|
|
watermark: BI.i18nText('Dec-Dcm_Connection_Form_KeyPath'), |
|
|
|
ref: (_ref: any) => { |
|
|
|
ref: (_ref: Editor) => { |
|
|
|
this.form.keyPath = _ref; |
|
|
|
this.form.keyPath = _ref; |
|
|
|
}, |
|
|
|
}, |
|
|
|
}], |
|
|
|
}], |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
{ |
|
|
|
type: Label, |
|
|
|
type: BI.Label.xtype, |
|
|
|
cls: 'bi-tips', |
|
|
|
cls: 'bi-tips', |
|
|
|
textAlign: 'left', |
|
|
|
textAlign: 'left', |
|
|
|
invisible: true, |
|
|
|
invisible: true, |
|
|
|
text: BI.i18nText('Dec-Dcm_Connection_JDBC_Warning'), |
|
|
|
text: BI.i18nText('Dec-Dcm_Connection_JDBC_Warning'), |
|
|
|
ref: (_ref: any) => { |
|
|
|
ref: (_ref: Label) => { |
|
|
|
this.labelTips = _ref; |
|
|
|
this.labelTips = _ref; |
|
|
|
}, |
|
|
|
}, |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
{ |
|
|
|
type: FormItemXtype, |
|
|
|
type: FormItem.xtype, |
|
|
|
name: BI.i18nText('Dec-Dcm_Connection_Form_OriginalCharsetName'), |
|
|
|
name: BI.i18nText('Dec-Dcm_Connection_Form_OriginalCharsetName'), |
|
|
|
forms: [{ |
|
|
|
forms: [{ |
|
|
|
type: TextValueCombo, |
|
|
|
type: BI.TextValueCombo.xtype, |
|
|
|
$value: 'original-charset-name', |
|
|
|
$value: 'original-charset-name', |
|
|
|
width: 300, |
|
|
|
width: 300, |
|
|
|
value: originalCharsetName ? originalCharsetName : '', |
|
|
|
value: originalCharsetName ? originalCharsetName : '', |
|
|
|
items: CONNECT_CHARSET, |
|
|
|
items: CONNECT_CHARSET, |
|
|
|
ref: (_ref: any) => { |
|
|
|
ref: (_ref: TextValueCombo) => { |
|
|
|
this.form.originalCharsetName = _ref; |
|
|
|
this.form.originalCharsetName = _ref; |
|
|
|
}, |
|
|
|
}, |
|
|
|
}], |
|
|
|
}], |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
{ |
|
|
|
type: FormItemXtype, |
|
|
|
type: FormItem.xtype, |
|
|
|
invisible: !databaseType.hasSchema, |
|
|
|
invisible: !databaseType.hasSchema, |
|
|
|
height: 64, |
|
|
|
height: 64, |
|
|
|
name: BI.i18nText('Dec-Dcm_Connection_Form_Pattern'), |
|
|
|
name: BI.i18nText('Dec-Dcm_Connection_Form_Pattern'), |
|
|
|
forms: [{ |
|
|
|
forms: [{ |
|
|
|
type: Vertical, |
|
|
|
type: BI.VerticalLayout.xtype, |
|
|
|
items: [{ |
|
|
|
items: [{ |
|
|
|
type: Left, |
|
|
|
type: BI.FloatLeftLayout.xtype, |
|
|
|
items: [{ |
|
|
|
items: [{ |
|
|
|
type: TextButton, |
|
|
|
type: BI.TextButton.xtype, |
|
|
|
cls: 'bi-high-light', |
|
|
|
cls: 'bi-high-light', |
|
|
|
text: BI.i18nText('Dec-Dcm_Connection_Click_Connect_Database'), |
|
|
|
text: BI.i18nText('Dec-Dcm_Connection_Click_Connect_Database'), |
|
|
|
handler: () => { |
|
|
|
handler: () => { |
|
|
|
this.fireEvent('EVENT_TEST_CONNECTION'); |
|
|
|
this.fireEvent('EVENT_TEST_CONNECTION'); |
|
|
|
}, |
|
|
|
}, |
|
|
|
}, { |
|
|
|
}, { |
|
|
|
type: Label, |
|
|
|
type: BI.Label.xtype, |
|
|
|
cls: 'bi-tips', |
|
|
|
cls: 'bi-tips', |
|
|
|
lgap: 3, |
|
|
|
lgap: 3, |
|
|
|
text: BI.i18nText('Dec-Dcm_Connection_Read_Mode_List'), |
|
|
|
text: BI.i18nText('Dec-Dcm_Connection_Read_Mode_List'), |
|
|
|
}], |
|
|
|
}], |
|
|
|
}, { |
|
|
|
}, { |
|
|
|
type: TextValueCombo, |
|
|
|
type: BI.TextValueCombo.xtype, |
|
|
|
$value: 'schema', |
|
|
|
$value: 'schema', |
|
|
|
width: 300, |
|
|
|
width: 300, |
|
|
|
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: any) => { |
|
|
|
ref: (_ref: TextValueCombo) => { |
|
|
|
this.form.schema = _ref; |
|
|
|
this.form.schema = _ref; |
|
|
|
}, |
|
|
|
}, |
|
|
|
}], |
|
|
|
}], |
|
|
|
}], |
|
|
|
}], |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
{ |
|
|
|
type: Layout, |
|
|
|
type: BI.Layout.xtype, |
|
|
|
cls: 'bi-border-top', |
|
|
|
cls: 'bi-border-top', |
|
|
|
bgap: 8, |
|
|
|
bgap: 8, |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
{ |
|
|
|
type: FormItemXtype, |
|
|
|
type: FormItem.xtype, |
|
|
|
name: BI.i18nText('Dec-Dcm_Connection_Form_Database_URL'), |
|
|
|
name: BI.i18nText('Dec-Dcm_Connection_Form_Database_URL'), |
|
|
|
forms: [{ |
|
|
|
forms: [{ |
|
|
|
type: TextEditor, |
|
|
|
type: BI.TextEditor.xtype, |
|
|
|
$value: 'database-url', |
|
|
|
$value: 'database-url', |
|
|
|
width: 300, |
|
|
|
width: 300, |
|
|
|
allowBlank: true, |
|
|
|
allowBlank: true, |
|
|
|
value: url, |
|
|
|
value: url, |
|
|
|
watermark: BI.i18nText('Dec-Dcm_Connection_Form_Database_URL'), |
|
|
|
watermark: BI.i18nText('Dec-Dcm_Connection_Form_Database_URL'), |
|
|
|
ref: (_ref: any) => { |
|
|
|
ref: (_ref: TextEditor) => { |
|
|
|
this.form.url = _ref; |
|
|
|
this.form.url = _ref; |
|
|
|
}, |
|
|
|
}, |
|
|
|
listeners: [{ |
|
|
|
listeners: [{ |
|
|
@ -397,7 +397,7 @@ export class FormJdbc extends BI.Widget { |
|
|
|
}], |
|
|
|
}], |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
{ |
|
|
|
type: CollapseXtype, |
|
|
|
type: Collapse.xtype, |
|
|
|
bgap: -15, |
|
|
|
bgap: -15, |
|
|
|
width: 70, |
|
|
|
width: 70, |
|
|
|
name: BI.i18nText('Dec-Dcm_Connection_Form_Database_Advanced_Setting'), |
|
|
|
name: BI.i18nText('Dec-Dcm_Connection_Form_Database_Advanced_Setting'), |
|
|
@ -411,20 +411,20 @@ export class FormJdbc extends BI.Widget { |
|
|
|
], |
|
|
|
], |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
{ |
|
|
|
type: Vertical, |
|
|
|
type: BI.VerticalLayout.xtype, |
|
|
|
vgap, |
|
|
|
vgap, |
|
|
|
tgap: -15, |
|
|
|
tgap: -15, |
|
|
|
invisible: true, |
|
|
|
invisible: true, |
|
|
|
ref: (_ref: any) => { |
|
|
|
ref: (_ref: VerticalLayout) => { |
|
|
|
this.advancedSet = _ref; |
|
|
|
this.advancedSet = _ref; |
|
|
|
}, |
|
|
|
}, |
|
|
|
items: [ |
|
|
|
items: [ |
|
|
|
{ |
|
|
|
{ |
|
|
|
type: FormItemXtype, |
|
|
|
type: FormItem.xtype, |
|
|
|
tgap: 15, |
|
|
|
tgap: 15, |
|
|
|
name: BI.i18nText('Dec-Dcm_Connection_Form_Database_Initial_Size'), |
|
|
|
name: BI.i18nText('Dec-Dcm_Connection_Form_Database_Initial_Size'), |
|
|
|
forms: [{ |
|
|
|
forms: [{ |
|
|
|
type: TextCheckerXtype, |
|
|
|
type: TextChecker.xtype, |
|
|
|
$value: 'initial-size', |
|
|
|
$value: 'initial-size', |
|
|
|
width: 300, |
|
|
|
width: 300, |
|
|
|
allowBlank: false, |
|
|
|
allowBlank: false, |
|
|
@ -435,16 +435,16 @@ export class FormJdbc extends BI.Widget { |
|
|
|
autoFix: true, |
|
|
|
autoFix: true, |
|
|
|
}, valueRangeConfig], |
|
|
|
}, valueRangeConfig], |
|
|
|
watermark: BI.i18nText('Dec-Dcm_Connection_Form_Database_Initial_Size'), |
|
|
|
watermark: BI.i18nText('Dec-Dcm_Connection_Form_Database_Initial_Size'), |
|
|
|
ref: (_ref: any) => { |
|
|
|
ref: (_ref: TextChecker) => { |
|
|
|
this.form.initialSize = _ref; |
|
|
|
this.form.initialSize = _ref; |
|
|
|
}, |
|
|
|
}, |
|
|
|
}], |
|
|
|
}], |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
{ |
|
|
|
type: FormItemXtype, |
|
|
|
type: FormItem.xtype, |
|
|
|
name: BI.i18nText('Dec-Dcm_Connection_Form_Database_Max_Active'), |
|
|
|
name: BI.i18nText('Dec-Dcm_Connection_Form_Database_Max_Active'), |
|
|
|
forms: [{ |
|
|
|
forms: [{ |
|
|
|
type: TextCheckerXtype, |
|
|
|
type: TextChecker.xtype, |
|
|
|
$value: 'max-active', |
|
|
|
$value: 'max-active', |
|
|
|
width: 300, |
|
|
|
width: 300, |
|
|
|
allowBlank: false, |
|
|
|
allowBlank: false, |
|
|
@ -455,16 +455,16 @@ export class FormJdbc extends BI.Widget { |
|
|
|
checker: (value: string) => this.checkInteger(value), |
|
|
|
checker: (value: string) => this.checkInteger(value), |
|
|
|
autoFix: true, |
|
|
|
autoFix: true, |
|
|
|
}, valueRangeConfig], |
|
|
|
}, valueRangeConfig], |
|
|
|
ref: (_ref: any) => { |
|
|
|
ref: (_ref: TextChecker) => { |
|
|
|
this.form.maxActive = _ref; |
|
|
|
this.form.maxActive = _ref; |
|
|
|
}, |
|
|
|
}, |
|
|
|
}], |
|
|
|
}], |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
{ |
|
|
|
type: FormItemXtype, |
|
|
|
type: FormItem.xtype, |
|
|
|
name: BI.i18nText('Dec-Dcm_Connection_Form_Database_Max_Idle'), |
|
|
|
name: BI.i18nText('Dec-Dcm_Connection_Form_Database_Max_Idle'), |
|
|
|
forms: [{ |
|
|
|
forms: [{ |
|
|
|
type: TextCheckerXtype, |
|
|
|
type: TextChecker.xtype, |
|
|
|
$value: 'max-idle', |
|
|
|
$value: 'max-idle', |
|
|
|
width: 300, |
|
|
|
width: 300, |
|
|
|
allowBlank: false, |
|
|
|
allowBlank: false, |
|
|
@ -475,16 +475,16 @@ export class FormJdbc extends BI.Widget { |
|
|
|
checker: (value: string) => this.checkInteger(value), |
|
|
|
checker: (value: string) => this.checkInteger(value), |
|
|
|
autoFix: true, |
|
|
|
autoFix: true, |
|
|
|
}, valueRangeConfig], |
|
|
|
}, valueRangeConfig], |
|
|
|
ref: (_ref: any) => { |
|
|
|
ref: (_ref: TextChecker) => { |
|
|
|
this.form.maxIdle = _ref; |
|
|
|
this.form.maxIdle = _ref; |
|
|
|
}, |
|
|
|
}, |
|
|
|
}], |
|
|
|
}], |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
{ |
|
|
|
type: FormItemXtype, |
|
|
|
type: FormItem.xtype, |
|
|
|
name: BI.i18nText('Dec-Dcm_Connection_Form_Database_Min_Idle'), |
|
|
|
name: BI.i18nText('Dec-Dcm_Connection_Form_Database_Min_Idle'), |
|
|
|
forms: [{ |
|
|
|
forms: [{ |
|
|
|
type: TextCheckerXtype, |
|
|
|
type: TextChecker.xtype, |
|
|
|
$value: 'min-idle', |
|
|
|
$value: 'min-idle', |
|
|
|
width: 300, |
|
|
|
width: 300, |
|
|
|
allowBlank: false, |
|
|
|
allowBlank: false, |
|
|
@ -495,17 +495,17 @@ export class FormJdbc extends BI.Widget { |
|
|
|
checker: (value: string) => this.checkInteger(value), |
|
|
|
checker: (value: string) => this.checkInteger(value), |
|
|
|
autoFix: true, |
|
|
|
autoFix: true, |
|
|
|
}, valueRangeConfig], |
|
|
|
}, valueRangeConfig], |
|
|
|
ref: (_ref: any) => { |
|
|
|
ref: (_ref: TextChecker) => { |
|
|
|
this.form.minIdle = _ref; |
|
|
|
this.form.minIdle = _ref; |
|
|
|
}, |
|
|
|
}, |
|
|
|
}], |
|
|
|
}], |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
{ |
|
|
|
type: FormItemXtype, |
|
|
|
type: FormItem.xtype, |
|
|
|
name: BI.i18nText('Dec-Dcm_Connection_Form_Database_Max_Wait'), |
|
|
|
name: BI.i18nText('Dec-Dcm_Connection_Form_Database_Max_Wait'), |
|
|
|
forms: [ |
|
|
|
forms: [ |
|
|
|
{ |
|
|
|
{ |
|
|
|
type: TextCheckerXtype, |
|
|
|
type: TextChecker.xtype, |
|
|
|
$value: 'max-wait', |
|
|
|
$value: 'max-wait', |
|
|
|
width: 300, |
|
|
|
width: 300, |
|
|
|
allowBlank: false, |
|
|
|
allowBlank: false, |
|
|
@ -516,12 +516,12 @@ export class FormJdbc extends BI.Widget { |
|
|
|
checker: (value: string) => this.checkInteger(value), |
|
|
|
checker: (value: string) => this.checkInteger(value), |
|
|
|
autoFix: true, |
|
|
|
autoFix: true, |
|
|
|
}, valueRangeConfig], |
|
|
|
}, valueRangeConfig], |
|
|
|
ref: (_ref: any) => { |
|
|
|
ref: (_ref: TextChecker) => { |
|
|
|
this.form.maxWait = _ref; |
|
|
|
this.form.maxWait = _ref; |
|
|
|
}, |
|
|
|
}, |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
{ |
|
|
|
type: Label, |
|
|
|
type: BI.Label.xtype, |
|
|
|
lgap: 5, |
|
|
|
lgap: 5, |
|
|
|
height: CONNECTION_LAYOUT.labelHeight, |
|
|
|
height: CONNECTION_LAYOUT.labelHeight, |
|
|
|
text: BI.i18nText('Dec-Dcm_Millisecond'), |
|
|
|
text: BI.i18nText('Dec-Dcm_Millisecond'), |
|
|
@ -529,10 +529,10 @@ export class FormJdbc extends BI.Widget { |
|
|
|
], |
|
|
|
], |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
{ |
|
|
|
type: FormItemXtype, |
|
|
|
type: FormItem.xtype, |
|
|
|
name: BI.i18nText('Dec-Dcm_Connection_Form_SQL_Validation_Query'), |
|
|
|
name: BI.i18nText('Dec-Dcm_Connection_Form_SQL_Validation_Query'), |
|
|
|
forms: [{ |
|
|
|
forms: [{ |
|
|
|
type: TextAreaEditor, |
|
|
|
type: BI.TextAreaEditor.xtype, |
|
|
|
$value: 'validation-query', |
|
|
|
$value: 'validation-query', |
|
|
|
cls: 'bi-border', |
|
|
|
cls: 'bi-border', |
|
|
|
allowBlank: true, |
|
|
|
allowBlank: true, |
|
|
@ -540,65 +540,65 @@ export class FormJdbc extends BI.Widget { |
|
|
|
value: validationQuery, |
|
|
|
value: validationQuery, |
|
|
|
width: 300, |
|
|
|
width: 300, |
|
|
|
height: 100, |
|
|
|
height: 100, |
|
|
|
ref: (_ref: any) => { |
|
|
|
ref: (_ref: TextAreaEditor) => { |
|
|
|
this.form.validationQuery = _ref; |
|
|
|
this.form.validationQuery = _ref; |
|
|
|
}, |
|
|
|
}, |
|
|
|
}], |
|
|
|
}], |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
{ |
|
|
|
type: FormItemXtype, |
|
|
|
type: FormItem.xtype, |
|
|
|
name: BI.i18nText('Dec-Dcm_Connection_Form_Connection-Check'), |
|
|
|
name: BI.i18nText('Dec-Dcm_Connection_Form_Connection-Check'), |
|
|
|
forms: [{ |
|
|
|
forms: [{ |
|
|
|
type: TextValueCombo, |
|
|
|
type: BI.TextValueCombo.xtype, |
|
|
|
$value: 'check', |
|
|
|
$value: 'check', |
|
|
|
width: 300, |
|
|
|
width: 300, |
|
|
|
allowBlank: true, |
|
|
|
allowBlank: true, |
|
|
|
value: testOnBorrow, |
|
|
|
value: testOnBorrow, |
|
|
|
items: this.getBooleanItem(), |
|
|
|
items: this.getBooleanItem(), |
|
|
|
watermark: BI.i18nText('Dec-Dcm_Connection_Form_Connection-Check'), |
|
|
|
watermark: BI.i18nText('Dec-Dcm_Connection_Form_Connection-Check'), |
|
|
|
ref: (_ref: any) => { |
|
|
|
ref: (_ref: TextValueCombo) => { |
|
|
|
this.form.testOnBorrow = _ref; |
|
|
|
this.form.testOnBorrow = _ref; |
|
|
|
}, |
|
|
|
}, |
|
|
|
}], |
|
|
|
}], |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
{ |
|
|
|
type: FormItemXtype, |
|
|
|
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'), |
|
|
|
forms: [{ |
|
|
|
forms: [{ |
|
|
|
type: TextValueCombo, |
|
|
|
type: BI.TextValueCombo.xtype, |
|
|
|
$value: 'test-on-return', |
|
|
|
$value: 'test-on-return', |
|
|
|
width: 300, |
|
|
|
width: 300, |
|
|
|
allowBlank: true, |
|
|
|
allowBlank: true, |
|
|
|
value: testOnReturn, |
|
|
|
value: testOnReturn, |
|
|
|
items: this.getBooleanItem(), |
|
|
|
items: this.getBooleanItem(), |
|
|
|
watermark: BI.i18nText('Dec-Dcm_Connection_Form_Database_Test_On_Return'), |
|
|
|
watermark: BI.i18nText('Dec-Dcm_Connection_Form_Database_Test_On_Return'), |
|
|
|
ref: (_ref: any) => { |
|
|
|
ref: (_ref: TextValueCombo) => { |
|
|
|
this.form.testOnReturn = _ref; |
|
|
|
this.form.testOnReturn = _ref; |
|
|
|
}, |
|
|
|
}, |
|
|
|
}], |
|
|
|
}], |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
{ |
|
|
|
type: FormItemXtype, |
|
|
|
type: FormItem.xtype, |
|
|
|
name: BI.i18nText('Dec-Dcm_Connection_Form_Database_Test_While_Idle'), |
|
|
|
name: BI.i18nText('Dec-Dcm_Connection_Form_Database_Test_While_Idle'), |
|
|
|
forms: [{ |
|
|
|
forms: [{ |
|
|
|
type: TextValueCombo, |
|
|
|
type: BI.TextValueCombo.xtype, |
|
|
|
$value: 'test-while-idle', |
|
|
|
$value: 'test-while-idle', |
|
|
|
width: 300, |
|
|
|
width: 300, |
|
|
|
allowBlank: true, |
|
|
|
allowBlank: true, |
|
|
|
value: testWhileIdle, |
|
|
|
value: testWhileIdle, |
|
|
|
items: this.getBooleanItem(), |
|
|
|
items: this.getBooleanItem(), |
|
|
|
watermark: BI.i18nText('Dec-Dcm_Connection_Form_Database_Test_While_Idle'), |
|
|
|
watermark: BI.i18nText('Dec-Dcm_Connection_Form_Database_Test_While_Idle'), |
|
|
|
ref: (_ref: any) => { |
|
|
|
ref: (_ref: TextValueCombo) => { |
|
|
|
this.form.testWhileIdle = _ref; |
|
|
|
this.form.testWhileIdle = _ref; |
|
|
|
}, |
|
|
|
}, |
|
|
|
}], |
|
|
|
}], |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
{ |
|
|
|
type: FormItemXtype, |
|
|
|
type: FormItem.xtype, |
|
|
|
name: BI.i18nText('Dec-Dcm_Connection_Form_Database_Test_Between_Eviction_Millis'), |
|
|
|
name: BI.i18nText('Dec-Dcm_Connection_Form_Database_Test_Between_Eviction_Millis'), |
|
|
|
forms: [ |
|
|
|
forms: [ |
|
|
|
{ |
|
|
|
{ |
|
|
|
type: TextCheckerXtype, |
|
|
|
type: TextChecker.xtype, |
|
|
|
$value: 'test-between-evicition-millis', |
|
|
|
$value: 'test-between-evicition-millis', |
|
|
|
width: 300, |
|
|
|
width: 300, |
|
|
|
allowBlank: false, |
|
|
|
allowBlank: false, |
|
|
@ -609,12 +609,12 @@ export class FormJdbc extends BI.Widget { |
|
|
|
checker: (value: string) => this.checkNumber(value), |
|
|
|
checker: (value: string) => this.checkNumber(value), |
|
|
|
autoFix: true, |
|
|
|
autoFix: true, |
|
|
|
}, valueRangeConfig], |
|
|
|
}, valueRangeConfig], |
|
|
|
ref: (_ref: any) => { |
|
|
|
ref: (_ref: TextChecker) => { |
|
|
|
this.form.timeBetweenEvictionRunsMillis = _ref; |
|
|
|
this.form.timeBetweenEvictionRunsMillis = _ref; |
|
|
|
}, |
|
|
|
}, |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
{ |
|
|
|
type: Label, |
|
|
|
type: BI.Label.xtype, |
|
|
|
lgap: 5, |
|
|
|
lgap: 5, |
|
|
|
height: CONNECTION_LAYOUT.labelHeight, |
|
|
|
height: CONNECTION_LAYOUT.labelHeight, |
|
|
|
text: BI.i18nText('Dec-Dcm_Millisecond'), |
|
|
|
text: BI.i18nText('Dec-Dcm_Millisecond'), |
|
|
@ -622,10 +622,10 @@ export class FormJdbc extends BI.Widget { |
|
|
|
], |
|
|
|
], |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
{ |
|
|
|
type: FormItemXtype, |
|
|
|
type: FormItem.xtype, |
|
|
|
name: BI.i18nText('Dec-Dcm_Connection_Form_Database_Tests_PerEviction_Run_Num'), |
|
|
|
name: BI.i18nText('Dec-Dcm_Connection_Form_Database_Tests_PerEviction_Run_Num'), |
|
|
|
forms: [{ |
|
|
|
forms: [{ |
|
|
|
type: TextCheckerXtype, |
|
|
|
type: TextChecker.xtype, |
|
|
|
$value: 'test-pereviction-run-num', |
|
|
|
$value: 'test-pereviction-run-num', |
|
|
|
width: 300, |
|
|
|
width: 300, |
|
|
|
allowBlank: false, |
|
|
|
allowBlank: false, |
|
|
@ -636,17 +636,17 @@ export class FormJdbc extends BI.Widget { |
|
|
|
checker: (value: string) => this.checkInteger(value), |
|
|
|
checker: (value: string) => this.checkInteger(value), |
|
|
|
autoFix: true, |
|
|
|
autoFix: true, |
|
|
|
}, valueRangeConfig], |
|
|
|
}, valueRangeConfig], |
|
|
|
ref: (_ref: any) => { |
|
|
|
ref: (_ref: TextChecker) => { |
|
|
|
this.form.numTestsPerEvictionRun = _ref; |
|
|
|
this.form.numTestsPerEvictionRun = _ref; |
|
|
|
}, |
|
|
|
}, |
|
|
|
}], |
|
|
|
}], |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
{ |
|
|
|
type: FormItemXtype, |
|
|
|
type: FormItem.xtype, |
|
|
|
name: BI.i18nText('Dec-Dcm_Connection_Form_Database_Min_Evictable_Idle_Time_Millis'), |
|
|
|
name: BI.i18nText('Dec-Dcm_Connection_Form_Database_Min_Evictable_Idle_Time_Millis'), |
|
|
|
forms: [ |
|
|
|
forms: [ |
|
|
|
{ |
|
|
|
{ |
|
|
|
type: TextCheckerXtype, |
|
|
|
type: TextChecker.xtype, |
|
|
|
$value: 'min-evictable-idle-time-millis', |
|
|
|
$value: 'min-evictable-idle-time-millis', |
|
|
|
width: 300, |
|
|
|
width: 300, |
|
|
|
allowBlank: false, |
|
|
|
allowBlank: false, |
|
|
@ -657,12 +657,12 @@ export class FormJdbc extends BI.Widget { |
|
|
|
checker: (value: string) => this.checkInteger(value), |
|
|
|
checker: (value: string) => this.checkInteger(value), |
|
|
|
autoFix: true, |
|
|
|
autoFix: true, |
|
|
|
}, valueRangeConfig], |
|
|
|
}, valueRangeConfig], |
|
|
|
ref: (_ref: any) => { |
|
|
|
ref: (_ref: TextChecker) => { |
|
|
|
this.form.minEvictableIdleTimeMillis = _ref; |
|
|
|
this.form.minEvictableIdleTimeMillis = _ref; |
|
|
|
}, |
|
|
|
}, |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
{ |
|
|
|
type: Label, |
|
|
|
type: BI.Label.xtype, |
|
|
|
lgap: 5, |
|
|
|
lgap: 5, |
|
|
|
height: CONNECTION_LAYOUT.labelHeight, |
|
|
|
height: CONNECTION_LAYOUT.labelHeight, |
|
|
|
text: BI.i18nText('BI-Basic_Seconds'), |
|
|
|
text: BI.i18nText('BI-Basic_Seconds'), |
|
|
|