diff --git a/src/translation/en.json b/src/translation/en.json index 16c011793..0215149c4 100644 --- a/src/translation/en.json +++ b/src/translation/en.json @@ -676,7 +676,9 @@ "accessControl": "Access Control", "accessControlDescription": "Allowing non-admins to access SFTP will let them read application config files and secret keys. For some apps like WordPress, they can also log the password.", "requireAdminRoleLabel": "Require admin role to access SFTP", - "resetToDefaults": "Reset to default" + "resetToDefaults": "Reset to default", + "enableRecoveryMode": "Enable Recovery Mode", + "recoveryModeDescription": "If the service is constantly restarting or not responding because of data corruption, place the service in recovery mode. Use the following instructions to get the service running again." }, "refresh": "Refresh" }, diff --git a/src/views/services.html b/src/views/services.html index d131f8441..4f4fabded 100644 --- a/src/views/services.html +++ b/src/views/services.html @@ -20,13 +20,23 @@ +
+
+
+ +
+

+
+ @@ -92,7 +102,7 @@ - + @@ -120,7 +130,7 @@ - + diff --git a/src/views/services.js b/src/views/services.js index e88a92b08..635f8f832 100644 --- a/src/views/services.js +++ b/src/views/services.js @@ -20,7 +20,7 @@ angular.module('Application').controller('ServicesController', ['$scope', '$loca if (error) return console.log('Error getting status of ' + serviceName + ':' + error.message); var service = $scope.services.find(function (s) { return s.name === serviceName; }); - if (!service) $scope.services.find(function (s) { return s.name === serviceName; }); + if (!service) $scope.services[serviceName] = service; service.status = result.status; service.config = result.config; @@ -69,13 +69,15 @@ angular.module('Application').controller('ServicesController', ['$scope', '$loca memoryLimit: 0, memoryTicks: [], + recoveryMode: false, + show: function (service) { $scope.serviceConfigure.reset(); $scope.serviceConfigure.service = service; $scope.serviceConfigure.memoryLimit = service.config.memoryLimit; + $scope.serviceConfigure.recoveryMode = !!service.config.recoveryMode; - // TODO improve those $scope.serviceConfigure.memoryTicks = []; // create ticks starting from manifest memory limit. the memory limit here is currently split into ram+swap (and thus *2 below) @@ -89,11 +91,14 @@ angular.module('Application').controller('ServicesController', ['$scope', '$loca $('#serviceConfigureModal').modal('show'); }, - submit: function (memoryLimit) { + submit: function () { $scope.serviceConfigure.busy = true; $scope.serviceConfigure.error = null; - var data = { memoryLimit: memoryLimit }; + var data = { + memoryLimit: $scope.serviceConfigure.memoryLimit, + recoveryMode: $scope.serviceConfigure.recoveryMode + }; Client.configureService($scope.serviceConfigure.service.name, data, function (error) { $scope.serviceConfigure.busy = false;