* refactor(server): Replace Future.wait with an explicit list of futures to enhance readability
Refactor the nested map and async functions into explicit for loops and future lists to make the code logic clearer
* fix(server): Fixed the auto-refresh logic and concurrency control issues
- Add `_refreshCompleter` to prevent concurrent refreshes
- Fixed the issue where the status was not updated after the automatic refresh timer was canceled
- Remove the invalid check for `duration == 1`
* refactor(server): Optimize the server refresh logic by filtering out servers that do not need to be refreshed in advance
Move the server filtering logic outside the loop and use the `where` method to filter the servers that need to be refreshed, avoiding repeated condition checks within the loop. This improves code readability and reduces redundant condition checks.
* refactor: Optimize server refresh logic to enhance readability
Break down complex conditional checks into clearer steps, separating the logic for server refresh and rate limiter reset. Replace chained calls with explicit loops to make the code easier to maintain and understand.
* refactor(server): Remove `updateFuture` from `ServerState` and use the `_isRefreshing` flag instead
Simplify the server refresh logic, replace Future state tracking with a boolean flag, and avoid unnecessary state updates
* refactor(server_detail): Extract the setting items as local variables to improve performance
Extract the globally set items that are accessed repeatedly as local variables, reduce unnecessary state retrieval operations, and optimize page performance
* refactor: Rename `_displayCpuIndexSetting` to `_displayCpuIndex` for consistency
* refactor(server): Fix the issue of parallel blocking in server refresh
The original code uses Future.wait to wait for all refresh operations to complete, but in fact, there is no need to wait for the results of these operations. Instead, directly calling ignore() to ignore the results can avoid blocking caused by the slowest server
* fix: Adjust the order of logging and default value settings
Ensure to set the default value after recording the invalid duration warning
* refactor(server): Rename _refreshCompleter to _refreshInProgress to enhance readability
Change the variable name from `_refreshCompleter` to `_refreshInProgress`, so that it more accurately reflects the actual purpose of the variable, which is to indicate whether the refresh operation is in progress
* refactor(server): Remove unnecessary refresh progress status management
Simplify the server refresh logic, remove the unused _refreshInProgress state variable and related Completer handling, making the code more concise and straightforward
* chore: Update dependent package versions
Update the following dependent package versions:
- camera_web has been upgraded from 0.3.5 to 0.3.5+3
- ffi has been upgraded from 2.1.4 to 2.1.5
- hive_ce_flutter is upgraded from 2.3.3 to 2.3.4
- watcher is upgraded from 1.1.4 to 1.2.1
* opt.
---------
Co-authored-by: lollipopkit🏳️⚧️ <10864310+lollipopkit@users.noreply.github.com>
* fix: Added logging to exception handling
Added detailed error logging to exception handling across multiple files, including exception information and stack traces, to facilitate troubleshooting.
* refactor(logging): Standardize logging output methods
Replace existing debugPrint and lprint with Loggers.app.warning to enhance logging consistency and maintainability.
* refactor: Remove redundant debug log prints
Clean up unnecessary log print statements in debug code
* feat(i18n): Added internationalization support for the logging feature
* fix: Resolved boundary condition issues in string processing
Addressed null and length checks during string splitting across multiple model classes to prevent potential null pointer exceptions and array out-of-bounds errors
* fix: Throw exceptions instead of silently returning when package manager output formats are invalid
Modified the _pacman, _opkg, and _apk parsing methods to throw exceptions when input formats are invalid, rather than silently returning, to prevent potential error handling issues.
* fix(container): Added version parameter to accommodate Podman 5.x network statistics format
Modified the parseStats method to accept a version parameter, handling changes in Podman 5.x's network statistics data structure. When the version is 5.x, network traffic data is retrieved from the RxBytes/TxBytes fields of the Network interface.
* fix(container): Fixed Podman version detection logic to correctly retrieve network statistics
Addressed Podman version number parsing issues and improved version comparison logic to support all 4.x and below versions as well as 5.x and above versions
* fix(container): Resolved display formatting issues for network and disk I/O statistics
Handled default values when NetIO and BlockIO are null, and reformatted display strings to distinguish upstream/downstream traffic and read/write operations.
* fix: Why did I mess up the tag order?
* fix#757
* fix#757
* apply the code recommendations from sourcery ai
* Make sure raw is non-empty data
* Modified the way to judge gbk, fixed the problem that null cannot throw an error