Even further cleanup of dead code

This commit is contained in:
Johannes Zellner
2019-09-13 19:06:50 +02:00
parent cf6d64646a
commit 10d1a2d8e4
2 changed files with 3 additions and 23 deletions

View File

@@ -139,7 +139,6 @@
</div>
<div class="grid-item-actions" ng-show="user.admin">
<a href="" ng-hide="!backupsEnabled || (app | activeTask)" ng-click="appRestore.show(app)" uib-tooltip="Backups" tooltip-placement="right" tooltip-class="app-tooltip"><i class="fa fa-archive scale"></i></a>
<a ng-href="#/app/{{ app.id}}" uib-tooltip="Configure" tooltip-placement="right" tooltip-class="app-tooltip"><i class="fa fa-wrench scale"></i></a>
</div>

View File

@@ -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);