From ec1de8c6e7e59d383a8439837e8a8bc6007df5e8 Mon Sep 17 00:00:00 2001 From: insanity Date: Thu, 3 May 2018 22:27:11 +0900 Subject: [PATCH] discovery --- .../service-selector/service-selector.component.html | 4 ++-- .../filter/service-selector/service-selector.component.ts | 5 +++-- .../discovery/component/setting/result/result.component.ts | 5 +++-- .../discovery/component/setting/setting.component.html | 7 +++++-- .../discovery/component/setting/setting.component.ts | 3 +++ src/packages/probe/component/detail/detail.component.html | 2 +- src/packages/probe/probe.module.ts | 4 +++- 7 files changed, 20 insertions(+), 10 deletions(-) diff --git a/src/packages/discovery/component/setting/filter/service-selector/service-selector.component.html b/src/packages/discovery/component/setting/filter/service-selector/service-selector.component.html index 216efbf..8a0623a 100644 --- a/src/packages/discovery/component/setting/filter/service-selector/service-selector.component.html +++ b/src/packages/discovery/component/setting/filter/service-selector/service-selector.component.html @@ -1,9 +1,9 @@
+ filterBy="description" dragdrop="true" dragdropScope="services" [sourceStyle]="{'height':'200px'}" [targetStyle]="{'height':'200px'}" [showTargetControls]="false" [showSourceControls]="false">
-
{{crawler.name}}
+
{{crawler.description}}
diff --git a/src/packages/discovery/component/setting/filter/service-selector/service-selector.component.ts b/src/packages/discovery/component/setting/filter/service-selector/service-selector.component.ts index 4af035a..54d07bb 100644 --- a/src/packages/discovery/component/setting/filter/service-selector/service-selector.component.ts +++ b/src/packages/discovery/component/setting/filter/service-selector/service-selector.component.ts @@ -30,11 +30,12 @@ export class ServiceSelectorComponent implements OnInit, AfterContentInit, OnDes this.crawlersSubscription$ = this.crawlers$.subscribe( (list: MetaCrawler[]) => { if (list !== null) { - this.crawlers = list; + this.crawlers = []; + this.includeServices = list; } }, (error: RPCClientError) => { - console.log(error.response.message); + console.log(error); } ); } diff --git a/src/packages/discovery/component/setting/result/result.component.ts b/src/packages/discovery/component/setting/result/result.component.ts index e22c53b..28775bd 100644 --- a/src/packages/discovery/component/setting/result/result.component.ts +++ b/src/packages/discovery/component/setting/result/result.component.ts @@ -54,6 +54,7 @@ export class ResultComponent implements OnInit, AfterContentInit, OnDestroy { this.resultSubscription$ = this.result$.subscribe( (zones: Map) => { if (zones !== undefined && zones !== null) { + console.log(zones); this.treeNodes = this.convertTreeViewZone(zones); this.zones = zones; } @@ -64,7 +65,7 @@ export class ResultComponent implements OnInit, AfterContentInit, OnDestroy { ); this.startedSubscription$ = this.started$.subscribe( (isStart: boolean) => { - if (isStart !== undefined && isStart !== null) { + if (isStart !== undefined && isStart !== null && isStart) { this.inProgress = true; console.log('##Discovery has started.##'); } @@ -75,7 +76,7 @@ export class ResultComponent implements OnInit, AfterContentInit, OnDestroy { ); this.endedSubscription$ = this.ended$.subscribe( (isEnd: boolean) => { - if (isEnd !== undefined && isEnd !== null) { + if (isEnd !== undefined && isEnd !== null && isEnd) { console.log('##Discovery has done.##'); } }, diff --git a/src/packages/discovery/component/setting/setting.component.html b/src/packages/discovery/component/setting/setting.component.html index c07b286..310bb0f 100644 --- a/src/packages/discovery/component/setting/setting.component.html +++ b/src/packages/discovery/component/setting/setting.component.html @@ -1,14 +1,17 @@ +
+ +
- +
- +
diff --git a/src/packages/discovery/component/setting/setting.component.ts b/src/packages/discovery/component/setting/setting.component.ts index 707ffbd..607e6a0 100644 --- a/src/packages/discovery/component/setting/setting.component.ts +++ b/src/packages/discovery/component/setting/setting.component.ts @@ -37,6 +37,7 @@ export class SettingComponent implements OnInit, AfterContentInit, OnDestroy, On private started = false; private selectedProbe: Probe; + private height: number; constructor( private discoverStore: Store, @@ -44,6 +45,7 @@ export class SettingComponent implements OnInit, AfterContentInit, OnDestroy, On } ngOnInit() { + this.height = window.innerHeight; } ngAfterContentInit() { @@ -75,6 +77,7 @@ export class SettingComponent implements OnInit, AfterContentInit, OnDestroy, On onCancel() { this.close.emit(); this.started = false; + this.selectedProbe = null; } } diff --git a/src/packages/probe/component/detail/detail.component.html b/src/packages/probe/component/detail/detail.component.html index dc89f07..d23402b 100644 --- a/src/packages/probe/component/detail/detail.component.html +++ b/src/packages/probe/component/detail/detail.component.html @@ -1,6 +1,6 @@

Info

- diff --git a/src/packages/probe/probe.module.ts b/src/packages/probe/probe.module.ts index 327ca7f..dc80c5e 100644 --- a/src/packages/probe/probe.module.ts +++ b/src/packages/probe/probe.module.ts @@ -8,6 +8,7 @@ import { PrimeNGModules } from '../commons/prime-ng/prime-ng.module'; import { FormsModule } from '@angular/forms'; import { DiscoveryModule } from 'packages/discovery/discovery.module'; import { KeyValueModule } from 'app/commons/component/key-value/key-value.module'; +import { MetaCrawlerModule } from '../meta/crawler/crawler.module'; @NgModule({ imports: [ @@ -16,7 +17,8 @@ import { KeyValueModule } from 'app/commons/component/key-value/key-value.module ProbeStoreModule, FormsModule, DiscoveryModule, - KeyValueModule + KeyValueModule, + MetaCrawlerModule ], declarations: [ COMPONENTS,