Fix display of backup warning

see cloudron/box#719
This commit is contained in:
Girish Ramakrishnan
2021-06-23 22:12:05 -07:00
parent 1a406c4d7d
commit 4dbd794b41
3 changed files with 2 additions and 22 deletions
+2 -1
View File
@@ -390,7 +390,8 @@
</span>
</p>
<p ng-hide="backupCheck.ok" class="text-danger" ng-bind-html="backupCheck.message | tr | markdown2html"></p>
<p ng-show="backupConfig.provider === 'noop'" class="text-danger" ng-bind-html="'backups.check.noop' | tr | markdown2html"></p>
<p ng-show="backupConfig.provider === 'filesystem'" class="text-danger" ng-bind-html="'backups.check.sameDisk' | tr | markdown2html"></p>
<div class="row">
<div class="col-xs-6">
-12
View File
@@ -13,7 +13,6 @@ angular.module('Application').controller('BackupsController', ['$scope', '$locat
$scope.manualBackupApps = [];
$scope.backupCheck = { ok: true, message: '' };
$scope.backupConfig = {};
$scope.backups = [];
@@ -698,7 +697,6 @@ angular.module('Application').controller('BackupsController', ['$scope', '$locat
$('#configureBackupModal').modal('hide');
getBackupConfig();
checkBackupConfig();
});
}
};
@@ -740,15 +738,6 @@ angular.module('Application').controller('BackupsController', ['$scope', '$locat
});
}
function checkBackupConfig() {
Client.checkBackupConfig(function (error, check) {
if (error) return console.error(error);
// { ok: bool, message: checkMessageTranslationKey }
$scope.backupCheck = check;
});
}
Client.onReady(function () {
Client.memory(function (error, memory) {
if (error) console.error(error);
@@ -757,7 +746,6 @@ angular.module('Application').controller('BackupsController', ['$scope', '$locat
fetchBackups();
getBackupConfig();
checkBackupConfig();
$scope.manualBackupApps = Client.getInstalledApps().filter(function (app) { return !app.enableBackup; });