diff --git a/app/components/service/service.html b/app/components/service/service.html
index ba298a3d9..841fb4b44 100644
--- a/app/components/service/service.html
+++ b/app/components/service/service.html
@@ -38,8 +38,6 @@
ID |
{{ service.Id }}
-
-
|
@@ -73,11 +71,17 @@
ng-model="service.Image" ng-change="updateServiceAttribute(service, 'Image')" id="image_name" ng-disabled="isUpdating">
-
+
-
+ Service logs
+
+
|
diff --git a/app/components/service/serviceController.js b/app/components/service/serviceController.js
index 2c4a5602e..e39b4a76f 100644
--- a/app/components/service/serviceController.js
+++ b/app/components/service/serviceController.js
@@ -2,7 +2,11 @@ angular.module('service', [])
.controller('ServiceController', ['$q', '$scope', '$transition$', '$state', '$location', '$timeout', '$anchorScroll', 'ServiceService', 'ConfigService', 'ConfigHelper', 'SecretService', 'ImageService', 'SecretHelper', 'Service', 'ServiceHelper', 'LabelHelper', 'TaskService', 'NodeService', 'Notifications', 'ModalService', 'PluginService',
function ($q, $scope, $transition$, $state, $location, $timeout, $anchorScroll, ServiceService, ConfigService, ConfigHelper, SecretService, ImageService, SecretHelper, Service, ServiceHelper, LabelHelper, TaskService, NodeService, Notifications, ModalService, PluginService) {
- $scope.state = {};
+ $scope.state = {
+ updateInProgress: false,
+ deletionInProgress: false
+ };
+
$scope.tasks = [];
$scope.availableImages = [];
@@ -328,6 +332,7 @@ function ($q, $scope, $transition$, $state, $location, $timeout, $anchorScroll,
};
function removeService() {
+ $scope.state.deletionInProgress = true;
ServiceService.remove($scope.service)
.then(function success(data) {
Notifications.success('Service successfully deleted');
@@ -335,6 +340,9 @@ function ($q, $scope, $transition$, $state, $location, $timeout, $anchorScroll,
})
.catch(function error(err) {
Notifications.error('Failure', err, 'Unable to remove service');
+ })
+ .finally(function final() {
+ $scope.state.deletionInProgress = false;
});
}
@@ -353,6 +361,7 @@ function ($q, $scope, $transition$, $state, $location, $timeout, $anchorScroll,
// As explained in https://github.com/docker/swarmkit/issues/2364 ForceUpdate can accept a random
// value or an increment of the counter value to force an update.
config.TaskTemplate.ForceUpdate++;
+ $scope.state.updateInProgress = true;
ServiceService.update(service, config)
.then(function success(data) {
Notifications.success('Service successfully updated', service.Name);
@@ -361,6 +370,9 @@ function ($q, $scope, $transition$, $state, $location, $timeout, $anchorScroll,
})
.catch(function error(err) {
Notifications.error('Failure', err, 'Unable to force update service', service.Name);
+ })
+ .finally(function final() {
+ $scope.state.updateInProgress = false;
});
}
diff --git a/app/directives/ui/datatables/services-datatable/servicesDatatable.html b/app/directives/ui/datatables/services-datatable/servicesDatatable.html
index bd458edd2..82b9c97d3 100644
--- a/app/directives/ui/datatables/services-datatable/servicesDatatable.html
+++ b/app/directives/ui/datatables/services-datatable/servicesDatatable.html
@@ -12,14 +12,16 @@
-
-
+
+
+
+