[pve-devel] r5839 - in pve-manager/pve2/www/new: . panel

svn-commits at proxmox.com svn-commits at proxmox.com
Wed Apr 20 12:57:11 CEST 2011


Author: dietmar
Date: 2011-04-20 12:57:11 +0200 (Wed, 20 Apr 2011)
New Revision: 5839

Added:
   pve-manager/pve2/www/new/panel/KVMConfig.js
Modified:
   pve-manager/pve2/www/new/Makefile.am
   pve-manager/pve2/www/new/Workspace.js
   pve-manager/pve2/www/new/panel/ConfigPanel.js
Log:
start KVMConfig.js


Modified: pve-manager/pve2/www/new/Makefile.am
===================================================================
--- pve-manager/pve2/www/new/Makefile.am	2011-04-20 10:27:24 UTC (rev 5838)
+++ pve-manager/pve2/www/new/Makefile.am	2011-04-20 10:57:11 UTC (rev 5839)
@@ -14,6 +14,7 @@
 	grid/ResourceGrid.js				\
 	panel/ConfigPanel.js				\
 	panel/NodeConfig.js				\
+	panel/KVMConfig.js				\
 	tree/ResourceTree.js				\
 	Workspace.js
 

Modified: pve-manager/pve2/www/new/Workspace.js
===================================================================
--- pve-manager/pve2/www/new/Workspace.js	2011-04-20 10:27:24 UTC (rev 5838)
+++ pve-manager/pve2/www/new/Workspace.js	2011-04-20 10:57:11 UTC (rev 5839)
@@ -96,7 +96,8 @@
 		    selectionchange: function(sm, selected) {
 			var comp;
 			var tlckup = {
-			    node: 'pveNodeConfig'
+			    node: 'pveNodeConfig',
+			    qemu: 'pveKVMConfig',
 			};
 			
 			if (selected.length > 0) {

Modified: pve-manager/pve2/www/new/panel/ConfigPanel.js
===================================================================
--- pve-manager/pve2/www/new/panel/ConfigPanel.js	2011-04-20 10:27:24 UTC (rev 5838)
+++ pve-manager/pve2/www/new/panel/ConfigPanel.js	2011-04-20 10:57:11 UTC (rev 5839)
@@ -24,7 +24,8 @@
 	// pass pveSelNode && viewFilter to all children
 	Ext.apply(me.defaults, {
 	    pveSelNode: me.pveSelNode,
-	    viewFilter: me.viewFilter
+	    viewFilter: me.viewFilter,
+	    border: false
 	});
 
 	if (me.showSearch) {

Added: pve-manager/pve2/www/new/panel/KVMConfig.js
===================================================================
--- pve-manager/pve2/www/new/panel/KVMConfig.js	                        (rev 0)
+++ pve-manager/pve2/www/new/panel/KVMConfig.js	2011-04-20 10:57:11 UTC (rev 5839)
@@ -0,0 +1,63 @@
+Ext.define('PVE.panel.KVMConfig', {
+    extend: 'PVE.panel.ConfigPanel',
+    alias: 'widget.pveKVMConfig',
+
+    initComponent: function() {
+        var me = this;
+
+	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 vmname = me.pveSelNode.data.name;
+	var descr = vmname ? "'" + vmname + "' " : '';
+	Ext.apply(me, {
+	    title: "Virtual machine " + descr + "'KVM " + vmid + "' on node '" + nodename + "'",
+	    items: [
+		{
+		    title: 'Summary',
+		    itemId: 'summary',
+		    tbar: [ 
+			{ text: 'Start'}, 
+			{ text: 'Stop'}, 
+			{ text: 'Reset'}, 
+			{ text: 'Shutdown'}, 
+			{ text: 'Remove'}
+		    ],
+		    html: 'summary ' + vmid
+		},
+		{
+		    title: 'Hardware',
+		    itemId: 'hardware',
+		    html: 'hardware ' + vmid
+		},
+		{
+		    title: 'Options',
+		    itemId: 'options',
+		    html: 'options ' + vmid
+		},
+		{
+		    //xtype: 'pveConsole',
+		    html: 'console ' + vmid,
+		    title: 'Console ' + vmid,
+		    itemId: 'console',
+		    vmid: vmid,
+		    node: nodename,
+		    border: false
+		},
+		{
+		    title: 'Permissions',
+		    itemId: 'permissions',
+		    html: 'permissions ' + vmid
+		}
+
+	    ]
+	});
+
+	me.callParent();
+   }
+});




More information about the pve-devel mailing list