mirror of
https://github.com/weaveworks/scope.git
synced 2026-03-03 02:00:43 +00:00
Store the pausedAt state in the app URL.
This commit is contained in:
@@ -104,13 +104,12 @@ export function humanizedRoundedDownDuration(duration) {
|
||||
// that matches the `dataType` of the field. You must return an Object
|
||||
// with the keys `value` and `title` defined.
|
||||
// `referenceTimestamp` is the timestamp we've time-travelled to.
|
||||
export function formatDataType(field, referenceTimestampStr = null) {
|
||||
export function formatDataType(field, referenceTimestamp = null) {
|
||||
const formatters = {
|
||||
datetime(timestampString) {
|
||||
const timestamp = moment(timestampString);
|
||||
const referenceTimestamp = referenceTimestampStr ? moment(referenceTimestampStr) : moment();
|
||||
return {
|
||||
value: timestamp.from(referenceTimestamp),
|
||||
value: timestamp.from(referenceTimestamp ? moment(referenceTimestamp) : moment()),
|
||||
title: timestamp.utc().toISOString()
|
||||
};
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user