@@ -57,9 +57,10 @@
-
+
diff --git a/app/components/service/includes/updateconfig.html b/app/components/service/includes/updateconfig.html
index 2fe2d89d8..0a0b9180d 100644
--- a/app/components/service/includes/updateconfig.html
+++ b/app/components/service/includes/updateconfig.html
@@ -1,4 +1,4 @@
-
+
diff --git a/app/components/service/service.html b/app/components/service/service.html
index e66b4f0b0..c854c8da1 100644
--- a/app/components/service/service.html
+++ b/app/components/service/service.html
@@ -111,7 +111,7 @@
Service labels
Secrets
Tasks
-
diff --git a/app/components/service/serviceController.js b/app/components/service/serviceController.js
index 535c10d60..a69c2fb78 100644
--- a/app/components/service/serviceController.js
+++ b/app/components/service/serviceController.js
@@ -1,6 +1,6 @@
angular.module('service', [])
-.controller('ServiceController', ['$q', '$scope', '$stateParams', '$state', '$location', '$anchorScroll', 'ServiceService', 'Secret', 'SecretHelper', 'Service', 'ServiceHelper', 'TaskService', 'NodeService', 'Notifications', 'Pagination', 'ModalService', 'ControllerDataPipeline',
-function ($q, $scope, $stateParams, $state, $location, $anchorScroll, ServiceService, Secret, SecretHelper, Service, ServiceHelper, TaskService, NodeService, Notifications, Pagination, ModalService, ControllerDataPipeline) {
+.controller('ServiceController', ['$q', '$scope', '$stateParams', '$state', '$location', '$timeout', '$anchorScroll', 'ServiceService', 'Secret', 'SecretHelper', 'Service', 'ServiceHelper', 'TaskService', 'NodeService', 'Notifications', 'Pagination', 'ModalService', 'ControllerDataPipeline',
+function ($q, $scope, $stateParams, $state, $location, $timeout, $anchorScroll, ServiceService, Secret, SecretHelper, Service, ServiceHelper, TaskService, NodeService, Notifications, Pagination, ModalService, ControllerDataPipeline) {
$scope.state = {};
$scope.state.pagination_count = Pagination.getPaginationCount('service_tasks');
@@ -37,7 +37,11 @@ function ($q, $scope, $stateParams, $state, $location, $anchorScroll, ServiceSer
};
$scope.goToItem = function(hash) {
- $anchorScroll(hash);
+ if ($location.hash() !== hash) {
+ $location.hash(hash);
+ } else {
+ $anchorScroll();
+ }
};
$scope.addEnvironmentVariable = function addEnvironmentVariable(service) {
@@ -291,15 +295,22 @@ function ($q, $scope, $stateParams, $state, $location, $anchorScroll, ServiceSer
.then(function success(data) {
$scope.tasks = data.tasks;
$scope.nodes = data.nodes;
+
$scope.secrets = data.secrets.map(function (secret) {
return new SecretViewModel(secret);
});
+
+ $timeout(function() {
+ $anchorScroll();
+ });
+
})
.catch(function error(err) {
$scope.secrets = [];
Notifications.error('Failure', err, 'Unable to retrieve service details');
})
.finally(function final() {
+
$('#loadingViewSpinner').hide();
});
}