diff --git a/client/app/scripts/actions/app-actions.js b/client/app/scripts/actions/app-actions.js index 501bc204c8..a06479960e 100644 --- a/client/app/scripts/actions/app-actions.js +++ b/client/app/scripts/actions/app-actions.js @@ -641,8 +641,9 @@ export function receiveNodesForTopology(nodes, topologyId) { } export function receiveTopologies(topologies) { - return (dispatch, getWeirdState) => { - const getState = () => getWeirdState().scope || getWeirdState(); + return (dispatch, getGlobalState) => { + // NOTE: Fortunately, this will go when Time Travel is out of . + const getState = () => getGlobalState().scope || getGlobalState(); const firstLoad = !getState().get('topologiesLoaded'); dispatch({ type: ActionTypes.RECEIVE_TOPOLOGIES, diff --git a/client/app/scripts/utils/string-utils.js b/client/app/scripts/utils/string-utils.js index 0e086bea0c..e22218996f 100644 --- a/client/app/scripts/utils/string-utils.js +++ b/client/app/scripts/utils/string-utils.js @@ -89,13 +89,14 @@ export function ipToPaddedString(value) { // Formats metadata values. Add a key to the `formatters` obj // that matches the `dataType` of the field. You must return an Object // with the keys `value` and `title` defined. -export function formatDataType(field, currentTimestamp) { +// `referenceTimestamp` is the timestamp we've time-travelled to. +export function formatDataType(field, referenceTimestampStr = null) { const formatters = { datetime(timestampString) { const timestamp = moment(timestampString); - const now = currentTimestamp ? moment(currentTimestamp) : moment(); + const referenceTimestamp = referenceTimestampStr ? moment(referenceTimestampStr) : moment(); return { - value: timestamp.from(now), + value: timestamp.from(referenceTimestamp), title: timestamp.utc().toISOString() }; }