public inbox for pdm-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: "Michael Köppl" <m.koeppl@proxmox.com>
To: "Proxmox Datacenter Manager development discussion"
	<pdm-devel@lists.proxmox.com>
Cc: "pdm-devel" <pdm-devel-bounces@lists.proxmox.com>
Subject: Re: [pdm-devel] [PATCH datacenter-manager 3/4] ui: pbs: move node overview to tab and add update tab
Date: Thu, 20 Nov 2025 16:52:00 +0100	[thread overview]
Message-ID: <DEDN4XZPY9SN.2MUV8EBSX50VM@proxmox.com> (raw)
In-Reply-To: <20251120103620.128741-4-l.wagner@proxmox.com>

1 nit inline

On Thu Nov 20, 2025 at 11:36 AM CET, Lukas Wagner wrote:
> PVE remote had an 'Updates' tab for a while now. This commit adds the
> same thing for PBS remotes.
>
> Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
> ---
>  ui/src/pbs/mod.rs           |   4 +-
>  ui/src/pbs/node/mod.rs      | 114 ++++++++++++++++++++++++++++++++++++
>  ui/src/pbs/node/overview.rs |  11 +---
>  3 files changed, 118 insertions(+), 11 deletions(-)
>
> diff --git a/ui/src/pbs/mod.rs b/ui/src/pbs/mod.rs
> index 1fdb417f..75ed9926 100644
> --- a/ui/src/pbs/mod.rs
> +++ b/ui/src/pbs/mod.rs
> @@ -24,11 +24,11 @@ pub use datastore::DatastorePanel;
>  mod namespace_selector;
>  
>  mod node;
> -use node::overview::PbsNodeOverviewPanel;
>  
>  mod snapshot_list;
>  pub use snapshot_list::SnapshotList;
>  
> +use crate::pbs::node::PbsNodePanel;
>  use crate::pbs::tree::PbsTree;
>  use crate::{get_deep_url, pdm_client};
>  
> @@ -108,7 +108,7 @@ impl LoadableComponent for PbsRemoteComp {
>          let props = ctx.props();
>  
>          let content: Html = match &self.view {
> -            tree::PbsTreeNode::Root => PbsNodeOverviewPanel::new(props.remote.clone()).into(),
> +            tree::PbsTreeNode::Root => PbsNodePanel::new(props.remote.clone()).into(),
>              tree::PbsTreeNode::Datastore(data_store_config) => {
>                  DatastorePanel::new(props.remote.clone(), data_store_config.clone()).into()
>              }
> diff --git a/ui/src/pbs/node/mod.rs b/ui/src/pbs/node/mod.rs
> index 8468a02a..5cd210f8 100644
> --- a/ui/src/pbs/node/mod.rs
> +++ b/ui/src/pbs/node/mod.rs
> @@ -1 +1,115 @@
> +use std::rc::Rc;
> +
> +use proxmox_yew_comp::AptPackageManager;
> +use yew::{
> +    virtual_dom::{VComp, VNode},
> +    Context,
> +};
> +
> +use pwt::{
> +    css::{AlignItems, ColorScheme},
> +    prelude::*,
> +    props::{ContainerBuilder, WidgetBuilder},
> +    widget::{Fa, Row, TabBarItem, TabPanel},
> +};
> +
>  pub(crate) mod overview;
> +
> +use overview::PbsNodeOverviewPanel;
> +
> +use crate::get_deep_url_low_level;
> +
> +#[derive(Clone, Debug, Eq, PartialEq, Properties)]
> +pub struct PbsNodePanel {
> +    /// The remote to show
> +    pub remote: String,
> +}
> +
> +impl PbsNodePanel {
> +    pub fn new(remote: String) -> Self {
> +        yew::props!(Self { remote })
> +    }
> +}
> +
> +impl From<PbsNodePanel> for VNode {
> +    fn from(val: PbsNodePanel) -> Self {
> +        VComp::new::<PbsNodePanelComp>(Rc::new(val), None).into()
> +    }
> +}
> +
> +struct PbsNodePanelComp;
> +
> +impl yew::Component for PbsNodePanelComp {
> +    type Message = ();
> +    type Properties = PbsNodePanel;
> +
> +    fn create(_ctx: &yew::Context<Self>) -> Self {
> +        Self
> +    }
> +
> +    fn changed(&mut self, ctx: &Context<Self>, old_props: &Self::Properties) -> bool {
> +        let props = ctx.props();
> +
> +        props.remote != old_props.remote
> +    }
> +
> +    fn view(&self, ctx: &yew::Context<Self>) -> yew::Html {
> +        let props = ctx.props();
> +
> +        let title: Html = Row::new()
> +            .gap(2)
> +            .class(AlignItems::Baseline)
> +            .with_child(Fa::new("building"))
> +            .with_child(tr!("Node"))

nit: I might not be entirely up-to-date on the nomenclature, but is
"Node" correct here? IMO it also looked a bit off, having
"Remote '<name>'" on the left panel and then just "Node" on the right
panel. Perhaps "Backup Server", "Proxmox Backup Server", or the name of
the PBS might fit better in this case? Was there a reason to use "Node"?

> +            .into();
> +
> +        TabPanel::new()
> +            .class(pwt::css::FlexFit)



_______________________________________________
pdm-devel mailing list
pdm-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pdm-devel


  reply	other threads:[~2025-11-20 15:52 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-20 10:36 [pdm-devel] [PATCH datacenter-manager 0/4] add 'Updates' tab for PBS remotes Lukas Wagner
2025-11-20 10:36 ` [pdm-devel] [PATCH datacenter-manager 1/4] ui: move pbs node overview panel from pbs::remote to pbs::node::overview Lukas Wagner
2025-11-20 10:36 ` [pdm-devel] [PATCH datacenter-manager 2/4] ui: pbs: rename RemoteOverviewPanel to PbsNodeOverviewPanel Lukas Wagner
2025-11-20 10:36 ` [pdm-devel] [PATCH datacenter-manager 3/4] ui: pbs: move node overview to tab and add update tab Lukas Wagner
2025-11-20 15:52   ` Michael Köppl [this message]
2025-11-20 10:36 ` [pdm-devel] [PATCH datacenter-manager 4/4] ui: pve: rename NodePanel to PveNodePanel Lukas Wagner
2025-11-20 15:56 ` [pdm-devel] [PATCH datacenter-manager 0/4] add 'Updates' tab for PBS remotes 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=DEDN4XZPY9SN.2MUV8EBSX50VM@proxmox.com \
    --to=m.koeppl@proxmox.com \
    --cc=pdm-devel-bounces@lists.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
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal