summaryrefslogtreecommitdiffstats
path: root/usecaseui-portal/src
diff options
context:
space:
mode:
Diffstat (limited to 'usecaseui-portal/src')
-rw-r--r--usecaseui-portal/src/app/core/services/networkHttpservice.service.ts35
-rw-r--r--usecaseui-portal/src/app/views/ccvpn-detail/ccvpn-detail.component.ts32
2 files changed, 19 insertions, 48 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));
- }
}
diff --git a/usecaseui-portal/src/app/views/ccvpn-detail/ccvpn-detail.component.ts b/usecaseui-portal/src/app/views/ccvpn-detail/ccvpn-detail.component.ts
index 109c143b..8e4d6f1d 100644
--- a/usecaseui-portal/src/app/views/ccvpn-detail/ccvpn-detail.component.ts
+++ b/usecaseui-portal/src/app/views/ccvpn-detail/ccvpn-detail.component.ts
@@ -85,14 +85,12 @@ export class CcvpnDetailComponent implements OnInit {
}
//tabBarStyle
dataInit() {
- console.log(this.detailParams);
// this.input_parameters = JSON.stringify(this.detailParams['input-parameters'])
if (this.detailParams['input-parameters']) {
this.input_parameters = JSON.parse(this.detailParams['input-parameters']);
} else {
return false;
}
- console.log(this.input_parameters);
this.templateParameters.service = {
name: this.input_parameters.service.name,
description: this.input_parameters.service.description,
@@ -157,9 +155,6 @@ export class CcvpnDetailComponent implements OnInit {
}
});
- console.log(this.templateParameters.site);
- console.log(this.siteTableData);
-
this.showTemParametersSotnVpn();
this.showTemParametersSite();
@@ -269,7 +264,6 @@ export class CcvpnDetailComponent implements OnInit {
showSiteDetail(num) {
this.siteDetail = true;
this.isEditSite = num;
- console.log(this.siteTableData[num - 1]);
Object.keys(this.siteBaseData).forEach((item) => {
this.siteBaseData[item] = this.siteTableData[num - 1][item];
});
@@ -523,7 +517,6 @@ export class CcvpnDetailComponent implements OnInit {
this.siteWanData[addNum] = inputsData;
this.tabInputShowWanPort[addNum] = true;
this.siteWanData = [...this.siteWanData]; //Table refresh
- console.log(this.siteWanData)
}
editUpdateWanPort(num, item, siteWanData) {
@@ -541,10 +534,10 @@ export class CcvpnDetailComponent implements OnInit {
this.siteWanData = this.siteWanData.filter((d, i) => i !== num - 1);
}
- // site节点图形描绘
- // site分类,根据site查tp pnf --> allotted-resource
- localSite = [];//本地site
- outerSite = [];//外部site
+ // site node graphic depiction
+ // site sort,Check tp add pnf according to site --> allotted-resource
+ localSite = [];//local site
+ outerSite = [];//outer site
getSiteAResource() {
return new Promise((res, rej) => {
@@ -605,7 +598,6 @@ export class CcvpnDetailComponent implements OnInit {
return item3["relationship-key"] == "vpn-binding.vpn-id"
})["relationship-value"]
});
- console.log(vpns);
this.detailParams.vpns = vpns.map((item) => {
return { name: item }
});
@@ -642,8 +634,6 @@ export class CcvpnDetailComponent implements OnInit {
vpn.sitetpname = this.localSite.find((site) => {
return tpnames.includes(site.tpsitename)
}).tpsitename;
- console.log(tpnames);
- console.log(vpn.sitetpname);
vpn.othertpname = tpnames.find((name) => {
return name != vpn.sitetpname
});
@@ -653,12 +643,9 @@ export class CcvpnDetailComponent implements OnInit {
return name != vpn.sitetpname
});
}
-
this.vpns = this.detailParams.vpns;
- console.log(this.vpns)
res(this.detailParams.vpns)
- })
- console.log(this.detailParams.vpns)
+ });
})
})
})
@@ -680,7 +667,7 @@ export class CcvpnDetailComponent implements OnInit {
if (this.localSite.length == 2) {
let line = {
"x1": "30%", "y1": "55%", "x2": "42%", "y2": "55%"//tp2--tp3
- }
+ };
this.detailLines.push(line);
}
// when cloud site have 2
@@ -691,13 +678,9 @@ export class CcvpnDetailComponent implements OnInit {
this.detailLines.push(line);
}
}
- })
+ });
let allnodes = [this.getSiteAResource(), this.getSotnAresource()];
Promise.all(allnodes).then((data) => {
- console.log(data);
- console.log(this.localSite);
-
-
})
}
@@ -799,7 +782,6 @@ export class CcvpnDetailComponent implements OnInit {
servicebody.service.parameters.requestInputs[item] = [].concat(this.sotnVpnTableData);
}
});
- console.log(servicebody);
this.closeUpdate.emit(servicebody);
}