Repository: qpid-dispatch Updated Branches: refs/heads/master c7ff8612f -> cf2cacd98
DISPATCH-397: Set the current router when a new router is chosen in the dropdown Project: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/repo Commit: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/commit/cf2cacd9 Tree: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/tree/cf2cacd9 Diff: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/diff/cf2cacd9 Branch: refs/heads/master Commit: cf2cacd9875e8cc248401d18c9a896d29167c802 Parents: c7ff861 Author: Ernest Allen <eal...@redhat.com> Authored: Fri Jun 17 13:32:21 2016 -0400 Committer: Ernest Allen <eal...@redhat.com> Committed: Fri Jun 17 13:32:21 2016 -0400 ---------------------------------------------------------------------- console/hawtio/src/main/webapp/plugin/js/qdrList.js | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/cf2cacd9/console/hawtio/src/main/webapp/plugin/js/qdrList.js ---------------------------------------------------------------------- diff --git a/console/hawtio/src/main/webapp/plugin/js/qdrList.js b/console/hawtio/src/main/webapp/plugin/js/qdrList.js index b3210d0..39f2a33 100644 --- a/console/hawtio/src/main/webapp/plugin/js/qdrList.js +++ b/console/hawtio/src/main/webapp/plugin/js/qdrList.js @@ -130,12 +130,15 @@ var QDR = (function(QDR) { } } $scope.currentNode = undefined; - $scope.nodes.some( function (node, i) { - if (node.name === $scope.selectedNode) { - $scope.currentNode = $scope.nodes[i] - return true; - } - }) + var setCurrentNode = function () { + $scope.nodes.some( function (node, i) { + if (node.name === $scope.selectedNode) { + $scope.currentNode = $scope.nodes[i] + return true; + } + }) + } + setCurrentNode(); if ($scope.currentNode == undefined) { $scope.selectedNode = $scope.nodes[0].name; $scope.selectedNodeId = $scope.nodes[0].id; @@ -391,6 +394,7 @@ var QDR = (function(QDR) { $scope.selectNode = function(node) { $scope.selectedNode = node.name; $scope.selectedNodeId = node.id; + setCurrentNode(); restartUpdate(); }; $scope.$watch('selectedEntity', function(newValue, oldValue) { --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@qpid.apache.org For additional commands, e-mail: commits-h...@qpid.apache.org