diff --git a/src/views/system.js b/src/views/system.js index 11823cc9a..661ff8e8a 100644 --- a/src/views/system.js +++ b/src/views/system.js @@ -229,7 +229,9 @@ angular.module('Application').controller('SystemController', ['$scope', '$locati usageOther -= tmp; }); - if ($scope.disks.disks[0] === disk) { // the root mount point is the first disk + disk.contains.sort(function (x, y) { return y.usage - x.usage; }); // sort by usage + + if ($scope.disks.disks[0] === disk) { // the root mount point is the first disk. keep this 'contains' in the end disk.contains.push({ label: 'Everything else (Ubuntu, Swap, etc)', id: 'other', @@ -238,8 +240,6 @@ angular.module('Application').controller('SystemController', ['$scope', '$locati }); } - disk.contains.sort(function (x, y) { return x.usage > y.usage; }); // sort by usage - iteratorCallback(); }); });