moved stats into own folder
Some checks failed
Rust Cross-Platform Build / Detect Rust Project (push) Successful in 4s
Rust Cross-Platform Build / Run Tests (push) Failing after 1m9s
Rust Cross-Platform Build / Build (x86_64-unknown-linux-gnu) (push) Has been skipped
Rust Cross-Platform Build / Build (x86_64-pc-windows-gnu) (push) Has been skipped
Rust Cross-Platform Build / Set Tag Name (push) Has been skipped
Rust Cross-Platform Build / Build and Push Docker Image (push) Has been skipped
Rust Cross-Platform Build / Create Tag (push) Has been skipped
Rust Cross-Platform Build / Workflow Summary (push) Successful in 2s

This commit is contained in:
2025-10-05 15:21:24 +02:00
parent b35cac0dbe
commit 66428863e6
9 changed files with 404 additions and 290 deletions

View File

@@ -53,8 +53,8 @@ pub async fn get_available_containers(docker: &Docker) -> Vec<DockerContainer> {
Some(DockerContainer {
id: short_id.to_string(),
image,
name: name,
image: Some(image),
name: Some(name),
})
})
.collect()
@@ -172,7 +172,7 @@ pub async fn get_network_stats(
docker: &Docker,
container_id: &str,
) -> Result<ContainerNetworkInfo, Box<dyn Error + Send + Sync>> {
let (_, net_info) = stats::get_single_container_stats(docker, container_id).await?;
let (_, net_info, _) = stats::get_single_container_stats(docker, container_id).await?;
if let Some(net_info) = net_info {
Ok(net_info)
@@ -195,7 +195,7 @@ pub async fn get_cpu_stats(
docker: &Docker,
container_id: &str,
) -> Result<ContainerCpuInfo, Box<dyn Error + Send + Sync>> {
let (cpu_info, _) = stats::get_single_container_stats(docker, container_id).await?;
let (cpu_info, _, _) = stats::get_single_container_stats(docker, container_id).await?;
if let Some(cpu_info) = cpu_info {
Ok(cpu_info)