ARTEMIS-1350 - Update management console to expose client side objects

Fix for close button, being shown on selection and hidden on reset/unselect.
This commit is contained in:
Michael Andre Pearce 2017-08-23 21:09:23 +01:00 committed by Clebert Suconic
parent f2d74e7a43
commit 030cdc4d9a
6 changed files with 22 additions and 9 deletions

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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) {

View File

@ -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.showClose = false;
var data = JSON.parse(response.value);
$scope.objects = [];
angular.forEach(data["data"], function (value, idx) {

View File

@ -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) {