Compare commits
1 Commits
Author | SHA1 | Date | |
---|---|---|---|
1f23c303c1 |
@@ -37,28 +37,12 @@ pub async fn get_disk_info() -> Result<DiskInfo, Box<dyn std::error::Error + Sen
|
|||||||
component_disk_label: String::new(),
|
component_disk_label: String::new(),
|
||||||
component_disk_temperature: 0.0,
|
component_disk_temperature: 0.0,
|
||||||
});
|
});
|
||||||
|
|
||||||
println!(
|
|
||||||
"Disk_Name: {:?}:\n---- Disk_Kind: {},\n---- Total: {},\n---- Available: {},\n---- Used: {}, \n---- Mount_Point: {:?}",
|
|
||||||
disk.name(),
|
|
||||||
disk.kind(),
|
|
||||||
disk.total_space(),
|
|
||||||
disk.available_space(),
|
|
||||||
disk_used,
|
|
||||||
disk.mount_point()
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get component temperatures
|
// Get component temperatures
|
||||||
let components = Components::new_with_refreshed_list();
|
let components = Components::new_with_refreshed_list();
|
||||||
for component in &components {
|
for component in &components {
|
||||||
if let Some(temperature) = component.temperature() {
|
if let Some(temperature) = component.temperature() {
|
||||||
println!(
|
|
||||||
"Component_Label: {}, Temperature: {}°C",
|
|
||||||
component.label(),
|
|
||||||
temperature
|
|
||||||
);
|
|
||||||
|
|
||||||
// Update detailed info with temperature data if it matches a disk component
|
// Update detailed info with temperature data if it matches a disk component
|
||||||
for disk_info in &mut detailed_info {
|
for disk_info in &mut detailed_info {
|
||||||
if component.label().contains(&disk_info.disk_name) {
|
if component.label().contains(&disk_info.disk_name) {
|
||||||
|
@@ -1,8 +1,6 @@
|
|||||||
use crate::models::{ServerMessage};
|
use crate::models::{ServerMessage};
|
||||||
|
|
||||||
use std::error::Error;
|
use std::error::Error;
|
||||||
use std::num::NonZero;
|
|
||||||
|
|
||||||
use bollard::Docker;
|
use bollard::Docker;
|
||||||
use bollard::query_parameters::{CreateImageOptions, RestartContainerOptions, InspectContainerOptions, ListContainersOptions};
|
use bollard::query_parameters::{CreateImageOptions, RestartContainerOptions, InspectContainerOptions, ListContainersOptions};
|
||||||
use futures_util::StreamExt;
|
use futures_util::StreamExt;
|
||||||
@@ -171,16 +169,6 @@ fn extract_container_id(line: &str) -> Option<String> {
|
|||||||
async fn debug_docker_environment(docker: &Docker) {
|
async fn debug_docker_environment(docker: &Docker) {
|
||||||
println!("=== DOCKER ENVIRONMENT DEBUG ===");
|
println!("=== DOCKER ENVIRONMENT DEBUG ===");
|
||||||
|
|
||||||
// Test basic Docker connection
|
|
||||||
match docker.version().await {
|
|
||||||
Ok(version) => {
|
|
||||||
println!("Docker version: {:?}", version);
|
|
||||||
}
|
|
||||||
Err(e) => {
|
|
||||||
eprintln!("Failed to get Docker version: {}", e);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// List containers to see what's available - CORRECTED
|
// List containers to see what's available - CORRECTED
|
||||||
let options = Some(ListContainersOptions {
|
let options = Some(ListContainersOptions {
|
||||||
all: true, // include stopped containers
|
all: true, // include stopped containers
|
||||||
|
Reference in New Issue
Block a user