From 8a0201aae032b4a023cd97f44b970a2a59b47296 Mon Sep 17 00:00:00 2001 From: Aaron Lauterer Date: Thu, 17 Nov 2022 10:29:13 +0100 Subject: [PATCH] ui: ceph: osd: set default icon for other crush types Some users have a more complicated CRUSH hierarchy, for example with a stretched cluster. The additional hierarchy steps (datacenter, rack, room, ...) are shown in the OSD panel. Showing a generic icon for any CRUSH types that have not a specific icon configured will make it easier to navigate the tree as it will not look somewhat broken and empty. Signed-off-by: Aaron Lauterer --- www/manager6/ceph/OSD.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/www/manager6/ceph/OSD.js b/www/manager6/ceph/OSD.js index ef193a0a..257fa815 100644 --- a/www/manager6/ceph/OSD.js +++ b/www/manager6/ceph/OSD.js @@ -956,7 +956,8 @@ Ext.define('PVE.node.CephOsdTree', { osd: 'fa-hdd-o', root: 'fa-server', }; - return 'fa x-fa-tree ' + iconMap[data.type]; + let icon = iconMap[data.type] ?? 'fa-folder-o'; + return `fa x-fa-tree ${icon}`; }, }, { type: 'number', name: 'crush_weight' },