Skip to content

Commit

Permalink
Merge "Closes-Bug#1454947,Closes-Bug:#1455051 1)For fixing usuability…
Browse files Browse the repository at this point in the history
… issues we added grid footer with page size 15,which broken the introspect pagination,now we are showing all the 100 records at a time 2)When the other/current node is not in the vrouter lists,we are displaying error message saying that "Cannot trace the path for selected flow". Change-Id: Ic8cae6a8e2bd0cd620f4dee009d9ddb1c30357e5"
  • Loading branch information
Zuul authored and opencontrail-ci-admin committed May 18, 2015
2 parents 388a842 + d107003 commit d46db04
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 11 deletions.
1 change: 0 additions & 1 deletion webroot/monitor/infra/underlay/ui/js/flow_queries.js
Expand Up @@ -926,7 +926,6 @@ function loadFlowResultsForUnderlay(options, reqQueryObj, columnDisplay, fcGridD
},
actionCell: [],
lazyLoading:true,
multiRowSelection : false,
};
$("#mapflow").die('click').live('click',function(e){
var startTime = $("#"+options.queryPrefix+"-results").data('startTimeUTC');
Expand Down
33 changes: 23 additions & 10 deletions webroot/monitor/infra/underlay/ui/js/monitor_infra_underlay.js
Expand Up @@ -453,6 +453,18 @@ underlayModel.prototype.destroy = function() {
this.reset();
}

underlayModel.prototype.checkIPInVrouterList = function(data) {
var vRouterList = getValueByJsonPath(globalObj,'topologyResponse;vRouterList',[]);
for(var i = 0; i < ifNull(vRouterList,[]).length; i++) {
var vRouterData = vRouterList[i];
var vRouterIPs = getValueByJsonPath(vRouterData,'more_attributes;VrouterAgent;self_ip_list',[]);
if(vRouterIPs.indexOf(data['nodeIP']) > -1) {
return true;
}
}
return false;
}

var underlayView = function (model) {
this.elementMap = {
nodes: {},
Expand Down Expand Up @@ -1707,7 +1719,7 @@ underlayView.prototype.highlightPath = function(response, data) {

}
if(response.nodes <=0 || response.links <= 0){
showInfoWindow("No Underlay paths found for the selected flow.", "Info");
showInfoWindow("Cannot Map the path for selected flow", "Info");
if(null !== underlayRenderer && typeof underlayRenderer === "object"){
underlayRenderer.getView().resetTopology(false);
}
Expand Down Expand Up @@ -2207,7 +2219,6 @@ underlayView.prototype.renderTracePath = function(options) {
options : {
forceFitColumns: true,
sortable : false,
multiRowSelection : false,
checkboxSelectable: {
enableRowCheckbox: true,
onNothingChecked: function(e){
Expand Down Expand Up @@ -2268,14 +2279,7 @@ underlayView.prototype.renderTracePath = function(options) {
}
}
},
footer : {
pager : {
options : {
pageSize : 10,
pageSizeSelect : [10, 50, 100, 200, 500 ]
}
}
}
footer : false
});
vrouterflowsGrid = $("#vrouterflows").data('contrailGrid');
vrouterflowsGrid.showGridMessage('loading');
Expand Down Expand Up @@ -2472,6 +2476,10 @@ underlayView.prototype.renderTracePath = function(options) {
postData['nodeIP'] = dataItem['other_vrouter_ip'] != null ? dataItem['other_vrouter_ip'] : dataItem['peer_vrouter'];
nwFqName = dataItem['sourcevn'] != null ? dataItem['sourcevn'] : dataItem['src_vn'];
}
if(typeof underlayRenderer === 'object' && !underlayRenderer.getModel().checkIPInVrouterList(postData)) {
showInfoWindow("Cannot Trace the path for the selected flow", "Info");
return;
}
var progressBar = $("#network_topology").find('.topology-visualization-loading');
$(progressBar).show();
$(progressBar).css('margin-bottom',$(progressBar).parent().height());
Expand Down Expand Up @@ -2566,6 +2574,10 @@ underlayView.prototype.renderTracePath = function(options) {
postData['resolveVrfId'] = contextVrouterIp;
}
}
if(typeof underlayRenderer === 'object' && !underlayRenderer.getModel().checkIPInVrouterList(postData)) {
showInfoWindow("Cannot Trace the path for the selected flow", "Info");
return;
}
var progressBar = $("#network_topology").find('.topology-visualization-loading');
$(progressBar).show();
$(progressBar).css('margin-bottom',$(progressBar).parent().height());
Expand Down Expand Up @@ -2610,6 +2622,7 @@ underlayView.prototype.renderTracePath = function(options) {
});
}
});

function getInstFlowsUrl(name,text){
var req = {};
var ajaxData = {
Expand Down

0 comments on commit d46db04

Please sign in to comment.