From 4ae2106219473f3801123aed7866cf6632866b12 Mon Sep 17 00:00:00 2001 From: snoop Date: Tue, 20 Mar 2018 16:27:29 +0900 Subject: [PATCH] ing discovery result --- .../component/setting/setting.component.html | 9 ++++- .../component/setting/setting.component.ts | 37 ++++++++++++++++++- 2 files changed, 43 insertions(+), 3 deletions(-) diff --git a/src/packages/discovery/component/setting/setting.component.html b/src/packages/discovery/component/setting/setting.component.html index e5b2037..1e011df 100644 --- a/src/packages/discovery/component/setting/setting.component.html +++ b/src/packages/discovery/component/setting/setting.component.html @@ -63,17 +63,22 @@
- +
+ (click)="checkDiscoveryResult(node)"> {{ node.data.title }}
+ + + + + \ No newline at end of file diff --git a/src/packages/discovery/component/setting/setting.component.ts b/src/packages/discovery/component/setting/setting.component.ts index 7283fff..0a60390 100644 --- a/src/packages/discovery/component/setting/setting.component.ts +++ b/src/packages/discovery/component/setting/setting.component.ts @@ -41,6 +41,8 @@ export class SettingComponent implements OnInit, AfterContentInit { hosts = nodes; + checkedSet = new Set(); + constructor( private discoverdstore: Store, private discoverstore: Store, @@ -116,10 +118,43 @@ export class SettingComponent implements OnInit, AfterContentInit { }; // this.store.dispatch(new DiscoverySettingStore.Setting(startInfo)); - this.discoverstore.dispatch(new DiscoverStore.DiscoverZone({probeID: '52abd6fd57e511e7ac52080027658d13', discoveryZone: discoveryZone})); + this.discoverstore.dispatch(new DiscoverStore.DiscoverZone( + {probeID: '52abd6fd57e511e7ac52080027658d13', discoveryZone: discoveryZone})); this.started = true; } + checkDiscoveryResult(node) { + + node.toggleActivated(true); + + if (node.isActive) { + if (this.checkedSet.has(node.data) === false) { + this.checkedSet.add(node.data); + } + } else { + if (this.checkedSet.has(node.data)) { + this.checkedSet.delete(node.data); + } + } + + } + + discoveryResultSave() { + console.log(this.checkedSet); + } + + findHost(host) { + + } + + findPort(port) { + + } + + findService(service) { + + } + }