Skip to content

Commit 196f659

Browse files
Merge pull request ClusterCockpit#547 from ClusterCockpit/546_fix_roofline_legends
fix: change to fixed legend coordinates instead of dynamic placement
2 parents 3001086 + ac7865d commit 196f659

2 files changed

Lines changed: 19 additions & 19 deletions

File tree

web/frontend/src/generic/plots/Roofline.svelte

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -287,12 +287,12 @@
287287
} else if (nodesData[i]?.schedulerState == "allocated") {
288288
//u.ctx.strokeStyle = "rgb(0, 255, 0)";
289289
u.ctx.fillStyle = "rgba(0, 255, 0, 0.5)";
290-
} else if (nodesData[i]?.schedulerState == "notindb") {
290+
} else if (nodesData[i]?.schedulerState == "mixed") {
291291
//u.ctx.strokeStyle = "rgb(0, 0, 0)";
292-
u.ctx.fillStyle = "rgba(0, 0, 0, 0.5)";
293-
} else { // Fallback: All other DEFINED states
294-
//u.ctx.strokeStyle = "rgb(255, 0, 0)";
295292
u.ctx.fillStyle = "rgba(255, 0, 0, 0.5)";
293+
} else { // Fallback: All other states: Reserved, Down, Notindb
294+
//u.ctx.strokeStyle = "rgb(255, 0, 0)";
295+
u.ctx.fillStyle = "rgba(0, 0, 0, 0.5)";
296296
}
297297
}
298298
} else {
@@ -450,10 +450,10 @@
450450
tooltip.style.borderColor = "rgb(0, 0, 255)";
451451
} else if (nodesData[i]?.schedulerState == "allocated") {
452452
tooltip.style.borderColor = "rgb(0, 255, 0)";
453-
} else if (nodesData[i]?.schedulerState == "notindb") { // Missing from DB table
454-
tooltip.style.borderColor = "rgb(0, 0, 0)";
455-
} else { // Fallback: All other DEFINED states
453+
} else if (nodesData[i]?.schedulerState == "mixed") {
456454
tooltip.style.borderColor = "rgb(255, 0, 0)";
455+
} else { // Fallback: All other DEFINED states
456+
tooltip.style.borderColor = "rgb(0, 0, 0)";
457457
}
458458
}
459459
} else {
@@ -904,7 +904,7 @@
904904
if (jobsData) {
905905
const posX = u.valToPos(0.1, "x", true)
906906
const posXLimit = u.valToPos(100, "x", true)
907-
const posY = u.valToPos(17500.0, "y", true)
907+
const posY = 7 // u.valToPos(17500.0, "y", true)
908908
u.ctx.fillStyle = 'black'
909909
u.ctx.fillText('0 Hours', posX, posY)
910910
const start = posX + 10
@@ -921,16 +921,16 @@
921921
922922
// Nodes: The Colors Of NodeStates
923923
if (nodesData) {
924-
const posY = u.valToPos(17500.0, "y", true)
924+
const posY = 7 // u.valToPos(17500.0, "y", true)
925925
926926
const posAllocDot = u.valToPos(0.03, "x", true)
927927
const posAllocText = posAllocDot + 60
928-
const posIdleDot = u.valToPos(0.3, "x", true)
929-
const posIdleText = posIdleDot + 30
930-
const posOtherDot = u.valToPos(3, "x", true)
928+
const posIdleDot = u.valToPos(1, "x", true)
929+
const posIdleText = posIdleDot + 28
930+
const posMixedDot = u.valToPos(7, "x", true)
931+
const posMixedText = posMixedDot + 40
932+
const posOtherDot = u.valToPos(100, "x", true)
931933
const posOtherText = posOtherDot + 40
932-
const posMissingDot = u.valToPos(30, "x", true)
933-
const posMissingText = posMissingDot + 80
934934
935935
u.ctx.fillStyle = "rgb(0, 255, 0)"
936936
u.ctx.beginPath()
@@ -948,16 +948,16 @@
948948
949949
u.ctx.fillStyle = "rgb(255, 0, 0)"
950950
u.ctx.beginPath()
951-
u.ctx.arc(posOtherDot, posY, 3, 0, Math.PI * 2, false)
951+
u.ctx.arc(posMixedDot, posY, 3, 0, Math.PI * 2, false)
952952
u.ctx.fill()
953953
u.ctx.fillStyle = 'black'
954-
u.ctx.fillText('Other', posOtherText, posY)
954+
u.ctx.fillText('Mixed', posMixedText, posY)
955955
956956
u.ctx.fillStyle = 'black'
957957
u.ctx.beginPath()
958-
u.ctx.arc(posMissingDot, posY, 3, 0, Math.PI * 2, false)
958+
u.ctx.arc(posOtherDot, posY, 3, 0, Math.PI * 2, false)
959959
u.ctx.fill()
960-
u.ctx.fillText('Missing in DB', posMissingText, posY)
960+
u.ctx.fillText('Other', posOtherText, posY)
961961
}
962962
}
963963
},

web/frontend/src/generic/plots/RooflineLegacy.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,7 @@
338338
// The Color Scale For Time Information
339339
const posX = u.valToPos(0.1, "x", true)
340340
const posXLimit = u.valToPos(100, "x", true)
341-
const posY = u.valToPos(14000.0, "y", true)
341+
const posY = 7 // u.valToPos(((subCluster?.flopRateSimd?.value || 10000) + 5000), "y", true)
342342
u.ctx.fillStyle = 'black'
343343
u.ctx.fillText('Start', posX, posY)
344344
const start = posX + 10

0 commit comments

Comments
 (0)