ARTEMIS-1350 - Update management console to expose client side objects Fix for close button, being shown on selection and hidden on reset/unselect.
Project: http://git-wip-us.apache.org/repos/asf/activemq-artemis/repo Commit: http://git-wip-us.apache.org/repos/asf/activemq-artemis/commit/030cdc4d Tree: http://git-wip-us.apache.org/repos/asf/activemq-artemis/tree/030cdc4d Diff: http://git-wip-us.apache.org/repos/asf/activemq-artemis/diff/030cdc4d Branch: refs/heads/master Commit: 030cdc4d9af7a906cf3939c49d68d96a5f12bb68 Parents: f2d74e7 Author: Michael Andre Pearce <[email protected]> Authored: Wed Aug 23 21:09:23 2017 +0100 Committer: Clebert Suconic <[email protected]> Committed: Fri Aug 25 22:44:56 2017 -0400 ---------------------------------------------------------------------- .../src/main/webapp/plugin/html/connections.html | 4 ++-- .../src/main/webapp/plugin/html/consumers.html | 4 ++-- .../artemis-plugin/src/main/webapp/plugin/html/sessions.html | 4 ++-- .../artemis-plugin/src/main/webapp/plugin/js/connections.js | 5 +++++ .../artemis-plugin/src/main/webapp/plugin/js/consumers.js | 8 ++++++-- .../artemis-plugin/src/main/webapp/plugin/js/sessions.js | 6 +++++- 6 files changed, 22 insertions(+), 9 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/030cdc4d/artemis-hawtio/artemis-plugin/src/main/webapp/plugin/html/connections.html ---------------------------------------------------------------------- diff --git a/artemis-hawtio/artemis-plugin/src/main/webapp/plugin/html/connections.html b/artemis-hawtio/artemis-plugin/src/main/webapp/plugin/html/connections.html index 9b3b231..d9539f8 100644 --- a/artemis-hawtio/artemis-plugin/src/main/webapp/plugin/html/connections.html +++ b/artemis-hawtio/artemis-plugin/src/main/webapp/plugin/html/connections.html @@ -45,7 +45,7 @@ <div class="pull-right"> <form class="form-inline"> - <button class="btn-danger" ng-disabled="gridOptions.selectedItems.length == 0" + <button class="btn-danger" ng-show="showClose" ng-click="deleteDialog = true" title="Close the selected Connection"> <i class="icon-remove"></i> Close @@ -66,7 +66,7 @@ </div> </div> <div class="row-fluid"> - <div class="gridStyle" ng-grid="gridOptions" ui-grid-resize-columns></div> + <div class="gridStyle" ng-grid="gridOptions" ui-grid-resize-columns ng-click="selectGridRow()"></div> </div> </div> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/030cdc4d/artemis-hawtio/artemis-plugin/src/main/webapp/plugin/html/consumers.html ---------------------------------------------------------------------- diff --git a/artemis-hawtio/artemis-plugin/src/main/webapp/plugin/html/consumers.html b/artemis-hawtio/artemis-plugin/src/main/webapp/plugin/html/consumers.html index 3258926..64de3b2 100644 --- a/artemis-hawtio/artemis-plugin/src/main/webapp/plugin/html/consumers.html +++ b/artemis-hawtio/artemis-plugin/src/main/webapp/plugin/html/consumers.html @@ -47,7 +47,7 @@ <div class="pull-right"> <form class="form-inline"> - <button class="btn-danger" ng-disabled="gridOptions.selectedItems.length == 0" + <button class="btn-danger" ng-show="showClose" ng-click="deleteDialog = true" title="Close the selected Consumer"> <i class="icon-remove"></i> Close @@ -69,7 +69,7 @@ </div> <div class="row-fluid"> - <div class="gridStyle" ng-grid="gridOptions" ui-grid-resize-columns></div> + <div class="gridStyle" ng-grid="gridOptions" ui-grid-resize-columns ng-click="selectGridRow()"></div> </div> </div> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/030cdc4d/artemis-hawtio/artemis-plugin/src/main/webapp/plugin/html/sessions.html ---------------------------------------------------------------------- diff --git a/artemis-hawtio/artemis-plugin/src/main/webapp/plugin/html/sessions.html b/artemis-hawtio/artemis-plugin/src/main/webapp/plugin/html/sessions.html index 0e03bc4..0144e50 100644 --- a/artemis-hawtio/artemis-plugin/src/main/webapp/plugin/html/sessions.html +++ b/artemis-hawtio/artemis-plugin/src/main/webapp/plugin/html/sessions.html @@ -45,7 +45,7 @@ </div> <div class="pull-right"> <form class="form-inline"> - <button class="btn-danger" ng-show="gridOptions.selectedItems.length == 0" + <button class="btn-danger" ng-show="showClose" ng-click="deleteDialog = true" title="Close the selected Session"> <i class="icon-remove"></i> Close @@ -65,7 +65,7 @@ </div> </div> <div class="row-fluid"> - <div class="gridStyle" ng-grid="gridOptions" ui-grid-resize-columns></div> + <div class="gridStyle" ng-grid="gridOptions" ui-grid-resize-columns ng-click="selectGridRow()"></div> </div> </div> http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/030cdc4d/artemis-hawtio/artemis-plugin/src/main/webapp/plugin/js/connections.js ---------------------------------------------------------------------- diff --git a/artemis-hawtio/artemis-plugin/src/main/webapp/plugin/js/connections.js b/artemis-hawtio/artemis-plugin/src/main/webapp/plugin/js/connections.js index 170af8a..b24dba8 100644 --- a/artemis-hawtio/artemis-plugin/src/main/webapp/plugin/js/connections.js +++ b/artemis-hawtio/artemis-plugin/src/main/webapp/plugin/js/connections.js @@ -143,6 +143,7 @@ var ARTEMIS = (function(ARTEMIS) { directions: ["asc"] }; var refreshed = false; + $scope.showClose = false; $scope.gridOptions = { selectedItems: [], data: 'objects', @@ -187,11 +188,15 @@ var ARTEMIS = (function(ARTEMIS) { jolokia.request({ type: 'exec', mbean: mbean, operation: method, arguments: [filter, $scope.pagingOptions.currentPage, $scope.pagingOptions.pageSize] }, onSuccess(populateTable, { error: onError })); } }; + $scope.selectGridRow = function () { + $scope.showClose = $scope.gridOptions.selectedItems.length > 0; + }; function onError() { Core.notification("error", "Could not retrieve " + objectType + " list from Artemis."); } function populateTable(response) { $scope.gridOptions.selectedItems.length = 0; + $scope.showClose = false; var data = JSON.parse(response.value); $scope.objects = []; angular.forEach(data["data"], function (value, idx) { http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/030cdc4d/artemis-hawtio/artemis-plugin/src/main/webapp/plugin/js/consumers.js ---------------------------------------------------------------------- diff --git a/artemis-hawtio/artemis-plugin/src/main/webapp/plugin/js/consumers.js b/artemis-hawtio/artemis-plugin/src/main/webapp/plugin/js/consumers.js index 25e206a..799683b 100644 --- a/artemis-hawtio/artemis-plugin/src/main/webapp/plugin/js/consumers.js +++ b/artemis-hawtio/artemis-plugin/src/main/webapp/plugin/js/consumers.js @@ -170,7 +170,7 @@ var ARTEMIS = (function(ARTEMIS) { directions: ["asc"] }; var refreshed = false; - + $scope.showClose = false; $scope.gridOptions = { selectedItems: [], data: 'objects', @@ -215,11 +215,15 @@ var ARTEMIS = (function(ARTEMIS) { jolokia.request({ type: 'exec', mbean: mbean, operation: method, arguments: [filter, $scope.pagingOptions.currentPage, $scope.pagingOptions.pageSize] }, onSuccess(populateTable, { error: onError })); } }; + $scope.selectGridRow = function () { + $scope.showClose = $scope.gridOptions.selectedItems.length > 0; + }; function onError() { Core.notification("error", "Could not retrieve " + objectType + " list from Artemis."); } function populateTable(response) { - $scope.gridOptions.selectedItems.length = 0; + $scope.gridOptions.selectedItems.length = 0; + $scope.showClose = false; var data = JSON.parse(response.value); $scope.objects = []; angular.forEach(data["data"], function (value, idx) { http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/030cdc4d/artemis-hawtio/artemis-plugin/src/main/webapp/plugin/js/sessions.js ---------------------------------------------------------------------- diff --git a/artemis-hawtio/artemis-plugin/src/main/webapp/plugin/js/sessions.js b/artemis-hawtio/artemis-plugin/src/main/webapp/plugin/js/sessions.js index ce661a1..498f10e 100644 --- a/artemis-hawtio/artemis-plugin/src/main/webapp/plugin/js/sessions.js +++ b/artemis-hawtio/artemis-plugin/src/main/webapp/plugin/js/sessions.js @@ -163,7 +163,7 @@ var ARTEMIS = (function(ARTEMIS) { directions: ["asc"] }; var refreshed = false; - + $scope.showClose = false; $scope.gridOptions = { selectedItems: [], data: 'objects', @@ -208,11 +208,15 @@ var ARTEMIS = (function(ARTEMIS) { jolokia.request({ type: 'exec', mbean: mbean, operation: method, arguments: [filter, $scope.pagingOptions.currentPage, $scope.pagingOptions.pageSize] }, onSuccess(populateTable, { error: onError })); } }; + $scope.selectGridRow = function () { + $scope.showClose = $scope.gridOptions.selectedItems.length > 0; + }; function onError() { Core.notification("error", "Could not retrieve " + objectType + " list from Artemis."); } function populateTable(response) { $scope.gridOptions.selectedItems.length = 0; + $scope.showClose = false; var data = JSON.parse(response.value); $scope.objects = []; angular.forEach(data["data"], function (value, idx) {
