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

21 lines
542 B
TypeScript
Raw Normal View History

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