member_webapp/@overflow/probe/service/probe-host.service.ts
crusader d59d9379f9 ing
2018-05-24 15:44:13 +09:00

27 lines
740 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 readByProbe(probe: Probe): Observable<Probe> {
return this.rpcService.call<ProbeHost>('ProbeHostService.readByProbe', probe);
}
public readAllByDomain(domain: Domain): Observable<ProbeHost[]> {
return this.rpcService.call<ProbeHost[]>('ProbeHostService.readAllByDomain', domain);
}
}