webadmin: only show backup settings notification in settings view

This commit is contained in:
Johannes Zellner
2017-01-28 19:22:56 -08:00
parent e14b59af5d
commit c581e0ad09
3 changed files with 9 additions and 11 deletions

View File

@@ -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,

View File

@@ -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) {

View File

@@ -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);
}
});
}