[pve-devel] r5890 - pve-manager/pve2/www/new/window

svn-commits at proxmox.com svn-commits at proxmox.com
Mon May 2 14:31:50 CEST 2011


Author: dietmar
Date: 2011-05-02 14:31:50 +0200 (Mon, 02 May 2011)
New Revision: 5890

Modified:
   pve-manager/pve2/www/new/window/Wizard.js
Log:
add most required tabs (not yet functional)


Modified: pve-manager/pve2/www/new/window/Wizard.js
===================================================================
--- pve-manager/pve2/www/new/window/Wizard.js	2011-05-02 10:40:31 UTC (rev 5889)
+++ pve-manager/pve2/www/new/window/Wizard.js	2011-05-02 12:31:50 UTC (rev 5890)
@@ -207,14 +207,195 @@
     initComponent: function() {
 	var me = this;
 
+	cardTypeStore =Ext.create('Ext.data.ArrayStore', {
+            fields: ['key'],
+            data : [ 
+		['rtl8139'], 
+		['e1000'],
+		['virtio']
+	    ]
+        }), 
+
 	Ext.applyIf(me, {
 	    title: 'Create new virtual machine',
 	    items: [
 		{
-		    title: 'Hardware type',
-		    descr: 'Just a test',
+		    layout: {                        
+			type: 'vbox',
+			align: 'center'
+		    },
+		    title: 'Name',
+		    descr: 'Please choose name and ID of your virtual machine.',
+		    items: [
+			{
+			    xtype: 'textfield',
+			    name: 'name',
+			    fieldLabel: 'VM name',
+			    allowBlank: true
+			},
+			{
+			    xtype: 'numberfield',
+			    name: 'vmid',
+			    minValue: 101,
+			    maxValue: 999999999,
+			    fieldLabel: 'Unique ID',
+			    allowBlank: false
+			}
+		    ]
+		},
+		{
 		    layout: 'vbox',
-		    items: {
+		    title: 'CPU',
+		    descr: 'Specify the number of CPUs for this VM.',
+		    items: [
+			{
+			    xtype: 'numberfield',
+			    name: 'sockets',
+			    minValue: 1,
+			    maxValue: 4,
+			    value: 1,
+			    fieldLabel: 'Sockets',
+			    allowBlank: false
+			},
+			{
+			    xtype: 'numberfield',
+			    name: 'cores',
+			    minValue: 1,
+			    maxValue: 32,
+			    value: 1,
+			    fieldLabel: 'Cores',
+			    allowBlank: false
+			},
+		    ]
+		},
+		{
+		    layout: 'anchor',
+		    title: 'Memory',
+		    descr: 'Physical memory allocation.',
+		    defaults: {
+			anchor: '100%'
+		    },
+		    items: [
+			{
+			    xtype: 'numberfield',
+			    name: 'mem',
+			    minValue: 32,
+			    maxValue: 128*1024,
+			    value: 512,
+			    step: 32,
+			    fieldLabel: 'Memory (MB)',
+			    allowBlank: false
+			}
+		    ]
+		},
+		{
+		    layout: 'anchor',
+		    title: 'Harddisk',
+		    descr: 'Harddisk size',
+		    defaults: {
+			anchor: '100%'
+		    },
+		    items: [
+			{
+			    xtype: 'textfield',
+			    name: 'diskstorage',
+			    fieldLabel: 'Storage',
+			    allowBlank: false
+			},
+			{
+			    xtype: 'numberfield',
+			    name: 'disksize',
+			    minValue: 1,
+			    maxValue: 128*1024,
+			    value: 32,
+			    fieldLabel: 'Disk size (GB)',
+			    allowBlank: false
+			}
+		    ]
+		},	
+		{
+		    layout: 'anchor',
+		    title: 'Network',
+		    descr: 'Please select the network type.',
+		    defaults: {
+			anchor: '100%'
+		    },
+		    items: [
+			{
+			    xtype: 'textfield',
+			    name: 'bridge',
+			    fieldLabel: 'Bridge',
+			    allowBlank: false
+			},
+			{
+			    xtype: 'combobox',
+			    name: 'netcard',
+			    fieldLabel: 'Network card',
+			    store: cardTypeStore,
+			    queryMode: 'local',
+			    typeAhead: true,
+			    value: 'rtl8139',
+			    displayField: 'key',
+			    valueField: 'key',
+			    allowBlank: false
+			},
+			{
+			    xtype: 'textfield',
+			    name: 'mac',
+			    fieldLabel: 'MAC address',
+			    value: 'auto',
+			    allowBlank: false
+			}
+		    ]
+		},
+		{
+		    title: 'Installation Media',
+		    descr: 'Please choose the installation media.',
+		    layout: 'anchor',
+		    defaults: {
+			anchor: '100%'
+		    },
+		    items: [
+			{
+			    xtype: 'radiofield',
+			    name: 'mediaType',
+			    inputValue: 'iso',
+			    boxLabel: 'Use CD/DVD disc image file (iso)',
+			   // hideLabel: true,
+			    //checked: true
+ 
+			},
+			{
+			    xtype: 'textfield',
+			    name: 'cdstorage',
+			    fieldLabel: 'Storage',
+			    allowBlank: false
+			},
+			{
+			    xtype: 'textfield',
+			    name: 'cdimage',
+			    fieldLabel: 'ISO Image',
+			    allowBlank: false
+			},
+			{
+			    xtype: 'radiofield',
+			    name: 'mediaType',
+			    inputValue: 'cdrom',
+			    boxLabel: 'Use physical CD/DVD Drive',
+			   // hideLabel: true,
+			    //checked: true
+ 
+			},
+			{
+			    xtype: 'radiofield',
+			    name: 'mediaType',
+			    inputValue: 'none',
+			    boxLabel: 'Do not use any installation media',
+			   // hideLabel: true,
+			    //checked: true
+			}
+		    ],
+		    olditems: {
 			xtype: 'textfield',
 			name: 'name1',
 			fieldLabel: 'Name',
@@ -223,16 +404,57 @@
 		    
 		},
 		{
-		    layout: 'vbox',
-		    title: 'Another Information',
-		    descr: 'Just a test 2',
-		    //onSubmit: function() {},
-		    items: {
-			xtype: 'textfield',
-			name: 'name2',
-			fieldLabel: 'Info2',
-			allowBlank: false
-		    }
+		    title: 'OS Type',
+		    descr: 'Which operating system will be installed?',
+		    layout: 'anchor',
+		    defaults: {
+			anchor: '100%'
+		    },
+		    items: [
+			{
+			    xtype: 'radiofield',
+			    name: 'ostype',
+			    inputValue: 'win7',
+			    checked: true,
+			    boxLabel: 'Microsoft Windows 7/2008r2'
+			},
+			{
+			    xtype: 'radiofield',
+			    name: 'ostype',
+			    inputValue: 'w2k8',
+			    boxLabel: 'Microsoft Windows Vista/2008'
+			},
+			{
+			    xtype: 'radiofield',
+			    name: 'ostype',
+			    inputValue: 'wxp',
+			    boxLabel: 'Microsoft Windows XP/2003'
+			},
+			{
+			    xtype: 'radiofield',
+			    name: 'ostype',
+			    inputValue: 'w2k',
+			    boxLabel: 'Microsoft Windows 2000'
+			},
+			{
+			    xtype: 'radiofield',
+			    name: 'ostype',
+			    inputValue: 'l26',
+			    boxLabel: 'Linux 2.6 Kernel'
+			},
+			{
+			    xtype: 'radiofield',
+			    name: 'ostype',
+			    inputValue: 'l24',
+			    boxLabel: 'Linux 2.4 Kernel'
+			},
+			{
+			    xtype: 'radiofield',
+			    name: 'ostype',
+			    inputValue: 'other',
+			    boxLabel: 'Other'
+			}
+		    ]
 		},
 		{
 		    layout: 'vbox',




More information about the pve-devel mailing list