diff --git a/app/components/container/containerController.js b/app/components/container/containerController.js index 8f46d2211..b384b6a3f 100644 --- a/app/components/container/containerController.js +++ b/app/components/container/containerController.js @@ -1,6 +1,6 @@ angular.module('container', []) - .controller('ContainerController', ['$scope', '$routeParams', '$location', 'Container', 'ContainerCommit', 'Messages', 'ViewSpinner', - function ($scope, $routeParams, $location, Container, ContainerCommit, Messages, ViewSpinner) { + .controller('ContainerController', ['$scope', '$routeParams', '$location', 'Container', 'ContainerCommit', 'Messages', 'ViewSpinner', '$timeout', + function ($scope, $routeParams, $location, Container, ContainerCommit, Messages, ViewSpinner, $timeout) { $scope.changes = []; $scope.edit = false; @@ -94,6 +94,7 @@ angular.module('container', []) ViewSpinner.spin(); Container.remove({id: $routeParams.id}, function (d) { update(); + $location.path('/containers'); Messages.send("Container removed", $routeParams.id); }, function (e) { update(); diff --git a/app/components/dashboard/dashboard.html b/app/components/dashboard/dashboard.html index 8b2209e6d..b538eee3a 100644 --- a/app/components/dashboard/dashboard.html +++ b/app/components/dashboard/dashboard.html @@ -7,7 +7,7 @@
diff --git a/app/shared/services.js b/app/shared/services.js index e0775de67..e3e73a480 100644 --- a/app/shared/services.js +++ b/app/shared/services.js @@ -228,6 +228,7 @@ angular.module('dockerui.services', ['ngResource']) max = map[k]; } } + var steps = Math.min(max, 10); var dataset = { fillColor: "rgba(151,187,205,0.5)", strokeColor: "rgba(151,187,205,1)", @@ -240,10 +241,11 @@ angular.module('dockerui.services', ['ngResource']) datasets: [dataset] }, { - scaleStepWidth: 1, + scaleStepWidth: Math.ceil(max / steps), pointDotRadius: 1, + scaleIntegersOnly: true, scaleOverride: true, - scaleSteps: max + scaleSteps: steps }); } }; diff --git a/gruntFile.js b/gruntFile.js index f184ed9c7..605539f4d 100644 --- a/gruntFile.js +++ b/gruntFile.js @@ -14,8 +14,27 @@ module.exports = function (grunt) { // Default task. grunt.registerTask('default', ['jshint', 'build', 'karma:unit']); - grunt.registerTask('build', ['clean:app', 'if:binaryNotExist', 'html2js', 'concat', 'clean:tmpl', 'recess:build', 'copy']); - grunt.registerTask('release', ['clean:all', 'if:binaryNotExist', 'html2js', 'uglify', 'clean:tmpl', 'jshint', 'karma:unit', 'concat:index', 'recess:min', 'copy']); + grunt.registerTask('build', [ + 'clean:app', + 'if:binaryNotExist', + 'html2js', + 'concat', + 'clean:tmpl', + 'recess:build', + 'copy' + ]); + grunt.registerTask('release', [ + 'clean:all', + 'if:binaryNotExist', + 'html2js', + 'uglify', + 'clean:tmpl', + 'jshint', + 'karma:unit', + 'concat:index', + 'recess:min', + 'copy' + ]); grunt.registerTask('test-watch', ['karma:watch']); grunt.registerTask('run', ['if:binaryNotExist', 'build', 'shell:buildImage', 'shell:run']); grunt.registerTask('run-dev', ['if:binaryNotExist', 'shell:buildImage', 'shell:run', 'watch:build']);