graphs: always show /var/backups size
often this has old backups
This commit is contained in:
+7
-1
@@ -115,6 +115,13 @@ async function getDisks() {
|
||||
if (disks[filesystem]) disks[filesystem].contents.push({ type: 'standard', id: 'cloudron-backup', path: backupConfig.backupFolder });
|
||||
}
|
||||
|
||||
// often the default backup dir is not cleaned up
|
||||
if (backupConfig.provider !== 'filesystem' || backupConfig.backupFolder !== paths.DEFAULT_BACKUP_DIR) {
|
||||
const [, dfResult] = await safe(df.file(paths.DEFAULT_BACKUP_DIR));
|
||||
const filesystem = dfResult?.filesystem || rootDisk.filesystem;
|
||||
if (disks[filesystem]) disks[filesystem].contents.push({ type: 'standard', id: 'cloudron-backup-default', path: paths.DEFAULT_BACKUP_DIR });
|
||||
}
|
||||
|
||||
const [dockerError, dockerInfo] = await safe(docker.info());
|
||||
if (!dockerError) {
|
||||
const [, dfResult] = await safe(df.file(dockerInfo.DockerRootDir));
|
||||
@@ -233,7 +240,6 @@ async function updateDiskUsage(progressCallback) {
|
||||
const [error, usage] = await safe(du(content.path));
|
||||
if (error) progressCallback({ message: `du error: ${error.message}`}); // can happen if app is installing etc
|
||||
content.usage = usage || 0;
|
||||
|
||||
}
|
||||
progressCallback({ message: `du of ${JSON.stringify(content)}: ${content.usage}`});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user