From 7e682274d49d270983ea4836ae496c1e986945ab Mon Sep 17 00:00:00 2001 From: insanity Date: Tue, 12 Jun 2018 16:24:16 +0900 Subject: [PATCH] metaservices --- @overflow/meta/service/index.ts | 31 +++++++++++++++++-- .../meta-crawler-input-item.service.ts | 1 - .../service/meta-crawler-mapping.service.ts | 19 ++++++++++++ .../meta/service/meta-crawler.service.ts | 2 +- .../meta/service/meta-crypto-type.service.ts | 23 ++++++++++++++ .../meta/service/meta-email-type.service.ts | 23 ++++++++++++++ .../meta/service/meta-history-type.service.ts | 6 +++- .../meta/service/meta-infra-type.service.ts | 6 +++- .../meta/service/meta-input-type.service.ts | 6 +++- .../meta/service/meta-ip-type.service.ts | 22 +++++++++++++ .../service/meta-member-status.service.ts | 6 +++- .../meta-noauth-probe-status.service.ts | 6 +++- .../meta/service/meta-port-type.service.ts | 22 +++++++++++++ .../meta/service/meta-probe-status.service.ts | 6 +++- .../meta-sensor-display-item.service.ts | 4 +++ .../service/meta-sensor-item-type.service.ts | 6 +++- .../service/meta-target-host-type.service.ts | 22 +++++++++++++ .../meta-target-service-type.service.ts | 22 +++++++++++++ .../service/meta-target-status.service.ts | 22 +++++++++++++ ...ta-target-type-category-mapping.service.ts | 18 +++++++++++ .../meta-target-type-category.service.ts | 22 +++++++++++++ .../meta/service/meta-target-type.service.ts | 22 +++++++++++++ .../service/meta-target-zone-type.service.ts | 22 +++++++++++++ ...meta-vendor-crawler-sensor-item.service.ts | 18 ----------- .../service/meta-vendor-crawler.service.ts | 18 ----------- package.json | 1 - 26 files changed, 327 insertions(+), 49 deletions(-) create mode 100644 @overflow/meta/service/meta-crawler-mapping.service.ts create mode 100644 @overflow/meta/service/meta-crypto-type.service.ts create mode 100644 @overflow/meta/service/meta-email-type.service.ts create mode 100644 @overflow/meta/service/meta-ip-type.service.ts create mode 100644 @overflow/meta/service/meta-port-type.service.ts create mode 100644 @overflow/meta/service/meta-target-host-type.service.ts create mode 100644 @overflow/meta/service/meta-target-service-type.service.ts create mode 100644 @overflow/meta/service/meta-target-status.service.ts create mode 100644 @overflow/meta/service/meta-target-type-category-mapping.service.ts create mode 100644 @overflow/meta/service/meta-target-type-category.service.ts create mode 100644 @overflow/meta/service/meta-target-type.service.ts create mode 100644 @overflow/meta/service/meta-target-zone-type.service.ts delete mode 100644 @overflow/meta/service/meta-vendor-crawler-sensor-item.service.ts delete mode 100644 @overflow/meta/service/meta-vendor-crawler.service.ts diff --git a/@overflow/meta/service/index.ts b/@overflow/meta/service/index.ts index 2e899c8..1701bd0 100644 --- a/@overflow/meta/service/index.ts +++ b/@overflow/meta/service/index.ts @@ -13,21 +13,46 @@ import { MetaSensorItemKeyService } from './meta-sensor-item-key.service'; import { MetaSensorItemTypeService } from './meta-sensor-item-type.service'; import { MetaSensorItemUnitService } from './meta-sensor-item-unit.service'; import { MetaSensorStatusService } from './meta-sensor-status.service'; +import { MetaCrawlerMappingService } from './meta-crawler-mapping.service'; +import { MetaCryptoTypeService } from './meta-crypto-type.service'; +import { MetaEmailTypeService } from './meta-email-type.service'; +import { MetaIPTypeService } from './meta-ip-type.service'; +import { MetaPortTypeService } from './meta-port-type.service'; +import { MetaTargetHostTypeService } from './meta-target-host-type.service'; +import { MetaTargetServiceTypeService } from './meta-target-service-type.service'; +import { MetaTargetStatusEnum } from '@overflow/commons-typescript'; +import { MetaTargetStatusService } from './meta-target-status.service'; +import { MetaTargetTypeCategoryMappingService } from './meta-target-type-category-mapping.service'; +import { MetaTargetTypeCategoryService } from './meta-target-type-category.service'; +import { MetaTargetTypeService } from './meta-target-type.service'; +import { MetaTargetZoneTypeService } from './meta-target-zone-type.service'; export const SERVICES = [ - MetaCrawlerService, MetaCrawlerInputItemService, + MetaCrawlerService, + MetaCrawlerMappingService, + MetaCrawlerService, + MetaCryptoTypeService, + MetaEmailTypeService, MetaHistoryTypeService, MetaInfraTypeService, MetaInputTypeService, + MetaIPTypeService, MetaMemberStatusService, MetaNoAuthProbeStatusService, + MetaPortTypeService, MetaProbeStatusService, MetaSensorDisplayItemService, - MetaSensorDisplayMappingService, - MetaSensorItemService, MetaSensorItemKeyService, MetaSensorItemTypeService, MetaSensorItemUnitService, + MetaSensorItemService, MetaSensorStatusService, + MetaTargetHostTypeService, + MetaTargetServiceTypeService, + MetaTargetStatusService, + MetaTargetTypeCategoryMappingService, + MetaTargetTypeCategoryService, + MetaTargetTypeService, + MetaTargetZoneTypeService, ]; diff --git a/@overflow/meta/service/meta-crawler-input-item.service.ts b/@overflow/meta/service/meta-crawler-input-item.service.ts index 10a390d..9f67602 100644 --- a/@overflow/meta/service/meta-crawler-input-item.service.ts +++ b/@overflow/meta/service/meta-crawler-input-item.service.ts @@ -2,7 +2,6 @@ import { Injectable } from '@angular/core'; import { Observable } from 'rxjs'; import { RPCService } from '@loafer/ng-rpc'; import { MetaCrawlerInputItem } from '@overflow/commons-typescript/model/meta'; -import { MetaCrawler } from '@overflow/commons-typescript/model/meta'; @Injectable() diff --git a/@overflow/meta/service/meta-crawler-mapping.service.ts b/@overflow/meta/service/meta-crawler-mapping.service.ts new file mode 100644 index 0000000..59d1269 --- /dev/null +++ b/@overflow/meta/service/meta-crawler-mapping.service.ts @@ -0,0 +1,19 @@ +import { Injectable } from '@angular/core'; +import { Observable } from 'rxjs'; +import { RPCService } from '@loafer/ng-rpc'; +import { MetaCrawlerMapping } from '@overflow/commons-typescript/model/meta'; + + +@Injectable() +export class MetaCrawlerMappingService { + + public constructor( + private rpcService: RPCService, + ) { + + } + + public readAll(): Observable { + return this.rpcService.call('CentralMetaCrawlerMappingService.readAll'); + } +} diff --git a/@overflow/meta/service/meta-crawler.service.ts b/@overflow/meta/service/meta-crawler.service.ts index f7bc6ec..e3c81d4 100644 --- a/@overflow/meta/service/meta-crawler.service.ts +++ b/@overflow/meta/service/meta-crawler.service.ts @@ -1,6 +1,6 @@ import { Injectable } from '@angular/core'; import { Observable } from 'rxjs'; -import { shareReplay, map } from 'rxjs/operators'; +import { shareReplay } from 'rxjs/operators'; import { RPCService } from '@loafer/ng-rpc'; import { MetaCrawler } from '@overflow/commons-typescript/model/meta'; diff --git a/@overflow/meta/service/meta-crypto-type.service.ts b/@overflow/meta/service/meta-crypto-type.service.ts new file mode 100644 index 0000000..216f84d --- /dev/null +++ b/@overflow/meta/service/meta-crypto-type.service.ts @@ -0,0 +1,23 @@ +import { Injectable } from '@angular/core'; +import { Observable } from 'rxjs'; +import { RPCService } from '@loafer/ng-rpc'; +import { MetaCryptoType } from '@overflow/commons-typescript/model/meta'; + + +@Injectable() +export class MetaCryptoTypeService { + + public constructor( + private rpcService: RPCService, + ) { + + } + + public readByKey(key: string): Observable { + return this.rpcService.call('MetaCryptoTypeService.readByKey', key); + } + + public readAll(): Observable { + return this.rpcService.call('MetaCryptoTypeService.readAll'); + } +} diff --git a/@overflow/meta/service/meta-email-type.service.ts b/@overflow/meta/service/meta-email-type.service.ts new file mode 100644 index 0000000..124a5ad --- /dev/null +++ b/@overflow/meta/service/meta-email-type.service.ts @@ -0,0 +1,23 @@ +import { Injectable } from '@angular/core'; +import { Observable } from 'rxjs'; +import { RPCService } from '@loafer/ng-rpc'; +import { MetaEmailType } from '@overflow/commons-typescript/model/meta'; + + +@Injectable() +export class MetaEmailTypeService { + + public constructor( + private rpcService: RPCService, + ) { + + } + + public readByKey(key: string): Observable { + return this.rpcService.call('MetaEmailTypeService.readByKey', key); + } + + public readAll(): Observable { + return this.rpcService.call('MetaEmailTypeService.readAll'); + } +} diff --git a/@overflow/meta/service/meta-history-type.service.ts b/@overflow/meta/service/meta-history-type.service.ts index 3caf6ed..8c87d85 100644 --- a/@overflow/meta/service/meta-history-type.service.ts +++ b/@overflow/meta/service/meta-history-type.service.ts @@ -12,7 +12,11 @@ export class MetaHistoryTypeService { } + public readByKey(key: string): Observable { + return this.rpcService.call('MetaHistoryTypeService.readByKey', key); + } + public readAll(): Observable { - return this.rpcService.call('MetaHistoryTypeService.readAll'); + return this.rpcService.call('MetaHistoryTypeService.readAll'); } } diff --git a/@overflow/meta/service/meta-infra-type.service.ts b/@overflow/meta/service/meta-infra-type.service.ts index 9346690..298064b 100644 --- a/@overflow/meta/service/meta-infra-type.service.ts +++ b/@overflow/meta/service/meta-infra-type.service.ts @@ -12,7 +12,11 @@ export class MetaInfraTypeService { } + public readByKey(key: string): Observable { + return this.rpcService.call('MetaInfraTypeService.readByKey', key); + } + public readAll(): Observable { - return this.rpcService.call('MetaInfraTypeService.readAll'); + return this.rpcService.call('MetaInfraTypeService.readAll'); } } diff --git a/@overflow/meta/service/meta-input-type.service.ts b/@overflow/meta/service/meta-input-type.service.ts index 2a140aa..637252c 100644 --- a/@overflow/meta/service/meta-input-type.service.ts +++ b/@overflow/meta/service/meta-input-type.service.ts @@ -12,7 +12,11 @@ export class MetaInputTypeService { } + public readByKey(key: string): Observable { + return this.rpcService.call('MetaInputTypeService.readByKey', key); + } + public readAll(): Observable { - return this.rpcService.call('MetaInputTypeService.readAll'); + return this.rpcService.call('MetaInputTypeService.readAll'); } } diff --git a/@overflow/meta/service/meta-ip-type.service.ts b/@overflow/meta/service/meta-ip-type.service.ts new file mode 100644 index 0000000..c7e74b1 --- /dev/null +++ b/@overflow/meta/service/meta-ip-type.service.ts @@ -0,0 +1,22 @@ +import { Injectable } from '@angular/core'; +import { Observable } from 'rxjs'; +import { RPCService } from '@loafer/ng-rpc'; +import { MetaIPType } from '@overflow/commons-typescript/model/meta'; + +@Injectable() +export class MetaIPTypeService { + + public constructor( + private rpcService: RPCService, + ) { + + } + + public readByKey(key: string): Observable { + return this.rpcService.call('MetaIPTypeService.readByKey', key); + } + + public readAll(): Observable { + return this.rpcService.call('MetaIPTypeService.readAll'); + } +} diff --git a/@overflow/meta/service/meta-member-status.service.ts b/@overflow/meta/service/meta-member-status.service.ts index d0699e4..641688d 100644 --- a/@overflow/meta/service/meta-member-status.service.ts +++ b/@overflow/meta/service/meta-member-status.service.ts @@ -12,7 +12,11 @@ export class MetaMemberStatusService { } + public readByKey(key: string): Observable { + return this.rpcService.call('MetaMemberStatusService.readByKey', key); + } + public readAll(): Observable { - return this.rpcService.call('MetaMemberStatusService.readAll'); + return this.rpcService.call('MetaMemberStatusService.readAll'); } } diff --git a/@overflow/meta/service/meta-noauth-probe-status.service.ts b/@overflow/meta/service/meta-noauth-probe-status.service.ts index dbeb4a2..5b85308 100644 --- a/@overflow/meta/service/meta-noauth-probe-status.service.ts +++ b/@overflow/meta/service/meta-noauth-probe-status.service.ts @@ -12,7 +12,11 @@ export class MetaNoAuthProbeStatusService { } + public readByKey(key: string): Observable { + return this.rpcService.call('MetaNoAuthProbeStatusService.readByKey', key); + } + public readAll(): Observable { - return this.rpcService.call('MetaNoAuthProbeStatusService.readAll'); + return this.rpcService.call('MetaNoAuthProbeStatusService.readAll'); } } diff --git a/@overflow/meta/service/meta-port-type.service.ts b/@overflow/meta/service/meta-port-type.service.ts new file mode 100644 index 0000000..30e7297 --- /dev/null +++ b/@overflow/meta/service/meta-port-type.service.ts @@ -0,0 +1,22 @@ +import { Injectable } from '@angular/core'; +import { Observable } from 'rxjs'; +import { RPCService } from '@loafer/ng-rpc'; +import { MetaPortType } from '@overflow/commons-typescript'; + +@Injectable() +export class MetaPortTypeService { + + public constructor( + private rpcService: RPCService, + ) { + + } + + public readByKey(key: string): Observable { + return this.rpcService.call('MetaPortTypeService.readByKey', key); + } + + public readAll(): Observable { + return this.rpcService.call('MetaPortTypeService.readAll'); + } +} diff --git a/@overflow/meta/service/meta-probe-status.service.ts b/@overflow/meta/service/meta-probe-status.service.ts index 4ec7a46..8f8a49d 100644 --- a/@overflow/meta/service/meta-probe-status.service.ts +++ b/@overflow/meta/service/meta-probe-status.service.ts @@ -12,7 +12,11 @@ export class MetaProbeStatusService { } + public readByKey(key: string): Observable { + return this.rpcService.call('MetaProbeStatusService.readByKey', key); + } + public readAll(): Observable { - return this.rpcService.call('MetaProbeStatusService.readAll'); + return this.rpcService.call('MetaProbeStatusService.readAll'); } } diff --git a/@overflow/meta/service/meta-sensor-display-item.service.ts b/@overflow/meta/service/meta-sensor-display-item.service.ts index 207dbb3..35e0530 100644 --- a/@overflow/meta/service/meta-sensor-display-item.service.ts +++ b/@overflow/meta/service/meta-sensor-display-item.service.ts @@ -17,6 +17,10 @@ export class MetaSensorDisplayItemService { } + public read(id: number): Observable { + return this.rpcService.call('MetaSensorDisplayItemService.read', id); + } + public readAllByCrawlerID(metaCrawlerID: number): Observable { return this.rpcService.call('MetaSensorDisplayItemService.readAllByCrawler', metaCrawlerID); } diff --git a/@overflow/meta/service/meta-sensor-item-type.service.ts b/@overflow/meta/service/meta-sensor-item-type.service.ts index af7c101..6afdffe 100644 --- a/@overflow/meta/service/meta-sensor-item-type.service.ts +++ b/@overflow/meta/service/meta-sensor-item-type.service.ts @@ -12,7 +12,11 @@ export class MetaSensorItemTypeService { } + public readByKey(key: string): Observable { + return this.rpcService.call('MetaSensorItemTypeService.readByKey', key); + } + public readAll(): Observable { - return this.rpcService.call('MetaSensorItemTypeService.readAll'); + return this.rpcService.call('MetaSensorItemTypeService.readAll'); } } diff --git a/@overflow/meta/service/meta-target-host-type.service.ts b/@overflow/meta/service/meta-target-host-type.service.ts new file mode 100644 index 0000000..310564f --- /dev/null +++ b/@overflow/meta/service/meta-target-host-type.service.ts @@ -0,0 +1,22 @@ +import { Injectable } from '@angular/core'; +import { Observable } from 'rxjs'; +import { RPCService } from '@loafer/ng-rpc'; +import { MetaTargetHostType } from '@overflow/commons-typescript/model/meta'; + +@Injectable() +export class MetaTargetHostTypeService { + + public constructor( + private rpcService: RPCService, + ) { + + } + + public readByKey(key: string): Observable { + return this.rpcService.call('MetaTargetHostTypeService.readByKey', key); + } + + public readAll(): Observable { + return this.rpcService.call('MetaTargetHostTypeService.readAll'); + } +} diff --git a/@overflow/meta/service/meta-target-service-type.service.ts b/@overflow/meta/service/meta-target-service-type.service.ts new file mode 100644 index 0000000..e674eb2 --- /dev/null +++ b/@overflow/meta/service/meta-target-service-type.service.ts @@ -0,0 +1,22 @@ +import { Injectable } from '@angular/core'; +import { Observable } from 'rxjs'; +import { RPCService } from '@loafer/ng-rpc'; +import { MetaTargetServiceType } from '@overflow/commons-typescript/model/meta'; + +@Injectable() +export class MetaTargetServiceTypeService { + + public constructor( + private rpcService: RPCService, + ) { + + } + + public readByKey(key: string): Observable { + return this.rpcService.call('MetaTargetServiceTypeService.readByKey', key); + } + + public readAll(): Observable { + return this.rpcService.call('MetaTargetServiceTypeService.readAll'); + } +} diff --git a/@overflow/meta/service/meta-target-status.service.ts b/@overflow/meta/service/meta-target-status.service.ts new file mode 100644 index 0000000..a25dffa --- /dev/null +++ b/@overflow/meta/service/meta-target-status.service.ts @@ -0,0 +1,22 @@ +import { Injectable } from '@angular/core'; +import { Observable } from 'rxjs'; +import { RPCService } from '@loafer/ng-rpc'; +import { MetaTargetStatus } from '@overflow/commons-typescript/model/meta'; + +@Injectable() +export class MetaTargetStatusService { + + public constructor( + private rpcService: RPCService, + ) { + + } + + public readByKey(key: string): Observable { + return this.rpcService.call('MetaTargetStatusService.readByKey', key); + } + + public readAll(): Observable { + return this.rpcService.call('MetaTargetStatusService.readAll'); + } +} diff --git a/@overflow/meta/service/meta-target-type-category-mapping.service.ts b/@overflow/meta/service/meta-target-type-category-mapping.service.ts new file mode 100644 index 0000000..e670ddf --- /dev/null +++ b/@overflow/meta/service/meta-target-type-category-mapping.service.ts @@ -0,0 +1,18 @@ +import { Injectable } from '@angular/core'; +import { Observable } from 'rxjs'; +import { RPCService } from '@loafer/ng-rpc'; +import { MetaTargetTypeCategoryMapping } from '@overflow/commons-typescript/model/meta'; + +@Injectable() +export class MetaTargetTypeCategoryMappingService { + + public constructor( + private rpcService: RPCService, + ) { + + } + + public readAll(): Observable { + return this.rpcService.call('MetaTargetTypeCategoryMappingService.readAll'); + } +} diff --git a/@overflow/meta/service/meta-target-type-category.service.ts b/@overflow/meta/service/meta-target-type-category.service.ts new file mode 100644 index 0000000..c81dceb --- /dev/null +++ b/@overflow/meta/service/meta-target-type-category.service.ts @@ -0,0 +1,22 @@ +import { Injectable } from '@angular/core'; +import { Observable } from 'rxjs'; +import { RPCService } from '@loafer/ng-rpc'; +import { MetaTargetTypeCategory } from '@overflow/commons-typescript/model/meta'; + +@Injectable() +export class MetaTargetTypeCategoryService { + + public constructor( + private rpcService: RPCService, + ) { + + } + + public readByKey(key: string): Observable { + return this.rpcService.call('MetaTargetTypeCategoryService.readByKey', key); + } + + public readAll(): Observable { + return this.rpcService.call('MetaTargetTypeCategoryService.readAll'); + } +} diff --git a/@overflow/meta/service/meta-target-type.service.ts b/@overflow/meta/service/meta-target-type.service.ts new file mode 100644 index 0000000..370ea93 --- /dev/null +++ b/@overflow/meta/service/meta-target-type.service.ts @@ -0,0 +1,22 @@ +import { Injectable } from '@angular/core'; +import { Observable } from 'rxjs'; +import { RPCService } from '@loafer/ng-rpc'; +import { MetaTargetType } from '@overflow/commons-typescript/model/meta'; + +@Injectable() +export class MetaTargetTypeService { + + public constructor( + private rpcService: RPCService, + ) { + + } + + public readByKey(key: string): Observable { + return this.rpcService.call('MetaTargetTypeService.readByKey', key); + } + + public readAll(): Observable { + return this.rpcService.call('MetaTargetTypeService.readAll'); + } +} diff --git a/@overflow/meta/service/meta-target-zone-type.service.ts b/@overflow/meta/service/meta-target-zone-type.service.ts new file mode 100644 index 0000000..71599a7 --- /dev/null +++ b/@overflow/meta/service/meta-target-zone-type.service.ts @@ -0,0 +1,22 @@ +import { Injectable } from '@angular/core'; +import { Observable } from 'rxjs'; +import { RPCService } from '@loafer/ng-rpc'; +import { MetaTargetZoneType } from '@overflow/commons-typescript/model/meta'; + +@Injectable() +export class MetaTargetZoneTypeService { + + public constructor( + private rpcService: RPCService, + ) { + + } + + public readByKey(key: string): Observable { + return this.rpcService.call('MetaTargetZoneTypeService.readByKey', key); + } + + public readAll(): Observable { + return this.rpcService.call('MetaTargetZoneTypeService.readAll'); + } +} diff --git a/@overflow/meta/service/meta-vendor-crawler-sensor-item.service.ts b/@overflow/meta/service/meta-vendor-crawler-sensor-item.service.ts deleted file mode 100644 index 88ef9ad..0000000 --- a/@overflow/meta/service/meta-vendor-crawler-sensor-item.service.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { Injectable } from '@angular/core'; -import { Observable } from 'rxjs'; -import { RPCService } from '@loafer/ng-rpc'; -import { MetaVendorCrawlerSensorItem } from '@overflow/commons-typescript/model/meta'; - -@Injectable() -export class MetaVendorCrawlerSensorItemService { - - public constructor( - private rpcService: RPCService, - ) { - - } - - public readAll(): Observable { - return this.rpcService.call('MetaVendorCrawlerSensorItemService.readAll'); - } -} diff --git a/@overflow/meta/service/meta-vendor-crawler.service.ts b/@overflow/meta/service/meta-vendor-crawler.service.ts deleted file mode 100644 index 541a63c..0000000 --- a/@overflow/meta/service/meta-vendor-crawler.service.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { Injectable } from '@angular/core'; -import { Observable } from 'rxjs'; -import { RPCService } from '@loafer/ng-rpc'; -import { MetaInfraVendor, MetaVendorCrawler } from '@overflow/commons-typescript/model/meta'; - -@Injectable() -export class MetaVendorCrawlerService { - - public constructor( - private rpcService: RPCService, - ) { - - } - - public readAllByMetaInfraVendorID(metaInfraVendorID: number): Observable { - return this.rpcService.call('MetaVendorCrawlerService.readAllByMetaInfraVendorID', metaInfraVendorID); - } -} diff --git a/package.json b/package.json index 245bc44..ab43ce0 100644 --- a/package.json +++ b/package.json @@ -47,7 +47,6 @@ "ip-range-check": "0.0.2", "jquery": "^3.3.1", "ngx-cookie-service": "^1.0.10", - "node-cidr": "^1.0.0", "openssl": "^1.1.0", "primeng": "^5.2.4", "reflect-metadata": "^0.1.12",