Skip to content

Commit

Permalink
Closes-Bug:#1399094 - In Contrail UI, clicking on VRF shows routes fo…
Browse files Browse the repository at this point in the history
…r a different VRF

Change-Id: I22231785e585bce8ee7602cab78a0db6b03ed1e7
  • Loading branch information
sbavanasi committed Dec 9, 2014
1 parent d774c3b commit abd71d2
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ monitorInfraComputeNetworksClass = (function() {
events: {
onClick: function(e,dc){
var tabIdx = $.inArray("routes", computeNodeTabs);
var data = {tab:"routes",filters:[{routeName:dc['vrf_name']}]};
$('#' + computeNodeTabStrip).data('tabFilter',data);
selectTab(computeNodeTabStrip,tabIdx);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,9 +144,14 @@ monitorInfraComputeRoutesClass = (function() {
var rdoRouteType = $('#routeType').val();
var cboVRF;
var selectedRoute;
if(obj['filters'] != null){
var postfix = obj['filters'].split(':');
selectedRoute = obj['filters'] + ':' + postfix[postfix.length - 1];
var tabFilter = $('#' + computeNodeTabStrip).data('tabFilter');
var filters;
if(tabFilter != null && tabFilter['tab'] == 'routes'){
filters = tabFilter['filters'];
$('#' + computeNodeTabStrip).removeData('tabFilter');
}
if (filters != null){
selectedRoute = filters[0]['routeName'];
}
if(isDropdownInitialized('comboVRF')) {
cboVRF = $('#comboVRF').data('contrailDropdown');
Expand Down Expand Up @@ -187,6 +192,9 @@ monitorInfraComputeRoutesClass = (function() {
// cboVRF.list.width(300);
$('input[name="routeType"]').change(onRouteTypeChange);
}
if(selectedRoute != null) {
cboVRF.text(selectedRoute);
}
function destroyAndHide(currentTypeDivId){
$(currentTypeDivId).data("contrailGrid").destroy();
//removeAllAttributesOfElement(currentTypeDivId);
Expand Down

0 comments on commit abd71d2

Please sign in to comment.