|
|
@ -3,7 +3,7 @@ import { Collapse, EVENT_CHANGE } from 'src/modules/components/collapse/collapse |
|
|
|
import { FormItem } from '../../components/form_item/form_item'; |
|
|
|
import { FormItem } 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, CONNECT_SSH_TYPE, CONNECT_SSL_TYPE } from '@constants/constant'; |
|
|
|
import { CONNECT_CHARSET, CONNECTION_LAYOUT, INT_MAX_VALUE, INT_MIN_VALUE, CONNECT_SSH_TYPE, CONNECT_SSL_TYPE, YES_OR_NO } from '@constants/constant'; |
|
|
|
import { getAllDatabaseTypes, getJdbcDatabaseType, resolveUrlInfo, splitUrl } from '../../../../app.service'; |
|
|
|
import { getAllDatabaseTypes, getJdbcDatabaseType, resolveUrlInfo, splitUrl } from '../../../../app.service'; |
|
|
|
import { DatabaseType } from 'src/modules/app.typings'; |
|
|
|
import { DatabaseType } from 'src/modules/app.typings'; |
|
|
|
import { TextChecker } from '../../../../components/text_checker/text_checker'; |
|
|
|
import { TextChecker } from '../../../../components/text_checker/text_checker'; |
|
|
@ -12,9 +12,12 @@ import { ApiFactory } from 'src/modules/crud/apiFactory'; |
|
|
|
import { Editor, Label, TextAreaEditor, TextEditor, TextValueCombo, VerticalLayout, MultiSelectItem } from '@fui/core'; |
|
|
|
import { Editor, Label, TextAreaEditor, TextEditor, TextValueCombo, VerticalLayout, MultiSelectItem } from '@fui/core'; |
|
|
|
import { DriverSelector } from '../../components/driverselector/driverselector'; |
|
|
|
import { DriverSelector } from '../../components/driverselector/driverselector'; |
|
|
|
import { FileUpload } from '../../../../components/file_upload/file_upload'; |
|
|
|
import { FileUpload } from '../../../../components/file_upload/file_upload'; |
|
|
|
|
|
|
|
import { TipsCombo } from '../../../../components/tips_combo/tips_combo'; |
|
|
|
|
|
|
|
|
|
|
|
const api = new ApiFactory().create(); |
|
|
|
const api = new ApiFactory().create(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const EDITOR_WIDTH = 300, EDITOR_HEIGHT = 20; |
|
|
|
|
|
|
|
|
|
|
|
@shortcut() |
|
|
|
@shortcut() |
|
|
|
export class FormJdbc extends BI.Widget { |
|
|
|
export class FormJdbc extends BI.Widget { |
|
|
|
static xtype = 'dec.dcm.maintain.form.jdbc'; |
|
|
|
static xtype = 'dec.dcm.maintain.form.jdbc'; |
|
|
@ -29,6 +32,8 @@ export class FormJdbc extends BI.Widget { |
|
|
|
databaseType: DatabaseType; |
|
|
|
databaseType: DatabaseType; |
|
|
|
allDatabaseTypes = getAllDatabaseTypes(); |
|
|
|
allDatabaseTypes = getAllDatabaseTypes(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
parallelLoadSet: VerticalLayout; |
|
|
|
|
|
|
|
hdfsSet: VerticalLayout; |
|
|
|
sshSet: VerticalLayout; |
|
|
|
sshSet: VerticalLayout; |
|
|
|
sshForm: VerticalLayout; |
|
|
|
sshForm: VerticalLayout; |
|
|
|
sslSet: VerticalLayout; |
|
|
|
sslSet: VerticalLayout; |
|
|
@ -87,6 +92,17 @@ export class FormJdbc extends BI.Widget { |
|
|
|
minIdle: null, |
|
|
|
minIdle: null, |
|
|
|
minEvictableIdleTimeMillis: null, |
|
|
|
minEvictableIdleTimeMillis: null, |
|
|
|
fetchSize: null, |
|
|
|
fetchSize: null, |
|
|
|
|
|
|
|
// 并行装载
|
|
|
|
|
|
|
|
parallelLoad: { |
|
|
|
|
|
|
|
serverAddress: '', |
|
|
|
|
|
|
|
isReuseTemporaryTable: 0, |
|
|
|
|
|
|
|
filePiecesLimit: null, |
|
|
|
|
|
|
|
fileSizeLimit: null, |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
// HDFS
|
|
|
|
|
|
|
|
hdfs: { |
|
|
|
|
|
|
|
hdfsAddress: null, |
|
|
|
|
|
|
|
} |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
render() { |
|
|
|
render() { |
|
|
@ -120,6 +136,10 @@ export class FormJdbc extends BI.Widget { |
|
|
|
verifyCa = false, |
|
|
|
verifyCa = false, |
|
|
|
sslClientPrivateKey = '', |
|
|
|
sslClientPrivateKey = '', |
|
|
|
sslClientCertificate = '', |
|
|
|
sslClientCertificate = '', |
|
|
|
|
|
|
|
// 并行装载
|
|
|
|
|
|
|
|
parallelLoad, |
|
|
|
|
|
|
|
// HDFS
|
|
|
|
|
|
|
|
hdfs, |
|
|
|
} = connectionData as ConnectionJDBC; |
|
|
|
} = connectionData as ConnectionJDBC; |
|
|
|
this.oldPassword = password; |
|
|
|
this.oldPassword = password; |
|
|
|
this.oldSshSecret = sshSecret; |
|
|
|
this.oldSshSecret = sshSecret; |
|
|
@ -163,7 +183,7 @@ export class FormJdbc extends BI.Widget { |
|
|
|
{ |
|
|
|
{ |
|
|
|
type: TextChecker.xtype, |
|
|
|
type: TextChecker.xtype, |
|
|
|
$value: 'connection-name', |
|
|
|
$value: 'connection-name', |
|
|
|
width: 300, |
|
|
|
width: EDITOR_WIDTH, |
|
|
|
value: connectionName, |
|
|
|
value: connectionName, |
|
|
|
allowBlank: true, |
|
|
|
allowBlank: true, |
|
|
|
ref: (_ref: TextChecker) => { |
|
|
|
ref: (_ref: TextChecker) => { |
|
|
@ -181,7 +201,7 @@ export class FormJdbc extends BI.Widget { |
|
|
|
forms: [ |
|
|
|
forms: [ |
|
|
|
{ |
|
|
|
{ |
|
|
|
type: BI.TextValueCombo.xtype, |
|
|
|
type: BI.TextValueCombo.xtype, |
|
|
|
width: 300, |
|
|
|
width: EDITOR_WIDTH, |
|
|
|
value: this.version, |
|
|
|
value: this.version, |
|
|
|
items: () => databaseType.versions.map(item => { |
|
|
|
items: () => databaseType.versions.map(item => { |
|
|
|
return { |
|
|
|
return { |
|
|
@ -250,7 +270,7 @@ export class FormJdbc extends BI.Widget { |
|
|
|
{ |
|
|
|
{ |
|
|
|
type: BI.TextEditor.xtype, |
|
|
|
type: BI.TextEditor.xtype, |
|
|
|
$value: 'database-name', |
|
|
|
$value: 'database-name', |
|
|
|
width: 300, |
|
|
|
width: EDITOR_WIDTH, |
|
|
|
allowBlank: true, |
|
|
|
allowBlank: true, |
|
|
|
watermark: BI.i18nText('Dec-Dcm_Connection_Form_Database_Name'), |
|
|
|
watermark: BI.i18nText('Dec-Dcm_Connection_Form_Database_Name'), |
|
|
|
value: databaseName, |
|
|
|
value: databaseName, |
|
|
@ -276,7 +296,7 @@ export class FormJdbc extends BI.Widget { |
|
|
|
{ |
|
|
|
{ |
|
|
|
type: BI.TextEditor.xtype, |
|
|
|
type: BI.TextEditor.xtype, |
|
|
|
$value: 'database-host', |
|
|
|
$value: 'database-host', |
|
|
|
width: 300, |
|
|
|
width: EDITOR_WIDTH, |
|
|
|
allowBlank: true, |
|
|
|
allowBlank: true, |
|
|
|
value: host, |
|
|
|
value: host, |
|
|
|
watermark: BI.i18nText('Dec-Dcm_Connection_Form_Host'), |
|
|
|
watermark: BI.i18nText('Dec-Dcm_Connection_Form_Host'), |
|
|
@ -302,7 +322,7 @@ export class FormJdbc extends BI.Widget { |
|
|
|
{ |
|
|
|
{ |
|
|
|
type: TextChecker.xtype, |
|
|
|
type: TextChecker.xtype, |
|
|
|
$value: 'database-port', |
|
|
|
$value: 'database-port', |
|
|
|
width: 300, |
|
|
|
width: EDITOR_WIDTH, |
|
|
|
allowBlank: true, |
|
|
|
allowBlank: true, |
|
|
|
value: port, |
|
|
|
value: port, |
|
|
|
watermark: BI.i18nText('Dec-Dcm_Connection_Form_Database_Port'), |
|
|
|
watermark: BI.i18nText('Dec-Dcm_Connection_Form_Database_Port'), |
|
|
@ -337,7 +357,7 @@ export class FormJdbc extends BI.Widget { |
|
|
|
{ |
|
|
|
{ |
|
|
|
type: BI.TextValueCombo.xtype, |
|
|
|
type: BI.TextValueCombo.xtype, |
|
|
|
$value: 'auth-type', |
|
|
|
$value: 'auth-type', |
|
|
|
width: 300, |
|
|
|
width: EDITOR_WIDTH, |
|
|
|
value: authType, |
|
|
|
value: authType, |
|
|
|
ref: (_ref: TextValueCombo) => { |
|
|
|
ref: (_ref: TextValueCombo) => { |
|
|
|
this.form.authType = _ref; |
|
|
|
this.form.authType = _ref; |
|
|
@ -381,7 +401,7 @@ export class FormJdbc extends BI.Widget { |
|
|
|
{ |
|
|
|
{ |
|
|
|
type: BI.TextEditor.xtype, |
|
|
|
type: BI.TextEditor.xtype, |
|
|
|
$value: 'username', |
|
|
|
$value: 'username', |
|
|
|
width: 300, |
|
|
|
width: EDITOR_WIDTH, |
|
|
|
allowBlank: true, |
|
|
|
allowBlank: true, |
|
|
|
value: user, |
|
|
|
value: user, |
|
|
|
watermark: BI.i18nText('Dec-Dcm_Connection_Form_UserName'), |
|
|
|
watermark: BI.i18nText('Dec-Dcm_Connection_Form_UserName'), |
|
|
@ -404,8 +424,8 @@ export class FormJdbc extends BI.Widget { |
|
|
|
type: BI.Editor.xtype, |
|
|
|
type: BI.Editor.xtype, |
|
|
|
$value: 'password', |
|
|
|
$value: 'password', |
|
|
|
cls: 'bi-border bi-border-radius', |
|
|
|
cls: 'bi-border bi-border-radius', |
|
|
|
width: 300, |
|
|
|
width: EDITOR_WIDTH, |
|
|
|
height: 20, |
|
|
|
height: EDITOR_HEIGHT, |
|
|
|
allowBlank: true, |
|
|
|
allowBlank: true, |
|
|
|
value: password, |
|
|
|
value: password, |
|
|
|
inputType: 'password', |
|
|
|
inputType: 'password', |
|
|
@ -478,7 +498,7 @@ export class FormJdbc extends BI.Widget { |
|
|
|
{ |
|
|
|
{ |
|
|
|
type: BI.TextValueCombo.xtype, |
|
|
|
type: BI.TextValueCombo.xtype, |
|
|
|
$value: 'principal', |
|
|
|
$value: 'principal', |
|
|
|
width: 300, |
|
|
|
width: EDITOR_WIDTH, |
|
|
|
value: principal, |
|
|
|
value: principal, |
|
|
|
ref: (_ref: TextEditor) => { |
|
|
|
ref: (_ref: TextEditor) => { |
|
|
|
this.form.principal = _ref; |
|
|
|
this.form.principal = _ref; |
|
|
@ -536,7 +556,7 @@ export class FormJdbc extends BI.Widget { |
|
|
|
{ |
|
|
|
{ |
|
|
|
type: BI.TextValueCombo.xtype, |
|
|
|
type: BI.TextValueCombo.xtype, |
|
|
|
$value: 'original-charset-name', |
|
|
|
$value: 'original-charset-name', |
|
|
|
width: 300, |
|
|
|
width: EDITOR_WIDTH, |
|
|
|
value: originalCharsetName ? originalCharsetName : '', |
|
|
|
value: originalCharsetName ? originalCharsetName : '', |
|
|
|
items: CONNECT_CHARSET, |
|
|
|
items: CONNECT_CHARSET, |
|
|
|
ref: (_ref: TextValueCombo) => { |
|
|
|
ref: (_ref: TextValueCombo) => { |
|
|
@ -549,7 +569,6 @@ export class FormJdbc extends BI.Widget { |
|
|
|
{ |
|
|
|
{ |
|
|
|
type: FormItem.xtype, |
|
|
|
type: FormItem.xtype, |
|
|
|
invisible: BI.isUndefined(databaseType.hasSchemas) ? !databaseType.hasSchema : !databaseType.hasSchemas[this.version], |
|
|
|
invisible: BI.isUndefined(databaseType.hasSchemas) ? !databaseType.hasSchema : !databaseType.hasSchemas[this.version], |
|
|
|
height: 64, |
|
|
|
|
|
|
|
name: BI.i18nText('Dec-Dcm_Connection_Form_Pattern'), |
|
|
|
name: BI.i18nText('Dec-Dcm_Connection_Form_Pattern'), |
|
|
|
forms: [ |
|
|
|
forms: [ |
|
|
|
{ |
|
|
|
{ |
|
|
@ -577,8 +596,8 @@ export class FormJdbc extends BI.Widget { |
|
|
|
{ |
|
|
|
{ |
|
|
|
type: BI.TextValueCombo.xtype, |
|
|
|
type: BI.TextValueCombo.xtype, |
|
|
|
$value: 'schema', |
|
|
|
$value: 'schema', |
|
|
|
width: 300, |
|
|
|
width: EDITOR_WIDTH, |
|
|
|
vgap: 15, |
|
|
|
tgap: 15, |
|
|
|
disabled: true, |
|
|
|
disabled: true, |
|
|
|
value: schema, |
|
|
|
value: schema, |
|
|
|
items: schema ? [{ text: schema, value: schema }] : [], |
|
|
|
items: schema ? [{ text: schema, value: schema }] : [], |
|
|
@ -593,6 +612,209 @@ export class FormJdbc extends BI.Widget { |
|
|
|
this.schemaForm = _ref; |
|
|
|
this.schemaForm = _ref; |
|
|
|
}, |
|
|
|
}, |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
// 并行装载设置
|
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
type: Collapse.xtype, |
|
|
|
|
|
|
|
invisible: BI.isNull(parallelLoad), |
|
|
|
|
|
|
|
name: BI.i18nText('Dec-Dcm_Connection_Setting', BI.i18nText('Dec-Dcm_Connection_Parallel_Load')), |
|
|
|
|
|
|
|
el: { |
|
|
|
|
|
|
|
type: TipsCombo.xtype, |
|
|
|
|
|
|
|
_lgap: 6, |
|
|
|
|
|
|
|
el: { |
|
|
|
|
|
|
|
type: BI.CenterAdaptLayout.xtype, |
|
|
|
|
|
|
|
innerHgap: 15, |
|
|
|
|
|
|
|
innerVgap: 10, |
|
|
|
|
|
|
|
items: [ |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
type: BI.Label.xtype, |
|
|
|
|
|
|
|
text: BI.i18nText('Dec-Dcm_Connection_Setting_Tips', BI.i18nText('Dec-Dcm_Connection_Parallel_Load')), |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* FIXME: 帮助链接待提供 |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
type: BI.A.xtype, |
|
|
|
|
|
|
|
href: '', |
|
|
|
|
|
|
|
el: { |
|
|
|
|
|
|
|
type: BI.Label.xtype, |
|
|
|
|
|
|
|
text: BI.i18nText('Dec-BI_Help_Paper'), |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
] |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
listeners: [ |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
eventName: EVENT_CHANGE, |
|
|
|
|
|
|
|
action: (isCollapse: boolean) => { |
|
|
|
|
|
|
|
this.parallelLoadSet.setVisible(!isCollapse); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
] |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
type: BI.VerticalLayout.xtype, |
|
|
|
|
|
|
|
invisible: true, |
|
|
|
|
|
|
|
ref: (_ref: VerticalLayout) => { |
|
|
|
|
|
|
|
this.parallelLoadSet = _ref; |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
items: [ |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
// 服务器地址-节点1
|
|
|
|
|
|
|
|
type: FormItem.xtype, |
|
|
|
|
|
|
|
name: `${BI.i18nText('Dec-Dcm_Connection_Server_Address')}-${BI.i18nText('Dec-Memory_Detection_Server_Cluster_Node', '1')}`, |
|
|
|
|
|
|
|
_bgap: vgap, |
|
|
|
|
|
|
|
forms: [ |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
type: BI.TextValueCombo.xtype, |
|
|
|
|
|
|
|
$value: 'server-cluster-node', |
|
|
|
|
|
|
|
width: EDITOR_WIDTH, |
|
|
|
|
|
|
|
value: parallelLoad?.serverAddress ?? '', |
|
|
|
|
|
|
|
items: parallelLoad?.serverAddressItems || [], |
|
|
|
|
|
|
|
listeners: [ |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
eventName: BI.TextValueCombo.EVENT_CHANGE, |
|
|
|
|
|
|
|
action: (value: string) => { |
|
|
|
|
|
|
|
this.form.parallelLoad.serverAddress = value; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
] |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
], |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
// 复用临时表
|
|
|
|
|
|
|
|
type: FormItem.xtype, |
|
|
|
|
|
|
|
name: BI.i18nText('Dec-Dcm_Connection_Reuse_Temporary_Table'), |
|
|
|
|
|
|
|
_bgap: vgap, |
|
|
|
|
|
|
|
forms: [ |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
type: BI.TextValueCombo.xtype, |
|
|
|
|
|
|
|
$value: 'reuse-temporary-table', |
|
|
|
|
|
|
|
width: EDITOR_WIDTH, |
|
|
|
|
|
|
|
value: parallelLoad?.reuseTemporaryTable ?? 0, |
|
|
|
|
|
|
|
items: YES_OR_NO, |
|
|
|
|
|
|
|
watermark: BI.i18nText('Dec-Dcm_Connection_Reuse_Temporary_Table'), |
|
|
|
|
|
|
|
listeners: [ |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
eventName: BI.TextValueCombo.EVENT_CHANGE, |
|
|
|
|
|
|
|
action: (value: number) => { |
|
|
|
|
|
|
|
this.form.parallelLoad.isReuseTemporaryTable = value; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
] |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
], |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
// 临时文件条数限制
|
|
|
|
|
|
|
|
type: FormItem.xtype, |
|
|
|
|
|
|
|
name: BI.i18nText('Dec-Dcm_Connection_Temporary_File_Pieces_Limit'), |
|
|
|
|
|
|
|
_bgap: vgap, |
|
|
|
|
|
|
|
forms: [ |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
type: BI.Editor.xtype, |
|
|
|
|
|
|
|
$value: 'temporary-file-pieces-limit', |
|
|
|
|
|
|
|
cls: 'bi-border bi-border-radius', |
|
|
|
|
|
|
|
width: EDITOR_WIDTH, |
|
|
|
|
|
|
|
height: EDITOR_HEIGHT, |
|
|
|
|
|
|
|
allowBlank: true, |
|
|
|
|
|
|
|
value: parallelLoad?.filePiecesLimit ?? '', |
|
|
|
|
|
|
|
watermark: BI.i18nText('Dec-Dcm_Connection_Temporary_File_Pieces_Limit'), |
|
|
|
|
|
|
|
ref: (_ref: Editor) => { |
|
|
|
|
|
|
|
this.form.parallelLoad.filePiecesLimit = _ref; |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
], |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
// 临时文件大小限制(MB)
|
|
|
|
|
|
|
|
type: FormItem.xtype, |
|
|
|
|
|
|
|
name: BI.i18nText('Dec-Dcm_Connection_Temporary_File_Size_Limit'), |
|
|
|
|
|
|
|
forms: [ |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
type: BI.Editor.xtype, |
|
|
|
|
|
|
|
$value: 'temporary-file-size-limit', |
|
|
|
|
|
|
|
cls: 'bi-border bi-border-radius', |
|
|
|
|
|
|
|
width: EDITOR_WIDTH, |
|
|
|
|
|
|
|
height: EDITOR_HEIGHT, |
|
|
|
|
|
|
|
allowBlank: true, |
|
|
|
|
|
|
|
value: parallelLoad?.fileSizeLimit ?? '', |
|
|
|
|
|
|
|
watermark: BI.i18nText('Dec-Dcm_Connection_Temporary_File_Size_Limit'), |
|
|
|
|
|
|
|
ref: (_ref: Editor) => { |
|
|
|
|
|
|
|
this.form.parallelLoad.fileSizeLimit = _ref; |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
], |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
] |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
// HDFS设置
|
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
type: Collapse.xtype, |
|
|
|
|
|
|
|
invisible: BI.isNull(hdfs), |
|
|
|
|
|
|
|
name: BI.i18nText('Dec-Dcm_Connection_Setting', 'HDFS'), |
|
|
|
|
|
|
|
el: { |
|
|
|
|
|
|
|
type: TipsCombo.xtype, |
|
|
|
|
|
|
|
_lgap: 6, |
|
|
|
|
|
|
|
el: { |
|
|
|
|
|
|
|
type: BI.CenterAdaptLayout.xtype, |
|
|
|
|
|
|
|
innerHgap: 15, |
|
|
|
|
|
|
|
innerVgap: 10, |
|
|
|
|
|
|
|
items: [ |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
type: BI.Label.xtype, |
|
|
|
|
|
|
|
text: BI.i18nText('Dec-Dcm_Connection_Setting_Tips', 'HDFS'), |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
type: BI.A.xtype, |
|
|
|
|
|
|
|
href: '', |
|
|
|
|
|
|
|
el: { |
|
|
|
|
|
|
|
type: BI.Label.xtype, |
|
|
|
|
|
|
|
text: BI.i18nText('Dec-BI_Help_Paper'), |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
] |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
listeners: [ |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
eventName: EVENT_CHANGE, |
|
|
|
|
|
|
|
action: (isCollapse: boolean) => { |
|
|
|
|
|
|
|
this.hdfsSet.setVisible(!isCollapse); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
] |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
type: BI.VerticalLayout.xtype, |
|
|
|
|
|
|
|
invisible: true, |
|
|
|
|
|
|
|
ref: (_ref: VerticalLayout) => { |
|
|
|
|
|
|
|
this.hdfsSet = _ref; |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
items: [ |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
// HDFS地址
|
|
|
|
|
|
|
|
type: FormItem.xtype, |
|
|
|
|
|
|
|
name: BI.i18nText('Dec-Dcm_Connection_Address', 'HDFS'), |
|
|
|
|
|
|
|
forms: [ |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
type: BI.Editor.xtype, |
|
|
|
|
|
|
|
$value: 'hdfs-connection-address', |
|
|
|
|
|
|
|
cls: 'bi-border bi-border-radius', |
|
|
|
|
|
|
|
width: EDITOR_WIDTH, |
|
|
|
|
|
|
|
height: EDITOR_HEIGHT, |
|
|
|
|
|
|
|
allowBlank: true, |
|
|
|
|
|
|
|
value: hdfs?.hdfsAddress ?? '', |
|
|
|
|
|
|
|
watermark: BI.i18nText('Dec-Dcm_Connection_Address', 'HDFS'), |
|
|
|
|
|
|
|
ref: (_ref: Editor) => { |
|
|
|
|
|
|
|
this.form.hdfs.hdfsAddress = _ref; |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
], |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
] |
|
|
|
|
|
|
|
}, |
|
|
|
// 分隔线
|
|
|
|
// 分隔线
|
|
|
|
{ |
|
|
|
{ |
|
|
|
type: BI.Layout.xtype, |
|
|
|
type: BI.Layout.xtype, |
|
|
@ -607,7 +829,7 @@ export class FormJdbc extends BI.Widget { |
|
|
|
{ |
|
|
|
{ |
|
|
|
type: BI.TextEditor.xtype, |
|
|
|
type: BI.TextEditor.xtype, |
|
|
|
$value: 'database-url', |
|
|
|
$value: 'database-url', |
|
|
|
width: 300, |
|
|
|
width: EDITOR_WIDTH, |
|
|
|
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'), |
|
|
@ -636,7 +858,7 @@ export class FormJdbc extends BI.Widget { |
|
|
|
{ |
|
|
|
{ |
|
|
|
type: TextChecker.xtype, |
|
|
|
type: TextChecker.xtype, |
|
|
|
$value: 'max-active', |
|
|
|
$value: 'max-active', |
|
|
|
width: 300, |
|
|
|
width: EDITOR_WIDTH, |
|
|
|
allowBlank: false, |
|
|
|
allowBlank: false, |
|
|
|
value: maxActive, |
|
|
|
value: maxActive, |
|
|
|
watermark: BI.i18nText('Dec-Dcm_Connection_Form_Database_Max_Active'), |
|
|
|
watermark: BI.i18nText('Dec-Dcm_Connection_Form_Database_Max_Active'), |
|
|
@ -662,7 +884,7 @@ export class FormJdbc extends BI.Widget { |
|
|
|
{ |
|
|
|
{ |
|
|
|
type: BI.TextValueCombo.xtype, |
|
|
|
type: BI.TextValueCombo.xtype, |
|
|
|
$value: 'check', |
|
|
|
$value: 'check', |
|
|
|
width: 300, |
|
|
|
width: EDITOR_WIDTH, |
|
|
|
allowBlank: true, |
|
|
|
allowBlank: true, |
|
|
|
value: testOnBorrow, |
|
|
|
value: testOnBorrow, |
|
|
|
items: this.getBooleanItem(), |
|
|
|
items: this.getBooleanItem(), |
|
|
@ -685,7 +907,7 @@ export class FormJdbc extends BI.Widget { |
|
|
|
allowBlank: true, |
|
|
|
allowBlank: true, |
|
|
|
watermark: BI.i18nText('Dec-Dcm_Connection_Form_SQL_Validation_Query_Watermark'), |
|
|
|
watermark: BI.i18nText('Dec-Dcm_Connection_Form_SQL_Validation_Query_Watermark'), |
|
|
|
value: api.getPlain(validationQuery || ''), |
|
|
|
value: api.getPlain(validationQuery || ''), |
|
|
|
width: 300, |
|
|
|
width: EDITOR_WIDTH, |
|
|
|
height: 100, |
|
|
|
height: 100, |
|
|
|
ref: (_ref: TextAreaEditor) => { |
|
|
|
ref: (_ref: TextAreaEditor) => { |
|
|
|
this.form.validationQuery = _ref; |
|
|
|
this.form.validationQuery = _ref; |
|
|
@ -701,7 +923,7 @@ export class FormJdbc extends BI.Widget { |
|
|
|
{ |
|
|
|
{ |
|
|
|
type: TextChecker.xtype, |
|
|
|
type: TextChecker.xtype, |
|
|
|
$value: 'max-wait', |
|
|
|
$value: 'max-wait', |
|
|
|
width: 300, |
|
|
|
width: EDITOR_WIDTH, |
|
|
|
allowBlank: false, |
|
|
|
allowBlank: false, |
|
|
|
value: maxWait, |
|
|
|
value: maxWait, |
|
|
|
watermark: BI.i18nText('Dec-Dcm_Connection_Form_Database_Max_Wait'), |
|
|
|
watermark: BI.i18nText('Dec-Dcm_Connection_Form_Database_Max_Wait'), |
|
|
@ -842,7 +1064,7 @@ export class FormJdbc extends BI.Widget { |
|
|
|
ref: (_ref: TextValueCombo) => { |
|
|
|
ref: (_ref: TextValueCombo) => { |
|
|
|
this.form.sshType = _ref; |
|
|
|
this.form.sshType = _ref; |
|
|
|
}, |
|
|
|
}, |
|
|
|
width: 300, |
|
|
|
width: EDITOR_WIDTH, |
|
|
|
watermark: BI.i18nText('Dec-Dcm_Connection_Form_VerifyType'), |
|
|
|
watermark: BI.i18nText('Dec-Dcm_Connection_Form_VerifyType'), |
|
|
|
items: CONNECT_SSH_TYPE, |
|
|
|
items: CONNECT_SSH_TYPE, |
|
|
|
value: sshType, |
|
|
|
value: sshType, |
|
|
@ -985,7 +1207,7 @@ export class FormJdbc extends BI.Widget { |
|
|
|
ref: (_ref: TextValueCombo) => { |
|
|
|
ref: (_ref: TextValueCombo) => { |
|
|
|
this.form.verifyCa = _ref; |
|
|
|
this.form.verifyCa = _ref; |
|
|
|
}, |
|
|
|
}, |
|
|
|
width: 300, |
|
|
|
width: EDITOR_WIDTH, |
|
|
|
watermark: BI.i18nText('Dec-Dcm_Connection_Form_Verify_CA_Certificate'), |
|
|
|
watermark: BI.i18nText('Dec-Dcm_Connection_Form_Verify_CA_Certificate'), |
|
|
|
items: this.getBooleanItem(), |
|
|
|
items: this.getBooleanItem(), |
|
|
|
value: verifyCa, |
|
|
|
value: verifyCa, |
|
|
@ -1059,7 +1281,7 @@ export class FormJdbc extends BI.Widget { |
|
|
|
{ |
|
|
|
{ |
|
|
|
type: TextChecker.xtype, |
|
|
|
type: TextChecker.xtype, |
|
|
|
$value: 'initial-size', |
|
|
|
$value: 'initial-size', |
|
|
|
width: 300, |
|
|
|
width: EDITOR_WIDTH, |
|
|
|
allowBlank: false, |
|
|
|
allowBlank: false, |
|
|
|
value: initialSize, |
|
|
|
value: initialSize, |
|
|
|
validationChecker: [ |
|
|
|
validationChecker: [ |
|
|
@ -1084,7 +1306,7 @@ export class FormJdbc extends BI.Widget { |
|
|
|
{ |
|
|
|
{ |
|
|
|
type: TextChecker.xtype, |
|
|
|
type: TextChecker.xtype, |
|
|
|
$value: 'min-idle', |
|
|
|
$value: 'min-idle', |
|
|
|
width: 300, |
|
|
|
width: EDITOR_WIDTH, |
|
|
|
allowBlank: false, |
|
|
|
allowBlank: false, |
|
|
|
value: minIdle, |
|
|
|
value: minIdle, |
|
|
|
watermark: BI.i18nText('Dec-Dcm_Connection_Form_Database_Min_Idle'), |
|
|
|
watermark: BI.i18nText('Dec-Dcm_Connection_Form_Database_Min_Idle'), |
|
|
@ -1109,7 +1331,7 @@ export class FormJdbc extends BI.Widget { |
|
|
|
{ |
|
|
|
{ |
|
|
|
type: BI.TextValueCombo.xtype, |
|
|
|
type: BI.TextValueCombo.xtype, |
|
|
|
$value: 'test-on-return', |
|
|
|
$value: 'test-on-return', |
|
|
|
width: 300, |
|
|
|
width: EDITOR_WIDTH, |
|
|
|
allowBlank: true, |
|
|
|
allowBlank: true, |
|
|
|
value: testOnReturn, |
|
|
|
value: testOnReturn, |
|
|
|
items: this.getBooleanItem(), |
|
|
|
items: this.getBooleanItem(), |
|
|
@ -1127,7 +1349,7 @@ export class FormJdbc extends BI.Widget { |
|
|
|
{ |
|
|
|
{ |
|
|
|
type: BI.TextValueCombo.xtype, |
|
|
|
type: BI.TextValueCombo.xtype, |
|
|
|
$value: 'test-while-idle', |
|
|
|
$value: 'test-while-idle', |
|
|
|
width: 300, |
|
|
|
width: EDITOR_WIDTH, |
|
|
|
allowBlank: true, |
|
|
|
allowBlank: true, |
|
|
|
value: testWhileIdle, |
|
|
|
value: testWhileIdle, |
|
|
|
items: this.getBooleanItem(), |
|
|
|
items: this.getBooleanItem(), |
|
|
@ -1145,7 +1367,7 @@ export class FormJdbc extends BI.Widget { |
|
|
|
{ |
|
|
|
{ |
|
|
|
type: TextChecker.xtype, |
|
|
|
type: TextChecker.xtype, |
|
|
|
$value: 'test-between-evicition-millis', |
|
|
|
$value: 'test-between-evicition-millis', |
|
|
|
width: 300, |
|
|
|
width: EDITOR_WIDTH, |
|
|
|
allowBlank: false, |
|
|
|
allowBlank: false, |
|
|
|
value: timeBetweenEvictionRunsMillis, |
|
|
|
value: timeBetweenEvictionRunsMillis, |
|
|
|
watermark: BI.i18nText('Dec-Dcm_Connection_Form_Database_Test_Between_Eviction_Millis'), |
|
|
|
watermark: BI.i18nText('Dec-Dcm_Connection_Form_Database_Test_Between_Eviction_Millis'), |
|
|
@ -1176,7 +1398,7 @@ export class FormJdbc extends BI.Widget { |
|
|
|
{ |
|
|
|
{ |
|
|
|
type: TextChecker.xtype, |
|
|
|
type: TextChecker.xtype, |
|
|
|
$value: 'test-pereviction-run-num', |
|
|
|
$value: 'test-pereviction-run-num', |
|
|
|
width: 300, |
|
|
|
width: EDITOR_WIDTH, |
|
|
|
allowBlank: false, |
|
|
|
allowBlank: false, |
|
|
|
value: numTestsPerEvictionRun, |
|
|
|
value: numTestsPerEvictionRun, |
|
|
|
watermark: BI.i18nText('Dec-Dcm_Connection_Form_Database_Tests_PerEviction_Run_Num'), |
|
|
|
watermark: BI.i18nText('Dec-Dcm_Connection_Form_Database_Tests_PerEviction_Run_Num'), |
|
|
@ -1201,7 +1423,7 @@ export class FormJdbc extends BI.Widget { |
|
|
|
{ |
|
|
|
{ |
|
|
|
type: TextChecker.xtype, |
|
|
|
type: TextChecker.xtype, |
|
|
|
$value: 'min-evictable-idle-time-millis', |
|
|
|
$value: 'min-evictable-idle-time-millis', |
|
|
|
width: 300, |
|
|
|
width: EDITOR_WIDTH, |
|
|
|
allowBlank: false, |
|
|
|
allowBlank: false, |
|
|
|
value: minEvictableIdleTimeMillis, |
|
|
|
value: minEvictableIdleTimeMillis, |
|
|
|
watermark: BI.i18nText('Dec-Dcm_Connection_Form_Database_Min_Evictable_Idle_Time_Millis'), |
|
|
|
watermark: BI.i18nText('Dec-Dcm_Connection_Form_Database_Min_Evictable_Idle_Time_Millis'), |
|
|
@ -1239,7 +1461,7 @@ export class FormJdbc extends BI.Widget { |
|
|
|
{ |
|
|
|
{ |
|
|
|
type: TextChecker.xtype, |
|
|
|
type: TextChecker.xtype, |
|
|
|
$value: 'fetch-size', |
|
|
|
$value: 'fetch-size', |
|
|
|
width: 300, |
|
|
|
width: EDITOR_WIDTH, |
|
|
|
allowBlank: true, |
|
|
|
allowBlank: true, |
|
|
|
value: fetchSize === -2 ? '' : fetchSize, |
|
|
|
value: fetchSize === -2 ? '' : fetchSize, |
|
|
|
watermark: 'Fetchsize', |
|
|
|
watermark: 'Fetchsize', |
|
|
@ -1422,6 +1644,7 @@ export class FormJdbc extends BI.Widget { |
|
|
|
const connectionPoolAttr = connectionData.connectionPoolAttr; |
|
|
|
const connectionPoolAttr = connectionData.connectionPoolAttr; |
|
|
|
const originalCharsetName = this.form.originalCharsetName.getValue()[0] || ''; |
|
|
|
const originalCharsetName = this.form.originalCharsetName.getValue()[0] || ''; |
|
|
|
// TODO 获取表单数据这里待优化
|
|
|
|
// TODO 获取表单数据这里待优化
|
|
|
|
|
|
|
|
const { parallelLoad, hdfs } = this.form; |
|
|
|
|
|
|
|
|
|
|
|
return { |
|
|
|
return { |
|
|
|
connectionType: connectionType.JDBC, |
|
|
|
connectionType: connectionType.JDBC, |
|
|
@ -1478,6 +1701,17 @@ export class FormJdbc extends BI.Widget { |
|
|
|
numTestsPerEvictionRun: this.form.numTestsPerEvictionRun.getValue(), |
|
|
|
numTestsPerEvictionRun: this.form.numTestsPerEvictionRun.getValue(), |
|
|
|
minEvictableIdleTimeMillis: this.form.minEvictableIdleTimeMillis.getValue(), |
|
|
|
minEvictableIdleTimeMillis: this.form.minEvictableIdleTimeMillis.getValue(), |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
// 并行装载
|
|
|
|
|
|
|
|
parallelLoad: { |
|
|
|
|
|
|
|
serverAddress: parallelLoad.serverAddress, |
|
|
|
|
|
|
|
isReuseTemporaryTable: parallelLoad.isReuseTemporaryTable, |
|
|
|
|
|
|
|
filePiecesLimit: parallelLoad.filePiecesLimit.getValue(), |
|
|
|
|
|
|
|
fileSizeLimit: parallelLoad.fileSizeLimit.getValue(), |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
hdfs: { |
|
|
|
|
|
|
|
hdfsAddress: hdfs.hdfsAddress.getValue(), |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
// HDFS
|
|
|
|
}), |
|
|
|
}), |
|
|
|
}; |
|
|
|
}; |
|
|
|
} |
|
|
|
} |
|
|
|