Resume time works only if previously paused.

This commit is contained in:
Filip Barl
2017-07-31 16:16:27 +02:00
parent 2a6cbf6e4b
commit f19e4c55cd

View File

@@ -574,14 +574,16 @@ export function receiveNodesDelta(delta) {
export function resumeTime() {
return (dispatch, getState) => {
dispatch({
type: ActionTypes.RESUME_TIME
});
// After unpausing, all of the following calls will re-activate polling.
getTopologies(getState, dispatch);
getNodes(getState, dispatch, true);
if (isResourceViewModeSelector(getState())) {
getResourceViewNodesSnapshot(getState(), dispatch);
if (isPausedSelector(getState())) {
dispatch({
type: ActionTypes.RESUME_TIME
});
// After unpausing, all of the following calls will re-activate polling.
getTopologies(getState, dispatch);
getNodes(getState, dispatch, true);
if (isResourceViewModeSelector(getState())) {
getResourceViewNodesSnapshot(getState(), dispatch);
}
}
};
}