You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To prevent polling metrics during user interaction with the graph, you can modify the Graph component in /frontend/src/pages/Graphing/components/Graph.tsx. Implement state management to track user interaction states (e.g., dragging, hovering) and use these states to conditionally pause and resume the useGetMetricsQuery polling. Here's a high-level approach:
Introduce a new state variable to track interaction, e.g., const [isInteracting, setIsInteracting] = useState(false).
Adjust event handlers like onMouseDown, onMouseMove, and onMouseUp to set isInteracting to true or false accordingly.
Modify the useGetMetricsQuery hook call to include the pollInterval option, and conditionally set this based on the isInteracting state. For example, pollInterval: isInteracting ? 0 : 5000 to stop polling during interaction.
This approach ensures that metric data polling is paused during user interactions with the graph, optimizing performance and user experience.
No description provided.
The text was updated successfully, but these errors were encountered: