Refactor/server overview - #70
Merged
Merged
Conversation
Changed the "Overview" SelectorBarItem icon from "Clock" to "PreviewLink" in ServerMainPage.xaml for improved visual representation.
Refactor srvOverview to use IAgentClientRegistry for async client retrieval, simplify resource fetching, and manage aTimer with navigation events. Add navigation event overrides and update event handler to async.
Added Page_Unloaded event to srvOverview to stop aTimer when the page is unloaded, preventing resource leaks. Broadened exception handling in resource update logic to catch all exceptions. Changed aTimer from static to instance variable for better lifecycle management.
Added comments above TcpClient.ConnectAsync to document its use of a combined cancellation token and the specific exceptions it may throw on timeout, cancellation, or connection failure. No changes to functionality.
Refactored CreateClientAsync to use async/await for future extensibility. Added a check to prevent client creation for offline endpoints, logging a warning and throwing an exception if attempted.
SelectorBar navigation now occurs only after a successful agent connection. If the agent is offline, a warning dialog is shown and navigation is disabled. UI updates are properly dispatched, and error handling and user feedback are enhanced during initialization.
…n ServicesPage Added explicit handling for gRPC RpcException during service initialization. Now, cancelled calls are ignored, while other errors clear the service list and display an error message in the UI. Refactored service loading to ensure all UI updates occur on the DispatcherQueue for thread safety and clearer user feedback.
Added a styled, centered TextBlock to the ContentFrame with a clear message when the agent is offline. This provides users with more informative feedback in addition to the existing ContentDialog, clarifying why features are inaccessible.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.