mirror of https://github.com/portainer/portainer
Ability to select all endpoints via a checkbox (#607)
parent
d724f75016
commit
8a827950d8
|
@ -137,7 +137,9 @@
|
|||
<table class="table table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th ng-if="applicationState.application.endpointManagement"></th>
|
||||
<th ng-if="applicationState.application.endpointManagement">
|
||||
<input type="checkbox" ng-model="allSelected" ng-change="selectItems(allSelected)" />
|
||||
</th>
|
||||
<th>
|
||||
<a ui-sref="endpoints" ng-click="order('Name')">
|
||||
Name
|
||||
|
|
|
@ -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++;
|
||||
|
|
Loading…
Reference in New Issue