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

svn-commits at proxmox.com svn-commits at proxmox.com
Wed Jun 15 12:21:35 CEST 2011


Author: dietmar
Date: 2011-06-15 12:21:35 +0200 (Wed, 15 Jun 2011)
New Revision: 6081

Added:
   pve-manager/pve2/www/manager/qemu/Options.js
Modified:
   pve-manager/pve2/www/manager/Makefile.am
   pve-manager/pve2/www/manager/qemu/Config.js
   pve-manager/pve2/www/manager/qemu/Summary.js
Log:
add qemu/Options.js 


Modified: pve-manager/pve2/www/manager/Makefile.am
===================================================================
--- pve-manager/pve2/www/manager/Makefile.am	2011-06-15 08:16:42 UTC (rev 6080)
+++ pve-manager/pve2/www/manager/Makefile.am	2011-06-15 10:21:35 UTC (rev 6081)
@@ -51,8 +51,9 @@
 	node/Config.js					\
 	qemu/StatusView.js				\
 	qemu/Summary.js					\
+	qemu/HardwareView.js				\
+	qemu/Options.js					\
 	qemu/Config.js					\
-	qemu/HardwareView.js				\
 	qemu/CreateWizard.js				\
 	openvz/CreateWizard.js				\
 	storage/ContentView.js				\

Modified: pve-manager/pve2/www/manager/qemu/Config.js
===================================================================
--- pve-manager/pve2/www/manager/qemu/Config.js	2011-06-15 08:16:42 UTC (rev 6080)
+++ pve-manager/pve2/www/manager/qemu/Config.js	2011-06-15 10:21:35 UTC (rev 6081)
@@ -33,7 +33,7 @@
 		{
 		    title: 'Options',
 		    itemId: 'options',
-		    html: 'options ' + vmid
+		    xtype: 'PVE.qemu.Options'
 		},
 		{
 		    xtype: 'pveKVMConsole',

Added: pve-manager/pve2/www/manager/qemu/Options.js
===================================================================
--- pve-manager/pve2/www/manager/qemu/Options.js	                        (rev 0)
+++ pve-manager/pve2/www/manager/qemu/Options.js	2011-06-15 10:21:35 UTC (rev 6081)
@@ -0,0 +1,96 @@
+Ext.define('PVE.qemu.Options', {
+    extend: 'PVE.grid.ObjectGrid',
+    alias: ['widget.PVE.qemu.Options'],
+
+    initComponent : function() {
+	var me = this;
+	var i;
+
+	var nodename = me.pveSelNode.data.node;
+	if (!nodename) 
+	    throw "no node name specified";
+
+	var vmid = me.pveSelNode.data.vmid;
+	if (!vmid) 
+	    throw "no VM ID specified";
+
+	var rows = {
+	    name: {
+		required: true,
+		defaultValue: me.pveSelNode.data.name,
+		header: 'Name'
+	    },
+	    onboot: {
+		header: 'Start at boot',
+		defaultValue: false,
+		renderer: PVE.Utils.format_boolean
+	    },
+	    ostype: {
+		header: 'OS Type',
+		defaultValue: 'other'
+	    },
+	    boot: {
+		header: 'Boot order',
+		defaultValue: 'cad'
+	    },
+	    acpi: {
+		header: 'ACPI support',
+		defaultValue: true,
+		renderer: PVE.Utils.format_boolean
+	    },
+	    kvm: {
+		header: 'KVM hardware virtualization',
+		defaultValue: true,
+		renderer: PVE.Utils.format_boolean
+	    },
+	    freeze: {
+		header: 'Freeze CPU at startup',
+		defaultValue: false,
+		renderer: PVE.Utils.format_boolean
+	    },
+	    localtime: {
+		header: 'Use local time for RTC',
+		defaultValue: 'default'
+	    },
+	    startdate: {
+		header: 'RTC start date',
+		defaultValue: 'now'
+	    }, 
+	    description: {
+		header: 'Notes',
+		required: true
+	    }
+	};
+
+
+	var run_editor = function() {
+	    
+	    console.log("TEST EDIT");
+
+	    me.rstore.load();
+	};
+
+	Ext.applyIf(me, {
+	    url: "/api2/json/nodes/" + nodename + "/qemu/" + vmid + "/config",
+	    cwidth1: 150,
+	    tbar: [ 
+		{
+		    text: "Edit",
+		    handler: run_editor
+		}
+	    ],
+	    rows: rows,
+	    listeners: {
+		itemdblclick: function() {
+		    run_editor();
+		}
+	    }
+	});
+
+	me.callParent();
+
+	me.on('show', function() {
+	    me.rstore.load();
+	});
+    }
+});

Modified: pve-manager/pve2/www/manager/qemu/Summary.js
===================================================================
--- pve-manager/pve2/www/manager/qemu/Summary.js	2011-06-15 08:16:42 UTC (rev 6080)
+++ pve-manager/pve2/www/manager/qemu/Summary.js	2011-06-15 10:21:35 UTC (rev 6081)
@@ -158,8 +158,9 @@
 		    items: [
 			statusview,
 			{
-			    title: 'Comments',
+			    title: 'Notes',
 			    style: 'padding-left:10px',
+			    bodyPadding: 10,
 			    pveSelNode: me.pveSelNode,
 			    rstore: rstore,
 			    html: "test",




More information about the pve-devel mailing list