From 1e0836ed4236a6ced3fb4aab2b3d2db4b6b2771d Mon Sep 17 00:00:00 2001 From: insanity Date: Mon, 10 Sep 2018 18:32:41 +0900 Subject: [PATCH] test --- .../component/scanner-setting-dropdown.component.html | 6 ++++-- .../component/scanner-setting-dropdown.component.ts | 11 ++++++++++- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/src/commons/component/scanner-setting-dropdown.component.html b/src/commons/component/scanner-setting-dropdown.component.html index 171a422..ba74879 100644 --- a/src/commons/component/scanner-setting-dropdown.component.html +++ b/src/commons/component/scanner-setting-dropdown.component.html @@ -55,8 +55,10 @@
Range : - - - + - +
diff --git a/src/commons/component/scanner-setting-dropdown.component.ts b/src/commons/component/scanner-setting-dropdown.component.ts index 19996ea..fa3d95e 100644 --- a/src/commons/component/scanner-setting-dropdown.component.ts +++ b/src/commons/component/scanner-setting-dropdown.component.ts @@ -88,12 +88,18 @@ export class ScannerSettingDropdownComponent implements OnInit { } } - ipPressed(evt: any) { + ipPressed(evt: KeyboardEvent) { if (!Number.isInteger(Number(evt.key)) && evt.key !== '.') { return false; } } + portPressed(evt: KeyboardEvent) { + if (!Number.isInteger(Number(evt.key))) { + return false; + } + } + ipToNum(ip: string): number { return ip.split('.').reduce(function (ipInt, octet) { return (ipInt << 8) + parseInt(octet, 10) }, 0) >>> 0; } @@ -113,6 +119,7 @@ export class ScannerSettingDropdownComponent implements OnInit { return; } if (to > 65535) { + console.log('?????????????????'); this.lastPort = '65535'; return; } @@ -167,6 +174,8 @@ export class ScannerSettingDropdownComponent implements OnInit { this.includePortType = this.lastCondition.includePortType; this.firstPort = this.lastCondition.firstPort; this.lastPort = this.lastCondition.lastPort; + this.ipErrMsg = ''; + this.portErrMsg = ''; } setSummary(): void {