From 721ccddb5c8d433334380f5441321dcbe8e4a9dd Mon Sep 17 00:00:00 2001 From: Manoj Naik Date: Tue, 19 May 2015 18:02:21 +0530 Subject: [PATCH] Closes-Bug: #1456515 - Moved the BGP gateway and VN outside netconf settings and also changed the label of the checkbox to netconf managed. Change-Id: I6be611cba217627cfc0cdae96b9e21fe68f698b7 --- .../ui/js/physicalrouters_config.js | 11 +- .../ui/views/physicalrouters_config.view | 134 ++++-------------- 2 files changed, 38 insertions(+), 107 deletions(-) diff --git a/webroot/config/physicaldevices/physicalrouters/ui/js/physicalrouters_config.js b/webroot/config/physicaldevices/physicalrouters/ui/js/physicalrouters_config.js index a910e6218..916c8c556 100644 --- a/webroot/config/physicaldevices/physicalrouters/ui/js/physicalrouters_config.js +++ b/webroot/config/physicaldevices/physicalrouters/ui/js/physicalrouters_config.js @@ -779,7 +779,7 @@ function physicalRoutersConfig() { postObject["physical-router"]["uuid"] = gblSelRow.uuid; } var name,vendor,mgmtIpAddress,dataIpAddress,username,password,bgpRouter,vRoutersType,model,autoConfig,vns; - var servicePortsTuples,servicePorts=[]; + var servicePortsTuples,servicePorts=[],enableServicePorts = true; name = $("#txtPhysicalRouterName" + currAddEditType).val().trim(); if(currAddEditType != VCPE_SUFFIX) { vendor = $("#txtVendor" + currAddEditType).val().trim(); @@ -802,7 +802,9 @@ function physicalRoutersConfig() { servicePorts.push(servicePort); } } - } + } else { + enableServicePorts = false;//explicitely disable the service ports + } } if(currAddEditType == PROUTER_SUFFIX) { bgpRouter = $("#ddBgpRouter" + currAddEditType).data('contrailDropdown').text(); @@ -831,10 +833,11 @@ function physicalRoutersConfig() { postObject["physical-router"]['physical_router_user_credentials']["username"] = username; postObject["physical-router"]['physical_router_user_credentials']["password"] = password; } - if(servicePorts != null && servicePorts.length > 0){ + if(enableServicePorts && servicePorts != null && servicePorts.length > 0){ postObject["physical-router"]["physical_router_junos_service_ports"] = {}; postObject["physical-router"]["physical_router_junos_service_ports"]["service_port"] = servicePorts; - } else { + } else if(!enableServicePorts){ + //Disable service ports if it is explictely disabled from ui postObject["physical-router"]["physical_router_junos_service_ports"] = {}; } if(bgpRouter != null && bgpRouter != 'None'){ diff --git a/webroot/config/physicaldevices/physicalrouters/ui/views/physicalrouters_config.view b/webroot/config/physicaldevices/physicalrouters/ui/views/physicalrouters_config.view index 2b147a5cd..060fa730c 100644 --- a/webroot/config/physicaldevices/physicalrouters/ui/views/physicalrouters_config.view +++ b/webroot/config/physicaldevices/physicalrouters/ui/views/physicalrouters_config.view @@ -30,7 +30,6 @@
{{data_ip_address}}
-
{{totalInterfacesCount}}
@@ -41,6 +40,14 @@
{{displayVirtualRouters}}
{{/IfCompare}} +
+
+
{{bgp_routers}}
+
+
+
+
{{virtual_networks}}
+
@@ -48,24 +55,16 @@
{{username}}
-
-
-
{{bgp_routers}}
-
{{auto_config}}
-
-
-
-
{{virtual_networks}}
-
+ {{#IfCompare junosServicePorts '-' operator='!='}}
{{junosServicePorts}}
- {{/IfCompare}} + {{/IfCompare}} {{#IfCompare isSNMPManaged true operator='=='}}
@@ -196,76 +195,22 @@ -
- +
+
-
- - - -
- +
-
- -
-
-
-
-
-
Port
-
-
-
-
-
-
-
-
-
-
-
-
+
+ +
+
+ +
-
- +