Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minor: improve UI of filters in test case graph #17775

Merged
merged 4 commits into from
Sep 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ function TestSummaryGraph({
dataKey: info.label,
type: 'line',
color: info.color,
inactive: !(activeKeys.length === 0 || activeKeys.includes(info.label)),
}));

legendPayload.push({
Expand All @@ -145,7 +146,7 @@ function TestSummaryGraph({
} as Payload);

return legendPayload;
}, [chartData]);
}, [chartData?.information, activeKeys]);

const handleLegendClick: LegendProps['onClick'] = (event) => {
if (event.dataKey === 'Incident') {
Expand Down Expand Up @@ -226,7 +227,7 @@ function TestSummaryGraph({

return (
<ResponsiveContainer
className="bg-white"
className="bg-white custom-test-summary-graph"
id={`${testCaseName}_graph`}
minHeight={minHeight ?? 400}>
<ComposedChart
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,8 @@
}
}
}
.custom-test-summary-graph {
.recharts-legend-item {
cursor: pointer;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,8 @@ export const PROFILER_METRIC = [
'customMetricsProfile',
];

export const INCIDENT = 'Incident';

export const PROFILER_FILTER_RANGE: DateFilterType = {
yesterday: {
days: 1,
Expand Down
Loading