[pdm-devel] [PATCH datacenter-manager 6/6] ui: reorganize remote add button as dropdown menu to allow adding PBS

Christian Ebner c.ebner at proxmox.com
Mon Sep 22 13:09:58 CEST 2025


Already implemented, just switch out the code in the comment with the
current one.

Signed-off-by: Christian Ebner <c.ebner at proxmox.com>
---
 ui/src/remotes/config.rs | 42 +++++++++++++++++-----------------------
 1 file changed, 18 insertions(+), 24 deletions(-)

diff --git a/ui/src/remotes/config.rs b/ui/src/remotes/config.rs
index db5646b..7efc6e8 100644
--- a/ui/src/remotes/config.rs
+++ b/ui/src/remotes/config.rs
@@ -25,7 +25,7 @@ use pwt::state::{Selection, Store};
 use pwt::widget::data_table::{DataTable, DataTableColumn, DataTableHeader};
 //use pwt::widget::form::{delete_empty_values, Field, FormContext, InputType};
 use pwt::widget::{
-    //menu::{Menu, MenuButton, MenuItem},
+    menu::{Menu, MenuButton, MenuItem},
     Button,
     Column,
     Toolbar,
@@ -173,29 +173,23 @@ impl LoadableComponent for PbsRemoteConfigPanel {
             .class("pwt-overflow-hidden")
             .class("pwt-border-bottom")
             .with_child({
-                Button::new(tr!("Add Proxmox VE"))
-                    .icon_class("fa fa-building")
-                    .on_activate(
-                        link.change_view_callback(|_| Some(ViewState::Add(RemoteType::Pve))),
-                    )
-                // FIXME: add PBS support
-                //MenuButton::new(tr!("Add")).show_arrow(true).menu(
-                //    Menu::new()
-                //        .with_item(
-                //            MenuItem::new("Proxmox VE")
-                //                .icon_class("fa fa-building")
-                //                .on_select(link.change_view_callback(|_| {
-                //                    Some(ViewState::Add(RemoteType::Pve))
-                //                })),
-                //        )
-                //        .with_item(
-                //            MenuItem::new("Proxmox Backup Server")
-                //                .icon_class("fa fa-floppy-o")
-                //                .on_select(link.change_view_callback(|_| {
-                //                    Some(ViewState::Add(RemoteType::Pbs))
-                //                })),
-                //        ),
-                //)
+                MenuButton::new(tr!("Add")).show_arrow(true).menu(
+                    Menu::new()
+                        .with_item(
+                            MenuItem::new("Proxmox VE")
+                                .icon_class("fa fa-building")
+                                .on_select(link.change_view_callback(|_| {
+                                    Some(ViewState::Add(RemoteType::Pve))
+                                })),
+                        )
+                        .with_item(
+                            MenuItem::new("Proxmox Backup Server")
+                                .icon_class("fa fa-floppy-o")
+                                .on_select(link.change_view_callback(|_| {
+                                    Some(ViewState::Add(RemoteType::Pbs))
+                                })),
+                        ),
+                )
             })
             .with_spacer()
             .with_child(
-- 
2.47.3





More information about the pdm-devel mailing list