You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
190 lines
8.1 KiB
190 lines
8.1 KiB
import { shortcut, store } from '@core/core'; |
|
import { FormItem } from '../components/form_item/form_item'; |
|
import { ConnectionJndiModel } from './connection_jndi.model'; |
|
import { ConnectionJNDI } from 'src/modules/crud/crud.typings'; |
|
import { Collapse, EVENT_CHANGE } from 'src/modules/components/collapse/collapse'; |
|
import { CONNECTION_LAYOUT } from '@constants/constant'; |
|
import { VerticalLayout } from '@fui/core'; |
|
|
|
@shortcut() |
|
@store(ConnectionJndiModel) |
|
export class ConnectionJndi extends BI.Widget { |
|
static xtype = 'dec.dcm.connection_jndi'; |
|
|
|
model: ConnectionJndiModel['model']; |
|
|
|
advancedSet: VerticalLayout; |
|
|
|
render() { |
|
const connectionData = this.model.connectionSelectedOne.connectionData as ConnectionJNDI; |
|
const { jndiName, contextHashtable, originalCharsetName } = connectionData; |
|
const { hgap, vgap } = CONNECTION_LAYOUT; |
|
|
|
return { |
|
type: BI.VerticalLayout.xtype, |
|
$testId: 'dec-dcm-connection-jndi', |
|
hgap, |
|
vgap, |
|
items: [ |
|
{ |
|
type: FormItem.xtype, |
|
nameWidth: 200, |
|
name: BI.i18nText('Dec-Dcm_Connection_JNDI_Form_ConnectionName'), |
|
value: jndiName, |
|
}, |
|
{ |
|
type: BI.HTapeLayout.xtype, |
|
height: 115, |
|
items: [ |
|
{ |
|
el: { |
|
type: BI.FloatLeftLayout.xtype, |
|
items: [ |
|
{ |
|
type: BI.Label.xtype, |
|
cls: 'bi-font-bold', |
|
textAlign: 'left', |
|
text: BI.i18nText('Dec-Dcm_Connection_JNDI_Form_Connection'), |
|
}, |
|
], |
|
}, |
|
width: 200, |
|
}, |
|
{ |
|
type: BI.VerticalLayout.xtype, |
|
bgap: 15, |
|
height: 115, |
|
items: [ |
|
{ |
|
type: FormItem.xtype, |
|
name: 'INTIAL_CONTEXT_FACTORY', |
|
nameWidth: 200, |
|
isBold: false, |
|
value: contextHashtable['java.naming.factory.initial'], |
|
}, |
|
{ |
|
type: FormItem.xtype, |
|
name: 'PROVIDER_URL', |
|
nameWidth: 200, |
|
isBold: false, |
|
value: contextHashtable['java.naming.provider.url'], |
|
}, |
|
{ |
|
type: FormItem.xtype, |
|
name: 'SECURITY_PRINCIPAL', |
|
nameWidth: 200, |
|
isBold: false, |
|
value: contextHashtable['java.naming.security.principal'], |
|
}, |
|
{ |
|
type: FormItem.xtype, |
|
name: 'SECURITY_CREDENTIALS', |
|
nameWidth: 200, |
|
isBold: false, |
|
value: contextHashtable['java.naming.security.credentials'], |
|
bgap: -15, |
|
}, |
|
], |
|
}, |
|
], |
|
}, |
|
{ |
|
type: FormItem.xtype, |
|
nameWidth: 200, |
|
name: BI.i18nText('Dec-Dcm_Connection_Form_OriginalCharsetName'), |
|
value: originalCharsetName ? originalCharsetName : BI.i18nText('Dec-Dcm_Connection_Form_Auto'), |
|
}, |
|
{ |
|
type: Collapse.xtype, |
|
width: 70, |
|
name: BI.i18nText('Dec-Dcm_Connection_Form_Database_Advanced_Setting'), |
|
listeners: [ |
|
{ |
|
eventName: EVENT_CHANGE, |
|
action: (isCollapse: boolean) => { |
|
this.advancedSet.setVisible(!isCollapse); |
|
}, |
|
}, |
|
], |
|
}, |
|
{ |
|
type: BI.VerticalLayout.xtype, |
|
vgap, |
|
tgap: -15, |
|
invisible: true, |
|
ref: (_ref: VerticalLayout) => { |
|
this.advancedSet = _ref; |
|
}, |
|
items: [ |
|
{ |
|
type: FormItem.xtype, |
|
nameWidth: 200, |
|
name: 'OBJECT_FACTORIES', |
|
value: contextHashtable['java.naming.factory.object'], |
|
}, |
|
{ |
|
type: FormItem.xtype, |
|
nameWidth: 200, |
|
name: 'STATE_FACTORIES', |
|
value: contextHashtable['java.naming.factory.state'], |
|
}, |
|
{ |
|
type: FormItem.xtype, |
|
nameWidth: 200, |
|
name: 'URL_PKG_PREFIXES', |
|
value: contextHashtable['java.naming.factory.url.pkgs'], |
|
}, |
|
{ |
|
type: FormItem.xtype, |
|
nameWidth: 200, |
|
name: 'DNS_URL', |
|
value: contextHashtable['java.naming.dns.url'], |
|
}, |
|
{ |
|
type: FormItem.xtype, |
|
nameWidth: 200, |
|
name: 'AUTHORITATIVE', |
|
value: contextHashtable['java.naming.authoritative'], |
|
}, |
|
{ |
|
type: FormItem.xtype, |
|
nameWidth: 200, |
|
name: 'BATCHSIZE', |
|
value: contextHashtable['java.naming.batchsize'], |
|
}, |
|
{ |
|
type: FormItem.xtype, |
|
nameWidth: 200, |
|
name: 'REFERRAL', |
|
value: contextHashtable['java.naming.referral'], |
|
}, |
|
{ |
|
type: FormItem.xtype, |
|
nameWidth: 200, |
|
name: 'SECURITY_PROTOCOL', |
|
value: contextHashtable['java.naming.security.protocol'], |
|
}, |
|
{ |
|
type: FormItem.xtype, |
|
nameWidth: 200, |
|
name: 'SECURITY_AUTHENTICATION', |
|
value: contextHashtable['java.naming.security.authentication'], |
|
}, |
|
{ |
|
type: FormItem.xtype, |
|
nameWidth: 200, |
|
name: 'LANGUAGE', |
|
value: contextHashtable['java.naming.language'], |
|
}, |
|
{ |
|
type: FormItem.xtype, |
|
nameWidth: 200, |
|
name: 'APPLET', |
|
value: contextHashtable['java.naming.applet'], |
|
}, |
|
], |
|
}, |
|
], |
|
}; |
|
} |
|
}
|
|
|