From d981e33b1ff9ec01136a4999605fb1c09f90151f Mon Sep 17 00:00:00 2001 From: Aaron Lauterer Date: Tue, 22 Aug 2023 11:04:56 +0200 Subject: [PATCH] DiskList: render osdid-list if present Render all OSD IDs in 'osdid-list' if the parameter is present. It is possible to have multiple OSD daemons on a disk. We want to list them all in the UI. Fall back to the 'osdid' parameter if 'osdid-list' is not available. We check rec.data['osdid-list'] against its general truthiness as it might not be present at all or null. Signed-off-by: Aaron Lauterer --- src/panel/DiskList.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/panel/DiskList.js b/src/panel/DiskList.js index c5a0050..4808f5c 100644 --- a/src/panel/DiskList.js +++ b/src/panel/DiskList.js @@ -220,7 +220,11 @@ Ext.define('Proxmox.DiskList', { let extendedInfo = ''; if (rec) { let types = []; - if (rec.data.osdid !== undefined && rec.data.osdid >= 0) { + if (rec.data['osdid-list'] && rec.data['osdid-list'].length > 0) { + for (const id of rec.data['osdid-list'].sort()) { + types.push(`OSD.${id.toString()}`); + } + } else if (rec.data.osdid !== undefined && rec.data.osdid >= 0) { types.push(`OSD.${rec.data.osdid.toString()}`); } if (rec.data.journals > 0) { -- 2.39.2