Skip to content

Commit

Permalink
Fixed bugs id's 1554415, 1437197, 1550334
Browse files Browse the repository at this point in the history
Bug ID 1554415
Pending
1. Double-clicking on link doesn't work if cursor pointer changes to default
while tooltip shown
9. disable tooltip for links between vrouter & vms..as no added information is
shown in tooltip. - Tracked in another Bug ID : 1543988

Fixed in this commit
2. VM IP is shown in grid but vm name is shown in topology..difficult to
co-relate
3. No need to show "Direction" in grid as all flows we show are "INGRESS".
- removed from getSearchFlowGridColumns
- removed from getTraceFlowVrouterGridColumns
- removed from getTraceFlowVMGridColumns
5. "Show Underlay Path(s)" : No need of (s)
6. First source vrouter need to be then destination vrouter, but here we show
first "Other Virtual Router" & "Virtual Router"
- Done in getSearchFlowGridColumns & getTraceFlowVMGridColumns
10. [Firefox] pRouter Details: Clicking on Interface count link opens a new
empty tab.

Allready Done
4. When "Trace Flow" is shown, clicking on "pRouters" doesn't work.
7. Cursor doesn't change to "Hand" pointer, on clicking grid title.
8. For link, we show interface names in tooltip..can also show along which
prouter/vrouter that interface belongs to.

Partial-Bug: #1554415

Bug ID : 1437197
UI:'Other Virtual Router ' name is mis-leading in 'trace flow ' page as the
tunnel end-point could be mx /any rouer as well
Fixed by changing the name to Encapsulation Endpoint
Closes-Bug: #1437197

Bug ID : 1550334
UI underlay topology: Fip is not shown in tooltip for a VM
Fixed it. Now showing the floating ip detail.
Closes-Bug: #1550334

Change-Id: I1e6f5302e1d9f540920e959164ff67462e817b1b
Closes-Bug: #1550334
  • Loading branch information
balamurugang committed May 5, 2016
1 parent ae146ba commit cc7a93f
Show file tree
Hide file tree
Showing 4 changed files with 63 additions and 78 deletions.
124 changes: 48 additions & 76 deletions webroot/monitor/infrastructure/underlay/ui/js/underlay.utils.js
Expand Up @@ -206,7 +206,8 @@ define(['underscore'], function (_) {
viewConfig: {
header: {
title:
contrail.format('Traffic Statistics of {0}',vrouter),
contrail.format('Traffic Statistics of {0} -- {1}',
data['sourceElement']['name'], vrouter)
},
controls: {
top: {
Expand Down Expand Up @@ -328,7 +329,7 @@ define(['underscore'], function (_) {
return [
{
field:'peer_vrouter',
name:"Other Virtual Router",
name:"Encapsulation Endpoint",
minWidth:170,
formatter: function(r,c,v,cd,dc){
var name = $.grep(computeNodes,function(value,idx){
Expand Down Expand Up @@ -366,27 +367,12 @@ define(['underscore'], function (_) {
name:"Source IP",
minWidth:60,
formatter:function(r,c,v,cd,dc) {
if(validateIPAddress(dc['sip']))
return dc['sip']
else
noDataStr;
return self.parseDestination(dc['sip']);
}
},{
field:"src_port",
name:"Source Port",
minWidth:50
},{
field:"direction",
name:"Direction",
minWidth:40,
formatter: function(r,c,v,cd,dc) {
if (dc['direction'] == 'ingress')
return 'INGRESS'
else if (dc['direction'] == 'egress')
return 'EGRESS'
else
return '-';
}
},{
field:"dst_vn",
name:"Destination Network",
Expand All @@ -401,10 +387,7 @@ define(['underscore'], function (_) {
name:"Destination IP",
minWidth:60,
formatter:function(r,c,v,cd,dc) {
if(validateIPAddress(dc['dip']))
return dc['dip']
else
noDataStr;
return self.parseDestination(dc['dip']);
}
},{
field:"dst_port",
Expand All @@ -428,14 +411,14 @@ define(['underscore'], function (_) {
self.getTraceFlowVMGridColumns = function () {
return [
{
field: 'formattedOtherVrouter',
name: "Other Virtual Router",
minWidth:170,
},{
field: 'formattedVrouter',
name: "Virtual Router",
minWidth:170,
},{
}, {
field: 'formattedOtherVrouter',
name: "Encapsulation Endpoint",
minWidth:170,
}, {
field:"protocol",
name:"Protocol",
minWidth:40,
Expand All @@ -449,29 +432,14 @@ define(['underscore'], function (_) {
},{
field:"sourceip",
name:"Source IP",
minWidth:60,
minWidth:100,
formatter:function(r,c,v,cd,dc) {
if(validateIPAddress(dc['sourceip']))
return dc['sourceip']
else
noDataStr;
return self.parseDestination(dc['sourceip']);
}
},{
field:"sport",
name:"Source Port",
minWidth:50
},{
field:"direction_ing",
name:"Direction",
minWidth:40,
formatter: function(r,c,v,cd,dc) {
if (dc['direction_ing'] == 1)
return 'INGRESS'
else if (dc['direction_ing'] == 0)
return 'EGRESS'
else
return '-';
}
},{
field:"formattedDestVN",
name:"Destination Network",
Expand All @@ -486,10 +454,7 @@ define(['underscore'], function (_) {
name:"Destination IP",
minWidth:60,
formatter:function(r,c,v,cd,dc) {
if(validateIPAddress(dc['destip']))
return dc['destip']
else
noDataStr;
return self.parseDestination(dc['destip']);
}
},{
field:"dport",
Expand All @@ -513,13 +478,13 @@ define(['underscore'], function (_) {
self.getSearchFlowGridColumns = function () {
return [
{
field: 'formattedOtherVrouter',
name: "Other Virtual Router",
minWidth:170,
},{
field: 'formattedVrouter',
name: "Virtual Router",
minWidth:170,
minWidth:160,
},{
field: 'formattedOtherVrouter',
name: "Encapsulation Endpoint",
minWidth:160,
},{
field:"protocol",
name:"Protocol",
Expand All @@ -534,29 +499,14 @@ define(['underscore'], function (_) {
},{
field:"sourceip",
name:"Source IP",
minWidth:60,
minWidth:100,
formatter:function(r,c,v,cd,dc) {
if(validateIPAddress(dc['sourceip']))
return dc['sourceip']
else
noDataStr;
return self.parseDestination(dc['sourceip']);
}
},{
field:"sport",
name:"Source Port",
minWidth:50
},{
field:"direction_ing",
name:"Direction",
minWidth:40,
formatter: function(r,c,v,cd,dc) {
if (dc['direction_ing'] == 1)
return 'INGRESS'
else if (dc['direction_ing'] == 0)
return 'EGRESS'
else
return '-';
}
},{
field:"formattedDestVN",
name:"Destination Network",
Expand All @@ -569,12 +519,9 @@ define(['underscore'], function (_) {
},{
field:"destip",
name:"Destination IP",
minWidth:60,
minWidth:100,
formatter:function(r,c,v,cd,dc) {
if(validateIPAddress(dc['destip']))
return dc['destip']
else
noDataStr;
return self.parseDestination(dc['destip']);
}
},{
field:"dport",
Expand All @@ -598,7 +545,32 @@ define(['underscore'], function (_) {
self.getUnderlayGraphModel = function () {
return $("#"+ctwl.UNDERLAY_GRAPH_ID).data('graphModel');
};

self.parseDestination = function(ip) {
if (validateIPAddress(ip)) {
var vmName = self.getVMForIP(ip);
if (vmName != "") {
return ip + " (" + vmName + ")";
} else {
return ip;
}
} else {
noDataStr;
}
};
self.getVMForIP = function (ip) {
var nodeModels =
$("#"+ctwl.UNDERLAY_GRAPH_ID).data('graphModel').
nodesCollection.models;
var nm = _.filter(nodeModels, function(node) {
return (_.pluck(node.attributes.more_attributes().interface_list,
'ip_address').indexOf(ip) != -1);
});
if(nm && nm.length == 1) {
nm = nm[0];
return nm.attributes.label()
}
return "";
};
/*self.showFlowPath = function (connectionWrapIds, offsetWidth, graphView) {
if(offsetWidth == null)
offsetWidth = 5;
Expand Down
Expand Up @@ -89,7 +89,7 @@ define([
detail: false,
actionCellPosition: 'start',
actionCell:[{
title: 'Show Underlay Path(s)',
title: 'Show Underlay Path',
iconClass: 'icon-contrail-trace-flow',
onClick: function(rowIndex,targetElement){
var graphModel = underlayUtils.getUnderlayGraphModel();
Expand Down
Expand Up @@ -1726,6 +1726,8 @@ define([
label, instanceName = "";
var instanceUUID = node.attributes.name();
var instances = graphModel.getVirtualMachines();
var fip_addr = "";
var fip_addr_arr = [];
for (var i = 0; i < instances.length; i++) {
if (instances[i].attributes.name() === instanceUUID) {
var attributes = ifNull(instances[i].attributes.more_attributes(), {}),
Expand All @@ -1741,6 +1743,9 @@ define([
ipArr.push(interfaceList[j]['ip6_address']);
else if (interfaceList[j]['ip_address'] != '0.0.0.0')
ipArr.push(interfaceList[j]['ip_address']);
fip_addr_arr = getValueByJsonPath(interfaceList[j], "floating_ips", []);
if (fip_addr != "") fip_addr += ", ";
fip_addr += _.pluck(fip_addr_arr, 'ip_address').join(', ');
}
if (ipArr.length > 0)
vmIp = ipArr.join();
Expand Down Expand Up @@ -1775,6 +1780,13 @@ define([
value: vn
});
}

if (fip_addr != "") {
tooltipLblValues.push({
label: "Floating IP(s)",
value: fip_addr
});
}
tooltipContent['info'] = tooltipLblValues;
return tooltipContentTmpl(tooltipContent);
}
Expand Down
Expand Up @@ -152,7 +152,8 @@ define([
// onAllViewsRenderComplete callback is executed when
// all the tabs are rendered hence interface click
// handler is bind in the interface tabs callback
$("#details .intfCnt").click(function () {
$("#details .intfCnt").click(function (e) {
e.preventDefault();
$("#"+ctwc.UNDERLAY_TAB_ID).tabs({active:3});
})
}
Expand Down

0 comments on commit cc7a93f

Please sign in to comment.