summaryrefslogtreecommitdiffstats
path: root/usecaseui-portal/src/app/core
diff options
context:
space:
mode:
authorcyuamber <xuranyjy@chinamobile.com>2019-08-27 14:29:25 +0800
committercyuamber <xuranyjy@chinamobile.com>2019-08-27 14:29:29 +0800
commitf3b5e83683b7e5f47454fc59cb2ebd4789f5524a (patch)
treec3f4a36f852c7caaadf34edc41a9afd7c547ce11 /usecaseui-portal/src/app/core
parent6568f3f41d962e02f5ce21f8314657cb777ef4ef (diff)
feat:optimize network topo page api
Change-Id: Icd8de2b05d8a9a9ab826bf3c8cfcbc71da272af6 Issue-ID: USECASEUI-307 Signed-off-by: cyuamber <xuranyjy@chinamobile.com>
Diffstat (limited to 'usecaseui-portal/src/app/core')
-rw-r--r--usecaseui-portal/src/app/core/services/networkHttpservice.service.ts35
1 files changed, 12 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 8af6d292..a3131bb3 100644
--- a/usecaseui-portal/src/app/core/services/networkHttpservice.service.ts
+++ b/usecaseui-portal/src/app/core/services/networkHttpservice.service.ts
@@ -23,28 +23,13 @@ export class networkHttpservice {
constructor(private http: HttpClient) { }
- // baseUrl = "./assets/json/";//Local environment
- // url={
- // "getNetworkD3Data":this.baseUrl + "netWorkD3Data.json",
- // "getLogicalLinksData":this.baseUrl + "LogicalLinksData.json",
- // "getPInterfacesData1":this.baseUrl + "netWorkD3Data.json",
- // "getPInterfacesData2":this.baseUrl + "p_interfaces1.json",
- // "createLink":this.baseUrl + "status.json",
- // "querySpecificLinkInfo":this.baseUrl + "specific_link _nfo.json",
- // "queryCloudUrl":this.baseUrl + "url.json",
- // "createNetwrok":this.baseUrl + "status.json",
- // "createPnf":this.baseUrl + "status.json",
- // "createTp":this.baseUrl + "status.json",
- // "createCloudLink":this.baseUrl + "status.json",
- // "createCloudUrl":this.baseUrl + "status.json",
- // "deleteLink":this.baseUrl + "status.json",
- // };
- // baseUrl = "http://10.73.242.244:8082/uui-sotn/";//Online environment
- // baseUrl = "http://172.19.44.223/api/usecaseui-server/v1/uui-sotn/";//Online environment
baseUrl = baseUrl.baseUrl + "/uui-sotn/";//Online environment
url = {
+ // The following APIs are optimizable
"getNetworkD3Data": this.baseUrl + "getNetWorkResources",
"getLogicalLinksData": this.baseUrl + "getLogicalLinks",
+ "deleteCloud": this.baseUrl + "deleteExtNetWork",
+ // The following APIs are not optimizable
"getPInterfacesData1": this.baseUrl + "getPinterfaceByPnfName/",
"getPInterfacesData2": this.baseUrl + "getPinterfaceByPnfName/",
"createLink": this.baseUrl + "createLink/",
@@ -57,8 +42,10 @@ export class networkHttpservice {
"createCloudLink": this.baseUrl + "createLink/",
"createCloudUrl": this.baseUrl + "createHostUrl/",
"deleteLink": this.baseUrl + "deleteLink/",
- "deleteCloud": this.baseUrl + "deleteExtNetWork"
+
};
+
+ //The following APIs function are optimizable------------------------
//d3data
getNetworkD3Data() {
return this.http.get<any>(this.url["getNetworkD3Data"]);
@@ -67,6 +54,12 @@ export class networkHttpservice {
getLogicalLinksData() {
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));
+ }
+
+ //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"]);
@@ -115,8 +108,4 @@ export class networkHttpservice {
let str = paramsObj["logical-link"] + "/" + paramsObj["resource-version"];
return this.http.delete<any>((this.url["deleteLink"] + str));
}
- deleteCloudLink(paramsObj) {
- let str = "?extNetworkId=" + paramsObj["aaiId"] + "&resourceVersion=" + paramsObj["version"];
- return this.http.delete<any>((this.url["deleteCloud"] + str));
- }
}