@@ -22,9 +22,9 @@ import { toHostMap } from "./LogRecord"
22
22
import { timeRange } from "./timestamps"
23
23
24
24
/** Oops, sometimes we have no data for a give node */
25
- function noData ( node : string , kind : "CPU Utilization" | "GPU Utilization" ) {
25
+ function noData ( node : string , kind : "CPU Utilization" | "GPU Utilization" , idx : number ) {
26
26
return (
27
- < div className = "flex-layout" title = { `No ${ kind } for ${ node } ` } >
27
+ < div key = { `nodata- ${ kind } - ${ idx } ` } className = "flex-layout" title = { `No ${ kind } for ${ node } ` } >
28
28
< span className = "flex-fill flex-layout flex-align-center" > no data</ span >
29
29
</ div >
30
30
)
@@ -76,15 +76,19 @@ export default async function all(args: Arguments) {
76
76
const range = timeRange ( gpuData , cpuData )
77
77
78
78
const linearized = nodes
79
- . map ( ( node ) => {
79
+ . map ( ( node , idx ) => {
80
80
const gpuForNode = gpuMap [ node ]
81
81
const cpuForNode = cpuMap [ node ]
82
82
return [
83
- ! gpuForNode ? noData ( node , "GPU Utilization" ) : < GPUChart timeRange = { range } logs = { { [ node ] : gpuForNode } } /> ,
83
+ ! gpuForNode ? (
84
+ noData ( node , "GPU Utilization" , idx )
85
+ ) : (
86
+ < GPUChart key = { `gpu-${ node } ` } timeRange = { range } logs = { { [ node ] : gpuForNode } } />
87
+ ) ,
84
88
! cpuForNode ? (
85
- noData ( node , "CPU Utilization" )
89
+ noData ( node , "CPU Utilization" , idx )
86
90
) : (
87
- < VmstatChart timeRange = { range } logs = { { [ node ] : cpuMap [ node ] } } />
91
+ < VmstatChart key = { `cpu- ${ node } ` } timeRange = { range } logs = { { [ node ] : cpuMap [ node ] } } />
88
92
) ,
89
93
]
90
94
} )
0 commit comments