|
|
|
@ -2,9 +2,22 @@ import {Vertical, TextButton, Label} from '@ui';
|
|
|
|
|
import FormItem from '@shared/components/form_item'; |
|
|
|
|
import {OTHER_ATTRIBUTES} from '@private/constants'; |
|
|
|
|
import {AttributeType} from '../right.typing'; |
|
|
|
|
import ModelName from './right_show.model'; |
|
|
|
|
|
|
|
|
|
const className = 'dec.dcm.component.right.show.jndi'; |
|
|
|
|
const Widget = BI.inherit(BI.Widget, { |
|
|
|
|
_store() { |
|
|
|
|
return BI.Models.getModel(ModelName); |
|
|
|
|
}, |
|
|
|
|
watch: { |
|
|
|
|
isCollapse(isCollapse) { |
|
|
|
|
const height = isCollapse ? 550 : 200; |
|
|
|
|
const text = isCollapse ? BI.i18nText('Dec-Dcm_Connection_Form_JNDI_Collapse-Attributes') : BI.i18nText('Dec-Dcm_Connection_Form_JNDI_Other_Attributes'); |
|
|
|
|
this.jndiFormRef.setHeight(height); |
|
|
|
|
this.collapseRef.setText(text); |
|
|
|
|
this.otherAttributesRef.setVisible(isCollapse); |
|
|
|
|
}, |
|
|
|
|
}, |
|
|
|
|
render() { |
|
|
|
|
const {connectionName, url, factory, principal, credentials, originalCharsetName} = this.options; |
|
|
|
|
|
|
|
|
@ -23,12 +36,13 @@ const Widget = BI.inherit(BI.Widget, {
|
|
|
|
|
{ |
|
|
|
|
type: FormItem, |
|
|
|
|
text: BI.i18nText('Dec-Dcm_Connection_Form_JNDI_Context'), |
|
|
|
|
height: 160, |
|
|
|
|
height: 200, |
|
|
|
|
ref: _ref => { |
|
|
|
|
this.jndiFormRef = _ref; |
|
|
|
|
}, |
|
|
|
|
form: { |
|
|
|
|
type: Vertical, |
|
|
|
|
vgap: 10, |
|
|
|
|
items: [ |
|
|
|
|
{ |
|
|
|
|
type: FormItem, |
|
|
|
@ -79,19 +93,13 @@ const Widget = BI.inherit(BI.Widget, {
|
|
|
|
|
this.collapseRef = _ref; |
|
|
|
|
}, |
|
|
|
|
handler: () => { |
|
|
|
|
const isCollapse = this.collapseRef.getValue(); |
|
|
|
|
const height = isCollapse ? 550 : 160; |
|
|
|
|
const text = isCollapse ? BI.i18nText('Dec-Dcm_Connection_Form_JNDI_Collapse-Attributes') : BI.i18nText('Dec-Dcm_Connection_Form_JNDI_Other_Attributes'); |
|
|
|
|
this.jndiFormRef.setHeight(height); |
|
|
|
|
this.collapseRef.setValue(!isCollapse); |
|
|
|
|
this.collapseRef.setText(text); |
|
|
|
|
this.otherAttributesRef.setVisible(isCollapse); |
|
|
|
|
this.store.setIsCollapse(!this.model.isCollapse); |
|
|
|
|
}, |
|
|
|
|
}, |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
type: Vertical, |
|
|
|
|
invisible: false, |
|
|
|
|
invisible: true, |
|
|
|
|
ref: _ref => { |
|
|
|
|
this.otherAttributesRef = _ref; |
|
|
|
|
}, |
|
|
|
|