import { Injectable } from '@angular/core'; import { Observable } from 'rxjs'; import { RPCService } from '@loafer/ng-rpc'; import { Domain } from '@overflow/commons-typescript/model/domain'; import { Probe } from '@overflow/commons-typescript/model/probe'; @Injectable() export class ProbeService { public constructor( private rpcService: RPCService, ) { } public readAllByDomain(domain: Domain): Observable { return this.rpcService.call('ProbeService.readAllByDomain', domain); } public read(id: number): Observable { return this.rpcService.call('ProbeService.read', id); } public modify(probe: Probe): Observable { return this.rpcService.call('ProbeService.modify', probe); } public remove(id: number): Observable { return this.rpcService.call('ProbeService.remove', id); } public modifyDisplayName(id: number, displayName: string): Observable { return this.rpcService.call('ProbeService.modifyDisplayName', id, displayName); } }