Correct url-state handling.

Testing out colored borders rather than BGs for net-view legend
This commit is contained in:
Simon Howe
2016-05-24 16:22:25 +02:00
parent 8481223181
commit b198c88fb1
6 changed files with 45 additions and 13 deletions

View File

@@ -37,7 +37,7 @@ export function getUrlState(state) {
id: details.id, label: details.label, topologyId: details.topologyId
}));
return {
const urlState = {
controlPipe: cp ? cp.toJS() : null,
nodeDetails: nodeDetails.toJS(),
pinnedMetricType: state.get('pinnedMetricType'),
@@ -47,6 +47,15 @@ export function getUrlState(state) {
topologyId: state.get('currentTopologyId'),
topologyOptions: state.get('topologyOptions').toJS() // all options
};
if (state.get('showingNetworks')) {
urlState.showingNetworks = true;
if (state.get('pinnedNetwork')) {
urlState.pinnedNetwork = state.get('pinnedNetwork');
}
}
return urlState;
}
export function updateRoute(getState) {