member_webapp/@overflow/infra/service/infra.service.ts

35 lines
1.1 KiB
TypeScript
Raw Normal View History

2018-04-06 11:02:18 +00:00
import { Injectable } from '@angular/core';
2018-06-04 08:25:29 +00:00
import { Observable } from 'rxjs';
2018-04-06 11:02:18 +00:00
2018-05-24 06:44:13 +00:00
import { RPCService } from '@loafer/ng-rpc';
2018-04-06 11:02:18 +00:00
2018-05-02 08:09:39 +00:00
import { Infra } from '@overflow/commons-typescript/model/infra';
import { Domain } from '@overflow/commons-typescript/model/domain';
2018-06-07 07:28:27 +00:00
import { Page, PageParams } from '@overflow/commons-typescript/core/model';
2018-04-06 11:02:18 +00:00
@Injectable()
export class InfraService {
public constructor(
private rpcService: RPCService,
) {
}
2018-05-24 06:44:13 +00:00
// public readAllByDomain(domain: Domain, pageParams: PageParams): Observable<Page> {
// return this.rpcService.call('InfraService.readAllByDomain', domain, pageParams);
// }
2018-04-06 11:02:18 +00:00
2018-06-07 06:07:45 +00:00
public readAllByProbeID(probeID: number, pageParams: PageParams): Observable<Page<Infra>> {
return this.rpcService.call<Page<Infra>>('InfraService.readAllByProbeID', probeID, pageParams);
}
2018-04-19 10:26:39 +00:00
public read(id: string): Observable<Infra> {
2018-06-07 06:07:45 +00:00
return this.rpcService.call<Infra>('InfraService.read', id);
2018-04-19 10:26:39 +00:00
}
2018-06-12 05:45:21 +00:00
public readAllInfraZoneByProbeID(probeID: number): Observable<Infra[]> {
return this.rpcService.call<Infra[]>('InfraService.readAllInfraZoneByProbeID', probeID);
}
2018-04-06 11:02:18 +00:00
}