SDNO BRS issue fix

IssueId : CLIENT-197

Change-Id: I4338918989ad927ab8a67ac5093aa68f43b5ee36
Signed-off-by: seshukm <seshu.kumar.m@huawei.com>
diff --git a/resmgr/src/main/webapp/resmgr/css/style.css b/resmgr/src/main/webapp/resmgr/css/style.css
index 7686568..1f81d81 100644
--- a/resmgr/src/main/webapp/resmgr/css/style.css
+++ b/resmgr/src/main/webapp/resmgr/css/style.css
@@ -16,6 +16,18 @@
 

 .containerh{

 	background-color:white !important;

-	min-height:500px;

+	min-height:800px;

 

+}

+

+#textCenter{

+    padding-top:8px;

+}

+

+#rowSpacing{

+    margin-bottom: 9px;

+}

+

+#borderSpacing{

+    margin-bottom: -15px;

 }
\ No newline at end of file
diff --git a/resmgr/src/main/webapp/resmgr/js/app.js b/resmgr/src/main/webapp/resmgr/js/app.js
index a1e63a7..d930cbb 100644
--- a/resmgr/src/main/webapp/resmgr/js/app.js
+++ b/resmgr/src/main/webapp/resmgr/js/app.js
@@ -68,11 +68,11 @@
                 controller : "datacenterCtrl"

             })

 

-           /* .state("resource.vim", {

+            .state("resource.vim", {

                 url: "/vim",

                 templateUrl : "nfv-resmgr/vim/vim.html",

                 controller : "vimCtrl"

-            })*/

+            })

 

     })

 

@@ -316,6 +316,7 @@
 

         $scope.deleteData = function(id) {

             var confirmation=false;

+            var checkbox = false;

             var dialog_tpl = $(modelTemplate).filter('#personDialog').html();

             var error = {"err_data" : { "title": "Error",

                 "showClose": "true",

@@ -803,6 +804,7 @@
 

         $scope.deleteData = function(id) {

             var confirmation=false;

+            var checkbox = false;

             var dialog_tpl = $(modelTemplate).filter('#personDialog').html();

             var error = {"err_data" : { "title": "Error",

                 "showClose": "true",

@@ -1066,6 +1068,7 @@
 

         $scope.deleteData = function(id) {

             var confirmation=false;

+            var checkbox = false;

             var dialog_tpl = $(modelTemplate).filter('#personDialog').html();

             var error = {"err_data" : { "title": "Error",

                 "showClose": "true",

@@ -1181,13 +1184,13 @@
             var neName = {"ErrMsg" :     {"errmsg" : "The name is required.", "modalVar":"ne.name", "errtag":"textboxErrName", "errfunc":"validatetextboxName","required":true}};

             $('#myModal #name').append($compile(Mustache.to_html(text, neName.ErrMsg))($scope));

 

-            var neVersion = {"ErrMsg" :     {"errmsg" : "The version is required.", "modalVar":"ne.version","errtag":"textboxErrVersion", "errfunc":"validatetextboxVersion","required":true}};

+            var neVersion = {"ErrMsg" :     {"errmsg" : "The version is required.", "modalVar":"ne.version"}};  //,"errtag":"textboxErrVersion", "errfunc":"validatetextboxVersion","required":true

             $('#myModal #version').append($compile(Mustache.to_html(text, neVersion.ErrMsg))($scope));

 

-            var neNERole = {"ErrMsg" :     {"errmsg" : "The role is required.", "modalVar":"ne.role","errtag":"textboxErrRole", "errfunc":"validatetextboxRole","required":true}};

+            var neNERole = {"ErrMsg" :     {"errmsg" : "The role is required.", "modalVar":"ne.role"}}; //,"errtag":"textboxErrRole", "errfunc":"validatetextboxRole","required":true

             $('#myModal #nerole').append($compile(Mustache.to_html(text, neNERole.ErrMsg))($scope));

 

-            var serialNumber = {"ErrMsg" :     {"errmsg" : "The serialNumber is required.", "modalVar":"ne.serialNumber","errtag":"textboxErrSerial", "errfunc":"validatetextboxSerial","required":true}};

+            var serialNumber = {"ErrMsg" :     {"errmsg" : "The serialNumber is required.", "modalVar":"ne.serialNumber"}}; //,"errtag":"textboxErrSerial", "errfunc":"validatetextboxSerial","required":true

             $('#myModal #serialNumber').append($compile(Mustache.to_html(text, serialNumber.ErrMsg))($scope));

 

             var neProductName = {"ErrMsg" :     {"errmsg" : "The name is required.", "modalVar":"ne.productName" }};

@@ -1209,23 +1212,23 @@
             /*var neController = {"ErrMsg" :     {"errmsg" : "IP Address is required.", "modalVar":"ne.controller"}};

             $('#myModal #controller').append($compile(Mustache.to_html(text, neController.ErrMsg))($scope));*/

 

-            var neIPAddress = {"ErrMsg" :     {"errmsg" : "IP Address is required.", "modalVar":"ne.ipAddress"}};

+            var neIPAddress = {"ErrMsg" :     {"errmsg" : "IP Address is required.", "modalVar":"ne.ipAddress","errtag":"textboxErrIP", "errfunc":"validatetextboxIP","required":true}};

             $('#myModal #ipAddress').append($compile(Mustache.to_html(text, neIPAddress.ErrMsg))($scope));

 

 

 

-            var neAdminState = {"ErrMsg" :     {"errmsg" : "The name is required.", "modalVar":"ne.adminState"}};

-            $('#myModal #adminState').append($compile(Mustache.to_html(text, neAdminState.ErrMsg))($scope));

+            var neNativeId = {"ErrMsg" :     {"errmsg" : "The name is required.", "modalVar":"ne.nativeId"}};

+            $('#myModal #nativeId').append($compile(Mustache.to_html(text, neNativeId.ErrMsg))($scope));

 

-            var neOperatingState = {"ErrMsg" :     {"errmsg" : "The name is required.", "modalVar":"ne.operatingState"}};

-            $('#myModal #operatingState').append($compile(Mustache.to_html(text, neOperatingState.ErrMsg))($scope));

+            /*var neOperatingState = {"ErrMsg" :     {"errmsg" : "The name is required.", "modalVar":"ne.operatingState"}};

+            $('#myModal #operatingState').append($compile(Mustache.to_html(text, neOperatingState.ErrMsg))($scope));*/

 

 

             neDataService.getNESiteDDList()

                 .then(function (data) {

                     $scope.siteIDList = data.sites;

                     var dropdownInfo = translateSiteIdToDropdownInfo($scope.siteIDList);

-                    $("#siteIdDropdown").html(dropdownInfo);

+                    $("#myModal #siteIdDropdown").html(dropdownInfo);

                     console.log("Data: ");

                     $log.info(data);

                 }, function (reason) {

@@ -1304,6 +1307,14 @@
                 $scope.textboxErrSerial = true;

         }

 

+        $scope.validatetextboxIP = function (value){

+            if($scope.ne.ipAddress) {

+                $scope.textboxErrIP = false;

+            }

+            else

+                $scope.textboxErrIP = true;

+        }

+

         $scope.closeModal = function() {

             console.log("Closing Modal...");

             $('#myModal').modal('hide');

@@ -1328,7 +1339,7 @@
             $("#myModal").modal({}).draggable();

         }

         $scope.saveData = function(id) {

-            if (!$scope.textboxErrName && !$scope.textboxErrVersion && !$scope.textboxErrRole && !$scope.textboxErrSerial) {

+            if (!$scope.textboxErrName && !$scope.textboxErrIP) {

 				

 				var nes = {};

 				nes.managedElement = $scope.ne;

@@ -1362,6 +1373,7 @@
 

         $scope.deleteData = function(id) {

             var confirmation=false;

+            var checkbox = false;

             var dialog_tpl = $(modelTemplate).filter('#personDialog').html();

             var error = {"err_data" : { "title": "Error",

                 "showClose": "true",

@@ -1623,6 +1635,7 @@
 

         $scope.deleteData = function(id) {

             var confirmation=false;

+            var checkbox = false;

             var dialog_tpl = $(modelTemplate).filter('#personDialog').html();

             var error = {"err_data" : { "title": "Error",

                 "showClose": "true",

@@ -1694,6 +1707,15 @@
 

     })

 

+

+    .controller("vimCtrl", function($scope, $log){

+        $scope.message = "vimCtrl";

+        //loadVimData();

+    })

+

+

+

+

 // ---------------------------------------------------------------------------------------------------------------------------------------------

 

 var modelTemplate = "";