Skip to content

Commit

Permalink
Closes-Bug: #1456515 - Moved the BGP gateway and VN outside netconf s…
Browse files Browse the repository at this point in the history
…ettings and

also changed the label of the checkbox to netconf managed.

Change-Id: I6be611cba217627cfc0cdae96b9e21fe68f698b7
  • Loading branch information
manojgn committed May 19, 2015
1 parent fa80cbe commit 721ccdd
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 107 deletions.
Expand Up @@ -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();
Expand All @@ -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();
Expand Down Expand Up @@ -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'){
Expand Down
Expand Up @@ -30,7 +30,6 @@
<div class="span2"><label>VTEP Address</label></div>
<div class="span10">{{data_ip_address}}</div>
</div>

<div class="row-fluid">
<div class="span2"><label>Interfaces</label></div>
<div class="span10">{{totalInterfacesCount}}</div>
Expand All @@ -41,31 +40,31 @@
<div class="span10">{{displayVirtualRouters}}</div>
</div>
{{/IfCompare}}
<div class="row-fluid">
<div class="span2"><label>BGP Gateway</label></div>
<div class="span10">{{bgp_routers}}</div>
</div>
<div class="row-fluid">
<div class="span2"><label>Virtual Networks</label></div>
<div class="span10">{{virtual_networks}}</div>
</div>
<div class="row-fluid">
<label class="details-group-heading">Netconf Settings</label>
</div>
<div class="row-fluid">
<div class="span2"><label>Username</label></div>
<div class="span10">{{username}}</div>
</div>
<div class="row-fluid">
<div class="span2"><label>BGP Gateway</label></div>
<div class="span10">{{bgp_routers}}</div>
</div>
<div class="row-fluid">
<div class="span2"><label>Auto Configuration</label></div>
<div class="span10">{{auto_config}}</div>
</div>
<div class="row-fluid">
<div class="span2"><label>Virtual Networks</label></div>
<div class="span10">{{virtual_networks}}</div>
</div>
</div>
{{#IfCompare junosServicePorts '-' operator='!='}}
<div class="row-fluid">
<div class="span2"><label>Junos Service Ports</label></div>
<div class="span10">{{junosServicePorts}}</div>
</div>
{{/IfCompare}}
{{/IfCompare}}
{{#IfCompare isSNMPManaged true operator='=='}}
<div class="row-fluid">
<label class="details-group-heading">SNMP Settings</label></div>
Expand Down Expand Up @@ -196,76 +195,22 @@
</div>
</div>
</div>
<div class="control-group">
<label class="control-label">Junos Service Ports</label>
<div class="control-group">
<label class="control-label ">BGP Gateway</label>
<div class="controls">
<div class="row-fluid">
<div>
<input id="enableDisableServicePort_PRouter" name="enableDisableServicePort_PRouter"
type="checkbox" class="ace-input">
</input>
<span class="ace-lbl"></span>
</div>

<input type="text" id="ddBgpRouter_PRouter" class="span11"/>
</div>
</div>
</div>
<div class="control-group hide" id="junosServicePortsPanel_PRouter">
<label class="control-label"></label>
<div class="controls">
<div class="row-fluid">
<div class="row-fluid">
<div class="span11 rule-item-header">
<div class="span5">
<h6>Port</h6>
</div>
<div class="span1 pull-right">
<div title="Add Ports below" class="pull-right margin-5 padding-10-0"><i id="btnAddServicePort_PRouter" class="icon-plus"></i></div>
</div>
</div>
</div>
<div>
<div class="row-fluid">
<div id="servicePortsTuples_PRouter" class="span11"></div>
</div>
</div>
</div>
<div class="control-group">
<label class="control-label ">Virtual Networks</label>
<div class="controls">
<div class="row-fluid">
<input type="text" id="msVN_PRouter" class="span11"/>
</div>
</div>
</div>
<!-- <div class="widget-box transparent collapsed">
<div class="widget-header">
<h4 class="smaller" onclick="collapseElement(this,'#credWidget');">
<i class="icon-caret-right grey"></i>
<span>Netconf Credentials</span>
</h4>
</div>
<div id="credWidget" class="widget-body collapsed">
<div class="row-fluid widget-main">
<div class="row-fluid margin-0-0-10">
<div class="control-group">
<label class="control-label">Username</label>
<div class="controls">
<div class="row-fluid">
<div class="span4">
<input type="text" id="txtUsername_PRouter" name="txtUsername_PRouter" title="Username"
class="span12"/>
</div>
<label class="span3 new-column-label">
Password
</label>
<div class ="span4">
<input title="Password"
id="txtPassword_PRouter" class="span12" type="password" name="txtPassword_PRouter"
value="">
</input>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>--><!-- user crendentials div ends -->
<div class="widget-box transparent collapsed">
<div class="widget-header">
<h4 class="smaller" onclick="collapseElement(this,'#vrPRouterWidget');">
Expand Down Expand Up @@ -326,7 +271,8 @@
</div>
</div>
</div><!-- Virtual router widget ends -->
<div class="widget-box transparent collapsed">

<div class="widget-box transparent collapsed" id="netconfSettings_PRouter" class="hide">
<div class="widget-header">
<h4 class="smaller" onclick="collapseElement(this,'#PRouterbgpRouterWidget');">
<i class="icon-caret-right grey"></i>
Expand All @@ -336,6 +282,15 @@
<div id="PRouterbgpRouterWidget" class="widget-body collapsed">
<div class="row-fluid widget-main">
<div class="row-fluid">
<div class="control-group">
<label class="control-label" >Netconf Managed</label>
<div class="pull-left margin-left-21 padding-top-5">
<input id="chkAutoConfig_PRouter" name="chkAutoConfig_PRouter"
type="checkbox" checked="" class="ace-input">
</input>
<span class="ace-lbl ">&nbsp;</span>
</div>
</div>
<div class="control-group">
<label class="control-label">Username</label>
<div class="controls">
Expand All @@ -356,33 +311,6 @@
</div>
</div>
</div>
<div class="control-group">
<label class="control-label">BGP Gateway</label>
<div class="controls">
<div class="row-fluid">
<div class="pull-left span4">
<input type="text" id="ddBgpRouter_PRouter" class="span12"/>
</div>
<div class="pull-left margin-left-60 padding-top-5">
<input id="chkAutoConfig_PRouter"
type="checkbox" checked="" class="ace-input">
</input>
<span class="ace-lbl ">&nbsp;</span>
</div>
<label class="padding-top-5">
Auto Configuration
</label>
</div>
</div>
</div>
<div class="control-group">
<label class="control-label ">Virtual Networks</label>
<div class="controls">
<div class="row-fluid">
<input type="text" id="msVN_PRouter" class="span11"/>
</div>
</div>
</div>
<div class="control-group">
<label class="control-label">Junos Service Ports</label>
<div class="controls">
Expand All @@ -393,7 +321,6 @@
</input>
<span class="ace-lbl"></span>
</div>

</div>
</div>
</div>
Expand Down Expand Up @@ -423,6 +350,7 @@
</div>
</div>
</div> <!-- BGP router widget -->

<div class="control-group">
<label class="control-label" >SNMP Monitored</label>
<div class="pull-left margin-left-21 padding-top-5">
Expand Down

0 comments on commit 721ccdd

Please sign in to comment.