diff options
author | Seshu-Kumar-M <seshu.kumar.m@huawei.com> | 2016-11-01 11:03:10 +0800 |
---|---|---|
committer | Seshu-Kumar-M <seshu.kumar.m@huawei.com> | 2016-11-01 11:03:10 +0800 |
commit | 659e53eb56f47329a04b7a2e7fc4f6c7500c65f0 (patch) | |
tree | 75ce356f4fb8d81796240f5268190ffbb669802b /openo-portal/portal-resmgr/src/main/webapp/resmgr-sdn | |
parent | 65a0462abaa783ff8dca0bbbb1479cd41bbdc1ff (diff) |
create NE is not updating the controller info in the DB and is so blocking the further requests of the ESR.
SDNO-828
Change-Id: I18f37973df493df3c05ea7894ad1976fbe5c218d
Signed-off-by: Seshu-Kumar-M <seshu.kumar.m@huawei.com>
Diffstat (limited to 'openo-portal/portal-resmgr/src/main/webapp/resmgr-sdn')
-rw-r--r-- | openo-portal/portal-resmgr/src/main/webapp/resmgr-sdn/js/brs.js | 30 |
1 files changed, 22 insertions, 8 deletions
diff --git a/openo-portal/portal-resmgr/src/main/webapp/resmgr-sdn/js/brs.js b/openo-portal/portal-resmgr/src/main/webapp/resmgr-sdn/js/brs.js index 91fd0c5f..83266af7 100644 --- a/openo-portal/portal-resmgr/src/main/webapp/resmgr-sdn/js/brs.js +++ b/openo-portal/portal-resmgr/src/main/webapp/resmgr-sdn/js/brs.js @@ -25,10 +25,7 @@ $('.siteDeleteImg').click(function () { });
-function hideFirstCol() {
- //$('table tr').find('th:eq(0)').hide();
- //$('table tr').find('td:eq(0)').hide();
-}
+
function deleteSite(objectId) {
var requestUrl = "/openoapi/sdnobrs/v1/sites/" + objectId;
$
@@ -150,12 +147,18 @@ function loadNeData() { url: requestUrl,
contentType: "application/json",
success: function (jsonobj) {
+
var nedata = jsonobj.managedElements;
+ var neMap = [];
+ neMap = loadControllerData();
+ /*$.each(nedata,function(k,v){
+ nedata[k];
+ })*/;
+
$('#ne').bootstrapTable({
data: nedata
});
$('#ne').bootstrapTable('refresh');
- hideFirstCol();
},
error: function (xhr, ajaxOptions, thrownError) {
@@ -181,18 +184,23 @@ function loadPortData() { });
}
function loadControllerData() {
+ var neMap = [];
var requestUrl = "/openoapi/extsys/v1/sdncontrollers";
$.ajax({
type: "GET",
+ async: false,
url: requestUrl,
contentType: "application/json",
success: function (jsonobj) {
- fillSelect(jsonobj);
+
+ neMap = fillSelect(jsonobj);
+
},
error: function (xhr, ajaxOptions, thrownError) {
alert("Error on getting controller data : " + xhr.responseText);
}
});
+ return neMap;
}
function fillSelect(str){
var json;
@@ -204,9 +212,12 @@ function fillSelect(str){ }
var seleObj = $('#controller')
seleObj.find("option").remove();
+ var neMap = [];
for(var i=0;i < json.length;i++){
- seleObj.append('<option value="'+json[i].name+'">'+json[i].name+'</option>');
+ seleObj.append('<option value="'+json[i].sdnControllerId+'">'+json[i].name+'</option>');
+ neMap[json[i].sdnControllerId] = json[i].name;
}
+ return neMap;
}
$(function () {
$('.creat-btn').click(function () {
@@ -300,6 +311,9 @@ $(function () { $('#createNe').click(function () {
var formData = JSON.stringify($("#neForm").serializeObject());
var jsonobj = JSON.parse(formData);
+ var controllerIDs = [] ;
+ controllerIDs[0]= jsonobj.controller;
+ jsonobj.controllerID = controllerIDs;
var newJson = {"managedElement": jsonobj};
formData = JSON.stringify(newJson);
var requestUrl = "/openoapi/sdnobrs/v1/managed-elements";
@@ -338,7 +352,7 @@ $(function () { data: formData,
success: function (jsonResp) {
alert("Port saved successfully!!!");
- //TODO : hide model data window.
+
jsonobj["id"] = jsonResp.logicalTerminationPoint.id;
$('#port').bootstrapTable("append", jsonobj);
$('#vmAppDialog').removeClass('in').css('display', 'none');
|