diff --git a/src/packages/discovery/component/setting/setting.component.html b/src/packages/discovery/component/setting/setting.component.html index 61ee755..07aa306 100644 --- a/src/packages/discovery/component/setting/setting.component.html +++ b/src/packages/discovery/component/setting/setting.component.html @@ -13,7 +13,7 @@
- Host + Host
@@ -26,7 +26,7 @@
- Port + Port
@@ -39,7 +39,7 @@
- Service + Service
diff --git a/src/packages/discovery/component/setting/setting.component.ts b/src/packages/discovery/component/setting/setting.component.ts index fe002fc..a4cd06f 100644 --- a/src/packages/discovery/component/setting/setting.component.ts +++ b/src/packages/discovery/component/setting/setting.component.ts @@ -41,8 +41,8 @@ export class SettingComponent implements OnInit, AfterContentInit { ngOnInit() { this.settingSucceed$.subscribe( - (ds: DiscoveryStartInfo) => { - if (ds !== null) { + (succeed: boolean) => { + if (succeed) { this.started = true; } }, @@ -62,8 +62,6 @@ export class SettingComponent implements OnInit, AfterContentInit { const cidr = new CIDR(this.cidr); if (!cidr.isValid()) { alert('Invalid cidr : ' + this.cidr); - this.startIP = 'Unknown'; - this.endIP = 'Unknown'; return; } this.startIP = cidr.addressStart.address; @@ -75,7 +73,26 @@ export class SettingComponent implements OnInit, AfterContentInit { this.endPort = '1024'; } + handleHostCheckChange(e: MatCheckboxChange) { + this.hostChecked = true; + e.source.checked = true; + } + + handlePortCheckChange(e: MatCheckboxChange) { + this.serviceChecked = false; + } + + handleServiceCheckChange(e: MatCheckboxChange) { + } + discovery() { + if (!this.portChecked) { + this.startPort = '0'; + this.endPort = '0'; + } + if (!this.serviceChecked) { + + } const startInfo: DiscoveryStartInfo = { startIp: this.startIP, endIP: this.endIP,