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

svn-commits at proxmox.com svn-commits at proxmox.com
Wed Apr 20 13:17:46 CEST 2011


Author: dietmar
Date: 2011-04-20 13:17:46 +0200 (Wed, 20 Apr 2011)
New Revision: 5841

Added:
   pve-manager/pve2/www/new/panel/StorageBrowser.js
Modified:
   pve-manager/pve2/www/new/Makefile.am
   pve-manager/pve2/www/new/Workspace.js
Log:
StorageBrowser.js stub


Modified: pve-manager/pve2/www/new/Makefile.am
===================================================================
--- pve-manager/pve2/www/new/Makefile.am	2011-04-20 11:06:30 UTC (rev 5840)
+++ pve-manager/pve2/www/new/Makefile.am	2011-04-20 11:17:46 UTC (rev 5841)
@@ -15,6 +15,7 @@
 	panel/ConfigPanel.js				\
 	panel/NodeConfig.js				\
 	panel/KVMConfig.js				\
+	panel/StorageBrowser.js				\
 	tree/ResourceTree.js				\
 	Workspace.js
 

Modified: pve-manager/pve2/www/new/Workspace.js
===================================================================
--- pve-manager/pve2/www/new/Workspace.js	2011-04-20 11:06:30 UTC (rev 5840)
+++ pve-manager/pve2/www/new/Workspace.js	2011-04-20 11:17:46 UTC (rev 5841)
@@ -97,7 +97,8 @@
 			var comp;
 			var tlckup = {
 			    node: 'pveNodeConfig',
-			    qemu: 'pveKVMConfig'
+			    qemu: 'pveKVMConfig',
+			    storage: 'pveStorageBrowser'
 			};
 			
 			if (selected.length > 0) {

Added: pve-manager/pve2/www/new/panel/StorageBrowser.js
===================================================================
--- pve-manager/pve2/www/new/panel/StorageBrowser.js	                        (rev 0)
+++ pve-manager/pve2/www/new/panel/StorageBrowser.js	2011-04-20 11:17:46 UTC (rev 5841)
@@ -0,0 +1,41 @@
+Ext.define('PVE.panel.StorageBrowser', {
+    extend: 'PVE.panel.ConfigPanel',
+    alias: 'widget.pveStorageBrowser',
+
+    initComponent: function() {
+        var me = this;
+
+	var nodename = me.pveSelNode.data.node;
+	if (!nodename) 
+	    throw "no node name specified";
+
+	var storeid = me.pveSelNode.data.storage;
+	if (!storeid) 
+	    throw "no storage ID specified";
+
+	var vmname = me.pveSelNode.data.name;
+	var descr = vmname ? "'" + vmname + "' " : '';
+	Ext.apply(me, {
+	    title: "Storage '" + storeid + "'" + "' on node '" + nodename + "'",
+	    items: [
+		{
+		    title: 'Summary',
+		    //xtype: 'pveStorageSummary',
+		    itemId: 'summary'
+		},
+		{
+		    //xtype: 'pveStorageContent',
+		    title: 'Content',
+		    itemId: 'content'
+		},
+		{
+		    title: 'Permissions',
+		    itemId: 'permissions',
+		    html: 'Permissions '
+		}
+	    ]
+	});
+
+	me.callParent();
+   }
+});




More information about the pve-devel mailing list