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

Fix selection for including related resources in permission dialog #2632

Merged
merged 2 commits into from
Dec 15, 2020

Conversation

swaterkamp
Copy link
Member

What:
Fix initial value of dropdown for including related resources for permissions in MultiplePermissionsDialog

Why:
When the dropdown is initialized with "include related resources", but later there aren't any, the Select component will show a label- and useless value "1". Now we have "for current resource only" as standard if there are no related resources, and a "include related resources" if there are.

How:
Visual inspection of the options in the dropdown for entities with and without resources. Also the console doesn't throw a prop warning for Downshift anymore.

Checklist:

When there are in fact no related resources the initial value will not 
be an option in the Select anymore, but it's value will still be in its 
state. Ths results in a consoe warning and a useless label "1" in the 
textfield.
@swaterkamp swaterkamp requested review from sarahd93, saberlynx and a team December 15, 2020 08:57
@swaterkamp swaterkamp self-assigned this Dec 15, 2020
@codecov
Copy link

codecov bot commented Dec 15, 2020

Codecov Report

Merging #2632 (2f34292) into gsa-20.08 (073d2d2) will increase coverage by 0.30%.
The diff coverage is 74.26%.

Impacted file tree graph

@@              Coverage Diff              @@
##           gsa-20.08    #2632      +/-   ##
=============================================
+ Coverage      52.76%   53.06%   +0.30%     
=============================================
  Files           1070     1072       +2     
  Lines          25789    25900     +111     
  Branches        7312     7372      +60     
=============================================
+ Hits           13607    13744     +137     
+ Misses         11058    11034      -24     
+ Partials        1124     1122       -2     
Impacted Files Coverage Δ
gsa/src/gmp/commands/wizard.js 9.23% <0.00%> (ø)
gsa/src/gmp/models/tlscertificate.js 100.00% <ø> (ø)
gsa/src/web/components/error/errorpanel.js 100.00% <ø> (ø)
gsa/src/web/pages/alerts/condition.js 3.22% <0.00%> (ø)
gsa/src/web/pages/alerts/dialog.js 20.33% <0.00%> (ø)
.../web/pages/alerts/filtercountleastconditionpart.js 60.00% <ø> (ø)
gsa/src/web/pages/cpes/details.js 11.11% <ø> (ø)
gsa/src/web/pages/extras/trashactions.js 5.49% <0.00%> (ø)
gsa/src/web/pages/hosts/detailspage.js 23.80% <ø> (ø)
gsa/src/web/pages/hosts/dialog.js 50.00% <ø> (ø)
... and 70 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 34cf277...2f34292. Read the comment docs.

@saberlynx saberlynx merged commit be0ffc9 into greenbone:gsa-20.08 Dec 15, 2020
@swaterkamp swaterkamp deleted the fixRelatedResSelection branch April 20, 2021 08:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants