Skip to content

Commit b4f5812

Browse files
committed
Small edit to HealthContainer comments.
1 parent 80585e5 commit b4f5812

File tree

1 file changed

+6
-18
lines changed

1 file changed

+6
-18
lines changed

app/containers/HealthContainer.tsx

Lines changed: 6 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -20,22 +20,14 @@ interface DataObject {
2020
}
2121

2222
const HealthContainer: React.FC<HealthContainerProps> = React.memo(props => {
23-
/*
24-
healthData - Pull in all the health data via HealthContext
25-
selectedMetrics - Pull in the list of ALL user-selected metrics via QueryContext as strings, even if they don't pertain to this category.
26-
category - 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.
27-
Think of each <HealthContainer /> as the new tab in Chronos. It will only create charts pertaining to that category.
28-
healthChartsArr - local state that gets updated with an array of <HealthChart />'s that display user-selected data.
29-
`service` - only used to determine if we should display our health charts (because kafka and kubernetes specifically don't use HealthChart to display data).
30-
*/
3123
const { healthData } = useContext(HealthContext);
3224
const { selectedMetrics } = useContext(QueryContext);
3325
const { service } = useParams<keyof Params>() as Params;
3426
const [healthChartsArr, setHealthChartsArr] = useState<JSX.Element[]>([]);
3527
const { category, sizing, colourGenerator } = props;
36-
/*
37-
This function filters the selectedMetrics array down to only metrics that match the category of this instance of HealthContainer.
38-
Once that has finished, it then filters the healthData down to the current category and the filteredMetrics.
28+
/**
29+
* This function filters the selectedMetrics array down to only metrics that match the category of this instance of HealthContainer.
30+
* Once that has finished, it then filters the healthData down to the current category and the filteredMetrics.
3931
*/
4032
const filterSelectedMetricsAndHealthData = (): DataObject => {
4133
// define a filtered health data object for output
@@ -79,9 +71,9 @@ const HealthContainer: React.FC<HealthContainerProps> = React.memo(props => {
7971
// function to create a version of the healthData based on the value type
8072
// current healthData value types: GHz, bytes, temperature, percent, ticks, processes, num, latency
8173
const defineDataValueType = (metricName: string): string => {
82-
/*
83-
define a dictionary of data types where the key is the expected chars to be found in the parameter
84-
and the value is the desired data type label
74+
/**
75+
* Define a dictionary of data types where the key is the expected chars to be found in the parameter
76+
* and the value is the desired data type label.
8577
*/
8678
const typeDictionary = {
8779
GHz: 'Speed in GHz',
@@ -152,10 +144,6 @@ const HealthContainer: React.FC<HealthContainerProps> = React.memo(props => {
152144
for (const serviceName in serviceObjects) {
153145
// pass down the value of the current data type and service
154146
const chartData = serviceObjects[serviceName];
155-
console.log('dataType: ', dataType);
156-
console.log('current service Object: ', serviceObjects);
157-
console.log('current Service Name: ', serviceName);
158-
console.log('current chartData Object: ', chartData);
159147
chartsArray.push(
160148
<HealthChart
161149
key={'H' + keymaker()}

0 commit comments

Comments
 (0)