[pve-devel] [PATCH manager] ui: lxc: resources: consider rootfs as a disk again

Fabian Ebner f.ebner at proxmox.com
Thu Apr 7 14:15:44 CEST 2022


Commit fa7980c2 ("ui: lxc resources: switch to vector based font
awesome icons") seems like an innocent change, but it broke the
(very brittle) logic here by removing the tdCls for rootfs.

Signed-off-by: Fabian Ebner <f.ebner at proxmox.com>
---
 www/manager6/lxc/Resources.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/www/manager6/lxc/Resources.js b/www/manager6/lxc/Resources.js
index 683be526..7db55280 100644
--- a/www/manager6/lxc/Resources.js
+++ b/www/manager6/lxc/Resources.js
@@ -263,7 +263,7 @@ Ext.define('PVE.lxc.RessourceView', {
 	    var rowdef = rows[key];
 
 	    var pending = rec.data.delete || me.hasPendingChanges(key);
-	    var isDisk = rowdef.tdCls === 'pve-itype-icon-storage';
+	    let isDisk = key === 'rootfs' || key.match(/^(mp|unused)\d+/);
 	    var isUnusedDisk = key.match(/^unused\d+/);
 	    var isUsedDisk = isDisk && !isUnusedDisk;
 
-- 
2.30.2






More information about the pve-devel mailing list