Details panel: send topology options of node type being loaded

This commit is contained in:
Simon Howe
2016-10-05 12:23:31 +02:00
parent bbb2c10975
commit 699fe45e65
2 changed files with 7 additions and 6 deletions

View File

@@ -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
);

View File

@@ -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]