|
|
|
@ -6,17 +6,17 @@ import { editStatusEvent } from '@constants/env';
|
|
|
|
|
export class DecisionApi implements Api { |
|
|
|
|
isDec = true; |
|
|
|
|
|
|
|
|
|
getConnectionlist(): Promise<{data: Connection[]}> { |
|
|
|
|
getConnectionlist(): Promise<{data?: Connection[]}> { |
|
|
|
|
return requestGet('list'); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
deleteConnection(connectionName: string): Promise<{data: string}> { |
|
|
|
|
deleteConnection(connectionName: string) { |
|
|
|
|
return requestDelete('', { |
|
|
|
|
connectionName, |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
addConnection(data: Connection): Promise<{data: string}> { |
|
|
|
|
addConnection(data: Connection) { |
|
|
|
|
const form = { |
|
|
|
|
...data, |
|
|
|
|
connectionId: data.connectionName, |
|
|
|
@ -26,7 +26,7 @@ export class DecisionApi implements Api {
|
|
|
|
|
return requestPost('', form); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
updateConnection(data: Connection): Promise<{data: string}> { |
|
|
|
|
updateConnection(data: Connection) { |
|
|
|
|
const form = { |
|
|
|
|
...data, |
|
|
|
|
connectionData : JSON.stringify(data.connectionData), |
|
|
|
@ -44,7 +44,7 @@ export class DecisionApi implements Api {
|
|
|
|
|
return requestPost('test', form); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
getConnectionPool(name: string): Promise<{data: ConnectionPoolType}> { |
|
|
|
|
getConnectionPool(name: string): Promise<{data?: ConnectionPoolType}> { |
|
|
|
|
return requestGet(`pool/info?connectionName=${name}`); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|