From e77fbc0219b2599ce8eba8a40abc756035f53489 Mon Sep 17 00:00:00 2001 From: alan Date: Mon, 19 Aug 2019 16:03:31 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=97=A0=E6=B3=95=E8=AF=86=E5=88=AB?= =?UTF-8?q?=E7=9A=84=E6=95=B0=E6=8D=AE=E5=BA=93=E7=B1=BB=E5=9E=8B=E5=88=99?= =?UTF-8?q?=E9=BB=98=E8=AE=A4=E4=B8=BAother?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/modules/app.service.ts | 6 ++---- src/modules/constants/constant.ts | 15 +++++++++++++++ 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/src/modules/app.service.ts b/src/modules/app.service.ts index 2b08642..3d49230 100644 --- a/src/modules/app.service.ts +++ b/src/modules/app.service.ts @@ -1,4 +1,4 @@ -import { DATA_BASE_TYPES } from '@constants/constant'; +import { DATA_BASE_TYPES, DATA_BASE_TYPES_OTHER } from '@constants/constant'; import { CONSTANT_PLUGIN_TYPES, CONSTANT_PLUGIN_SHOW, CONSTANT_PLUGIN_EDIT } from '@constants/plugin'; import { DatabaseType } from './app.typings'; export function getAllDatabaseTypes():DatabaseType[] { @@ -37,9 +37,7 @@ export function getJdbcDatabaseType(database: string, driver: string): DatabaseT }); } if (!databaseType) { - BI.Msg.toast(BI.i18nText('Dec-Dcm_Connection_Driver_Unable_Recognize', driver), { - level: 'error', - }); + return DATA_BASE_TYPES_OTHER; } return databaseType; diff --git a/src/modules/constants/constant.ts b/src/modules/constants/constant.ts index 977e946..c4122e5 100644 --- a/src/modules/constants/constant.ts +++ b/src/modules/constants/constant.ts @@ -15,6 +15,19 @@ export const DATEBASE_FILTER_TYPE = { BI.constant(CONSTANT_PLUGIN_TYPES, [ ]); + +export const DATA_BASE_TYPES_OTHER = +{ + text: 'other', + databaseType: 'other', + driver: '', + url: '', + commonly: false, + internal: false, + type: 'jdbc', + hasSchema: false, + kerberos: false, +}; export const DATA_BASE_TYPES = [ { text: 'ADS', @@ -383,6 +396,8 @@ export const DATA_BASE_TYPES = [ }), ]; + + export const CONNECT_CHARSET = [ { text: '自动',