31 lines
674 B
TypeScript
31 lines
674 B
TypeScript
import { Component, Input, Output, EventEmitter } from '@angular/core';
|
|
import { Probe, ProbeHost } from '@overflow/commons-typescript/model/probe';
|
|
|
|
|
|
@Component({
|
|
selector: 'of-probe-detail',
|
|
templateUrl: './detail.component.html',
|
|
// providers: [ConfirmationService, MessageService]
|
|
})
|
|
export class ProbeDetailComponent {
|
|
|
|
@Input() probeHost: ProbeHost;
|
|
@Output() modify = new EventEmitter<ProbeHost>();
|
|
@Output() discovery = new EventEmitter<number>();
|
|
|
|
editMode = false;
|
|
|
|
constructor() {
|
|
}
|
|
|
|
onEditSave() {
|
|
this.modify.emit(this.probeHost);
|
|
this.editMode = false;
|
|
}
|
|
|
|
onDiscoveryClick() {
|
|
this.discovery.emit(this.probeHost.id);
|
|
}
|
|
}
|
|
|