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/10/31 14:10:48 UTC
[3/6] qpid-dispatch git commit: DISPATCH-544 Add ability to hide/show
the left panel on topology page
DISPATCH-544 Add ability to hide/show the left panel on topology page
Project: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/commit/bcfc2dc1
Tree: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/tree/bcfc2dc1
Diff: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/diff/bcfc2dc1
Branch: refs/heads/master
Commit: bcfc2dc1818cc99f586d0418440102dacfa5b3f7
Parents: 75e449e
Author: Ernest Allen <ea...@redhat.com>
Authored: Sat Oct 29 14:24:41 2016 -0400
Committer: Ernest Allen <ea...@redhat.com>
Committed: Sat Oct 29 14:24:41 2016 -0400
----------------------------------------------------------------------
console/stand-alone/plugin/css/dispatch.css | 12 ++++++++
console/stand-alone/plugin/css/plugin.css | 1 +
.../stand-alone/plugin/html/qdrTopology.html | 2 ++
console/stand-alone/plugin/js/qdrTopology.js | 31 ++++++++++++++++++--
4 files changed, 44 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/bcfc2dc1/console/stand-alone/plugin/css/dispatch.css
----------------------------------------------------------------------
diff --git a/console/stand-alone/plugin/css/dispatch.css b/console/stand-alone/plugin/css/dispatch.css
index 060a37b..ed1a966 100644
--- a/console/stand-alone/plugin/css/dispatch.css
+++ b/console/stand-alone/plugin/css/dispatch.css
@@ -686,3 +686,15 @@ div.topoGrid .ui-grid-viewport {
.dynatree-node.loading {
position: initial;
}
+
+.hideLeft {
+ position: absolute;
+ right: 0.5em;
+ top: 1em;
+}
+
+.showLeft {
+ position: absolute;
+ top: 1em;
+ left: 0.5em;
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/bcfc2dc1/console/stand-alone/plugin/css/plugin.css
----------------------------------------------------------------------
diff --git a/console/stand-alone/plugin/css/plugin.css b/console/stand-alone/plugin/css/plugin.css
index a2122f3..ddbf9e5 100644
--- a/console/stand-alone/plugin/css/plugin.css
+++ b/console/stand-alone/plugin/css/plugin.css
@@ -294,6 +294,7 @@ div.qdr-overview.pane {
}
div.qdr-topology.pane.left {
width: auto;
+ border-right: 1px solid lightgray;
}
/* the selected row in the name table */
http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/bcfc2dc1/console/stand-alone/plugin/html/qdrTopology.html
----------------------------------------------------------------------
diff --git a/console/stand-alone/plugin/html/qdrTopology.html b/console/stand-alone/plugin/html/qdrTopology.html
index b3046ce..31afe1f 100644
--- a/console/stand-alone/plugin/html/qdrTopology.html
+++ b/console/stand-alone/plugin/html/qdrTopology.html
@@ -38,6 +38,8 @@ under the License.
<button ng-click="cancel()">Cancel</button>
</div>
</div>
+ <button ng-if="panelVisible" ng-click="hideLeftPane()" class="hideLeft" title="Hide"><i class="icon-step-backward"></i></button>
+ <button ng-if="!panelVisible" ng-click="showLeftPane()" class="hideLeft" title="Show"><i class="icon-step-forward"></i></button>
</div>
<div class="panel-adjacent">
http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/bcfc2dc1/console/stand-alone/plugin/js/qdrTopology.js
----------------------------------------------------------------------
diff --git a/console/stand-alone/plugin/js/qdrTopology.js b/console/stand-alone/plugin/js/qdrTopology.js
index 57a9701..46eaff0 100644
--- a/console/stand-alone/plugin/js/qdrTopology.js
+++ b/console/stand-alone/plugin/js/qdrTopology.js
@@ -28,7 +28,7 @@ var QDR = (function(QDR) {
var valueTemplate = '<div title="{{row.entity.attributeValue}}" class="ngCellText"><span>{{row.entity.attributeValue}}</span></div>';
$scope.topoGridOptions = {
data: 'attributes',
- enableColumnResize: true,
+ enableColumnResize: false,
multiSelect: false,
columnDefs: [{
field: 'attributeName',
@@ -42,7 +42,6 @@ var QDR = (function(QDR) {
};
$scope.form = ''
$scope.$on('showEntityForm', function(event, args) {
-QDR.log.debug("showEntityForm")
var attributes = args.attributes;
var entityTypes = QDRService.schema.entityTypes[args.entity].attributes;
attributes.forEach(function(attr) {
@@ -65,10 +64,38 @@ QDR.log.debug("showEntityForm")
QDR.module.controller("QDR.TopologyController", ['$scope', '$rootScope', 'QDRService', '$location', '$timeout', '$dialog',
function($scope, $rootScope, QDRService, $location, $timeout, $dialog) {
+ $scope.panelVisible = true // show/hide the panel on the left
$scope.multiData = []
$scope.selectedClient = [];
$scope.quiesceState = {}
var dontHide = false;
+
+ $scope.hideLeftPane = function () {
+ d3.select(".qdr-topology.pane.left")
+ .transition().duration(300).ease("sin-in")
+ .style("left" , "-380px")
+
+ d3.select(".panel-adjacent")
+ .transition().duration(300).ease("sin-in")
+ .style("margin-left", "30px")
+ .each("end", function () {
+ resize()
+ $timeout(function () {QDR.log.debug("done with transition. setting scope ");$scope.panelVisible = false})
+ })
+ }
+ $scope.showLeftPane = function () {
+ d3.select(".qdr-topology.pane.left")
+ .transition().duration(300).ease("sin-out")
+ .style("left" , "0px")
+
+ d3.select(".panel-adjacent")
+ .transition().duration(300).ease("sin-out")
+ .style("margin-left", "430px")
+ .each("end", function () {
+ resize()
+ $timeout(function () {QDR.log.debug("done with transition. setting scope ");$scope.panelVisible = true})
+ })
+ }
$scope.quiesceConnection = function(row) {
var entity = row.entity;
var state = $scope.quiesceState[entity.connectionId].state;
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org