backups: memory max is RAM

This commit is contained in:
Girish Ramakrishnan
2024-04-10 12:48:07 +02:00
parent efd0be5e2c
commit f236213356
+2 -2
View File
@@ -848,8 +848,8 @@ angular.module('Application').controller('BackupsController', ['$scope', '$locat
if (error) console.error(error);
$scope.memory = memory;
const limit = Math.max((memory.memory + memory.swap) * 1.5, 2 * 1024 * 1024);
$scope.MAX_MEMORY_LIMIT = parseInt(limit/1024/1024/1024) * 1024 * 1024 * 1024; // round to value matching 250mb steps
var nearestGb = Math.ceil($scope.memory.memory / (1024*1024*1024)) * 1024 * 1024 * 1024;
$scope.MAX_MEMORY_LIMIT = nearestGb;
fetchBackups();
getBackupConfig();