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); + }); }