2018-05-25 09:18:06 +00:00
|
|
|
import { Component, Input, Output, EventEmitter } from '@angular/core';
|
|
|
|
import { Probe, ProbeHost } from '@overflow/commons-typescript/model/probe';
|
2018-04-11 06:20:23 +00:00
|
|
|
|
2018-04-06 13:02:46 +00:00
|
|
|
|
|
|
|
@Component({
|
|
|
|
selector: 'of-probe-detail',
|
|
|
|
templateUrl: './detail.component.html',
|
2018-05-25 09:18:06 +00:00
|
|
|
// providers: [ConfirmationService, MessageService]
|
2018-04-06 13:02:46 +00:00
|
|
|
})
|
2018-05-25 09:18:06 +00:00
|
|
|
export class ProbeDetailComponent {
|
2018-04-06 13:02:46 +00:00
|
|
|
|
2018-05-25 09:18:06 +00:00
|
|
|
@Input() probeHost: ProbeHost;
|
|
|
|
@Output() modify = new EventEmitter<ProbeHost>();
|
|
|
|
@Output() discovery = new EventEmitter<number>();
|
2018-04-06 13:02:46 +00:00
|
|
|
|
2018-05-25 09:18:06 +00:00
|
|
|
editMode = false;
|
2018-04-06 13:02:46 +00:00
|
|
|
|
2018-05-25 09:18:06 +00:00
|
|
|
constructor() {
|
2018-04-27 07:31:27 +00:00
|
|
|
}
|
|
|
|
|
2018-05-25 09:18:06 +00:00
|
|
|
onEditSave() {
|
|
|
|
this.modify.emit(this.probeHost);
|
|
|
|
this.editMode = false;
|
2018-04-06 13:02:46 +00:00
|
|
|
}
|
|
|
|
|
2018-04-11 06:20:23 +00:00
|
|
|
onDiscoveryClick() {
|
2018-05-25 09:18:06 +00:00
|
|
|
this.discovery.emit(this.probeHost.id);
|
2018-04-29 10:43:14 +00:00
|
|
|
}
|
2018-04-06 13:02:46 +00:00
|
|
|
}
|
2018-04-06 11:02:18 +00:00
|
|
|
|