-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(occ): print storage values human-friendly #48952
base: master
Are you sure you want to change the base?
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
0ee9f91
to
3fb55a4
Compare
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
Please don't backport features |
Hum... things like these (not breaking anything) have been backported in the past, but no problem. 👍 |
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. |
'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'], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'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.
Summary
Values are now printed humand-friendly if
--human
option is passed.Before
After