Browse Source

DEC-15759 & DEC-15764 帮助文档链接

release/10.0
qiucong 4 years ago
parent
commit
b6e8c2c076
  1. 6
      assets/scripts/dec.js
  2. 8
      src/modules/constants/constant.ts
  3. 4
      src/modules/pages/maintain/forms/form.server.ts

6
assets/scripts/dec.js

@ -6,6 +6,7 @@ window.DecCst = {
LOGIN_INFO_NOT_AVAILABLE: '21300014', LOGIN_INFO_NOT_AVAILABLE: '21300014',
LOGIN_INFO_ERROR: '21300018', LOGIN_INFO_ERROR: '21300018',
TIMEOUT: '21300001', TIMEOUT: '21300001',
LACK_DRIVER: '22400037'
}, },
Connect: { Connect: {
ConnectionType: { ConnectionType: {
@ -18,7 +19,9 @@ window.DecCst = {
} }
}, },
Hyperlink: { Hyperlink: {
Database: {}, Database: {
ODPS: "odps"
},
DECISION_HYPERLINK_CONFIG: "hyperlink", DECISION_HYPERLINK_CONFIG: "hyperlink",
WEBSOCKET_CONNECT: "websocket" WEBSOCKET_CONNECT: "websocket"
} }
@ -35,6 +38,7 @@ window.Dec = {
system: { system: {
hyperlink: { hyperlink: {
websocket: "http://help.finebi.com/doc-view-183.html", websocket: "http://help.finebi.com/doc-view-183.html",
odps: "http://help.finebi.com/doc-view-183.html",
}, },
} }
} }

8
src/modules/constants/constant.ts

@ -55,6 +55,10 @@ export const DATA_BASE_DRIVER_LINK = DecCst && DecCst.Hyperlink ? [
databaseType: 'derby', databaseType: 'derby',
link: DecCst.Hyperlink.Database.DERBY, link: DecCst.Hyperlink.Database.DERBY,
}, },
{
databaseType: 'clickhouse',
link: DecCst.Hyperlink.Database.CLICKHOUSE,
},
{ {
databaseType: 'gbase-8a', databaseType: 'gbase-8a',
link: DecCst.Hyperlink.Database.GBASE8A, link: DecCst.Hyperlink.Database.GBASE8A,
@ -123,6 +127,10 @@ export const DATA_BASE_DRIVER_LINK = DecCst && DecCst.Hyperlink ? [
databaseType: 'mysql', databaseType: 'mysql',
link: DecCst.Hyperlink.Database.MYSQL, link: DecCst.Hyperlink.Database.MYSQL,
}, },
{
databaseType: 'odps',
link: DecCst.Hyperlink.Database.ODPS,
},
{ {
databaseType: 'oracle', databaseType: 'oracle',
link: DecCst.Hyperlink.Database.ORACLE, link: DecCst.Hyperlink.Database.ORACLE,

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

@ -2,6 +2,7 @@ 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 } 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 { ApiFactory } from '../../../crud/apiFactory'; import { ApiFactory } from '../../../crud/apiFactory';
const api = new ApiFactory().create(); const api = new ApiFactory().create();
export function testConnection(value: Connection): Promise<string[]> { export function testConnection(value: Connection): Promise<string[]> {
@ -31,7 +32,8 @@ export function testConnection(value: Connection): Promise<string[]> {
} }
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');
testStatus.setFail(re.errorMsg, driver, Dec.system[DecCst.Hyperlink.DECISION_HYPERLINK_CONFIG][databaseLink]); const link = Dec.system[DecCst.Hyperlink.DECISION_HYPERLINK_CONFIG][databaseLink] || BI.get(getJdbcDatabaseType(databaseType, driver), 'link');
testStatus.setFail(re.errorMsg, driver, link);
} else { } else {
testStatus.setFail(re.errorMsg); testStatus.setFail(re.errorMsg);
} }

Loading…
Cancel
Save