Show critical backup config warning directly in backup ui instead of notification

This commit is contained in:
Johannes Zellner
2020-07-28 18:08:57 +02:00
parent 6df2985e2a
commit 03bdcc786e
3 changed files with 22 additions and 0 deletions

View File

@@ -12,6 +12,7 @@ angular.module('Application').controller('BackupsController', ['$scope', '$locat
$scope.manualBackupApps = [];
$scope.backupCheck = { ok: true, message: '' };
$scope.backupConfig = {};
$scope.backups = [];
@@ -544,6 +545,7 @@ angular.module('Application').controller('BackupsController', ['$scope', '$locat
$('#configureBackupModal').modal('hide');
getBackupConfig();
checkBackupConfig();
});
}
};
@@ -578,9 +580,18 @@ angular.module('Application').controller('BackupsController', ['$scope', '$locat
});
}
function checkBackupConfig() {
Client.checkBackupConfig(function (error, check) {
if (error) return console.error(error);
$scope.backupCheck = check;
});
}
Client.onReady(function () {
fetchBackups();
getBackupConfig();
checkBackupConfig();
$scope.manualBackupApps = Client.getInstalledApps().filter(function (app) { return !app.enableBackup; });