Browse Source

Pull request #6145: BI-115632 fix:jdbcResolve添加适配SAPHANA

Merge in DEC/decision-webui-dcm from ~ARIES.LSY/decision-webui-dcm:release/11.0 to release/11.0

* commit 'aed9cbd4b5cbf65981e62e11213bf41bfc2a811b':
  BI-115632 fix:jdbcResolve添加适配SAPHANA
release/11.0
Aries.Lsy-黎思妤 2 years ago
parent
commit
961d699847
  1. 11
      src/modules/app.provider.ts

11
src/modules/app.provider.ts

@ -35,6 +35,17 @@ BI.provider('dec.connection.provider.datebase', function() {
};
}
// 处理SAP HANA数据连接url
const sapHanaUrl = url.match(/^jdbc:(sap):(thin:([0-9a-zA-Z/]*)?@|thin:([0-9a-zA-Z/]*)?@\/\/|\/\/|)([0-9a-zA-Z_\\.-]+)(:([0-9|port]+))?([^]+)?(.*)/i);
if (sapHanaUrl) {
return {
host: sapHanaUrl[5],
port: sapHanaUrl[7] === 'port' ? '' : sapHanaUrl[7],
databaseName: '',
urlInfo: sapHanaUrl[9],
};
}
// 处理oracle的RAC方式
if (/^jdbc:oracle:thin:([0-9a-zA-Z/]*)?@\(DESCRIPTION/i.test(url)) {
const host = url.match(/\(HOST\s*=\s*([0-9a-zA-Z_\\.-]+)\)/i);

Loading…
Cancel
Save