fix(container): Fix Podman 5.x Network Traffic Statistics Not Displaying (#991)

* 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?
This commit is contained in:
GT610
2026-01-06 23:44:54 +08:00
committed by GitHub
parent 7c35abe30e
commit 06ed38ff45
2 changed files with 36 additions and 10 deletions

View File

@@ -186,7 +186,7 @@ class ContainerNotifier extends _$ContainerNotifier {
(element) => element.contains(id.substring(0, 5)),
);
if (statsLine == null) continue;
item.parseStats(statsLine);
item.parseStats(statsLine, state.version);
}
} catch (e, trace) {
state = state.copyWith(