mirror of
https://github.com/weaveworks/scope.git
synced 2026-03-03 18:20:27 +00:00
Correctly handle Time Travel resuming in Monitor.
This commit is contained in:
@@ -788,6 +788,16 @@ export function route(urlState) {
|
||||
state: urlState,
|
||||
type: ActionTypes.ROUTE_TOPOLOGY
|
||||
});
|
||||
// Handle Time Travel state update through separate actions as it's more complex.
|
||||
// This is mostly to handle switching contexts Explore <-> Monitor in WC while
|
||||
// the timestamp keeps changing - e.g. if we were Time Travelling in Scope and
|
||||
// then went live in Monitor, switching back to Explore should properly close
|
||||
// the Time Travel etc, not just update the pausedAt state directly.
|
||||
if (!urlState.pausedAt) {
|
||||
dispatch(resumeTime());
|
||||
} else {
|
||||
dispatch(startTimeTravel(urlState.pausedAt));
|
||||
}
|
||||
// update all request workers with new options
|
||||
getTopologies(getState, dispatch);
|
||||
getNodes(getState, dispatch);
|
||||
|
||||
@@ -692,9 +692,6 @@ export function rootReducer(state = initialState, action) {
|
||||
pinnedMetricType: action.state.pinnedMetricType
|
||||
});
|
||||
state = state.set('topologyViewMode', action.state.topologyViewMode);
|
||||
if (action.state.pausedAt) {
|
||||
state = state.set('pausedAt', action.state.pausedAt);
|
||||
}
|
||||
if (action.state.gridSortedBy) {
|
||||
state = state.set('gridSortedBy', action.state.gridSortedBy);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user