diff --git a/src/js/client.js b/src/js/client.js index d0d79f508..1c8cc6d12 100644 --- a/src/js/client.js +++ b/src/js/client.js @@ -105,7 +105,6 @@ angular.module('Application').service('Client', ['$http', '$interval', 'md5', 'N function Client() { this._ready = false; this._configListener = []; - this._appsListener = []; this._readyListener = []; this._userInfo = { id: null, @@ -205,11 +204,6 @@ angular.module('Application').service('Client', ['$http', '$interval', 'md5', 'N if (this._config && this._config.apiServerOrigin) callback(this._config); }; - Client.prototype.onApps = function (callback) { - this._appsListener.push(callback); - callback(this._installedApps); - }; - Client.prototype.resetAvatar = function () { this.avatar = this.apiOrigin + '/api/v1/cloudron/avatar?' + String(Math.random()).slice(2); @@ -1138,10 +1132,6 @@ angular.module('Application').service('Client', ['$http', '$interval', 'md5', 'N that._installedApps = that._installedApps.sort(function (app1, app2) { return app1.fqdn.localeCompare(app2.fqdn); }); - that._appsListener.forEach(function (callback) { - callback(that._installedApps); - }); - callback(null); }); }; diff --git a/src/js/logs.js b/src/js/logs.js index 14fa6435f..d584017de 100644 --- a/src/js/logs.js +++ b/src/js/logs.js @@ -61,18 +61,6 @@ app.controller('LogsController', ['$scope', '$timeout', '$location', 'Client', f }); } - Client.onApps(function () { - if ($scope.selected.type !== 'app') return; - - var appId = $scope.selected.value; - - Client.getCachedApp(appId, function (error, result) { - if (error) return console.error(error); - - $scope.selectedAppInfo = result; - }); - }); - function loadId(id, callback) { // Add built-in log types for now var BUILT_IN_LOGS = [ @@ -87,6 +75,8 @@ app.controller('LogsController', ['$scope', '$timeout', '$location', 'Client', f Client.getApp(id, function (error, app) { if (error) return callback(error); + $scope.selectedAppInfo = app; + $scope.selected = { type: 'app', value: app.id,