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 ScanConfigs and Policies NVT oid->id #2733

Merged
merged 4 commits into from
Feb 17, 2021

Conversation

y0urself
Copy link
Member

@y0urself y0urself commented Feb 16, 2021

What:

  • Change occurrences of oid in ScanConfigs and Policies to id due to latest changes in Hyperion.

Why:

  • changed it in Hyperion

How:

Checklist:

@y0urself y0urself marked this pull request as ready for review February 16, 2021 15:18
@y0urself y0urself requested a review from a team February 16, 2021 15:18
sarahd93
sarahd93 previously approved these changes Feb 16, 2021
@y0urself y0urself changed the title Fix ScanConfigs NVT oid->id Fix ScanConfigs and Policies NVT oid->id Feb 16, 2021
@codecov
Copy link

codecov bot commented Feb 16, 2021

Codecov Report

Merging #2733 (8e20fa6) into master (ec81342) will increase coverage by 0.01%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2733      +/-   ##
==========================================
+ Coverage   62.80%   62.82%   +0.01%     
==========================================
  Files        1116     1115       -1     
  Lines       28371    28393      +22     
  Branches     8034     8031       -3     
==========================================
+ Hits        17819    17838      +19     
- Misses       9563     9566       +3     
  Partials      989      989              
Impacted Files Coverage Δ
gsa/src/web/graphql/policies.js 100.00% <ø> (ø)
gsa/src/web/graphql/scanconfigs.js 100.00% <ø> (ø)
gsa/src/web/pages/scanconfigs/nvtpreferences.js 92.30% <ø> (ø)
gsa/src/gmp/models/policy.js 98.23% <100.00%> (ø)
gsa/src/gmp/models/scanconfig.js 99.24% <100.00%> (ø)
gsa/src/web/pages/scanconfigs/detailspage.js 95.38% <100.00%> (ø)
gsa/src/web/pages/usersettings/validationrules.js 33.33% <0.00%> (-33.34%) ⬇️
gsa/src/web/pages/usersettings/dialog.js 25.00% <0.00%> (-4.42%) ⬇️
gsa/src/web/components/dialog/savedialog.js 65.00% <0.00%> (-1.67%) ⬇️
gsa/src/web/components/form/useFormValidation.js 97.61% <0.00%> (ø)
... and 6 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 ec81342...6d3100c. Read the comment docs.

Copy link
Contributor

@bjoernricks bjoernricks left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The whole preference handling in the models (scan configs and policies) looks a bit weird now. IMHO this should be refactored and maybe some parts can also be moved to hyperion already. For example the differentiation between scanner and nvt preferences should be done in the backend already and copying the original nvt should be necessary anymore.

          const nvt = {...pref.nvt};
          pref.nvt = nvt;
          pref.nvt.id = preference.nvt.id;

makes no sense to me.

@saberlynx saberlynx merged commit fc566a2 into greenbone:master Feb 17, 2021
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.

4 participants