Welcome to mirror list, hosted at ThFree Co, Russian Federation.

PauseController.js « controllers « scripts « ngax « webroot « Server « Duplicati - github.com/duplicati/duplicati.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 85082053e346497290456c7cd984f0e9658544e5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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);
    };
});