You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Pull in all the health data via HealthContext (an object with data and timestamps).
21
+
Pull in the list of ALL user-selected metrics via QueryContext as strings, even if they don't pertain to this category.
22
+
Destructure category from props. This category was passed down from the GraphsContainer and creates a new tab in Chronos to view charts pertaining only to the category.
23
+
Think of each <HealthContainer /> as the new tab in Chronos. It will only create charts pertaining to that category.
24
+
healthChartsArr is local state that gets updated here with an array of <HealthChart />'s that display user-selected data for the category.
25
+
`service` is used to determine if we should display our health charts (because kafka and kubernetes specifically don't use HealthChart to display data).
// function that filters ALL user-selected metric titles down to ones that pertain to this category
67
+
68
+
// function that filters all the healthData (health and timestamp data) pertaining to this category down to only the data matching the metric titles selected by the user
25
69
26
70
useEffect(()=>{
27
71
consttemp: JSX.Element[]=[];
28
72
letcounter: number=0;
29
73
constdataList: any[]=healthData.healthDataList;
30
74
consttimeList: any[]=healthData.healthTimeList;
31
-
// dataList and timeList are structured the same, but time holds timestamps. An array of 4 objects. [Memory, CPU, Processes, Latency]
32
-
// Each element has all its metrics.
33
-
// console.log('healthData object in state: ', healthData);
75
+
// dataList and timeList are structured the same, but timeList holds timestamps. An array of 4 objects: [Memory, CPU, Processes, Latency]
34
76
// console.log('dataList in healthcontainer is:', dataList);
35
77
// console.log('timelist in healthcontainer is:', timeList);
36
78
79
+
// conditional that verifies data exists before any charts are created
0 commit comments