Browse Source

fix: BI-51659 修复无法新建其他类型数据库的bug

qufenxi
alan 5 years ago
parent
commit
770f7de9a9
  1. 2
      src/modules/constants/constant.ts
  2. 6
      src/modules/pages/maintain/forms/form.ts

2
src/modules/constants/constant.ts

@ -530,7 +530,7 @@ export const DATA_BASE_TYPES = [
databaseType: 'other', databaseType: 'other',
driver: 'org.ha.Driver', driver: 'org.ha.Driver',
drivers: ['org.ha.Driver', 'com.fr.third.org.hsqldb.jdbcDriver', 'org.sqlite.JDBC'], drivers: ['org.ha.Driver', 'com.fr.third.org.hsqldb.jdbcDriver', 'org.sqlite.JDBC'],
url: 'jdbc:h2://hostname:port/../database', url: 'jdbc:h2://hostname:port/database',
commonly: false, commonly: false,
internal: true, internal: true,
type: 'other', type: 'other',

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

@ -6,7 +6,7 @@ import { FormPluginXtype } from './components/form.plugin';
import { connectionType } from '@constants/env'; import { connectionType } from '@constants/env';
import { ConnectionJDBC, Connection } from 'src/modules/crud/crud.typings'; import { ConnectionJDBC, Connection } from 'src/modules/crud/crud.typings';
import { TestStatusXtype, EVENT_RELOAD, EVENT_CLOSE } from 'src/modules/components/test_status/test_status'; import { TestStatusXtype, EVENT_RELOAD, EVENT_CLOSE } from 'src/modules/components/test_status/test_status';
import { DEFAULT_JNDI_DATA, DEFAULT_JDBC_POOL, DATA_BASE_DRIVER_LINK } from '@constants/constant'; import { DEFAULT_JNDI_DATA, DEFAULT_JDBC_POOL, DATA_BASE_DRIVER_LINK, DATEBASE_FILTER_TYPE } from '@constants/constant';
import { getJdbcDatabaseType } from 'src/modules/app.service'; import { getJdbcDatabaseType } from 'src/modules/app.service';
export const MaintainFormXtype = 'dec.dcm.maintain.form'; export const MaintainFormXtype = 'dec.dcm.maintain.form';
@ -136,6 +136,8 @@ export class MaintainForm extends BI.Widget {
return FormJdbcXtype; return FormJdbcXtype;
case connectionType.JNDI: case connectionType.JNDI:
return FormJndiXtype; return FormJndiXtype;
case DATEBASE_FILTER_TYPE.OTHER:
return FormJdbcXtype;
default: default:
return FormPluginXtype; return FormPluginXtype;
} }
@ -147,6 +149,8 @@ export class MaintainForm extends BI.Widget {
return this.getJdbcConnection(); return this.getJdbcConnection();
case connectionType.JNDI: case connectionType.JNDI:
return this.getJndiConnection(); return this.getJndiConnection();
case DATEBASE_FILTER_TYPE.OTHER:
return this.getJdbcConnection();
default: default:
return this.getPluginConnection(); return this.getPluginConnection();
} }

Loading…
Cancel
Save