-
Notifications
You must be signed in to change notification settings - Fork 55
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: user storage space #2274
base: main
Are you sure you want to change the base?
feat: user storage space #2274
Conversation
cb78ec5
to
d5f3651
Compare
@@ -16,7 +16,7 @@ def hashize(inputs) | |||
end | |||
|
|||
def time_now | |||
Time.now.strftime('%Y-%m-%dT%H-%M-%S') | |||
Time.zone.now.strftime('%Y-%m-%dT%H-%M-%S') |
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.
Metrics/ClassLength: Class has too many lines. [237/200]
cb3e56b
to
e7a1011
Compare
bf1e72d
to
4983883
Compare
LCOV of commit
|
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.
Finished the first pass of my review.
Next I'll try the new features in the UI.
...rc/apps/mydb/elements/details/researchPlans/attachmentsTab/ResearchPlanDetailsAttachments.js
Outdated
Show resolved
Hide resolved
app/javascript/src/components/container/ContainerDatasetModalContent.js
Outdated
Show resolved
Hide resolved
Squashed commit of the following: commit ea193ee Author: Adrian Herrmann <[email protected]> Date: Mon Jan 20 09:44:50 2025 +0000 Renamed users_available and changed set and show to MB commit 4983883 Author: Adrian Herrmann <[email protected]> Date: Tue Jan 7 13:11:10 2025 +0000 rebase fix commit d5f3651 Author: Adrian Herrmann <[email protected]> Date: Mon Dec 16 15:08:40 2024 +0000 feat: set available_space in admin interface commit 334a83c Author: Adrian Herrmann <[email protected]> Date: Wed Dec 11 16:07:43 2024 +0000 added usage job commit 5646024 Author: Adrian Herrmann <[email protected]> Date: Fri Dec 6 08:22:50 2024 +0000 added error handling for reports commit 6242df9 Author: Adrian Herrmann <[email protected]> Date: Thu Dec 5 08:43:57 2024 +0000 fix: attachment space calculation commit 139210e Author: Adrian Herrmann <[email protected]> Date: Wed Dec 4 09:34:17 2024 +0000 added warning before saving research plan when adding attachments commit c1ebe4c Author: Adrian Herrmann <[email protected]> Date: Tue Dec 3 14:02:29 2024 +0000 added warning before 'keep changes' in dataset commit f8a3887 Author: Adrian Herrmann <[email protected]> Date: Mon Dec 2 14:35:26 2024 +0000 fix: error messages from attachment save commit 73befa5 Author: Adrian Herrmann <[email protected]> Date: Mon Dec 2 09:48:25 2024 +0000 refactor: rm commented out code commit 72ad19a Author: Adrian Herrmann <[email protected]> Date: Fri Nov 29 15:45:48 2024 +0000 Added inbox upload check commit 7f9b306 Author: Adrian Herrmann <[email protected]> Date: Mon Nov 4 13:32:00 2024 +0000 feat: added migration for new user cols and calculation for used space per user and element
and calculation for used space per user and element
f83522d
to
457f2cf
Compare
LCOV of commit
|
LCOV of commit
|
LCOV of commit
|
860f049
to
894c452
Compare
7c3aec6
to
17584ed
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.
Do we have documentation for this feature?
I tried the feature in the UI and have a few comments (see below).
app/javascript/src/components/container/ContainerDatasetModalContent.js
Outdated
Show resolved
Hide resolved
0cacbdd
to
4a36abe
Compare
LCOV of commit
|
4a36abe
to
5ad9247
Compare
5ad9247
to
430d265
Compare
LCOV of commit
|
Squashed commit of the following: commit ea193ee Author: Adrian Herrmann <[email protected]> Date: Mon Jan 20 09:44:50 2025 +0000 Renamed users_available and changed set and show to MB commit 4983883 Author: Adrian Herrmann <[email protected]> Date: Tue Jan 7 13:11:10 2025 +0000 rebase fix commit d5f3651 Author: Adrian Herrmann <[email protected]> Date: Mon Dec 16 15:08:40 2024 +0000 feat: set available_space in admin interface commit 334a83c Author: Adrian Herrmann <[email protected]> Date: Wed Dec 11 16:07:43 2024 +0000 added usage job commit 5646024 Author: Adrian Herrmann <[email protected]> Date: Fri Dec 6 08:22:50 2024 +0000 added error handling for reports commit 6242df9 Author: Adrian Herrmann <[email protected]> Date: Thu Dec 5 08:43:57 2024 +0000 fix: attachment space calculation commit 139210e Author: Adrian Herrmann <[email protected]> Date: Wed Dec 4 09:34:17 2024 +0000 added warning before saving research plan when adding attachments commit c1ebe4c Author: Adrian Herrmann <[email protected]> Date: Tue Dec 3 14:02:29 2024 +0000 added warning before 'keep changes' in dataset commit f8a3887 Author: Adrian Herrmann <[email protected]> Date: Mon Dec 2 14:35:26 2024 +0000 fix: error messages from attachment save commit 73befa5 Author: Adrian Herrmann <[email protected]> Date: Mon Dec 2 09:48:25 2024 +0000 refactor: rm commented out code commit 72ad19a Author: Adrian Herrmann <[email protected]> Date: Fri Nov 29 15:45:48 2024 +0000 Added inbox upload check commit 7f9b306 Author: Adrian Herrmann <[email protected]> Date: Mon Nov 4 13:32:00 2024 +0000 feat: added migration for new user cols and calculation for used space per user and element
Squashed commit of the following: commit ea193ee Author: Adrian Herrmann <[email protected]> Date: Mon Jan 20 09:44:50 2025 +0000 Renamed users_available and changed set and show to MB commit 4983883 Author: Adrian Herrmann <[email protected]> Date: Tue Jan 7 13:11:10 2025 +0000 rebase fix commit d5f3651 Author: Adrian Herrmann <[email protected]> Date: Mon Dec 16 15:08:40 2024 +0000 feat: set available_space in admin interface commit 334a83c Author: Adrian Herrmann <[email protected]> Date: Wed Dec 11 16:07:43 2024 +0000 added usage job commit 5646024 Author: Adrian Herrmann <[email protected]> Date: Fri Dec 6 08:22:50 2024 +0000 added error handling for reports commit 6242df9 Author: Adrian Herrmann <[email protected]> Date: Thu Dec 5 08:43:57 2024 +0000 fix: attachment space calculation commit 139210e Author: Adrian Herrmann <[email protected]> Date: Wed Dec 4 09:34:17 2024 +0000 added warning before saving research plan when adding attachments commit c1ebe4c Author: Adrian Herrmann <[email protected]> Date: Tue Dec 3 14:02:29 2024 +0000 added warning before 'keep changes' in dataset commit f8a3887 Author: Adrian Herrmann <[email protected]> Date: Mon Dec 2 14:35:26 2024 +0000 fix: error messages from attachment save commit 73befa5 Author: Adrian Herrmann <[email protected]> Date: Mon Dec 2 09:48:25 2024 +0000 refactor: rm commented out code commit 72ad19a Author: Adrian Herrmann <[email protected]> Date: Fri Nov 29 15:45:48 2024 +0000 Added inbox upload check commit 7f9b306 Author: Adrian Herrmann <[email protected]> Date: Mon Nov 4 13:32:00 2024 +0000 feat: added migration for new user cols and calculation for used space per user and element
Backend
user space accounting/quota
calculation tools as sql functions
for a dataset: a dataset has many attachments
for [element].attachments where Element is a Sample, Reaction, Wellplate, ResearchPlan, Screen ....
and for [element].analyses
for a collection (useful for export, validation of collection ownership transfer, but not working for the total user's usage since element can be in multiple collections at once)
for a type of elements owned by a user
user ➡️ collections ➡️ unique elements of a type (eg: sample) ➡️ elements-attachments + elements-analyses
for user reports
cronJob to update user used-space
Frontend
prevent upload if quota exceeded and show message
Admin interface