summaryrefslogtreecommitdiffstats
path: root/usecaseui-portal/src/app/core/services
diff options
context:
space:
mode:
authorcyuamber <xuranyjy@chinamobile.com>2019-09-12 16:45:16 +0800
committercyuamber <xuranyjy@chinamobile.com>2019-09-12 16:45:22 +0800
commiteb2d8b5118d13398eb57ef10d68b6ec595bc1989 (patch)
tree74ae9efbdfc860f7fef653682e3e0705a72d67ec /usecaseui-portal/src/app/core/services
parent8fc83809ff5d970b7ecda3e24e4038faa03d950b (diff)
feat:optimize topo api & mock json for network service page
Change-Id: Icb5cbb83407c1fa8054dea197fd52292747bd821 Issue-ID: USECASEUI-307 Signed-off-by: cyuamber <xuranyjy@chinamobile.com>
Diffstat (limited to 'usecaseui-portal/src/app/core/services')
-rw-r--r--usecaseui-portal/src/app/core/services/networkHttpservice.service.ts42
1 files changed, 19 insertions, 23 deletions
diff --git a/usecaseui-portal/src/app/core/services/networkHttpservice.service.ts b/usecaseui-portal/src/app/core/services/networkHttpservice.service.ts
index a3131bb3..2b1c38d1 100644
--- a/usecaseui-portal/src/app/core/services/networkHttpservice.service.ts
+++ b/usecaseui-portal/src/app/core/services/networkHttpservice.service.ts
@@ -23,25 +23,24 @@ export class networkHttpservice {
constructor(private http: HttpClient) { }
- baseUrl = baseUrl.baseUrl + "/uui-sotn/";//Online environment
+ baseUrl = baseUrl.baseUrl;//Online environment
url = {
// The following APIs are optimizable
- "getNetworkD3Data": this.baseUrl + "getNetWorkResources",
- "getLogicalLinksData": this.baseUrl + "getLogicalLinks",
- "deleteCloud": this.baseUrl + "deleteExtNetWork",
+ "getNetworkD3Data": "/uui-sotn/getNetWorkResources",
+ "getLogicalLinksData": "/uui-sotn/getLogicalLinks",
+ "deleteCloud": "/uui-sotn/deleteExtNetWork",
// The following APIs are not optimizable
- "getPInterfacesData1": this.baseUrl + "getPinterfaceByPnfName/",
- "getPInterfacesData2": this.baseUrl + "getPinterfaceByPnfName/",
- "createLink": this.baseUrl + "createLink/",
- "querySpecificLinkInfo": this.baseUrl + "getSpecificLogicalLink/",
- "queryCloudUrl": this.baseUrl + "getHostUrl/",
- "queryExtAAIIdVersion": this.baseUrl + "getExtAaiId/",
- "createNetwrok": this.baseUrl + "createTopoNetwork/",
- "createPnf": this.baseUrl + "createPnf/",
- "createTp": this.baseUrl + "pnf/",
- "createCloudLink": this.baseUrl + "createLink/",
- "createCloudUrl": this.baseUrl + "createHostUrl/",
- "deleteLink": this.baseUrl + "deleteLink/",
+ "getPInterfacesData": "/uui-sotn/getPinterfaceByPnfName/",
+ "createLink": "/uui-sotn/createLink/",
+ "querySpecificLinkInfo": "/uui-sotn/getSpecificLogicalLink/",
+ "queryCloudUrl": "/uui-sotn/getHostUrl/",
+ "queryExtAAIIdVersion": "/uui-sotn/getExtAaiId/",
+ "createNetwrok": "/uui-sotn/createTopoNetwork/",
+ "createPnf": "/uui-sotn/createPnf/",
+ "createTp": "/uui-sotn/pnf/",
+ "createCloudLink": "/uui-sotn/createLink/",
+ "createCloudUrl": "/uui-sotn/createHostUrl/",
+ "deleteLink": "/uui-sotn/deleteLink/",
};
@@ -55,17 +54,14 @@ export class networkHttpservice {
return this.http.get<any>(this.url["getLogicalLinksData"]);
}
deleteCloudLink(paramsObj) {
- let str = "?extNetworkId=" + paramsObj["aaiId"] + "&resourceVersion=" + paramsObj["version"];
- return this.http.delete<any>((this.url["deleteCloud"] + str));
+ let params = new HttpParams({ fromObject: paramsObj });
+ return this.http.delete<any>(this.url["deleteCloud"],{params});
}
//The following APIs function are not optimizable------------------------
//Query the tp data corresponding to the specified node
- getPInterfacesData1(paramsObj) {
- return this.http.get<any>(this.url['getPInterfacesData1'] + paramsObj["pnfName"]);
- }
- getPInterfacesData2(paramsObj) {
- return this.http.get<any>(this.url["getPInterfacesData2"] + paramsObj["pnfName"]);
+ getPInterfacesData(paramsObj) {
+ return this.http.get<any>(this.url['getPInterfacesData'] + paramsObj["pnfName"]);
}
//Create a connection interface
createLink(paramsObj) {