Skip to content
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

Disable edit default quota button when not editable #20810

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

hpoettker
Copy link

Comprehensive summary of your change

The PR disables the edit button for the default quota space per project when the configuration property storage_per_project is set to not editable, which is e.g. the case when the environment variable CONFIG_OVERRIDE_JSON is set for the core.

Issue being fixed

Currently the edit button is always enabled and the modal dialog for changing the default quota space always opens. When however the property storage_per_project is not editable, a submission in the modal dialog will lead to the error message Save abort because nothing changed being displayed, and the modal dialog can only be exited by clicking the cancel button.

Please indicate you've done the following:

  • Well Written Title and Summary of the PR
  • Label the PR as needed. "release-note/ignore-for-release, release-note/new-feature, release-note/update, release-note/enhancement, release-note/community, release-note/breaking-change, release-note/docs, release-note/infra, release-note/deprecation"
  • Accepted the DCO. Commits without the DCO will delay acceptance.
  • Made sure tests are passing and test coverage is added if needed.
  • Considered the docs impact and opened a new docs issue or PR with docs changes if needed in website repository.

Copy link

codecov bot commented Aug 6, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 66.22%. Comparing base (c8c11b4) to head (d7d39b8).
Report is 249 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##             main   #20810       +/-   ##
===========================================
+ Coverage   45.36%   66.22%   +20.85%     
===========================================
  Files         244     1045      +801     
  Lines       13333   113501   +100168     
  Branches     2719     2845      +126     
===========================================
+ Hits         6049    75167    +69118     
- Misses       6983    34227    +27244     
- Partials      301     4107     +3806     
Flag Coverage Δ
unittests 66.22% <ø> (+20.85%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

see 1287 files with indirect coverage changes

@stonezdj
Copy link
Contributor

The CONFIG_OVERRIDE_JSON disabled the edit of all user configurations, we can't just update storage_per_project only. The principle is just lets the backend error popup to the user.

@hpoettker
Copy link
Author

If CONFIG_OVERRIDE_JSON is set, then all fields in the tab "Administration -> Configuration" are visible but disabled. The PR is intended to mirror that behavior for the default quota.

@hpoettker hpoettker force-pushed the fix-disable-edit-default-quota branch from d7d39b8 to 4aa1ffa Compare October 5, 2024 22:40
@hpoettker
Copy link
Author

I've rebased the change on the current main branch.

I still think it's a straight-forward fix for a very confusing issue in the UI. It brings the same solution as applied for many settings in the tab "Administration -> Configuration" to the attribute "default quota space per project".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants