discovery
This commit is contained in:
parent
0a8dfe35fc
commit
ccf9ff53a8
|
@ -15,7 +15,7 @@ import { DiscoverySubscriber, DiscoveryNotify } from '../subscriber/discovery.su
|
|||
templateUrl: './discovery.component.html',
|
||||
animations: Anim
|
||||
})
|
||||
export class DiscoveryComponent {
|
||||
export class DiscoveryComponent {
|
||||
|
||||
@Input() probeHostID;
|
||||
pending$: Observable<boolean>;
|
||||
|
@ -24,6 +24,7 @@ export class DiscoveryComponent {
|
|||
|
||||
selectedProbe: ProbeHost;
|
||||
requested: boolean;
|
||||
discoverZone: DiscoverZone;
|
||||
|
||||
|
||||
constructor(
|
||||
|
@ -35,9 +36,7 @@ export class DiscoveryComponent {
|
|||
|
||||
onRequestDiscovery(dz: DiscoverZone) {
|
||||
this.requested = true;
|
||||
|
||||
this.requested = true;
|
||||
|
||||
this.discoverZone = dz;
|
||||
this.discoverySubscriber.observable().pipe(
|
||||
tap(() => {
|
||||
this.discoveryService.discoverZone(this.selectedProbe.probe.probeKey, dz);
|
||||
|
@ -80,13 +79,13 @@ export class DiscoveryComponent {
|
|||
}
|
||||
}),
|
||||
catchError(error => {
|
||||
|
||||
return of();
|
||||
}),
|
||||
).subscribe();
|
||||
}
|
||||
|
||||
onRequestDiscoveryStop() {
|
||||
this.discoverZone = null;
|
||||
this.requested = false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,9 +1,16 @@
|
|||
<div *ngIf="discoverZone">
|
||||
<of-key-value [key]="'Host Range'" [value]="hostRange"></of-key-value>
|
||||
<of-key-value [key]="'Port Range'" [value]="portRange"></of-key-value>
|
||||
<span *ngIf="discoverZone.discoverHost.discoverPort.includeTCP">TCP</span>
|
||||
<span *ngIf="discoverZone.discoverHost.discoverPort.includeUDP">UDP</span>
|
||||
<div *ngFor="let service of services">
|
||||
<span>{{service}}</span>
|
||||
</div>
|
||||
<of-key-value [key]="'Host Range'" [value]="hostRange"></of-key-value>
|
||||
<of-key-value [key]="'Port Range'" [value]="portRange"></of-key-value>
|
||||
<span *ngIf="discoverZone.discoverHost.discoverPort.includeTCP">TCP</span>
|
||||
<span *ngIf="discoverZone.discoverHost.discoverPort.includeUDP">UDP</span>
|
||||
|
||||
<div *ngIf="services.length > 0">
|
||||
<p-overlayPanel #op>
|
||||
<div *ngFor="let service of services">
|
||||
{{service}}
|
||||
</div>
|
||||
</p-overlayPanel>
|
||||
|
||||
<button type="text" pButton label="{{services.length}} services has selected." (click)="op.toggle($event)"></button>
|
||||
</div>
|
||||
</div>
|
Loading…
Reference in New Issue
Block a user