ing
This commit is contained in:
@@ -6,9 +6,10 @@ import { Anim } from './animation';
|
||||
import { Store, select } from '@ngrx/store';
|
||||
import { Observable, of, Subscription } from 'rxjs';
|
||||
import { DiscoveryService } from '../service/discovery.service';
|
||||
import { DiscoveryNotify } from '../core/discovery-subject';
|
||||
import { DiscoveryNotify } from '../subscriber/discovery.subscriber.subject';
|
||||
import { catchError, exhaustMap, map, tap } from 'rxjs/operators';
|
||||
import { DiscoverZone, Zone, Host, Port, Service } from '@overflow/commons-typescript/model/discovery';
|
||||
import { DiscoverySubscriber } from '../subscriber/discovery.subscriber';
|
||||
|
||||
@Component({
|
||||
selector: 'of-discovery',
|
||||
@@ -28,6 +29,7 @@ export class DiscoveryComponent {
|
||||
|
||||
constructor(
|
||||
private discoveryService: DiscoveryService,
|
||||
private discoverySubscriber: DiscoverySubscriber,
|
||||
private store: Store<any>
|
||||
) {
|
||||
}
|
||||
@@ -37,7 +39,12 @@ export class DiscoveryComponent {
|
||||
|
||||
this.requested = true;
|
||||
|
||||
this.discoverySubscription = this.discoveryService.discoverZone(this.selectedProbe.probe.probeKey, dz).pipe(
|
||||
const discovery$ = this.discoverySubscriber.subscribe();
|
||||
|
||||
discovery$.pipe(
|
||||
tap(() => {
|
||||
this.discoveryService.discoverZone(this.selectedProbe.probe.probeKey, dz);
|
||||
}),
|
||||
map((discoveryNotify: DiscoveryNotify) => {
|
||||
switch (discoveryNotify.method) {
|
||||
case 'DiscoveryService.discoveryStart': {
|
||||
|
||||
Reference in New Issue
Block a user