From 41641a0282e74015f38afbc5611e519073c8ca6f Mon Sep 17 00:00:00 2001 From: alan Date: Wed, 25 Sep 2019 18:25:12 +0800 Subject: [PATCH 1/3] =?UTF-8?q?fix:=20DEC-10044=20=E7=BC=96=E8=BE=91?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E8=BF=9E=E6=8E=A5=E6=97=B6=EF=BC=8C=E5=B7=A6?= =?UTF-8?q?=E4=B8=8A=E8=A7=92=E6=98=BE=E7=A4=BA=E6=95=B0=E6=8D=AE=E8=BF=9E?= =?UTF-8?q?=E6=8E=A5=E7=B1=BB=E5=9E=8B=E5=90=8D=E7=A7=B0=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pages/connection/connection_jndi/connection_jndi.ts | 2 +- src/modules/pages/maintain/maintain.ts | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/modules/pages/connection/connection_jndi/connection_jndi.ts b/src/modules/pages/connection/connection_jndi/connection_jndi.ts index c7ede1d..65f3c05 100644 --- a/src/modules/pages/connection/connection_jndi/connection_jndi.ts +++ b/src/modules/pages/connection/connection_jndi/connection_jndi.ts @@ -30,7 +30,7 @@ export class ConnectionJdbc extends BI.Widget { }, { type: Htape, - height: 110, + height: 120, items: [ { el: { diff --git a/src/modules/pages/maintain/maintain.ts b/src/modules/pages/maintain/maintain.ts index d920dc1..526dd10 100644 --- a/src/modules/pages/maintain/maintain.ts +++ b/src/modules/pages/maintain/maintain.ts @@ -7,7 +7,7 @@ import { ApiFactory } from 'src/modules/crud/apiFactory'; const api = new ApiFactory().create(); import './maintain.less'; import { connectionType } from '@constants/env'; -import { getJdbcDatabaseType } from '../../app.service'; +import { getJdbcDatabaseType, getTextByDatabaseType } from '../../app.service'; import { ConnectionJDBC } from 'src/modules/crud/crud.typings'; export const MaintainXtype = 'dec.dcm.maintain'; @@ -20,8 +20,8 @@ export class Maintain extends BI.Widget { listView: any; render() { - const { text, isEdit, databaseType } = this.getEditConnection(); - const titleText = this.model.isCopy ? `${text}-${BI.i18nText('Dec-Dcm_Copy')}` : text; + const { isEdit, databaseType } = this.getEditConnection(); + const titleText = getTextByDatabaseType(databaseType); return { type: Vtape, @@ -43,7 +43,7 @@ export class Maintain extends BI.Widget { }, { type: Label, - text: `${titleText}(${databaseType})`, + text: titleText, }, ], height: 40, From a0e874daac9a5a0f19a0ed7b530745af7c0d7a82 Mon Sep 17 00:00:00 2001 From: alan Date: Wed, 25 Sep 2019 18:30:26 +0800 Subject: [PATCH 2/3] =?UTF-8?q?fix:=20=E9=97=B4=E8=B7=9D=E8=B0=83=E5=A4=A7?= =?UTF-8?q?=E4=B8=80=E7=82=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pages/connection/connection_jdbc/connection_jdbc.ts | 4 ++-- .../pages/connection/connection_jndi/connection_jndi.ts | 4 ++-- src/modules/pages/maintain/forms/components/form.jdbc.ts | 4 ++-- src/modules/pages/maintain/forms/components/form.jndi.ts | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/modules/pages/connection/connection_jdbc/connection_jdbc.ts b/src/modules/pages/connection/connection_jdbc/connection_jdbc.ts index 3c06c06..457eb2e 100644 --- a/src/modules/pages/connection/connection_jdbc/connection_jdbc.ts +++ b/src/modules/pages/connection/connection_jdbc/connection_jdbc.ts @@ -23,7 +23,7 @@ export class ConnectionJdbc extends BI.Widget { return { type: Vertical, hgap: 15, - vgap: 10, + vgap: 15, items: [ { type: FormItemXtype, @@ -94,7 +94,7 @@ export class ConnectionJdbc extends BI.Widget { }, { type: Vertical, - vgap: 10, + vgap: 15, invisible: true, ref: (_ref: any) => { this.advancedSet = _ref; diff --git a/src/modules/pages/connection/connection_jndi/connection_jndi.ts b/src/modules/pages/connection/connection_jndi/connection_jndi.ts index 65f3c05..552607e 100644 --- a/src/modules/pages/connection/connection_jndi/connection_jndi.ts +++ b/src/modules/pages/connection/connection_jndi/connection_jndi.ts @@ -20,7 +20,7 @@ export class ConnectionJdbc extends BI.Widget { return { type: Vertical, hgap: 15, - vgap: 10, + vgap: 15, items: [ { type: FormItemXtype, @@ -99,7 +99,7 @@ export class ConnectionJdbc extends BI.Widget { }, { type: Vertical, - vgap: 10, + vgap: 15, invisible: true, ref: (_ref: any) => { this.advancedSet = _ref; diff --git a/src/modules/pages/maintain/forms/components/form.jdbc.ts b/src/modules/pages/maintain/forms/components/form.jdbc.ts index a343545..89d31dd 100644 --- a/src/modules/pages/maintain/forms/components/form.jdbc.ts +++ b/src/modules/pages/maintain/forms/components/form.jdbc.ts @@ -67,7 +67,7 @@ export class FormJdbc extends BI.Widget { return { type: Vertical, hgap: 15, - vgap: 10, + vgap: 15, items: [ { type: FormItemXtype, @@ -393,7 +393,7 @@ export class FormJdbc extends BI.Widget { }, { type: Vertical, - vgap: 10, + vgap: 15, invisible: true, ref: (_ref: any) => { this.advancedSet = _ref; diff --git a/src/modules/pages/maintain/forms/components/form.jndi.ts b/src/modules/pages/maintain/forms/components/form.jndi.ts index 49f0600..5170ca2 100644 --- a/src/modules/pages/maintain/forms/components/form.jndi.ts +++ b/src/modules/pages/maintain/forms/components/form.jndi.ts @@ -41,7 +41,7 @@ export class FormJndi extends BI.Widget { return { type: Vertical, hgap: 15, - vgap: 10, + vgap: 15, items: [ { type: FormItemXtype, @@ -187,7 +187,7 @@ export class FormJndi extends BI.Widget { }, { type: Vertical, - vgap: 10, + vgap: 15, invisible: true, ref: (_ref: any) => { this.advancedSet = _ref; From 324c45ed7efb31ce4fc1aedc1c400edd21d75600 Mon Sep 17 00:00:00 2001 From: alan Date: Wed, 25 Sep 2019 18:36:46 +0800 Subject: [PATCH 3/3] =?UTF-8?q?fix:=20=E5=86=99=E6=88=90=E5=B8=B8=E9=87=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/modules/constants/constant.ts | 6 +++++- .../connection/connection_jdbc/connection_jdbc.ts | 8 +++++--- .../connection/connection_jndi/connection_jndi.ts | 8 +++++--- .../pages/maintain/forms/components/form.jdbc.ts | 12 ++++++------ .../pages/maintain/forms/components/form.jndi.ts | 11 ++++++----- 5 files changed, 27 insertions(+), 18 deletions(-) diff --git a/src/modules/constants/constant.ts b/src/modules/constants/constant.ts index d685117..58fe9c4 100644 --- a/src/modules/constants/constant.ts +++ b/src/modules/constants/constant.ts @@ -646,4 +646,8 @@ export const DEFAULT_JDBC_POOL = { numTestsPerEvictionRun: 3, minEvictableIdleTimeMillis: 1800, }; - + +export const CONNECTION_LAYOUT = { + hgap: 15, + vgap: 15, +}; diff --git a/src/modules/pages/connection/connection_jdbc/connection_jdbc.ts b/src/modules/pages/connection/connection_jdbc/connection_jdbc.ts index 457eb2e..b332ccf 100644 --- a/src/modules/pages/connection/connection_jdbc/connection_jdbc.ts +++ b/src/modules/pages/connection/connection_jdbc/connection_jdbc.ts @@ -5,6 +5,7 @@ import { CollapseXtype, EVENT_CHANGE } from 'src/modules/components/collapse/col import { ConnectionJdbcModelXtype, ConnectionJdecModel } from './connection_jdbc.model'; import { ConnectionJDBC } from 'src/modules/crud/crud.typings'; import { getAllDatabaseTypes, getJdbcDatabaseType, resolveUrlInfo } from '../../../app.service'; +import { CONNECTION_LAYOUT } from '@constants/constant'; export const ConnectionJdbcXtype = 'dec.dcm.connection_jdbc'; @shortcut(ConnectionJdbcXtype) @store(ConnectionJdbcModelXtype) @@ -19,11 +20,12 @@ export class ConnectionJdbc extends BI.Widget { const { driver, database, user, newCharsetName, schema, connectionPoolAttr, authType, principal, url } = connectionData; const databaseType = getJdbcDatabaseType(database, driver); const { host, port, databaseName } = resolveUrlInfo(url); + const { hgap, vgap } = CONNECTION_LAYOUT; return { type: Vertical, - hgap: 15, - vgap: 15, + hgap, + vgap, items: [ { type: FormItemXtype, @@ -94,7 +96,7 @@ export class ConnectionJdbc extends BI.Widget { }, { type: Vertical, - vgap: 15, + vgap, invisible: true, ref: (_ref: any) => { this.advancedSet = _ref; diff --git a/src/modules/pages/connection/connection_jndi/connection_jndi.ts b/src/modules/pages/connection/connection_jndi/connection_jndi.ts index 552607e..db04856 100644 --- a/src/modules/pages/connection/connection_jndi/connection_jndi.ts +++ b/src/modules/pages/connection/connection_jndi/connection_jndi.ts @@ -4,6 +4,7 @@ import { FormItemXtype } from '../components/form_item/form_item'; import { ConnectionJndiModelXtype, ConnectionJndiModel } from './connection_jndi.model'; import { ConnectionJNDI } from 'src/modules/crud/crud.typings'; import { CollapseXtype, EVENT_CHANGE } from 'src/modules/components/collapse/collapse'; +import { CONNECTION_LAYOUT } from '@constants/constant'; export const ConnectionJndiXtype = 'dec.dcm.connection_jndi'; @shortcut(ConnectionJndiXtype) @@ -16,11 +17,12 @@ export class ConnectionJdbc extends BI.Widget { render() { const connectionData = this.model.connectionSelectedOne.connectionData as ConnectionJNDI; const { jndiName, contextHashtable, originalCharsetName } = connectionData; + const { hgap, vgap } = CONNECTION_LAYOUT; return { type: Vertical, - hgap: 15, - vgap: 15, + hgap, + vgap, items: [ { type: FormItemXtype, @@ -99,7 +101,7 @@ export class ConnectionJdbc extends BI.Widget { }, { type: Vertical, - vgap: 15, + vgap, invisible: true, ref: (_ref: any) => { this.advancedSet = _ref; diff --git a/src/modules/pages/maintain/forms/components/form.jdbc.ts b/src/modules/pages/maintain/forms/components/form.jdbc.ts index 89d31dd..ac73ada 100644 --- a/src/modules/pages/maintain/forms/components/form.jdbc.ts +++ b/src/modules/pages/maintain/forms/components/form.jdbc.ts @@ -4,7 +4,7 @@ import { CollapseXtype, EVENT_CHANGE } from 'src/modules/components/collapse/col import { FormItemXtype } from '../../components/form_item/form_item'; import { Connection, ConnectionJDBC, ConnectionPoolJDBC } from 'src/modules/crud/crud.typings'; import { connectionType } from '@constants/env'; -import { CONNECT_CHARSET } from '@constants/constant'; +import { CONNECT_CHARSET, CONNECTION_LAYOUT } from '@constants/constant'; import { getAllDatabaseTypes, getJdbcDatabaseType, resolveUrlInfo, splitUrl } from '../../../../app.service'; export const FormJdbcXtype = 'dec.dcm.maintain.form.jdbc'; @@ -61,13 +61,13 @@ export class FormJdbc extends BI.Widget { const { initialSize, maxActive, maxIdle, maxWait, validationQuery, testOnBorrow, testOnReturn, testWhileIdle, timeBetweenEvictionRunsMillis, numTestsPerEvictionRun, minEvictableIdleTimeMillis } = connectionPoolAttr as ConnectionPoolJDBC; const databaseType = getJdbcDatabaseType(database, driver); this.oldPassword = password; - const { host, port, databaseName } = resolveUrlInfo(url); - + const { hgap, vgap } = CONNECTION_LAYOUT; + return { type: Vertical, - hgap: 15, - vgap: 15, + hgap, + vgap, items: [ { type: FormItemXtype, @@ -393,7 +393,7 @@ export class FormJdbc extends BI.Widget { }, { type: Vertical, - vgap: 15, + vgap, invisible: true, ref: (_ref: any) => { this.advancedSet = _ref; diff --git a/src/modules/pages/maintain/forms/components/form.jndi.ts b/src/modules/pages/maintain/forms/components/form.jndi.ts index 5170ca2..32dabb4 100644 --- a/src/modules/pages/maintain/forms/components/form.jndi.ts +++ b/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 } from '@constants/constant'; +import { CONNECT_CHARSET, CONNECTION_LAYOUT } 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'; @@ -37,11 +37,12 @@ export class FormJndi extends BI.Widget { render() { const { connectionName, connectionData } = this.options.formData; const { jndiName, newCharsetName, contextHashtable } = connectionData as ConnectionJNDI; - + const { hgap, vgap } = CONNECTION_LAYOUT; + return { type: Vertical, - hgap: 15, - vgap: 15, + hgap, + vgap, items: [ { type: FormItemXtype, @@ -187,7 +188,7 @@ export class FormJndi extends BI.Widget { }, { type: Vertical, - vgap: 15, + vgap, invisible: true, ref: (_ref: any) => { this.advancedSet = _ref;