From 9e79c6adb3891348067b749f29769710993c94a3 Mon Sep 17 00:00:00 2001 From: Kyrylo Shmidt Date: Tue, 7 Nov 2023 13:01:30 +0100 Subject: [PATCH 1/2] Fix insight grouping --- src/components/Insights/InsightList/index.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/components/Insights/InsightList/index.tsx b/src/components/Insights/InsightList/index.tsx index 24c543325..f418954f8 100644 --- a/src/components/Insights/InsightList/index.tsx +++ b/src/components/Insights/InsightList/index.tsx @@ -163,7 +163,10 @@ const groupInsights = ( // Add empty span groups spans.forEach((x) => { - if (!spanInsightGroups[x.spanDisplayName]) { + if ( + !endpointInsightGroups[x.spanDisplayName] && + !spanInsightGroups[x.spanDisplayName] + ) { spanInsightGroups[x.spanDisplayName] = []; } }); From d14f8e3e521e12c0a2de85b0aa891cddcee3b68c Mon Sep 17 00:00:00 2001 From: Kyrylo Shmidt Date: Tue, 7 Nov 2023 13:27:03 +0100 Subject: [PATCH 2/2] Improve insight type order --- src/components/Insights/InsightList/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/Insights/InsightList/index.tsx b/src/components/Insights/InsightList/index.tsx index f418954f8..c0fd8de7d 100644 --- a/src/components/Insights/InsightList/index.tsx +++ b/src/components/Insights/InsightList/index.tsx @@ -90,7 +90,7 @@ export const getInsightTypeOrderPriority = (type: string): number => { [InsightType.SpanDurationBreakdown]: 68 }; - return insightOrderPriorityMap[type] || Infinity; + return insightOrderPriorityMap[type] || -Infinity; }; const groupInsights = (