[pve-devel] [PATCH manager] fix #1884: qemu vm: pending deletion of cdrom/dvd drive shows as hard disk in hardware tab

David Limbeck d.limbeck at proxmox.com
Thu Aug 23 15:50:44 CEST 2018


Signed-off-by: David Limbeck <d.limbeck at proxmox.com>
---
 www/manager6/qemu/HardwareView.js | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/www/manager6/qemu/HardwareView.js b/www/manager6/qemu/HardwareView.js
index a87a9df1..9b99f77e 100644
--- a/www/manager6/qemu/HardwareView.js
+++ b/www/manager6/qemu/HardwareView.js
@@ -14,7 +14,15 @@ Ext.define('PVE.qemu.HardwareView', {
 	if (rowdef.tdCls) {
 	    metaData.tdCls = rowdef.tdCls;
 	    if (rowdef.tdCls == 'pve-itype-icon-storage') { 
-		var value = me.getObjectValue(key, '', true);
+		var oldValue = me.getObjectValue(key, '', false);
+		var newValue = me.getObjectValue(key, '', true);
+		var value;
+		if(oldValue === '') {
+		    value = newValue;
+		}
+		else {
+		    value = oldValue;
+		}
 		if (value.match(/vm-.*-cloudinit/)) {
 		    metaData.tdCls = 'pve-itype-icon-cloud';
 		    return rowdef.cloudheader;
-- 
2.11.0





More information about the pve-devel mailing list