diff options
Diffstat (limited to 'vid-webpack-master/src/app/shared/server')
-rw-r--r-- | vid-webpack-master/src/app/shared/server/serviceInfo/serviceInfo.service.spec.ts | 4 | ||||
-rw-r--r-- | vid-webpack-master/src/app/shared/server/serviceInfo/serviceInfo.service.ts | 10 |
2 files changed, 10 insertions, 4 deletions
diff --git a/vid-webpack-master/src/app/shared/server/serviceInfo/serviceInfo.service.spec.ts b/vid-webpack-master/src/app/shared/server/serviceInfo/serviceInfo.service.spec.ts index 0234ea514..23d42c972 100644 --- a/vid-webpack-master/src/app/shared/server/serviceInfo/serviceInfo.service.spec.ts +++ b/vid-webpack-master/src/app/shared/server/serviceInfo/serviceInfo.service.spec.ts @@ -50,8 +50,8 @@ describe('Service Info Service', () => { test('should call with serviceModelId', ()=>{ let job: ServiceInfoModel = new ServiceInfoModel(); - service.getServicesJobInfo(true, "123").subscribe(); - const req = httpMock.expectOne(`${Constants.Path.SERVICES_JOB_INFO_PATH}?${Constants.Path.SERVICE_MODEL_ID}=123`); + service.getTemplatesInfo(true, "123").subscribe(); + const req = httpMock.expectOne(`${Constants.Path.INSTANTIATION_TEMPLATES_PATH}?${Constants.Path.SERVICE_MODEL_ID}=123`); expect(req.request.method).toBe('GET'); }); }); diff --git a/vid-webpack-master/src/app/shared/server/serviceInfo/serviceInfo.service.ts b/vid-webpack-master/src/app/shared/server/serviceInfo/serviceInfo.service.ts index 388afdba0..9c4712dc6 100644 --- a/vid-webpack-master/src/app/shared/server/serviceInfo/serviceInfo.service.ts +++ b/vid-webpack-master/src/app/shared/server/serviceInfo/serviceInfo.service.ts @@ -12,10 +12,16 @@ export class ServiceInfoService { constructor(private _http: HttpClient) { } - getServicesJobInfo(showSpinner: boolean = true, serviceModelId: string = null): Observable<ServiceInfoModel[]> { + getServicesJobInfo(showSpinner: boolean = true): Observable<ServiceInfoModel[]> { let pathQuery = Constants.Path.SERVICES_JOB_INFO_PATH; let headers = new HttpHeaders({'x-show-spinner': showSpinner.toString()}); - let params = serviceModelId ? {serviceModelId} : {}; + return this._http.get<ServiceInfoModel[]>(pathQuery, { headers: headers}); + } + + getTemplatesInfo(showSpinner: boolean = true, serviceModelId: string): Observable<ServiceInfoModel[]> { + let pathQuery = Constants.Path.INSTANTIATION_TEMPLATES_PATH; + let headers = new HttpHeaders({'x-show-spinner': showSpinner.toString()}); + let params = {serviceModelId}; return this._http.get<ServiceInfoModel[]>(pathQuery, { headers: headers, params }); } |