Skip to content

Commit 07cc904

Browse files
authored
Merge pull request #19 from oslabs-beta/jeffrey/comments
Jeffrey/comments
2 parents 54b5fff + 72c4432 commit 07cc904

File tree

3 files changed

+19
-0
lines changed

3 files changed

+19
-0
lines changed

app/charts/AwsChart.tsx

+5
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,11 @@ interface SoloStyles {
1818
width: number;
1919
}
2020

21+
/**
22+
* @params props - the props object containing relevant data.
23+
* @desc Handles AWS Charts. Memoized component to generate an AWS chart with formatted data.
24+
* @returns {JSX.Element} The JSX element with the AWS chart.
25+
*/
2126
const AwsChart: React.FC<any> = React.memo(props => {
2227
const { renderService, metric, timeList, valueList, colourGenerator, sizing } = props;
2328
const [solo, setSolo] = useState<SoloStyles | null>(null);

app/charts/EventChart.tsx

+5
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,11 @@ type PlotlyData = {
2828
marker: { colors: string[] };
2929
};
3030

31+
/**
32+
* @params {EventChartProps} props - the props object containing relevant data.
33+
* @desc Handles k8s metrics. Memoized component to generate event chart with formatted data
34+
* @returns {JSX.Element} The JSX element with the event chart.
35+
*/
3136
const EventChart: React.FC<EventChartProps> = React.memo(props => {
3237
const { metricName, chartData, sizing, colourGenerator } = props;
3338
const [solo, setSolo] = useState<SoloStyles | null>(null);

app/charts/HealthChart.tsx

+9
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,11 @@ type PlotlyData = {
2525
marker: { colors: string[] };
2626
};
2727

28+
/**
29+
* @params {HealthChartProps} props - the props object containing relevant data.
30+
* @desc Handles microservices metrics. Memoized component to generate a health chart with formatted data.
31+
* @returns {JSX.Element} The JSX element with the health chart.
32+
*/
2833
const HealthChart: React.FC<HealthChartProps> = React.memo(props => {
2934
const { dataType, serviceName, chartData, categoryName, sizing, colourGenerator } = props;
3035
const [solo, setSolo] = useState<SoloStyles | null>(null);
@@ -76,6 +81,10 @@ const HealthChart: React.FC<HealthChartProps> = React.memo(props => {
7681
}
7782
}, 20);
7883

84+
/**
85+
* @desc Takes the chart data and configures Plotly object to render associated health chart.
86+
* @returns {JSX.Element} Configured Plotly object representing health chart.
87+
*/
7988
const createChart = () => {
8089
const dataArray = generatePlotlyDataObjects(chartData);
8190
const sizeSwitch = sizing === 'all' ? all : solo;

0 commit comments

Comments
 (0)