mirror of
https://github.com/weaveworks/scope.git
synced 2026-07-28 17:51:21 +00:00
Only send filters to nodes from the current topology
This reverts commit 699fe45e65.
This commit is contained in:
@@ -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) => {
|
||||
|
||||
Reference in New Issue
Block a user