From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) by lore.proxmox.com (Postfix) with ESMTPS id 8A6871FF186 for ; Fri, 29 Aug 2025 14:26:26 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id ECA1C2DC2C; Fri, 29 Aug 2025 14:26:36 +0200 (CEST) From: Dominik Csapak To: pdm-devel@lists.proxmox.com Date: Fri, 29 Aug 2025 14:26:27 +0200 Message-ID: <20250829122633.2092209-1-d.csapak@proxmox.com> X-Mailer: git-send-email 2.47.2 MIME-Version: 1.0 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.022 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Subject: [pdm-devel] [PATCH datacenter-manager] ui: pve: move the RRD time frame selector to the RRD graphs X-BeenThere: pdm-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox Datacenter Manager development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Proxmox Datacenter Manager development discussion Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: pdm-devel-bounces@lists.proxmox.com Sender: "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 --- 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