From 0c1e82ccbfa6dcb8ee5d11220a93fefc61465374 Mon Sep 17 00:00:00 2001 From: cyuamber Date: Thu, 29 Aug 2019 18:43:08 +0800 Subject: feat: change the mock data path config file Change-Id: I5ca301d8ff0b084f64366312543c9036d8e76de8 Issue-ID: USECASEUI-307 Signed-off-by: cyuamber --- .../src/app/core/services/onboard.service.ts | 74 +++++++++++----------- 1 file changed, 37 insertions(+), 37 deletions(-) (limited to 'usecaseui-portal/src/app/core/services/onboard.service.ts') diff --git a/usecaseui-portal/src/app/core/services/onboard.service.ts b/usecaseui-portal/src/app/core/services/onboard.service.ts index c3959a29..ea312d34 100644 --- a/usecaseui-portal/src/app/core/services/onboard.service.ts +++ b/usecaseui-portal/src/app/core/services/onboard.service.ts @@ -20,58 +20,58 @@ import { baseUrl } from '../models/dataInterface'; @Injectable() export class onboardService { - constructor(private http: HttpClient) { } + constructor(private http: HttpClient) { } - baseUrl = baseUrl.baseUrl + "/uui-lcm/"; - url = { - //The following APIs are optimizable------------------------ - // list Data - onboardTableData: this.baseUrl + "ns-packages", - onboardDataVNF: this.baseUrl + "vnf-packages", - onboardDataPNF: this.baseUrl + "pnf-packages", - //ns sdc - sdc_nsListData: this.baseUrl + "sdc-ns-packages", // GET - // vnf sdc - sdc_vnfListData: this.baseUrl + "sdc-vf-packages", // GET - // onboard ns sdc data - onboardNs: this.baseUrl + "ns-packages", //POST - //onboard VNF sdc data - onboardVNF: this.baseUrl + "vf-packages", //POST - //Delete ns package - deleteNspack: this.baseUrl + "deleteNsdPackage?nsdInfoId=", - // Delete Vnf vfc package - deleteVnfPack: this.baseUrl + "deleteVnfPackage?vnfPkgId=", - // Delete Pnf package - deletePnfPack: this.baseUrl + "deletePnfPackage?pnfdInfoId=", - // The following APIs are not optimizable------------------- - // createnspackages - creatensData: this.baseUrl + "_jsonData", //POST - //Progress interface - progress: this.baseUrl + "jobs/" + "_jobId" + "?responseId=" - }; + baseUrl = baseUrl.baseUrl + "/uui-lcm/"; + url = { + //The following APIs are optimizable------------------------ + // list Data + onboardTableData: this.baseUrl + "ns-packages", + onboardDataVNF: this.baseUrl + "vnf-packages", + onboardDataPNF: this.baseUrl + "pnf-packages", + //ns sdc + sdc_nsListData: this.baseUrl + "sdc-ns-packages", // GET + // vnf sdc + sdc_vnfListData: this.baseUrl + "sdc-vf-packages", // GET + // onboard ns sdc data + onboardNs: this.baseUrl + "ns-packages", //POST + //onboard VNF sdc data + onboardVNF: this.baseUrl + "vf-packages", //POST + //Delete ns package + deleteNspack: this.baseUrl + "deleteNsdPackage?nsdInfoId=", + // Delete Vnf vfc package + deleteVnfPack: this.baseUrl + "deleteVnfPackage?vnfPkgId=", + // Delete Pnf package + deletePnfPack: this.baseUrl + "deletePnfPackage?pnfdInfoId=", + // The following APIs are not optimizable------------------- + // createnspackages + creatensData: this.baseUrl + "_jsonData", //POST + //Progress interface + progress: this.baseUrl + "jobs/" + "_jobId" + "?responseId=" + }; - //The following APIs function are optimizable------------------------ + //The following APIs function are optimizable------------------------ /* Query data list */ // NS Data getOnboardTableData() { - return this.http.get(this.url["onboardTableData"]); + return this.http.get(this.url["onboardTableData"]); } // NS SDC Data getSDC_NSTableData() { - return this.http.get(this.url["sdc_nsListData"]); + return this.http.get(this.url["sdc_nsListData"]); } // VNF Data getOnboardTableVnfData() { - return this.http.get(this.url.onboardDataVNF); + return this.http.get(this.url.onboardDataVNF); } // onboard VNF sdc Data getSDC_VNFTableData() { - return this.http.get(this.url["sdc_vnfListData"]); + return this.http.get(this.url["sdc_vnfListData"]); } // PNF Data getOnboardTablePnfData() { - return this.http.get(this.url.onboardDataPNF); + return this.http.get(this.url.onboardDataPNF); } //onboard sdc ns getNsonboard(requestBody) { @@ -98,12 +98,12 @@ export class onboardService { //create--Get the id after dragging the file before uploading getCreatensData(url_upId, requestBody) { - return this.http.post(this.url.creatensData.replace("_jsonData", url_upId), requestBody); + return this.http.post(this.url.creatensData.replace("_jsonData", url_upId), requestBody); } //onboard progress getProgress(jobid, responseId) { - let url = this.url.progress.replace("_jobId", jobid) + responseId; - return this.http.get(url); + let url = this.url.progress.replace("_jobId", jobid) + responseId; + return this.http.get(url); } } -- cgit 1.2.3-korg