member_webapp/@overflow/probe/service/probe-host.service.ts
crusader cd1e53f67a ing
2018-06-04 17:25:29 +09:00

31 lines
875 B
TypeScript

import { Injectable } from '@angular/core';
import { Observable } from 'rxjs';
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);
}
}