From 49dffc796cd7674c1c47f5642c7d0ba448acdb73 Mon Sep 17 00:00:00 2001 From: xiaji Date: Mon, 13 Apr 2026 23:23:05 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E8=8A=82=E7=82=B9?= =?UTF-8?q?=E5=90=8D=E7=A7=B0=E9=94=99=E8=AF=AF=E5=AF=BC=E8=87=B4=E7=9A=84?= =?UTF-8?q?=E5=85=B3=E6=9C=BA=E5=A4=B1=E8=B4=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api.rs | 6 ------ src/gui.rs | 1 + 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/src/api.rs b/src/api.rs index 413a0ae..7d64ced 100644 --- a/src/api.rs +++ b/src/api.rs @@ -99,12 +99,6 @@ impl ProxmoxClient { Ok(()) } - pub async fn reboot_vm(&self, node: &str, vm_id: u32) -> Result<(), String> { - self.stop_vm(node, vm_id).await?; - tokio::time::sleep(tokio::time::Duration::from_secs(5)).await; - self.start_vm(node, vm_id).await - } - pub async fn shutdown_node(&self, node: &str) -> Result { let url = format!("{}/nodes/{}/status", self.base_url, node); println!("[API] 关机请求: POST {}", url); diff --git a/src/gui.rs b/src/gui.rs index a27b648..d6e1994 100644 --- a/src/gui.rs +++ b/src/gui.rs @@ -220,6 +220,7 @@ impl eframe::App for App { ui.horizontal(|ui| { ui.label("节点:"); ui.text_edit_singleline(&mut st.node); + ui.label("← 请输入正确的节点名称"); }); ui.add_space(4.0); ui.horizontal(|ui| {