]> git.proxmox.com Git - proxmox-widget-toolkit.git/commitdiff
vlan edit: Fix automatic field disabling
authorDominic Jäger <d.jaeger@proxmox.com>
Mon, 8 Feb 2021 12:41:33 +0000 (13:41 +0100)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Tue, 9 Feb 2021 12:45:11 +0000 (13:45 +0100)
The regex are are created as literals (with // and not new RegExp).
Therefore
 - The old Vlan_match value with double \\  has matched e.g. vlan\ddd instead
   of e.g. vlan123 and
 - the old VlanInterface_match value with double \\ has matched e.g.
   \www\X\dddd instead of e.g. vmbr0.1234

This fixes automatically disabling the fields vlan-raw-device and vlan-id (VLAN
tag) in the VLAN edit window.

Signed-off-by: Dominic Jäger <d.jaeger@proxmox.com>
src/Utils.js

index 7b78eeb12a5ecdc97f7367820148328264a17433..af5f1db27279198b45324662d7339b9bea15edfb 100644 (file)
@@ -854,7 +854,7 @@ utilities: {
        me.HostPort_match = new RegExp("^(" + IPV4_REGEXP + "|" + DnsName_REGEXP + ")(?::(\\d+))?$");
        me.HostPortBrackets_match = new RegExp("^\\[(" + IPV6_REGEXP + "|" + IPV4_REGEXP + "|" + DnsName_REGEXP + ")\\](?::(\\d+))?$");
        me.IP6_dotnotation_match = new RegExp("^(" + IPV6_REGEXP + ")(?:\\.(\\d+))?$");
-       me.Vlan_match = /^vlan(\\d+)/;
-       me.VlanInterface_match = /(\\w+)\\.(\\d+)/;
+       me.Vlan_match = /^vlan(\d+)/;
+       me.VlanInterface_match = /(\w+)\.(\d+)/;
     },
 });