From c10dc38a89f56eaf6754d847dc61edf030305559 Mon Sep 17 00:00:00 2001 From: "Fredin, Brock" Date: Tue, 12 May 2015 00:52:12 -0500 Subject: [PATCH 1/3] Restart Feature - Implementing restart feature for single containers --- app/components/container/container.html | 4 ++++ app/components/container/containerController.js | 11 +++++++++++ 2 files changed, 15 insertions(+) diff --git a/app/components/container/container.html b/app/components/container/container.html index 5d9b16401..299daa06b 100644 --- a/app/components/container/container.html +++ b/app/components/container/container.html @@ -40,6 +40,10 @@ ng-click="unpause()" ng-show="container.State.Running && container.State.Paused">Unpause + diff --git a/app/components/container/containerController.js b/app/components/container/containerController.js index e79ea8c77..80ff158f7 100644 --- a/app/components/container/containerController.js +++ b/app/components/container/containerController.js @@ -91,6 +91,17 @@ function($scope, $routeParams, $location, Container, Messages, ViewSpinner) { }); }; + $scope.restart = function() { + ViewSpinner.spin(); + Container.restart({id: $routeParams.id}, function(d) { + update(); + Messages.send("Container restarted", $routeParams.id); + }, function(e){ + update(); + Messages.error("Failure", "Container failed to restart." + e.data); + }); + }; + $scope.hasContent = function(data) { return data !== null && data !== undefined; }; From f167f5b49ed89418225bee9dab7e967b9c47c6df Mon Sep 17 00:00:00 2001 From: "Fredin, Brock" Date: Thu, 14 May 2015 00:21:53 -0500 Subject: [PATCH 2/3] DockerUI - Comment in Services was broken link. Updated the comment to include the most accurate link representing the Docker API reference material --- app/shared/services.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/shared/services.js b/app/shared/services.js index 5ed45934b..59bd02209 100644 --- a/app/shared/services.js +++ b/app/shared/services.js @@ -2,7 +2,7 @@ angular.module('dockerui.services', ['ngResource']) .factory('Container', function ($resource, Settings) { 'use strict'; // Resource for interacting with the docker containers - // http://docs.docker.io/en/latest/api/docker_remote_api.html#containers + // https://docs.docker.com/reference/api/docker_remote_api/ return $resource(Settings.url + '/containers/:id/:action', { name: '@name' }, { From 74c92de1d38bc2cf61fce76bacb3523958c01e38 Mon Sep 17 00:00:00 2001 From: "Fredin, Brock" Date: Thu, 14 May 2015 00:27:55 -0500 Subject: [PATCH 3/3] Revert "DockerUI - Comment in Services was broken link. Updated the comment to include the most accurate link representing the Docker API reference material" This reverts commit f167f5b49ed89418225bee9dab7e967b9c47c6df. --- app/shared/services.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/shared/services.js b/app/shared/services.js index 59bd02209..5ed45934b 100644 --- a/app/shared/services.js +++ b/app/shared/services.js @@ -2,7 +2,7 @@ angular.module('dockerui.services', ['ngResource']) .factory('Container', function ($resource, Settings) { 'use strict'; // Resource for interacting with the docker containers - // https://docs.docker.com/reference/api/docker_remote_api/ + // http://docs.docker.io/en/latest/api/docker_remote_api.html#containers return $resource(Settings.url + '/containers/:id/:action', { name: '@name' }, {