diff --git a/i18n/zh_cn.properties b/i18n/zh_cn.properties index 01bbc92..627410d 100644 --- a/i18n/zh_cn.properties +++ b/i18n/zh_cn.properties @@ -52,7 +52,7 @@ Dec-Dcm_Connection_Form_ConnectionName= 数据连接名 Dec-Dcm_Connection_Form_ConnectionName-Change-Confirm= *修改数据连接名会影响相关数据表和仪表板 Dec-Dcm_Connection_Form_Driver= 驱动 Dec-Dcm_Connection_Form_URL= URL -Dec-Dcm_Connection_Form_Database_URL= 数据库URL +Dec-Dcm_Connection_Form_Database_URL= 数据连接URL Dec-Dcm_Connection_Form_Place_Input= 请输入 Dec-Dcm_Connection_Form_OriginalCharsetName= 编码 Dec-Dcm_Connection_Form_Auto= 自动 @@ -97,6 +97,7 @@ Dec-Dcm_Connection_Error= 接口访问错误 Dec-Dcm_Connection_Is_Using= 该连接正在被{R1}编辑,请稍后再试 Dec-Dcm_Connection_Check_Integer= 只允许为正整数 Dec-Dcm_Connection_Check_Number= 只允许为数字 +Dec-Dcm_Connection_JDBC_Other=其他JDBC BI-Multi_Date_Quarter_End= 季度末 BI-Multi_Date_Month_Begin= 月初 diff --git a/private/i18n.ts b/private/i18n.ts index ffd9a11..8177324 100644 --- a/private/i18n.ts +++ b/private/i18n.ts @@ -51,7 +51,7 @@ export default { 'Dec-Dcm_Connection_Form_ConnectionName-Change-Confirm': '*修改数据连接名会影响相关数据表和仪表板', 'Dec-Dcm_Connection_Form_Driver': '驱动', 'Dec-Dcm_Connection_Form_URL': 'URL', - 'Dec-Dcm_Connection_Form_Database_URL': '数据库URL', + 'Dec-Dcm_Connection_Form_Database_URL': '数据连接URL', 'Dec-Dcm_Connection_Form_Place_Input': '请输入', 'Dec-Dcm_Connection_Form_OriginalCharsetName': '编码', 'Dec-Dcm_Connection_Form_Auto': '自动', @@ -96,6 +96,7 @@ export default { 'Dec-Dcm_Connection_Is_Using': '该连接正在被{R1}编辑,请稍后再试', 'Dec-Dcm_Connection_Check_Integer': '只允许为正整数', 'Dec-Dcm_Connection_Check_Number': '只允许为数字', + 'Dec-Dcm_Connection_JDBC_Other': '其他JDBC', 'BI-Multi_Date_Quarter_End': '季度末', 'BI-Multi_Date_Month_Begin': '月初', 'BI-Multi_Date_YMD': '年月日', diff --git a/src/modules/constants/constant.ts b/src/modules/constants/constant.ts index db19616..52c5637 100644 --- a/src/modules/constants/constant.ts +++ b/src/modules/constants/constant.ts @@ -377,7 +377,7 @@ export const DATA_BASE_TYPES = [ hasSchema: false, kerberos: true, }, { - text: 'JNDI', + text: BI.i18nText('Dec-Dcm_Connection_JNDI'), databaseType: 'jndi', driver: '', url: '', @@ -388,7 +388,7 @@ export const DATA_BASE_TYPES = [ kerberos: false, }, { - text: BI.i18nText('Dec-Dcm_Other'), + text: BI.i18nText('Dec-Dcm_Connection_JDBC_Other'), databaseType: 'other', driver: 'org.ha.Driver', drivers: ['org.ha.Driver', 'com.fr.third.org.hsqldb.jdbcDriver', 'org.sqlite.JDBC'], diff --git a/src/modules/crud/decision.api.ts b/src/modules/crud/decision.api.ts index 22378c1..d69b71f 100644 --- a/src/modules/crud/decision.api.ts +++ b/src/modules/crud/decision.api.ts @@ -60,10 +60,12 @@ export class DecisionApi implements Api { private sendEditStatusEvent(name: string, type: string): Promise { return new Promise(resolve => { if (Dec) { - const re = Dec.socket.emit(editStatusEvent.SHUTDOWN, name); - resolve(JSON.parse(re)); + Dec.socket.emit(type, name, (re: any) => { + resolve(re); + }); + } else { + resolve({ data: 'success' }); } - resolve({ data: 'success' }); }); } } diff --git a/src/modules/pages/connection/connection_jdbc/connection_jdbc.ts b/src/modules/pages/connection/connection_jdbc/connection_jdbc.ts index 91c2de3..59c5221 100644 --- a/src/modules/pages/connection/connection_jdbc/connection_jdbc.ts +++ b/src/modules/pages/connection/connection_jdbc/connection_jdbc.ts @@ -54,11 +54,6 @@ export class ConnectionJdbc extends BI.Widget { name: authType ? BI.i18nText('Dec-Dcm_Connection_Form_KeyPath') : BI.i18nText('Dec-Dcm_Connection_Form_Password'), value: authType ? keyPath : '******', }, - { - type: FormItemXtype, - name: BI.i18nText('Dec-Dcm_Connection_Form_Database_URL'), - value: url, - }, { type: FormItemXtype, name: BI.i18nText('Dec-Dcm_Connection_Form_OriginalCharsetName'), @@ -70,6 +65,11 @@ export class ConnectionJdbc extends BI.Widget { value: schema, invisible: !databaseType.hasSchema, }, + { + type: FormItemXtype, + name: BI.i18nText('Dec-Dcm_Connection_Form_Database_URL'), + value: url, + }, { type: CollapseXtype, width: 70, diff --git a/src/modules/title/title.ts b/src/modules/title/title.ts index 10bfe2a..4d62332 100644 --- a/src/modules/title/title.ts +++ b/src/modules/title/title.ts @@ -18,6 +18,7 @@ export class Title extends BI.Widget { watch = { pageIndex: (index: string) => { this.tab.setSelect(index); + this.linearSegment.setVisible(index === PAGE_INDEX.CONNECTION || index === PAGE_INDEX.POOL); }, }