diff options
Diffstat (limited to 'Duplicati/Server/webroot/ngax/scripts/services/SystemInfo.js')
-rw-r--r-- | Duplicati/Server/webroot/ngax/scripts/services/SystemInfo.js | 70 |
1 files changed, 35 insertions, 35 deletions
diff --git a/Duplicati/Server/webroot/ngax/scripts/services/SystemInfo.js b/Duplicati/Server/webroot/ngax/scripts/services/SystemInfo.js index 4ec5d0cca..18d3f391e 100644 --- a/Duplicati/Server/webroot/ngax/scripts/services/SystemInfo.js +++ b/Duplicati/Server/webroot/ngax/scripts/services/SystemInfo.js @@ -1,12 +1,12 @@ backupApp.service('SystemInfo', function($rootScope, $timeout, AppService, AppUtils) { - var state = {}; - this.state = state; + var state = {}; + this.state = state; - var backendgroups = { - std: { 'ftp': null, 'ssh': null, 'webdav': null, 'openstack': 'OpenStack Object Storage / Swift', 's3': 'S3 Compatible', 'aftp': 'FTP (Alternative)'}, - local: {'file': null}, - prop: { + var backendgroups = { + std: { 'ftp': null, 'ssh': null, 'webdav': null, 'openstack': 'OpenStack Object Storage / Swift', 's3': 'S3 Compatible', 'aftp': 'FTP (Alternative)'}, + local: {'file': null}, + prop: { 's3': null, 'azure': null, 'googledrive': null, @@ -23,9 +23,9 @@ backupApp.service('SystemInfo', function($rootScope, $timeout, AppService, AppUt 'mssp': null, 'dropbox': null } - }; + }; - this.backendgroups = backendgroups; + this.backendgroups = backendgroups; this.watch = function(scope, m) { scope.$on('systeminfochanged', function() { @@ -46,40 +46,40 @@ backupApp.service('SystemInfo', function($rootScope, $timeout, AppService, AppUt AppService.get('/systeminfo').then(function(data) { - angular.copy(data.data, state); + angular.copy(data.data, state); - var tmp = angular.copy(state.BackendModules); - state.GroupedBackendModules = []; + var tmp = angular.copy(state.BackendModules); + state.GroupedBackendModules = []; - var push_with_type = function(m, type, order, alternate) { - m = angular.copy(m); - m.GroupType = type; - if (alternate != null) - m.DisplayName = alternate; - m.OrderKey = order; - state.GroupedBackendModules.push(m); - return true; - }; + var push_with_type = function(m, type, order, alternate) { + m = angular.copy(m); + m.GroupType = type; + if (alternate != null) + m.DisplayName = alternate; + m.OrderKey = order; + state.GroupedBackendModules.push(m); + return true; + }; - for(var i in state.BackendModules) - { - var m = state.BackendModules[i]; - var used = false; + for(var i in state.BackendModules) + { + var m = state.BackendModules[i]; + var used = false; - if (backendgroups.local[m.Key] !== undefined) - used |= push_with_type(m, 'Local storage', 0, backendgroups.local[m.Key]); + if (backendgroups.local[m.Key] !== undefined) + used |= push_with_type(m, 'Local storage', 0, backendgroups.local[m.Key]); - if (backendgroups.std[m.Key] !== undefined) - used |= push_with_type(m, 'Standard protocols', 1, backendgroups.std[m.Key]); + if (backendgroups.std[m.Key] !== undefined) + used |= push_with_type(m, 'Standard protocols', 1, backendgroups.std[m.Key]); - if (backendgroups.prop[m.Key] !== undefined) - used |= push_with_type(m, 'Proprietary', 2, backendgroups.prop[m.Key]); + if (backendgroups.prop[m.Key] !== undefined) + used |= push_with_type(m, 'Proprietary', 2, backendgroups.prop[m.Key]); - if (!used) - push_with_type(m, 'Others', 3); - } + if (!used) + push_with_type(m, 'Others', 3); + } - $rootScope.$broadcast('systeminfochanged'); + $rootScope.$broadcast('systeminfochanged'); }, AppUtils.connectionError) -});
\ No newline at end of file +}); |