Server: Show color bar in quota column of % used space

Created on 15 Jun 2016  路  11Comments  路  Source: nextcloud/server

in settings/users new feature:
show color bar of % user used space of quota
http://i.imgur.com/ayvNt6L.png

enhancement users and groups

Most helpful comment

Maybe it麓s possible to compute the Quota of each user in a background cronjob? Just add a "last_quota_calc" column to the users table. If last_quota_calc < last_action in activity, the quota is recalculated.

All 11 comments

https://github.com/owncloud/core/issues/12602

cc @MorrisJobke @LukasReschke

The problem here was that it wasn't easy to fetch all the quota without mounting all the home directories of each user. I think we have done a lot there. Maybe worth to look into this again.

Maybe it麓s possible to compute the Quota of each user in a background cronjob? Just add a "last_quota_calc" column to the users table. If last_quota_calc < last_action in activity, the quota is recalculated.

@icewind1991 Is it nowadays easier to get the quota?

For those looking for a way to at least detect when someone hits their limit, here is a one-liner that you can put in cron.daily or similar:

grep InsufficientStorage nextcloud.log | grep `date '+%Y-%m-%d' -d yesterday` | jq -r .time,.user | paste - - | uniq

It checks for any user who maxed out during the previous day. It requires jq to be installed beyond what is usually included in distros.

The color bar could have two levels: one for active storage (equivalent of du -sh username/files) and another for total storage which includes versions, trashbin and any other app that makes use of remaining quota (somewhat similar to du -sh username).

It's possible at least in ownCloud to get user quota via an API call: https://github.com/owncloud/core/issues/26829#issuecomment-268304473
https://github.com/owncloud/core/issues/1344

And a better screenshot:
07ef3174-c58b-11e3-91f0-dda715afda5e

Also a SQL query to get the used space for all users:
https://github.com/owncloud/core/issues/1344#issuecomment-245526902 & https://github.com/owncloud/core/issues/1344#issuecomment-280664886

is it implemented yet ?

How do we see users usage ?

is it implemented yet ?

As this ticket is still open: no.

How do we see users usage ?

Currently not possible.

Thanks @icewind1991! This is totally awesome, and I really like how you can hover to get a more accurate idea of the used space. One small thing I noticed is that the last login column starts to overlap at about 1390px width or less in Chrome, but I bet some CSS magic could fix that.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ChristophWurst picture ChristophWurst  路  3Comments

juliushaertl picture juliushaertl  路  3Comments

Django-BOfH picture Django-BOfH  路  3Comments

mama21mama picture mama21mama  路  3Comments

arno01 picture arno01  路  3Comments