Browse Source

fix: DEC-10152 JNDI的INTIAL_CONTEXT_FACTORY 改为下拉框选择

qufenxi
alan 5 years ago
parent
commit
18374c807f
  1. 9
      src/modules/constants/constant.ts
  2. 13
      src/modules/pages/maintain/forms/components/form.jndi.ts

9
src/modules/constants/constant.ts

@ -681,3 +681,12 @@ export const CONNECTION_LAYOUT = {
hgap: 15,
vgap: 15,
};
export const JNDI_FACTORYS = [
'weblogic.jndi.WLInitialContextFactory',
'com.ibm.websphere.naming.WsnInitialContextFactory',
'org.jboss.naming.HttpNamingContextFactory',
'org.jnp.interfaces.NamingContextFactory',
'com.caucho.burlap.BurlapContextFactory',
];

13
src/modules/pages/maintain/forms/components/form.jndi.ts

@ -2,7 +2,7 @@ import { shortcut } from '@core/core';
import { Vertical, TextEditor, Htape, Left, Label, TextValueCombo } from 'ui';
import { FormItemXtype } from '../../components/form_item/form_item';
import { ConnectionJNDI, Connection, ContextHashtable } from 'src/modules/crud/crud.typings';
import { CONNECT_CHARSET, CONNECTION_LAYOUT } from '@constants/constant';
import { CONNECT_CHARSET, CONNECTION_LAYOUT, JNDI_FACTORYS } from '@constants/constant';
import { CollapseXtype, EVENT_CHANGE } from 'src/modules/components/collapse/collapse';
import { connectionType } from '@constants/env';
export const FormJndiXtype = 'dec.dcm.maintain.form.jndi';
@ -98,13 +98,18 @@ export class FormJndi extends BI.Widget {
name: 'INTIAL_CONTEXT_FACTORY',
nameWidth: 200,
forms: [{
type: TextEditor,
type: TextValueCombo,
width: 300,
allowBlank: true,
value: contextHashtable['java.naming.factory.initial'],
ref: (_ref: any) => {
this.form.initial = _ref;
},
items: JNDI_FACTORYS.map(item => {
return {
text: item,
value: item,
};
}),
}],
},
{
@ -356,7 +361,7 @@ export class FormJndi extends BI.Widget {
public getSubmitValue():Connection {
const contextHashtable = {
'java.naming.factory.initial': this.form.initial.getValue(),
'java.naming.factory.initial': this.form.initial.getValue()[0],
'java.naming.provider.url': this.form.providerUrl.getValue(),
'java.naming.factory.object': this.form.factoryObject.getValue(),
'java.naming.factory.state': this.form.factoryState.getValue(),

Loading…
Cancel
Save