[pve-devel] r5736 - pve-manager/pve2/www/manager

svn-commits at proxmox.com svn-commits at proxmox.com
Mon Mar 21 10:31:37 CET 2011


Author: dietmar
Date: 2011-03-21 10:31:37 +0100 (Mon, 21 Mar 2011)
New Revision: 5736

Modified:
   pve-manager/pve2/www/manager/PVEUtils.js
   pve-manager/pve2/www/manager/StatusPanel.js
Log:
display nice text instead of ugly upid


Modified: pve-manager/pve2/www/manager/PVEUtils.js
===================================================================
--- pve-manager/pve2/www/manager/PVEUtils.js	2011-03-21 09:08:31 UTC (rev 5735)
+++ pve-manager/pve2/www/manager/PVEUtils.js	2011-03-21 09:31:37 UTC (rev 5736)
@@ -187,6 +187,20 @@
 
 	    return log_severity_hash[value] || value;
 	},
+
+	render_upid: function(value, metaData, record) { 
+	    var type = record.data.type;
+	    var id = record.data.id;
+
+	    if (type == 'vncproxy') {
+		return "VNC connection to VM " + id;
+	    }
+	    if (type == 'vncshell') {
+		return "VNC shell";
+	    }
+
+	    return value;
+	},
 			  
 	render_cpu: function(value, metaData, record, rowIndex, colIndex, store) {
 

Modified: pve-manager/pve2/www/manager/StatusPanel.js
===================================================================
--- pve-manager/pve2/www/manager/StatusPanel.js	2011-03-21 09:08:31 UTC (rev 5735)
+++ pve-manager/pve2/www/manager/StatusPanel.js	2011-03-21 09:31:37 UTC (rev 5736)
@@ -65,7 +65,7 @@
 	    { name: 'starttime', type : 'date', dateFormat: 'timestamp' }, 
 	    { name: 'endtime', type : 'date', dateFormat: 'timestamp' }, 
 	    { name: 'pid', type: 'int' },
-	    'node', 'upid', 'user', 'status', 'type'];
+	    'node', 'upid', 'user', 'status', 'type', 'id'];
 
 	// fixme: use/define a storage which append new values, but
 	// defer removing old values until a maximum numer of entries 
@@ -115,8 +115,8 @@
 		  width: 150
 		},
 		{ id: 'desc', header: "Description", dataIndex: 'upid', 
-		  width: 400
-
+		  width: 400,
+		  renderer: PVE.Utils.render_upid
 		},
 		{ id: 'status', header: "Status", dataIndex: 'status', 
 		  width: 200,




More information about the pve-devel mailing list