[pdm-devel] [PATCH datacenter-manager] ui: pbs wizard: strip http(s):// prefix on remote creation

Christian Ebner c.ebner at proxmox.com
Tue Oct 14 10:55:43 CEST 2025


On 10/14/25 9:12 AM, Dominik Csapak wrote:
> by reusing our 'normalize_hostname' helper. Move that to the remote
> module, make it (crate) public, and use it for the case when we don't
> have a nodes list (which is only pbs at the moment).
> 
> This strips the 'http(s)://' prefix when submitting the remote to the
> backend, and preventing the 'invalid uri character' error there.
> 
> Reported in the forum:
> https://forum.proxmox.com/threads/cant-add-proxmox-backup-server-node.173560/
> 
> Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
> ---

Changes look good to me and fix the issue.

Only one small nit: The PBS remote add wizard summary page still shows 
the non-striped hostname, the host to be added has it however stripped.

Would it make sense to update the field text in the connect page, not 
just the ConnectParams? We do already update the fingerprint before the 
`call_on_connect_change()` invocation, so something like the diff below 
should do just that.

```
--- a/ui/src/remotes/wizard_page_connect.rs
+++ b/ui/src/remotes/wizard_page_connect.rs
@@ -211,6 +211,11 @@ impl Component for PdmWizardPageConnect {
                              Some(info.clone())
                          }
                      };
+                    let raw_hostname = 
props.info.form_ctx.read().get_field_text("hostname");
+                    props.info.form_ctx.write().set_field_value(
+                        "hostname",
+                        normalize_hostname(raw_hostname).into(),
+                    );
                      call_on_connect_change(props, connection);
                      self.scan_result = None;
                      props.info.reset_remaining_valid_pages();
```

But this is cosmetic only.

Consider:

Reviewed-by: Christian Ebner <c.ebner at proxmox.com>
Tested-by: Christian Ebner <c.ebner at proxmox.com>




More information about the pdm-devel mailing list