[pve-devel] [PATCH proxmox-widget-toolkit] network edit: fix hiding of altnames field if disabled by config
Christian Ebner
c.ebner at proxmox.com
Thu Jul 31 13:30:15 CEST 2025
Commit 691f530d ("network: optionally show alternative interface
names") introduced the optional altnames field in the network edit
grid. The chosen default configuration however does not even add the
field, therefore setting it to hidden if no altnames data is present
cannot work.
Fix this by only hiding the field if it was actually configured to be
shown in the first place.
Fixes: 691f530d ("network: optionally show alternative interface names")
Signed-off-by: Christian Ebner <c.ebner at proxmox.com>
---
src/node/NetworkEdit.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/node/NetworkEdit.js b/src/node/NetworkEdit.js
index cd9dc7c..601d788 100644
--- a/src/node/NetworkEdit.js
+++ b/src/node/NetworkEdit.js
@@ -465,7 +465,7 @@ Ext.define('Proxmox.node.NetworkEdit', {
if (Ext.isArray(data.altnames)) {
data.altnames = data.altnames.join('<br>');
}
- } else {
+ } else if (me.showAltNames && !me.isCreate) {
me.down('field[name=altnames]').setVisible(false);
}
me.setValues(data);
--
2.47.2
More information about the pve-devel
mailing list