This commit is contained in:
snoop 2018-03-22 13:04:50 +09:00
parent 329fdcfda2
commit ab2757c1e7
7 changed files with 88 additions and 0 deletions

View File

@ -159,6 +159,10 @@ export class SettingComponent implements OnInit, AfterContentInit {
convertTreeView(zone: Zone) {
if (zone === undefined || zone === null) {
return;
}
const treeNodes = this.convertViewHost(zone.hosts);
console.log(treeNodes);

View File

@ -0,0 +1,84 @@
// import { Action } from '@ngrx/store';
// import { notificationActionEnum } from 'packages/core/rpc/store/notification';
// import { RPCError } from 'packages/core/rpc/error';
// import {
// Zone,
// Host,
// Port,
// Service,
// DiscoveryZone,
// DiscoveryHost,
// DiscoveryPort,
// DiscoveryService as MDiscoveryService,
// } from '../../model';
// export enum ActionType {
// DiscoverZone = '[@@NOTIFICATION] DiscoveryService.discoverZone',
// DiscoverHost = '[@@NOTIFICATION] DiscoveryService.discoverHost',
// DiscoverPort = '[@@NOTIFICATION] DiscoveryService.discoverPort',
// DiscoverService = '[@@NOTIFICATION] DiscoveryService.discoverService',
// DiscoveredZone = '[@@NOTIFICATION] DiscoveryService.discoveredZone',
// DiscoveredHost = '[@@NOTIFICATION] DiscoveryService.discoveredHost',
// DiscoveredPort = '[@@NOTIFICATION] DiscoveryService.discoveredPort',
// DiscoveredService = '[@@NOTIFICATION] DiscoveryService.discoveredService',
// }
// export class DiscoverZone implements Action {
// readonly type = ActionType.DiscoverZone;
// constructor(public payload: {probeID: string, discoveryZone: DiscoveryZone}) {}
// }
// export class DiscoverHost implements Action {
// readonly type = ActionType.DiscoverHost;
// constructor(public payload: {probeID: string, zone: Zone, discoveryHost: DiscoveryHost}) {}
// }
// export class DiscoverPort implements Action {
// readonly type = ActionType.DiscoverPort;
// constructor(public payload: {probeID: string, host: Host, discoveryPort: DiscoveryPort}) {}
// }
// export class DiscoverService implements Action {
// readonly type = ActionType.DiscoverService;
// constructor(public payload: {probeID: string, port: Port, discoveryService: MDiscoveryService}) {}
// }
// export class DiscoveredZone implements Action {
// readonly type = ActionType.DiscoveredZone;
// constructor(public payload: Zone) {}
// }
// export class DiscoveredHost implements Action {
// readonly type = ActionType.DiscoveredHost;
// constructor(public payload: Host) {}
// }
// export class DiscoveredPort implements Action {
// readonly type = ActionType.DiscoveredPort;
// constructor(public payload: Port) {}
// }
// export class DiscoveredService implements Action {
// readonly type = ActionType.DiscoveredService;
// constructor(public payload: Service) {}
// }
// export type Actions =
// | DiscoverZone
// | DiscoverHost
// | DiscoverPort
// | DiscoverService
// | DiscoveredZone
// | DiscoveredHost
// | DiscoveredPort
// | DiscoveredService
// ;