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/12/14 18:56:06 UTC
qpid-dispatch git commit: DISPATCH-552 Allow only one tree node to be
expanded for large networks
Repository: qpid-dispatch
Updated Branches:
refs/heads/master f69a74d59 -> 123fb9502
DISPATCH-552 Allow only one tree node to be expanded for large networks
Project: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/commit/123fb950
Tree: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/tree/123fb950
Diff: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/diff/123fb950
Branch: refs/heads/master
Commit: 123fb95025b3bc2cdc97be7c361a919a3df438bc
Parents: f69a74d
Author: Ernest Allen <ea...@redhat.com>
Authored: Wed Dec 14 13:55:52 2016 -0500
Committer: Ernest Allen <ea...@redhat.com>
Committed: Wed Dec 14 13:55:52 2016 -0500
----------------------------------------------------------------------
console/stand-alone/plugin/html/tmplListTree.html | 2 +-
console/stand-alone/plugin/html/tmplOverviewTree.html | 2 +-
console/stand-alone/plugin/js/qdrList.js | 4 +++-
console/stand-alone/plugin/js/qdrOverview.js | 4 +++-
console/stand-alone/plugin/js/qdrService.js | 4 ++++
5 files changed, 12 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/123fb950/console/stand-alone/plugin/html/tmplListTree.html
----------------------------------------------------------------------
diff --git a/console/stand-alone/plugin/html/tmplListTree.html b/console/stand-alone/plugin/html/tmplListTree.html
index c4d395a..75d4940 100644
--- a/console/stand-alone/plugin/html/tmplListTree.html
+++ b/console/stand-alone/plugin/html/tmplListTree.html
@@ -2,7 +2,7 @@
<div class="pane-wrapper">
<div class="pane-header-wrapper">
<div class="tree-header"><select ng-options="node as node.name for node in nodes" ng-model="currentNode" ng-change="selectNode(currentNode)"></select></div>
- <div class="expand-collapse">
+ <div ng-hide="largeNetwork" class="expand-collapse">
<i class="icon-chevron-down clickable" title="Expand all nodes" ng-click="expandAll()"></i>
<i class="icon-chevron-up clickable" title="Unexpand all nodes" ng-click="contractAll()"></i>
</div>
http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/123fb950/console/stand-alone/plugin/html/tmplOverviewTree.html
----------------------------------------------------------------------
diff --git a/console/stand-alone/plugin/html/tmplOverviewTree.html b/console/stand-alone/plugin/html/tmplOverviewTree.html
index cadf3a9..793d103 100644
--- a/console/stand-alone/plugin/html/tmplOverviewTree.html
+++ b/console/stand-alone/plugin/html/tmplOverviewTree.html
@@ -1,7 +1,7 @@
<div class="qdr-overview pane left" position="left" width="300">
<div class="pane-wrapper">
<div class="pane-header-wrapper">
- <div class="expand-collapse">
+ <div ng-hide="largeNetwork" class="expand-collapse">
<i class="icon-chevron-down clickable" title="Expand all nodes" ng-click="expandAll()"></i>
<i class="icon-chevron-up clickable" title="Unexpand all nodes" ng-click="contractAll()"></i>
</div>
http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/123fb950/console/stand-alone/plugin/js/qdrList.js
----------------------------------------------------------------------
diff --git a/console/stand-alone/plugin/js/qdrList.js b/console/stand-alone/plugin/js/qdrList.js
index 521a87a..4695b4a 100644
--- a/console/stand-alone/plugin/js/qdrList.js
+++ b/console/stand-alone/plugin/js/qdrList.js
@@ -706,6 +706,7 @@ var QDR = (function(QDR) {
var treeReady = false;
var serviceReady = false;
+ $scope.largeNetwork = QDRService.isLargeNetwork()
// called after we know for sure the schema is fetched and the routers are all ready
QDRService.addUpdatedAction("initList", function () {
QDRService.stopUpdating();
@@ -765,7 +766,8 @@ var QDR = (function(QDR) {
onActivate: onTreeSelected,
onExpand: onTreeNodeExpanded,
selectMode: 1,
- activeVisible: false,
+ autoCollapse: $scope.largeNetwork,
+ activeVisible: !$scope.largeNetwork,
debugLevel: 0,
children: entityTreeChildren
})
http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/123fb950/console/stand-alone/plugin/js/qdrOverview.js
----------------------------------------------------------------------
diff --git a/console/stand-alone/plugin/js/qdrOverview.js b/console/stand-alone/plugin/js/qdrOverview.js
index 4476772..f612847 100644
--- a/console/stand-alone/plugin/js/qdrOverview.js
+++ b/console/stand-alone/plugin/js/qdrOverview.js
@@ -1747,6 +1747,7 @@ QDR.log.debug("newly created node needs to be activated")
var htmlReady = false;
var dataReady = false;
+ $scope.largeNetwork = QDRService.isLargeNetwork()
var logs = new Folder("Logs")
logs.type = "Logs"
logs.info = allLogInfo
@@ -1768,9 +1769,10 @@ QDR.log.debug("newly created node needs to be activated")
$('#overtree').dynatree({
onActivate: activated,
onExpand: treeNodeExpanded,
+ autoCollapse: $scope.largeNetwork,
+ activeVisible: !$scope.largeNetwork,
selectMode: 1,
debugLevel: 0,
- activeVisible: false,
children: topLevelChildren
})
treeRoot = $("#overtree").dynatree("getRoot");
http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/123fb950/console/stand-alone/plugin/js/qdrService.js
----------------------------------------------------------------------
diff --git a/console/stand-alone/plugin/js/qdrService.js b/console/stand-alone/plugin/js/qdrService.js
index 0baa3a9..2cec634 100644
--- a/console/stand-alone/plugin/js/qdrService.js
+++ b/console/stand-alone/plugin/js/qdrService.js
@@ -266,6 +266,10 @@ console.dump(e)
return nl;
},
+ isLargeNetwork: function () {
+ return Object.keys(self.topology._nodeInfo).length >= 12
+ },
+
// given an attribute name array, find the value at the same index in the values array
valFor: function(aAr, vAr, key) {
var idx = aAr.indexOf(key);
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org