|
|
|
@ -86,8 +86,12 @@ export class DecisionApi implements Api {
|
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
setEditedConnectionStatus(name: string): Promise<SocketResult> { |
|
|
|
|
return this.sendEditStatusEvent(name, editStatusEvent.CONNECTION_EDITED); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
shutdownConnectionStatus(name: string): Promise<SocketResult> { |
|
|
|
|
return this.sendEditStatusEvent(name, editStatusEvent.SHUTDOWN); |
|
|
|
|
return this.sendEditStatusEvent(name, editStatusEvent.CONNECTION_RELEASED); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
getSocketStatus(): boolean { |
|
|
|
@ -119,7 +123,7 @@ export class DecisionApi implements Api {
|
|
|
|
|
private sendEditStatusEvent(name: string, type: string): Promise<SocketResult> { |
|
|
|
|
return new Promise(resolve => { |
|
|
|
|
if (Dec?.socket?.connected) { |
|
|
|
|
Dec.socketEmit(type, BI.encode(name), (re: any) => { |
|
|
|
|
Dec.socket.emit(type, BI.encode(name), (re: any) => { |
|
|
|
|
resolve(re); |
|
|
|
|
}); |
|
|
|
|
} else { |
|
|
|
|