diff options
Diffstat (limited to 'usecaseui-portal/src/app/myhttp.service.ts')
-rw-r--r-- | usecaseui-portal/src/app/myhttp.service.ts | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/usecaseui-portal/src/app/myhttp.service.ts b/usecaseui-portal/src/app/myhttp.service.ts index 778b739c..d85076fa 100644 --- a/usecaseui-portal/src/app/myhttp.service.ts +++ b/usecaseui-portal/src/app/myhttp.service.ts @@ -16,7 +16,7 @@ import { Injectable } from '@angular/core'; import { HttpClient, HttpHeaders, HttpParams, HttpResponse } from '@angular/common/http'; import { Observable } from 'rxjs/Observable'; -import { homeData, homeVmLineData, servicesSelectData, servicesTableData, creatensData, onboardTableData, onboardDataVNF, onboardDataPNF , baseUrl} from './dataInterface'; +import { homeData, homeVmLineData, servicesSelectData, servicesTableData, creatensData, onboardTableData, onboardDataVNF, onboardDataPNF, baseUrl } from './core/models/dataInterface'; @Injectable() export class MyhttpService { @@ -24,7 +24,7 @@ export class MyhttpService { constructor(private http: HttpClient) { } baseUrl = baseUrl.baseUrl; url = { - listSortMasters:this.baseUrl+"/listSortMasters", + listSortMasters: this.baseUrl + "/listSortMasters", customers: this.baseUrl + "/uui-lcm/customers", orchestrators: this.baseUrl + "/uui-lcm/orchestrators", serviceType: this.baseUrl + "/uui-lcm/customers/" + "*_*" + "/service-subscriptions", @@ -47,7 +47,7 @@ export class MyhttpService { nsProgress: this.baseUrl + "/uui-lcm/jobs/getNsLcmJobStatus/" + "*_*" + "?responseId=0&serviceInstanceId=", e2eScale: this.baseUrl + "/services/scaleServices/", e2e_nsdata: this.baseUrl + "/getServiceInstanceById/customerId/", - updateccvpn:this.baseUrl + "/uui-lcm/services/updateService/", + updateccvpn: this.baseUrl + "/uui-lcm/services/updateService/", //The following api is about ccvpn details topology allottedResource: this.baseUrl + "/uui-sotn/getAllottedResources", @@ -100,17 +100,17 @@ export class MyhttpService { inputs: "" }; return this.http.post<any>(this.url.nstemplateParameters, body); - }else if(type == "e2e"){ - let url = this.url.e2etemplateParameters.replace("*_*", template.uuid) + template.toscaModelURL; - return this.http.get<any>(url); - }else { - let body = { - csarId: template.uuid, - packageType: "Service", - inputs: "" - }; - let url = this.url.templateParameters.replace("*_*", template.uuid); - return this.http.post<any>(url, body); + } else if (type == "e2e") { + let url = this.url.e2etemplateParameters.replace("*_*", template.uuid) + template.toscaModelURL; + return this.http.get<any>(url); + } else { + let body = { + csarId: template.uuid, + packageType: "Service", + inputs: "" + }; + let url = this.url.templateParameters.replace("*_*", template.uuid); + return this.http.post<any>(url, body); } } @@ -135,8 +135,8 @@ export class MyhttpService { return this.http.post<any>(this.url.ns_createService2 + params, requestBody); } - updateccvpn(id,requestBody){ - return this.http.put<any>(this.url.updateccvpn + id,requestBody);// online + updateccvpn(id, requestBody) { + return this.http.put<any>(this.url.updateccvpn + id, requestBody);// online } // Delete interface deleteInstance(obj) { @@ -178,11 +178,11 @@ export class MyhttpService { // Query progress interface getProgress(obj) { - let url = this.url.progress.replace("*_*", obj.serviceId) + obj.operationId + "?operationType="+obj.operationType; + let url = this.url.progress.replace("*_*", obj.serviceId) + obj.operationId + "?operationType=" + obj.operationType; return this.http.get<any>(url); } - getNsProgress(jobid,serviceId,operationType){ - let url = this.url.nsProgress.replace("*_*",jobid) + serviceId + "&operationType="+operationType; + getNsProgress(jobid, serviceId, operationType) { + let url = this.url.nsProgress.replace("*_*", jobid) + serviceId + "&operationType=" + operationType; return this.http.get<any>(url); } |