Even further cleanup of dead code
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user