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

Pick up default topology options on initial load #3097

Merged
merged 1 commit into from
Feb 27, 2018

Conversation

fbarl
Copy link
Contributor

@fbarl fbarl commented Feb 26, 2018

Fixes https://github.com/weaveworks/service-ui/issues/1999.

As @foot discovered, the issue was actually easily reproducable - it would always show the Uncontained/Unmanaged nodes on fresh page load, regardless of the options set in the UI.

The problem was that the initial ROUTE_TOPOLOGY handler would set topologyOptions to a certain value and then the condition in RECEIVE_TOPOLOGIES would not update with the default options once they'd be received with topologies data (with a certain delay).

The solution was to unconditionally update the options with defaults in RECEIVE_TOPOLOGIES on first load, but using them only as 'fallback', still giving priority to the URL/local state options.

@fbarl fbarl self-assigned this Feb 26, 2018
@fbarl fbarl requested a review from foot February 26, 2018 16:19
@rade
Copy link
Member

rade commented Feb 26, 2018

Is this issue something that affected standalone mode too?

@fbarl
Copy link
Contributor Author

fbarl commented Feb 26, 2018

Is this issue something that affected standalone mode too?

I didn't test, but since all of this logic lives in Scope, I imagine there was the same issue there as well.

Copy link
Contributor

@foot foot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm 👌

@fbarl fbarl merged commit 6f72ef6 into master Feb 27, 2018
@dlespiau dlespiau deleted the 1999-fix-default-topology-options-filtering branch February 27, 2018 23: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.

3 participants