2019-05-02 18:17:27 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2019-03-29 05:54:56 -04:00
|
|
|
Report.add_report("storage_stats") do |report|
|
|
|
|
backup_stats = begin
|
|
|
|
BackupRestore::BackupStore.create.stats
|
|
|
|
rescue BackupRestore::BackupStore::StorageError
|
|
|
|
nil
|
|
|
|
end
|
|
|
|
|
|
|
|
report.data = {
|
|
|
|
backups: backup_stats,
|
|
|
|
uploads: {
|
|
|
|
used_bytes: DiskSpace.uploads_used_bytes,
|
|
|
|
free_bytes: DiskSpace.uploads_free_bytes
|
|
|
|
}
|
|
|
|
}
|
|
|
|
end
|