From 1d8f51c14192ca3cc02c7a6f1bc1ecb6d027ade4 Mon Sep 17 00:00:00 2001 From: Anthony Lapenna Date: Wed, 10 Aug 2016 15:32:39 +1200 Subject: [PATCH 1/2] chore(gruntfile): revert commit to use minified libraries (#115) --- app/shared/services.js | 4 ++-- gruntFile.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/shared/services.js b/app/shared/services.js index c320812ac..7a323ba9e 100644 --- a/app/shared/services.js +++ b/app/shared/services.js @@ -98,7 +98,7 @@ angular.module('uifordocker.services', ['ngResource', 'ngSanitize']) inspect: {method: 'GET', params: {id: '@id', action: 'json'}}, create: { method: 'POST', params: {action: 'create', fromImage: '@fromImage', tag: '@tag'}, - isArray: true, transformResponse: createImageHandler, + isArray: true, transformResponse: createImageHandler }, remove: { method: 'DELETE', params: {id: '@id'}, @@ -112,7 +112,7 @@ angular.module('uifordocker.services', ['ngResource', 'ngSanitize']) return $resource(Settings.url + '/events', {}, { query: { method: 'GET', params: {since: '@since', until: '@until'}, - isArray: true, transformResponse: queryEventsHandler, + isArray: true, transformResponse: queryEventsHandler } }); }]) diff --git a/gruntFile.js b/gruntFile.js index 4af600813..86c2f3ebe 100644 --- a/gruntFile.js +++ b/gruntFile.js @@ -152,11 +152,11 @@ module.exports = function (grunt) { } }, angular: { - src: ['bower_components/angular/angular.js', + src: ['bower_components/angular/angular.min.js', 'bower_components/angular-sanitize/angular-sanitize.min.js', 'bower_components/angular-cookies/angular-cookies.min.js', 'bower_components/angular-ui-router/release/angular-ui-router.min.js', - 'bower_components/angular-resource/angular-resource.js', + 'bower_components/angular-resource/angular-resource.min.js', 'bower_components/angular-bootstrap/ui-bootstrap-tpls.min.js', 'bower_components/angular-ui-select/dist/select.min.js'], dest: '<%= distdir %>/js/angular.js' From 24a9e9f61c48f20657ec738c1764c62c0209d769 Mon Sep 17 00:00:00 2001 From: Anthony Lapenna Date: Wed, 10 Aug 2016 15:39:59 +1200 Subject: [PATCH 2/2] fix(dashboard): fix an error when no volumes are availables --- app/components/dashboard/dashboardController.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/components/dashboard/dashboardController.js b/app/components/dashboard/dashboardController.js index 2b3667304..0368f3ee2 100644 --- a/app/components/dashboard/dashboardController.js +++ b/app/components/dashboard/dashboardController.js @@ -50,7 +50,9 @@ function ($scope, $q, Config, Container, Image, Network, Volume, Info) { function prepareVolumeData(d) { var volumes = d.Volumes; - $scope.volumeData.total = volumes.length; + if (volumes) { + $scope.volumeData.total = volumes.length; + } } function prepareNetworkData(d) {