webadmin: only show backup settings notification in settings view
This commit is contained in:
@@ -13,7 +13,7 @@ var app = angular.module('Application', ['ngRoute', 'ngAnimate', 'ngSanitize', '
|
||||
|
||||
app.config(['NotificationProvider', function (NotificationProvider) {
|
||||
NotificationProvider.setOptions({
|
||||
delay: 10000,
|
||||
delay: 5000,
|
||||
startTop: 60,
|
||||
positionX: 'left',
|
||||
maxCount: 3,
|
||||
|
||||
@@ -70,17 +70,7 @@ angular.module('Application').controller('MainController', ['$scope', '$route',
|
||||
};
|
||||
|
||||
function runConfigurationChecks() {
|
||||
// Check if a proper storage backend is configured
|
||||
Client.getBackupConfig(function (error, result) {
|
||||
if (error) return console.error(error);
|
||||
|
||||
if (result.provider === 'filesystem') {
|
||||
var actionScope = $scope.$new(true);
|
||||
actionScope.action = '/#/settings';
|
||||
|
||||
Client.notify('Backup Configuration', 'Please setup an external backup storage to avoid data loss', true, 'info', actionScope);
|
||||
}
|
||||
});
|
||||
|
||||
// Check if all email DNS records are set up properly
|
||||
Client.getMailConfig(function (error, mailConfig) {
|
||||
|
||||
@@ -473,6 +473,14 @@ angular.module('Application').controller('SettingsController', ['$scope', '$loca
|
||||
if (error) return console.error(error);
|
||||
|
||||
$scope.backupConfig = backupConfig;
|
||||
|
||||
// Check if a proper storage backend is configured
|
||||
if (backupConfig.provider === 'filesystem') {
|
||||
var actionScope = $scope.$new(true);
|
||||
actionScope.action = '/#/settings';
|
||||
|
||||
Client.notify('Backup Configuration', 'Please setup an external backup storage to avoid data loss', false, 'info', actionScope);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user