Files
duplicati/Duplicati/Server/webroot/ngax/scripts/controllers/PauseController.js
T

15 lines
485 B
JavaScript

backupApp.controller('PauseController', function ($scope, $location, AppService, AppUtils, ServerStatus) {
$scope.state = ServerStatus.watch($scope);
$scope.pause = function(duration) {
ServerStatus.pause(duration).then(function() {
$location.path('/');
}, AppUtils.connectionError);
};
$scope.resume = function() {
ServerStatus.resume().then(function() {
$location.path('/');
}, AppUtils.connectionError);
};
});