Add DiskTotalSpace and DiskUsedSpace to returned Storage objects

pull/3669/merge
iconnor@connortechnology.com 2023-02-22 16:42:17 -05:00
parent a7af29c0c4
commit a7743dd0ed
1 changed files with 7 additions and 0 deletions

View File

@ -35,6 +35,13 @@ class StorageController extends AppController {
$options = '';
$storage_areas = $this->Storage->find('all',$options);
foreach ($storage_areas as &$s) {
$storage = new ZM\Storage($s['Storage']);
$s['Storage']['DiskTotalSpace'] = $storage->disk_total_space();
$s['Storage']['DiskUsedSpace'] = $storage->disk_used_space();
}
$this->set(array(
'storage' => $storage_areas,
'_serialize' => array('storage')