27 lines
720 B
TypeScript
27 lines
720 B
TypeScript
import { Component, OnInit, AfterViewInit, AfterContentInit, ViewChild, OnDestroy, Output, EventEmitter, Input } from '@angular/core';
|
|
import { ProbeHost, Probe } from '@overflow/commons-typescript/model/probe';
|
|
|
|
@Component({
|
|
selector: 'of-probe-list',
|
|
templateUrl: './list.component.html',
|
|
})
|
|
export class ProbeListComponent {
|
|
@Output() select = new EventEmitter<ProbeHost>();
|
|
@Input() probeHosts: ProbeHost[];
|
|
|
|
constructor() {
|
|
}
|
|
|
|
onRowSelect(event) {
|
|
this.select.emit(event.data);
|
|
}
|
|
|
|
getUptime(probe: Probe) {
|
|
// if (probe.connectDate === null || probe.connectDate ==== undefined) {
|
|
// return 'Not Connected.';
|
|
// }
|
|
// const currentDate = new Date();
|
|
return 'Uptime';
|
|
}
|
|
}
|