diff --git a/@overflow/discovery/component/discovery/discovery.component.html b/@overflow/discovery/component/discovery/discovery.component.html index 395a5e9..383d20a 100644 --- a/@overflow/discovery/component/discovery/discovery.component.html +++ b/@overflow/discovery/component/discovery/discovery.component.html @@ -1,38 +1,19 @@
- - 나는 커서 block ui가 될거얌 -
-
-
- SELECTED_PROBE_DISPLAY_NAME : {{selectedProbe.probe.displayName}} -
-
-
- - - - \ No newline at end of file + \ No newline at end of file diff --git a/@overflow/discovery/component/discovery/discovery.component.ts b/@overflow/discovery/component/discovery/discovery.component.ts index 3d783d0..1d1bf99 100644 --- a/@overflow/discovery/component/discovery/discovery.component.ts +++ b/@overflow/discovery/component/discovery/discovery.component.ts @@ -10,12 +10,23 @@ import { DiscoverZone } from '@overflow/commons-typescript/model/discovery'; }) export class DiscoveryComponent { - private tabIdx: number; @Input() selectedProbe: ProbeHost; @Output() requestDiscovery = new EventEmitter(); + @Output() stop = new EventEmitter(); + + requested: boolean; constructor( ) { } + onRequestDiscovery(dz: DiscoverZone) { + this.requested = true; + this.requestDiscovery.emit(dz); + } + + onStop() { + this.requested = false; + this.stop.emit(); + } } diff --git a/@overflow/discovery/component/discovery/ip-input.component.html b/@overflow/discovery/component/discovery/ip-input.component.html new file mode 100644 index 0000000..eaf70f4 --- /dev/null +++ b/@overflow/discovery/component/discovery/ip-input.component.html @@ -0,0 +1,11 @@ +
+ {{title}} + + . + + . + + . + +
+ diff --git a/@overflow/discovery/component/discovery/search-config/ip-input.component.ts b/@overflow/discovery/component/discovery/ip-input.component.ts similarity index 93% rename from @overflow/discovery/component/discovery/search-config/ip-input.component.ts rename to @overflow/discovery/component/discovery/ip-input.component.ts index 6e5b84d..f42577c 100644 --- a/@overflow/discovery/component/discovery/search-config/ip-input.component.ts +++ b/@overflow/discovery/component/discovery/ip-input.component.ts @@ -18,8 +18,9 @@ export class IpInputComponent implements OnInit, AfterContentInit { third: string; fourth: string; - @Input() hostIp; - @Input() title; + @Input() hostIp: string; + @Input() title: string; + @Input() fixed: number; @Output() inputIp = new EventEmitter(); constructor( diff --git a/@overflow/discovery/component/discovery/search-config.component.html b/@overflow/discovery/component/discovery/search-config.component.html new file mode 100644 index 0000000..07e9ec7 --- /dev/null +++ b/@overflow/discovery/component/discovery/search-config.component.html @@ -0,0 +1,83 @@ +
+
+ +
+
+
+ +
+
+ +
+
+ +
+
+
+ +
+ +
+
+ +
+
+ +
+
+ {{ipErrMsg}} +
+
+ + + + + +
+
+ +
+
+
+
+ TCP   + +
+
+ UDP   + +
+
+ +
+ +
+
+
+ +
+
+ +
+
+
+ {{portErrMsg}} +
+ +
+
+ +
+
+ +
+ +
+ +
+ +
+
diff --git a/@overflow/discovery/component/discovery/search-config/search-config.component.ts b/@overflow/discovery/component/discovery/search-config.component.ts similarity index 83% rename from @overflow/discovery/component/discovery/search-config/search-config.component.ts rename to @overflow/discovery/component/discovery/search-config.component.ts index 90bdc54..e28f865 100644 --- a/@overflow/discovery/component/discovery/search-config/search-config.component.ts +++ b/@overflow/discovery/component/discovery/search-config.component.ts @@ -14,6 +14,8 @@ import { Checkbox } from 'primeng/primeng'; }) export class SearchConfigComponent implements OnChanges { + SUPPORT_V6 = false; + @Input() probeHost: ProbeHost; @Output() requestDiscovery = new EventEmitter(); @@ -34,12 +36,16 @@ export class SearchConfigComponent implements OnChanges { ipErrMsg: string; portErrMsg: string; + fixedIPrange: number; + constructor( ) { } ngOnChanges(changes: SimpleChanges): void { - this.initByProbe(); + if (changes['probeHost']) { + this.initByProbe(); + } this.validation = true; } @@ -48,13 +54,14 @@ export class SearchConfigComponent implements OnChanges { if (!cidr.isValid()) { return; } - this.ipVer = 'ipv4'; + this.ipVer = 'v4'; this.startIP = cidr.addressStart.address; this.endIP = cidr.addressEnd.address; this.startPort = '1'; this.endPort = '1024'; - // TODO: Initialize services + + this.checkEditableIPrange(cidr); } onRequestDiscovery() { @@ -91,10 +98,27 @@ export class SearchConfigComponent implements OnChanges { this.requestDiscovery.emit(discoverZone); } + checkEditableIPrange(cidr) { + const startIPArray = cidr.addressStart.parsedAddress; + const endIPArray = cidr.addressEnd.parsedAddress; + let count = 0; + endIPArray.forEach((element, idx) => { + if (element === startIPArray[idx]) { + count++; + } + }); + this.fixedIPrange = count; + } + onPortCheckChange(serviceCheckbox: Checkbox, checked: boolean) { if (!checked) { serviceCheckbox.checked = false; this.serviceChecked = false; + } else { + if (!this.tcpChecked && !this.udpChecked) { + this.tcpChecked = true; + this.udpChecked = true; + } } } @@ -105,6 +129,15 @@ export class SearchConfigComponent implements OnChanges { } } + onPortTypeCheck(portCheckbox: Checkbox, serviceCheckbox: Checkbox): void { + if (!this.tcpChecked && !this.udpChecked) { + this.portChecked = false; + portCheckbox.checked = false; + this.serviceChecked = false; + serviceCheckbox.checked = false; + } + } + onInputIP(e, idx: number) { const value = e.value; if (idx === 0) { diff --git a/@overflow/discovery/component/discovery/search-config/ip-input.component.html b/@overflow/discovery/component/discovery/search-config/ip-input.component.html deleted file mode 100644 index 3556f0f..0000000 --- a/@overflow/discovery/component/discovery/search-config/ip-input.component.html +++ /dev/null @@ -1,12 +0,0 @@ - -
- {{title}} - - . - - . - - . - -
- diff --git a/@overflow/discovery/component/discovery/search-config/search-config.component.html b/@overflow/discovery/component/discovery/search-config/search-config.component.html deleted file mode 100644 index b538a6b..0000000 --- a/@overflow/discovery/component/discovery/search-config/search-config.component.html +++ /dev/null @@ -1,71 +0,0 @@ -
- -
-
-
- -
-
- -
-
- -
-
- -
- -
-
- -
-
- -
-
- {{ipErrMsg}} -
-
-
- -
-
-
-
- TCP   - -
-
- UDP   - -
-
- -
- -
-
-
- -
-
- -
-
-
- {{portErrMsg}} -
-
-
- -
-
-
- -
-
- -
\ No newline at end of file diff --git a/@overflow/discovery/component/discovery/search-filter/search-filter.component.html b/@overflow/discovery/component/discovery/search-filter.component.html similarity index 100% rename from @overflow/discovery/component/discovery/search-filter/search-filter.component.html rename to @overflow/discovery/component/discovery/search-filter.component.html diff --git a/@overflow/discovery/component/discovery/search-filter/search-filter.component.ts b/@overflow/discovery/component/discovery/search-filter.component.ts similarity index 100% rename from @overflow/discovery/component/discovery/search-filter/search-filter.component.ts rename to @overflow/discovery/component/discovery/search-filter.component.ts diff --git a/@overflow/discovery/component/discovery/search-result.component.html b/@overflow/discovery/component/discovery/search-result.component.html new file mode 100644 index 0000000..2c9bb2a --- /dev/null +++ b/@overflow/discovery/component/discovery/search-result.component.html @@ -0,0 +1,4 @@ +
+ +
+ diff --git a/@overflow/discovery/component/discovery/search-result.component.ts b/@overflow/discovery/component/discovery/search-result.component.ts new file mode 100644 index 0000000..c47374c --- /dev/null +++ b/@overflow/discovery/component/discovery/search-result.component.ts @@ -0,0 +1,19 @@ +import { + AfterContentInit, Component, Input, + OnInit, + EventEmitter, + Output +} from '@angular/core'; + +@Component({ + selector: 'of-discovery-result', + templateUrl: './search-result.component.html', +}) +export class SearchResultComponent { + + @Output() stop = new EventEmitter(); + + constructor( + ) { + } +} diff --git a/@overflow/discovery/component/discovery/search-result/search-result.component.html b/@overflow/discovery/component/discovery/search-result/search-result.component.html deleted file mode 100644 index 64d4e1a..0000000 --- a/@overflow/discovery/component/discovery/search-result/search-result.component.html +++ /dev/null @@ -1,36 +0,0 @@ -
-
- -
-
- Name - - {{probe.displayName}} - -
-
- -
- -
-
-
- Description - - {{probe.description}} - -
-
-
- Key - {{probe.probeKey}} -
-
- -
-
- -
-
-
- diff --git a/@overflow/discovery/component/discovery/search-result/search-result.component.ts b/@overflow/discovery/component/discovery/search-result/search-result.component.ts deleted file mode 100644 index 1a4d1d0..0000000 --- a/@overflow/discovery/component/discovery/search-result/search-result.component.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { - AfterContentInit, Component, Input, - OnInit -} from '@angular/core'; -import { Probe } from '@overflow/commons-typescript/model/probe'; - -@Component({ - selector: 'of-discovery-search-result', - templateUrl: './search-result.component.html', -}) -export class SearchResultComponent implements OnInit, AfterContentInit { - - @Input() selectedProbe: Probe; - - constructor( - ) { - } - - ngOnInit() { - } - - ngAfterContentInit() { - } -} diff --git a/@overflow/discovery/component/index.ts b/@overflow/discovery/component/index.ts index e5843c9..fa2b994 100644 --- a/@overflow/discovery/component/index.ts +++ b/@overflow/discovery/component/index.ts @@ -1,9 +1,9 @@ import { ServiceSelectorComponent } from './discovery/service-selector/service-selector.component'; import { DiscoveryComponent } from './discovery/discovery.component'; -import { SearchConfigComponent } from './discovery/search-config/search-config.component'; -import { SearchFilterComponent } from './discovery/search-filter/search-filter.component'; -import { SearchResultComponent } from './discovery/search-result/search-result.component'; -import { IpInputComponent } from './discovery/search-config/ip-input.component'; +import { SearchConfigComponent } from './discovery/search-config.component'; +import { SearchFilterComponent } from './discovery/search-filter.component'; +import { SearchResultComponent } from './discovery/search-result.component'; +import { IpInputComponent } from './discovery/ip-input.component'; export const COMPONENTS = [ ServiceSelectorComponent, diff --git a/@overflow/discovery/container/discovery-result/discovery-result-container.component.html b/@overflow/discovery/container/discovery-result/discovery-result-container.component.html new file mode 100644 index 0000000..3a85945 --- /dev/null +++ b/@overflow/discovery/container/discovery-result/discovery-result-container.component.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/@overflow/discovery/container/discovery-result/discovery-result-container.component.ts b/@overflow/discovery/container/discovery-result/discovery-result-container.component.ts new file mode 100644 index 0000000..e26db50 --- /dev/null +++ b/@overflow/discovery/container/discovery-result/discovery-result-container.component.ts @@ -0,0 +1,15 @@ +import { + Component, + Input, +} from '@angular/core'; + +@Component({ + selector: 'of-discovery-result-container', + templateUrl: './discovery-result-container.component.html', +}) +export class DiscoveryResultContainerComponent { + + constructor( + ) { + } +} diff --git a/@overflow/discovery/container/index.ts b/@overflow/discovery/container/index.ts index 75facd2..6f32ce4 100644 --- a/@overflow/discovery/container/index.ts +++ b/@overflow/discovery/container/index.ts @@ -1,5 +1,7 @@ import {DiscoveryContainerComponent} from './discovery/discovery-container.component'; +import { DiscoveryResultContainerComponent } from './discovery-result/discovery-result-container.component'; export const CONTAINER_COMPONENTS = [ DiscoveryContainerComponent, + DiscoveryResultContainerComponent ]; diff --git a/@overflow/probe/component/detail/detail.component.html b/@overflow/probe/component/detail/detail.component.html index 610e0fb..0a95311 100644 --- a/@overflow/probe/component/detail/detail.component.html +++ b/@overflow/probe/component/detail/detail.component.html @@ -18,9 +18,9 @@
- +
-
+
Name @@ -54,15 +54,20 @@
+ + - +
@@ -82,8 +87,8 @@
-
+
diff --git a/@overflow/probe/component/download/download.component.html b/@overflow/probe/component/download/download.component.html index a880929..244fab1 100644 --- a/@overflow/probe/component/download/download.component.html +++ b/@overflow/probe/component/download/download.component.html @@ -1,5 +1,5 @@

Download

- +