diff --git a/src/packages/discovery/component/setting/setting.component.ts b/src/packages/discovery/component/setting/setting.component.ts index f1d5273..02d1a44 100644 --- a/src/packages/discovery/component/setting/setting.component.ts +++ b/src/packages/discovery/component/setting/setting.component.ts @@ -292,12 +292,13 @@ export class SettingComponent implements OnInit, AfterContentInit { } const discoverZone: DiscoverZone = { discoverHost: { - firstScanRange: this.startIP, - lastScanRange: this.endIP, + firstScanRangev4: this.startIP, + lastScanRangev4: this.endIP, discoverPort: discoverPort, }, }; + console.log(discoverZone); // console.log('start discovery - ' + this.probe.probeKey); diff --git a/src/packages/discovery/model/DiscoverHost.ts b/src/packages/discovery/model/DiscoverHost.ts index cf39668..060778a 100644 --- a/src/packages/discovery/model/DiscoverHost.ts +++ b/src/packages/discovery/model/DiscoverHost.ts @@ -1,10 +1,15 @@ import { DiscoverPort } from './DiscoverPort'; export interface DiscoverHost { - firstScanRange?: string; - lastScanRange?: string; - excludeHosts?: string[]; - includeHosts?: string[]; + firstScanRangev4?: string; + lastScanRangev4?: string; + excludeHostsv4?: string[]; + includeHostsv4?: string[]; + + firstScanRangev6?: string; + lastScanRangev6?: string; + excludeHostsv6?: string[]; + includeHostsv6?: string[]; discoverPort?: DiscoverPort; } diff --git a/src/packages/discovery/model/Host.ts b/src/packages/discovery/model/Host.ts index 76f2492..1a8c974 100644 --- a/src/packages/discovery/model/Host.ts +++ b/src/packages/discovery/model/Host.ts @@ -3,8 +3,8 @@ import { Port } from './Port'; export interface Host { id?: number; - ip4?: string; - ip6?: string; + ipv4?: string; + ipv6?: string; mac: number; os: string; discoveredDate?: Date; diff --git a/src/packages/discovery/model/Zone.ts b/src/packages/discovery/model/Zone.ts index edf7451..7d4ba7a 100644 --- a/src/packages/discovery/model/Zone.ts +++ b/src/packages/discovery/model/Zone.ts @@ -3,8 +3,8 @@ import { Host } from './Host'; export interface Zone { id?: number; network?: string; - ip4?: string; - ip6?: string; + ipv4?: string; + ipv6?: string; iface?: string; mac?: string; discoveredDate?: Date; diff --git a/src/packages/discovery/store/discover/discover.reducer.ts b/src/packages/discovery/store/discover/discover.reducer.ts index 8aac05d..6d009bb 100644 --- a/src/packages/discovery/store/discover/discover.reducer.ts +++ b/src/packages/discovery/store/discover/discover.reducer.ts @@ -70,10 +70,10 @@ export function reducer(state = initialState, action: Actions): State { } if (null === zone.hosts || undefined === zone.hosts) { zone.hosts = new Map(); - zone.hosts.set(host.ip4, host); + zone.hosts.set(host.ipv4, host); } else { - if (zone.hosts.has(host.ip4) === false) { - zone.hosts.set(host.ip4, host); + if (zone.hosts.has(host.ipv4) === false) { + zone.hosts.set(host.ipv4, host); } } @@ -118,7 +118,7 @@ export function reducer(state = initialState, action: Actions): State { zone.hosts = new Map(); } let host: Host = null; - host = zone.hosts.get(port.host.ip4); + host = zone.hosts.get(port.host.ipv4); if (host === undefined || host === null) { host = port.host; @@ -133,7 +133,7 @@ export function reducer(state = initialState, action: Actions): State { } } - zone.hosts.set(host.ip4, host); + zone.hosts.set(host.ipv4, host); zones.set(zone.network, zone); const newZones: Map = new Map(); @@ -174,10 +174,10 @@ export function reducer(state = initialState, action: Actions): State { // console.error(`Discovery.DiscoveredPort: Host[${service.port.host.ip}] is not exist`); // } let host: Host = null; - host = zone.hosts.get(service.port.host.ip4); + host = zone.hosts.get(service.port.host.ipv4); if (host === undefined || host === null) { - zone.hosts.set(service.port.host.ip4, service.port.host); + zone.hosts.set(service.port.host.ipv4, service.port.host); host = service.port.host; } @@ -199,7 +199,7 @@ export function reducer(state = initialState, action: Actions): State { port.services.set(service.serviceName, service); host.ports.set(service.port.portNumber, port); - zone.hosts.set(host.ip4, host); + zone.hosts.set(host.ipv4, host); zones.set(zone.network, zone); const newZones: Map = new Map(); diff --git a/src/packages/discovery/store/regist/regist.action.ts b/src/packages/discovery/store/regist/regist.action.ts index 296988b..e06f031 100644 --- a/src/packages/discovery/store/regist/regist.action.ts +++ b/src/packages/discovery/store/regist/regist.action.ts @@ -7,10 +7,10 @@ import { Host, Port, Service, - DiscoveryZone, - DiscoveryHost, - DiscoveryPort, - DiscoveryService as MDiscoveryService, + DiscoverZone as MDDiscoverZone, + DiscoverHost as MDDiscoverHost, + DiscoverPort as MDDiscoverPort, + DiscoverService as MDiscoverService, } from '../../model'; import { Probe } from 'packages/probe/model';