import { Injectable } from '@angular/core'; import { RPCService } from '@loafer/ng-rpc'; import { Observable } from 'rxjs'; import { Target } from '@overflow/commons-typescript/model/target'; import { Page, PageParams } from '@overflow/commons-typescript/core/model'; @Injectable() export class TargetService { public constructor( private rpcService: RPCService, ) { } public regist(target: Target, probeID: number): Observable { return this.rpcService.call('TargetService.regist', target, probeID); } public registAll(infraIDs: number[], probeID: number): Observable { return this.rpcService.call('TargetService.registAll', infraIDs, probeID); } public remove(id: number, probeID: number) { return this.rpcService.call('TargetService.remove', id, probeID); } public read(id: number): Observable { return this.rpcService.call('TargetService.read', id); } public readAllByProbeID(probeID: number): Observable { return this.rpcService.call('TargetService.readAllByProbeID', probeID); } public readAllTargetByProbeID(probeID: number): Observable { return this.rpcService.call('TargetService.readAllTargetByProbeID', probeID); } }