2018-09-09 10:20:21 +00:00
|
|
|
import { Component, Input } from '@angular/core';
|
2018-09-13 11:01:01 +00:00
|
|
|
import { Host, DiscoverHost } from '@overflow/model/discovery';
|
|
|
|
import { ProbeService, requesterID } from '../service/probe.service';
|
|
|
|
import { RPCSubscriber } from '@overflow/commons/ui/decorator/RPCSubscriber';
|
2018-09-09 10:20:21 +00:00
|
|
|
|
|
|
|
|
|
|
|
@Component({
|
|
|
|
selector: 'app-host-detail',
|
|
|
|
templateUrl: './host-detail.component.html',
|
|
|
|
styleUrls: ['./host-detail.component.scss'],
|
|
|
|
})
|
|
|
|
export class HostDetailComponent {
|
|
|
|
|
|
|
|
@Input() host: Host;
|
|
|
|
|
|
|
|
constructor(
|
2018-09-13 11:01:01 +00:00
|
|
|
private probeService: ProbeService
|
2018-09-09 10:20:21 +00:00
|
|
|
) {
|
2018-09-13 11:01:01 +00:00
|
|
|
}
|
2018-09-09 10:20:21 +00:00
|
|
|
|
2018-09-13 11:01:01 +00:00
|
|
|
ping() {
|
|
|
|
console.log(this.host);
|
|
|
|
// const discoverHost: DiscoverHost = {
|
|
|
|
// discoveryConfig: {},
|
|
|
|
// metaIPType: this.host.metaIPType,
|
|
|
|
// firstScanRange: this.host.address,
|
|
|
|
// lastScanRange: this.host.address,
|
|
|
|
// discoverPort: null,
|
|
|
|
// };
|
|
|
|
// this.probeService.send('DiscoveryService.DiscoverHost', requesterID, this.host.zone, discoverHost);
|
2018-09-09 10:20:21 +00:00
|
|
|
}
|
|
|
|
|
2018-09-13 11:01:01 +00:00
|
|
|
// @RPCSubscriber({ method: 'DiscoveryService.DiscoveredHost' })
|
|
|
|
// public DiscoveredHost(host: Host) {
|
|
|
|
// console.log(host);
|
|
|
|
// }
|
2018-09-09 10:20:21 +00:00
|
|
|
}
|