[pve-devel] [PATCH manager] gui: lxc/Network: add 'None' EmptyText for static mode
Dominik Csapak
d.csapak at proxmox.com
Mon Feb 10 13:54:48 CET 2020
this way it is more clear that leaving that field empty results in
no configured ip for that interface, this may help prevent
users to select 'dhcp' for e.g. ipv6 when they do not want an ipv6
and do not have a dhcp6 server in the network (which would result
in a long boot time of the container, because of the dhcp timeout)
Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
www/manager6/lxc/Network.js | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/www/manager6/lxc/Network.js b/www/manager6/lxc/Network.js
index b20ddb66..e41753ea 100644
--- a/www/manager6/lxc/Network.js
+++ b/www/manager6/lxc/Network.js
@@ -191,6 +191,9 @@ Ext.define('PVE.lxc.NetworkInputPanel', {
margin: '0 0 0 10',
listeners: {
change: function(cb, value) {
+ me.down('field[name=ip]').setEmptyText(
+ !!value ? Proxmox.Utils.NoneText : ""
+ );
me.down('field[name=ip]').setDisabled(!value);
me.down('field[name=gw]').setDisabled(!value);
}
@@ -211,6 +214,7 @@ Ext.define('PVE.lxc.NetworkInputPanel', {
name: 'ip',
vtype: 'IPCIDRAddress',
value: cdata.ip,
+ emptyText: Proxmox.Utils.NoneText,
disabled: dhcp4,
fieldLabel: 'IPv4/CIDR' // do not localize
},
@@ -249,6 +253,9 @@ Ext.define('PVE.lxc.NetworkInputPanel', {
margin: '0 0 0 10',
listeners: {
change: function(cb, value) {
+ me.down('field[name=ip6]').setEmptyText(
+ !!value ? Proxmox.Utils.NoneText : ""
+ );
me.down('field[name=ip6]').setDisabled(!value);
me.down('field[name=gw6]').setDisabled(!value);
}
@@ -276,6 +283,7 @@ Ext.define('PVE.lxc.NetworkInputPanel', {
xtype: 'textfield',
name: 'ip6',
value: cdata.ip6,
+ emptyText: Proxmox.Utils.NoneText,
vtype: 'IP6CIDRAddress',
disabled: (dhcp6 || auto6),
fieldLabel: 'IPv6/CIDR' // do not localize
--
2.20.1
More information about the pve-devel
mailing list