member_webapp/@overflow/discovery/component2/request-summary.component.ts
2018-06-21 18:35:24 +09:00

34 lines
951 B
TypeScript

import {
Component, Input, OnChanges, SimpleChanges,
} from '@angular/core';
import { DiscoverZone } from '@overflow/commons-typescript/model/discovery';
@Component({
selector: 'of-discovery-request-summary',
templateUrl: './request-summary.component.html',
})
export class RequestSummaryComponent implements OnChanges {
@Input() discoverZone: DiscoverZone;
hostRange: string;
hostExclude: string;
portRange: string;
portExclude: string;
services: string[];
constructor(
) {
}
ngOnChanges(changes: SimpleChanges): void {
this.hostRange = this.discoverZone.discoverHost.firstScanRange
+ ' ~ '
+ this.discoverZone.discoverHost.lastScanRange;
this.portRange = this.discoverZone.discoverHost.discoverPort.firstScanRange
+ ' ~ '
+ this.discoverZone.discoverHost.discoverPort.lastScanRange;
this.services = this.discoverZone.discoverHost.discoverPort.discoverService.includeServices;
}
}