[pdm-devel] [PATCH yew-comp v4 2/2] node status panel: remove power management and make fingerprint opt-in

Shannon Sterz s.sterz at proxmox.com
Wed Nov 12 15:39:14 CET 2025


the panel appeared to dense with all these tools being present. so
remove the reboot and power off button and make the fingerprint button
opt-in.

Signed-off-by: Shannon Sterz <s.sterz at proxmox.com>
---
 src/node_status_panel.rs | 20 ++++++++++++++------
 1 file changed, 14 insertions(+), 6 deletions(-)

diff --git a/src/node_status_panel.rs b/src/node_status_panel.rs
index 3d37d80..14ee223 100644
--- a/src/node_status_panel.rs
+++ b/src/node_status_panel.rs
@@ -27,6 +27,10 @@ pub struct NodeStatusPanel {
     #[builder(IntoPropValue, into_prop_value)]
     #[prop_or_default]
     status_base_url: Option<AttrValue>,
+
+    #[builder(IntoPropValue, into_prop_value)]
+    #[prop_or_default]
+    fingerprint_button: bool,
 }
 
 impl NodeStatusPanel {
@@ -195,7 +199,7 @@ impl LoadableComponent for ProxmoxNodeStatusPanel {
             .as_ref()
             .map(|r| crate::NodeStatus::Common(r));
 
-        Panel::new()
+        let mut panel = Panel::new()
             .border(false)
             .class(FlexFit)
             .title(
@@ -224,7 +228,11 @@ impl LoadableComponent for ProxmoxNodeStatusPanel {
                     )
                     .icon_class("fa fa-power-off"),
             )
-            .with_tool(
+            .with_child(node_info(status))
+            .with_optional_child(self.error.as_ref().map(|e| error_message(&e.to_string())));
+
+        if ctx.props().fingerprint_button {
+            panel.add_tool(
                 Button::new(tr!("Show Fingerprint"))
                     .icon_class("fa fa-hashtag")
                     .class(ColorScheme::Primary)
@@ -232,10 +240,10 @@ impl LoadableComponent for ProxmoxNodeStatusPanel {
                         ctx.link()
                             .change_view_callback(|_| ViewState::FingerprintDialog),
                     ),
-            )
-            .with_child(node_info(status))
-            .with_optional_child(self.error.as_ref().map(|e| error_message(&e.to_string())))
-            .into()
+            );
+        }
+
+        panel.into()
     }
 }
 
-- 
2.47.3





More information about the pdm-devel mailing list