From f5e98b36dcc05cc5cd35d5da782f0d7f9d71a988 Mon Sep 17 00:00:00 2001 From: crusader Date: Wed, 12 Sep 2018 11:28:32 +0900 Subject: [PATCH] ing --- @overflow/model/discovery/Host.ts | 11 +- @overflow/model/discovery/Service.ts | 8 ++ src/app/pages/home/home-page.component.ts | 21 +--- .../icon/{icon_db.svg => icon_database.svg} | 0 src/assets/image/icon/icon_router.svg | 73 +++++------ .../icon/{icon_webserver.svg => icon_web.svg} | 0 src/assets/image/logo/logo_synology.svg | 114 ------------------ 7 files changed, 52 insertions(+), 175 deletions(-) rename src/assets/image/icon/{icon_db.svg => icon_database.svg} (100%) rename src/assets/image/icon/{icon_webserver.svg => icon_web.svg} (100%) delete mode 100644 src/assets/image/logo/logo_synology.svg diff --git a/@overflow/model/discovery/Host.ts b/@overflow/model/discovery/Host.ts index 42050ad..33c277e 100644 --- a/@overflow/model/discovery/Host.ts +++ b/@overflow/model/discovery/Host.ts @@ -2,6 +2,11 @@ import { Zone } from './Zone'; import { Port } from './Port'; import { MetaIPType } from '../meta'; +export const defaultOsType = 'UNKNOWN'; +export const defaultHostType = 'HOST'; +export const defaultHostVendor = 'UNKNOWN'; +export const defaultHostModel = 'UNKNOWN'; + export interface Host { metaIPType?: MetaIPType; name?: string; @@ -10,9 +15,9 @@ export interface Host { osType?: string; - deviceType?: string; - deviceVendor?: string; - deviceModel?: string; + hostType?: string; + hostVendor?: string; + hostModel?: string; meta?: Map>; discoveredBy?: string[]; diff --git a/@overflow/model/discovery/Service.ts b/@overflow/model/discovery/Service.ts index d638de7..b4bc4ac 100644 --- a/@overflow/model/discovery/Service.ts +++ b/@overflow/model/discovery/Service.ts @@ -1,12 +1,20 @@ import { Port } from './Port'; import { MetaCryptoType } from '../meta'; +export const defaultServiceType = 'ETC'; +export const defaultServiceVendor = 'UNKNOWN'; +export const defaultServiceVersion = 'UNKNOWN'; + export interface Service { metaCryptoType?: MetaCryptoType; key?: string; name?: string; description?: string; + serviceType?: string; + serviceVendor?: string; + serviceVersion?: string; + meta?: Map>; discoveredBy?: string[]; discoveredDate?: Date; diff --git a/src/app/pages/home/home-page.component.ts b/src/app/pages/home/home-page.component.ts index 2fae314..aac14d8 100644 --- a/src/app/pages/home/home-page.component.ts +++ b/src/app/pages/home/home-page.component.ts @@ -41,10 +41,6 @@ export class HomePageComponent implements OnInit, OnDestroy { showIntro = true; selectedNode = null; - // private visNetwork: any; - // private nodeSet: any; - // private edgeSet: any; - private nodes: Node[]; private links: Link[]; public simulation: d3.Simulation | undefined; @@ -286,7 +282,7 @@ export class HomePageComponent implements OnInit, OnDestroy { } /** - * DiscoverHost + * DiscoveredHost */ @RPCSubscriber({ method: 'DiscoveryService.DiscoveredHost' }) public DiscoveredHost(host: Host) { @@ -313,7 +309,7 @@ export class HomePageComponent implements OnInit, OnDestroy { } /** - * DiscoverHost + * DiscoveredPort */ @RPCSubscriber({ method: 'DiscoveryService.DiscoveredPort' }) public DiscoveredPort(port: Port) { @@ -321,7 +317,7 @@ export class HomePageComponent implements OnInit, OnDestroy { } /** - * DiscoverHost + * DiscoveredService */ @RPCSubscriber({ method: 'DiscoveryService.DiscoveredService' }) public DiscoveredService(service: Service) { @@ -348,17 +344,6 @@ export class HomePageComponent implements OnInit, OnDestroy { this.simulationRestart(); } - // private checkNode(id: string, target: any): Node { - // let node = this.getNode(id); - // if (null === node) { - // node = new Node(id); - // node.target = target; - // } else { - // node.target = target; - // } - // return node; - // } - private getNode(id: string): Node | null { let _n: Node = null; this.nodes.some((node): boolean => { diff --git a/src/assets/image/icon/icon_db.svg b/src/assets/image/icon/icon_database.svg similarity index 100% rename from src/assets/image/icon/icon_db.svg rename to src/assets/image/icon/icon_database.svg diff --git a/src/assets/image/icon/icon_router.svg b/src/assets/image/icon/icon_router.svg index a13f19a..5aa1408 100644 --- a/src/assets/image/icon/icon_router.svg +++ b/src/assets/image/icon/icon_router.svg @@ -3,51 +3,46 @@ - - - - - + + M42.9,28.7c-0.1,0-0.1-0.1-0.1-0.1l0.1-0.1c0.1,0,0.1,0.1,0.1,0.1S43,28.7,42.9,28.7L42.9,28.7z M36.3,28.7 + c-0.1,0-0.1-0.1-0.1-0.1l0.1-0.1c0.1,0,0.1,0.1,0.1,0.1S36.4,28.7,36.3,28.7L36.3,28.7z M29.8,28.7c-0.1,0-0.1-0.1-0.1-0.1 + l0.1-0.1l0.1,0.1C29.9,28.6,29.9,28.7,29.8,28.7L29.8,28.7z M23.3,28.7c-0.1,0-0.1-0.1-0.1-0.1l0.1-0.1l0.1,0.1 + C23.4,28.6,23.4,28.7,23.3,28.7L23.3,28.7z"/> - - + C32.7,2.3,33.1,2.2,33.4,2.2 M33.4,0.2c-0.8,0-1.5,0.2-2.1,0.7c-1.8,1.2-2.2,3.6-1,5.3C31.4,7.9,32,10,32,12.1s-0.6,4.2-1.8,5.9 + c-0.6,0.8-0.8,1.9-0.6,2.9c0.2,1,0.8,1.9,1.6,2.5c0.6,0.4,1.4,0.7,2.2,0.7c1.3,0,2.4-0.6,3.2-1.7c2.1-3,3.2-6.6,3.2-10.3 + c0-3.6-1.1-7.2-3.1-10.2C35.9,0.8,34.7,0.2,33.4,0.2L33.4,0.2z"/> - - + @@ -55,22 +50,20 @@ - + C34.2,27.3,35.2,26.4,36.3,26.4z M23.3,30.7c-1.2,0-2.1-1-2.1-2.1c0-1.2,1-2.1,2.1-2.1s2.1,1,2.1,2.1S24.5,30.7,23.3,30.7z + M27.7,28.5c0-1.2,1-2.1,2.1-2.1c1.2,0,2.1,1,2.1,2.1c0,1.2-1,2.1-2.1,2.1C28.6,30.7,27.7,29.7,27.7,28.5z"/> - + - + diff --git a/src/assets/image/icon/icon_webserver.svg b/src/assets/image/icon/icon_web.svg similarity index 100% rename from src/assets/image/icon/icon_webserver.svg rename to src/assets/image/icon/icon_web.svg diff --git a/src/assets/image/logo/logo_synology.svg b/src/assets/image/logo/logo_synology.svg deleted file mode 100644 index b741485..0000000 --- a/src/assets/image/logo/logo_synology.svg +++ /dev/null @@ -1,114 +0,0 @@ - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -