[pdm-devel] [PATCH datacenter-manager 3/4] ui: pbs: move node overview to tab and add update tab

Michael Köppl m.koeppl at proxmox.com
Thu Nov 20 16:52:00 CET 2025


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 at 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)





More information about the pdm-devel mailing list