public inbox for pdm-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [pdm-devel] [PATCH datacenter-manager] ui: pve: move the RRD time frame selector to the RRD graphs
@ 2025-08-29 12:26 Dominik Csapak
  2025-09-02 12:46 ` [pdm-devel] applied: " Lukas Wagner
  0 siblings, 1 reply; 2+ messages in thread
From: Dominik Csapak @ 2025-08-29 12:26 UTC (permalink / raw)
  To: pdm-devel

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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-09-02 12:47 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-08-29 12:26 [pdm-devel] [PATCH datacenter-manager] ui: pve: move the RRD time frame selector to the RRD graphs Dominik Csapak
2025-09-02 12:46 ` [pdm-devel] applied: " Lukas Wagner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal