Browse Source

fix: DEC-9068 修改socket调用的bug,更改名称。

qufenxi
alan 5 years ago
parent
commit
9b0b3b56b6
  1. 3
      i18n/zh_cn.properties
  2. 3
      private/i18n.ts
  3. 4
      src/modules/constants/constant.ts
  4. 8
      src/modules/crud/decision.api.ts
  5. 10
      src/modules/pages/connection/connection_jdbc/connection_jdbc.ts
  6. 1
      src/modules/title/title.ts

3
i18n/zh_cn.properties

@ -52,7 +52,7 @@ Dec-Dcm_Connection_Form_ConnectionName= 数据连接名
Dec-Dcm_Connection_Form_ConnectionName-Change-Confirm= *修改数据连接名会影响相关数据表和仪表板 Dec-Dcm_Connection_Form_ConnectionName-Change-Confirm= *修改数据连接名会影响相关数据表和仪表板
Dec-Dcm_Connection_Form_Driver= 驱动 Dec-Dcm_Connection_Form_Driver= 驱动
Dec-Dcm_Connection_Form_URL= URL 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_Place_Input= 请输入
Dec-Dcm_Connection_Form_OriginalCharsetName= 编码 Dec-Dcm_Connection_Form_OriginalCharsetName= 编码
Dec-Dcm_Connection_Form_Auto= 自动 Dec-Dcm_Connection_Form_Auto= 自动
@ -97,6 +97,7 @@ Dec-Dcm_Connection_Error= 接口访问错误
Dec-Dcm_Connection_Is_Using= 该连接正在被{R1}编辑,请稍后再试 Dec-Dcm_Connection_Is_Using= 该连接正在被{R1}编辑,请稍后再试
Dec-Dcm_Connection_Check_Integer= 只允许为正整数 Dec-Dcm_Connection_Check_Integer= 只允许为正整数
Dec-Dcm_Connection_Check_Number= 只允许为数字 Dec-Dcm_Connection_Check_Number= 只允许为数字
Dec-Dcm_Connection_JDBC_Other=其他JDBC
BI-Multi_Date_Quarter_End= 季度末 BI-Multi_Date_Quarter_End= 季度末
BI-Multi_Date_Month_Begin= 月初 BI-Multi_Date_Month_Begin= 月初

3
private/i18n.ts

@ -51,7 +51,7 @@ export default {
'Dec-Dcm_Connection_Form_ConnectionName-Change-Confirm': '*修改数据连接名会影响相关数据表和仪表板', 'Dec-Dcm_Connection_Form_ConnectionName-Change-Confirm': '*修改数据连接名会影响相关数据表和仪表板',
'Dec-Dcm_Connection_Form_Driver': '驱动', 'Dec-Dcm_Connection_Form_Driver': '驱动',
'Dec-Dcm_Connection_Form_URL': 'URL', '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_Place_Input': '请输入',
'Dec-Dcm_Connection_Form_OriginalCharsetName': '编码', 'Dec-Dcm_Connection_Form_OriginalCharsetName': '编码',
'Dec-Dcm_Connection_Form_Auto': '自动', 'Dec-Dcm_Connection_Form_Auto': '自动',
@ -96,6 +96,7 @@ export default {
'Dec-Dcm_Connection_Is_Using': '该连接正在被{R1}编辑,请稍后再试', 'Dec-Dcm_Connection_Is_Using': '该连接正在被{R1}编辑,请稍后再试',
'Dec-Dcm_Connection_Check_Integer': '只允许为正整数', 'Dec-Dcm_Connection_Check_Integer': '只允许为正整数',
'Dec-Dcm_Connection_Check_Number': '只允许为数字', 'Dec-Dcm_Connection_Check_Number': '只允许为数字',
'Dec-Dcm_Connection_JDBC_Other': '其他JDBC',
'BI-Multi_Date_Quarter_End': '季度末', 'BI-Multi_Date_Quarter_End': '季度末',
'BI-Multi_Date_Month_Begin': '月初', 'BI-Multi_Date_Month_Begin': '月初',
'BI-Multi_Date_YMD': '年月日', 'BI-Multi_Date_YMD': '年月日',

4
src/modules/constants/constant.ts

@ -377,7 +377,7 @@ export const DATA_BASE_TYPES = [
hasSchema: false, hasSchema: false,
kerberos: true, kerberos: true,
}, { }, {
text: 'JNDI', text: BI.i18nText('Dec-Dcm_Connection_JNDI'),
databaseType: 'jndi', databaseType: 'jndi',
driver: '', driver: '',
url: '', url: '',
@ -388,7 +388,7 @@ export const DATA_BASE_TYPES = [
kerberos: false, kerberos: false,
}, },
{ {
text: BI.i18nText('Dec-Dcm_Other'), text: BI.i18nText('Dec-Dcm_Connection_JDBC_Other'),
databaseType: 'other', databaseType: 'other',
driver: 'org.ha.Driver', driver: 'org.ha.Driver',
drivers: ['org.ha.Driver', 'com.fr.third.org.hsqldb.jdbcDriver', 'org.sqlite.JDBC'], drivers: ['org.ha.Driver', 'com.fr.third.org.hsqldb.jdbcDriver', 'org.sqlite.JDBC'],

8
src/modules/crud/decision.api.ts

@ -60,10 +60,12 @@ export class DecisionApi implements Api {
private sendEditStatusEvent(name: string, type: string): Promise<SocketResult> { private sendEditStatusEvent(name: string, type: string): Promise<SocketResult> {
return new Promise(resolve => { return new Promise(resolve => {
if (Dec) { if (Dec) {
const re = Dec.socket.emit(editStatusEvent.SHUTDOWN, name); Dec.socket.emit(type, name, (re: any) => {
resolve(JSON.parse(re)); resolve(re);
} });
} else {
resolve({ data: 'success' }); resolve({ data: 'success' });
}
}); });
} }
} }

10
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'), name: authType ? BI.i18nText('Dec-Dcm_Connection_Form_KeyPath') : BI.i18nText('Dec-Dcm_Connection_Form_Password'),
value: authType ? keyPath : '******', value: authType ? keyPath : '******',
}, },
{
type: FormItemXtype,
name: BI.i18nText('Dec-Dcm_Connection_Form_Database_URL'),
value: url,
},
{ {
type: FormItemXtype, type: FormItemXtype,
name: BI.i18nText('Dec-Dcm_Connection_Form_OriginalCharsetName'), name: BI.i18nText('Dec-Dcm_Connection_Form_OriginalCharsetName'),
@ -70,6 +65,11 @@ export class ConnectionJdbc extends BI.Widget {
value: schema, value: schema,
invisible: !databaseType.hasSchema, invisible: !databaseType.hasSchema,
}, },
{
type: FormItemXtype,
name: BI.i18nText('Dec-Dcm_Connection_Form_Database_URL'),
value: url,
},
{ {
type: CollapseXtype, type: CollapseXtype,
width: 70, width: 70,

1
src/modules/title/title.ts

@ -18,6 +18,7 @@ export class Title extends BI.Widget {
watch = { watch = {
pageIndex: (index: string) => { pageIndex: (index: string) => {
this.tab.setSelect(index); this.tab.setSelect(index);
this.linearSegment.setVisible(index === PAGE_INDEX.CONNECTION || index === PAGE_INDEX.POOL);
}, },
} }

Loading…
Cancel
Save