mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Chore: Remove liveTimer reference from testdata (#71997)
This commit is contained in:
committed by
GitHub
parent
ff48a145cc
commit
6f445eca8a
@@ -13,8 +13,6 @@ import {
|
||||
DataFrameData,
|
||||
} from '@grafana/data';
|
||||
// eslint-disable-next-line no-restricted-imports -- In the process from being removed
|
||||
import { liveTimer } from 'app/features/dashboard/dashgrid/liveTimer';
|
||||
// eslint-disable-next-line no-restricted-imports -- In the process from being removed
|
||||
import { StreamingDataFrame } from 'app/features/live/data/StreamingDataFrame';
|
||||
|
||||
import { getRandomLine } from './LogIpsum';
|
||||
@@ -104,18 +102,13 @@ export function runSignalStream(
|
||||
}
|
||||
|
||||
const pushNextEvent = () => {
|
||||
addNextRow(Date.now());
|
||||
|
||||
const elapsed = liveTimer.lastUpdate - lastSent;
|
||||
if (elapsed > 1000 || liveTimer.ok) {
|
||||
subscriber.next({
|
||||
data: [frame],
|
||||
key: streamId,
|
||||
state: LoadingState.Streaming,
|
||||
});
|
||||
lastSent = liveTimer.lastUpdate;
|
||||
}
|
||||
|
||||
lastSent = Date.now();
|
||||
addNextRow(lastSent);
|
||||
subscriber.next({
|
||||
data: [frame],
|
||||
key: streamId,
|
||||
state: LoadingState.Streaming,
|
||||
});
|
||||
timeoutId = setTimeout(pushNextEvent, speed);
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user