crusader 3293add02f ing
2018-03-11 20:54:56 +09:00

30 lines
723 B
TypeScript

import { Injectable } from '@angular/core';
import { Observable } from 'rxjs/Observable';
import 'rxjs/add/operator/map';
import { RPCClient } from 'packages/core/rpc/client/RPCClient';
import { Infra } from '../model';
import { Page } from '../../../app/commons/model';
import { Domain } from '../../domain/model';
import { Probe } from '../../probe/model';
@Injectable()
export class InfraService {
public constructor(
private rpcClient: RPCClient,
) {
}
public readByDomain(domain: Domain): Observable<Page> {
return this.rpcClient.call<Page>('InfraService.', domain);
}
public readByProbe(probe: Probe): Observable<Page> {
return this.rpcClient.call<Page>('InfraService.', probe);
}
}