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

svn-commits at proxmox.com svn-commits at proxmox.com
Wed Jun 15 12:41:19 CEST 2011


Author: dietmar
Date: 2011-06-15 12:41:18 +0200 (Wed, 15 Jun 2011)
New Revision: 6083

Modified:
   pve-manager/pve2/www/manager/qemu/HardwareView.js
Log:
dispay all disk types


Modified: pve-manager/pve2/www/manager/qemu/HardwareView.js
===================================================================
--- pve-manager/pve2/www/manager/qemu/HardwareView.js	2011-06-15 10:26:08 UTC (rev 6082)
+++ pve-manager/pve2/www/manager/qemu/HardwareView.js	2011-06-15 10:41:18 UTC (rev 6083)
@@ -8,16 +8,13 @@
 	var rowdef = rows[key] || {};
 
 	if (rowdef.tdCls) {
+	    metaData.tdCls = rowdef.tdCls;
 	    if (rowdef.tdCls == 'pve-itype-icon-storage') { 
 		if (record.data.value.match(/media=cdrom/)) {
 		    metaData.tdCls = 'pve-itype-icon-cdrom';
-		    return 'CD/DVD';
-		} else {
-		    metaData.tdCls = rowdef.tdCls;
-		    return 'Hard Disk';
+		    return rowdef.header.replace(/Hard Disk/, 'CD/DVD');
 		}
-	    } else
-		metaData.tdCls = rowdef.tdCls;
+	    }
 	}
 	return rowdef.header || key;
     },
@@ -74,11 +71,29 @@
 	    };
 	}
 	for (i = 0; i < 16; i++) {
+	    rows["scsi" + i] = {
+		tdCls: 'pve-itype-icon-storage',
+		header: 'Hard Disk (SCSI)'
+	    };
+	}
+	for (i = 0; i < 16; i++) {
+	    rows["virtio" + i] = {
+		tdCls: 'pve-itype-icon-storage',
+		header: 'Hard Disk (VIRTIO)'
+	    };
+	}
+	for (i = 0; i < 32; i++) {
 	    rows["net" + i] = {
 		tdCls: 'pve-itype-icon-network',
 		header: 'Network Adapter'
 	    };
 	}
+	for (i = 0; i < 8; i++) {
+	    rows["unused" + i] = {
+		tdCls: 'pve-itype-icon-storage',
+		header: 'Unused Disk'
+	    };
+	}
 
 	var run_editor = function() {
 	    




More information about the pve-devel mailing list