ing
This commit is contained in:
15
@overflow/infra/service/infra-host.service.spec.ts
Normal file
15
@overflow/infra/service/infra-host.service.spec.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
import { TestBed, inject } from '@angular/core/testing';
|
||||
|
||||
import { InfraHostService } from './infra-host.service';
|
||||
|
||||
describe('InfraHostService', () => {
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({
|
||||
providers: [InfraHostService]
|
||||
});
|
||||
});
|
||||
|
||||
it('should be created', inject([InfraHostService], (service: InfraHostService) => {
|
||||
expect(service).toBeTruthy();
|
||||
}));
|
||||
});
|
||||
28
@overflow/infra/service/infra-host.service.ts
Normal file
28
@overflow/infra/service/infra-host.service.ts
Normal file
@@ -0,0 +1,28 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Observable } from 'rxjs';
|
||||
|
||||
import { RPCService } from '@loafer/ng-rpc';
|
||||
|
||||
import { InfraHost } from '@overflow/commons-typescript/model/infra';
|
||||
|
||||
@Injectable()
|
||||
export class InfraHostService {
|
||||
|
||||
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: number): Observable<InfraHost> {
|
||||
return this.rpcService.call('InfraHostService.read', id);
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Observable } from 'rxjs/Observable';
|
||||
import { Observable } from 'rxjs';
|
||||
|
||||
import 'rxjs/add/operator/map';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user