formatOnSave true
This commit is contained in:
@@ -1,13 +1,12 @@
|
||||
import {
|
||||
Component, Input, Output, EventEmitter, OnDestroy, ViewChild,
|
||||
Component, Input, OnDestroy, ViewChild,
|
||||
} from '@angular/core';
|
||||
|
||||
import { Store, select } from '@ngrx/store';
|
||||
|
||||
import { Observable, of, Subscription } from 'rxjs';
|
||||
import { catchError, exhaustMap, map, tap, take } from 'rxjs/operators';
|
||||
import { catchError, map } from 'rxjs/operators';
|
||||
|
||||
import { Probe, ProbeHost } from '@overflow/commons-typescript/model/probe';
|
||||
import { ProbeHost } from '@overflow/commons-typescript/model/probe';
|
||||
import { DiscoverZone, Zone, Host, Port, Service } from '@overflow/commons-typescript/model/discovery';
|
||||
|
||||
import { Anim } from './animation';
|
||||
@@ -42,7 +41,6 @@ export class DiscoveryComponent implements OnDestroy {
|
||||
constructor(
|
||||
private discoveryService: DiscoveryService,
|
||||
private discoverySubscriber: DiscoverySubscriber,
|
||||
private store: Store<any>
|
||||
) {
|
||||
this.discoverySubscription = null;
|
||||
this.finished = false;
|
||||
@@ -60,7 +58,7 @@ export class DiscoveryComponent implements OnDestroy {
|
||||
|
||||
// TODO: fix
|
||||
const zone: Zone = {
|
||||
network: '192.168.1.0/24',
|
||||
network: '192.168.1.0/24', // this.selectedProbe.probe.cidr
|
||||
address: '192.168.1.103',
|
||||
iface: 'enp3s0',
|
||||
mac: '44:8a:5b:44:8c:e8',
|
||||
|
||||
@@ -195,25 +195,25 @@ export class SearchResultComponent implements OnInit, OnChanges {
|
||||
}
|
||||
});
|
||||
|
||||
this.targetService.registDiscoveredTargets(this.probeHost.probe.id, hosts, services)
|
||||
.pipe(
|
||||
tap(() => {
|
||||
this.targetSaveSucceed = false;
|
||||
}),
|
||||
map((targets: Target[]) => {
|
||||
if (targets) {
|
||||
this.displayTargetDone = true;
|
||||
}
|
||||
}),
|
||||
catchError(error => {
|
||||
this.error$ = of(error);
|
||||
return of();
|
||||
}),
|
||||
tap(() => {
|
||||
this.targetSaveSucceed = true;
|
||||
}),
|
||||
take(1),
|
||||
).subscribe();
|
||||
// this.targetService.registDiscoveredTargets(this.probeHost.probe.id, hosts, services)
|
||||
// .pipe(
|
||||
// tap(() => {
|
||||
// this.targetSaveSucceed = false;
|
||||
// }),
|
||||
// map((targets: Target[]) => {
|
||||
// if (targets) {
|
||||
// this.displayTargetDone = true;
|
||||
// }
|
||||
// }),
|
||||
// catchError(error => {
|
||||
// this.error$ = of(error);
|
||||
// return of();
|
||||
// }),
|
||||
// tap(() => {
|
||||
// this.targetSaveSucceed = true;
|
||||
// }),
|
||||
// take(1),
|
||||
// ).subscribe();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user