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.discoverZone = dz;
|
||||
|
||||
// TODO: fix
|
||||
const zone: Zone = {
|
||||
network: '192.168.1.0/24', // this.selectedProbe.probe.cidr
|
||||
address: '192.168.1.101',
|
||||
iface: 'enp3s0',
|
||||
mac: '44:8a:5b:f1:f1:f3',
|
||||
network: this.selectedProbe.infraHost.infraZone.network, // this.selectedProbe.probe.cidr
|
||||
address: this.selectedProbe.infraHost.infraZone.address.split('/')[0],
|
||||
iface: this.selectedProbe.infraHost.infraZone.iface,
|
||||
mac: this.selectedProbe.infraHost.infraZone.mac,
|
||||
};
|
||||
|
||||
this.discoveryService.discoverHost(this.selectedProbe.probe.probeKey, zone, dz.discoverHost);
|
||||
|
||||
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">
|
||||
<of-key-value [key]="'Host Range'" [value]="hostRange"></of-key-value>
|
||||
<of-key-value [key]="'Port Range'" [value]="portRange"></of-key-value>
|
||||
|
@ -11,14 +11,14 @@
|
|||
</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>
|
||||
<div *ngFor="let service of services">
|
||||
{{service}}
|
||||
{{service}}
|
||||
</div>
|
||||
</p-overlayPanel>
|
||||
|
||||
<a style="cursor: pointer" (click)="op.toggle($event)">{{services.length}} services has selected.</a>
|
||||
</div>
|
||||
</div>
|
||||
</div> -->
|
||||
</div>
|
|
@ -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.firstScanRange
|
||||
+ ' ~ '
|
||||
+ this.discoverZone.discoverHost.lastScanRange;
|
||||
this.portRange = this.discoverZone.discoverHost.discoverPort.firstScanRange
|
||||
+ ' ~ '
|
||||
+ this.discoverZone.discoverHost.discoverPort.lastScanRange;
|
||||
this.services = this.discoverZone.discoverHost.discoverPort.discoverService.includeServices;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -4,10 +4,10 @@
|
|||
</div>
|
||||
<div class="ui-g-12 ui-bottom-space-20">
|
||||
<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 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>
|
||||
|
||||
|
@ -66,11 +66,11 @@
|
|||
(keyup)="onInputPort(endPort.value, 1)">
|
||||
</div>
|
||||
<div class="ui-g-12 ui-g-nopad" style="margin-left: 0.5em">
|
||||
<a style="cursor: pointer" (click)="portExcludeDisplay = true">
|
||||
<span *ngIf="excludePorts.length === 0">Add Exclude Ports</span>
|
||||
<span *ngIf="excludePorts.length > 0">{{excludePorts.length}} ports are excluded.</span>
|
||||
</a>
|
||||
</div>
|
||||
<a style="cursor: pointer" (click)="portExcludeDisplay = true">
|
||||
<span *ngIf="excludePorts.length === 0">Add Exclude Ports</span>
|
||||
<span *ngIf="excludePorts.length > 0">{{excludePorts.length}} ports are excluded.</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<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);
|
||||
}
|
||||
discoverService = {
|
||||
includeServices: null,
|
||||
includeServices: services,
|
||||
};
|
||||
}
|
||||
if (this.portChecked) {
|
||||
|
|
|
@ -3,13 +3,10 @@
|
|||
|
||||
<div class="ui-g">
|
||||
<div *ngFor="let service of services">
|
||||
<p-toggleButton offLabel="{{service.serviceName}}" onLabel="{{service.serviceName}}"
|
||||
[style]="{'width':'100px'}"
|
||||
(onChange)="onServiceFilter($event, service)"
|
||||
[(ngModel)]="filterServices[service.serviceName]"
|
||||
></p-toggleButton>
|
||||
<p-toggleButton offLabel="{{service.name}}" onLabel="{{service.name}}" [style]="{'width':'100px'}" (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>
|
||||
|
|
|
@ -101,17 +101,6 @@ export class SearchResultComponent implements OnInit, OnChanges {
|
|||
|
||||
|
||||
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);
|
||||
this.hostNode.splice(idx, 0, {
|
||||
type: 'HOST',
|
||||
|
@ -119,7 +108,6 @@ export class SearchResultComponent implements OnInit, OnChanges {
|
|||
data: {
|
||||
exist: false,
|
||||
ip: this.convertIPtoNumber(host.address),
|
||||
ipv6: host.address,
|
||||
mac: host.mac,
|
||||
openPorts: [],
|
||||
target: host
|
||||
|
@ -139,13 +127,14 @@ export class SearchResultComponent implements OnInit, OnChanges {
|
|||
label: service.name + ' (' + service.port.portNumber + ')',
|
||||
data: {
|
||||
name: service.name,
|
||||
portType: service.port.metaPortType,
|
||||
portType: service.port.metaPortType.key,
|
||||
portNumber: service.port.portNumber,
|
||||
target: service
|
||||
},
|
||||
});
|
||||
this.discoveredServices.push(service);
|
||||
}
|
||||
|
||||
addPort(port: Port) {
|
||||
// this.hostNode.forEach(node => {
|
||||
// if (node.data.id === port.host.id) {
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
</td> -->
|
||||
<td>
|
||||
<p-tableCheckbox [value]="rowData"></p-tableCheckbox>
|
||||
{{rowData.key}}
|
||||
{{rowData.name}}
|
||||
</td>
|
||||
</tr>
|
||||
</ng-template>
|
||||
|
|
|
@ -1,16 +1,12 @@
|
|||
<p-panel [showHeader]="false" class="ui-top-space-10">
|
||||
<div *ngIf="probeHost" class="ui-g">
|
||||
<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>
|
||||
</div>
|
||||
<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]="'OS'" [value]="probeHost.infraHost.infraOS.metaInfraVendor.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> -->
|
||||
<of-key-value [key]="'OS'" [value]="probeHost.infraHost.infraHostOS.name"></of-key-value>
|
||||
</div>
|
||||
</div>
|
||||
</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