Show backup notification in main.js instead

This commit is contained in:
Girish Ramakrishnan
2018-06-14 12:59:25 -07:00
parent 1039d9c95e
commit 9db334c2a4
2 changed files with 9 additions and 14 deletions

View File

@@ -89,9 +89,17 @@ angular.module('Application').controller('MainController', ['$scope', '$route',
if (backupConfig.provider === 'noop') {
var actionScope = $scope.$new(true);
actionScope.action = '/#/settings';
actionScope.action = '/#/backups';
Client.notify('Backup Configuration', 'Cloudron backups are disabled. Ensure the server is backed up using alternate means.', false, 'info', actionScope);
} else if (backupConfig.provider === 'filesystem' && !backupConfig.externalDisk) {
var actionScope = $scope.$new(true);
actionScope.action = '/#/backups';
Client.notify('Backup Configuration',
'Cloudron backups are currently on the same disk as the Cloudron server instance. This is dangerous and can lead to complete data loss if the disk fails.' +
'Please setup an external backup storage (or use server snapshots) and confirm this in backup configuration',
false /* persistent */, 'info', actionScope);
}
});
}