mirror of
https://github.com/nasa/openmct.git
synced 2025-01-18 18:57:01 +00:00
Check realtime mode in remote clock interceptor (#6985)
* Revert Date.now() purge change Check that the request is using realtime before using the remote-clock start and end timestamps for telemetry requests * docs: clarify comment --------- Co-authored-by: Jesse Mazzella <ozyx@users.noreply.github.com>
This commit is contained in:
parent
d53d8d562e
commit
ce59c0f50a
@ -31,10 +31,16 @@ function remoteClockRequestInterceptor(openmct, _remoteClockIdentifier, waitForB
|
||||
return activeClock?.key === 'remote-clock' && !remoteClockLoaded;
|
||||
},
|
||||
invoke: async (request) => {
|
||||
const { start, end } = await waitForBounds();
|
||||
remoteClockLoaded = true;
|
||||
request.start = start;
|
||||
request.end = end;
|
||||
const timeContext = request?.timeContext ?? openmct.time;
|
||||
|
||||
// Wait for initial bounds if the request is for real-time data.
|
||||
// Otherwise, use the bounds provided by the request.
|
||||
if (timeContext.isRealTime()) {
|
||||
const { start, end } = await waitForBounds();
|
||||
remoteClockLoaded = true;
|
||||
request.start = start;
|
||||
request.end = end;
|
||||
}
|
||||
|
||||
return request;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user