1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-07-24 07:49:41 +02:00

Ability to select all endpoints via a checkbox (#607)

This commit is contained in:
Damian 2017-03-12 17:39:27 +01:00 committed by Anthony Lapenna
parent d724f75016
commit 8a827950d8
2 changed files with 12 additions and 1 deletions

View file

@ -28,6 +28,15 @@ function ($scope, $state, EndpointService, EndpointProvider, Messages, Paginatio
Pagination.setPaginationCount('endpoints', $scope.state.pagination_count);
};
$scope.selectItems = function (allSelected) {
angular.forEach($scope.state.filteredEndpoints, function (endpoint) {
if (endpoint.Checked !== allSelected) {
endpoint.Checked = allSelected;
$scope.selectItem(endpoint);
}
});
};
$scope.selectItem = function (item) {
if (item.Checked) {
$scope.state.selectedItemCount++;