From d0534e8cde322f15c532e1260efecb01d87ff78a Mon Sep 17 00:00:00 2001 From: qiucong Date: Mon, 9 Nov 2020 17:09:00 +0800 Subject: [PATCH] =?UTF-8?q?DEC-15759=20fix:=20=E3=80=90mysql8=E9=9A=94?= =?UTF-8?q?=E7=A6=BB=E6=8F=92=E4=BB=B6=E3=80=91=E5=B8=AE=E5=8A=A9=E6=96=87?= =?UTF-8?q?=E6=A1=A3=E9=93=BE=E6=8E=A5=E8=B7=B3=E8=BD=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/modules/constants/constant.ts | 2 ++ src/modules/pages/maintain/forms/form.server.ts | 6 +++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/modules/constants/constant.ts b/src/modules/constants/constant.ts index 96c93c1..0c7549f 100644 --- a/src/modules/constants/constant.ts +++ b/src/modules/constants/constant.ts @@ -9,6 +9,8 @@ export const PAGE_INDEX = { export const OTHER_JDBC = 'otherJDBC'; +export const DEFAULT_HELP_LINK = 'databaseHelpLink'; + export const JDBC_ODBC_DRIVER = 'sun.jdbc.odbc.JdbcOdbcDriver'; export const JDBC_ODBC_DRIVER_HELP_LINK = DecCst && DecCst.Hyperlink ? DecCst.Hyperlink.Database.OTHER_ODBC : ''; diff --git a/src/modules/pages/maintain/forms/form.server.ts b/src/modules/pages/maintain/forms/form.server.ts index b97bd94..a862e1f 100644 --- a/src/modules/pages/maintain/forms/form.server.ts +++ b/src/modules/pages/maintain/forms/form.server.ts @@ -1,6 +1,6 @@ import { Connection, ConnectionJDBC } from '../../../crud/crud.typings'; import { connectionType, errorCode } from '@constants/env'; -import { DATA_BASE_DRIVER_LINK, JDBC_ODBC_DRIVER, JDBC_ODBC_DRIVER_HELP_LINK } from '@constants/constant'; +import { DATA_BASE_DRIVER_LINK, JDBC_ODBC_DRIVER, JDBC_ODBC_DRIVER_HELP_LINK, DEFAULT_HELP_LINK } from '@constants/constant'; import { TestStatusXtype, EVENT_RELOAD, EVENT_CLOSE } from '../../../components/test_status/test_status'; import { getJdbcDatabaseType } from '../../../app.service'; import { ApiFactory } from '../../../crud/apiFactory'; @@ -31,8 +31,8 @@ export function testConnection(value: Connection): Promise { return; } const databaseType = (formValue.connectionData as ConnectionJDBC).database; - const databaseLink = BI.get(DATA_BASE_DRIVER_LINK.find(item => item.databaseType === databaseType), 'link'); - const link = Dec.system[DecCst.Hyperlink.DECISION_HYPERLINK_CONFIG][databaseLink] || BI.get(getJdbcDatabaseType(databaseType, driver), 'link'); + const databaseLink = BI.get(DATA_BASE_DRIVER_LINK.find(item => item.databaseType === databaseType), 'link', DEFAULT_HELP_LINK); + const link = BI.get(getJdbcDatabaseType(databaseType, driver), 'link') || Dec.system[DecCst.Hyperlink.DECISION_HYPERLINK_CONFIG][databaseLink]; testStatus.setFail(re.errorMsg, driver, link); } else { testStatus.setFail(re.errorMsg);