From f19e4c55cd1b9bb34358d38b5fafa44ea59e9ebb Mon Sep 17 00:00:00 2001 From: Filip Barl Date: Mon, 31 Jul 2017 16:16:27 +0200 Subject: [PATCH] Resume time works only if previously paused. --- client/app/scripts/actions/app-actions.js | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/client/app/scripts/actions/app-actions.js b/client/app/scripts/actions/app-actions.js index 009f8a330..ce7655698 100644 --- a/client/app/scripts/actions/app-actions.js +++ b/client/app/scripts/actions/app-actions.js @@ -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); + } } }; }