diff --git a/js/controllers.js b/js/controllers.js index 5bc07c993..54b4c4876 100644 --- a/js/controllers.js +++ b/js/controllers.js @@ -96,11 +96,20 @@ var ContainerController = (function (_super) { $scope.remove = function () { return _this.remove($scope, $routeParams, Container); }; + $scope.changes = []; + $scope.getChanges = function () { + Container.changes({ + id: $routeParams.id + }, function (d) { + $scope.changes = d; + }); + }; Container.get({ id: $routeParams.id }, function (d) { $scope.container = d; }); + $scope.getChanges(); } return ContainerController; })(ContainerControllerBase); diff --git a/js/controllers.ts b/js/controllers.ts index 47e5ae263..9b79e14c8 100644 --- a/js/controllers.ts +++ b/js/controllers.ts @@ -87,10 +87,19 @@ class ContainerController extends ContainerControllerBase { $scope.start = () => this.start($scope, $routeParams, Container); $scope.stop = () => this.stop($scope, $routeParams, Container); $scope.remove = () => this.remove($scope, $routeParams, Container); + $scope.changes = []; + + $scope.getChanges = () => { + Container.changes({id: $routeParams.id}, (d) => { + $scope.changes = d; + }); + }; Container.get({id: $routeParams.id}, (d) => { $scope.container = d; }); + + $scope.getChanges(); } } diff --git a/js/services.js b/js/services.js index 7c1f4c5f0..928b7c100 100644 --- a/js/services.js +++ b/js/services.js @@ -47,8 +47,9 @@ angular.module('dockerui.services', [ changes: { method: 'GET', params: { - action: 'chagnes' - } + action: 'changes' + }, + isArray: true }, create: { method: 'POST', diff --git a/js/services.ts b/js/services.ts index 074946e35..2f7c3d1ba 100644 --- a/js/services.ts +++ b/js/services.ts @@ -13,7 +13,7 @@ angular.module('dockerui.services', ['ngResource']) stop: {method: 'POST', params: {t: 5, action: 'stop'}}, restart: {method: 'POST', params: {t: 5, action: 'restart' }}, kill :{method: 'POST', params: {action:'kill'}}, - changes :{method: 'GET', params: {action:'chagnes'}}, + changes :{method: 'GET', params: {action:'changes'}, isArray: true}, create :{method: 'POST', params: {action:'create'}}, remove :{method: 'DELETE', params: {v:0}} }); diff --git a/partials/container.html b/partials/container.html index e0635ec8d..b72d3789e 100644 --- a/partials/container.html +++ b/partials/container.html @@ -33,10 +33,28 @@