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 }} + + Cancel + Save + + \ 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) { + + } + }