backups: make ui show min 1GB

This commit is contained in:
Girish Ramakrishnan
2024-02-19 17:06:33 +01:00
parent 450dd70ea2
commit 298d446e5f
2 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -391,10 +391,10 @@
<div uib-collapse="!configureBackup.advancedVisible">
<div class="form-group">
<label class="control-label">{{ 'backups.configureBackupStorage.memoryLimit' | tr }}: <b>{{ configureBackup.memoryLimit | prettyBinarySize:'800 MB' }}</b></label>
<label class="control-label">{{ 'backups.configureBackupStorage.memoryLimit' | tr }}: <b>{{ configureBackup.memoryLimit | prettyBinarySize:'1024 MB' }}</b></label>
<p class="small">{{ 'backups.configureBackupStorage.memoryLimitDescription' | tr }}</p>
<div style="padding: 0 10px;">
<slider id="sliderConfigureBackupMemoryLimit" ng-model="configureBackup.memoryLimit" step="134217728" tooltip="hide" ticks="configureBackup.memoryTicks" ticks-snap-bounds="67108864"></slider>
<slider id="sliderConfigureBackupMemoryLimit" ng-model="configureBackup.memoryLimit" step="536870912" tooltip="hide" ticks="configureBackup.memoryTicks" ticks-snap-bounds="67108864"></slider>
</div>
</div>
+2 -2
View File
@@ -7,7 +7,7 @@ angular.module('Application').controller('BackupsController', ['$scope', '$locat
Client.onReady(function () { if (!Client.getUserInfo().isAtLeastAdmin) $location.path('/'); });
$scope.SECRET_PLACEHOLDER = SECRET_PLACEHOLDER;
$scope.MIN_MEMORY_LIMIT = 800 * 1024 * 1024;
$scope.MIN_MEMORY_LIMIT = 1000 * 1024 * 1024;
$scope.config = Client.getConfig();
$scope.user = Client.getUserInfo();
@@ -541,7 +541,7 @@ angular.module('Application').controller('BackupsController', ['$scope', '$locat
$scope.configureBackup.chown = $scope.backupConfig.chown;
var limits = $scope.backupConfig.limits || {};
$scope.configureBackup.memoryLimit = limits.memoryLimit;
$scope.configureBackup.memoryLimit = Math.max(limits.memoryLimit, $scope.MIN_MEMORY_LIMIT);
$scope.configureBackup.uploadPartSize = limits.uploadPartSize || ($scope.configureBackup.provider === 'scaleway-objectstorage' ? 100 * 1024 * 1024 : 10 * 1024 * 1024);
$scope.configureBackup.downloadConcurrency = limits.downloadConcurrency || ($scope.backupConfig.provider === 's3' ? 30 : 10);