discovery in progress
This commit is contained in:
parent
17a97cc25d
commit
5d52f8e0f2
|
@ -56,13 +56,13 @@ export class DiscoveryComponent implements OnDestroy {
|
||||||
this.requested = true;
|
this.requested = true;
|
||||||
this.discoverZone = dz;
|
this.discoverZone = dz;
|
||||||
|
|
||||||
// TODO: fix
|
|
||||||
const zone: Zone = {
|
const zone: Zone = {
|
||||||
network: '192.168.1.0/24', // this.selectedProbe.probe.cidr
|
network: this.selectedProbe.infraHost.infraZone.network, // this.selectedProbe.probe.cidr
|
||||||
address: '192.168.1.101',
|
address: this.selectedProbe.infraHost.infraZone.address.split('/')[0],
|
||||||
iface: 'enp3s0',
|
iface: this.selectedProbe.infraHost.infraZone.iface,
|
||||||
mac: '44:8a:5b:f1:f1:f3',
|
mac: this.selectedProbe.infraHost.infraZone.mac,
|
||||||
};
|
};
|
||||||
|
|
||||||
this.discoveryService.discoverHost(this.selectedProbe.probe.probeKey, zone, dz.discoverHost);
|
this.discoveryService.discoverHost(this.selectedProbe.probe.probeKey, zone, dz.discoverHost);
|
||||||
|
|
||||||
this.discoverySubscription = this.discoverySubscriber.observable().pipe(
|
this.discoverySubscription = this.discoverySubscriber.observable().pipe(
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<!-- <div *ngIf="discoverZone" class="ui-key-value ui-left-info2">
|
<div *ngIf="discoverZone" class="ui-key-value ui-left-info2">
|
||||||
<div class="ui-g">
|
<div class="ui-g">
|
||||||
<of-key-value [key]="'Host Range'" [value]="hostRange"></of-key-value>
|
<of-key-value [key]="'Host Range'" [value]="hostRange"></of-key-value>
|
||||||
<of-key-value [key]="'Port Range'" [value]="portRange"></of-key-value>
|
<of-key-value [key]="'Port Range'" [value]="portRange"></of-key-value>
|
||||||
|
@ -11,14 +11,14 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div *ngIf="services.length > 0" class="ui-g-12 ui-top-border-1" style="text-align: right">
|
<div *ngIf="services && services.length > 0" class="ui-g-12 ui-top-border-1" style="text-align: right">
|
||||||
<p-overlayPanel #op>
|
<p-overlayPanel #op>
|
||||||
<div *ngFor="let service of services">
|
<div *ngFor="let service of services">
|
||||||
{{service}}
|
{{service}}
|
||||||
</div>
|
</div>
|
||||||
</p-overlayPanel>
|
</p-overlayPanel>
|
||||||
|
|
||||||
<a style="cursor: pointer" (click)="op.toggle($event)">{{services.length}} services has selected.</a>
|
<a style="cursor: pointer" (click)="op.toggle($event)">{{services.length}} services has selected.</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div> -->
|
</div>
|
|
@ -21,13 +21,13 @@ export class RequestSummaryComponent implements OnChanges {
|
||||||
}
|
}
|
||||||
|
|
||||||
ngOnChanges(changes: SimpleChanges): void {
|
ngOnChanges(changes: SimpleChanges): void {
|
||||||
// this.hostRange = this.discoverZone.discoverHost.firstScanRangev4
|
this.hostRange = this.discoverZone.discoverHost.firstScanRange
|
||||||
// + ' ~ '
|
+ ' ~ '
|
||||||
// + this.discoverZone.discoverHost.lastScanRangev4;
|
+ this.discoverZone.discoverHost.lastScanRange;
|
||||||
// this.portRange = this.discoverZone.discoverHost.discoverPort.firstScanRange
|
this.portRange = this.discoverZone.discoverHost.discoverPort.firstScanRange
|
||||||
// + ' ~ '
|
+ ' ~ '
|
||||||
// + this.discoverZone.discoverHost.discoverPort.lastScanRange;
|
+ this.discoverZone.discoverHost.discoverPort.lastScanRange;
|
||||||
// this.services = this.discoverZone.discoverHost.discoverPort.discoverService.includeServices;
|
this.services = this.discoverZone.discoverHost.discoverPort.discoverService.includeServices;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,10 +4,10 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="ui-g-12 ui-bottom-space-20">
|
<div class="ui-g-12 ui-bottom-space-20">
|
||||||
<div class="ui-g-6 ui-g-nopad">
|
<div class="ui-g-6 ui-g-nopad">
|
||||||
<p-radioButton name="group1" value="v4" label="IPv4" [(ngModel)]="ipVer"></p-radioButton>
|
<p-radioButton name="group1" value="V4" label="IPv4" [(ngModel)]="ipType"></p-radioButton>
|
||||||
</div>
|
</div>
|
||||||
<div class="ui-g-6 ui-g-nopad">
|
<div class="ui-g-6 ui-g-nopad">
|
||||||
<p-radioButton [disabled]="!SUPPORT_V6" name="group1" value="v6" label="IPv6" [(ngModel)]="ipVer"></p-radioButton>
|
<p-radioButton [disabled]="!SUPPORT_V6" name="group1" value="V6" label="IPv6" [(ngModel)]="ipVer"></p-radioButton>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -66,11 +66,11 @@
|
||||||
(keyup)="onInputPort(endPort.value, 1)">
|
(keyup)="onInputPort(endPort.value, 1)">
|
||||||
</div>
|
</div>
|
||||||
<div class="ui-g-12 ui-g-nopad" style="margin-left: 0.5em">
|
<div class="ui-g-12 ui-g-nopad" style="margin-left: 0.5em">
|
||||||
<a style="cursor: pointer" (click)="portExcludeDisplay = true">
|
<a style="cursor: pointer" (click)="portExcludeDisplay = true">
|
||||||
<span *ngIf="excludePorts.length === 0">Add Exclude Ports</span>
|
<span *ngIf="excludePorts.length === 0">Add Exclude Ports</span>
|
||||||
<span *ngIf="excludePorts.length > 0">{{excludePorts.length}} ports are excluded.</span>
|
<span *ngIf="excludePorts.length > 0">{{excludePorts.length}} ports are excluded.</span>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div *ngIf="portErrMsg" class="ui-message ui-messages-error ui-corner-all">
|
<div *ngIf="portErrMsg" class="ui-message ui-messages-error ui-corner-all">
|
||||||
|
|
|
@ -107,7 +107,7 @@ export class SearchConfigComponent implements OnChanges {
|
||||||
services.push(service.key);
|
services.push(service.key);
|
||||||
}
|
}
|
||||||
discoverService = {
|
discoverService = {
|
||||||
includeServices: null,
|
includeServices: services,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
if (this.portChecked) {
|
if (this.portChecked) {
|
||||||
|
|
|
@ -3,13 +3,10 @@
|
||||||
|
|
||||||
<div class="ui-g">
|
<div class="ui-g">
|
||||||
<div *ngFor="let service of services">
|
<div *ngFor="let service of services">
|
||||||
<p-toggleButton offLabel="{{service.serviceName}}" onLabel="{{service.serviceName}}"
|
<p-toggleButton offLabel="{{service.name}}" onLabel="{{service.name}}" [style]="{'width':'100px'}" (onChange)="onServiceFilter($event, service)"
|
||||||
[style]="{'width':'100px'}"
|
[(ngModel)]="filterServices[service.serviceName]"></p-toggleButton>
|
||||||
(onChange)="onServiceFilter($event, service)"
|
|
||||||
[(ngModel)]="filterServices[service.serviceName]"
|
|
||||||
></p-toggleButton>
|
|
||||||
|
|
||||||
<!-- <p-checkbox [(ngModel)]="filterServices" label="{{service.serviceName}}" value="{{service.serviceName}}"></p-checkbox> -->
|
<!-- <p-checkbox [(ngModel)]="filterServices" label="{{service.serviceName}}" value="{{service.serviceName}}"></p-checkbox> -->
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -101,17 +101,6 @@ export class SearchResultComponent implements OnInit, OnChanges {
|
||||||
|
|
||||||
|
|
||||||
addHost(host: Host) {
|
addHost(host: Host) {
|
||||||
// this.targetService.findExistHostTarget(this.probeHost.probe.id, host.ipv4)
|
|
||||||
// .pipe(
|
|
||||||
// map((target: Target) => {
|
|
||||||
|
|
||||||
// }),
|
|
||||||
// catchError(error => {
|
|
||||||
// this.error$ = of(error);
|
|
||||||
// return of();
|
|
||||||
// }),
|
|
||||||
// ).subscribe();
|
|
||||||
|
|
||||||
const idx = this.findHostIndex(host);
|
const idx = this.findHostIndex(host);
|
||||||
this.hostNode.splice(idx, 0, {
|
this.hostNode.splice(idx, 0, {
|
||||||
type: 'HOST',
|
type: 'HOST',
|
||||||
|
@ -119,7 +108,6 @@ export class SearchResultComponent implements OnInit, OnChanges {
|
||||||
data: {
|
data: {
|
||||||
exist: false,
|
exist: false,
|
||||||
ip: this.convertIPtoNumber(host.address),
|
ip: this.convertIPtoNumber(host.address),
|
||||||
ipv6: host.address,
|
|
||||||
mac: host.mac,
|
mac: host.mac,
|
||||||
openPorts: [],
|
openPorts: [],
|
||||||
target: host
|
target: host
|
||||||
|
@ -139,13 +127,14 @@ export class SearchResultComponent implements OnInit, OnChanges {
|
||||||
label: service.name + ' (' + service.port.portNumber + ')',
|
label: service.name + ' (' + service.port.portNumber + ')',
|
||||||
data: {
|
data: {
|
||||||
name: service.name,
|
name: service.name,
|
||||||
portType: service.port.metaPortType,
|
portType: service.port.metaPortType.key,
|
||||||
portNumber: service.port.portNumber,
|
portNumber: service.port.portNumber,
|
||||||
target: service
|
target: service
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
this.discoveredServices.push(service);
|
this.discoveredServices.push(service);
|
||||||
}
|
}
|
||||||
|
|
||||||
addPort(port: Port) {
|
addPort(port: Port) {
|
||||||
// this.hostNode.forEach(node => {
|
// this.hostNode.forEach(node => {
|
||||||
// if (node.data.id === port.host.id) {
|
// if (node.data.id === port.host.id) {
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
</td> -->
|
</td> -->
|
||||||
<td>
|
<td>
|
||||||
<p-tableCheckbox [value]="rowData"></p-tableCheckbox>
|
<p-tableCheckbox [value]="rowData"></p-tableCheckbox>
|
||||||
{{rowData.key}}
|
{{rowData.name}}
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</ng-template>
|
</ng-template>
|
||||||
|
|
|
@ -1,16 +1,12 @@
|
||||||
<p-panel [showHeader]="false" class="ui-top-space-10">
|
<p-panel [showHeader]="false" class="ui-top-space-10">
|
||||||
<div *ngIf="probeHost" class="ui-g">
|
<div *ngIf="probeHost" class="ui-g">
|
||||||
<div class="ui-g-12 ui-md-4 ui-key-value">
|
<div class="ui-g-12 ui-md-4 ui-key-value">
|
||||||
<!-- <of-key-value [key]="'Status'" [value]="connectionStatus"></of-key-value> -->
|
<of-key-value [key]="'Status'" [value]="connectionStatus"></of-key-value>
|
||||||
<of-key-value [key]="'CIDR'" [value]="probeHost.probe.cidr"></of-key-value>
|
<of-key-value [key]="'CIDR'" [value]="probeHost.probe.cidr"></of-key-value>
|
||||||
</div>
|
</div>
|
||||||
<div class="ui-g-12 ui-md-4 ui-key-value">
|
<div class="ui-g-12 ui-md-4 ui-key-value">
|
||||||
<of-key-value [key]="'Name'" [value]="probeHost.probe.name"></of-key-value>
|
<of-key-value [key]="'Name'" [value]="probeHost.probe.name"></of-key-value>
|
||||||
<!-- <of-key-value [key]="'OS'" [value]="probeHost.infraHost.infraOS.metaInfraVendor.name"></of-key-value> -->
|
<of-key-value [key]="'OS'" [value]="probeHost.infraHost.infraHostOS.name"></of-key-value>
|
||||||
</div>
|
|
||||||
<div class="ui-g-12 ui-md-4 ui-key-value">
|
|
||||||
<!-- <of-key-value [key]="'IPv4'" [value]="probeHost.infraHost.ipv4"></of-key-value> -->
|
|
||||||
<!-- <of-key-value [key]="'Mac Address'" [value]="probeHost.infraHost.mac"></of-key-value> -->
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</p-panel>
|
</p-panel>
|
3638
package-lock.json
generated
3638
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user