-
Notifications
You must be signed in to change notification settings - Fork 95
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
Edit dialog: only send name and comment if config or policy is in use, and add in use notification #2463
Merged
Conversation
This file contains 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
saberlynx
force-pushed
the
edit-inuse-config
branch
from
September 22, 2020 13:19
808b321
to
f273d9a
Compare
Codecov Report
@@ Coverage Diff @@
## gsa-20.08 #2463 +/- ##
=============================================
+ Coverage 52.76% 52.94% +0.17%
=============================================
Files 1070 1071 +1
Lines 25789 25863 +74
Branches 7312 7376 +64
=============================================
+ Hits 13607 13692 +85
+ Misses 11058 11050 -8
+ Partials 1124 1121 -3
Continue to review full report at Codecov.
|
saberlynx
changed the title
Edit dialog: only send name and comment if config or policy is in use, and add warning
Edit dialog: only send name and comment if config or policy is in use, and add in use notification
Sep 22, 2020
sarahd93
requested changes
Sep 23, 2020
saberlynx
force-pushed
the
edit-inuse-config
branch
from
September 23, 2020 11:43
f1dddf0
to
46ef499
Compare
saberlynx
force-pushed
the
edit-inuse-config
branch
2 times, most recently
from
September 23, 2020 12:46
c9924e0
to
57e60dc
Compare
saberlynx
force-pushed
the
edit-inuse-config
branch
from
September 23, 2020 13:11
6bee339
to
5a06079
Compare
sarahd93
previously approved these changes
Sep 25, 2020
swaterkamp
approved these changes
Sep 25, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What:
If a config or policy is in use, ONLY send name and comment fields (and id, of course) through the ScanConfigCommand or PolicyCommand. Added a h4 notification in the edit dialog to make users aware that they can only edit name and comment for in use config/policy.
Why:
Currently, the edit scan config dialog sends all the form fields (even if unchanged) to the backend, even if only name and comment fields are rendered (in the case of in-use config/policy). This triggers a response from gvmd that "since the entity is in use, only name and comment can be edited". Due to this error, even if the user does everything correctly and only edit the fields available to them, it will trigger a gsad error and the dialog will not close. This is wrong and confusing for the user.
This change avoids triggering the error because nothing outside of the permitted fields are "edited", and the user is made aware why the edit dialog is so short in this case.
How:
Checklist: