|
|
@ -1,15 +1,26 @@ |
|
|
|
import {WidgetType, Vertical, MultiSelectItem, TextAreaEditor, Button, TextValueCombo, TextEditor} from '@ui/index'; |
|
|
|
import {WidgetType, Vertical, MultiSelectItem, TextAreaEditor, Button, TextValueCombo, TextEditor, VerticalAdapt, Label} from '@ui/index'; |
|
|
|
import {LinkType} from '@ui/type'; |
|
|
|
import {LinkType} from '@ui/type'; |
|
|
|
import {CONNECT_CHARSET} from '@private/constants'; |
|
|
|
import {CONNECT_CHARSET} from '@private/constants'; |
|
|
|
import Model from '../../link_set.model'; |
|
|
|
import Model from '../../link_set.model'; |
|
|
|
import FormItem from '@shared/components/form_item'; |
|
|
|
|
|
|
|
import Title from '@shared/components/title'; |
|
|
|
import Title from '@shared/components/title'; |
|
|
|
import {getDrivers, connectNameChecker} from './right_edit.service'; |
|
|
|
import {getDrivers, connectNameChecker} from './right_edit.service'; |
|
|
|
|
|
|
|
let connectionName: any = null; |
|
|
|
const className = 'dec.dcm.component.right.edit.mysql'; |
|
|
|
const className = 'dec.dcm.component.right.edit.mysql'; |
|
|
|
const Widget: WidgetType = { |
|
|
|
const Widget: WidgetType = { |
|
|
|
_store() { |
|
|
|
_store() { |
|
|
|
return BI.Models.getModel(Model); |
|
|
|
return BI.Models.getModel(Model); |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
watch: { |
|
|
|
|
|
|
|
connectionNameErr(msg: string) { |
|
|
|
|
|
|
|
if (msg) { |
|
|
|
|
|
|
|
BI.Bubbles.show('singleBubble', msg, connectionName, { |
|
|
|
|
|
|
|
level: 'error', |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
BI.Bubbles.hide('singleBubble'); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
}, |
|
|
|
render() { |
|
|
|
render() { |
|
|
|
const linkSelected: LinkType = this.model.linkSelected; |
|
|
|
const linkSelected: LinkType = this.model.linkSelected; |
|
|
|
const that = this; |
|
|
|
const that = this; |
|
|
@ -19,13 +30,22 @@ const Widget: WidgetType = { |
|
|
|
vgap: 10, |
|
|
|
vgap: 10, |
|
|
|
items: [ |
|
|
|
items: [ |
|
|
|
{ |
|
|
|
{ |
|
|
|
type: FormItem, |
|
|
|
type: VerticalAdapt, |
|
|
|
|
|
|
|
items: [ |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
type: Label, |
|
|
|
|
|
|
|
cls: 'bi-font-bold', |
|
|
|
|
|
|
|
width: 115, |
|
|
|
|
|
|
|
textAlign: 'left', |
|
|
|
text: BI.i18nText('Dec-Dcm_Connection_Form_ConnectionName'), |
|
|
|
text: BI.i18nText('Dec-Dcm_Connection_Form_ConnectionName'), |
|
|
|
hint: BI.i18nText('Dec-Dcm_Connection_Form_ConnectionName-Change-Confirm'), |
|
|
|
}, |
|
|
|
form: { |
|
|
|
{ |
|
|
|
type: TextEditor, |
|
|
|
type: TextEditor, |
|
|
|
width: 300, |
|
|
|
width: 300, |
|
|
|
value: linkSelected.connectionName, |
|
|
|
value: linkSelected.connectionName, |
|
|
|
|
|
|
|
ref(ref: any) { |
|
|
|
|
|
|
|
connectionName = ref; |
|
|
|
|
|
|
|
}, |
|
|
|
listeners: [{ |
|
|
|
listeners: [{ |
|
|
|
eventName: BI.Editor.EVENT_CHANGE, |
|
|
|
eventName: BI.Editor.EVENT_CHANGE, |
|
|
|
action() { |
|
|
|
action() { |
|
|
@ -34,13 +54,34 @@ const Widget: WidgetType = { |
|
|
|
connectionName: this.getValue(), |
|
|
|
connectionName: this.getValue(), |
|
|
|
}); |
|
|
|
}); |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
}, { |
|
|
|
|
|
|
|
eventName: BI.Editor.EVENT_FOCUS, |
|
|
|
|
|
|
|
action() { |
|
|
|
|
|
|
|
that.store.setConnectionNameErr(''); |
|
|
|
|
|
|
|
}, |
|
|
|
}], |
|
|
|
}], |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
type: Label, |
|
|
|
|
|
|
|
cls: 'bi-water-mark', |
|
|
|
|
|
|
|
lgap: 5, |
|
|
|
|
|
|
|
textAlign: 'left', |
|
|
|
|
|
|
|
text: BI.i18nText('Dec-Dcm_Connection_Form_ConnectionName-Change-Confirm'), |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
], |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
type: VerticalAdapt, |
|
|
|
|
|
|
|
items: [ |
|
|
|
{ |
|
|
|
{ |
|
|
|
type: FormItem, |
|
|
|
type: Label, |
|
|
|
|
|
|
|
cls: 'bi-font-bold', |
|
|
|
|
|
|
|
width: 115, |
|
|
|
|
|
|
|
textAlign: 'left', |
|
|
|
text: BI.i18nText('Dec-Dcm_Connection_Form_Driver'), |
|
|
|
text: BI.i18nText('Dec-Dcm_Connection_Form_Driver'), |
|
|
|
form: { |
|
|
|
}, |
|
|
|
|
|
|
|
{ |
|
|
|
type: TextValueCombo, |
|
|
|
type: TextValueCombo, |
|
|
|
width: 300, |
|
|
|
width: 300, |
|
|
|
text: linkSelected.driver, |
|
|
|
text: linkSelected.driver, |
|
|
@ -55,11 +96,19 @@ const Widget: WidgetType = { |
|
|
|
}, |
|
|
|
}, |
|
|
|
}], |
|
|
|
}], |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
], |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
{ |
|
|
|
type: FormItem, |
|
|
|
type: VerticalAdapt, |
|
|
|
|
|
|
|
items: [ |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
type: Label, |
|
|
|
|
|
|
|
cls: 'bi-font-bold', |
|
|
|
|
|
|
|
width: 115, |
|
|
|
|
|
|
|
textAlign: 'left', |
|
|
|
text: BI.i18nText('Dec-Dcm_Connection_Form_URL'), |
|
|
|
text: BI.i18nText('Dec-Dcm_Connection_Form_URL'), |
|
|
|
form: { |
|
|
|
}, |
|
|
|
|
|
|
|
{ |
|
|
|
type: TextEditor, |
|
|
|
type: TextEditor, |
|
|
|
watermark: BI.i18nText('Dec-Dcm_Connection_Form_Place_Input'), |
|
|
|
watermark: BI.i18nText('Dec-Dcm_Connection_Form_Place_Input'), |
|
|
|
width: 300, |
|
|
|
width: 300, |
|
|
@ -74,11 +123,19 @@ const Widget: WidgetType = { |
|
|
|
}, |
|
|
|
}, |
|
|
|
}], |
|
|
|
}], |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
], |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
{ |
|
|
|
type: FormItem, |
|
|
|
type: VerticalAdapt, |
|
|
|
|
|
|
|
items: [ |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
type: Label, |
|
|
|
|
|
|
|
cls: 'bi-font-bold', |
|
|
|
|
|
|
|
width: 115, |
|
|
|
|
|
|
|
textAlign: 'left', |
|
|
|
text: BI.i18nText('Dec-Dcm_Connection_Form_OriginalCharsetName'), |
|
|
|
text: BI.i18nText('Dec-Dcm_Connection_Form_OriginalCharsetName'), |
|
|
|
form: { |
|
|
|
}, |
|
|
|
|
|
|
|
{ |
|
|
|
type: TextValueCombo, |
|
|
|
type: TextValueCombo, |
|
|
|
width: 300, |
|
|
|
width: 300, |
|
|
|
text: linkSelected.originalCharsetName === '' ? BI.i18nText('Dec-Dcm_Connection_Form_Auto') : linkSelected.originalCharsetName, |
|
|
|
text: linkSelected.originalCharsetName === '' ? BI.i18nText('Dec-Dcm_Connection_Form_Auto') : linkSelected.originalCharsetName, |
|
|
@ -99,11 +156,19 @@ const Widget: WidgetType = { |
|
|
|
}, |
|
|
|
}, |
|
|
|
}], |
|
|
|
}], |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
], |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
{ |
|
|
|
type: FormItem, |
|
|
|
type: VerticalAdapt, |
|
|
|
|
|
|
|
items: [ |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
type: Label, |
|
|
|
|
|
|
|
cls: 'bi-font-bold', |
|
|
|
|
|
|
|
width: 115, |
|
|
|
|
|
|
|
textAlign: 'left', |
|
|
|
text: BI.i18nText('Dec-Dcm_Connection_Form_UserName'), |
|
|
|
text: BI.i18nText('Dec-Dcm_Connection_Form_UserName'), |
|
|
|
form: { |
|
|
|
}, |
|
|
|
|
|
|
|
{ |
|
|
|
type: TextEditor, |
|
|
|
type: TextEditor, |
|
|
|
allowBlank: true, |
|
|
|
allowBlank: true, |
|
|
|
watermark: BI.i18nText('Dec-Dcm_Connection_Form_Place_Input'), |
|
|
|
watermark: BI.i18nText('Dec-Dcm_Connection_Form_Place_Input'), |
|
|
@ -119,11 +184,19 @@ const Widget: WidgetType = { |
|
|
|
}, |
|
|
|
}, |
|
|
|
}], |
|
|
|
}], |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
], |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
{ |
|
|
|
type: FormItem, |
|
|
|
type: VerticalAdapt, |
|
|
|
|
|
|
|
items: [ |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
type: Label, |
|
|
|
|
|
|
|
cls: 'bi-font-bold', |
|
|
|
|
|
|
|
width: 115, |
|
|
|
|
|
|
|
textAlign: 'left', |
|
|
|
text: BI.i18nText('Dec-Dcm_Connection_Form_Password'), |
|
|
|
text: BI.i18nText('Dec-Dcm_Connection_Form_Password'), |
|
|
|
form: { |
|
|
|
}, |
|
|
|
|
|
|
|
{ |
|
|
|
type: TextEditor, |
|
|
|
type: TextEditor, |
|
|
|
inputType: 'password', |
|
|
|
inputType: 'password', |
|
|
|
allowBlank: true, |
|
|
|
allowBlank: true, |
|
|
@ -140,17 +213,25 @@ const Widget: WidgetType = { |
|
|
|
}, |
|
|
|
}, |
|
|
|
}], |
|
|
|
}], |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
], |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
{ |
|
|
|
type: Title, |
|
|
|
type: Title, |
|
|
|
text: BI.i18nText('Dec-Dcm_Connection_Form_Pool_Properties'), |
|
|
|
text: BI.i18nText('Dec-Dcm_Connection_Form_Pool_Properties'), |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
{ |
|
|
|
type: FormItem, |
|
|
|
type: VerticalAdapt, |
|
|
|
|
|
|
|
items: [ |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
type: Label, |
|
|
|
|
|
|
|
cls: 'bi-font-bold', |
|
|
|
|
|
|
|
width: 115, |
|
|
|
|
|
|
|
textAlign: 'left', |
|
|
|
text: BI.i18nText('Dec-Dcm_Connection_Form_SQL_Validation_Query'), |
|
|
|
text: BI.i18nText('Dec-Dcm_Connection_Form_SQL_Validation_Query'), |
|
|
|
height: 100, |
|
|
|
}, |
|
|
|
form: { |
|
|
|
{ |
|
|
|
type: TextAreaEditor, |
|
|
|
type: TextAreaEditor, |
|
|
|
|
|
|
|
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'), |
|
|
|
width: 300, |
|
|
|
width: 300, |
|
|
@ -166,11 +247,19 @@ const Widget: WidgetType = { |
|
|
|
}, |
|
|
|
}, |
|
|
|
}], |
|
|
|
}], |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
], |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
{ |
|
|
|
type: FormItem, |
|
|
|
type: VerticalAdapt, |
|
|
|
|
|
|
|
items: [ |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
type: Label, |
|
|
|
|
|
|
|
cls: 'bi-font-bold', |
|
|
|
|
|
|
|
width: 115, |
|
|
|
|
|
|
|
textAlign: 'left', |
|
|
|
text: BI.i18nText('Dec-Dcm_Connection_Form_Connection-Check'), |
|
|
|
text: BI.i18nText('Dec-Dcm_Connection_Form_Connection-Check'), |
|
|
|
form: { |
|
|
|
}, |
|
|
|
|
|
|
|
{ |
|
|
|
type: MultiSelectItem, |
|
|
|
type: MultiSelectItem, |
|
|
|
text: BI.i18nText('Dec-Dcm_Yes'), |
|
|
|
text: BI.i18nText('Dec-Dcm_Yes'), |
|
|
|
selected: linkSelected.testOnBorrow, |
|
|
|
selected: linkSelected.testOnBorrow, |
|
|
@ -185,11 +274,19 @@ const Widget: WidgetType = { |
|
|
|
}, |
|
|
|
}, |
|
|
|
}], |
|
|
|
}], |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
], |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
{ |
|
|
|
type: FormItem, |
|
|
|
type: VerticalAdapt, |
|
|
|
|
|
|
|
items: [ |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
type: Label, |
|
|
|
|
|
|
|
cls: 'bi-font-bold', |
|
|
|
|
|
|
|
width: 115, |
|
|
|
|
|
|
|
textAlign: 'left', |
|
|
|
text: BI.i18nText('Dec-Dcm_Connection_Form_Connection_Max_Number'), |
|
|
|
text: BI.i18nText('Dec-Dcm_Connection_Form_Connection_Max_Number'), |
|
|
|
form: { |
|
|
|
}, |
|
|
|
|
|
|
|
{ |
|
|
|
type: TextEditor, |
|
|
|
type: TextEditor, |
|
|
|
allowBlank: true, |
|
|
|
allowBlank: true, |
|
|
|
watermark: BI.i18nText('Dec-Dcm_Connection_Form_Place_Input'), |
|
|
|
watermark: BI.i18nText('Dec-Dcm_Connection_Form_Place_Input'), |
|
|
@ -207,15 +304,18 @@ const Widget: WidgetType = { |
|
|
|
}, |
|
|
|
}, |
|
|
|
}], |
|
|
|
}], |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
], |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
{ |
|
|
|
type: FormItem, |
|
|
|
type: VerticalAdapt, |
|
|
|
text: BI.i18nText('Dec-Dcm_Test_Connection'), |
|
|
|
items: [ |
|
|
|
form: { |
|
|
|
{ |
|
|
|
type: Button, |
|
|
|
type: Button, |
|
|
|
|
|
|
|
width: 80, |
|
|
|
text: BI.i18nText('Dec-Dcm_Test_Connection'), |
|
|
|
text: BI.i18nText('Dec-Dcm_Test_Connection'), |
|
|
|
level: 'ignore', |
|
|
|
level: 'ignore', |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
], |
|
|
|
}, |
|
|
|
}, |
|
|
|
], |
|
|
|
], |
|
|
|
}; |
|
|
|
}; |
|
|
|