From b4923a19d51dcc8a168a959478245bd868c217b5 Mon Sep 17 00:00:00 2001 From: insanity Date: Mon, 19 Mar 2018 17:29:35 +0900 Subject: [PATCH] discovery test --- .../component/setting/setting.component.html | 6 ++--- .../component/setting/setting.component.ts | 25 ++++++++++++++++--- 2 files changed, 24 insertions(+), 7 deletions(-) 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,