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

UpdateChangelogController.js « controllers « scripts « ngax « webroot « Server « Duplicati - github.com/duplicati/duplicati.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 256fd2cbcb1d4f98724787edb5ed361cbf50148c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
backupApp.controller('UpdateChangelogController', function($scope, BrandingService, ServerStatus, AppService, AppUtils, SystemInfo) {
    $scope.brandingService = BrandingService.watch($scope);
    $scope.systeminfo = SystemInfo.watch($scope);
    $scope.serverstate = ServerStatus.watch($scope);

    function reloadChangeLog() {        
        AppService.get('/changelog?from-update=true').then(function(resp) {
            $scope.Version =  resp.data.Version;
            $scope.ChangeLog =  resp.data.Changelog;
        });        
    };

    $scope.doInstall = function() {
        AppService.post('/updates/install').then(function() {}, AppUtils.connectionError('Install failed: '));
    };

    $scope.doActivate = function() {
        AppService.post('/updates/activate').then(function() {}, AppUtils.connectionError('Activate failed: '));
    };

    $scope.doCheck = function() {
        AppService.post('/updates/check').then(function() {
            reloadChangeLog();
        }, AppUtils.connectionError('Check failed: '));
    };

    reloadChangeLog();

});