From 7ee366e1ef172b6c48621fb56d9d0c835370002f Mon Sep 17 00:00:00 2001 From: Adam Tackett Date: Fri, 17 Jan 2025 10:52:21 -0800 Subject: [PATCH] remove test, add comment, remove related service param Signed-off-by: Adam Tackett --- .../common/__tests__/helper_functions.test.tsx | 11 ----------- .../components/common/helper_functions.tsx | 3 --- .../components/common/plots/service_map.tsx | 2 -- .../components/traces/trace_table_helpers.tsx | 1 + 4 files changed, 1 insertion(+), 16 deletions(-) diff --git a/public/components/trace_analytics/components/common/__tests__/helper_functions.test.tsx b/public/components/trace_analytics/components/common/__tests__/helper_functions.test.tsx index 743e0f1a4..75d4edbb3 100644 --- a/public/components/trace_analytics/components/common/__tests__/helper_functions.test.tsx +++ b/public/components/trace_analytics/components/common/__tests__/helper_functions.test.tsx @@ -93,17 +93,6 @@ describe('Trace analytics helper functions', () => { expect(serviceMapGraph).toEqual(TEST_SERVICE_MAP_GRAPH); }); - it('extracts correct target resources for a given service from its traceGroups', () => { - const traceGroups = TEST_SERVICE_MAP.order.traceGroups; - - // Extract all target resources from the traceGroups - const targetResources = [].concat(...traceGroups.map((group) => group.targetResource)); - - // Verify the extracted resources match the expected list - const expectedResources = ['clear_order', 'update_order', 'get_order', 'pay_order']; - expect(targetResources).toEqual(expectedResources); - }); - it('calculates ticks', () => { const ticks = calculateTicks(500, 200); const ticks2 = calculateTicks(0, 200, 10); diff --git a/public/components/trace_analytics/components/common/helper_functions.tsx b/public/components/trace_analytics/components/common/helper_functions.tsx index f74864ce5..9ff79dcb0 100644 --- a/public/components/trace_analytics/components/common/helper_functions.tsx +++ b/public/components/trace_analytics/components/common/helper_functions.tsx @@ -214,11 +214,8 @@ export function getServiceMapGraph( idSelected: 'latency' | 'error_rate' | 'throughput', ticks: number[], currService?: string, - relatedServices?: string[], filterByCurrService?: boolean ) { - if (!relatedServices) relatedServices = Object.keys(map); - const nodes = Object.keys(map).map((service) => { const value = map[service][idSelected]; let styleOptions; diff --git a/public/components/trace_analytics/components/common/plots/service_map.tsx b/public/components/trace_analytics/components/common/plots/service_map.tsx index f75f1e840..087ad38ae 100644 --- a/public/components/trace_analytics/components/common/plots/service_map.tsx +++ b/public/components/trace_analytics/components/common/plots/service_map.tsx @@ -301,7 +301,6 @@ export function ServiceMap({ idSelected, ticks, undefined, - undefined, false // Show the entire graph without filtering ) ); @@ -315,7 +314,6 @@ export function ServiceMap({ idSelected, ticks, service, - serviceMap[service]?.relatedServices, true // Enable filtering to focus on connected nodes ); setItems(filteredGraph); diff --git a/public/components/trace_analytics/components/traces/trace_table_helpers.tsx b/public/components/trace_analytics/components/traces/trace_table_helpers.tsx index e89ac3c09..a4ff97d6a 100644 --- a/public/components/trace_analytics/components/traces/trace_table_helpers.tsx +++ b/public/components/trace_analytics/components/traces/trace_table_helpers.tsx @@ -119,6 +119,7 @@ export const getTableColumns = ( item === undefined || item === null ? ( '-' ) : item === 2 ? ( + // 2 means Error, 1 means OK, 0 means Unset Yes