diff --git a/app/components/networks/networks.html b/app/components/networks/networks.html index 6cfe2eb85..138ef70de 100644 --- a/app/components/networks/networks.html +++ b/app/components/networks/networks.html @@ -9,7 +9,6 @@
  • Remove
  • -
    @@ -20,18 +19,60 @@ - - - - - - - - + + + + + + + + - + diff --git a/app/components/networks/networksController.js b/app/components/networks/networksController.js index fa8551cb9..6f0f7729e 100644 --- a/app/components/networks/networksController.js +++ b/app/components/networks/networksController.js @@ -1,12 +1,17 @@ angular.module('networks', []).config(['$routeProvider', function ($routeProvider) { - $routeProvider.when('/networks', { + $routeProvider.when('/networks/', { templateUrl: 'app/components/networks/networks.html', controller: 'NetworksController' }); }]).controller('NetworksController', ['$scope', 'Network', 'ViewSpinner', 'Messages', '$route', 'errorMsgFilter', function ($scope, Network, ViewSpinner, Messages, $route, errorMsgFilter) { + $scope.sortType = 'Name'; + $scope.sortReverse = true; $scope.toggle = false; - $scope.predicate = '-Created'; + $scope.order = function(sortType) { + $scope.sortReverse = ($scope.sortType === sortType) ? !$scope.sortReverse : false; + $scope.sortType = sortType; + }; $scope.createNetworkConfig = { "Name": '', "Driver": '', diff --git a/app/components/volumes/volumes.html b/app/components/volumes/volumes.html index af8921776..d017972d5 100644 --- a/app/components/volumes/volumes.html +++ b/app/components/volumes/volumes.html @@ -19,14 +19,32 @@
    SelectNameIdScopeDriverIPAM DriverIPAM SubnetIPAM Gateway + + Name + + + + + + Id + + + + + + Scope + + + + + + Driver + + + + + + IPAM Driver + + + + + + IPAM Subnet + + + + + + IPAM Gateway + + + +
    {{ network.Name|truncate:20}} {{ network.Id }}
    - - - - + + + + - + diff --git a/app/components/volumes/volumesController.js b/app/components/volumes/volumesController.js index bed59316a..6c9dd34e7 100644 --- a/app/components/volumes/volumesController.js +++ b/app/components/volumes/volumesController.js @@ -1,12 +1,17 @@ angular.module('volumes', []).config(['$routeProvider', function ($routeProvider) { - $routeProvider.when('/volumes', { + $routeProvider.when('/volumes/', { templateUrl: 'app/components/volumes/volumes.html', controller: 'VolumesController' }); }]).controller('VolumesController', ['$scope', 'Volume', 'ViewSpinner', 'Messages', '$route', 'errorMsgFilter', function ($scope, Volume, ViewSpinner, Messages, $route, errorMsgFilter) { + $scope.sortType = 'Name'; + $scope.sortReverse = true; $scope.toggle = false; - $scope.predicate = '-Created'; + $scope.order = function(sortType) { + $scope.sortReverse = ($scope.sortType === sortType) ? !$scope.sortReverse : false; + $scope.sortType = sortType; + }; $scope.createVolumeConfig = { "Name": "", "Driver": ""
    SelectNameDriverMountpoint + + Name + + + + + + Driver + + + + + + Mountpoint + + + +
    {{ volume.Name|truncate:20 }} {{ volume.Driver }}