webadmin: Give better feedback on update schedule saving

This commit is contained in:
Johannes Zellner
2017-01-28 14:49:07 -08:00
parent 21e3300396
commit 8dc9d4c083
2 changed files with 6 additions and 2 deletions

View File

@@ -422,6 +422,7 @@ angular.module('Application').controller('SettingsController', ['$scope', '$loca
$scope.autoUpdate = {
busy: false,
success: false,
error: '',
pattern: '',
currentPattern: '',
@@ -431,12 +432,14 @@ angular.module('Application').controller('SettingsController', ['$scope', '$loca
$scope.autoUpdate.error = '';
$scope.autoUpdate.busy = true;
$scope.autoUpdate.success = false;
Client.setAutoupdatePattern($scope.autoUpdate.pattern, function (error) {
if (error) $scope.autoUpdate.error = error.message;
else $scope.autoUpdate.currentPattern = $scope.autoUpdate.pattern;
$scope.autoUpdate.busy = false;
$scope.autoUpdate.success = true;
});
}
};