diff --git a/src/js/client.js b/src/js/client.js index 1e1fdfd71..91f18fe56 100644 --- a/src/js/client.js +++ b/src/js/client.js @@ -1016,8 +1016,8 @@ angular.module('Application').service('Client', ['$http', '$interval', '$timeout }); }; - Client.prototype.configureService = function (serviceName, memoryLimit, callback) { - post('/api/v1/services/' + serviceName, { memory: memoryLimit }, null, function (error, data, status) { + Client.prototype.configureService = function (serviceName, data, callback) { + post('/api/v1/services/' + serviceName, data, null, function (error, data, status) { if (error) return callback(error); if (status !== 202) return callback(new ClientError(status, data)); diff --git a/src/views/app.html b/src/views/app.html index c02834eb9..322589e76 100644 --- a/src/views/app.html +++ b/src/views/app.html @@ -544,7 +544,6 @@

Cloudron allocates 50% of this value as RAM and 50% as swap.

-
diff --git a/src/views/system.html b/src/views/system.html index 93931fcb5..0eea4d1b6 100644 --- a/src/views/system.html +++ b/src/views/system.html @@ -30,8 +30,7 @@
-

Cloudron allocates 50% of this value as RAM and 50% as swap.

-
+

Cloudron allocates 50% of this value as RAM and 50% as swap.

@@ -106,7 +105,7 @@
- {{ service.config.memory / 1024 / 1024 + ' MB' }} + {{ service.config.memorySwap / 1024 / 1024 + ' MB' }} diff --git a/src/views/system.js b/src/views/system.js index 526a5eb14..4396b6b11 100644 --- a/src/views/system.js +++ b/src/views/system.js @@ -89,7 +89,7 @@ angular.module('Application').controller('SystemController', ['$scope', '$locati $scope.serviceConfigure.reset(); $scope.serviceConfigure.service = service; - $scope.serviceConfigure.memoryLimit = service.config.memory; + $scope.serviceConfigure.memoryLimit = service.config.memorySwap; // memory + swap // TODO improve those $scope.serviceConfigure.memoryTicks = []; @@ -109,7 +109,7 @@ angular.module('Application').controller('SystemController', ['$scope', '$locati $scope.serviceConfigure.busy = true; $scope.serviceConfigure.error = null; - Client.configureService($scope.serviceConfigure.service.name, memoryLimit, function (error) { + Client.configureService($scope.serviceConfigure.service.name, { memorySwap: memoryLimit, memory: memoryLimit/2 }, function (error) { $scope.serviceConfigure.busy = false; if (error) { $scope.serviceConfigure.error = error.message;