feat(occ): print storage values human-friendly#48952
Open
Conversation
e42eb58 to
476e85f
Compare
9368e94 to
1628bd2
Compare
This comment was marked as resolved.
This comment was marked as resolved.
1628bd2 to
0ee9f91
Compare
provokateurin
approved these changes
Oct 30, 2024
0ee9f91 to
3fb55a4
Compare
artonge
approved these changes
Oct 30, 2024
This comment was marked as resolved.
This comment was marked as resolved.
Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>
3fb55a4 to
24636ca
Compare
Member
Author
|
Hum... things like these (not breaking anything) have been backported in the past, but no problem. 👍 |
Member
|
It's also better to not do it right now, as we have to backport a lot of things for the upcoming releases and we need the CI power for that. |
come-nc
requested changes
Nov 4, 2024
Comment on lines
+87
to
+91
| 'free' => \OC_Helper::humanFileSize($storage['free']), | ||
| 'used' => \OC_Helper::humanFileSize($storage['used']), | ||
| 'total' => \OC_Helper::humanFileSize($storage['total']), | ||
| 'relative' => $storage['relative'] . '%', | ||
| 'quota' => ($storage['quota'] >= 0) ? \OC_Helper::humanFileSize($storage['quota']) : $storage['quota'], |
Contributor
There was a problem hiding this comment.
Suggested change
| 'free' => \OC_Helper::humanFileSize($storage['free']), | |
| 'used' => \OC_Helper::humanFileSize($storage['used']), | |
| 'total' => \OC_Helper::humanFileSize($storage['total']), | |
| 'relative' => $storage['relative'] . '%', | |
| 'quota' => ($storage['quota'] >= 0) ? \OC_Helper::humanFileSize($storage['quota']) : $storage['quota'], | |
| 'free' => Util::humanFileSize($storage['free']), | |
| 'used' => Util::humanFileSize($storage['used']), | |
| 'total' => Util::humanFileSize($storage['total']), | |
| 'relative' => $storage['relative'] . '%', | |
| 'quota' => ($storage['quota'] >= 0) ? Util::humanFileSize($storage['quota']) : $storage['quota'], |
And add a use \OCP\Util; to the top. OC_* classes are deprecated.
Merged
This was referenced Aug 22, 2025
Merged
Merged
Merged
Merged
Merged
This was referenced Sep 25, 2025
Merged
Merged
Merged
This was referenced Jan 29, 2026
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Values are now printed humand-friendly if
--humanoption is passed.Before
After