[pve-devel] r6370 - pve-manager/pve2/www/manager/qemu

svn-commits at proxmox.com svn-commits at proxmox.com
Wed Jul 27 12:46:44 CEST 2011


Author: dietmar
Date: 2011-07-27 12:46:44 +0200 (Wed, 27 Jul 2011)
New Revision: 6370

Modified:
   pve-manager/pve2/www/manager/qemu/HardwareView.js
Log:
better renderer


Modified: pve-manager/pve2/www/manager/qemu/HardwareView.js
===================================================================
--- pve-manager/pve2/www/manager/qemu/HardwareView.js	2011-07-27 10:34:45 UTC (rev 6369)
+++ pve-manager/pve2/www/manager/qemu/HardwareView.js	2011-07-27 10:46:44 UTC (rev 6370)
@@ -54,10 +54,12 @@
 		renderer: function(value, metaData, record, rowIndex, colIndex, store) {
 		    var model = me.getObjectValue('cpu');
 		    var cores = me.getObjectValue('cores');
+		    var res = '';
 		    if (!cores || (cores <= 1)) {
-			return value;
+			res = value;
+		    } else {
+			res = (value*cores) + ' (' + value + ' sockets, ' + cores + ' cores)';
 		    }
-		    var res = (value*cores) + ' (' + value + ' x ' + cores + ' cores)';
 		    if (model) {
 			res += ' [' + model + ']';
 		    }




More information about the pve-devel mailing list