-
Notifications
You must be signed in to change notification settings - Fork 712
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
Add logic to turn off network requests when Scope dismounts #2290
Conversation
6878780
to
d775020
Compare
@davkal If you could review when you get a chance. I pushed up a commit on
in the service-ui repo. |
Added some extra files to support doing partial imports, ie: I originally attempted to avoid polluting the app/scripts directory with more files using a bash script when building the npm package...
...but that will not work with |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Small code nits. Otherwise LGTM
clearTimeout(reconnectTimer); | ||
if (socket) { | ||
socket.onerror = null; | ||
socket.onclose = null; |
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
if (storageState) { | ||
window.location.hash = `!/state/${storageState}`; | ||
const parsedState = JSON.parse(decodeURL(storageState)); | ||
mergedState = Object.assign(initialState, parsedState); |
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
2667e1d
to
38d2b8d
Compare
Needed for https://github.com/weaveworks/service-ui/pull/184.
When navigating to another page in Weave Cloud, Scope will be unmounted by
react-router
. This change will turn off topology polling and websocket connections when Scope dismounts.