Skip to content

Commit

Permalink
remove test, add comment, remove related service param
Browse files Browse the repository at this point in the history
Signed-off-by: Adam Tackett <[email protected]>
  • Loading branch information
Adam Tackett committed Jan 17, 2025
1 parent 43f8aff commit 7ee366e
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,6 @@ export function ServiceMap({
idSelected,
ticks,
undefined,
undefined,
false // Show the entire graph without filtering
)
);
Expand All @@ -315,7 +314,6 @@ export function ServiceMap({
idSelected,
ticks,
service,
serviceMap[service]?.relatedServices,
true // Enable filtering to focus on connected nodes
);
setItems(filteredGraph);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ export const getTableColumns = (
item === undefined || item === null ? (
'-'
) : item === 2 ? (
// 2 means Error, 1 means OK, 0 means Unset
<EuiText color="danger" size="s">
Yes
</EuiText>
Expand Down

0 comments on commit 7ee366e

Please sign in to comment.