member_webapp/@overflow/probe/component/detail/detail.component.ts
2018-05-25 18:18:06 +09:00

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);
}
}