From: Dominik Csapak <d.csapak@proxmox.com>
To: pdm-devel@lists.proxmox.com
Subject: [pdm-devel] [PATCH datacenter-manager] ui: pve: move the RRD time frame selector to the RRD graphs
Date: Fri, 29 Aug 2025 14:26:27 +0200 [thread overview]
Message-ID: <20250829122633.2092209-1-d.csapak@proxmox.com> (raw)
It fits better there, since it does only control the RRD graphs, not the
remaining status panel.
Do so for the node, qemu and lxc panels.
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
---
ui/src/pve/lxc.rs | 15 +++++++++++----
ui/src/pve/node.rs | 15 +++++++++++----
ui/src/pve/qemu.rs | 15 +++++++++++----
3 files changed, 33 insertions(+), 12 deletions(-)
diff --git a/ui/src/pve/lxc.rs b/ui/src/pve/lxc.rs
index ec7b2be..97e1f96 100644
--- a/ui/src/pve/lxc.rs
+++ b/ui/src/pve/lxc.rs
@@ -11,7 +11,7 @@ use yew::{
use proxmox_human_byte::HumanByte;
use proxmox_yew_comp::{RRDGraph, RRDTimeframe, RRDTimeframeSelector, Series};
use pwt::{
- css::{AlignItems, ColorScheme, FlexFit},
+ css::{AlignItems, ColorScheme, FlexFit, JustifyContent},
prelude::*,
props::WidgetBuilder,
widget::{Column, Container, Fa, Panel, Progress, Row},
@@ -363,9 +363,6 @@ impl yew::Component for LxcanelComp {
Panel::new()
.class(FlexFit)
.title(title)
- .with_tool(
- RRDTimeframeSelector::new().on_change(ctx.link().callback(Msg::UpdateRrdTimeframe)),
- )
.class(ColorScheme::Neutral)
.with_child(
// FIXME: add some 'visible' or 'active' property to the progress
@@ -375,6 +372,16 @@ impl yew::Component for LxcanelComp {
)
.with_child(status_comp)
.with_child(separator().padding_x(4))
+ .with_child(
+ Row::new()
+ .padding_x(4)
+ .padding_y(1)
+ .class(JustifyContent::FlexEnd)
+ .with_child(
+ RRDTimeframeSelector::new()
+ .on_change(ctx.link().callback(Msg::UpdateRrdTimeframe)),
+ ),
+ )
.with_child(
Container::new().class(FlexFit).with_child(
Column::new()
diff --git a/ui/src/pve/node.rs b/ui/src/pve/node.rs
index b3b002e..ff24f7e 100644
--- a/ui/src/pve/node.rs
+++ b/ui/src/pve/node.rs
@@ -8,7 +8,7 @@ use yew::{
use proxmox_human_byte::HumanByte;
use proxmox_yew_comp::{RRDGraph, RRDTimeframe, RRDTimeframeSelector, Series};
use pwt::{
- css::{AlignItems, ColorScheme, FlexFit},
+ css::{AlignItems, ColorScheme, FlexFit, JustifyContent},
prelude::*,
props::{ContainerBuilder, WidgetBuilder},
widget::{error_message, Column, Container, Fa, Panel, Progress, Row},
@@ -294,9 +294,6 @@ impl yew::Component for NodePanelComp {
Panel::new()
.class(FlexFit)
.title(title)
- .with_tool(
- RRDTimeframeSelector::new().on_change(ctx.link().callback(Msg::UpdateRrdTimeframe)),
- )
.class(ColorScheme::Neutral)
.with_child(
// FIXME: add some 'visible' or 'active' property to the progress
@@ -306,6 +303,16 @@ impl yew::Component for NodePanelComp {
)
.with_child(status_comp)
.with_child(separator().padding_x(4))
+ .with_child(
+ Row::new()
+ .padding_x(4)
+ .padding_y(1)
+ .class(JustifyContent::FlexEnd)
+ .with_child(
+ RRDTimeframeSelector::new()
+ .on_change(ctx.link().callback(Msg::UpdateRrdTimeframe)),
+ ),
+ )
.with_child(
Container::new().class(FlexFit).with_child(
Column::new()
diff --git a/ui/src/pve/qemu.rs b/ui/src/pve/qemu.rs
index a43c191..d229994 100644
--- a/ui/src/pve/qemu.rs
+++ b/ui/src/pve/qemu.rs
@@ -11,7 +11,7 @@ use yew::{
use proxmox_human_byte::HumanByte;
use proxmox_yew_comp::{RRDGraph, RRDTimeframe, RRDTimeframeSelector, Series};
use pwt::{
- css::{AlignItems, ColorScheme, FlexFit},
+ css::{AlignItems, ColorScheme, FlexFit, JustifyContent},
prelude::*,
props::WidgetBuilder,
widget::{Column, Container, Fa, Panel, Progress, Row},
@@ -374,9 +374,6 @@ impl yew::Component for QemuPanelComp {
Panel::new()
.class(FlexFit)
.title(title)
- .with_tool(
- RRDTimeframeSelector::new().on_change(ctx.link().callback(Msg::UpdateRrdTimeframe)),
- )
.class(ColorScheme::Neutral)
.with_child(
// FIXME: add some 'visible' or 'active' property to the progress
@@ -386,6 +383,16 @@ impl yew::Component for QemuPanelComp {
)
.with_child(status_comp)
.with_child(separator().padding_x(4))
+ .with_child(
+ Row::new()
+ .padding_x(4)
+ .padding_y(1)
+ .class(JustifyContent::FlexEnd)
+ .with_child(
+ RRDTimeframeSelector::new()
+ .on_change(ctx.link().callback(Msg::UpdateRrdTimeframe)),
+ ),
+ )
.with_child(
Container::new().class(FlexFit).with_child(
Column::new()
--
2.47.2
_______________________________________________
pdm-devel mailing list
pdm-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pdm-devel
next reply other threads:[~2025-08-29 12:26 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-29 12:26 Dominik Csapak [this message]
2025-09-02 12:46 ` [pdm-devel] applied: " Lukas Wagner
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=20250829122633.2092209-1-d.csapak@proxmox.com \
--to=d.csapak@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