Skip to content

Commit

Permalink
Related-Bug:#1443460
Browse files Browse the repository at this point in the history
Fixed the issue,arrow are not proper direction of trace flow/map flow
Change-Id: Ifbb84bacbd92548c692f10f9bdec85c0c7e017de
  • Loading branch information
vishnuvv committed May 22, 2015
1 parent 4ab8c59 commit 81c30fd
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion webroot/monitor/infra/underlay/ui/js/flow_queries.js
Expand Up @@ -938,7 +938,7 @@ function loadFlowResultsForUnderlay(options, reqQueryObj, columnDisplay, fcGridD
});
} else {
gridConfig.body.options.actionCell.push({
title: 'Show Underlay Paths',
title: 'Show Underlay Path(s)',
iconClass: 'icon-contrail-trace-flow',
onClick: function(rowIndex,targetElement){
var dataItem = $('#' + options.elementId).data('contrailGrid')._grid.getDataItem(rowIndex);
Expand Down
14 changes: 7 additions & 7 deletions webroot/monitor/infra/underlay/ui/js/monitor_infra_underlay.js
Expand Up @@ -2860,7 +2860,7 @@ underlayView.prototype.populateDetailsTab = function(data) {
pager : {
options : {
pageSize : 10,
pageSizeSelect : [10, 50, 100, 200, 500 ]
pageSizeSelect : [10, 50, 100, 200]
}
}
}
Expand Down Expand Up @@ -3136,7 +3136,7 @@ underlayView.prototype.addOffsetPath = function(connectionWrapId, offsetWidth,is
var curve = new Bezier(pathCoords);
var inclinedVerticalLine = false;
if(curve._linear != true) {
if(isDirectionCrt) {
if(!isDirectionCrt) {
offsetWidth = -offsetWidth;
offsetPath.attr('marker-start',"url(#bezierUp)");
} else {
Expand All @@ -3145,7 +3145,7 @@ underlayView.prototype.addOffsetPath = function(connectionWrapId, offsetWidth,is
//Hack,till we fix the issue,links b/w TOR and SPINES are not vertical
if(Math.abs(pathCoords[pathCoords.length - 2] - pathCoords[0]) <= 10) {
inclinedVerticalLine = true;
if(isDirectionCrt) {
if(!isDirectionCrt) {
offsetPath.attr('marker-start','url(#upDeviated)');
} else {
offsetPath.attr('marker-end','url(#downDeviated)');
Expand All @@ -3156,18 +3156,18 @@ underlayView.prototype.addOffsetPath = function(connectionWrapId, offsetWidth,is
var offsetPathCordsLen = offsetPathCords.length;
var lastX = offsetPathCords[offsetPathCords.length - 2];
if(!isDirectionCrt && !inclinedVerticalLine) {
lastX = parseFloat(lastX) - 10;
lastX = parseFloat(lastX) + 10;
offsetPathCords[offsetPathCords.length - 2] = lastX;
} else if (isDirectionCrt && !inclinedVerticalLine) {
lastX = parseFloat(lastX) + 10;
lastX = parseFloat(lastX) - 10;
offsetPathCords[offsetPathCords.length - 2] = lastX;
}
offsetPath.attr('d',offsetPathCords.join(' '));
} else {
//Vertical line
if(pathCoords[0] == pathCoords[6]) {
//Pointing upwards/downwards
if(isDirectionCrt) {
if(!isDirectionCrt) {
offsetPath.attr('transform','translate(' + offsetWidth + ',0)');
offsetPath.attr('marker-start',"url(#up)");
} else {
Expand All @@ -3181,7 +3181,7 @@ underlayView.prototype.addOffsetPath = function(connectionWrapId, offsetWidth,is
}
}

if(isDirectionCrt) {
if(!isDirectionCrt) {
offsetPath.attr('class','connection-wrap-up');
} else {
offsetPath.attr('class','connection-wrap-down');
Expand Down

0 comments on commit 81c30fd

Please sign in to comment.