mirror of
https://github.com/ClusterCockpit/cc-backend
synced 2025-03-04 14:05:56 +01:00
clarify and simplyfy earlier change
This commit is contained in:
parent
419bc2747b
commit
5c9d4ffa9a
@ -102,10 +102,10 @@
|
|||||||
if ($nodeJobsData.data.jobs.count >= 1) { // "&& !$nodeJobsData.data.jobs.items[0].exclusive)"
|
if ($nodeJobsData.data.jobs.count >= 1) { // "&& !$nodeJobsData.data.jobs.items[0].exclusive)"
|
||||||
const accSet = Array.from(new Set($nodeJobsData.data.jobs.items
|
const accSet = Array.from(new Set($nodeJobsData.data.jobs.items
|
||||||
.map((i) => i.resources
|
.map((i) => i.resources
|
||||||
.filter((r) => r.hostname === nodeData.host)
|
.filter((r) => (r.hostname === nodeData.host) && r?.accelerators)
|
||||||
.map((r) => r.accelerators)
|
.map((r) => r?.accelerators)
|
||||||
)
|
)
|
||||||
)).flat(2).filter(a => a) // Last filter(): Exclude Null, Undefined and empty Str
|
)).flat(2)
|
||||||
|
|
||||||
extendedLegendData = {}
|
extendedLegendData = {}
|
||||||
for (const accId of accSet) {
|
for (const accId of accSet) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user