From: Lukas Wagner <l.wagner@proxmox.com>
To: pdm-devel@lists.proxmox.com
Subject: [PATCH proxmox-yew-comp v3 01/11] node status panel: add `children` property
Date: Mon, 13 Apr 2026 10:58:06 +0200 [thread overview]
Message-ID: <20260413085816.143591-2-l.wagner@proxmox.com> (raw)
In-Reply-To: <20260413085816.143591-1-l.wagner@proxmox.com>
This property allows us to pass child VNodes that should be rendered on
the same panel, allowing us to inject product specific UI elements.
We also implement the ContainerBuilder trait for NodeStatusPanel,
allowing us to use methods such as `with_child`, `with_optional_child`
etc.
Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
Reviewed-by: Arthur Bied-Charreton <a.bied-charreton@proxmox.com>
Tested-by: Arthur Bied-Charreton <a.bied-charreton@proxmox.com>
---
src/node_status_panel.rs | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/src/node_status_panel.rs b/src/node_status_panel.rs
index 357c328..6dca90a 100644
--- a/src/node_status_panel.rs
+++ b/src/node_status_panel.rs
@@ -35,6 +35,10 @@ pub struct NodeStatusPanel {
#[builder(IntoPropValue, into_prop_value)]
#[prop_or_default]
power_management_buttons: bool,
+
+ /// Children that should be rendered on this panel
+ #[prop_or_default]
+ children: Vec<VNode>,
}
impl NodeStatusPanel {
@@ -49,6 +53,12 @@ impl Default for NodeStatusPanel {
}
}
+impl ContainerBuilder for NodeStatusPanel {
+ fn as_children_mut(&mut self) -> &mut Vec<VNode> {
+ &mut self.children
+ }
+}
+
enum Msg {
Error(Error),
Loaded(Rc<NodeStatus>),
@@ -203,6 +213,8 @@ impl LoadableComponent for ProxmoxNodeStatusPanel {
}
fn main_view(&self, ctx: &LoadableComponentContext<Self>) -> Html {
+ let props = ctx.props();
+
let status = self
.node_status
.as_ref()
@@ -222,6 +234,10 @@ impl LoadableComponent for ProxmoxNodeStatusPanel {
.with_child(node_info(status))
.with_optional_child(self.error.as_ref().map(|e| error_message(&e.to_string())));
+ for c in props.children.clone() {
+ panel = panel.with_child(c);
+ }
+
if ctx.props().power_management_buttons {
panel.add_tool(
ConfirmButton::new(tr!("Reboot"))
--
2.47.3
next prev parent reply other threads:[~2026-04-13 8:58 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-13 8:58 [PATCH datacenter-manager/proxmox-yew-comp v3 00/11] metric collection for the PDM host Lukas Wagner
2026-04-13 8:58 ` Lukas Wagner [this message]
2026-04-13 8:58 ` [PATCH proxmox-yew-comp v3 02/11] RRDGrid: fix size observer by attaching node reference to rendered container Lukas Wagner
2026-04-13 8:58 ` [PATCH proxmox-yew-comp v3 03/11] RRDGrid: add padding and increase gap between elements Lukas Wagner
2026-04-13 8:58 ` [PATCH datacenter-manager v3 04/11] metric collection: clarify naming for remote metric collection Lukas Wagner
2026-04-13 8:58 ` [PATCH datacenter-manager v3 05/11] metric collection: fix minor typo in error message Lukas Wagner
2026-04-13 8:58 ` [PATCH datacenter-manager v3 06/11] metric collection: collect PDM host metrics in a new collection task Lukas Wagner
2026-04-15 8:47 ` Shannon Sterz
2026-04-13 8:58 ` [PATCH datacenter-manager v3 07/11] api: fix /nodes/localhost/rrddata endpoint Lukas Wagner
2026-04-13 8:58 ` [PATCH datacenter-manager v3 08/11] pdm: node rrd data: rename 'total-time' to 'metric-collection-total-time' Lukas Wagner
2026-04-13 8:58 ` [PATCH datacenter-manager v3 09/11] pdm-api-types: add PDM host metric fields Lukas Wagner
2026-04-13 8:58 ` [PATCH datacenter-manager v3 10/11] ui: node status: add RRD graphs for PDM host metrics Lukas Wagner
2026-04-15 8:47 ` Shannon Sterz
2026-04-15 12:20 ` Lukas Wagner
2026-04-13 8:58 ` [PATCH datacenter-manager v3 11/11] ui: lxc/qemu/node: use RRD value render helpers Lukas Wagner
2026-04-14 14:08 ` [PATCH datacenter-manager/proxmox-yew-comp v3 00/11] metric collection for the PDM host Michael Köppl
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=20260413085816.143591-2-l.wagner@proxmox.com \
--to=l.wagner@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