aboutsummaryrefslogtreecommitdiffstats
path: root/openo-portal/portal-lifecyclemgr/src/main/webapp
diff options
context:
space:
mode:
authorc00149107 <chenchuanyu@huawei.com>2016-11-03 11:47:02 +0800
committerc00149107 <chenchuanyu@huawei.com>2016-11-03 11:47:02 +0800
commit140ae02914dbe36648c0d4e4c85b670f558b66b5 (patch)
tree4b88113ddbcac146939170d3abd4580cd6dd18ca /openo-portal/portal-lifecyclemgr/src/main/webapp
parent69f32d3b977634792ecaea16ba32082722c5267e (diff)
fix issue:GSO-99
Change-Id: I3ee94b91b136a3f8c3733661d3dc8558f364d5d7 Signed-off-by: c00149107 <chenchuanyu@huawei.com>
Diffstat (limited to 'openo-portal/portal-lifecyclemgr/src/main/webapp')
-rw-r--r--openo-portal/portal-lifecyclemgr/src/main/webapp/lifecyclemgr/UnderLay_TP.html20
-rw-r--r--openo-portal/portal-lifecyclemgr/src/main/webapp/lifecyclemgr/accorTables.html47
-rw-r--r--openo-portal/portal-lifecyclemgr/src/main/webapp/lifecyclemgr/gsolcmmain.html6
-rw-r--r--openo-portal/portal-lifecyclemgr/src/main/webapp/lifecyclemgr/js/gsolcm.js20
-rw-r--r--openo-portal/portal-lifecyclemgr/src/main/webapp/lifecyclemgr/js/tmNodesController.js6
-rw-r--r--openo-portal/portal-lifecyclemgr/src/main/webapp/lifecyclemgr/js/underlay.js24
-rw-r--r--openo-portal/portal-lifecyclemgr/src/main/webapp/lifecyclemgr/js/vpn.js16
-rw-r--r--openo-portal/portal-lifecyclemgr/src/main/webapp/lifecyclemgr/overlayvpn.html26
-rw-r--r--openo-portal/portal-lifecyclemgr/src/main/webapp/lifecyclemgr/underlayvpn.html24
9 files changed, 135 insertions, 54 deletions
diff --git a/openo-portal/portal-lifecyclemgr/src/main/webapp/lifecyclemgr/UnderLay_TP.html b/openo-portal/portal-lifecyclemgr/src/main/webapp/lifecyclemgr/UnderLay_TP.html
index 17c24427..1c8effdd 100644
--- a/openo-portal/portal-lifecyclemgr/src/main/webapp/lifecyclemgr/UnderLay_TP.html
+++ b/openo-portal/portal-lifecyclemgr/src/main/webapp/lifecyclemgr/UnderLay_TP.html
@@ -60,10 +60,24 @@
</style>
<script type="text/javascript">
$(document).ready(function() {
- var jsondata = loadUnderlayData();
- $('#tbl_overlay').bootstrapTable({
+ //var jsondata = loadUnderlayData();
+
+ var params = new URLSearchParams(window.location.search.slice(1));
+ debugger;
+ var jsonData = JSON.parse((params.get("jsondata")));
+ var tblData= [];
+ jsonData.accessPointList.forEach(function(accessPoint){
+ tblData.push({
+ tname:accessPoint.name,
+ pname:'',
+ vlan:accessPoint.typeSpecList[0].ethernetTpSpec.dot1qVlanList,
+ site:'',
+ ip:accessPoint.typeSpecList[0].ipTpSpec.masterIp
+ });
+ })
+ $('#sai').bootstrapTable({
//Assigning data to table
- data: jsondata
+ data: tblData
});
$('#underlayTpDataTable').bootstrapTable({
//Assigning data to table
diff --git a/openo-portal/portal-lifecyclemgr/src/main/webapp/lifecyclemgr/accorTables.html b/openo-portal/portal-lifecyclemgr/src/main/webapp/lifecyclemgr/accorTables.html
index d3df215a..4bdf441c 100644
--- a/openo-portal/portal-lifecyclemgr/src/main/webapp/lifecyclemgr/accorTables.html
+++ b/openo-portal/portal-lifecyclemgr/src/main/webapp/lifecyclemgr/accorTables.html
@@ -27,28 +27,52 @@
<script>
$(document).ready(function () {
- $("#overDiv").show();
+
+ $("#dashboard").hide();
+ $("#nfvo_dashboard").hide()
+ $("#overDiv").hide();
$("#underDiv").hide();
var serviceId = getQueryStringValue("serviceId");
+ var serviceType = getQueryStringValue("serviceType");
+
console.log("serviceId : " + serviceId);
-
- var jsonData = loadServiceDetails(serviceId);
+
+ var jsonData = [];
+ var object = {};
+
+ if("SSAR" === serviceType || "SDNO" === serviceType)
+ {
+ object.nodeType = "sdno"
+ jsonData[0] = object;
+ }
+ else if("NSAR" == serviceType || "NFAR" == serviceType || "NFVO" == serviceType)
+ {
+ object.nodeType = "nfvo";
+ jsonData[0] = object;
+ }
+ else{
+ jsonData = loadServiceDetails(serviceId);
+ }
+
+
+
+ //TODO check for the
console.log("jsonData length: " + jsonData.length);
for (i = 0; i < jsonData.length; i++) {
- console.log("jsonData Name: " + jsonData[i].name);
- if (jsonData[i].name == "sdno") {
+ console.log("jsonData Name: " + jsonData[i].nodeType);
+ if (jsonData[i].nodeType.indexOf('sdn') != -1) {
//$("#sdnoLink").text(jsonData[i].name.toUpperCase());
console.log("Adding Accordian to SDNO");
- $("#accordion").append(addAccordionData("sdno", jsonData[i].name.toUpperCase()));
+ $("#accordion").append(addAccordionData("sdno", "SDNO"));
}
- else if (jsonData[i].name == "gso") {
+ else if (jsonData[i].nodeType.indexOf('gso') != -1) {
console.log("Adding Accordian to GSO");
- $("#accordion").append(addAccordionData("gso", jsonData[i].name.toUpperCase()));
+ $("#accordion").append(addAccordionData("gso", "GSO"));
}
- else if (jsonData[i].name == "nfvo") {
+ else if (jsonData[i].nodeType.indexOf('nfv') != -1) {
console.log("Adding Accordian to NFVO");
- $("#accordion").append(addAccordionData("nfvo", jsonData[i].name.toUpperCase()));
+ $("#accordion").append(addAccordionData("nfvo", "NFVO"));
}
else {
@@ -146,7 +170,7 @@
content += '<li onClick="fnLoadTblData(this, \''+type+'\');" id="linkgso" class="list-group-item"><span class="glyphicon glyphicon-pencil text-primary"></span><span>OPEN-O</span></li>';
}
else if(type == "nfvo"){
- //content += '<li onClick="fnLoadTblData(this, \''+type+'\');" id="linknfvo" class="list-group-item"><span class="glyphicon glyphicon-pencil text-primary"></span><span>ZTE</span></li>';
+ // content += '<li onClick="fnLoadTblData(this, \''+type+'\');" id="linknfvo" class="list-group-item"><span class="glyphicon glyphicon-pencil text-primary"></span><span>ZTE</span></li>';
}
content += '</ul></div></div>';
return content;
@@ -316,6 +340,7 @@
</div>
</br>
</div>
+
</div>
</div>
</div>
diff --git a/openo-portal/portal-lifecyclemgr/src/main/webapp/lifecyclemgr/gsolcmmain.html b/openo-portal/portal-lifecyclemgr/src/main/webapp/lifecyclemgr/gsolcmmain.html
index a474be8a..23027954 100644
--- a/openo-portal/portal-lifecyclemgr/src/main/webapp/lifecyclemgr/gsolcmmain.html
+++ b/openo-portal/portal-lifecyclemgr/src/main/webapp/lifecyclemgr/gsolcmmain.html
@@ -30,6 +30,8 @@
<script type="text/javascript" src="js/bootstrap-table.min.js"></script>
<script type="text/javascript" src="js/gsolcm.js"></script>
<script type="text/javascript" src="../common/thirdparty/bootbox/bootbox.min.js"></script>
+ <script type="text/javascript" src="../common/thirdparty/jquery.i18n/jquery.i18n.properties-1.0.9.js"></script>
+ <script type="text/javascript" src="js/jquery.bootstrap-growl.min.js"></script>
<script type="text/javascript" src="js/jquery.isloading.min.js"></script>
<script type="text/javascript" src="js/jquery-ui-1.12.1.min.js"></script>
<link href="css/jquery-ui-1.12.1.min.css" rel="stylesheet" />
@@ -64,7 +66,9 @@
$("#inpContMod").hide();
$('#sai').bootstrapTable({}) .on('click-row.bs.table', function (e, row, $element) {
- var newURL = "accorTables.html?serviceId="+row.serviceId;
+
+ var newURL = "accorTables.html?serviceId="+row.serviceId + "&serviceType="+row.serviceType;
+ // var newURL = "accorTables.html?serviceId="+row.serviceId ;
console.log("URL: "+newURL);
document.getElementById("tabContainer").style.display = "none";
document.getElementById("detailConObj").setAttribute('data', newURL);
diff --git a/openo-portal/portal-lifecyclemgr/src/main/webapp/lifecyclemgr/js/gsolcm.js b/openo-portal/portal-lifecyclemgr/src/main/webapp/lifecyclemgr/js/gsolcm.js
index 723ea7dc..d5549ebb 100644
--- a/openo-portal/portal-lifecyclemgr/src/main/webapp/lifecyclemgr/js/gsolcm.js
+++ b/openo-portal/portal-lifecyclemgr/src/main/webapp/lifecyclemgr/js/gsolcm.js
@@ -21,6 +21,12 @@ var templateParameters = {
var lcmHandler = function () {
this._addOwnEvents();
+ jQuery.i18n.properties({
+ language:'en-US',
+ name:'lcm-template-parameters-i18n',
+ path:'i18n/',
+ mode:'map'
+ });
};
lcmHandler.prototype = {
@@ -454,15 +460,23 @@ function transformToOptions(items) {
function generateComponent(inputPara) {
var component = '<div class="mT15 form-group" style="margin-left:25px;">' +
'<label class="col-sm-3 control-label">' +
- '<span>' + inputPara.showName + '</span>' + generateRequiredLabel(inputPara) +
+ '<span>' + showName(inputPara) + '</span>' + generateRequiredLabel(inputPara) +
'</label>' +
'<div class="col-sm-7">' +
'<input type="text" id="' + inputPara.id + '" name="parameter description" class="form-control" placeholder="' +
- inputPara.showName + '" value="' + inputPara.value + '" />' +
+ showName(inputPara) + '" value="' + inputPara.value + '" />' +
'</div></div>';
return component;
}
+function showName(inputPara) {
+ var name = $.i18n.prop(inputPara.name)
+ if(name.length === 0 || name.slice(0, 1) === '[') {
+ name = inputPara.showName;
+ }
+ return name;
+}
+
function generateRequiredLabel(parameter) {
var requiredLabel = '';
if (parameter.required === 'true') {
@@ -701,7 +715,7 @@ function deleteNe(rowId, row) {
} else if (serviceType === 'NFVO') {
var nfvoLcmUri = '/openoapi/nslcm/v1';
deleteNonGsoServiceInstance(gatewayService, nfvoLcmUri, instanceId, remove, failFun);
- } else if (serviceType === 'SDNO') {
+ } else if (serviceType === 'SDNO' || serviceType === 'SSAR') {
var sdnoLcmUri = '/openoapi/sdnonslcm/v1';
deleteNonGsoServiceInstance(gatewayService, sdnoLcmUri, instanceId, remove, failFun);
}
diff --git a/openo-portal/portal-lifecyclemgr/src/main/webapp/lifecyclemgr/js/tmNodesController.js b/openo-portal/portal-lifecyclemgr/src/main/webapp/lifecyclemgr/js/tmNodesController.js
index 6f1235a6..1510d129 100644
--- a/openo-portal/portal-lifecyclemgr/src/main/webapp/lifecyclemgr/js/tmNodesController.js
+++ b/openo-portal/portal-lifecyclemgr/src/main/webapp/lifecyclemgr/js/tmNodesController.js
@@ -35,7 +35,7 @@ var vm = avalon.define({
}
},
$restUrl: {
- queryNodeInstanceUrl: "/openoapi/nslcm/v1.0/ns/"
+ queryNodeInstanceUrl: "/openoapi/nslcm/v1/ns/"
},
$init: function () {
vm.$initInstanceData();
@@ -147,7 +147,7 @@ var vm = avalon.define({
],
"aaData": tableData
});
- };
+ },
//nodes list table
nodesList :{
@@ -186,7 +186,7 @@ var initParam = function () {
var instanceId = params[0].substring(params[0].indexOf('=') + 1);
vm.instanceId = instanceId;
- vm.$restUrl.queryNodeInstanceUrl = commonUtil.format(vm.$restUrl.queryNodeInstanceUrl, instanceId);
+ vm.$restUrl.queryNodeInstanceUrl = vm.$restUrl.queryNodeInstanceUrl + instanceId;
vm.$init();
}
};
diff --git a/openo-portal/portal-lifecyclemgr/src/main/webapp/lifecyclemgr/js/underlay.js b/openo-portal/portal-lifecyclemgr/src/main/webapp/lifecyclemgr/js/underlay.js
index 6a2a8bf1..e52d0150 100644
--- a/openo-portal/portal-lifecyclemgr/src/main/webapp/lifecyclemgr/js/underlay.js
+++ b/openo-portal/portal-lifecyclemgr/src/main/webapp/lifecyclemgr/js/underlay.js
@@ -20,24 +20,26 @@ $.getJSON("./conf/dataconfig.json", function (jsonData){
console.log("URL = " + JSON.stringify(url));
});
-function loadUnderlayData() {
- var requestUrl = url.underlay + "/openoapi/sdnol3vpn/v1/l3vpns";
+function loadUnderlayData(serviceId) {
+ var requestUrl = "/openoapi/sdnol3vpn/v1/l3vpns/" + serviceId;
+ var returnObj;
$
.ajax({
type: "GET",
url: requestUrl,
+ async: false,
contentType: "application/json",
success: function (jsonobj) {
- alert("loading underlay data");
- //TODO: Update the table
+ returnObj = jsonobj;
},
error: function (xhr, ajaxOptions, thrownError) {
//alert("Error on getting underlay data : " + xhr.responseText);
}
});
+ return returnObj;
}
function deleteUnderlayData(objectId) {
- var requestUrl = url.underlay + "/openoapi/sdnol3vpn/v1/l3vpns/" + objectId;
+ var requestUrl = "/openoapi/sdnol3vpn/v1/l3vpns/" + objectId;
$
.ajax({
type: "DELETE",
@@ -52,21 +54,23 @@ function deleteUnderlayData(objectId) {
}
});
}
-function loadOverlayData() {
- var requestUrl = url.overlay + "/openoapi/sdnooverlayvpn/v1/site2dc-vpn";
+function loadOverlayData(serviceId) {
+ var requestUrl = "/openoapi/sdnooverlay/v1/site2dc-vpn/" + serviceId;
+ var returnObj;
$
.ajax({
type: "GET",
url: requestUrl,
+ async: false,
contentType: "application/json",
success: function (jsonobj) {
- alert("loading Overlay data...");
- //TODO: Update the table
+ returnObj = jsonobj;
},
error: function (xhr, ajaxOptions, thrownError) {
//alert("Error on getting Overlayvpn data : " + xhr.responseText);
}
});
+ return returnObj;
}
function refressTpDataTable(overlayTable, TpTable) {
alert("refesssing Tp data table");
@@ -91,7 +95,7 @@ $(function () {
var formData = JSON.stringify($("#underlayForm").serializeObject());
alert(formData);
var jsonobj = JSON.parse(formData);
- var requestUrl = url.underlay + "/openoapi/sdnol3vpn/v1/l3vpns";
+ var requestUrl = "/openoapi/sdnol3vpn/v1/l3vpns";
$
.ajax({
type: "POST",
diff --git a/openo-portal/portal-lifecyclemgr/src/main/webapp/lifecyclemgr/js/vpn.js b/openo-portal/portal-lifecyclemgr/src/main/webapp/lifecyclemgr/js/vpn.js
index 71ffdf3e..a1656b9f 100644
--- a/openo-portal/portal-lifecyclemgr/src/main/webapp/lifecyclemgr/js/vpn.js
+++ b/openo-portal/portal-lifecyclemgr/src/main/webapp/lifecyclemgr/js/vpn.js
@@ -21,7 +21,7 @@ $.getJSON("./conf/dataconfig.json", function (jsonData){
function deleteSite(objectId) {
alert(objectId);
- var requestUrl = url + "/openoapi/sdnobrs/v1/sites" + objectId;
+ var requestUrl = "/openoapi/sdnobrs/v1/sites" + objectId;
$
.ajax({
type: "DELETE",
@@ -37,7 +37,7 @@ function deleteSite(objectId) {
});
}
function deleteLink(objectId) {
- var requestUrl = url + "/openoapi/sdnobrs/v1/topological-links" + objectId;
+ var requestUrl = "/openoapi/sdnobrs/v1/topological-links" + objectId;
$
.ajax({
type: "DELETE",
@@ -54,7 +54,7 @@ function deleteLink(objectId) {
}
function deleteNe(objectId) {
- var requestUrl = url + "/sdnobrs/v1/managed-elements" + objectId;
+ var requestUrl = "/sdnobrs/v1/managed-elements" + objectId;
$
.ajax({
type: "DELETE",
@@ -71,7 +71,7 @@ function deleteNe(objectId) {
}
function deletePort(objectId) {
- var requestUrl = url + "/openoapi/sdnobrs/v1/logical-termination-points" + objectId;
+ var requestUrl = "/openoapi/sdnobrs/v1/logical-termination-points" + objectId;
$
.ajax({
type: "DELETE",
@@ -87,7 +87,7 @@ function deletePort(objectId) {
});
}
function loadSiteData() {
- var requestUrl = url + "/openoapi/sdnobrs/v1/sites";
+ var requestUrl = "/openoapi/sdnobrs/v1/sites";
$
.ajax({
type: "GET",
@@ -103,7 +103,7 @@ function loadSiteData() {
});
}
function loadLinkData() {
- var requestUrl = url + "/openoapi/sdnobrs/v1/topological-links";
+ var requestUrl = "/openoapi/sdnobrs/v1/topological-links";
$
.ajax({
type: "GET",
@@ -119,7 +119,7 @@ function loadLinkData() {
});
}
function loadNeData() {
- var requestUrl = url + "/sdnobrs/v1/managed-elements";
+ var requestUrl = "/sdnobrs/v1/managed-elements";
$
.ajax({
type: "GET",
@@ -135,7 +135,7 @@ function loadNeData() {
});
}
function loadPortData() {
- var requestUrl = url + "/openoapi/sdnobrs/v1/logical-termination-points";
+ var requestUrl = "/openoapi/sdnobrs/v1/logical-termination-points";
$
.ajax({
type: "GET",
diff --git a/openo-portal/portal-lifecyclemgr/src/main/webapp/lifecyclemgr/overlayvpn.html b/openo-portal/portal-lifecyclemgr/src/main/webapp/lifecyclemgr/overlayvpn.html
index 7656f57b..2604de80 100644
--- a/openo-portal/portal-lifecyclemgr/src/main/webapp/lifecyclemgr/overlayvpn.html
+++ b/openo-portal/portal-lifecyclemgr/src/main/webapp/lifecyclemgr/overlayvpn.html
@@ -36,11 +36,25 @@
<script type="text/javascript">
$(document).ready(function () {
var jsondata = [];
- jsondata = loadOverlayData();
+ var params = new URLSearchParams(window.location.search.slice(1));
+ var serviceId = params.get("serviceId");
+ jsondata = loadOverlayData(serviceId);
+ var tabData = [];
+
+ var tableRow = {};
+ tableRow.desc = jsondata.description;
+ tableRow.name= jsondata.name;
+ tableRow.thinCpe= jsondata.site.cidr;//TODO
+ tableRow.port = "";
+ //tableRow.dcName=jsondata.vpc.name;
+ tableRow.vpc = jsondata.vpc.name;
+ tableRow.vpcCidr= jsondata.vpc.site.cidr;
+ tabData[0]=tableRow;
+
$('#sai').bootstrapTable({
//Assigning data to table
- data: jsondata
+ data: tabData
});
$('.table tbody tr').click(function () {
$(this).addClass('openoTable_row_selected').siblings().removeClass('openoTable_row_selected');
@@ -264,10 +278,10 @@
<tr>
<th data-field="name" data-sortable="true" data-filter-control="input">Name</th>
<th data-field="desc" data-sortable="true" data-filter-control="input">Description</th>
- <th data-field="thinCpe" data-sortable="true" data-filter-control="input">Thin CPE</th>
+ <th data-field="thinCpe" data-sortable="true" data-filter-control="input">Site CIDR</th>
<th data-field="port" data-sortable="true" data-filter-control="input">Port:Vlan ID</th>
- <th data-field="dcName" data-sortable="true" data-filter-control="input">DC Name</th>
- <th data-field="vpc" data-sortable="true" data-filter-control="input">VPC</th>
+ <!-- <th data-field="dcName" data-sortable="true" data-filter-control="input">DC Name</th> -->
+ <th data-field="vpc" data-sortable="true" data-filter-control="input">VPC Name</th>
<th data-field="vpcCidr" data-sortable="true" data-filter-control="input">VPC CIDR</th>
<th data-field="action" data-sortable="">Action</th>
</tr>
@@ -278,6 +292,6 @@
</div>
</div>
-
+</div>
</body>
</html> \ No newline at end of file
diff --git a/openo-portal/portal-lifecyclemgr/src/main/webapp/lifecyclemgr/underlayvpn.html b/openo-portal/portal-lifecyclemgr/src/main/webapp/lifecyclemgr/underlayvpn.html
index 6d8b545e..ef181ec6 100644
--- a/openo-portal/portal-lifecyclemgr/src/main/webapp/lifecyclemgr/underlayvpn.html
+++ b/openo-portal/portal-lifecyclemgr/src/main/webapp/lifecyclemgr/underlayvpn.html
@@ -95,11 +95,18 @@
<script type="text/javascript">
$(document).ready(function () {
-
- var jsondata = loadUnderlayData();
- $('#tbl_overlay').bootstrapTable({
+ var params = new URLSearchParams(window.location.search.slice(1));
+ var serviceId = params.get("serviceId");
+ var jsondata = loadUnderlayData(serviceId);
+ var tabData = [];
+ var tableRow = {};
+ tableRow.name = jsondata.name;
+ tableRow.desc= jsondata.description;
+ tableRow.state= jsondata.operStatus;//TODO
+ tabData[0] = tableRow;
+ $('#sai').bootstrapTable({
//Assigning data to table
- data: jsondata
+ data: tabData
});
$('#underlayTpDataTable').bootstrapTable({
//Assigning data to table
@@ -121,10 +128,8 @@
});
});
-
- var serviceId = getQueryStringValue("serviceId");
console.log("underlayvpn - serviceId : " + serviceId);
-
+ $("#underlay_tp").attr('data', 'UnderLay_TP.html?jsondata='+JSON.stringify(jsondata));
});
function getQueryStringValue (key) {
@@ -270,8 +275,9 @@
</div>
<div id="tpDiv">
- <iframe src="UnderLay_TP.html" style="width:100%;height:450px;" name="targetframe" allowTransparency="true" scrolling="no" frameborder="0">
- </iframe>
+ <object id="underlay_tp" data="UnderLay_TP.html" width="100%" height="450" type="text/html"></object>
+ <!--<iframe src="UnderLay_TP.html" style="width:100%;height:450px;" name="targetframe" allowTransparency="true" scrolling="no" frameborder="0">
+ </iframe>-->
</div>
<div id="filterTpLogicalType_select_popupcontainer" class="openo openo-select-popup-container openo-hide"
style="width: 155px; max-height: 130px; left: 628px; top: 104px; z-index: 1761;">