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

Auto reload interval #917

Merged
merged 17 commits into from
Sep 6, 2018
Merged

Auto reload interval #917

merged 17 commits into from
Sep 6, 2018

Conversation

bjoernricks
Copy link
Contributor

No description provided.

Start a timer after each successful loading to reload the data after a
grace interval. With this change every load function must return a
promise.
Under some circumstances it may be possible that the timer is started
when the component is alread unmounted. E.g. the loading is already
running when the component is unmounted. Ensure starting the timer only
if it is mounted.
Measure the duration of the last loading procedure and adjust the reload
timer if the duration was longer then the to be set reload interval. In
that case the new reload interval is calculated from the last duration.
The last duration is multiplied with some more or less random value to
ensure the timer takes longer then the loading procedure.
Allow to provide a reloadInterval function to EntityContainer and
EntitiesContainer components. This will allow to calculate the reload
interval from pops.
Add a first constant for the reload interval if "something" is active.
Use three seconds reload interval if a task is active at the task
details and task list pages.
If a corresponding task of a report is active use a three seconds reload
interval at the reports list page.
By default only reload a page every 15 seconds without user input. This
reduces the work load at gsad and gvmd.

If the reload interval should be reduced the reloadInterval function
should be set at the corresponding page instead of lowering the default
now.
Use the new prop to calculate the actual reload interval.
Replace gmp.autorefresh with new gmp.reloadInterval api.
@codecov
Copy link

codecov bot commented Sep 5, 2018

Codecov Report

Merging #917 into master will increase coverage by <.01%.
The diff coverage is 2.83%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master    #917      +/-   ##
=========================================
+ Coverage    7.39%   7.39%   +<.01%     
=========================================
  Files         825     826       +1     
  Lines       26845   26844       -1     
  Branches     5687    5721      +34     
=========================================
+ Hits         1984    1986       +2     
+ Misses      22448   22437      -11     
- Partials     2413    2421       +8
Impacted Files Coverage Δ
gsa/src/web/entity/withEntityContainer.js 0% <ø> (ø) ⬆️
gsa/src/web/utils/constants.js 0% <0%> (ø)
gsa/src/web/pages/portlists/detailspage.js 0% <0%> (ø) ⬆️
gsa/src/web/entities/container.js 0% <0%> (ø) ⬆️
gsa/src/web/pages/operatingsystems/detailspage.js 0% <0%> (ø) ⬆️
gsa/src/gmp/gmp.js 1.51% <0%> (ø) ⬆️
gsa/src/web/pages/reportformats/detailspage.js 0% <0%> (ø) ⬆️
gsa/src/web/pages/scanconfigs/detailspage.js 0% <0%> (ø) ⬆️
gsa/src/web/pages/credentials/detailspage.js 0% <0%> (ø) ⬆️
gsa/src/web/pages/reports/listpage.js 0% <0%> (ø) ⬆️
... and 26 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 6bdde33...7e0c820. Read the comment docs.

@swaterkamp swaterkamp merged commit 0a4eafa into greenbone:master Sep 6, 2018
@bjoernricks bjoernricks deleted the auto-reload-interval branch September 13, 2018 07:02
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