From db7c65fc144484282310b4e725cd8c7ec81da5a2 Mon Sep 17 00:00:00 2001 From: alan Date: Mon, 30 Sep 2019 10:09:57 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20DEC-10141=20=E4=BF=AE=E6=94=B9=E6=97=A0?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E8=BF=9E=E6=8E=A5=E6=97=B6=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E7=9A=84=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- i18n/zh_cn.properties | 1 + private/i18n.ts | 1 + src/modules/pages/connection_pool/connection_pool.ts | 9 ++++++--- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/i18n/zh_cn.properties b/i18n/zh_cn.properties index 68e17bf..2e1d813 100644 --- a/i18n/zh_cn.properties +++ b/i18n/zh_cn.properties @@ -109,6 +109,7 @@ Dec-Dcm_Connection_Download_Driver=下载对应驱动 Dec-Dcm_Connection_Deleted=该数据连接已被删除,无法进行操作 Dec-Dcm_Connection_Click_Connect_Database=点击连接数据库 Dec-Dcm_Connection_Read_Mode_List=以读取模式列表 +Dec-Dec_Connection_NO_Connection_Pool=无数据连接,可在数据连接管理页面添加 BI-Multi_Date_Quarter_End= 季度末 BI-Multi_Date_Month_Begin= 月初 diff --git a/private/i18n.ts b/private/i18n.ts index 4419f3e..81eab04 100644 --- a/private/i18n.ts +++ b/private/i18n.ts @@ -108,6 +108,7 @@ export default { 'Dec-Dcm_Connection_Deleted': '该数据连接已被删除,无法进行操作', 'Dec-Dcm_Connection_Click_Connect_Database': '点击连接数据库', 'Dec-Dcm_Connection_Read_Mode_List': '以读取模式列表', + 'Dec-Dec_Connection_NO_Connection_Pool': '无数据连接,可在数据连接管理页面添加', 'BI-Multi_Date_Quarter_End': '季度末', 'BI-Multi_Date_Month_Begin': '月初', 'BI-Multi_Date_YMD': '年月日', diff --git a/src/modules/pages/connection_pool/connection_pool.ts b/src/modules/pages/connection_pool/connection_pool.ts index c3585a5..2cf6c06 100644 --- a/src/modules/pages/connection_pool/connection_pool.ts +++ b/src/modules/pages/connection_pool/connection_pool.ts @@ -24,6 +24,10 @@ export class ConnectionPool extends BI.Widget { } render() { + if (BI.size(this.model.connectionJDBC) === 0) { + return this.renderNoConnection(); + } + return { type: Htape, items: [ @@ -53,8 +57,7 @@ export class ConnectionPool extends BI.Widget { }, width: 275, }, - this.model.connectionJDBC.length > 0 ? - this.renderPool() : this.renderNoConnection(), + this.renderPool(), ], }; } @@ -101,7 +104,7 @@ export class ConnectionPool extends BI.Widget { { type: Label, cls: 'bi-tips', - text: BI.i18nText('Dec-Dcm_Connection_Plase_Add_One'), + text: BI.i18nText('Dec-Dec_Connection_NO_Connection_Pool'), }, ], },