You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by ea...@apache.org on 2016/06/07 17:22:48 UTC

[2/2] qpid-dispatch git commit: DISPATCH-345: Auto select the 1st router if the saved node is not present

DISPATCH-345: Auto select the 1st router if the saved node is not present


Project: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/commit/6312cccb
Tree: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/tree/6312cccb
Diff: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/diff/6312cccb

Branch: refs/heads/master
Commit: 6312cccb38c6cdf08717bda0c9d84537047a867f
Parents: ec70058
Author: Ernest Allen <ea...@redhat.com>
Authored: Tue Jun 7 13:21:52 2016 -0400
Committer: Ernest Allen <ea...@redhat.com>
Committed: Tue Jun 7 13:21:52 2016 -0400

----------------------------------------------------------------------
 console/hawtio/src/main/webapp/plugin/js/qdrList.js | 6 ++++++
 1 file changed, 6 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/6312cccb/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 8e64dc2..e7df383 100644
--- a/console/hawtio/src/main/webapp/plugin/js/qdrList.js
+++ b/console/hawtio/src/main/webapp/plugin/js/qdrList.js
@@ -129,12 +129,18 @@ var QDR = (function(QDR) {
 				//QDR.log.debug("forcing selectedNode to " + $scope.selectedNode);
 			}
 		}
+		$scope.currentNode = undefined;
 		$scope.nodes.some( function (node, i) {
 			if (node.name === $scope.selectedNode) {
 				$scope.currentNode = $scope.nodes[i]
 				return true;
 			}
 		})
+		if ($scope.currentNode == undefined) {
+			$scope.selectedNode = $scope.nodes[0].name;
+			$scope.selectedNodeId = $scope.nodes[0].id;
+			$scope.currentNode = $scope.nodes[0];
+		}
 
 		var excludedEntities = ["management", "org.amqp.management", "operationalEntity", "entity", "configurationEntity", "dummy", "console"];
 		var aggregateEntities = ["router.address"];


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org