Skip to content

Conversation

@Praneeth-discovery
Copy link

@Praneeth-discovery Praneeth-discovery commented Oct 10, 2024

Enhancements to updateStatisticTable Method

Issue Resolution: Previously, the statistics table was not updating when a node was selected. This enhancement ensures that the statistics reflect the currently selected node.

State Initialization Update: The component state was modified to initialize selectionStatistics, receiving, and sending more clearly. The selectionStatistics is now an empty object by default, and both receiving and sending are initialized as empty arrays. This change simplifies state management and ensures that there are no undefined values when the component first renders.

Streamlined updateStatisticTable Logic: The updateStatisticTable method was modified to set this.selectionStatistics more concisely. It now initializes this.selectionStatistics as an object with properties directly assigned based on the values of requestCount, errorCount, duration, threshold, and the corresponding conditions. This streamlines the code and improves readability.
Render Method Adjustment: The render method was updated to pass receiving and sending from the component's state, ensuring that the latest statistics are rendered, defaulting to empty arrays when no data is available.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant