diff --git a/webadmin/src/js/client.js b/webadmin/src/js/client.js index a45e1a2f0..bcf142d78 100644 --- a/webadmin/src/js/client.js +++ b/webadmin/src/js/client.js @@ -165,6 +165,7 @@ angular.module('Application').service('Client', ['$http', 'md5', 'Notification', if (type === 'error') Notification.error(options); else if (type === 'success') Notification.success(options); else if (type === 'info') Notification.info(options); + else if (type === 'warning') Notification.warning(options); else throw('Invalid notification type "' + type + '"'); }; diff --git a/webadmin/src/js/main.js b/webadmin/src/js/main.js index cabda693d..20b59c67c 100644 --- a/webadmin/src/js/main.js +++ b/webadmin/src/js/main.js @@ -101,6 +101,20 @@ 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); + } + }); + } + Client.getStatus(function (error, status) { if (error) return $scope.error(error); @@ -160,6 +174,9 @@ angular.module('Application').controller('MainController', ['$scope', '$route', // welcome screen if ($scope.user.showTutorial && $scope.user.admin) $scope.startTutorial(); + + // configuration checks + if ($scope.user.admin) runConfigurationChecks(); }); }); });