-
Notifications
You must be signed in to change notification settings - Fork 159
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
update space quota on upload, delete and restore #7415
Conversation
Thanks for opening this pull request! The maintainers of this repository would appreciate it if you would create a changelog item based on your changes. |
Results for e2e-tests oCIS https://drone.owncloud.com/owncloud/web/27400/12/1 💥 To see the trace, please open the link in the console ...
npx playwright show-trace https://cache.owncloud.com/public/owncloud/web/27400/tracing/participant-management-alice-2022-8-8-11-00-45.zipnpx playwright show-trace https://cache.owncloud.com/public/owncloud/web/27400/tracing/participant-management-anonymous-2022-8-8-11-01-01.zipnpx playwright show-trace https://cache.owncloud.com/public/owncloud/web/27400/tracing/participant-management-brian-2022-8-8-11-00-50.zipnpx playwright show-trace https://cache.owncloud.com/public/owncloud/web/27400/tracing/participant-management-carol-2022-8-8-11-00-55.zipnpx playwright show-trace https://cache.owncloud.com/public/owncloud/web/27400/tracing/public-link-alice-2022-8-8-10-58-33.zipnpx playwright show-trace https://cache.owncloud.com/public/owncloud/web/27400/tracing/public-link-anonymous-2022-8-8-10-58-46.zip |
6f8d576
to
81c32c9
Compare
@@ -45,7 +45,7 @@ export default { | |||
return filesize(this.spaceQuota.used) | |||
}, | |||
quotaUsagePercent() { | |||
return ((this.spaceQuota.used / this.spaceQuota.total) * 100).toFixed(1) | |||
return parseFloat(((this.spaceQuota.used / this.spaceQuota.total) * 100).toFixed(2)) |
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.
Aligned to oc10 user quota view
...(user.quota && | ||
user.quota.definition !== 'default' && | ||
user.quota.definition !== 'none' && { quota: user.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.
I don't get this conditions, we load the user quota on other places without those conditions
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.
Me neither 😞
packages/web-app-files/src/components/AppBar/CreateAndUpload.vue
Outdated
Show resolved
Hide resolved
SonarCloud Quality Gate failed. |
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.
Setting the quota in spaces / non-spaces environments has quite some code duplication across the different files touched in this PR. Do you want to continue to work on that or keep it as is for now?
...(user.quota && | ||
user.quota.definition !== 'default' && | ||
user.quota.definition !== 'none' && { quota: user.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.
Me neither 😞
@kulmann If you can give me some tips, I can for sure remove some code duplication |
Nevermind. Just saw that the code duplication is in mixins. As we want to get rid of those it's not worth it I think. |
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.
LGTM 👍
Description
Note: While uploading files with uppy we check the quota of the respective space, this is why we should keep spaces in sync
Tackling the following issues:
Related Issue
Motivation and Context
How Has This Been Tested?
Screenshots (if appropriate):
Types of changes
Checklist:
Open tasks: