]> git.proxmox.com Git - pve-manager.git/commitdiff
ui: ceph: osd: set default icon for other crush types
authorAaron Lauterer <a.lauterer@proxmox.com>
Thu, 17 Nov 2022 09:29:13 +0000 (10:29 +0100)
committerDominik Csapak <d.csapak@proxmox.com>
Wed, 15 Feb 2023 14:01:04 +0000 (15:01 +0100)
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 <a.lauterer@proxmox.com>
www/manager6/ceph/OSD.js

index ef193a0a9c95a837ae17d1e363f30172b10d589a..257fa815e1de95f255009c5e8febdb62777ea2e3 100644 (file)
@@ -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' },