Keep apps sorted
This commit is contained in:
@@ -324,8 +324,6 @@ angular.module('Application').service('Client', ['$http', 'md5', 'Notification',
|
||||
data.iconUrlStore = icons.store;
|
||||
data.progress = 0;
|
||||
|
||||
that._installedApps.push(data);
|
||||
|
||||
callback(null, data.id);
|
||||
}).error(defaultErrorHandler(callback));
|
||||
};
|
||||
@@ -1072,6 +1070,8 @@ angular.module('Application').service('Client', ['$http', 'md5', 'Notification',
|
||||
}
|
||||
}
|
||||
|
||||
that._installedApps = that._installedApps.sort(function (app1, app2) { return app1.fqdn.localeCompare(app2.fqdn); });
|
||||
|
||||
that._appsListener.forEach(function (callback) {
|
||||
callback(that._installedApps);
|
||||
});
|
||||
|
||||
@@ -97,7 +97,7 @@ angular.module('Application').controller('DebugController', ['$scope', '$locatio
|
||||
};
|
||||
|
||||
$scope.populateDropdown = function () {
|
||||
Client.getInstalledApps().sort(function (app1, app2) { return app1.fqdn.localeCompare(app2.fqdn); }).forEach(function (app) {
|
||||
Client.getInstalledApps().forEach(function (app) {
|
||||
$scope.apps.push({
|
||||
type: 'app',
|
||||
value: app.id,
|
||||
|
||||
@@ -23,7 +23,7 @@ angular.module('Application').controller('LogsController', ['$scope', '$location
|
||||
$scope.logs.push({ name: 'Box', type: 'platform', value: 'box', url: Client.makeURL('/api/v1/cloudron/logs?units=box') });
|
||||
$scope.logs.push({ name: 'Mail', type: 'platform', value: 'mail', url: Client.makeURL('/api/v1/cloudron/logs?units=mail') });
|
||||
|
||||
Client.getInstalledApps().sort(function (app1, app2) { return app1.fqdn.localeCompare(app2.fqdn); }).forEach(function (app) {
|
||||
Client.getInstalledApps().forEach(function (app) {
|
||||
$scope.logs.push({
|
||||
type: 'app',
|
||||
value: app.id,
|
||||
|
||||
Reference in New Issue
Block a user