member_webapp/@overflow/probe/service/probe-host.service.ts
2018-05-24 19:50:43 +09:00

31 lines
886 B
TypeScript

import { Injectable } from '@angular/core';
import { Observable } from 'rxjs/Observable';
import 'rxjs/add/operator/map';
import { RPCService } from '@loafer/ng-rpc';
import { Probe, ProbeHost } from '@overflow/commons-typescript/model/probe';
import { Domain } from '@overflow/commons-typescript/model/domain';
@Injectable()
export class ProbeHostService {
public constructor(
private rpcService: RPCService,
) {
}
public readByProbeID(probeID: number): Observable<Probe> {
return this.rpcService.call<ProbeHost>('ProbeHostService.readByProbeID', probeID);
}
public readAllByDomainID(domainID: number): Observable<ProbeHost[]> {
return this.rpcService.call<ProbeHost[]>('ProbeHostService.readAllByDomainID', domainID);
}
public read(id: number): Observable<ProbeHost> {
return this.rpcService.call<ProbeHost>('ProbeHostService.read', id);
}
}