From 699fe45e650bed337c60b4258a7f6e4770348ad7 Mon Sep 17 00:00:00 2001 From: Simon Howe Date: Wed, 5 Oct 2016 12:23:31 +0200 Subject: [PATCH] Details panel: send topology options of node type being loaded --- client/app/scripts/actions/app-actions.js | 10 +++++----- client/app/scripts/utils/web-api-utils.js | 3 ++- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/client/app/scripts/actions/app-actions.js b/client/app/scripts/actions/app-actions.js index 2ad28d933..17a27c7e1 100644 --- a/client/app/scripts/actions/app-actions.js +++ b/client/app/scripts/actions/app-actions.js @@ -170,7 +170,7 @@ export function changeTopologyOption(option, value, topologyId) { ); getNodeDetails( state.get('topologyUrlsById'), - getActiveTopologyOptions(state), + state.get('topologyOptions'), state.get('nodeDetails'), dispatch ); @@ -261,7 +261,7 @@ export function clickNode(nodeId, label, origin) { const state = getState(); getNodeDetails( state.get('topologyUrlsById'), - getActiveTopologyOptions(state), + state.get('topologyOptions'), state.get('nodeDetails'), dispatch ); @@ -287,7 +287,7 @@ export function clickRelative(nodeId, topologyId, label, origin) { const state = getState(); getNodeDetails( state.get('topologyUrlsById'), - getActiveTopologyOptions(state), + state.get('topologyOptions'), state.get('nodeDetails'), dispatch ); @@ -546,7 +546,7 @@ export function receiveTopologies(topologies) { ); getNodeDetails( state.get('topologyUrlsById'), - getActiveTopologyOptions(state), + state.get('topologyOptions'), state.get('nodeDetails'), dispatch ); @@ -649,7 +649,7 @@ export function route(urlState) { ); getNodeDetails( state.get('topologyUrlsById'), - getActiveTopologyOptions(state), + state.get('topologyOptions'), 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 d334cd830..cee8f27ac 100644 --- a/client/app/scripts/utils/web-api-utils.js +++ b/client/app/scripts/utils/web-api-utils.js @@ -163,10 +163,11 @@ export function getNodesDelta(topologyUrl, options, dispatch) { } } -export function getNodeDetails(topologyUrlsById, options, nodeMap, dispatch) { +export function getNodeDetails(topologyUrlsById, topologyOptions, 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]