graphs: show old backup size and location if > 1GB

This commit is contained in:
Girish Ramakrishnan
2023-08-01 18:35:11 +05:30
parent 0722692210
commit e65c1fb718
4 changed files with 9 additions and 2 deletions

View File

@@ -85,14 +85,18 @@ angular.module('Application').controller('SystemController', ['$scope', '$locati
disk.contents.forEach(function (content) { if (content.path === disk.mountpoint) disk.volume = $scope.volumesById[content.id]; });
disk.contents = disk.contents.filter(function (content) { return content.path !== disk.mountpoint; });
// only show old backups if the size is significant
disk.contents = disk.contents.filter(function (content) { return content.id !== 'cloudron-backup-default' || content.usage > 1024*1024*1024; });
disk.contents.forEach(function (content) {
content.color = getNextColor();
if (content.type === 'app') {
content.app = Client.getInstalledAppsByAppId()[content.id];
if (!content.app) content.uninstalled = true;
} else if (content.type === 'volume') {
content.volume = $scope.volumesById[content.id];
}
if (content.type === 'volume') content.volume = $scope.volumesById[content.id];
usageOther -= content.usage;
});