-
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 remove non-transferrable state when switching Cloud instances #2237
Conversation
e96ad0d
to
6545c19
Compare
@fbarl Could you take a look please? |
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.
Nice PR! Looks much more elegant than what I did here https://github.com/weaveworks/service-ui/pull/198 - I suppose that code will be dropped once you make this work from Scope?
client/app/scripts/reducers/root.js
Outdated
@@ -721,6 +721,12 @@ export function rootReducer(state = initialState, action) { | |||
return state.set('showingTroubleshootingMenu', !state.get('showingTroubleshootingMenu')); | |||
} | |||
|
|||
case ActionTypes.CHANGE_INSTANCE: { | |||
state = state.set('selectedNodeId', null); | |||
state = state.update('nodeDetails', nodes => nodes.clear()); |
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.
@@ -61,6 +61,7 @@ | |||
"eslint-plugin-import": "2.2.0", | |||
"eslint-plugin-jsx-a11y": "2.2.3", | |||
"eslint-plugin-react": "6.8.0", | |||
"expect": "^1.20.2", |
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.
8d54fcc
to
65ca56a
Compare
client/app/scripts/reducers/root.js
Outdated
@@ -721,6 +721,12 @@ export function rootReducer(state = initialState, action) { | |||
return state.set('showingTroubleshootingMenu', !state.get('showingTroubleshootingMenu')); | |||
} | |||
|
|||
case ActionTypes.CHANGE_INSTANCE: { | |||
state = state.set('selectedNodeId', null); |
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
65ca56a
to
3d13e91
Compare
Change needed for https://github.com/weaveworks/service-ui/pull/184
This moves the logic added in https://github.com/weaveworks/service-ui/pull/198 to Scope. In the near future, service-ui will interact with Scope via Scope's public JS API, so manipulating the iframe URL state will not be a viable option for preventing instance-specific state from transferring when the user changes instances.