From: Shannon Sterz <s.sterz@proxmox.com>
To: pdm-devel@lists.proxmox.com
Subject: [pdm-devel] [PATCH yew-comp v4 2/2] node status panel: remove power management and make fingerprint opt-in
Date: Wed, 12 Nov 2025 15:39:14 +0100 [thread overview]
Message-ID: <20251112143915.352061-3-s.sterz@proxmox.com> (raw)
In-Reply-To: <20251112143915.352061-1-s.sterz@proxmox.com>
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@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
_______________________________________________
pdm-devel mailing list
pdm-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pdm-devel
next prev parent reply other threads:[~2025-11-12 14:38 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-12 14:39 [pdm-devel] [PATCH datacenter-manager/yew-comp v4 0/3] add node status panel to proxmox datacenter manager Shannon Sterz
2025-11-12 14:39 ` [pdm-devel] [PATCH yew-comp v4 1/2] node_info: only use build date from kernel version Shannon Sterz
2025-11-12 14:39 ` Shannon Sterz [this message]
2025-11-12 14:39 ` [pdm-devel] [PATCH datacenter-manager v4 1/1] ui: add a Node Status tab to the administration panel Shannon Sterz
2025-11-13 13:55 ` [pdm-devel] Superseded: Re: [PATCH datacenter-manager/yew-comp v4 0/3] add node status panel to proxmox datacenter manager Shannon Sterz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20251112143915.352061-3-s.sterz@proxmox.com \
--to=s.sterz@proxmox.com \
--cc=pdm-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox