[pdm-devel] [PATCH datacenter-manager 5/5] ui: remote edit: add 'web-url' options to the edit panel

Thomas Lamprecht t.lamprecht at proxmox.com
Wed Jan 15 16:27:09 CET 2025


Am 10.01.25 um 11:21 schrieb Dominik Csapak:
> so users can modify it.
> 
> Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
> ---
>  ui/src/remotes/edit_remote.rs | 59 ++++++++++++++++++++++++++++++-----
>  1 file changed, 52 insertions(+), 7 deletions(-)
> 

> @@ -97,6 +117,31 @@ fn edit_remote_input_panel(_form_ctx: &FormContext, remote_id: &str) -> Html {
>                  .input_type(InputType::Password)
>                  .required(false),
>          )
> +        .with_field(
> +            tr!("Web Base URL"),
> +            Field::new()
> +                .name("_web-url_base-url")
> +                .placeholder(tr!("Automatically generate from first connection.")),

"Generated from first endpoint."

As one might not be sure what first connection means, e.g. could be "first query
remote connection").

> +        )
> +        .with_field(
> +            tr!("per Node URL template"),
> +            Field::new()
> +                .name("_web-url_per-node-template")
> +                .placeholder(tr!("Same as Web Base URL.")),
> +        )

This is rather confusing.. Why you went this route without adding any reasoning
at all? My take from the last discussion we had last Thursday was a single option
with potentially a UI (only) switch for UX; which I would have done with a radio
group and still a single text field to avoid letting user entering two things
where the first one will never be used if the second is entered.

In any way, _please_ lets actually review things and not just blindly apply
them...

> +        .with_custom_child(
> +            Row::new()
> +                .key("hint-text")
> +                .gap(2)
> +                .with_child(Container::new().with_child(tr!(
> +                    "Possible template values for 'per Node URL template' are:"
> +                )))
> +                .with_child(
> +                    Container::new()
> +                        .style("font-family", "monospace")
> +                        .with_child("{{nodename}}"),
> +                ),
> +        )
>          .with_custom_child(
>              Container::new()
>                  .key("nodes-title")





More information about the pdm-devel mailing list