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