Browse Source

Merge pull request #6499 in DEC/decision-webui-dcm from release/11.0 to final/11.0

* commit '0cd779e9c7718538bfcc401ee22b8fcec26dee8d':
  REPORT-85200 fix:修复「初始化连接数」错误提示显示问题
  REPORT-85619 feat: 拓展下数据连接配置功能
  REPORT-85441 fix:clickhouse连接url添加database
  BI-116671 fix:数据连接管理-新建数据连接界面在IE浏览器下有问题,最右侧取消和保存部分不显示
final/11.0
superman 2 years ago
parent
commit
b0dfc4d8af
  1. 24
      src/modules/app.provider.ts
  2. 2
      src/modules/constants/constant.ts
  3. 3
      src/modules/pages/maintain/forms/components/form.jdbc.ts
  4. 1
      src/modules/title/title.ts

24
src/modules/app.provider.ts

@ -1,4 +1,5 @@
import { CONSTANT_PLUGIN_TYPES } from './app.constant'; import { CONSTANT_PLUGIN_TYPES } from './app.constant';
import { DATA_BASE_TYPES } from '@constants/constant';
BI.provider('dec.connection.provider.datebase', function () { BI.provider('dec.connection.provider.datebase', function () {
this.resolves = {}; this.resolves = {};
@ -68,14 +69,35 @@ BI.provider('dec.connection.provider.datebase', function() {
}; };
} }
function coverBaseDatabase(config) {
const baseDataBase = DATA_BASE_TYPES.find(item => item.text === config.text);
if (BI.isNotNull(baseDataBase)) {
// 覆盖基础配置
Object.assign(baseDataBase, config);
return true;
}
return false;
}
this.registerDatabaseType = (config: any) => { this.registerDatabaseType = (config: any) => {
if (coverBaseDatabase(config)) return;
BI.config(CONSTANT_PLUGIN_TYPES, connections => BI.concat(connections, config)); BI.config(CONSTANT_PLUGIN_TYPES, connections => BI.concat(connections, config));
}; };
this.registerJdbcDatabase = (config: any, resolve?: Function) => { this.registerJdbcDatabase = (config: any, resolve?: Function) => {
BI.config(CONSTANT_PLUGIN_TYPES, connections => BI.concat(connections, { ...config, type: 'jdbc' })); config = {
...config,
type: 'jdbc',
};
BI.isFunction(resolve) && (this.resolves[config.databaseType] = resolve); BI.isFunction(resolve) && (this.resolves[config.databaseType] = resolve);
if (coverBaseDatabase(config)) return;
BI.config(CONSTANT_PLUGIN_TYPES, connections => BI.concat(connections, config));
}; };
this.$get = () => BI.inherit(BI.OB, { this.$get = () => BI.inherit(BI.OB, {

2
src/modules/constants/constant.ts

@ -279,7 +279,7 @@ export const DATA_BASE_TYPES = [
text: 'ClickHouse', text: 'ClickHouse',
databaseType: 'clickhouse', databaseType: 'clickhouse',
driver: 'ru.yandex.clickhouse.ClickHouseDriver', driver: 'ru.yandex.clickhouse.ClickHouseDriver',
url: 'jdbc:clickhouse://hostname:port', url: 'jdbc:clickhouse://hostname:port/database',
commonly: false, commonly: false,
internal: true, internal: true,
type: 'jdbc', type: 'jdbc',

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

@ -1001,7 +1001,8 @@ export class FormJdbc extends BI.Widget {
{ {
el: { el: {
type: BI.VerticalLayout.xtype, type: BI.VerticalLayout.xtype,
bgap: vgap, vgap: vgap,
top: -15,
invisible: true, invisible: true,
ref: (_ref: VerticalLayout) => { ref: (_ref: VerticalLayout) => {
this.advancedSet = _ref; this.advancedSet = _ref;

1
src/modules/title/title.ts

@ -78,6 +78,7 @@ export class Title extends BI.Widget {
type: BI.Tab.xtype, type: BI.Tab.xtype,
height: 40, height: 40,
showIndex: this.model.pageIndex, showIndex: this.model.pageIndex,
width:200,
ref: (_ref: Tab) => { ref: (_ref: Tab) => {
this.tab = _ref; this.tab = _ref;
}, },

Loading…
Cancel
Save