Skip to content

Commit

Permalink
Closes-Bug: #1488745, Closes-Bug: #1550531
Browse files Browse the repository at this point in the history
- Fixed Grid header delete action issue where the actions were getting triggered on disabled state
- Fixed Network Policy hightlighting issue on Network Monitoring Graphs

Change-Id: Ie283cb62472ad32000e1d5225d1b4a11cfdb1314
  • Loading branch information
sgrgala committed Mar 4, 2016
1 parent 20ca3cf commit 80844d2
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 13 deletions.
4 changes: 2 additions & 2 deletions webroot/monitor/networking/ui/js/nm.graph.config.js
Expand Up @@ -195,8 +195,8 @@ define([
return tooltipContentTmpl({
info: [
{label: 'Project', value: virtualNetworkName[0] + ':' + virtualNetworkName[1]},
{label: 'Instance Count', value: viewElement.attributes.nodeDetails.more_attributes.vm_count},
{label: 'Interface Count', value: viewElement.attributes.nodeDetails.more_attributes.vmi_count},
{label: 'Instance Count', value: contrail.checkIfExist(viewElement.attributes.nodeDetails.more_attributes.vm_count) ? viewElement.attributes.nodeDetails.more_attributes.vm_count : '-'},
{label: 'Interface Count', value: contrail.checkIfExist(viewElement.attributes.nodeDetails.more_attributes.vmi_count) ? viewElement.attributes.nodeDetails.more_attributes.vmi_count : '-'},
{label: 'Throughput In/Out', value: formatThroughput(viewElement.attributes.nodeDetails.more_attributes.in_throughput) + " / " + formatThroughput(viewElement.attributes.nodeDetails.more_attributes.out_throughput)},
],
iconClass: 'icon-contrail-virtual-network',
Expand Down
6 changes: 2 additions & 4 deletions webroot/monitor/networking/ui/js/views/NetworkingGraphView.js
Expand Up @@ -1037,7 +1037,7 @@ define([
highlightedElements = {nodes: [], links: []};

$.each(sourceNode, function (sourceNodeKey, sourceNodeValue) {
if (contrail.checkIfExist(sourceNodeValue)) {
if (contrail.checkIfExist(sourceNodeValue) && !$.isArray(sourceNodeValue)) {
highlightedElements.nodes.push(sourceNodeValue);
policyRuleLinkKey.push(sourceNodeValue);

Expand All @@ -1059,7 +1059,7 @@ define([
}
});
$.each(destinationNode, function (destinationNodeKey, destinationNodeValue) {
if (contrail.checkIfExist(destinationNodeValue)) {
if (contrail.checkIfExist(destinationNodeValue) && !$.isArray(destinationNodeValue)) {
highlightedElements.nodes.push(destinationNodeValue);
}
});
Expand All @@ -1075,8 +1075,6 @@ define([
highlightElements([$('div.VirtualMachine')]);
highlightSVGElements([$('g.VirtualMachine'), $('.VirtualMachineLink')]);
}


});

if (policyRuleValue.action_list.simple_action == 'pass') {
Expand Down
12 changes: 5 additions & 7 deletions webroot/reports/qe/ui/js/views/QueryQueueView.js
Expand Up @@ -150,14 +150,12 @@ define([
title: cowl.TITLE_DELETE_ALL_QUERY_QUEUE,
iconClass: 'icon-trash',
onClick: function (event, gridContainer, key) {
if (!$('#' + cowl.QE_DELETE_MULTIPLE_QUERY_QUEUE_CONTROL_ID).hasClass('disabled-link')) {
var gridCheckedRows = $(gridContainer).data('contrailGrid').getCheckedRows(),
queryIds = $.map(gridCheckedRows, function(rowValue, rowKey) {
return rowValue.queryReqObj.queryId;
});
var gridCheckedRows = $(gridContainer).data('contrailGrid').getCheckedRows(),
queryIds = $.map(gridCheckedRows, function(rowValue, rowKey) {
return rowValue.queryReqObj.queryId;
});

showDeleteQueueModal(queryQueueView, queryQueueType, queryIds, queueColorMap);
}
showDeleteQueueModal(queryQueueView, queryQueueType, queryIds, queueColorMap);
}
}
]
Expand Down

0 comments on commit 80844d2

Please sign in to comment.