diff --git a/@overflow/discovery/component/discovery.component.html b/@overflow/discovery/component/discovery.component.html index b0bbb20..2e1e66a 100644 --- a/@overflow/discovery/component/discovery.component.html +++ b/@overflow/discovery/component/discovery.component.html @@ -1,9 +1,8 @@

Discovery

- - - + +
@@ -21,20 +20,16 @@
- - + +
- -
- Network Discovery 설명 페이지 -
-
+ +
+ Network Discovery 설명 페이지 +
+
\ No newline at end of file diff --git a/@overflow/discovery/component/request-summary.component.ts b/@overflow/discovery/component/request-summary.component.ts index b53bfae..f5ae5c9 100644 --- a/@overflow/discovery/component/request-summary.component.ts +++ b/@overflow/discovery/component/request-summary.component.ts @@ -21,13 +21,13 @@ export class RequestSummaryComponent implements OnChanges { } ngOnChanges(changes: SimpleChanges): void { - this.hostRange = this.discoverZone.discoverHost.firstScanRangev4 - + ' ~ ' - + this.discoverZone.discoverHost.lastScanRangev4; - this.portRange = this.discoverZone.discoverHost.discoverPort.firstScanRange - + ' ~ ' - + this.discoverZone.discoverHost.discoverPort.lastScanRange; - this.services = this.discoverZone.discoverHost.discoverPort.discoverService.includeServices; + // this.hostRange = this.discoverZone.discoverHost.firstScanRangev4 + // + ' ~ ' + // + this.discoverZone.discoverHost.lastScanRangev4; + // this.portRange = this.discoverZone.discoverHost.discoverPort.firstScanRange + // + ' ~ ' + // + this.discoverZone.discoverHost.discoverPort.lastScanRange; + // this.services = this.discoverZone.discoverHost.discoverPort.discoverService.includeServices; } } diff --git a/@overflow/discovery/component/search-config.component.ts b/@overflow/discovery/component/search-config.component.ts index 78361fd..9b19247 100644 --- a/@overflow/discovery/component/search-config.component.ts +++ b/@overflow/discovery/component/search-config.component.ts @@ -7,7 +7,7 @@ import * as CIDR from 'ip-cidr'; import * as ipRangeCheck from 'ip-range-check'; import { DiscoverPort, DiscoverService, DiscoverZone } from '@overflow/commons-typescript/model/discovery'; import { Checkbox } from 'primeng/primeng'; -import { MetaCrawler } from '@overflow/commons-typescript/model/meta'; +import { MetaIPTypeEnum, toMetaIPType } from '@overflow/commons-typescript/model/meta'; @Component({ selector: 'of-discovery-search-config', @@ -20,7 +20,7 @@ export class SearchConfigComponent implements OnChanges { @Input() probeHost: ProbeHost; @Output() requestDiscovery = new EventEmitter(); - ipVer: string; + ipType: MetaIPTypeEnum; startIP: string; endIP: string; startPort: string; @@ -60,7 +60,7 @@ export class SearchConfigComponent implements OnChanges { if (!cidr.isValid()) { return; } - this.ipVer = 'v4'; + this.ipType = MetaIPTypeEnum.V4; this.startIP = cidr.start(); this.endIP = cidr.end(); this.startPort = '1'; @@ -122,10 +122,11 @@ export class SearchConfigComponent implements OnChanges { } const discoverZone: DiscoverZone = { discoverHost: { - firstScanRangev4: this.startIP, - lastScanRangev4: this.endIP, + metaIPType: toMetaIPType(this.ipType), + firstScanRange: this.startIP, + lastScanRange: this.endIP, discoverPort: discoverPort, - excludeHostsv4: this.excludeIPs, + excludeHosts: this.excludeIPs, }, }; @@ -206,7 +207,7 @@ export class SearchConfigComponent implements OnChanges { } isValidIPregex(ip: string): boolean { - if (this.ipVer === 'v4') { + if (this.ipType === MetaIPTypeEnum.V4) { return /^(?=\d+\.\d+\.\d+\.\d+$)(?:(?:25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\.?){4}$/.test(ip); } return false; diff --git a/@overflow/discovery/component/search-result.component.ts b/@overflow/discovery/component/search-result.component.ts index 36d7252..8771fe1 100644 --- a/@overflow/discovery/component/search-result.component.ts +++ b/@overflow/discovery/component/search-result.component.ts @@ -1,19 +1,15 @@ import { - AfterContentInit, Component, Input, - EventEmitter, - Output, + Component, Input, SimpleChanges, OnInit, OnChanges, } from '@angular/core'; -import { catchError, exhaustMap, map, tap, take } from 'rxjs/operators'; -import { Subscription, Observable, of } from 'rxjs'; -import { DiscoverZone, Zone, Host, Port, Service } from '@overflow/commons-typescript/model/discovery'; +import { Subscription, Observable } from 'rxjs'; +import { Host, Port, Service } from '@overflow/commons-typescript/model/discovery'; import { TreeNode, Message, Tree } from 'primeng/primeng'; import { ProbeHost } from '@overflow/commons-typescript/model/probe'; import { Anim } from './animation'; import { TargetService } from '@overflow/target/service/target.service'; -import { Target } from '@overflow/commons-typescript/model/target'; @Component({ selector: 'of-discovery-result', @@ -103,7 +99,7 @@ export class SearchResultComponent implements OnInit, OnChanges { label: service.name + ' (' + service.port.portNumber + ')', data: { name: service.name, - portType: service.port.metaPortTypeKey, + portType: service.port.metaPortType, portNumber: service.port.portNumber, target: service }, diff --git a/@overflow/noauth-probe/component/noauth-probe-list.component.html b/@overflow/noauth-probe/component/noauth-probe-list.component.html index 6512d4c..49fd5d3 100644 --- a/@overflow/noauth-probe/component/noauth-probe-list.component.html +++ b/@overflow/noauth-probe/component/noauth-probe-list.component.html @@ -21,9 +21,9 @@ - {{rowData.tempProbeKey}} - {{rowData.descriptions.host.name}} - {{rowData.descriptions.host.os}} + {{rowData.apiKey}} + {{getInfraHostInfo(rowData.infraHostMeta, 'name')}} + {{getInfraHostInfo(rowData.infraHostMeta, 'os')}} {{rowData.createDate | date: 'dd/MM/yyyy'}} @@ -34,17 +34,16 @@
- Platform: {{rowData.descriptions.host.platform}} -
- -
- Platform family: {{rowData.descriptions.host.platformFamily}} + Platform: {{getInfraHostInfo(rowData.infraHostMeta, 'platform')}}
- Kernel: {{rowData.descriptions.host.kernelVersion}} + Platform family: {{getInfraHostInfo(rowData.infraHostMeta, 'platformFamily')}}
- HostID: {{rowData.descriptions.host.hostID}} + Kernel: {{getInfraHostInfo(rowData.infraHostMeta, 'kernelVersion')}} +
+
+ HostID: {{getInfraHostInfo(rowData.infraHostMeta, 'hostID')}}
Connected: @@ -58,16 +57,16 @@
- NIC: {{rowData.descriptions.network.name}} + NIC: {{getInfraNetworkInfo(rowData.infraHostMeta, 'name')}}
- Network Address: {{rowData.descriptions.network.address}} + Network Address: {{getInfraNetworkInfo(rowData.infraHostMeta, 'address')}}
- Gateway: {{rowData.descriptions.network.gateway}} + Gateway: {{getInfraNetworkInfo(rowData.infraHostMeta, 'gateway')}}
- Mac Address: {{rowData.descriptions.network.macAddress}} + Mac Address: {{getInfraNetworkInfo(rowData.infraHostMeta, 'macAddress')}}
diff --git a/@overflow/noauth-probe/component/noauth-probe-list.component.ts b/@overflow/noauth-probe/component/noauth-probe-list.component.ts index 270ca8c..be2d265 100644 --- a/@overflow/noauth-probe/component/noauth-probe-list.component.ts +++ b/@overflow/noauth-probe/component/noauth-probe-list.component.ts @@ -139,10 +139,6 @@ export class NoAuthProbeListComponent implements OnInit, OnDestroy { if (null === noauthProbes) { return; } - noauthProbes.forEach(noauthProbe => { - // FIXME - // noauthProbe.descriptions = JSON.parse(noauthProbe.description); - }); this.noauthProbes = noauthProbes; } @@ -150,5 +146,42 @@ export class NoAuthProbeListComponent implements OnInit, OnDestroy { this.error$ = of(error); } + getInfraHostInfo(infraHostMeta: string, type: string): string { + const infraHost = JSON.parse(infraHostMeta); + + switch (type) { + case 'name': + return infraHost.host.name; + case 'os': + let os = infraHost.host.os; + return os; + case 'platform': + return infraHost.host.platform; + case 'platformFamily': + return infraHost.host.platformFamily; + case 'kernelVersion': + return infraHost.host.kernelVersion; + case 'hostID': + return infraHost.host.hostID; + default: + return ''; + } + } + + getInfraNetworkInfo(infraHostMeta: string, type: string): string { + const infraHost = JSON.parse(infraHostMeta); + switch (type) { + case 'name': + return infraHost.network.name; + case 'address': + return infraHost.network.address; + case 'gateway': + return infraHost.network.gateway; + case 'macAddress': + return infraHost.network.macAddress; + default: + return ''; + } + } } diff --git a/package-lock.json b/package-lock.json index c4a3f79..696682d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -453,9 +453,9 @@ } }, "@overflow/commons-typescript": { - "version": "0.0.10", - "resolved": "https://nexus.loafle.net/repository/npm-all/@overflow/commons-typescript/-/commons-typescript-0.0.10.tgz", - "integrity": "sha512-caZTr0lFFrJ5PF4G9pWYciOK7FGsxvpXBfhhECKrxdX5RqRS3cnai98aUiYsH6hB1mrQl+WaA5Twjp6miNt3NQ==" + "version": "0.0.11", + "resolved": "https://nexus.loafle.net/repository/npm-all/@overflow/commons-typescript/-/commons-typescript-0.0.11.tgz", + "integrity": "sha512-Gft8tJ9oSsGFWOnaqq3wd4liqmRZAzgdduQqy6xR4JRc2E6b30p/+RLy3o1VUhVO+KMsu2tYcpx/qpZfBgMj5Q==" }, "@schematics/angular": { "version": "0.6.5", @@ -6729,11 +6729,6 @@ "lower-case": "1.1.4" } }, - "node-cidr": { - "version": "1.0.0", - "resolved": "https://nexus.loafle.net/repository/npm-all/node-cidr/-/node-cidr-1.0.0.tgz", - "integrity": "sha512-F7KXTvJ1fyVVldfjO/MrZS7ux9nyE6GiMS2q3yNFZWrU6IHjHEOuQ7jQEArJf7/qvZO3k8RGu38GSxInz8TE1g==" - }, "node-fetch": { "version": "1.7.3", "resolved": "https://nexus.loafle.net/repository/npm-all/node-fetch/-/node-fetch-1.7.3.tgz", diff --git a/package.json b/package.json index ab43ce0..25345ea 100644 --- a/package.json +++ b/package.json @@ -37,7 +37,7 @@ "@ngrx/router-store": "^5.2.0", "@ngrx/store": "^5.2.0", "@ngrx/store-devtools": "^5.2.0", - "@overflow/commons-typescript": "^0.0.10", + "@overflow/commons-typescript": "^0.0.11", "angular-google-recaptcha": "^1.0.3", "angular-l10n": "^5.0.0", "angularx-qrcode": "^1.1.7", diff --git a/src/environments/environment.ts b/src/environments/environment.ts index a586811..1d32219 100644 --- a/src/environments/environment.ts +++ b/src/environments/environment.ts @@ -5,9 +5,9 @@ export const environment = { production: false, - restBaseURL: 'http://192.168.1.50:19080/webapp', + restBaseURL: 'http://192.168.1.101:19080/webapp', webappRPCConfig: { - url: 'ws://192.168.1.50:19090/webapp', + url: 'ws://192.168.1.101:19090/webapp', reconnectInterval: 5000, reconnectRetry: 10, },