[pve-devel] r6058 - in pve-manager/pve2/www/manager: node qemu

svn-commits at proxmox.com svn-commits at proxmox.com
Tue May 31 09:45:10 CEST 2011


Author: dietmar
Date: 2011-05-31 09:45:10 +0200 (Tue, 31 May 2011)
New Revision: 6058

Modified:
   pve-manager/pve2/www/manager/node/StatusView.js
   pve-manager/pve2/www/manager/node/Summary.js
   pve-manager/pve2/www/manager/qemu/Summary.js
Log:
cleanups


Modified: pve-manager/pve2/www/manager/node/StatusView.js
===================================================================
--- pve-manager/pve2/www/manager/node/StatusView.js	2011-05-31 07:30:16 UTC (rev 6057)
+++ pve-manager/pve2/www/manager/node/StatusView.js	2011-05-31 07:45:10 UTC (rev 6058)
@@ -5,6 +5,10 @@
     initComponent : function() {
 	var me = this;
 
+	var nodename = me.pveSelNode.data.node;
+	if (!nodename) 
+	    throw "no node name specified";
+
 	var render_cpuinfo = function(value) {
 	    return value.cpus + " x " + value.model;
 	};
@@ -39,6 +43,7 @@
 	};
 
 	Ext.applyIf(me, {
+	    url: "/api2/json/nodes/" + nodename + "/status",
 	    cwidth1: 150,
 	    interval: 1000,
 	    height: 286,

Modified: pve-manager/pve2/www/manager/node/Summary.js
===================================================================
--- pve-manager/pve2/www/manager/node/Summary.js	2011-05-31 07:30:16 UTC (rev 6057)
+++ pve-manager/pve2/www/manager/node/Summary.js	2011-05-31 07:45:10 UTC (rev 6058)
@@ -9,11 +9,14 @@
 	if (!nodename) 
 	    throw "no node name specified";
 
-	rstore = Ext.create('PVE.data.ObjectStore', { 
-	    url: "/api2/json/nodes/" + nodename + "/status",
-	    interval: 1000
+	var statusview = Ext.create('PVE.node.StatusView', {
+	    title: 'Status',
+	    pveSelNode: me.pveSelNode,
+	    width: 800
 	});
 
+	rstore = statusview.rstore;
+
 	var node_command = function(cmd) {
 	    me.setLoading(true, true);
 	    PVE.Utils.API2Request({
@@ -97,13 +100,8 @@
 	    },		
 	    tbar: tbar,
 	    items: [
+		statusview,
 		{
-		    title: 'Status',
-		    xtype: 'pveNodeStatusView',
-		    rstore: rstore,
-		    width: 800
-		},
-		{
 		    xtype: 'pveRRDView',
 		    title: "CPU usage %",
 		    datasource: 'cpu,iowait',

Modified: pve-manager/pve2/www/manager/qemu/Summary.js
===================================================================
--- pve-manager/pve2/www/manager/qemu/Summary.js	2011-05-31 07:30:16 UTC (rev 6057)
+++ pve-manager/pve2/www/manager/qemu/Summary.js	2011-05-31 07:45:10 UTC (rev 6058)
@@ -17,7 +17,7 @@
 	    title: 'Status',
 	    pveSelNode: me.pveSelNode,
 	    width: 400
-	})
+	});
 
 	rstore = statusview.rstore;
 




More information about the pve-devel mailing list