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">
|
<table class="table table-hover">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<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>
|
<th>
|
||||||
<a ui-sref="endpoints" ng-click="order('Name')">
|
<a ui-sref="endpoints" ng-click="order('Name')">
|
||||||
Name
|
Name
|
||||||
|
|
|
@ -28,6 +28,15 @@ function ($scope, $state, EndpointService, EndpointProvider, Messages, Paginatio
|
||||||
Pagination.setPaginationCount('endpoints', $scope.state.pagination_count);
|
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) {
|
$scope.selectItem = function (item) {
|
||||||
if (item.Checked) {
|
if (item.Checked) {
|
||||||
$scope.state.selectedItemCount++;
|
$scope.state.selectedItemCount++;
|
||||||
|
|
Loading…
Reference in New Issue