-
-
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
show used space in user list #5342
Conversation
I dont see it. |
This is a pull request. That means the code on ready for comments before it gets into the product. |
beside this little nitpick that looks really good 👍 |
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.
"Unlimited" will disappear right? I mean this implementation will show the same values as this PR #5305? |
Also, would it be possible to show the % of the total used storage? |
Codecov Report
@@ Coverage Diff @@
## master #5342 +/- ##
============================================
- Coverage 54.15% 44.77% -9.38%
+ Complexity 22326 1678 -20648
============================================
Files 1380 157 -1223
Lines 85535 13426 -72109
Branches 1329 1329
============================================
- Hits 46320 6012 -40308
+ Misses 39215 7414 -31801 |
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.
Nice stuff and works as expected, see comments for remarks :)
@@ -332,4 +333,29 @@ public function remoteStorageMounts($storageId) { | |||
->where($builder->expr()->eq('storage_id', $builder->createNamedParameter($storageId, IQueryBuilder::PARAM_INT))); | |||
$query->execute(); | |||
} | |||
|
|||
public function getUsedSpaceForUsers(array $userIds) { |
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.
Can I haz test? 🍪 😉
* Note that this only includes the space in their home directory, | ||
* not any incoming shares or external storages. | ||
* | ||
* @param string[] $userIds |
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.
Is there a reason that this is an array of userIds instead of IUser[]
? The other functions all take the user objects :)
@@ -138,7 +142,8 @@ public function __construct($appName, | |||
ITimeFactory $timeFactory, | |||
ICrypto $crypto, | |||
Manager $keyManager, | |||
IJobList $jobList) { | |||
IJobList $jobList, | |||
IUserMountCache $userMountCache) { |
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.
Also adjust the PHPDocs 😉
3bb42a9
to
4c27f00
Compare
@LukasReschke all fixed |
@@ -455,4 +456,34 @@ public function testGetMountsForFileIdDeletedUser() { | |||
$cachedMounts = $this->cache->getMountsForFileId($rootId); | |||
$this->assertEmpty($cachedMounts); | |||
} | |||
|
|||
public function testGtUsedSpaceForUsers() { |
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.
testGetUsedSpaceForUsers? 😉
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.
fixed
Signed-off-by: Robin Appelman <robin@icewind.nl>
4c27f00
to
2e8e6f9
Compare
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.
Tested and works 👍
I've been using this, and it works nicely 👍 |
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
I fixed the missing PHPDoc for the public interface. Now the CI should be fine :) |
Codecov Report
@@ Coverage Diff @@
## master #5342 +/- ##
=============================================
- Coverage 54.03% 31.15% -22.88%
+ Complexity 22465 22463 -2
=============================================
Files 1389 1388 -1
Lines 85957 85373 -584
Branches 1329 1329
=============================================
- Hits 46449 26602 -19847
- Misses 39508 58771 +19263
|
I fixed the not updated unit tests 😉 |
01da4b6
to
4b518f5
Compare
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
4b518f5
to
f2b8535
Compare
Fixes #117
Makes the quota dropdown into a progress bar, used space is shown as tooltip on hover