clarify and simplyfy earlier change

This commit is contained in:
Christoph Kluge 2025-03-03 17:00:33 +01:00
parent 419bc2747b
commit 5c9d4ffa9a

View File

@ -102,10 +102,10 @@
if ($nodeJobsData.data.jobs.count >= 1) { // "&& !$nodeJobsData.data.jobs.items[0].exclusive)"
const accSet = Array.from(new Set($nodeJobsData.data.jobs.items
.map((i) => i.resources
.filter((r) => r.hostname === nodeData.host)
.map((r) => r.accelerators)
.filter((r) => (r.hostname === nodeData.host) && r?.accelerators)
.map((r) => r?.accelerators)
)
)).flat(2).filter(a => a) // Last filter(): Exclude Null, Undefined and empty Str
)).flat(2)
extendedLegendData = {}
for (const accId of accSet) {