[pve-devel] r6252 - in pve-manager/pve2: . www/manager www/manager/qemu

svn-commits at proxmox.com svn-commits at proxmox.com
Thu Jul 7 10:37:22 CEST 2011


Author: dietmar
Date: 2011-07-07 10:37:22 +0200 (Thu, 07 Jul 2011)
New Revision: 6252

Modified:
   pve-manager/pve2/ChangeLog
   pve-manager/pve2/www/manager/PVEUtils.js
   pve-manager/pve2/www/manager/qemu/CreateWizard.js
   pve-manager/pve2/www/manager/qemu/HardwareView.js
Log:
impl. MacAddress vtype


Modified: pve-manager/pve2/ChangeLog
===================================================================
--- pve-manager/pve2/ChangeLog	2011-07-07 08:16:51 UTC (rev 6251)
+++ pve-manager/pve2/ChangeLog	2011-07-07 08:37:22 UTC (rev 6252)
@@ -1,5 +1,7 @@
 2011-07-07  Proxmox Support Team  <support at proxmox.com>
 
+	* www/manager/PVEUtils.js: impl. MacAddress vtype
+
 	* www/manager/window/Wizard.js: make it easy to use two column
 	layout, cleanups
 

Modified: pve-manager/pve2/www/manager/PVEUtils.js
===================================================================
--- pve-manager/pve2/www/manager/PVEUtils.js	2011-07-07 08:16:51 UTC (rev 6251)
+++ pve-manager/pve2/www/manager/PVEUtils.js	2011-07-07 08:37:22 UTC (rev 6252)
@@ -32,6 +32,12 @@
     IPAddressText: 'Must be a numeric IP address',
     IPAddressMask: /[\d\.]/i,
 
+    MacAddress: function(v) {
+	return /^([a-fA-F0-9]{2}:){5}[a-fA-F0-9]{2}$/.test(v);
+    },
+    MacAddressMask: /[a-fA-F0-9:]/,
+    MacAddressText: 'Must be a valid MAC address (example: "01:23:45:67:89:ab")',
+
     BridgeName: function(v) {
         return /^vmbr\d{1,4}$/.test(v);
     },

Modified: pve-manager/pve2/www/manager/qemu/CreateWizard.js
===================================================================
--- pve-manager/pve2/www/manager/qemu/CreateWizard.js	2011-07-07 08:16:51 UTC (rev 6251)
+++ pve-manager/pve2/www/manager/qemu/CreateWizard.js	2011-07-07 08:37:22 UTC (rev 6252)
@@ -390,6 +390,7 @@
 			    xtype: 'textfield',
 			    name: 'mac',
 			    fieldLabel: 'MAC address',
+			    vtype: 'MacAddress',
 			    allowBlank: true,
 			    emptyText: 'auto'
 			}

Modified: pve-manager/pve2/www/manager/qemu/HardwareView.js
===================================================================
--- pve-manager/pve2/www/manager/qemu/HardwareView.js	2011-07-07 08:16:51 UTC (rev 6251)
+++ pve-manager/pve2/www/manager/qemu/HardwareView.js	2011-07-07 08:37:22 UTC (rev 6252)
@@ -206,6 +206,7 @@
 		xtype: 'textfield',
 		name: 'macaddr',
 		fieldLabel: 'MAC address',
+		vtype: 'MacAddress',
 		allowBlank: true,
 		emptyText: 'auto'
 	    }



More information about the pve-devel mailing list