From ad6907f7ba90e63fc1d8bbf7ee20c3ee3566059a Mon Sep 17 00:00:00 2001 From: insanity Date: Mon, 4 Jun 2018 13:13:06 +0900 Subject: [PATCH] test --- @overflow/discovery/component/discovery.component.html | 2 +- @overflow/discovery/component/discovery.component.ts | 2 ++ .../discovery/component/request-summary.component.ts | 3 --- .../discovery/component/search-filter.component.html | 7 ++----- .../discovery/component/search-filter.component.ts | 10 ++++++++++ .../discovery/component/search-result.component.ts | 1 + 6 files changed, 16 insertions(+), 9 deletions(-) diff --git a/@overflow/discovery/component/discovery.component.html b/@overflow/discovery/component/discovery.component.html index 2471582..304e939 100644 --- a/@overflow/discovery/component/discovery.component.html +++ b/@overflow/discovery/component/discovery.component.html @@ -9,7 +9,7 @@ - + diff --git a/@overflow/discovery/component/discovery.component.ts b/@overflow/discovery/component/discovery.component.ts index ec6a70b..3326aca 100644 --- a/@overflow/discovery/component/discovery.component.ts +++ b/@overflow/discovery/component/discovery.component.ts @@ -10,6 +10,7 @@ import { catchError, exhaustMap, map, tap } from 'rxjs/operators'; import { DiscoverZone, Zone, Host, Port, Service } from '@overflow/commons-typescript/model/discovery'; import { DiscoverySubscriber, DiscoveryNotify } from '../subscriber/discovery.subscriber'; import { SearchResultComponent } from './search-result.component'; +import { SearchFilterComponent } from './search-filter.component'; @Component({ selector: 'of-discovery', @@ -28,6 +29,7 @@ export class DiscoveryComponent implements OnDestroy { discoverZone: DiscoverZone; @ViewChild('discoveryResult') discoveryResult: SearchResultComponent; + @ViewChild('discoveryFilter') discoveryFilter: SearchFilterComponent; constructor( private discoveryService: DiscoveryService, diff --git a/@overflow/discovery/component/request-summary.component.ts b/@overflow/discovery/component/request-summary.component.ts index fd1c707..b53bfae 100644 --- a/@overflow/discovery/component/request-summary.component.ts +++ b/@overflow/discovery/component/request-summary.component.ts @@ -30,7 +30,4 @@ export class RequestSummaryComponent implements OnChanges { this.services = this.discoverZone.discoverHost.discoverPort.discoverService.includeServices; } - showServices() { - return '1/n2/n3/n4'; - } } diff --git a/@overflow/discovery/component/search-filter.component.html b/@overflow/discovery/component/search-filter.component.html index 020c93e..b719607 100644 --- a/@overflow/discovery/component/search-filter.component.html +++ b/@overflow/discovery/component/search-filter.component.html @@ -10,10 +10,7 @@ -
- - - - +
+
diff --git a/@overflow/discovery/component/search-filter.component.ts b/@overflow/discovery/component/search-filter.component.ts index e7dacea..e0c3594 100644 --- a/@overflow/discovery/component/search-filter.component.ts +++ b/@overflow/discovery/component/search-filter.component.ts @@ -3,6 +3,7 @@ import { OnInit } from '@angular/core'; import { Anim } from './animation'; +import { Service } from '@overflow/commons-typescript/model/discovery'; @Component({ selector: 'of-discovery-search-filter', @@ -14,6 +15,8 @@ export class SearchFilterComponent implements OnInit, AfterContentInit { startHostIp: string; endHostIp: string; + services: Service[] = []; + constructor( ) { } @@ -27,4 +30,11 @@ export class SearchFilterComponent implements OnInit, AfterContentInit { onInputIP(event, idx) { } + + addService(service: Service) { + if (this.services.includes(service)) { + return; + } + this.services.push(service); + } } diff --git a/@overflow/discovery/component/search-result.component.ts b/@overflow/discovery/component/search-result.component.ts index 84f406b..0f37532 100644 --- a/@overflow/discovery/component/search-result.component.ts +++ b/@overflow/discovery/component/search-result.component.ts @@ -134,6 +134,7 @@ export class SearchResultComponent implements OnInit { this.hostNode.forEach((value, i) => { if (value.data.id === service.port.host.id) { targetHost = this.hostNode[i]; + return; } }); return targetHost;