[pve-devel] r5924 - pve-manager/pve2/www/new/qemu

svn-commits at proxmox.com svn-commits at proxmox.com
Mon May 9 06:42:08 CEST 2011


Author: dietmar
Date: 2011-05-09 06:42:08 +0200 (Mon, 09 May 2011)
New Revision: 5924

Modified:
   pve-manager/pve2/www/new/qemu/CreateWizard.js
Log:
allow to create VM without HD


Modified: pve-manager/pve2/www/new/qemu/CreateWizard.js
===================================================================
--- pve-manager/pve2/www/new/qemu/CreateWizard.js	2011-05-06 13:00:32 UTC (rev 5923)
+++ pve-manager/pve2/www/new/qemu/CreateWizard.js	2011-05-09 04:42:08 UTC (rev 5924)
@@ -44,6 +44,7 @@
 	var hdstoragesel = Ext.create('PVE.form.StorageSelector', {
 	    name: 'hdstorage',
 	    fieldLabel: 'Storage',
+	    labelAlign: 'right',
 	    storageContent: 'images',
 	    allowBlank: false
 	});
@@ -97,9 +98,6 @@
 		    items: {
 			xtype: 'radiogroup',
 			allowBlank: false,
-			//msgTarget: 'side',
-			//autoFitErrors: false,
-			//anchor: '-18',
 			layout: 'column',
 			defaultType: 'container',
 			items: [{
@@ -210,10 +208,26 @@
 		    xtype: 'inputpanel',
 		    title: 'Harddisk',
 		    items: [
+			{
+			    xtype: 'radiofield',
+			    name: 'hdType',
+			    inputValue: 'image',
+			    boxLabel: 'Create new disk image',
+			    checked: true,
+			    listeners: {
+				change: function(f, value) {
+				    me.down('field[name=hdstorage]').setDisabled(!value);
+				    me.down('field[name=disksize]').setDisabled(!value);
+				    me.down('field[name=controller]').setDisabled(!value);
+				    me.down('field[name=diskformat]').setDisabled(!value);
+				}
+			    }
+			},
 			hdstoragesel,
 			{
 			    xtype: 'numberfield',
 			    name: 'disksize',
+			    labelAlign: 'right',
 			    minValue: 1,
 			    maxValue: 128*1024,
 			    value: 32,
@@ -223,6 +237,7 @@
 			{
 			    xtype: 'PVE.form.BusTypeSelector',
 			    name: 'controller',
+			    labelAlign: 'right',
 			    fieldLabel: 'Controller',
 			    value: 'ide',
 			    allowBlank: false
@@ -230,13 +245,23 @@
 			{
 			    xtype: 'PVE.form.DiskFormatSelector',
 			    name: 'diskformat',
+			    labelAlign: 'right',
 			    fieldLabel: 'Image format',
 			    value: 'raw',
 			    allowBlank: false
+			},
+			{
+			    xtype: 'radiofield',
+			    name: 'hdType',
+			    inputValue: 'none',
+			    boxLabel: 'Do not attach a hard disk'
 			}
 		    ],
 		    getValues: function() {
 			var values = this.getFieldValues();
+			if (values.hdType === 'none')
+			    return {};
+
 			var str = values.hdstorage + ':' + values.disksize +
 			    ',format=' + values.diskformat;
 			var busid = 0;




More information about the pve-devel mailing list