summaryrefslogtreecommitdiffstats
path: root/vid-webpack-master/src/app
diff options
context:
space:
mode:
authorYoav Schneiderman <yoav.schneiderman@intl.att.com>2019-12-18 21:04:38 +0200
committerEinat Vinouze <einat.vinouze@intl.att.com>2019-12-24 11:46:22 +0200
commit89de17b50dcd1d29fb87acfe518d1ddf43c1408a (patch)
treea6ae4d0c697c9e016bb86733d9df6eebe6a0ee88 /vid-webpack-master/src/app
parent8fd9bd94ca80daf31a8fc83893503120d9405a2f (diff)
move templates API to a intended controller
Issue-ID: VID-730 Change-Id: Id2aa44803a190333b5a96fda77ca15d254b4c222 Signed-off-by: Einat Vinouze <einat.vinouze@intl.att.com>
Diffstat (limited to 'vid-webpack-master/src/app')
-rw-r--r--vid-webpack-master/src/app/shared/components/genericFormPopup/instantiationTemplatesModal/instantiation.templates.modal.component.ts2
-rw-r--r--vid-webpack-master/src/app/shared/server/serviceInfo/serviceInfo.service.spec.ts4
-rw-r--r--vid-webpack-master/src/app/shared/server/serviceInfo/serviceInfo.service.ts10
-rw-r--r--vid-webpack-master/src/app/shared/utils/constants.ts1
4 files changed, 12 insertions, 5 deletions
diff --git a/vid-webpack-master/src/app/shared/components/genericFormPopup/instantiationTemplatesModal/instantiation.templates.modal.component.ts b/vid-webpack-master/src/app/shared/components/genericFormPopup/instantiationTemplatesModal/instantiation.templates.modal.component.ts
index b37d7f9a2..6a734161f 100644
--- a/vid-webpack-master/src/app/shared/components/genericFormPopup/instantiationTemplatesModal/instantiation.templates.modal.component.ts
+++ b/vid-webpack-master/src/app/shared/components/genericFormPopup/instantiationTemplatesModal/instantiation.templates.modal.component.ts
@@ -45,7 +45,7 @@ export class InstantiationTemplatesModalComponent extends DialogComponent<string
.queryParams
.subscribe(params => {
- const getServiceJobInfoRoute = this._serviceInfoService.getServicesJobInfo(true, params['serviceModelId']);
+ const getServiceJobInfoRoute = this._serviceInfoService.getTemplatesInfo(true, params['serviceModelId']);
const getUserIdRoute = this._aaiService.getUserId();
forkJoin([getServiceJobInfoRoute, getUserIdRoute]).subscribe(([jobs]) => {
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 });
}
diff --git a/vid-webpack-master/src/app/shared/utils/constants.ts b/vid-webpack-master/src/app/shared/utils/constants.ts
index f09ab088d..da717c8f4 100644
--- a/vid-webpack-master/src/app/shared/utils/constants.ts
+++ b/vid-webpack-master/src/app/shared/utils/constants.ts
@@ -93,6 +93,7 @@ export module Constants {
public static WELCOME_PATH = 'welcome.htm';
public static IS_PERMITTED_SUB_PATH = '&isPermitted=';
public static SERVICES_JOB_INFO_PATH = '../../asyncInstantiation';
+ public static INSTANTIATION_TEMPLATES_PATH = '../../instantiationTemplates';
public static SERVICE_MODEL_ID = 'serviceModelId';
public static SERVICES_RETRY_TOPOLOGY = '../../asyncInstantiation/bulkForRetry';
public static INSTANTIATION_TEMPLATE_TOPOLOGY = '../../instantiationTemplates/templateTopology';