Browse Source

Pull request #847: DEC-15759 & DEC-15764 帮助文档链接

Merge in DEC/decision-webui-dcm from ~FRANK.QIU/decision-webui-dcm:release/10.0 to release/10.0

* commit '9613729ae64713702cff98d27f186231d22e9f46':
  DEC-15759 & DEC-15764 帮助文档链接
release/10.0
Frank.Qiu 4 years ago
parent
commit
7b7cf0fa5e
  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_ERROR: '21300018',
TIMEOUT: '21300001',
LACK_DRIVER: '22400037'
},
Connect: {
ConnectionType: {
@ -18,7 +19,9 @@ window.DecCst = {
}
},
Hyperlink: {
Database: {},
Database: {
ODPS: "odps"
},
DECISION_HYPERLINK_CONFIG: "hyperlink",
WEBSOCKET_CONNECT: "websocket"
}
@ -35,6 +38,7 @@ window.Dec = {
system: {
hyperlink: {
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',
link: DecCst.Hyperlink.Database.DERBY,
},
{
databaseType: 'clickhouse',
link: DecCst.Hyperlink.Database.CLICKHOUSE,
},
{
databaseType: 'gbase-8a',
link: DecCst.Hyperlink.Database.GBASE8A,
@ -123,6 +127,10 @@ export const DATA_BASE_DRIVER_LINK = DecCst && DecCst.Hyperlink ? [
databaseType: 'mysql',
link: DecCst.Hyperlink.Database.MYSQL,
},
{
databaseType: 'odps',
link: DecCst.Hyperlink.Database.ODPS,
},
{
databaseType: '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 { 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 { getJdbcDatabaseType } from '../../../app.service';
import { ApiFactory } from '../../../crud/apiFactory';
const api = new ApiFactory().create();
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 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 {
testStatus.setFail(re.errorMsg);
}

Loading…
Cancel
Save