-
Notifications
You must be signed in to change notification settings - Fork 345
[ENG-8186] Storage allocation for draft registrations #11186
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
Open
ihorsokhanexoft
wants to merge
24
commits into
CenterForOpenScience:feature/pbs-25-13
Choose a base branch
from
ihorsokhanexoft:fix/ENG-8186
base: feature/pbs-25-13
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
15915b0
remove caching for ascendants
ihorsokhanexoft f42f67d
Revert "remove caching for ascendants"
ihorsokhanexoft ec2c7c0
use GV addons caching when it's needed
ihorsokhanexoft f0555f9
added storage allocation for draft registrations
ihorsokhanexoft 442b240
added tests
ihorsokhanexoft 8d67b3f
fixed tests, removed unused MAX_ARCHIVE_SIZE constant
ihorsokhanexoft 78c89b6
simplified code readability
ihorsokhanexoft 183b16b
Merge branch 'feature/pbs-25-10' into fix/ENG-8186
ihorsokhanexoft 383f5ae
remove caching for ascendants
ihorsokhanexoft a927f7d
Revert "remove caching for ascendants"
ihorsokhanexoft 4b723fb
use GV addons caching when it's needed
ihorsokhanexoft 280c16a
added storage allocation for draft registrations
ihorsokhanexoft 0f24479
added tests
ihorsokhanexoft 0bc8f6f
fixed tests, removed unused MAX_ARCHIVE_SIZE constant
ihorsokhanexoft 581cf5a
simplified code readability
ihorsokhanexoft 237a338
merge feature/pbs-25-10
ihorsokhanexoft 1cb0be3
fixed migration conflict
ihorsokhanexoft 51c87bb
Merge branch 'fix/ENG-8186' of github.com:ihorsokhanexoft/osf.io into…
ihorsokhanexoft bf2296e
remove redundant migration
ihorsokhanexoft bfcccc9
replace constant by a hardcoded actual value
ihorsokhanexoft fe98fc5
refactor storage allocation to use a common limit for private and pub…
ihorsokhanexoft a6a4c87
refactored email body
ihorsokhanexoft 154daa6
fixed test
ihorsokhanexoft 5f7e0c5
added validation of storage limits
ihorsokhanexoft File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
{% load node_extras %} | ||
|
||
<tr> | ||
<td>Draft registration storage usage</td> | ||
<td> | ||
<b>Public and private cap:</b> {{ draft_registration.cap|floatformat:0 }} GB<br> | ||
<a href="{% url 'draft_registrations:adjust-draft-registration-storage-usage' draft_registration_id=draft_registration.guid %}" | ||
data-toggle="modal" data-target="#modifyStorageCaps" | ||
class="btn btn-warning"> | ||
Modify Storage Caps | ||
</a> | ||
<div class="modal" id="modifyStorageCaps"> | ||
<div class="modal-dialog"> | ||
<div class="modal-content"> | ||
<form class="well" method="post" action="{% url 'draft_registrations:adjust-draft-registration-storage-usage' draft_registration_id=draft_registration.guid %}"> | ||
{% csrf_token %} | ||
<div class="modal-header"> | ||
<button type="button" class="close" data-dismiss="modal">x</button> | ||
<h3>Adjusting the storage caps for {{ draft_registration.guid }}</h3> | ||
</div> | ||
<b>Public and Private cap: </b><input name='cap-input' type="text" value="{{ draft_registration.cap|floatformat:0 }}" /> GB | ||
<div class="modal-footer"> | ||
<input class="btn btn-success" type="submit" value="Save" /> | ||
<button type="button" class="btn btn-default" data-dismiss="modal"> | ||
Cancel | ||
</button> | ||
</div> | ||
</form> | ||
</div> | ||
</div> | ||
</div> | ||
</td> | ||
</tr> |
18 changes: 18 additions & 0 deletions
18
osf/migrations/0031_draftregistration_custom_storage_usage_limit.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Generated by Django 4.2.15 on 2025-06-24 13:37 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('osf', '0030_abstractnode__manual_guid'), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name='draftregistration', | ||
name='custom_storage_usage_limit', | ||
field=models.DecimalField(blank=True, decimal_places=9, max_digits=100, null=True), | ||
), | ||
] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.