From d0f5347dc16b5aa9fc95eb520fbc9a1c7b672b09 Mon Sep 17 00:00:00 2001 From: cyuamber Date: Thu, 22 Aug 2019 16:55:57 +0800 Subject: feat: change the project structure and add mock data function Change-Id: I381845bff5eb37d1fab3eba8cf1ae7838df523b7 Issue-ID: USECASEUI-307 Signed-off-by: cyuamber --- usecaseui-portal/src/app/myhttp.service.ts | 38 +++++++++++++++--------------- 1 file changed, 19 insertions(+), 19 deletions(-) (limited to 'usecaseui-portal/src/app/myhttp.service.ts') 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(this.url.nstemplateParameters, body); - }else if(type == "e2e"){ - let url = this.url.e2etemplateParameters.replace("*_*", template.uuid) + template.toscaModelURL; - return this.http.get(url); - }else { - let body = { - csarId: template.uuid, - packageType: "Service", - inputs: "" - }; - let url = this.url.templateParameters.replace("*_*", template.uuid); - return this.http.post(url, body); + } else if (type == "e2e") { + let url = this.url.e2etemplateParameters.replace("*_*", template.uuid) + template.toscaModelURL; + return this.http.get(url); + } else { + let body = { + csarId: template.uuid, + packageType: "Service", + inputs: "" + }; + let url = this.url.templateParameters.replace("*_*", template.uuid); + return this.http.post(url, body); } } @@ -135,8 +135,8 @@ export class MyhttpService { return this.http.post(this.url.ns_createService2 + params, requestBody); } - updateccvpn(id,requestBody){ - return this.http.put(this.url.updateccvpn + id,requestBody);// online + updateccvpn(id, requestBody) { + return this.http.put(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(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(url); } -- cgit 1.2.3-korg