|
|
|
@ -6,7 +6,7 @@ import { editStatusEvent, errorCode } from '@constants/env';
|
|
|
|
|
export class DecisionApi implements Api { |
|
|
|
|
isDec = true; |
|
|
|
|
|
|
|
|
|
getConnectionlist(): Promise<{data?: Connection[]}> { |
|
|
|
|
getConnectionlist(): Promise<{ data?: Connection[] }> { |
|
|
|
|
return requestGet('list', {}); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -20,7 +20,7 @@ export class DecisionApi implements Api {
|
|
|
|
|
const form = { |
|
|
|
|
...data, |
|
|
|
|
connectionId: data.connectionId || data.connectionName, |
|
|
|
|
connectionData : JSON.stringify(data.connectionData), |
|
|
|
|
connectionData: JSON.stringify(data.connectionData), |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
return requestPost('', form); |
|
|
|
@ -29,7 +29,7 @@ export class DecisionApi implements Api {
|
|
|
|
|
updateConnection(data: Connection) { |
|
|
|
|
const form = { |
|
|
|
|
...data, |
|
|
|
|
connectionData : JSON.stringify(data.connectionData), |
|
|
|
|
connectionData: JSON.stringify(data.connectionData), |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
return requestPut('', form); |
|
|
|
@ -38,13 +38,13 @@ export class DecisionApi implements Api {
|
|
|
|
|
testConnection(data: Connection): Promise<TestRequest> { |
|
|
|
|
const form = { |
|
|
|
|
...data, |
|
|
|
|
connectionData : JSON.stringify(data.connectionData), |
|
|
|
|
connectionData: JSON.stringify(data.connectionData), |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
return requestPost('test', form); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
getConnectionPool(name: string): Promise<{data?: ConnectionPoolType}> { |
|
|
|
|
getConnectionPool(name: string): Promise<{ data?: ConnectionPoolType }> { |
|
|
|
|
return requestGet(`pool/info?connectionName=${encodeURIComponent(name)}`, {}); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -97,6 +97,10 @@ export class DecisionApi implements Api {
|
|
|
|
|
return BI.Providers.getProvider('dec.provider.cipher').getCipher(password); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
getPlain(cipher: string) { |
|
|
|
|
return BI.Providers.getProvider('dec.provider.cipher').getPlain(cipher); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
getHyperlink(name: string) { |
|
|
|
|
return Dec.system[DecCst.Hyperlink.DECISION_HYPERLINK_CONFIG][name]; |
|
|
|
|
} |
|
|
|
|