-
Notifications
You must be signed in to change notification settings - Fork 95
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
swaterkamp
merged 17 commits into
greenbone:master
from
bjoernricks:auto-reload-interval
Sep 6, 2018
Merged
Auto reload interval #917
swaterkamp
merged 17 commits into
greenbone:master
from
bjoernricks:auto-reload-interval
Sep 6, 2018
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 Report
@@ 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
Continue to review full report at Codecov.
|
swaterkamp
approved these changes
Sep 6, 2018
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.