From 08a0e6b20427ff5d521aa7047c13b73b45abd6a3 Mon Sep 17 00:00:00 2001 From: crusader Date: Wed, 12 Sep 2018 14:05:32 +0900 Subject: [PATCH] ing --- @overflow/model/meta/MetaHostType.ts | 23 +++++++++++++++ @overflow/model/meta/MetaServiceType.ts | 29 +++++++++++++++++++ src/app/pages/home/home-page.component.html | 8 ++--- src/app/pages/home/home-page.component.ts | 2 +- .../icon/{icon_etc.svg => icon_network.svg} | 0 5 files changed, 57 insertions(+), 5 deletions(-) create mode 100644 @overflow/model/meta/MetaHostType.ts create mode 100644 @overflow/model/meta/MetaServiceType.ts rename src/assets/image/icon/{icon_etc.svg => icon_network.svg} (100%) diff --git a/@overflow/model/meta/MetaHostType.ts b/@overflow/model/meta/MetaHostType.ts new file mode 100644 index 0000000..e81b614 --- /dev/null +++ b/@overflow/model/meta/MetaHostType.ts @@ -0,0 +1,23 @@ +export interface MetaHostType { + id?: number; + key?: string; + name?: string; + createDate?: Date; +} + +export enum MetaHostTypeEnum { + Host = 'HOST', + NAS = 'NAS', + Printer = 'PRINTER', + Router = 'ROUTER', +} + +export const toMetaHostTypeEnum = (v: MetaHostType): MetaHostTypeEnum => { + return MetaHostTypeEnum[v.key]; +}; + +export const toMetaHostType = (v: MetaHostTypeEnum): MetaHostType => { + return { + key: v, + }; +}; diff --git a/@overflow/model/meta/MetaServiceType.ts b/@overflow/model/meta/MetaServiceType.ts new file mode 100644 index 0000000..7fe23cd --- /dev/null +++ b/@overflow/model/meta/MetaServiceType.ts @@ -0,0 +1,29 @@ +export interface MetaServiceType { + id?: number; + key?: string; + name?: string; + createDate?: Date; +} + +export enum MetaServiceTypeEnum { + UNKNOWN = 'UNKNOWN', + Network = 'NETWORK', + Monitoring = 'MONITORING', + Directory = 'DIRECTORY', + Database = 'DATABASE', + NoSQL = 'NOSQL', + Mail = 'MAIL', + Search = 'SEARCH', + Web = 'WEB', + WAS = 'WAS', +} + +export const toMetaServiceTypeEnum = (v: MetaServiceType): MetaServiceTypeEnum => { + return MetaServiceTypeEnum[v.key]; +}; + +export const toMetaServiceType = (v: MetaServiceTypeEnum): MetaServiceType => { + return { + key: v, + }; +}; diff --git a/src/app/pages/home/home-page.component.html b/src/app/pages/home/home-page.component.html index 382cf83..ede8608 100644 --- a/src/app/pages/home/home-page.component.html +++ b/src/app/pages/home/home-page.component.html @@ -32,14 +32,14 @@ + attr.xlink:href="../../assets/image/icon/icon_{{node.target.hostType | lowercase}}.svg"> - + - - {{node.target.deviceVendor}} + + {{node.target.hostVendor}}