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

22 lines
809 B
JavaScript
Raw Normal View History

2016-10-02 16:55:17 +02:00
backupApp.controller('UpdateChangelogController', function($scope, BrandingService, ServerStatus, AppService, AppUtils, SystemInfo, gettextCatalog) {
$scope.brandingService = BrandingService.watch($scope);
2015-12-03 21:58:45 +01:00
$scope.systeminfo = SystemInfo.watch($scope);
$scope.serverstate = ServerStatus.watch($scope);
2015-12-09 21:23:13 +01:00
function reloadChangeLog() {
2015-12-03 21:58:45 +01:00
AppService.get('/changelog?from-update=true').then(function(resp) {
$scope.Version = resp.data.Version;
$scope.ChangeLog = resp.data.Changelog;
});
};
$scope.doCheck = function() {
AppService.post('/updates/check').then(function() {
reloadChangeLog();
2016-10-02 15:18:34 +02:00
}, AppUtils.connectionError(gettextCatalog.getString('Check failed:') + ' '));
2015-12-03 21:58:45 +01:00
};
reloadChangeLog();
});