member_webapp/@overflow/probe/component/probe-summary.component.ts

21 lines
542 B
TypeScript
Raw Normal View History

2018-05-31 07:03:59 +00:00
import { Component, Input, OnChanges, SimpleChanges } from '@angular/core';
2018-05-30 09:39:26 +00:00
import { Probe, ProbeHost } from '@overflow/commons-typescript/model/probe';
@Component({
selector: 'of-probe-summary',
2018-05-31 09:45:40 +00:00
templateUrl: './probe-summary.component.html',
2018-05-30 09:39:26 +00:00
})
2018-05-31 07:03:59 +00:00
export class ProbeSummaryComponent implements OnChanges {
2018-05-30 09:39:26 +00:00
@Input() probeHost: ProbeHost;
2018-05-31 07:03:59 +00:00
connectionStatus: string;
2018-05-30 09:39:26 +00:00
constructor() {
}
2018-05-31 07:03:59 +00:00
ngOnChanges(changes: SimpleChanges): void {
this.connectionStatus = this.probeHost.probe.connectDate ? 'Connected' : 'Not connected';
}
2018-05-30 09:39:26 +00:00
}