ing
This commit is contained in:
5
@overflow/infra/service/index.ts
Normal file
5
@overflow/infra/service/index.ts
Normal file
@@ -0,0 +1,5 @@
|
||||
import { InfraService } from './infra.service';
|
||||
|
||||
export const SERVICES = [
|
||||
InfraService,
|
||||
];
|
||||
15
@overflow/infra/service/infra.service.spec.ts
Normal file
15
@overflow/infra/service/infra.service.spec.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
import { TestBed, inject } from '@angular/core/testing';
|
||||
|
||||
import { InfraService } from './infra.service';
|
||||
|
||||
describe('InfraService', () => {
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({
|
||||
providers: [InfraService]
|
||||
});
|
||||
});
|
||||
|
||||
it('should be created', inject([InfraService], (service: InfraService) => {
|
||||
expect(service).toBeTruthy();
|
||||
}));
|
||||
});
|
||||
33
@overflow/infra/service/infra.service.ts
Normal file
33
@overflow/infra/service/infra.service.ts
Normal file
@@ -0,0 +1,33 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Observable } from 'rxjs/Observable';
|
||||
|
||||
import 'rxjs/add/operator/map';
|
||||
|
||||
import { RPCService } from '@loafer/ng-rpc';
|
||||
|
||||
import { Infra } from '@overflow/commons-typescript/model/infra';
|
||||
// import { Page, PageParams } from 'app/commons/model';
|
||||
import { Domain } from '@overflow/commons-typescript/model/domain';
|
||||
import { Probe } from '@overflow/commons-typescript/model/probe';
|
||||
|
||||
@Injectable()
|
||||
export class InfraService {
|
||||
|
||||
public constructor(
|
||||
private rpcService: RPCService,
|
||||
) {
|
||||
|
||||
}
|
||||
|
||||
// public readAllByDomain(domain: Domain, pageParams: PageParams): Observable<Page> {
|
||||
// return this.rpcService.call('InfraService.readAllByDomain', domain, pageParams);
|
||||
// }
|
||||
|
||||
// public readAllByProbe(probe: Probe, pageParams: PageParams): Observable<Page> {
|
||||
// return this.rpcService.call('InfraService.readAllByProbe', probe, pageParams);
|
||||
// }
|
||||
|
||||
public read(id: string): Observable<Infra> {
|
||||
return this.rpcService.call('InfraService.read', id);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user