Loris icon indicating copy to clipboard operation
Loris copied to clipboard

[dashboard | statistics] Add Project Size to dashboard charts

Open jeffersoncasimir opened this issue 3 months ago • 4 comments

Closes #9944. Adds project sizes to the dashboard.

File sizes are read from a cached value in a new DB table for cached data. Cache data is updated by cron or webhook via a new script called update_projects_disk_space.php. This script recursively calculates the file sizes of a dataset recursively by using the php filesize function. It only ignores .tgz files, which are not BIDS-recognized and used for LORIS purposes.

Screenshots: Screenshot 2025-10-20 at 5 58 23 PM Screenshot 2025-10-20 at 5 58 26 PM Screenshot 2025-10-20 at 5 58 42 PM

jeffersoncasimir avatar Oct 20 '25 22:10 jeffersoncasimir

@jeffersoncasimir can you add a description here please. Mostly commenting on the design, what is being calculated in the file size. and how to set it up. I glanced quickly at the code and I see several SQL additions and a tool script which is telling me ur caching the sizes rather than calculating them on the fly? assuming its for speed considerations? If a project has DICOMS, NIFTIs and MINCs does it calculate the sum of all those even though its technically the same scans...

ridz1208 avatar Oct 21 '25 13:10 ridz1208

@ridz1208 I will add more info above. Ultimately, PHP filesize() function is being used here in the script intended to be run via cron or webhook

jeffersoncasimir avatar Oct 21 '25 15:10 jeffersoncasimir

@driusan I moved the file from dqt to statistics (accidental module choice) and I took a pass at making all strings I encountered translatable

jeffersoncasimir avatar Oct 29 '25 16:10 jeffersoncasimir

per EEG meeting Oct. 31: This PR is blocking Draft pr #10093 -- which is only in draft form waiting for this to be merged. Ideally these could both go in the release, no reason why not.

@jeffersoncasimir who might be able to quickly review this for merge -- Saagar maybe?

christinerogers avatar Nov 14 '25 14:11 christinerogers