diff --git a/src/packages/discovery/component/setting/setting.component.ts b/src/packages/discovery/component/setting/setting.component.ts index e62906b..b5d5e4a 100644 --- a/src/packages/discovery/component/setting/setting.component.ts +++ b/src/packages/discovery/component/setting/setting.component.ts @@ -1,4 +1,4 @@ -import { Component, OnInit, AfterContentInit, Output, EventEmitter } from '@angular/core'; +import { Component, OnInit, AfterContentInit, Output, EventEmitter, Input } from '@angular/core'; import { Store, select } from '@ngrx/store'; import { RPCClientError } from '@loafer/ng-rpc/protocol'; import { @@ -36,6 +36,7 @@ import { TreeNode } from 'primeng/primeng'; }) export class SettingComponent implements OnInit, AfterContentInit { + @Input() cidr: string; @Output() close = new EventEmitter(); probe$ = this.probeDetailStore.pipe(select(ProbeDetailSelector.select('probe'))); @@ -50,7 +51,7 @@ export class SettingComponent implements OnInit, AfterContentInit { probe: Probe = null; started = false; - cidr; + // cidr; startIP; endIP; startPort; @@ -202,7 +203,10 @@ export class SettingComponent implements OnInit, AfterContentInit { } ngAfterContentInit() { - this.cidr = '192.168.1.0/24'; + if (this.cidr === undefined || this.cidr === null) { + this.cidr = '192.168.10.0/24'; + } + this.hostRange(); this.portRange(); } @@ -336,6 +340,7 @@ export class SettingComponent implements OnInit, AfterContentInit { // console.log(this.zones); // isTarget Check + for ( const sn of this.selectedNodes) { if (sn.obj !== undefined && sn.obj !== null) { if (sn.obj.target !== undefined && sn.obj.target !== null) {