Browse Source

Merge pull request #871 in DEC/decision-webui-dcm from release/10.0 to bugfix/10.0

* commit 'e42e7eeb472798f4a9066481b34aec64e5981d8d':
  DEC-15759 fix: 【mysql8隔离插件】帮助文档链接跳转
bugfix/10.0
superman 4 years ago
parent
commit
b04dec26d8
  1. 2
      src/modules/constants/constant.ts
  2. 6
      src/modules/pages/maintain/forms/form.server.ts

2
src/modules/constants/constant.ts

@ -9,6 +9,8 @@ export const PAGE_INDEX = {
export const OTHER_JDBC = 'otherJDBC'; 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 = 'sun.jdbc.odbc.JdbcOdbcDriver';
export const JDBC_ODBC_DRIVER_HELP_LINK = DecCst && DecCst.Hyperlink ? DecCst.Hyperlink.Database.OTHER_ODBC : ''; export const JDBC_ODBC_DRIVER_HELP_LINK = DecCst && DecCst.Hyperlink ? DecCst.Hyperlink.Database.OTHER_ODBC : '';

6
src/modules/pages/maintain/forms/form.server.ts

@ -1,6 +1,6 @@
import { Connection, ConnectionJDBC } from '../../../crud/crud.typings'; import { Connection, ConnectionJDBC } from '../../../crud/crud.typings';
import { connectionType, errorCode } from '@constants/env'; 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 { TestStatusXtype, EVENT_RELOAD, EVENT_CLOSE } from '../../../components/test_status/test_status';
import { getJdbcDatabaseType } from '../../../app.service'; import { getJdbcDatabaseType } from '../../../app.service';
import { ApiFactory } from '../../../crud/apiFactory'; import { ApiFactory } from '../../../crud/apiFactory';
@ -31,8 +31,8 @@ export function testConnection(value: Connection): Promise<string[]> {
return; return;
} }
const databaseType = (formValue.connectionData as ConnectionJDBC).database; const databaseType = (formValue.connectionData as ConnectionJDBC).database;
const databaseLink = BI.get(DATA_BASE_DRIVER_LINK.find(item => item.databaseType === databaseType), 'link'); const databaseLink = BI.get(DATA_BASE_DRIVER_LINK.find(item => item.databaseType === databaseType), 'link', DEFAULT_HELP_LINK);
const link = Dec.system[DecCst.Hyperlink.DECISION_HYPERLINK_CONFIG][databaseLink] || BI.get(getJdbcDatabaseType(databaseType, driver), 'link'); const link = BI.get(getJdbcDatabaseType(databaseType, driver), 'link') || Dec.system[DecCst.Hyperlink.DECISION_HYPERLINK_CONFIG][databaseLink];
testStatus.setFail(re.errorMsg, driver, link); testStatus.setFail(re.errorMsg, driver, link);
} else { } else {
testStatus.setFail(re.errorMsg); testStatus.setFail(re.errorMsg);

Loading…
Cancel
Save