|
|
@ -4,14 +4,14 @@ import charset from './right.edit.constant'; |
|
|
|
import Model from '../../link-set.model'; |
|
|
|
import Model from '../../link-set.model'; |
|
|
|
import FormItem from '@shared/components/form.item.component'; |
|
|
|
import FormItem from '@shared/components/form.item.component'; |
|
|
|
import Title from '@shared/components/title.component'; |
|
|
|
import Title from '@shared/components/title.component'; |
|
|
|
import {getDrivers} from './right.edit.service'; |
|
|
|
import {getDrivers, connectNameChecker} from './right.edit.service'; |
|
|
|
let ConnectionName: any = null; |
|
|
|
let ConnectionName: any = null; |
|
|
|
const className = 'fr.component.right.edit'; |
|
|
|
const className = 'fr.component.right.edit'; |
|
|
|
const Widget: WidgetType = { |
|
|
|
const Widget: WidgetType = { |
|
|
|
_store() { |
|
|
|
_store() { |
|
|
|
return BI.Models.getModel(Model); |
|
|
|
return BI.Models.getModel(Model); |
|
|
|
}, |
|
|
|
}, |
|
|
|
watch:{ |
|
|
|
watch: { |
|
|
|
connectionNameErr(msg: string) { |
|
|
|
connectionNameErr(msg: string) { |
|
|
|
if (msg) { |
|
|
|
if (msg) { |
|
|
|
BI.Bubbles.show('singleBubble', msg, ConnectionName, { |
|
|
|
BI.Bubbles.show('singleBubble', msg, ConnectionName, { |
|
|
@ -34,7 +34,7 @@ const Widget: WidgetType = { |
|
|
|
type: FormItem, |
|
|
|
type: FormItem, |
|
|
|
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'), |
|
|
|
hint: BI.i18nText('Dec-Dcm_Connection_Form_ConnectionName-Change-Confirm'), |
|
|
|
form:{ |
|
|
|
form: { |
|
|
|
type: Editor, |
|
|
|
type: Editor, |
|
|
|
cls: 'bi-border', |
|
|
|
cls: 'bi-border', |
|
|
|
width: 300, |
|
|
|
width: 300, |
|
|
@ -62,14 +62,14 @@ const Widget: WidgetType = { |
|
|
|
type: FormItem, |
|
|
|
type: FormItem, |
|
|
|
text: BI.i18nText('Dec-Dcm_First_Step'), |
|
|
|
text: BI.i18nText('Dec-Dcm_First_Step'), |
|
|
|
height: 400, |
|
|
|
height: 400, |
|
|
|
form:{ |
|
|
|
form: { |
|
|
|
type: Vertical, |
|
|
|
type: Vertical, |
|
|
|
cls: 'right-form', |
|
|
|
cls: 'right-form', |
|
|
|
items:[ |
|
|
|
items: [ |
|
|
|
{ |
|
|
|
{ |
|
|
|
type: FormItem, |
|
|
|
type: FormItem, |
|
|
|
text: BI.i18nText('Dec-Dcm_Connection_Form_Driver'), |
|
|
|
text: BI.i18nText('Dec-Dcm_Connection_Form_Driver'), |
|
|
|
form:{ |
|
|
|
form: { |
|
|
|
type: TextValueCombo, |
|
|
|
type: TextValueCombo, |
|
|
|
cls: 'bi-border', |
|
|
|
cls: 'bi-border', |
|
|
|
width: 300, |
|
|
|
width: 300, |
|
|
@ -89,10 +89,10 @@ const Widget: WidgetType = { |
|
|
|
{ |
|
|
|
{ |
|
|
|
type: FormItem, |
|
|
|
type: FormItem, |
|
|
|
text: BI.i18nText('Dec-Dcm_Connection_Form_URL'), |
|
|
|
text: BI.i18nText('Dec-Dcm_Connection_Form_URL'), |
|
|
|
form:{ |
|
|
|
form: { |
|
|
|
type: Editor, |
|
|
|
type: Editor, |
|
|
|
cls: 'bi-border', |
|
|
|
cls: 'bi-border', |
|
|
|
watermark:BI.i18nText('Dec-Dcm_Connection_Form_Place_Input'), |
|
|
|
watermark: BI.i18nText('Dec-Dcm_Connection_Form_Place_Input'), |
|
|
|
width: 300, |
|
|
|
width: 300, |
|
|
|
value: linkSelected.url, |
|
|
|
value: linkSelected.url, |
|
|
|
listeners: [{ |
|
|
|
listeners: [{ |
|
|
@ -109,12 +109,18 @@ const Widget: WidgetType = { |
|
|
|
{ |
|
|
|
{ |
|
|
|
type: FormItem, |
|
|
|
type: FormItem, |
|
|
|
text: BI.i18nText('Dec-Dcm_Connection_Form_OriginalCharsetName'), |
|
|
|
text: BI.i18nText('Dec-Dcm_Connection_Form_OriginalCharsetName'), |
|
|
|
form:{ |
|
|
|
form: { |
|
|
|
type: TextValueCombo, |
|
|
|
type: TextValueCombo, |
|
|
|
cls: 'bi-border', |
|
|
|
cls: 'bi-border', |
|
|
|
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, |
|
|
|
items: BI.Constants.getConstant(charset), |
|
|
|
items: [ |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
text: BI.i18nText('Dec-Dcm_Connection_Form_Auto'), |
|
|
|
|
|
|
|
value: '', |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
...BI.Constants.getConstant(charset), |
|
|
|
|
|
|
|
], |
|
|
|
listeners: [{ |
|
|
|
listeners: [{ |
|
|
|
eventName: BI.TextValueCombo.EVENT_CHANGE, |
|
|
|
eventName: BI.TextValueCombo.EVENT_CHANGE, |
|
|
|
action() { |
|
|
|
action() { |
|
|
@ -129,11 +135,11 @@ const Widget: WidgetType = { |
|
|
|
{ |
|
|
|
{ |
|
|
|
type: FormItem, |
|
|
|
type: FormItem, |
|
|
|
text: BI.i18nText('Dec-Dcm_Connection_Form_UserName'), |
|
|
|
text: BI.i18nText('Dec-Dcm_Connection_Form_UserName'), |
|
|
|
form:{ |
|
|
|
form: { |
|
|
|
type: Editor, |
|
|
|
type: Editor, |
|
|
|
cls: 'bi-border', |
|
|
|
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, |
|
|
|
value: linkSelected.user, |
|
|
|
value: linkSelected.user, |
|
|
|
listeners: [{ |
|
|
|
listeners: [{ |
|
|
@ -150,12 +156,12 @@ const Widget: WidgetType = { |
|
|
|
{ |
|
|
|
{ |
|
|
|
type: FormItem, |
|
|
|
type: FormItem, |
|
|
|
text: BI.i18nText('Dec-Dcm_Connection_Form_Password'), |
|
|
|
text: BI.i18nText('Dec-Dcm_Connection_Form_Password'), |
|
|
|
form:{ |
|
|
|
form: { |
|
|
|
type: Editor, |
|
|
|
type: Editor, |
|
|
|
cls: 'bi-border', |
|
|
|
cls: 'bi-border', |
|
|
|
inputType:'password', |
|
|
|
inputType: 'password', |
|
|
|
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, |
|
|
|
value: linkSelected.password, |
|
|
|
value: linkSelected.password, |
|
|
|
listeners: [{ |
|
|
|
listeners: [{ |
|
|
@ -177,13 +183,13 @@ const Widget: WidgetType = { |
|
|
|
type: FormItem, |
|
|
|
type: FormItem, |
|
|
|
text: BI.i18nText('Dec-Dcm_Connection_Form_SQL_Validation_Query'), |
|
|
|
text: BI.i18nText('Dec-Dcm_Connection_Form_SQL_Validation_Query'), |
|
|
|
height: 100, |
|
|
|
height: 100, |
|
|
|
form:{ |
|
|
|
form: { |
|
|
|
type: TextAreaEditor, |
|
|
|
type: TextAreaEditor, |
|
|
|
cls: 'bi-border', |
|
|
|
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, |
|
|
|
height:100, |
|
|
|
height: 100, |
|
|
|
value: linkSelected.validationQuery, |
|
|
|
value: linkSelected.validationQuery, |
|
|
|
listeners: [{ |
|
|
|
listeners: [{ |
|
|
|
eventName: BI.Editor.EVENT_CHANGE, |
|
|
|
eventName: BI.Editor.EVENT_CHANGE, |
|
|
@ -199,7 +205,7 @@ const Widget: WidgetType = { |
|
|
|
{ |
|
|
|
{ |
|
|
|
type: FormItem, |
|
|
|
type: FormItem, |
|
|
|
text: BI.i18nText('Dec-Dcm_Connection_Form_Connection-Check'), |
|
|
|
text: BI.i18nText('Dec-Dcm_Connection_Form_Connection-Check'), |
|
|
|
form:{ |
|
|
|
form: { |
|
|
|
type: MultiSelectItem, |
|
|
|
type: MultiSelectItem, |
|
|
|
text: BI.i18nText('Dec-Dcm_Yes'), |
|
|
|
text: BI.i18nText('Dec-Dcm_Yes'), |
|
|
|
selected: linkSelected.testOnBorrow, |
|
|
|
selected: linkSelected.testOnBorrow, |
|
|
@ -218,21 +224,15 @@ const Widget: WidgetType = { |
|
|
|
{ |
|
|
|
{ |
|
|
|
type: FormItem, |
|
|
|
type: FormItem, |
|
|
|
text: BI.i18nText('Dec-Dcm_Connection_Form_Connection_Max_Number'), |
|
|
|
text: BI.i18nText('Dec-Dcm_Connection_Form_Connection_Max_Number'), |
|
|
|
form:{ |
|
|
|
form: { |
|
|
|
type: Editor, |
|
|
|
type: Editor, |
|
|
|
cls: 'bi-border', |
|
|
|
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: 60, |
|
|
|
width: 60, |
|
|
|
value: linkSelected.maxActive, |
|
|
|
value: linkSelected.maxActive, |
|
|
|
errorText: BI.i18nText('Dec-Dcm_Connection_Form_Place_Input-Number'), |
|
|
|
errorText: BI.i18nText('Dec-Dcm_Connection_Form_Place_Input-Number'), |
|
|
|
validationChecker (v: string) { |
|
|
|
validationChecker: connectNameChecker, |
|
|
|
if (/^\+?[1-9][0-9]*$/.test(v)) { |
|
|
|
|
|
|
|
return true; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return false; |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
listeners: [{ |
|
|
|
listeners: [{ |
|
|
|
eventName: BI.Editor.EVENT_CHANGE, |
|
|
|
eventName: BI.Editor.EVENT_CHANGE, |
|
|
|
action() { |
|
|
|
action() { |
|
|
|