member_webapp/@overflow/probe/service/probe.service.ts
crusader 561d2b7180 ing
2018-06-14 13:38:51 +09:00

37 lines
905 B
TypeScript

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 readAllByDomainID(domainID: number): Observable<Probe[]> {
return this.rpcService.call<Probe[]>('ProbeService.readAllByDomainID', domainID);
}
public read(id: number): Observable<Probe> {
return this.rpcService.call<Probe>('ProbeService.read', id);
}
public modify(probe: Probe): Observable<Probe> {
return this.rpcService.call<Probe>('ProbeService.modify', probe);
}
public remove(id: number): Observable<boolean> {
return this.rpcService.call<boolean>('ProbeService.remove', id);
}
}