Following are some debug sidebar feature requests I've been contemplating for a while:
- Allow the
msg.timestamp
field (often used for historical data records) to be displayed -- instead of using the time the msg was received
- A message sort toggle that allows the newest msgs to appear at the top (reverse order) -- perhaps what the OP was requesting?
- A setting to choose the default date/time format to use for all received timestamp values (right now, each individual value has to be toggled between millis/UTC/hex)
- Filter msgs by time received, so whenever a new msg is received, all msgs older that some amount of time are culled from the list (especially nice with reverse time sorted lists)
I've tried to put this into order from (imo) simplest to hardest to implement -- but since I probably won't be coding these features, I just wanted to see if anyone else had thought of these or had strong feelings about their worth...
can you amplify on these slightly ?
- so if msg.timestamp exists show that instead ? all the time ? what about msg.ts or msg.tstamp or msg.time ?
- default time format... for which fields ? anything that looks like a timestamp ? or just msg.timestamp etc ?
- time received being what now ? the time arrived at browser or msg.timestamp ? Do we remove all or leave last ? If I set it for 5 seconds they would disappear pretty quick. Or would just an overwrite of that node's last message be better (ie more like a table of last values)
Sure! A good while back, we had a spirited discussion about the possibility of adding a new "reserved" field called timestamp
to the msg object (like topic
, payload
, etc.) -- obviously, that never happened, but you did concede that for charting data, the presence of the msg.timestamp
field could be used to override the current timestamp.
I've been using that field to keep track of when my historical data points were recorded in the database. So when I query for a set of data points, and send them to a debug node, the first piece of text I see is the current date/time, and have to open the msg payload to see the actual timestamp. So if there was some "reserved" field name (could be tstamp
, _ts
, whatever) that value would be shown instead (just like the charting logic does now).
As for the toggle behavior, there is obviously some logic being applied now to show a timestamp as either millis/utc/hex -- but it defaults to showing the 13 digit number value (it seems). In this specific case, I was wondering if there could be an option to default to (for instance) UTC datetime string.
Essentially, the list of msgs would just show recently received data -- so it would only have to updated whenever a new msg arrives (not time-based, so while I'm watching they disappear). I think for this use case, the actual time of msg arrival (in the sidebar) would need to be the only filter criteria.