From: Thomas Lamprecht <t.lamprecht@proxmox.com>
To: Proxmox VE development discussion <pve-devel@lists.proxmox.com>,
Dominik Csapak <d.csapak@proxmox.com>
Subject: Re: [pve-devel] [PATCH widget-toolkit v2 1/1] network: optionally show alternative interface names
Date: Tue, 15 Jul 2025 21:56:45 +0200 [thread overview]
Message-ID: <96f77f5e-b1e1-4565-a286-9ed9f347c2ee@proxmox.com> (raw)
In-Reply-To: <20250715090749.1608768-2-d.csapak@proxmox.com>
Am 15.07.25 um 11:07 schrieb Dominik Csapak:
> add a new (hidden by default) column for the interface names, and show
> them when editing an existing interface with such alternative names.
>
Look OK code-wise in general, UX comments inline.
> Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
> ---
> no changes from v1
> src/node/NetworkEdit.js | 19 +++++++++++++++++++
> src/node/NetworkView.js | 20 ++++++++++++++++++++
> 2 files changed, 39 insertions(+)
>
> diff --git a/src/node/NetworkEdit.js b/src/node/NetworkEdit.js
> index b8e23f9..cd9dc7c 100644
> --- a/src/node/NetworkEdit.js
> +++ b/src/node/NetworkEdit.js
> @@ -449,6 +460,14 @@ Ext.define('Proxmox.node.NetworkEdit', {
> });
> return;
> }
> +
> + if (data.altnames) {
> + if (Ext.isArray(data.altnames)) {
> + data.altnames = data.altnames.join('<br>');
hmm, with a handful of interfaces each having a handful of altnames
this would increase the height quite a bit I would think.
What do you think about joining the array with comma+space and enabling
sensible text wrapping on word boundaries in this column instead?
> + }
> + } else {
> + me.down('field[name=altnames]').setVisible(false);
> + }
> me.setValues(data);
> me.isValid(); // trigger validation
> },
> diff --git a/src/node/NetworkView.js b/src/node/NetworkView.js
> index cf8e6b7..0c62388 100644
> --- a/src/node/NetworkView.js
> +++ b/src/node/NetworkView.js
> @@ -278,6 +283,21 @@ Ext.define('Proxmox.node.NetworkView', {
> sortable: true,
> dataIndex: 'iface',
> },
> + {
> + header: gettext("Alternative Names"),
> + dataIndex: 'altnames',
> + hidden: !me.showAltNames,
> + width: 140, // enough space for 'enx<MAC>'
> + renderer: (value) => {
> + if (!value) {
> + return '';
> + }
> + if (Ext.isArray(value)) {
> + return value.map(Ext.htmlEncode).join('<br>');
same as above w.r.t. join separator.
> + }
> + return Ext.htmlEncode(value);
> + },
> + },
> {
> header: gettext('Type'),
> sortable: true,
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
next prev parent reply other threads:[~2025-07-15 19:55 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-15 9:07 [pve-devel] [PATCH manager/widget-toolkit v2 0/2] show altenative interface names in the web ui Dominik Csapak
2025-07-15 9:07 ` [pve-devel] [PATCH widget-toolkit v2 1/1] network: optionally show alternative interface names Dominik Csapak
2025-07-15 19:56 ` Thomas Lamprecht [this message]
2025-07-16 22:47 ` Thomas Lamprecht
2025-07-15 9:07 ` [pve-devel] [PATCH pve-manager v2 1/1] api/ui: show/return " Dominik Csapak
2025-07-15 9:21 ` Stefan Hanreich
2025-07-15 9:30 ` Dominik Csapak
2025-07-15 9:41 ` Stefan Hanreich
2025-07-15 10:33 ` Dominik Csapak
2025-07-15 11:06 ` Stefan Hanreich
2025-07-15 12:36 ` Thomas Lamprecht
2025-07-15 13:08 ` Stefan Hanreich
2025-07-15 13:15 ` Thomas Lamprecht
2025-07-15 13:47 ` Stefan Hanreich
2025-07-17 16:00 ` [pve-devel] applied: " Thomas Lamprecht
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=96f77f5e-b1e1-4565-a286-9ed9f347c2ee@proxmox.com \
--to=t.lamprecht@proxmox.com \
--cc=d.csapak@proxmox.com \
--cc=pve-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