2018-05-24 11:30:02 +00:00
|
|
|
import { Component, OnInit, AfterViewInit, AfterContentInit, ViewChild, OnDestroy, Output, EventEmitter, Input } from '@angular/core';
|
|
|
|
import { ProbeHost, Probe } from '@overflow/commons-typescript/model/probe';
|
2018-04-06 11:02:18 +00:00
|
|
|
|
2018-04-06 13:02:46 +00:00
|
|
|
@Component({
|
|
|
|
selector: 'of-probe-list',
|
|
|
|
templateUrl: './list.component.html',
|
|
|
|
})
|
2018-05-24 11:30:02 +00:00
|
|
|
export class ProbeListComponent {
|
|
|
|
@Output() select = new EventEmitter<ProbeHost>();
|
2018-05-26 09:08:40 +00:00
|
|
|
@Input() pending;
|
2018-05-24 11:30:02 +00:00
|
|
|
@Input() probeHosts: ProbeHost[];
|
2018-04-06 11:02:18 +00:00
|
|
|
|
2018-05-24 11:30:02 +00:00
|
|
|
constructor() {
|
2018-04-06 13:02:46 +00:00
|
|
|
}
|
2018-04-06 11:02:18 +00:00
|
|
|
|
2018-04-09 11:03:15 +00:00
|
|
|
onRowSelect(event) {
|
2018-05-24 11:30:02 +00:00
|
|
|
this.select.emit(event.data);
|
2018-04-06 13:02:46 +00:00
|
|
|
}
|
2018-05-14 09:02:48 +00:00
|
|
|
|
|
|
|
getUptime(probe: Probe) {
|
|
|
|
// if (probe.connectDate === null || probe.connectDate ==== undefined) {
|
|
|
|
// return 'Not Connected.';
|
|
|
|
// }
|
|
|
|
// const currentDate = new Date();
|
2018-05-18 08:30:20 +00:00
|
|
|
return 'Uptime';
|
2018-05-14 09:02:48 +00:00
|
|
|
}
|
2018-04-06 13:02:46 +00:00
|
|
|
}
|