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

Gsa sets default filter #1631

Merged
merged 25 commits into from
Sep 30, 2019
Merged

Conversation

swaterkamp
Copy link
Member

Checklist:

@swaterkamp swaterkamp self-assigned this Sep 17, 2019
@swaterkamp swaterkamp marked this pull request as ready for review September 17, 2019 12:51
@codecov
Copy link

codecov bot commented Sep 17, 2019

Codecov Report

Merging #1631 into master will decrease coverage by 0.79%.
The diff coverage is 60.16%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master    #1631     +/-   ##
=========================================
- Coverage   42.34%   41.55%   -0.8%     
=========================================
  Files        1047     1048      +1     
  Lines       23984    24051     +67     
  Branches     6684     6712     +28     
=========================================
- Hits        10156     9994    -162     
- Misses      12589    12754    +165     
- Partials     1239     1303     +64
Impacted Files Coverage Δ
gsa/src/web/entities/container.js 1.74% <0%> (-39.72%) ⬇️
gsa/src/web/pages/usersettings/usersettingspage.js 3.36% <0%> (-0.1%) ⬇️
gsa/src/web/store/utils.js 100% <100%> (ø) ⬆️
gsa/src/gmp/utils/identity.js 100% <100%> (ø) ⬆️
gsa/src/web/store/usersettings/defaults/actions.js 100% <100%> (ø) ⬆️
gsa/src/gmp/models/filter.js 100% <100%> (ø) ⬆️
gsa/src/gmp/commands/gmp.js 100% <100%> (ø) ⬆️
gsa/src/web/entities/filterprovider.js 100% <100%> (ø)
gsa/src/web/pages/results/listpage.js 50% <100%> (+7.14%) ⬆️
...c/web/store/usersettings/defaultfilters/actions.js 100% <100%> (ø) ⬆️
... and 14 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 488b885...0eeedca. 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.

I am sorry but these changes need tests. We must ensure that the provided filter is the expected filter. Currently this can break without noticing. Also with tests it would be much clearer how this is supposed to work.

gsa/src/gmp/commands/users.js Outdated Show resolved Hide resolved
gsa/src/web/entities/filterprovider.js Outdated Show resolved Hide resolved
gsa/src/web/store/usersettings/defaultfilters/actions.js Outdated Show resolved Hide resolved
gsa/src/web/store/usersettings/defaults/actions.js Outdated Show resolved Hide resolved
gsa/src/web/store/usersettings/defaults/actions.js Outdated Show resolved Hide resolved
gsa/src/web/pages/usersettings/usersettingspage.js Outdated Show resolved Hide resolved
gsa/src/web/entities/filterprovider.js Outdated Show resolved Hide resolved
gsa/src/web/entities/filterprovider.js Outdated Show resolved Hide resolved
gsa/src/web/entities/filterprovider.js Outdated Show resolved Hide resolved
gsa/src/web/entities/filterprovider.js Outdated Show resolved Hide resolved
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.

Looks very very good to me. Just some additional cleanups.

gsa/src/web/entities/__tests__/filterprovider.js Outdated Show resolved Hide resolved
gsa/src/web/entities/__tests__/filterprovider.js Outdated Show resolved Hide resolved
gsa/src/web/entities/__tests__/filterprovider.js Outdated Show resolved Hide resolved
gsa/src/web/entities/filterprovider.js Outdated Show resolved Hide resolved
gsa/src/web/entities/filterprovider.js Outdated Show resolved Hide resolved
gsa/src/web/entities/filterprovider.js Outdated Show resolved Hide resolved
gsa/src/web/entities/filterprovider.js Outdated Show resolved Hide resolved
gsa/src/web/pages/policies/__tests__/listpage.js Outdated Show resolved Hide resolved
@swaterkamp
Copy link
Member Author

Known issue which needs a fix: If a locationQuery is used and the filter is changed by the user, it does not change the URL, so at the next rerender the query from the URL will be used again instead of the user's filter.

@bjoernricks bjoernricks merged commit 51552fa into greenbone:master Sep 30, 2019
@swaterkamp swaterkamp deleted the gsaSetsDefaultFilter branch February 20, 2020 11:22
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