diff --git a/client/app/scripts/actions/app-actions.js b/client/app/scripts/actions/app-actions.js index 17a27c7e1..847c5c338 100644 --- a/client/app/scripts/actions/app-actions.js +++ b/client/app/scripts/actions/app-actions.js @@ -170,7 +170,8 @@ export function changeTopologyOption(option, value, topologyId) { ); getNodeDetails( state.get('topologyUrlsById'), - state.get('topologyOptions'), + state.get('currentTopologyId'), + getActiveTopologyOptions(state), state.get('nodeDetails'), dispatch ); @@ -261,7 +262,8 @@ export function clickNode(nodeId, label, origin) { const state = getState(); getNodeDetails( state.get('topologyUrlsById'), - state.get('topologyOptions'), + state.get('currentTopologyId'), + getActiveTopologyOptions(state), state.get('nodeDetails'), dispatch ); @@ -287,7 +289,8 @@ export function clickRelative(nodeId, topologyId, label, origin) { const state = getState(); getNodeDetails( state.get('topologyUrlsById'), - state.get('topologyOptions'), + state.get('currentTopologyId'), + getActiveTopologyOptions(state), state.get('nodeDetails'), dispatch ); @@ -546,7 +549,8 @@ export function receiveTopologies(topologies) { ); getNodeDetails( state.get('topologyUrlsById'), - state.get('topologyOptions'), + state.get('currentTopologyId'), + getActiveTopologyOptions(state), state.get('nodeDetails'), dispatch ); @@ -649,7 +653,8 @@ export function route(urlState) { ); getNodeDetails( state.get('topologyUrlsById'), - state.get('topologyOptions'), + state.get('currentTopologyId'), + getActiveTopologyOptions(state), state.get('nodeDetails'), dispatch ); diff --git a/client/app/scripts/utils/web-api-utils.js b/client/app/scripts/utils/web-api-utils.js index cee8f27ac..f5f0824f1 100644 --- a/client/app/scripts/utils/web-api-utils.js +++ b/client/app/scripts/utils/web-api-utils.js @@ -163,15 +163,19 @@ export function getNodesDelta(topologyUrl, options, dispatch) { } } -export function getNodeDetails(topologyUrlsById, topologyOptions, nodeMap, dispatch) { +export function getNodeDetails(topologyUrlsById, currentTopologyId, options, nodeMap, dispatch) { // get details for all opened nodes const obj = nodeMap.last(); if (obj && topologyUrlsById.has(obj.topologyId)) { - const options = topologyOptions.get(obj.topologyId); const topologyUrl = topologyUrlsById.get(obj.topologyId); - const optionsQuery = buildOptionsQuery(options); - const url = [topologyUrl, '/', encodeURIComponent(obj.id), '?', optionsQuery] - .join('').substr(1); + let urlComponents = [topologyUrl, '/', encodeURIComponent(obj.id)]; + if (currentTopologyId === obj.topologyId) { + // Only forward filters for nodes in the current topology + const optionsQuery = buildOptionsQuery(options); + urlComponents = urlComponents.concat(['?', optionsQuery]); + } + const url = urlComponents.join('').substr(1); + reqwest({ url, success: (res) => {