From 10d1a2d8e4de245fae8926664f2a36a04fbfec3f Mon Sep 17 00:00:00 2001 From: Johannes Zellner Date: Fri, 13 Sep 2019 19:06:50 +0200 Subject: [PATCH] Even further cleanup of dead code --- src/views/apps.html | 1 - src/views/apps.js | 25 +++---------------------- 2 files changed, 3 insertions(+), 23 deletions(-) diff --git a/src/views/apps.html b/src/views/apps.html index 9bb5581e8..972166b16 100644 --- a/src/views/apps.html +++ b/src/views/apps.html @@ -139,7 +139,6 @@
-
diff --git a/src/views/apps.js b/src/views/apps.js index e05718614..3f9a97f11 100644 --- a/src/views/apps.js +++ b/src/views/apps.js @@ -6,8 +6,6 @@ angular.module('Application').controller('AppsController', ['$scope', '$timeout', '$interval', 'Client', function ($scope, $timeout, $interval, Client) { var ALL_DOMAINS_DOMAIN = { _alldomains: true, domain: 'All Domains' }; // dummy record for the single select filter - $scope.HOST_PORT_MIN = 1024; - $scope.HOST_PORT_MAX = 65535; $scope.installedApps = Client.getInstalledApps(); $scope.tags = Client.getAppTags(); $scope.selectedTags = []; @@ -16,8 +14,6 @@ angular.module('Application').controller('AppsController', ['$scope', '$timeout' $scope.config = Client.getConfig(); $scope.user = Client.getUserInfo(); $scope.domains = []; - $scope.backupsEnabled = true; - $scope.disableIndexingTemplate = '# Disable search engine indexing\n\nUser-agent: *\nDisallow: /'; $scope.appPostInstallConfirm = { app: {}, @@ -122,27 +118,12 @@ angular.module('Application').controller('AppsController', ['$scope', '$timeout' }); } - function getBackupConfig() { - Client.getBackupConfig(function (error, backupConfig) { - if (error) return console.error(error); - - $scope.backupEnabled = backupConfig.provider !== 'noop'; - }); - } - - function refreshInstalledApps() { - Client.refreshInstalledApps(); - } - Client.onReady(function () { - refreshInstalledApps(); // refresh the new list immediately when switching from another view (appstore) + Client.refreshInstalledApps(); // refresh the new list immediately when switching from another view (appstore) - if ($scope.user.admin) { - getDomains(); - getBackupConfig(); - } + if ($scope.user.admin) getDomains(); - var refreshAppsTimer = $interval(refreshInstalledApps, 5000); + var refreshAppsTimer = $interval(Client.refreshInstalledApps.bind(Client), 5000); $scope.$on('$destroy', function () { $interval.cancel(refreshAppsTimer);