diff --git a/Duplicati/Server/webroot/ngax/scripts/services/AppService.js b/Duplicati/Server/webroot/ngax/scripts/services/AppService.js index 2b66e5fac..bcd8784bd 100644 --- a/Duplicati/Server/webroot/ngax/scripts/services/AppService.js +++ b/Duplicati/Server/webroot/ngax/scripts/services/AppService.js @@ -64,4 +64,9 @@ backupApp.service('AppService', function($http, $cookies) { return rurl; }; + this.get_bugreport_url = function(reportid) { + return this.apiurl + '/bugreport/' + reportid + '?x-xsrf-token=' + encodeURIComponent($cookies.get('xsrf-token')); + }; + + }); \ No newline at end of file diff --git a/Duplicati/Server/webroot/ngax/scripts/services/AppUtils.js b/Duplicati/Server/webroot/ngax/scripts/services/AppUtils.js index 2d873e835..2d26c2198 100644 --- a/Duplicati/Server/webroot/ngax/scripts/services/AppUtils.js +++ b/Duplicati/Server/webroot/ngax/scripts/services/AppUtils.js @@ -5,7 +5,7 @@ backupApp.service('AppUtils', function() { this.formatSizes = ['TB', 'GB', 'MB', 'KB']; this.formatSizeString = function(val) { val = parseInt(val || 0); - var max = formatSizes.length; + var max = this.formatSizes.length; for(var i = 0; i < this.formatSizes.length; i++) { var m = Math.pow(1024, max - i); if (val > m) diff --git a/Duplicati/Server/webroot/ngax/scripts/services/ServerStatus.js b/Duplicati/Server/webroot/ngax/scripts/services/ServerStatus.js index 2f5f3eddf..aab98c91f 100644 --- a/Duplicati/Server/webroot/ngax/scripts/services/ServerStatus.js +++ b/Duplicati/Server/webroot/ngax/scripts/services/ServerStatus.js @@ -16,7 +16,11 @@ backupApp.service('ServerStatus', function($rootScope, $timeout, AppService, App xsfrerror: false, connectionAttemptTimer: 0, failedConnectionAttempts: 0, - lastPgEvent: null + lastPgEvent: null, + updaterState: 'Waiting', + updatedVersion: null, + updateReady: false, + updateDownloadProgress: 0 }; this.state = state; @@ -196,7 +200,11 @@ backupApp.service('ServerStatus', function($rootScope, $timeout, AppService, App notifyIfChanged(response.data, 'LastNotificationUpdateID', 'lastNotificationUpdateId') | notifyIfChanged(response.data, 'ActiveTask', 'activeTask') | notifyIfChanged(response.data, 'ProgramState', 'programState') | - notifyIfChanged(response.data, 'EstimatedPauseEnd', 'estimatedPauseEnd'); + notifyIfChanged(response.data, 'EstimatedPauseEnd', 'estimatedPauseEnd') + notifyIfChanged(response.data, 'UpdaterState', 'updaterState') | + notifyIfChanged(response.data, 'UpdateReady', 'updateReady') | + notifyIfChanged(response.data, 'UpdatedVersion', 'updatedVersion')| + notifyIfChanged(response.data, 'UpdateDownloadProgress', 'updateDownloadProgress'); // Clear error indicators state.failedConnectionAttempts = 0;