From 1b879d1403ed6509a97afa1f94d45d9cfb84b54d Mon Sep 17 00:00:00 2001 From: geek Date: Mon, 19 Mar 2018 20:54:01 +0900 Subject: [PATCH] accept deny button --- .../store/notification/notification.effect.ts | 24 ++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/src/packages/discovery/store/notification/notification.effect.ts b/src/packages/discovery/store/notification/notification.effect.ts index ce2def8..e3aa0c9 100644 --- a/src/packages/discovery/store/notification/notification.effect.ts +++ b/src/packages/discovery/store/notification/notification.effect.ts @@ -14,7 +14,6 @@ import 'rxjs/add/operator/switchMap'; import 'rxjs/add/operator/map'; import 'rxjs/add/operator/take'; -import { RPCError } from 'packages/core/rpc/error'; import { DiscoverZone, DiscoverHost, @@ -41,4 +40,27 @@ export class Effects { this.discoveryService.discoverZone(payload.probeID, payload.discoveryZone); }); + @Effect({ dispatch: false }) + discoveryHost$ = this.actions$ + .ofType(ActionType.DiscoverHost) + .map((action: DiscoverHost) => action.payload) + .do(payload => { + this.discoveryService.discoverHost(payload.probeID, payload.zone, payload.discoveryHost); + }); + + @Effect({ dispatch: false }) + discoveryPort$ = this.actions$ + .ofType(ActionType.DiscoverPort) + .map((action: DiscoverPort) => action.payload) + .do(payload => { + this.discoveryService.discoverPort(payload.probeID, payload.host, payload.discoveryPort); + }); + + @Effect({ dispatch: false }) + discoveryService$ = this.actions$ + .ofType(ActionType.DiscoverService) + .map((action: DiscoverService) => action.payload) + .do(payload => { + this.discoveryService.discoverService(payload.probeID, payload.port, payload.discoveryService); + }); }