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

Report loading #1851

Merged
merged 15 commits into from
Dec 11, 2019
Merged

Report loading #1851

merged 15 commits into from
Dec 11, 2019

Conversation

bjoernricks
Copy link
Contributor

@bjoernricks bjoernricks commented Dec 11, 2019

Only load report without details if the report results count extends the threshold from the settings.

Checklist:

Pass filter to delta report Summary component.
For the current gmp commands 0 and 1 are often passed for boolean
values. To still support this and not to break any code adjust
convertBoolean and log some warning with a stacktrace.
This new action creator function is a bit "hacky". It loads the report
without details first and checks the number of results. If the number of
results is lower the threshold from the gmp settings it loads the full
report. Otherwise it just dispatches the report without the details.
Use the new loadEntityWithThreshold action creator in report details
page to request the report from the backend. First onyl the small report
without details is loaded. Afterwards it is checked if the report
results count is lower than the threshold from the settings and if yes
the report without details is dispatched to the redux store. Otherwise
the full report with details will be loaded.
isUpdating must be true if no report filter is applied or the old report
filter isn't equal the new requested filter.

Also isUpdating must be reset to false if an error occurs during loading.
…apper

Both functions are applied on ReportDetailsWrapper. Therefore move them
below the component.
@bjoernricks bjoernricks requested a review from a team December 11, 2019 16:05
@codecov
Copy link

codecov bot commented Dec 11, 2019

Codecov Report

Merging #1851 into gsa-8.0 will increase coverage by <.01%.
The diff coverage is 41.66%.

Impacted file tree graph

@@             Coverage Diff             @@
##           gsa-8.0    #1851      +/-   ##
===========================================
+ Coverage    40.03%   40.04%   +<.01%     
===========================================
  Files          975      976       +1     
  Lines        22434    22464      +30     
  Branches      6320     6326       +6     
===========================================
+ Hits          8981     8995      +14     
- Misses       12171    12184      +13     
- Partials      1282     1285       +3
Impacted Files Coverage Δ
gsa/src/web/pages/reports/deltadetailspage.js 5.33% <ø> (+0.02%) ⬆️
gsa/src/gmp/commands/reports.js 31.42% <ø> (ø) ⬆️
gsa/src/web/pages/reports/deltadetailscontent.js 10% <ø> (ø) ⬆️
gsa/src/web/pages/reports/detailspage.js 5.45% <10%> (+0.07%) ⬆️
gsa/src/gmp/commands/convert.js 100% <100%> (ø) ⬆️
gsa/src/gmp/utils/trace.js 100% <100%> (ø)
gsa/src/web/store/entities/reports.js 73.68% <55.88%> (-26.32%) ⬇️

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 593b81b...ecb241b. Read the comment docs.

@swaterkamp swaterkamp merged commit ca411f5 into greenbone:gsa-8.0 Dec 11, 2019
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