You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
631 lines
16 KiB
631 lines
16 KiB
import { CONSTANT_PLUGIN_TYPES } from './plugin'; |
|
|
|
export const PAGE_INDEX = { |
|
CONNECTION: 'connection', |
|
DATEBASE: 'datebase', |
|
MAINTAIN: 'maintain', |
|
POOL: 'pool', |
|
}; |
|
|
|
export const DATEBASE_FILTER_TYPE = { |
|
COMMONLY: 'commonly', |
|
ALL: 'all', |
|
OTHER: 'other', |
|
}; |
|
|
|
BI.constant(CONSTANT_PLUGIN_TYPES, [ |
|
]); |
|
|
|
export const DATA_BASE_TYPES_OTHER = |
|
{ |
|
text: 'other', |
|
databaseType: 'other', |
|
driver: '', |
|
url: '', |
|
commonly: false, |
|
internal: false, |
|
type: 'jdbc', |
|
hasSchema: true, |
|
kerberos: false, |
|
}; |
|
export const DATA_BASE_DRIVER_LINK = DecCst ? [ |
|
{ |
|
databaseType: 'ads', |
|
link: DecCst.Hyperlink.Database.ADS, |
|
}, |
|
{ |
|
databaseType: 'amazon-redshift', |
|
link: DecCst.Hyperlink.Database.REDSHIFT, |
|
}, |
|
{ |
|
databaseType: 'apache-impala', |
|
link: DecCst.Hyperlink.Database.IMPALA, |
|
}, |
|
{ |
|
databaseType: 'apache-kylin', |
|
link: DecCst.Hyperlink.Database.PHOENIX, |
|
}, |
|
{ |
|
databaseType: 'apache-phoenix', |
|
link: DecCst.Hyperlink.Database.PHOENIX, |
|
}, |
|
{ |
|
databaseType: 'derby', |
|
link: DecCst.Hyperlink.Database.DERBY, |
|
}, |
|
{ |
|
databaseType: 'gbase-8a', |
|
link: DecCst.Hyperlink.Database.GBASE8A, |
|
}, |
|
{ |
|
databaseType: 'gbase-8s', |
|
link: DecCst.Hyperlink.Database.GBASE8S, |
|
}, |
|
{ |
|
databaseType: 'gbase-8t', |
|
link: DecCst.Hyperlink.Database.GBASE8T, |
|
}, |
|
{ |
|
databaseType: 'h2', |
|
link: DecCst.Hyperlink.Database.H2, |
|
}, |
|
{ |
|
databaseType: 'hw-dws', |
|
link: DecCst.Hyperlink.Database.DWS, |
|
}, |
|
{ |
|
databaseType: 'hw-elk', |
|
link: DecCst.Hyperlink.Database.ELK, |
|
}, |
|
{ |
|
databaseType: 'hw-fusioninsight-hd', |
|
link: DecCst.Hyperlink.Database.FUSIONINSIGHT, |
|
}, |
|
{ |
|
databaseType: 'hw-libr-a', |
|
link: DecCst.Hyperlink.Database.LIBRA, |
|
}, |
|
{ |
|
databaseType: 'hadoop-hive', |
|
link: DecCst.Hyperlink.Database.HIVE, |
|
}, |
|
{ |
|
databaseType: 'hbase', |
|
link: DecCst.Hyperlink.Database.HBASE, |
|
}, |
|
{ |
|
databaseType: 'hp-vertica', |
|
link: DecCst.Hyperlink.Database.VERTICA, |
|
}, |
|
{ |
|
databaseType: 'hsql', |
|
link: DecCst.Hyperlink.Database.HSQL, |
|
}, |
|
{ |
|
databaseType: 'ibm-db2', |
|
link: DecCst.Hyperlink.Database.DB2, |
|
}, |
|
{ |
|
databaseType: 'informix', |
|
link: DecCst.Hyperlink.Database.INFORMIX, |
|
}, |
|
{ |
|
databaseType: 'kingbase', |
|
link: DecCst.Hyperlink.Database.KINGBASE, |
|
}, |
|
{ |
|
databaseType: 'sql-server', |
|
link: DecCst.Hyperlink.Database.SQLSERVER, |
|
}, |
|
{ |
|
databaseType: 'mysql', |
|
link: DecCst.Hyperlink.Database.MYSQL, |
|
}, |
|
{ |
|
databaseType: 'oracle', |
|
link: DecCst.Hyperlink.Database.ORACLE, |
|
}, |
|
{ |
|
databaseType: 'pivotal-greenplum-database', |
|
link: DecCst.Hyperlink.Database.GP, |
|
}, |
|
{ |
|
databaseType: 'postgresql', |
|
link: DecCst.Hyperlink.Database.POSTGRE, |
|
}, |
|
{ |
|
databaseType: 'presto', |
|
link: DecCst.Hyperlink.Database.PRESTO, |
|
}, |
|
{ |
|
databaseType: 'sap-hana', |
|
link: DecCst.Hyperlink.Database.HANA, |
|
}, |
|
{ |
|
databaseType: 'sap-sybase', |
|
link: DecCst.Hyperlink.Database.SYBASE, |
|
}, |
|
{ |
|
databaseType: 'spark', |
|
link: DecCst.Hyperlink.Database.SPARK, |
|
}, |
|
{ |
|
databaseType: 'sqlite', |
|
link: DecCst.Hyperlink.Database.SQLITE, |
|
}, |
|
{ |
|
databaseType: 'teradata', |
|
link: DecCst.Hyperlink.Database.TERADATA, |
|
}, |
|
{ |
|
databaseType: 'transwarp-inceptor', |
|
link: DecCst.Hyperlink.Database.INCEPTOR, |
|
}, |
|
{ |
|
databaseType: 'other', |
|
link: DecCst.Hyperlink.Database.OTHER, |
|
}, |
|
] : []; |
|
export const DATA_BASE_TYPES = [ |
|
{ |
|
text: 'ADS', |
|
databaseType: 'ads', |
|
driver: 'com.mysql.jdbc.Driver', |
|
url: 'jdbc:mysql://hostname:port/database', |
|
commonly: false, |
|
internal: true, |
|
type: 'jdbc', |
|
hasSchema: false, |
|
kerberos: false, |
|
}, |
|
{ |
|
text: 'Amazon Redshift', |
|
databaseType: 'amazon-redshift', |
|
driver: 'com.amazon.redshift.jdbc4.Driver', |
|
drivers: ['com.amazon.redshift.jdbc4.Driver', 'com.amazon.redshift.jdbc41.Driver'], |
|
url: 'jdbc:redshift://endpoint:port/database', |
|
commonly: false, |
|
internal: true, |
|
type: 'jdbc', |
|
hasSchema: true, |
|
kerberos: false, |
|
}, |
|
{ |
|
text: 'APACHE IMPALA', |
|
databaseType: 'apache-impala', |
|
driver: 'com.cloudera.impala.jdbc41.Driver', |
|
url: 'jdbc:impala://hostname:port/database', |
|
commonly: false, |
|
internal: true, |
|
type: 'jdbc', |
|
hasSchema: false, |
|
kerberos: true, |
|
}, |
|
{ |
|
text: 'APACHE KYLIN', |
|
databaseType: 'apache-kylin', |
|
driver: 'org.apache.kylin.jdbc.Driver', |
|
url: 'jdbc:kylin://hostname:port/database', |
|
commonly: false, |
|
internal: true, |
|
type: 'jdbc', |
|
hasSchema: true, |
|
kerberos: false, |
|
}, |
|
{ |
|
text: 'APACHE Phoenix', |
|
databaseType: 'apache-phoenix', |
|
driver: 'org.apache.phoenix.jdbc.PhoenixDriver', |
|
url: 'jdbc:phoenix:hostname:port/database', |
|
commonly: false, |
|
internal: true, |
|
type: 'jdbc', |
|
hasSchema: true, |
|
kerberos: true, |
|
}, |
|
{ |
|
text: 'DERBY', |
|
databaseType: 'derby', |
|
driver: 'org.apache.derby.jdbc.ClientDriver', |
|
url: 'jdbc:derby://hostname:port/database', |
|
commonly: false, |
|
internal: true, |
|
type: 'jdbc', |
|
hasSchema: true, |
|
kerberos: false, |
|
}, |
|
{ |
|
text: 'Gbase 8A', |
|
databaseType: 'gbase-8a', |
|
driver: 'com.gbase.jdbc.Driver', |
|
url: 'jdbc:gbase://hostname:port/database', |
|
commonly: false, |
|
internal: true, |
|
type: 'jdbc', |
|
hasSchema: false, |
|
kerberos: false, |
|
}, |
|
{ |
|
text: 'Gbase 8S', |
|
databaseType: 'gbase-8s', |
|
driver: 'com.gbasedbt.jdbc.IfxDriver', |
|
url: 'jdbc:gbasedbt-sqli://hostname:port/database', |
|
commonly: false, |
|
internal: true, |
|
type: 'jdbc', |
|
hasSchema: true, |
|
kerberos: false, |
|
}, |
|
{ |
|
text: 'Gbase 8T', |
|
databaseType: 'gbase-8t', |
|
driver: 'com.informix.jdbc.IfxDriver', |
|
url: 'jdbc:informix-sqli://hostname:port/database:INFORMIXSERVER={server}', |
|
commonly: false, |
|
internal: true, |
|
type: 'jdbc', |
|
hasSchema: true, |
|
kerberos: false, |
|
}, |
|
{ |
|
text: 'H2', |
|
databaseType: 'h2', |
|
driver: 'org.h2.Driver', |
|
url: 'jdbc:h2://hostname:port/../database', |
|
commonly: false, |
|
internal: true, |
|
type: 'jdbc', |
|
hasSchema: true, |
|
kerberos: false, |
|
}, |
|
{ |
|
text: BI.i18nText('Dec-Dcm_Connection_HW_DWS'), |
|
databaseType: 'hw-dws', |
|
driver: 'org.postgresql.Driver', |
|
url: 'jdbc:postgresql://hostname:port/database', |
|
commonly: false, |
|
internal: true, |
|
type: 'jdbc', |
|
hasSchema: true, |
|
kerberos: false, |
|
}, |
|
{ |
|
text: 'FusionInsight elk', |
|
databaseType: 'hw-elk', |
|
driver: 'org.postgresql.Driver', |
|
url: 'jdbc:postgresql://hostname:port/database', |
|
commonly: false, |
|
internal: true, |
|
type: 'jdbc', |
|
hasSchema: true, |
|
kerberos: false, |
|
}, |
|
{ |
|
text: 'FusionInsight HD', |
|
databaseType: 'hw-fusioninsight-hd', |
|
driver: 'org.apache.hive.jdbc.HiveDriver', |
|
url: 'jdbc:hive2://10.135.0.110:24002,10.135.0.67:24002,10.135.0.66:24002/;serviceDiscoveryMode=zooKeeper;zooKeeperNamespace=hiveserver2;sasl.qop=auth-conf;auth=KERBEROS;zk.principal=zookeeper/hadoop;principal=hive/hadoop.hadoop.com@HADOOP.COM;', |
|
commonly: false, |
|
internal: true, |
|
type: 'jdbc', |
|
hasSchema: false, |
|
kerberos: false, |
|
}, |
|
{ |
|
text: 'GaussDB 200', |
|
databaseType: 'hw-libr-a', |
|
driver: 'org.postgresql.Driver', |
|
url: 'jdbc:postgresql://hostname:port/database', |
|
commonly: false, |
|
internal: true, |
|
type: 'jdbc', |
|
hasSchema: true, |
|
kerberos: false, |
|
}, { |
|
text: 'Hadoop Hive', |
|
databaseType: 'hadoop-hive', |
|
driver: 'org.apache.hive.jdbc.HiveDriver', |
|
url: 'jdbc:hive2://hostname:port/database', |
|
commonly: false, |
|
internal: true, |
|
type: 'jdbc', |
|
hasSchema: false, |
|
kerberos: true, |
|
}, { |
|
text: 'Hbase', |
|
databaseType: 'hbase', |
|
driver: 'org.apache.phoenix.jdbc.PhoenixDriver', |
|
url: 'jdbc:phoenix:hostname:port/database', |
|
commonly: false, |
|
internal: true, |
|
type: 'jdbc', |
|
hasSchema: true, |
|
kerberos: true, |
|
}, { |
|
text: 'HP Vertica', |
|
databaseType: 'hp-vertica', |
|
driver: 'com.vertica.jdbc.Driver', |
|
url: 'jdbc:vertica://hostname:port/database', |
|
commonly: false, |
|
internal: true, |
|
type: 'jdbc', |
|
hasSchema: true, |
|
kerberos: false, |
|
}, { |
|
text: 'Hsql', |
|
databaseType: 'hsql', |
|
driver: 'com.fr.third.org.hsqldb.jdbcDriver', |
|
url: 'jdbc:hsqldb:file:[PATH_TO_DB_FILES]', |
|
commonly: true, |
|
internal: true, |
|
type: 'jdbc', |
|
hasSchema: true, |
|
kerberos: false, |
|
}, { |
|
text: 'IBM DB2', |
|
databaseType: 'ibm-db2', |
|
driver: 'com.ibm.db2.jcc.DB2Driver', |
|
url: 'jdbc:db2://hostname:port/database', |
|
commonly: true, |
|
internal: true, |
|
type: 'jdbc', |
|
hasSchema: true, |
|
kerberos: false, |
|
}, { |
|
text: 'INFORMIX', |
|
databaseType: 'informix', |
|
driver: 'com.informix.jdbc.IfxDriver', |
|
url: 'jdbc:informix-sqli://hostname:port/database:INFORMIXSERVER={server}', |
|
commonly: false, |
|
internal: true, |
|
type: 'jdbc', |
|
hasSchema: true, |
|
kerberos: false, |
|
}, { |
|
text: 'KINGBASE', |
|
databaseType: 'kingbase', |
|
driver: 'com.kingbase.Driver', |
|
url: 'jdbc:kingbase://hostname:port/database', |
|
commonly: false, |
|
internal: true, |
|
type: 'jdbc', |
|
hasSchema: true, |
|
kerberos: false, |
|
}, { |
|
text: 'Microsoft SQL Server', |
|
databaseType: 'sql-server', |
|
driver: 'com.microsoft.sqlserver.jdbc.SQLServerDriver', |
|
url: 'jdbc:sqlserver://hostname:port;databaseName=database', |
|
commonly: true, |
|
internal: true, |
|
type: 'jdbc', |
|
hasSchema: true, |
|
kerberos: false, |
|
}, { |
|
text: 'MySQL', |
|
databaseType: 'mysql', |
|
driver: 'com.mysql.jdbc.Driver', |
|
drivers: ['com.mysql.jdbc.Driver', 'org.gjt.mm.mysql.Driver'], |
|
url: 'jdbc:mysql://hostname:port/database', |
|
commonly: true, |
|
internal: true, |
|
type: 'jdbc', |
|
hasSchema: false, |
|
kerberos: false, |
|
}, |
|
{ |
|
text: 'Oracle', |
|
databaseType: 'oracle', |
|
driver: 'oracle.jdbc.driver.OracleDriver', |
|
url: 'jdbc:oracle:thin:@hostname:port:database', |
|
commonly: true, |
|
internal: true, |
|
type: 'jdbc', |
|
hasSchema: true, |
|
kerberos: false, |
|
}, |
|
{ |
|
text: 'Pivotal Greenplum Database', |
|
databaseType: 'pivotal-greenplum-database', |
|
driver: 'org.postgresql.Driver', |
|
url: 'jdbc:postgresql://hostname:port/database', |
|
commonly: false, |
|
internal: true, |
|
type: 'jdbc', |
|
hasSchema: true, |
|
kerberos: false, |
|
}, { |
|
text: 'Postgresql', |
|
databaseType: 'postgresql', |
|
driver: 'org.postgresql.Driver', |
|
url: 'jdbc:postgresql://hostname:port/database', |
|
commonly: false, |
|
internal: true, |
|
type: 'jdbc', |
|
hasSchema: true, |
|
kerberos: false, |
|
}, { |
|
text: 'Presto', |
|
databaseType: 'presto', |
|
driver: 'com.facebook.presto.jdbc.PrestoDriver', |
|
url: 'jdbc:presto://hostname:port/database', |
|
commonly: false, |
|
internal: true, |
|
type: 'jdbc', |
|
hasSchema: true, |
|
kerberos: false, |
|
}, { |
|
text: 'SAP HANA', |
|
databaseType: 'sap-hana', |
|
driver: 'com.sap.db.jdbc.Driver', |
|
url: 'jdbc:sap://hostname:port?reconnect=true', |
|
commonly: false, |
|
internal: true, |
|
type: 'jdbc', |
|
hasSchema: true, |
|
kerberos: false, |
|
}, { |
|
text: 'SAP Sybase', |
|
databaseType: 'sap-sybase', |
|
driver: 'com.sybase.jdbc4.jdbc.SybDriver', |
|
url: 'jdbc:sybase:Tds:hostname:port/database', |
|
commonly: false, |
|
internal: true, |
|
type: 'jdbc', |
|
hasSchema: true, |
|
kerberos: false, |
|
}, { |
|
text: 'SPARK', |
|
databaseType: 'spark', |
|
driver: 'org.apache.hive.jdbc.HiveDriver', |
|
url: 'jdbc:hive2://hostname:port/database', |
|
commonly: false, |
|
internal: true, |
|
type: 'jdbc', |
|
hasSchema: false, |
|
kerberos: true, |
|
}, { |
|
text: 'Sqlite', |
|
databaseType: 'sqlite', |
|
driver: 'org.sqlite.JDBC', |
|
url: 'jdbc:sqlite:[PATH_TO_DB_FILES]', |
|
commonly: false, |
|
internal: true, |
|
type: 'jdbc', |
|
hasSchema: false, |
|
kerberos: false, |
|
}, { |
|
text: 'TeraData', |
|
databaseType: 'teradata', |
|
driver: 'com.ncr.teradata.TeraDriver', |
|
url: 'jdbc:teradata://hostname:port/CLIENT_CHARSET=EUC_CN,TMODE=TERA,CHARSET=ASCII,LOB_SUPPORT', |
|
commonly: false, |
|
internal: true, |
|
type: 'jdbc', |
|
hasSchema: true, |
|
kerberos: false, |
|
}, { |
|
text: 'TRANSWARP INCEPTOR', |
|
databaseType: 'transwarp-inceptor', |
|
driver: 'org.apache.hive.jdbc.HiveDriver', |
|
url: 'jdbc:hive2://hostname:port/database', |
|
commonly: false, |
|
internal: true, |
|
type: 'jdbc', |
|
hasSchema: false, |
|
kerberos: true, |
|
}, { |
|
text: BI.i18nText('Dec-Dcm_Connection_JNDI'), |
|
databaseType: 'jndi', |
|
driver: '', |
|
url: '', |
|
commonly: false, |
|
internal: true, |
|
type: 'jndi', |
|
hasSchema: false, |
|
kerberos: false, |
|
}, |
|
{ |
|
text: BI.i18nText('Dec-Dcm_Connection_JDBC_Other'), |
|
databaseType: 'other', |
|
driver: 'org.ha.Driver', |
|
drivers: ['org.ha.Driver', 'com.fr.third.org.hsqldb.jdbcDriver', 'org.sqlite.JDBC'], |
|
url: 'jdbc:h2://hostname:port/database', |
|
commonly: false, |
|
internal: true, |
|
type: 'other', |
|
hasSchema: true, |
|
kerberos: false, |
|
}, |
|
...BI.Constants.getConstant(CONSTANT_PLUGIN_TYPES).map(item => { |
|
return { |
|
...item, |
|
internal: false, |
|
commonly: false, |
|
}; |
|
}), |
|
]; |
|
|
|
|
|
|
|
export const CONNECT_CHARSET = [ |
|
{ |
|
text: '自动', |
|
value: '', |
|
}, |
|
{ |
|
text: 'GBK', |
|
value: 'GBK', |
|
}, |
|
{ |
|
text: 'BIG5', |
|
value: 'BIG5', |
|
}, |
|
{ |
|
text: 'ISO-8859-1', |
|
value: 'ISO-8859-1', |
|
}, |
|
{ |
|
text: 'UTF-8', |
|
value: 'UTF-8', |
|
}, |
|
{ |
|
text: 'UTF-16', |
|
value: 'UTF-16', |
|
}, |
|
{ |
|
text: 'EUC_JP', |
|
value: 'EUC_JP', |
|
}, |
|
{ |
|
text: 'EUC_KR', |
|
value: 'EUC_KR', |
|
}, |
|
{ |
|
text: 'CP850', |
|
value: 'CP850', |
|
}, |
|
]; |
|
|
|
export const TEST_STATUS = { |
|
LOADING: 'loading', |
|
SUCCESS: 'success', |
|
FAIL: 'fail', |
|
}; |
|
|
|
export const DEFAULT_JNDI_DATA = { |
|
jndiName: '', |
|
originalCharsetName: '', |
|
newCharsetName: '', |
|
contextHashtable: { |
|
'java.naming.factory.initial': '', |
|
'java.naming.provider.url': '', |
|
'java.naming.factory.object': '', |
|
'java.naming.factory.state': '', |
|
'java.naming.factory.url.pkgs': '', |
|
'java.naming.dns.url': '', |
|
'java.naming.authoritative': '', |
|
'java.naming.batchsize': '', |
|
'java.naming.referral': '', |
|
'java.naming.security.protocol': '', |
|
'java.naming.security.authentication': '', |
|
'java.naming.security.principal': '', |
|
'java.naming.security.credentials': '', |
|
'java.naming.language': '', |
|
'java.naming.applet': '', |
|
}, |
|
}; |
|
|
|
export const DEFAULT_JDBC_POOL = { |
|
initialSize: 0, |
|
maxActive: 50, |
|
maxIdle: 10, |
|
maxWait: 10000, |
|
testOnBorrow: false, |
|
testOnReturn: false, |
|
testWhileIdle: false, |
|
timeBetweenEvictionRunsMillis: -1, |
|
numTestsPerEvictionRun: 3, |
|
minEvictableIdleTimeMillis: 1800, |
|
}; |
|
|
|
|