-
Notifications
You must be signed in to change notification settings - Fork 99
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Session handling #902
Merged
Merged
Session handling #902
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
Pass renewSessionTimeout to the start dashboard(s).
Its more readable if all proptype definitions are at the bottom of the corresponding component.
dashboard prop now expects a function and will replaces the current dashboard2 prop. dashboard2 prop wil be removed in future.
Don't renew the session in Dashboard and DashboardControls directly. Instead add a new handler function that is called after user interaction. This removes the business logic from both components and puts the upper layer in responsibility for session renewal.
This will allow to renew the user session via calling onInteraction. The function will be forwarded to the Dashboard components in future.
Pass props orignated from EntitesContainer directly to the dashboards and not implicitly via forwarding in EntitesPage. Always use dashboard prop as render prop. Use dashboard prop instead of dashboard2. Add onInteraction handler to dashbaord and dashboardcontrol components.
Renew the user session on user interaction at the scans, secinfo and assets overview dashboards.
Also don't forward any prop to the dashboard function anymore. This is obsolete now.
Instead add a handler to act on user interaction. This will allow to update the user session only in EntitesContainer.
The changed handler is not explicitly called after user interaction. Therefore it should not renew the users session. The current behavior in EntitesContainer is still a mix of implicit and explicit user interaction. E.g. onFilterXyz is renewing the session but is called only implicitly after user interaction at the powerfilter. This may change in future by passing onInteraction down the component tree.
The handler is called when an entity is cloned, deleted, downloaded and saved.
This will renew the user session if a task is cloned, downloaded, deleted and saved.
Pass gmp as single argument.
Drop old handleInteraction method and rename renewSession to handleInteraction. Require an onInteraction handler prop this is called at handleInteraction.
Raise a proptype warning if the handler is missing. The handler isn't really required for the components but if it is missing it's a bug in the application.
If the user changes the active tab on a entity page call the onInteraction handler.
Renew the user session if a user interacts with a list or details page
Codecov Report
@@ Coverage Diff @@
## master #902 +/- ##
=========================================
- Coverage 7.48% 7.37% -0.11%
=========================================
Files 824 824
Lines 26470 26845 +375
Branches 5668 5693 +25
=========================================
Hits 1980 1980
- Misses 22116 22464 +348
- Partials 2374 2401 +27
Continue to review full report at Codecov.
|
swaterkamp
approved these changes
Aug 31, 2018
# for free
to join this conversation on GitHub.
Already have an account?
# 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.
Renew the users session after interaction with a details or list page.
Also do some cleanups.