bug fix in progress
This commit is contained in:
parent
b42dcee8d0
commit
8f577acae4
|
@ -1,9 +1,8 @@
|
|||
<h1>Discovery</h1>
|
||||
<div class="ui-g">
|
||||
<div class="ui-g-12">
|
||||
<of-zone-selector></of-zone-selector>
|
||||
<!-- <of-probe-selector [probeHostID]="probeHostID" (select)="selectedProbe=$event"></of-probe-selector> -->
|
||||
<!-- <of-probe-summary *ngIf="selectedProbe" @discoveryFilterAnim [probeHost]="selectedProbe"></of-probe-summary> -->
|
||||
<of-probe-selector [probeHostID]="probeHostID" (select)="selectedProbe=$event"></of-probe-selector>
|
||||
<of-probe-summary *ngIf="selectedProbe" @discoveryFilterAnim [probeHost]="selectedProbe"></of-probe-summary>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ui-g">
|
||||
|
@ -21,20 +20,16 @@
|
|||
</div>
|
||||
|
||||
<div class="ui-g-12 ui-md-9">
|
||||
<!-- <button class="ui-button-danger ui-button-width-fit" type="button" label="Stop" icon="ui-icon-close" pButton (click)="onRequestStop()"></button> -->
|
||||
<of-discovery-result #discoveryResult *ngIf="requested else info"
|
||||
[probeHost]="selectedProbe"
|
||||
[filterWord]="filterWord"
|
||||
[filterServices]="filterServices"
|
||||
[finished]="finished"
|
||||
></of-discovery-result>
|
||||
<!-- <button class="ui-button-danger ui-button-width-fit" type="button" label="Stop" icon="ui-icon-close" pButton (click)="onRequestStop()"></button> -->
|
||||
<of-discovery-result #discoveryResult *ngIf="requested else info" [probeHost]="selectedProbe" [filterWord]="filterWord" [filterServices]="filterServices"
|
||||
[finished]="finished"></of-discovery-result>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<ng-template #info>
|
||||
<p-panel [showHeader]="false">
|
||||
<div style="min-height: 98px">
|
||||
Network Discovery 설명 페이지
|
||||
</div>
|
||||
</p-panel>
|
||||
<p-panel [showHeader]="false">
|
||||
<div style="min-height: 98px">
|
||||
Network Discovery 설명 페이지
|
||||
</div>
|
||||
</p-panel>
|
||||
</ng-template>
|
|
@ -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;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -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<DiscoverZone>();
|
||||
|
||||
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;
|
||||
|
|
|
@ -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
|
||||
},
|
||||
|
|
|
@ -21,9 +21,9 @@
|
|||
<i [ngClass]="expanded ? 'fa fa-fw fa-chevron-circle-down' : 'fa fa-fw fa-chevron-circle-right'"></i>
|
||||
</a>
|
||||
</td>
|
||||
<td>{{rowData.tempProbeKey}}</td>
|
||||
<td>{{rowData.descriptions.host.name}}</td>
|
||||
<td>{{rowData.descriptions.host.os}}</td>
|
||||
<td>{{rowData.apiKey}}</td>
|
||||
<td>{{getInfraHostInfo(rowData.infraHostMeta, 'name')}}</td>
|
||||
<td>{{getInfraHostInfo(rowData.infraHostMeta, 'os')}}</td>
|
||||
<td>{{rowData.createDate | date: 'dd/MM/yyyy'}}</td>
|
||||
</tr>
|
||||
</ng-template>
|
||||
|
@ -34,17 +34,16 @@
|
|||
|
||||
<div class="ui-g-12 ui-md-6">
|
||||
<div class="ui-g-12">
|
||||
<b>Platform:</b> {{rowData.descriptions.host.platform}}
|
||||
</div>
|
||||
|
||||
<div class="ui-g-12">
|
||||
<b>Platform family:</b> {{rowData.descriptions.host.platformFamily}}
|
||||
<b>Platform:</b> {{getInfraHostInfo(rowData.infraHostMeta, 'platform')}}
|
||||
</div>
|
||||
<div class="ui-g-12">
|
||||
<b>Kernel:</b> {{rowData.descriptions.host.kernelVersion}}
|
||||
<b>Platform family:</b> {{getInfraHostInfo(rowData.infraHostMeta, 'platformFamily')}}
|
||||
</div>
|
||||
<div class="ui-g-12">
|
||||
<b>HostID:</b> {{rowData.descriptions.host.hostID}}
|
||||
<b>Kernel:</b> {{getInfraHostInfo(rowData.infraHostMeta, 'kernelVersion')}}
|
||||
</div>
|
||||
<div class="ui-g-12">
|
||||
<b>HostID:</b> {{getInfraHostInfo(rowData.infraHostMeta, 'hostID')}}
|
||||
</div>
|
||||
<div class="ui-g-12">
|
||||
<b>Connected:</b>
|
||||
|
@ -58,16 +57,16 @@
|
|||
<div class="ui-g-12 ui-md-6">
|
||||
<div class="ui-g">
|
||||
<div class="ui-g-12">
|
||||
<b>NIC:</b> {{rowData.descriptions.network.name}}
|
||||
<b>NIC:</b> {{getInfraNetworkInfo(rowData.infraHostMeta, 'name')}}
|
||||
</div>
|
||||
<div class="ui-g-12">
|
||||
<b>Network Address:</b> {{rowData.descriptions.network.address}}
|
||||
<b>Network Address:</b> {{getInfraNetworkInfo(rowData.infraHostMeta, 'address')}}
|
||||
</div>
|
||||
<div class="ui-g-12">
|
||||
<b>Gateway:</b> {{rowData.descriptions.network.gateway}}
|
||||
<b>Gateway:</b> {{getInfraNetworkInfo(rowData.infraHostMeta, 'gateway')}}
|
||||
</div>
|
||||
<div class="ui-g-12">
|
||||
<b>Mac Address:</b> {{rowData.descriptions.network.macAddress}}
|
||||
<b>Mac Address:</b> {{getInfraNetworkInfo(rowData.infraHostMeta, 'macAddress')}}
|
||||
</div>
|
||||
<div class="ui-g-12">
|
||||
</div>
|
||||
|
|
|
@ -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 '';
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
11
package-lock.json
generated
11
package-lock.json
generated
|
@ -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",
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -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,
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue
Block a user