]> git.proxmox.com Git - pve-manager.git/commitdiff
gui: lxc/Network: add 'None' EmptyText for static mode
authorDominik Csapak <d.csapak@proxmox.com>
Mon, 10 Feb 2020 12:54:48 +0000 (13:54 +0100)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Mon, 10 Feb 2020 15:27:20 +0000 (16:27 +0100)
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@proxmox.com>
www/manager6/lxc/Network.js

index b20ddb669060450c2a2be85d7a5a0e64168a7ea9..e41753ea3f430158d4fff2a1625b75f9670e675d 100644 (file)
@@ -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