[dashboard | statistics] Add Project Size to dashboard charts
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:
@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 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
@driusan I moved the file from dqt to statistics (accidental module choice) and I took a pass at making all strings I encountered translatable
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?