metaservices

This commit is contained in:
insanity 2018-06-12 16:24:16 +09:00
parent d8cb5f4d41
commit 7e682274d4
26 changed files with 327 additions and 49 deletions

View File

@ -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,
];

View File

@ -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()

View File

@ -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<MetaCrawlerMapping[]> {
return this.rpcService.call<MetaCrawlerMapping[]>('CentralMetaCrawlerMappingService.readAll');
}
}

View File

@ -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';

View File

@ -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<MetaCryptoType> {
return this.rpcService.call<MetaCryptoType>('MetaCryptoTypeService.readByKey', key);
}
public readAll(): Observable<MetaCryptoType[]> {
return this.rpcService.call<MetaCryptoType[]>('MetaCryptoTypeService.readAll');
}
}

View File

@ -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<MetaEmailType> {
return this.rpcService.call<MetaEmailType>('MetaEmailTypeService.readByKey', key);
}
public readAll(): Observable<MetaEmailType[]> {
return this.rpcService.call<MetaEmailType[]>('MetaEmailTypeService.readAll');
}
}

View File

@ -12,7 +12,11 @@ export class MetaHistoryTypeService {
}
public readByKey(key: string): Observable<MetaHistoryType> {
return this.rpcService.call<MetaHistoryType>('MetaHistoryTypeService.readByKey', key);
}
public readAll(): Observable<MetaHistoryType[]> {
return this.rpcService.call('MetaHistoryTypeService.readAll');
return this.rpcService.call<MetaHistoryType[]>('MetaHistoryTypeService.readAll');
}
}

View File

@ -12,7 +12,11 @@ export class MetaInfraTypeService {
}
public readByKey(key: string): Observable<MetaInfraType> {
return this.rpcService.call<MetaInfraType>('MetaInfraTypeService.readByKey', key);
}
public readAll(): Observable<MetaInfraType[]> {
return this.rpcService.call('MetaInfraTypeService.readAll');
return this.rpcService.call<MetaInfraType[]>('MetaInfraTypeService.readAll');
}
}

View File

@ -12,7 +12,11 @@ export class MetaInputTypeService {
}
public readByKey(key: string): Observable<MetaInputType> {
return this.rpcService.call<MetaInputType>('MetaInputTypeService.readByKey', key);
}
public readAll(): Observable<MetaInputType[]> {
return this.rpcService.call('MetaInputTypeService.readAll');
return this.rpcService.call<MetaInputType[]>('MetaInputTypeService.readAll');
}
}

View File

@ -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<MetaIPType> {
return this.rpcService.call<MetaIPType>('MetaIPTypeService.readByKey', key);
}
public readAll(): Observable<MetaIPType[]> {
return this.rpcService.call<MetaIPType[]>('MetaIPTypeService.readAll');
}
}

View File

@ -12,7 +12,11 @@ export class MetaMemberStatusService {
}
public readByKey(key: string): Observable<MetaMemberStatus> {
return this.rpcService.call<MetaMemberStatus>('MetaMemberStatusService.readByKey', key);
}
public readAll(): Observable<MetaMemberStatus[]> {
return this.rpcService.call('MetaMemberStatusService.readAll');
return this.rpcService.call<MetaMemberStatus[]>('MetaMemberStatusService.readAll');
}
}

View File

@ -12,7 +12,11 @@ export class MetaNoAuthProbeStatusService {
}
public readByKey(key: string): Observable<MetaNoAuthProbeStatus> {
return this.rpcService.call<MetaNoAuthProbeStatus>('MetaNoAuthProbeStatusService.readByKey', key);
}
public readAll(): Observable<MetaNoAuthProbeStatus[]> {
return this.rpcService.call('MetaNoAuthProbeStatusService.readAll');
return this.rpcService.call<MetaNoAuthProbeStatus[]>('MetaNoAuthProbeStatusService.readAll');
}
}

View File

@ -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<MetaPortType> {
return this.rpcService.call<MetaPortType>('MetaPortTypeService.readByKey', key);
}
public readAll(): Observable<MetaPortType[]> {
return this.rpcService.call<MetaPortType[]>('MetaPortTypeService.readAll');
}
}

View File

@ -12,7 +12,11 @@ export class MetaProbeStatusService {
}
public readByKey(key: string): Observable<MetaProbeStatus> {
return this.rpcService.call<MetaProbeStatus>('MetaProbeStatusService.readByKey', key);
}
public readAll(): Observable<MetaProbeStatus[]> {
return this.rpcService.call('MetaProbeStatusService.readAll');
return this.rpcService.call<MetaProbeStatus[]>('MetaProbeStatusService.readAll');
}
}

View File

@ -17,6 +17,10 @@ export class MetaSensorDisplayItemService {
}
public read(id: number): Observable<MetaSensorDisplayItem> {
return this.rpcService.call('MetaSensorDisplayItemService.read', id);
}
public readAllByCrawlerID(metaCrawlerID: number): Observable<MetaSensorDisplayItem[]> {
return this.rpcService.call('MetaSensorDisplayItemService.readAllByCrawler', metaCrawlerID);
}

View File

@ -12,7 +12,11 @@ export class MetaSensorItemTypeService {
}
public readByKey(key: string): Observable<MetaSensorItemType> {
return this.rpcService.call<MetaSensorItemType>('MetaSensorItemTypeService.readByKey', key);
}
public readAll(): Observable<MetaSensorItemType[]> {
return this.rpcService.call('MetaSensorItemTypeService.readAll');
return this.rpcService.call<MetaSensorItemType[]>('MetaSensorItemTypeService.readAll');
}
}

View File

@ -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<MetaTargetHostType> {
return this.rpcService.call<MetaTargetHostType>('MetaTargetHostTypeService.readByKey', key);
}
public readAll(): Observable<MetaTargetHostType[]> {
return this.rpcService.call<MetaTargetHostType[]>('MetaTargetHostTypeService.readAll');
}
}

View File

@ -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<MetaTargetServiceType> {
return this.rpcService.call<MetaTargetServiceType>('MetaTargetServiceTypeService.readByKey', key);
}
public readAll(): Observable<MetaTargetServiceType[]> {
return this.rpcService.call<MetaTargetServiceType[]>('MetaTargetServiceTypeService.readAll');
}
}

View File

@ -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<MetaTargetStatus> {
return this.rpcService.call<MetaTargetStatus>('MetaTargetStatusService.readByKey', key);
}
public readAll(): Observable<MetaTargetStatus[]> {
return this.rpcService.call<MetaTargetStatus[]>('MetaTargetStatusService.readAll');
}
}

View File

@ -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<MetaTargetTypeCategoryMapping[]> {
return this.rpcService.call<MetaTargetTypeCategoryMapping[]>('MetaTargetTypeCategoryMappingService.readAll');
}
}

View File

@ -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<MetaTargetTypeCategory> {
return this.rpcService.call<MetaTargetTypeCategory>('MetaTargetTypeCategoryService.readByKey', key);
}
public readAll(): Observable<MetaTargetTypeCategory[]> {
return this.rpcService.call<MetaTargetTypeCategory[]>('MetaTargetTypeCategoryService.readAll');
}
}

View File

@ -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<MetaTargetType> {
return this.rpcService.call<MetaTargetType>('MetaTargetTypeService.readByKey', key);
}
public readAll(): Observable<MetaTargetType[]> {
return this.rpcService.call<MetaTargetType[]>('MetaTargetTypeService.readAll');
}
}

View File

@ -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<MetaTargetZoneType> {
return this.rpcService.call<MetaTargetZoneType>('MetaTargetZoneTypeService.readByKey', key);
}
public readAll(): Observable<MetaTargetZoneType[]> {
return this.rpcService.call<MetaTargetZoneType[]>('MetaTargetZoneTypeService.readAll');
}
}

View File

@ -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<MetaVendorCrawlerSensorItem[]> {
return this.rpcService.call('MetaVendorCrawlerSensorItemService.readAll');
}
}

View File

@ -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<MetaVendorCrawler[]> {
return this.rpcService.call('MetaVendorCrawlerService.readAllByMetaInfraVendorID', metaInfraVendorID);
}
}

View File

@ -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",