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