|
287 | 287 | } else if (nodesData[i]?.schedulerState == "allocated") { |
288 | 288 | //u.ctx.strokeStyle = "rgb(0, 255, 0)"; |
289 | 289 | u.ctx.fillStyle = "rgba(0, 255, 0, 0.5)"; |
290 | | - } else if (nodesData[i]?.schedulerState == "notindb") { |
| 290 | + } else if (nodesData[i]?.schedulerState == "mixed") { |
291 | 291 | //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)"; |
295 | 292 | 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)"; |
296 | 296 | } |
297 | 297 | } |
298 | 298 | } else { |
|
450 | 450 | tooltip.style.borderColor = "rgb(0, 0, 255)"; |
451 | 451 | } else if (nodesData[i]?.schedulerState == "allocated") { |
452 | 452 | 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") { |
456 | 454 | tooltip.style.borderColor = "rgb(255, 0, 0)"; |
| 455 | + } else { // Fallback: All other DEFINED states |
| 456 | + tooltip.style.borderColor = "rgb(0, 0, 0)"; |
457 | 457 | } |
458 | 458 | } |
459 | 459 | } else { |
|
904 | 904 | if (jobsData) { |
905 | 905 | const posX = u.valToPos(0.1, "x", true) |
906 | 906 | 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) |
908 | 908 | u.ctx.fillStyle = 'black' |
909 | 909 | u.ctx.fillText('0 Hours', posX, posY) |
910 | 910 | const start = posX + 10 |
|
921 | 921 |
|
922 | 922 | // Nodes: The Colors Of NodeStates |
923 | 923 | if (nodesData) { |
924 | | - const posY = u.valToPos(17500.0, "y", true) |
| 924 | + const posY = 7 // u.valToPos(17500.0, "y", true) |
925 | 925 |
|
926 | 926 | const posAllocDot = u.valToPos(0.03, "x", true) |
927 | 927 | 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) |
931 | 933 | const posOtherText = posOtherDot + 40 |
932 | | - const posMissingDot = u.valToPos(30, "x", true) |
933 | | - const posMissingText = posMissingDot + 80 |
934 | 934 |
|
935 | 935 | u.ctx.fillStyle = "rgb(0, 255, 0)" |
936 | 936 | u.ctx.beginPath() |
|
948 | 948 |
|
949 | 949 | u.ctx.fillStyle = "rgb(255, 0, 0)" |
950 | 950 | 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) |
952 | 952 | u.ctx.fill() |
953 | 953 | u.ctx.fillStyle = 'black' |
954 | | - u.ctx.fillText('Other', posOtherText, posY) |
| 954 | + u.ctx.fillText('Mixed', posMixedText, posY) |
955 | 955 |
|
956 | 956 | u.ctx.fillStyle = 'black' |
957 | 957 | 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) |
959 | 959 | u.ctx.fill() |
960 | | - u.ctx.fillText('Missing in DB', posMissingText, posY) |
| 960 | + u.ctx.fillText('Other', posOtherText, posY) |
961 | 961 | } |
962 | 962 | } |
963 | 963 | }, |
|
0 commit comments