Browse Source

Merge pull request #1097 in DEC/decision-webui-dcm from final/10.0 to persist/10.0

* commit 'f576395f9956a062a4882e6aee4a11dd7c2fdc57':
  DEC-16314 fix: 【迭代】数据连接——Kyligence驱动帮助文档跳转不对
  DEC-16193 feat: 【BI】BI-76625 ODPS改为MaxCompute
  DEC-16248 feat: Kyligence企业版数据源支持平台适配
  KERNEL-6272 feat: FTP,数据连接等系统管理配置密码的地方需要屏蔽记住密码功能
  fix: DEC-16169 改用provider获取插件数据连接
persist/10.0 10.0.12.2020.12.17
superman 4 years ago
parent
commit
13c62a6021
  1. 5
      src/modules/app.provider.ts
  2. 5
      src/modules/app.service.ts
  3. 25
      src/modules/constants/constant.ts
  4. 1
      src/modules/pages/maintain/forms/components/form.jdbc.ts

5
src/modules/app.provider.ts

@ -60,14 +60,15 @@ BI.provider('dec.connection.provider.datebase', function() {
this.registerDatabaseType = (config: any) => {
BI.config(CONSTANT_PLUGIN_TYPES, connections => BI.concat(connections, config));
};
this.registerJdbcDatabase = (config: any, resolve?: Function) => {
BI.config(CONSTANT_PLUGIN_TYPES, connections => BI.concat(connections, { ...config, type: 'jdbc' }));
BI.isFunction(resolve) && (this.resolves[config.databaseType] = resolve);
};
this.$get = () => BI.inherit(BI.OB, {
getJdbcResolveByType: (type: string) => this.resolves[type] || jdbcResolve,
customDatabaseType: BI.Constants.getConstant(CONSTANT_PLUGIN_TYPES),
});
});

5
src/modules/app.service.ts

@ -1,11 +1,10 @@
import { DATA_BASE_TYPES, DATA_BASE_TYPES_OTHER, DESIGN_DRIVER_TYPE, OTHER_JDBC } from '@constants/constant';
import { CONSTANT_PLUGIN_TYPES } from './app.constant';
import { DatabaseType } from './app.typings';
import { Connection } from './crud/crud.typings';
export function getAllDatabaseTypes():DatabaseType[] {
return [
...DATA_BASE_TYPES,
...BI.Constants.getConstant(CONSTANT_PLUGIN_TYPES).map(item => {
...BI.Providers.getProvider('dec.connection.provider.datebase').customDatabaseType.map(item => {
return {
...item,
internal: false,
@ -15,7 +14,7 @@ export function getAllDatabaseTypes():DatabaseType[] {
];
}
function getPlugin(type: string) {
return BI.Constants.getConstant(CONSTANT_PLUGIN_TYPES).find(item => item.databaseType === type);
return BI.Providers.getProvider('dec.connection.provider.datebase').customDatabaseType.find(item => item.databaseType === type);
}
export function getPluginWidgetShow(plugin: string) {
return BI.get(getPlugin(plugin), 'show');

25
src/modules/constants/constant.ts

@ -1,5 +1,3 @@
import { CONSTANT_PLUGIN_TYPES } from '../app.constant';
export const PAGE_INDEX = {
CONNECTION: 'connection',
DATEBASE: 'datebase',
@ -121,6 +119,10 @@ export const DATA_BASE_DRIVER_LINK = DecCst && DecCst.Hyperlink ? [
databaseType: 'kingbase',
link: DecCst.Hyperlink.Database.KINGBASE,
},
{
databaseType: 'kyligence',
link: DecCst.Hyperlink.Database.KYLIGENCE,
},
{
databaseType: 'sql-server',
link: DecCst.Hyperlink.Database.SQLSERVER,
@ -448,6 +450,16 @@ export const DATA_BASE_TYPES = [
type: 'jdbc',
hasSchema: true,
kerberos: false,
}, {
text: 'Kyligence',
databaseType: 'kyligence',
driver: 'org.apache.kylin.jdbc.Driver',
url: 'jdbc:kylin://hostname:port/database',
commonly: false,
internal: true,
type: 'jdbc',
hasSchema: true,
kerberos: false,
}, {
text: 'Microsoft SQL Server',
databaseType: 'sql-server',
@ -475,7 +487,7 @@ export const DATA_BASE_TYPES = [
},
},
{
text: 'ODPS',
text: 'MaxCompute',
databaseType: 'odps',
driver: 'com.aliyun.odps.jdbc.OdpsDriver',
url: 'jdbc:odps:<maxcompute_endpoint>?project=<maxcompute_project_name>',
@ -619,13 +631,6 @@ export const DATA_BASE_TYPES = [
'org.sqlite.JDBC': 'jdbc:sqlite:[PATH_TO_DB_FILES]',
},
},
...BI.Constants.getConstant(CONSTANT_PLUGIN_TYPES).map(item => {
return {
...item,
internal: false,
commonly: false,
};
}),
];

1
src/modules/pages/maintain/forms/components/form.jdbc.ts

@ -260,6 +260,7 @@ export class FormJdbc extends BI.Widget {
allowBlank: true,
value: password,
inputType: 'password',
autocomplete: 'new-password',
watermark: BI.i18nText('Dec-Dcm_Connection_Form_Password'),
ref: (_ref: any) => {
this.form.password = _ref;

Loading…
Cancel
Save