From 880d7846337e282afb21e20613fde3d593456aa9 Mon Sep 17 00:00:00 2001 From: alan Date: Wed, 22 May 2019 14:24:54 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E5=B8=B8=E9=87=8F=E6=94=B9?= =?UTF-8?q?=E4=B8=BA=E5=A4=A7=E5=86=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/plugins/jndi/jndi.edit.ts | 8 ++++---- src/plugins/jndi/jndi.preview.ts | 4 ++-- src/plugins/jndi/jndi.service.ts | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/plugins/jndi/jndi.edit.ts b/src/plugins/jndi/jndi.edit.ts index 8d13b46..a4283f3 100644 --- a/src/plugins/jndi/jndi.edit.ts +++ b/src/plugins/jndi/jndi.edit.ts @@ -1,5 +1,5 @@ import {Vertical, Editor, TextValueCombo, TextButton, Label} from '@ui'; -import {factorys, otherAttributes, originalCharsetNames} from './jndi.service'; +import {FACTORYS, OTHER_ATTRIBUTES, ORIGINAL_CHARSET_NAMES} from './jndi.service'; import FormItem from '@shared/components/form.item.component'; import {AttributeType, FormType} from './jdni.typing'; import './jdni.scss'; @@ -46,7 +46,7 @@ const Widget = BI.inherit(BI.Widget, { cls: 'bi-border', width: 300, value: form.factory, - items: BI.map(factorys, (index: number, item: string) => { + items: BI.map(FACTORYS, (index: number, item: string) => { return { text: item, value: item, @@ -120,7 +120,7 @@ const Widget = BI.inherit(BI.Widget, { ref: _ref => { this.otherAttributesRef = _ref; }, - items: BI.map(otherAttributes, (index: number, item: AttributeType) => { + items: BI.map(OTHER_ATTRIBUTES, (index: number, item: AttributeType) => { return { type: FormItem, text: item.text, @@ -168,7 +168,7 @@ const Widget = BI.inherit(BI.Widget, { text: BI.i18nText('Dec-Dcm_Connection_Form_Auto'), value: form.originalCharsetName, }, - ...originalCharsetNames, + ...ORIGINAL_CHARSET_NAMES, ], }, }, diff --git a/src/plugins/jndi/jndi.preview.ts b/src/plugins/jndi/jndi.preview.ts index a474182..5000f20 100644 --- a/src/plugins/jndi/jndi.preview.ts +++ b/src/plugins/jndi/jndi.preview.ts @@ -1,7 +1,7 @@ import {Vertical, Label, TextButton} from '@ui'; import FormItem from '@shared/components/form.item.component'; import {FormType, AttributeType} from './jdni.typing'; -import {otherAttributes} from './jndi.service'; +import {OTHER_ATTRIBUTES} from './jndi.service'; const JndiPreview = 'fr.plugin.jndi.preview'; const JndiConstantName = 'dec.constant.database.conf.connect.form.jndi.value'; @@ -98,7 +98,7 @@ const jndiWidget = BI.inherit(BI.Widget, { ref: _ref => { this.otherAttributesRef = _ref; }, - items: BI.map(otherAttributes, (index: number, item: AttributeType) => { + items: BI.map(OTHER_ATTRIBUTES, (index: number, item: AttributeType) => { return { type: FormItem, text: item.text, diff --git a/src/plugins/jndi/jndi.service.ts b/src/plugins/jndi/jndi.service.ts index 381e827..d1ff6d0 100644 --- a/src/plugins/jndi/jndi.service.ts +++ b/src/plugins/jndi/jndi.service.ts @@ -1,8 +1,8 @@ import {AttributeType} from './jdni.typing'; -export const factorys = ['', 'weblogic.jndi.WLInitialContextFactory', 'com.ibm.websphere.naming.WsnInitialContextFactory', 'org.jboss.naming.HttpNamingContextFactory', 'org.jnp.interfaces.NamingContextFactory', 'com.caucho.burlap.BurlapContextFactory']; +export const FACTORYS = ['', 'weblogic.jndi.WLInitialContextFactory', 'com.ibm.websphere.naming.WsnInitialContextFactory', 'org.jboss.naming.HttpNamingContextFactory', 'org.jnp.interfaces.NamingContextFactory', 'com.caucho.burlap.BurlapContextFactory']; -export const otherAttributes: AttributeType[] = [ +export const OTHER_ATTRIBUTES: AttributeType[] = [ { text: 'OBJECT_FACTORIES', name: 'objectFactories', @@ -50,7 +50,7 @@ export const otherAttributes: AttributeType[] = [ ]; -export const originalCharsetNames = [ +export const ORIGINAL_CHARSET_NAMES = [ { text: 'GBK', value: 'GBK',