mirror of
https://github.com/nextcloud/server.git
synced 2026-06-08 16:26:59 -04:00
Update #free_space on getstoragestats AJAX call
This commit is contained in:
parent
64bf0fa47f
commit
0aa38165a4
2 changed files with 3 additions and 0 deletions
|
|
@ -41,6 +41,7 @@ Files={
|
|||
}
|
||||
if (response.data !== undefined && response.data.uploadMaxFilesize !== undefined) {
|
||||
$('#max_upload').val(response.data.uploadMaxFilesize);
|
||||
$('#free_space').val(response.data.freeSpace);
|
||||
$('#upload.button').attr('original-title', response.data.maxHumanFilesize);
|
||||
$('#usedSpacePercent').val(response.data.usedSpacePercent);
|
||||
Files.displayStorageWarnings();
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ class Helper
|
|||
{
|
||||
public static function buildFileStorageStatistics($dir) {
|
||||
$l = new \OC_L10N('files');
|
||||
$freeSpace=OCP\Util::freeSpace($dir);
|
||||
$maxUploadFilesize = \OCP\Util::maxUploadFilesize($dir);
|
||||
$maxHumanFilesize = \OCP\Util::humanFileSize($maxUploadFilesize);
|
||||
$maxHumanFilesize = $l->t('Upload') . ' max. ' . $maxHumanFilesize;
|
||||
|
|
@ -15,6 +16,7 @@ class Helper
|
|||
|
||||
return array('uploadMaxFilesize' => $maxUploadFilesize,
|
||||
'maxHumanFilesize' => $maxHumanFilesize,
|
||||
'freeSpace' => $freeSpace,
|
||||
'usedSpacePercent' => (int)$storageInfo['relative']);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue