mirror of
https://github.com/portainer/portainer.git
synced 2025-08-02 20:35:25 +02:00
feat(UX): add pagination for all object lists (#352)
This commit is contained in:
parent
13a8b11d3d
commit
913c580340
27 changed files with 86 additions and 31 deletions
|
@ -98,7 +98,7 @@
|
|||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr ng-repeat="image in (state.filteredImages = (images | filter:state.filter | orderBy:sortType:sortReverse))">
|
||||
<tr dir-paginate="image in (state.filteredImages = (images | filter:state.filter | orderBy:sortType:sortReverse | itemsPerPage: pagination_count))">
|
||||
<td><input type="checkbox" ng-model="image.Checked" ng-change="selectItem(image)" /></td>
|
||||
<td><a ui-sref="image({id: image.Id})">{{ image.Id|truncate:20}}</a></td>
|
||||
<td>
|
||||
|
@ -115,6 +115,9 @@
|
|||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<div ng-if="images" class="pull-left pagination-controls">
|
||||
<dir-pagination-controls></dir-pagination-controls>
|
||||
</div>
|
||||
</div>
|
||||
</rd-widget-body>
|
||||
<rd-widget>
|
||||
|
|
|
@ -1,10 +1,11 @@
|
|||
angular.module('images', [])
|
||||
.controller('ImagesController', ['$scope', '$state', 'Config', 'Image', 'Messages',
|
||||
function ($scope, $state, Config, Image, Messages) {
|
||||
.controller('ImagesController', ['$scope', '$state', 'Config', 'Image', 'Messages', 'Settings',
|
||||
function ($scope, $state, Config, Image, Messages, Settings) {
|
||||
$scope.state = {};
|
||||
$scope.sortType = 'RepoTags';
|
||||
$scope.sortReverse = true;
|
||||
$scope.state.selectedItemCount = 0;
|
||||
$scope.pagination_count = Settings.pagination_count;
|
||||
|
||||
$scope.config = {
|
||||
Image: '',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue