[pdm-devel] [PATCH datacenter-manager] ui: pve: move the RRD time frame selector to the RRD graphs
Dominik Csapak
d.csapak at proxmox.com
Fri Aug 29 14:26:27 CEST 2025
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 at 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
More information about the pdm-devel
mailing list