35 lines
793 B
TypeScript
35 lines
793 B
TypeScript
import {
|
|
Component, Input, Output, EventEmitter,
|
|
} from '@angular/core';
|
|
import { Probe, ProbeHost } from '@overflow/commons-typescript/model/probe';
|
|
import { DiscoverZone } from '@overflow/commons-typescript/model/discovery';
|
|
import { Anim } from './animation';
|
|
|
|
@Component({
|
|
selector: 'of-discovery',
|
|
templateUrl: './discovery.component.html',
|
|
animations: Anim
|
|
})
|
|
export class DiscoveryComponent {
|
|
|
|
@Input() selectedProbe: ProbeHost;
|
|
@Output() requestDiscovery = new EventEmitter<DiscoverZone>();
|
|
@Output() requestStop = new EventEmitter();
|
|
|
|
requested: boolean;
|
|
|
|
constructor(
|
|
) {
|
|
}
|
|
|
|
onRequestDiscovery(dz: DiscoverZone) {
|
|
this.requested = true;
|
|
this.requestDiscovery.emit(dz);
|
|
}
|
|
|
|
onStop() {
|
|
this.requested = false;
|
|
this.requestStop.emit();
|
|
}
|
|
}
|