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.csa...@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