UU
This commit is contained in:
parent
bab2dbfb94
commit
31d0245490
|
@ -1,5 +1,5 @@
|
|||
import { Zone } from './Zone';
|
||||
import { Port } from './Port';
|
||||
// import { Port } from './Port';
|
||||
import { MetaIPType } from '../meta';
|
||||
|
||||
export const defaultOsType = 'UNKNOWN';
|
||||
|
@ -24,5 +24,5 @@ export interface Host {
|
|||
discoveredDate?: Date;
|
||||
|
||||
zone?: Zone;
|
||||
portList?: Port[];
|
||||
// portList?: Port[];
|
||||
}
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
import { Host } from './Host';
|
||||
import { Service } from './Service';
|
||||
import { MetaPortType } from '../meta';
|
||||
|
||||
export interface Port {
|
||||
|
@ -11,5 +10,5 @@ export interface Port {
|
|||
discoveredDate?: Date;
|
||||
|
||||
host?: Host;
|
||||
serviceList?: Service[];
|
||||
// serviceList?: Service[];
|
||||
}
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
import { Host } from './Host';
|
||||
import { MetaIPType } from '../meta';
|
||||
|
||||
export interface Zone {
|
||||
|
@ -12,5 +11,5 @@ export interface Zone {
|
|||
discoveredBy?: string[];
|
||||
discoveredDate?: Date;
|
||||
|
||||
hostList?: Host[];
|
||||
// hostList?: Host[];
|
||||
}
|
||||
|
|
|
@ -8,7 +8,6 @@ import { Zone, Host, Port, Service, DiscoverHost } from '@overflow/model/discove
|
|||
|
||||
import { RPCSubscriber } from '@overflow/commons/ui/decorator/RPCSubscriber';
|
||||
import { DiscoveryConfigService } from '../../../commons/service/discovery-config.service';
|
||||
import { Observable } from 'rxjs';
|
||||
|
||||
import * as d3 from 'd3';
|
||||
import { Node } from '../../../commons/model/node';
|
||||
|
@ -251,28 +250,28 @@ export class HomePageComponent implements OnInit, OnDestroy {
|
|||
console.log(node);
|
||||
this.displaySidebar = true;
|
||||
|
||||
switch (node.group) {
|
||||
case 'zone':
|
||||
var zone: Zone = node.target;
|
||||
zone.hostList = [];
|
||||
this.hosts.forEach(host => {
|
||||
if (host.zone.network === zone.network) {
|
||||
zone.hostList.push(host);
|
||||
}
|
||||
});
|
||||
break;
|
||||
case 'host':
|
||||
var host: Host = node.target;
|
||||
host.portList = [];
|
||||
this.ports.forEach(port => {
|
||||
if (port.host.address === host.address) {
|
||||
host.portList.push(port);
|
||||
}
|
||||
});
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
// switch (node.group) {
|
||||
// case 'zone':
|
||||
// var zone: Zone = node.target;
|
||||
// zone.hostList = [];
|
||||
// this.hosts.forEach(host => {
|
||||
// if (host.zone.network === zone.network) {
|
||||
// zone.hostList.push(host);
|
||||
// }
|
||||
// });
|
||||
// break;
|
||||
// case 'host':
|
||||
// var host: Host = node.target;
|
||||
// host.portList = [];
|
||||
// this.ports.forEach(port => {
|
||||
// if (port.host.address === host.address) {
|
||||
// host.portList.push(port);
|
||||
// }
|
||||
// });
|
||||
// break;
|
||||
// default:
|
||||
// break;
|
||||
// }
|
||||
this.selectedNode = node;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user