ing discovery result
This commit is contained in:
parent
9c1f768d30
commit
4ae2106219
|
@ -63,17 +63,22 @@
|
|||
<tree-root id="tree2" [focused]="true" [nodes]="hosts">
|
||||
<ng-template #treeNodeFullTemplate let-node let-index="index" let-templates="templates">
|
||||
<div class="tree-node">
|
||||
<input type="checkbox" [checked]="node.isActive" (change)="clickCheck(node)" />
|
||||
<input type="checkbox" [checked]="node.isActive" (change)="checkDiscoveryResult(node)" />
|
||||
<tree-node-expander [node]="node"></tree-node-expander>
|
||||
<div
|
||||
class="node-content-wrapper"
|
||||
[class.node-content-wrapper-active]="node.isActive"
|
||||
[class.node-content-wrapper-focused]="node.isFocused"
|
||||
(click)="clickCheck(node)">
|
||||
(click)="checkDiscoveryResult(node)">
|
||||
<span [class]="node.data.className" [class.title]="true">{{ node.data.title }}</span>
|
||||
</div>
|
||||
<tree-node-children [node]="node" [templates]="templates"></tree-node-children>
|
||||
</div>
|
||||
</ng-template>
|
||||
</tree-root>
|
||||
<mat-dialog-actions fxLayoutAlign="end">
|
||||
<button mat-button mat-dialog-close>Cancel</button>
|
||||
<button mat-button color="primary" (click)="discoveryResultSave()">Save</button>
|
||||
<!-- <button mat-raised-button type="submit" color="primary">Start</button> -->
|
||||
</mat-dialog-actions>
|
||||
</div>
|
|
@ -41,6 +41,8 @@ export class SettingComponent implements OnInit, AfterContentInit {
|
|||
|
||||
hosts = nodes;
|
||||
|
||||
checkedSet = new Set();
|
||||
|
||||
constructor(
|
||||
private discoverdstore: Store<DiscoveredStore.State>,
|
||||
private discoverstore: Store<DiscoverStore.State>,
|
||||
|
@ -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) {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user