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:
parent
f2d74e7a43
commit
030cdc4d9a
|
@ -45,7 +45,7 @@
|
||||||
|
|
||||||
<div class="pull-right">
|
<div class="pull-right">
|
||||||
<form class="form-inline">
|
<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"
|
ng-click="deleteDialog = true"
|
||||||
title="Close the selected Connection">
|
title="Close the selected Connection">
|
||||||
<i class="icon-remove"></i> Close
|
<i class="icon-remove"></i> Close
|
||||||
|
@ -66,7 +66,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row-fluid">
|
<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>
|
||||||
|
|
||||||
</div>
|
</div>
|
|
@ -47,7 +47,7 @@
|
||||||
|
|
||||||
<div class="pull-right">
|
<div class="pull-right">
|
||||||
<form class="form-inline">
|
<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"
|
ng-click="deleteDialog = true"
|
||||||
title="Close the selected Consumer">
|
title="Close the selected Consumer">
|
||||||
<i class="icon-remove"></i> Close
|
<i class="icon-remove"></i> Close
|
||||||
|
@ -69,7 +69,7 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="row-fluid">
|
<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>
|
||||||
|
|
||||||
</div>
|
</div>
|
|
@ -45,7 +45,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="pull-right">
|
<div class="pull-right">
|
||||||
<form class="form-inline">
|
<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"
|
ng-click="deleteDialog = true"
|
||||||
title="Close the selected Session">
|
title="Close the selected Session">
|
||||||
<i class="icon-remove"></i> Close
|
<i class="icon-remove"></i> Close
|
||||||
|
@ -65,7 +65,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row-fluid">
|
<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>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -143,6 +143,7 @@ var ARTEMIS = (function(ARTEMIS) {
|
||||||
directions: ["asc"]
|
directions: ["asc"]
|
||||||
};
|
};
|
||||||
var refreshed = false;
|
var refreshed = false;
|
||||||
|
$scope.showClose = false;
|
||||||
$scope.gridOptions = {
|
$scope.gridOptions = {
|
||||||
selectedItems: [],
|
selectedItems: [],
|
||||||
data: 'objects',
|
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 }));
|
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() {
|
function onError() {
|
||||||
Core.notification("error", "Could not retrieve " + objectType + " list from Artemis.");
|
Core.notification("error", "Could not retrieve " + objectType + " list from Artemis.");
|
||||||
}
|
}
|
||||||
function populateTable(response) {
|
function populateTable(response) {
|
||||||
$scope.gridOptions.selectedItems.length = 0;
|
$scope.gridOptions.selectedItems.length = 0;
|
||||||
|
$scope.showClose = false;
|
||||||
var data = JSON.parse(response.value);
|
var data = JSON.parse(response.value);
|
||||||
$scope.objects = [];
|
$scope.objects = [];
|
||||||
angular.forEach(data["data"], function (value, idx) {
|
angular.forEach(data["data"], function (value, idx) {
|
||||||
|
|
|
@ -170,7 +170,7 @@ var ARTEMIS = (function(ARTEMIS) {
|
||||||
directions: ["asc"]
|
directions: ["asc"]
|
||||||
};
|
};
|
||||||
var refreshed = false;
|
var refreshed = false;
|
||||||
|
$scope.showClose = false;
|
||||||
$scope.gridOptions = {
|
$scope.gridOptions = {
|
||||||
selectedItems: [],
|
selectedItems: [],
|
||||||
data: 'objects',
|
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 }));
|
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() {
|
function onError() {
|
||||||
Core.notification("error", "Could not retrieve " + objectType + " list from Artemis.");
|
Core.notification("error", "Could not retrieve " + objectType + " list from Artemis.");
|
||||||
}
|
}
|
||||||
function populateTable(response) {
|
function populateTable(response) {
|
||||||
$scope.gridOptions.selectedItems.length = 0;
|
$scope.gridOptions.selectedItems.length = 0;
|
||||||
|
$scope.showClose = false;
|
||||||
var data = JSON.parse(response.value);
|
var data = JSON.parse(response.value);
|
||||||
$scope.objects = [];
|
$scope.objects = [];
|
||||||
angular.forEach(data["data"], function (value, idx) {
|
angular.forEach(data["data"], function (value, idx) {
|
||||||
|
|
|
@ -163,7 +163,7 @@ var ARTEMIS = (function(ARTEMIS) {
|
||||||
directions: ["asc"]
|
directions: ["asc"]
|
||||||
};
|
};
|
||||||
var refreshed = false;
|
var refreshed = false;
|
||||||
|
$scope.showClose = false;
|
||||||
$scope.gridOptions = {
|
$scope.gridOptions = {
|
||||||
selectedItems: [],
|
selectedItems: [],
|
||||||
data: 'objects',
|
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 }));
|
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() {
|
function onError() {
|
||||||
Core.notification("error", "Could not retrieve " + objectType + " list from Artemis.");
|
Core.notification("error", "Could not retrieve " + objectType + " list from Artemis.");
|
||||||
}
|
}
|
||||||
function populateTable(response) {
|
function populateTable(response) {
|
||||||
$scope.gridOptions.selectedItems.length = 0;
|
$scope.gridOptions.selectedItems.length = 0;
|
||||||
|
$scope.showClose = false;
|
||||||
var data = JSON.parse(response.value);
|
var data = JSON.parse(response.value);
|
||||||
$scope.objects = [];
|
$scope.objects = [];
|
||||||
angular.forEach(data["data"], function (value, idx) {
|
angular.forEach(data["data"], function (value, idx) {
|
||||||
|
|
Loading…
Reference in New Issue