forked from p15670423/monkey
UI: fix long telemetry log loading bug
This commit is contained in:
parent
97327f08a2
commit
063286e899
|
@ -4,6 +4,7 @@ import LoadingIcon from '../ui-components/LoadingIcon';
|
|||
|
||||
|
||||
const authComponent = new AuthComponent({});
|
||||
const telemetryUpdatePeriod = 5000; // UI will fetch telemetries every N milliseconds.
|
||||
|
||||
const TelemetryLog = (props: { onStatusChange: Function }) => {
|
||||
|
||||
|
@ -19,7 +20,8 @@ const TelemetryLog = (props: { onStatusChange: Function }) => {
|
|||
const telemetryConsole = useRef(null);
|
||||
|
||||
useEffect(() => {
|
||||
const interval = setInterval(updateTelemetryFromServer, 5000);
|
||||
updateTelemetryFromServer();
|
||||
const interval = setInterval(updateTelemetryFromServer, telemetryUpdatePeriod);
|
||||
return function cleanup() {
|
||||
clearInterval(interval);
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue