[pve-devel] r4902 - in pve-manager/pve2: lib/PVE/API2 www/manager

svn-commits at proxmox.com svn-commits at proxmox.com
Thu Jul 15 14:01:58 CEST 2010


Author: dietmar
Date: 2010-07-15 12:01:58 +0000 (Thu, 15 Jul 2010)
New Revision: 4902

Modified:
   pve-manager/pve2/lib/PVE/API2/Storage.pm
   pve-manager/pve2/www/manager/ConfigPanel.js
   pve-manager/pve2/www/manager/PVESearch.js
   pve-manager/pve2/www/manager/PVEUtils.js
   pve-manager/pve2/www/manager/ResourceTree.js
Log:
cleanups


Modified: pve-manager/pve2/lib/PVE/API2/Storage.pm
===================================================================
--- pve-manager/pve2/lib/PVE/API2/Storage.pm	2010-07-15 09:57:39 UTC (rev 4901)
+++ pve-manager/pve2/lib/PVE/API2/Storage.pm	2010-07-15 12:01:58 UTC (rev 4902)
@@ -1,6 +1,6 @@
 package PVE::API2::Storage;
 
-# fixme: split objects
+# fixme: split things into different files?
 
 # /storage/config GET whole config, CREATE storage
 # /storage/config/{storeid}/ GET/SET storage config

Modified: pve-manager/pve2/www/manager/ConfigPanel.js
===================================================================
--- pve-manager/pve2/www/manager/ConfigPanel.js	2010-07-15 09:57:39 UTC (rev 4901)
+++ pve-manager/pve2/www/manager/ConfigPanel.js	2010-07-15 12:01:58 UTC (rev 4902)
@@ -10,7 +10,7 @@
 	if (!self.xtype)
 	    throw "no xtype specified";
 
-	var items = self.items;
+	var items = self.items || [];
 	self.items = null;
 
 	if (PVE.ConfigPanel.activeTab[self.xtype] === undefined) {
@@ -19,15 +19,10 @@
 
 	if (self.showSearch) {
 	    items.unshift({
-		title: 'Search',
+		pveSelNode: pveselnode,
 		id: 'search',
 		layout: 'fit',
-		items: [
-		    {
-			xtype: 'pveSearch',
-			pveSelNode: pveselnode
-		    }
-		]
+		xtype: 'pveSearch'
 	    });
 	} else {
 	    if (PVE.ConfigPanel.activeTab[self.xtype] === 'search') {

Modified: pve-manager/pve2/www/manager/PVESearch.js
===================================================================
--- pve-manager/pve2/www/manager/PVESearch.js	2010-07-15 09:57:39 UTC (rev 4901)
+++ pve-manager/pve2/www/manager/PVESearch.js	2010-07-15 12:01:58 UTC (rev 4902)
@@ -8,7 +8,7 @@
 	var tree = n.getOwnerTree();
 	var viewname = tree.viewname;
 
-	console.log("VIEW " + viewname);
+	//console.log("VIEW " + viewname);
 
 	var groupfilter = [];
 
@@ -28,9 +28,19 @@
 	var coldef = PVE.Utils.get_column_defaults(viewname);
 
 	Ext.apply(this, {
+	    title: 'Index',
 	    store: PVE.Cache.searchstore,
 	    border: false,
 	    tbar: [
+		{
+		    text: "Create VM"
+		}, '-',
+		{
+		    text: "Create Container"
+		}, '-',
+		{
+		    text: "Add Storage"
+		},
 		'->', 'Search:', ' ',
 		{
 		    xtype: 'textfield',
@@ -73,39 +83,3 @@
 
 Ext.reg('pveSearch', PVE.Search);
 
-PVE.SearchPanel = Ext.extend(Ext.Panel, {
-
-    initComponent : function() {
-
-	var pveselnode = this.pveSelNode;
-
-	var tabs = new Ext.TabPanel({
-	    activeTab: 0,
- 	    border: false,	    
- 	    items: [{
-		title: 'Search',
-		layout: 'fit',
-		items: [
-		    {
-			xtype: 'pveSearch',
-			pveSelNode: pveselnode
-		    }
-		]
-	    }]
-	});
-
-	Ext.apply(this, {
-	    title: "Search Panel",
-	    layout: 'fit',
-  	    border: false,
-	    items: tabs
-	});
-
-	PVE.SearchPanel.superclass.initComponent.call(this);
-
-    }
-});
-
-Ext.reg('pveSearchPanel', PVE.SearchPanel);
-
-

Modified: pve-manager/pve2/www/manager/PVEUtils.js
===================================================================
--- pve-manager/pve2/www/manager/PVEUtils.js	2010-07-15 09:57:39 UTC (rev 4901)
+++ pve-manager/pve2/www/manager/PVEUtils.js	2010-07-15 12:01:58 UTC (rev 4902)
@@ -336,7 +336,7 @@
 	storage: {
 	    text: 'Storage View',
 	    fields: Ext.apply({}, visible_fields),
-	    groups: ['node', 'storage'],
+	    groups: ['node'],
 	    filterfn: function(n, itype) {
 		return itype === 'storage';
 	    }

Modified: pve-manager/pve2/www/manager/ResourceTree.js
===================================================================
--- pve-manager/pve2/www/manager/ResourceTree.js	2010-07-15 09:57:39 UTC (rev 4901)
+++ pve-manager/pve2/www/manager/ResourceTree.js	2010-07-15 12:01:58 UTC (rev 4902)
@@ -58,7 +58,10 @@
 	    Ext.apply(info, {
 		cls: 'x-tree-node-collapsed',
 		target: { 
-		    xtype: 'pveSearchPanel'
+		    title: "Resources",
+		    layout: 'fit',
+		    border: false,
+		    xtype: 'pveConfigPanel'
 		} 
 	    });
 	}




More information about the pve-devel mailing list