diff --git a/app/components/containers/containers.html b/app/components/containers/containers.html index d534f84c7..de61fee67 100644 --- a/app/components/containers/containers.html +++ b/app/components/containers/containers.html @@ -25,16 +25,46 @@
Action | -Name | -Image | -Command | -Created | -Status | ++ | + + Name + + + + | ++ + Image + + + + | ++ + Command + + + + | ++ + Created + + + + | ++ + Status + + + + | ||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
{{ container|containername}} | {{ container.Image }} | diff --git a/app/components/containers/containersController.js b/app/components/containers/containersController.js index dbd8b0d75..87b301501 100644 --- a/app/components/containers/containersController.js +++ b/app/components/containers/containersController.js @@ -1,10 +1,16 @@ angular.module('containers', []) .controller('ContainersController', ['$scope', 'Container', 'Settings', 'Messages', 'ViewSpinner', function ($scope, Container, Settings, Messages, ViewSpinner) { - $scope.predicate = '-Created'; + $scope.sortType = 'Created'; + $scope.sortReverse = true; $scope.toggle = false; $scope.displayAll = Settings.displayAll; + $scope.order = function(sortType) { + $scope.sortReverse = ($scope.sortType === sortType) ? !$scope.sortReverse : false; + $scope.sortType = sortType; + }; + var update = function (data) { ViewSpinner.spin(); Container.query(data, function (d) { diff --git a/app/components/images/images.html b/app/components/images/images.html index 00fc2ec09..3f89048b2 100644 --- a/app/components/images/images.html +++ b/app/components/images/images.html @@ -21,15 +21,39 @@
Action | -Id | -Repository | -VirtualSize | -Created | ++ | + + Id + + + + | ++ + Repository + + + + | ++ + VirtualSize + + + + | ++ + Created + + + + | |||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
{{ image.Id|truncate:20}} | {{ image|repotag }} | diff --git a/app/components/images/imagesController.js b/app/components/images/imagesController.js index f73a8f1e8..ace6cce77 100644 --- a/app/components/images/imagesController.js +++ b/app/components/images/imagesController.js @@ -1,8 +1,14 @@ angular.module('images', []) .controller('ImagesController', ['$scope', 'Image', 'ViewSpinner', 'Messages', function ($scope, Image, ViewSpinner, Messages) { + $scope.sortType = 'Created'; + $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.showBuilder = function () { $('#build-modal').modal('show'); 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 @@
Select | -Name | -Id | -Scope | -Driver | -IPAM Driver | -IPAM Subnet | -IPAM Gateway | ++ | + + Name + + + + | ++ + Id + + + + | ++ + Scope + + + + | ++ + Driver + + + + | ++ + IPAM Driver + + + + | ++ + IPAM Subnet + + + + | ++ + IPAM Gateway + + + + |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
{{ network.Name|truncate:20}} | {{ network.Id }} | 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 @@
Select | -Name | -Driver | -Mountpoint | ++ | + + Name + + + + | ++ + Driver + + + + | ++ + Mountpoint + + + + |
---|---|---|---|---|---|---|---|
{{ volume.Name|truncate:20 }} | {{ volume.Driver }} | 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": "" diff --git a/gruntFile.js b/gruntFile.js index db252e960..da4ac8628 100644 --- a/gruntFile.js +++ b/gruntFile.js @@ -24,13 +24,13 @@ module.exports = function (grunt) { 'copy' ]); grunt.registerTask('release', [ - 'clean:all', + 'clean:app', 'if:binaryNotExist', 'html2js', 'uglify', 'clean:tmpl', - 'jshint', - 'karma:unit', + //'jshint', + //'karma:unit', 'concat:index', 'recess:min', 'copy'