1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-07-23 15:29:42 +02:00

fix(service-details): fix the ability to sort tasks (#931)

This commit is contained in:
Anthony Lapenna 2017-06-15 22:52:49 +02:00 committed by GitHub
parent b316efe80b
commit d8f8ab785c
2 changed files with 10 additions and 10 deletions

View file

@ -18,28 +18,28 @@
<tr> <tr>
<th>Id</th> <th>Id</th>
<th> <th>
<a ui-sref="service" ng-click="order('Status')"> <a ng-click="order('Status.State')">
Status Status
<span ng-show="sortType == 'Status' && !sortReverse" class="glyphicon glyphicon-chevron-down"></span> <span ng-show="sortType == 'Status.State' && !sortReverse" class="glyphicon glyphicon-chevron-down"></span>
<span ng-show="sortType == 'Status' && sortReverse" class="glyphicon glyphicon-chevron-up"></span> <span ng-show="sortType == 'Status.State' && sortReverse" class="glyphicon glyphicon-chevron-up"></span>
</a> </a>
</th> </th>
<th ng-if="service.Mode !== 'global'"> <th ng-if="service.Mode !== 'global'">
<a ui-sref="service" ng-click="order('Slot')"> <a ng-click="order('Slot')">
Slot Slot
<span ng-show="sortType == 'Slot' && !sortReverse" class="glyphicon glyphicon-chevron-down"></span> <span ng-show="sortType == 'Slot' && !sortReverse" class="glyphicon glyphicon-chevron-down"></span>
<span ng-show="sortType == 'Slot' && sortReverse" class="glyphicon glyphicon-chevron-up"></span> <span ng-show="sortType == 'Slot' && sortReverse" class="glyphicon glyphicon-chevron-up"></span>
</a> </a>
</th> </th>
<th> <th>
<a ui-sref="service" ng-click="order('Node')"> <a ng-click="order('NodeId')">
Node Node
<span ng-show="sortType == 'Node' && !sortReverse" class="glyphicon glyphicon-chevron-down"></span> <span ng-show="sortType == 'NodeId' && !sortReverse" class="glyphicon glyphicon-chevron-down"></span>
<span ng-show="sortType == 'Node' && sortReverse" class="glyphicon glyphicon-chevron-up"></span> <span ng-show="sortType == 'NodeId' && sortReverse" class="glyphicon glyphicon-chevron-up"></span>
</a> </a>
</th> </th>
<th> <th>
<a ui-sref="service" ng-click="order('Updated')"> <a ng-click="order('Updated')">
Last update Last update
<span ng-show="sortType == 'Updated' && !sortReverse" class="glyphicon glyphicon-chevron-down"></span> <span ng-show="sortType == 'Updated' && !sortReverse" class="glyphicon glyphicon-chevron-down"></span>
<span ng-show="sortType == 'Updated' && sortReverse" class="glyphicon glyphicon-chevron-up"></span> <span ng-show="sortType == 'Updated' && sortReverse" class="glyphicon glyphicon-chevron-up"></span>

View file

@ -5,8 +5,8 @@ function ($q, $scope, $stateParams, $state, $location, $anchorScroll, ServiceSer
$scope.state = {}; $scope.state = {};
$scope.state.pagination_count = Pagination.getPaginationCount('service_tasks'); $scope.state.pagination_count = Pagination.getPaginationCount('service_tasks');
$scope.tasks = []; $scope.tasks = [];
$scope.sortType = 'Status'; $scope.sortType = 'Updated';
$scope.sortReverse = false; $scope.sortReverse = true;
$scope.lastVersion = 0; $scope.lastVersion = 0;