From 14886cec663f7fbea4221e2fb2dcf563df90a7b0 Mon Sep 17 00:00:00 2001 From: Shenoy Pratik Date: Mon, 10 Jun 2024 17:43:59 -0700 Subject: [PATCH] [Backport 2.x] Minor bug fixes for trace analytics v2 (#1894) (#1893) * minor bug fixes for trace analytics Signed-off-by: Shenoy Pratik * add mode param to attributes useEffect Signed-off-by: Shenoy Pratik --------- Signed-off-by: Shenoy Pratik --- .../__snapshots__/service_map_scale.test.tsx.snap | 2 ++ .../components/common/plots/service_map_scale.tsx | 2 ++ .../__snapshots__/services_table.test.tsx.snap | 10 ++++++++-- .../components/services/services_table.tsx | 4 ++-- public/components/trace_analytics/home.tsx | 2 +- 5 files changed, 15 insertions(+), 5 deletions(-) diff --git a/public/components/trace_analytics/components/common/plots/__tests__/__snapshots__/service_map_scale.test.tsx.snap b/public/components/trace_analytics/components/common/plots/__tests__/__snapshots__/service_map_scale.test.tsx.snap index 30ed8d0d4..a4ff8b036 100644 --- a/public/components/trace_analytics/components/common/plots/__tests__/__snapshots__/service_map_scale.test.tsx.snap +++ b/public/components/trace_analytics/components/common/plots/__tests__/__snapshots__/service_map_scale.test.tsx.snap @@ -85,6 +85,7 @@ exports[`Service map scale component renders service map scale plot 1`] = ` "zeroline": false, }, "yaxis": Object { + "color": "0,0,0", "fixedrange": true, "range": Array [ 0, @@ -197,6 +198,7 @@ exports[`Service map scale component renders service map scale plot 1`] = ` "zeroline": false, }, "yaxis": Object { + "color": "0,0,0", "fixedrange": true, "range": Array [ 0, diff --git a/public/components/trace_analytics/components/common/plots/service_map_scale.tsx b/public/components/trace_analytics/components/common/plots/service_map_scale.tsx index 61bba2841..f1ac573eb 100644 --- a/public/components/trace_analytics/components/common/plots/service_map_scale.tsx +++ b/public/components/trace_analytics/components/common/plots/service_map_scale.tsx @@ -7,6 +7,7 @@ import { EuiFlexGroup, EuiFlexItem, EuiSpacer, EuiText } from '@elastic/eui'; import _ from 'lodash'; import React, { useEffect, useState } from 'react'; import { BarOrientation } from '../../../../../../common/constants/shared'; +import { uiSettingsService } from '../../../../../../common/utils'; import { Plt } from '../../../../visualizations/plotly/plot'; import unmatchedNode from '../../../images/unmatched_node.png'; import { getServiceMapScaleColor } from '../helper_functions'; @@ -88,6 +89,7 @@ export function ServiceMapScale(props: { showticklabels: true, tickvals: props.ticks, ticktexts: props.ticks, + color: uiSettingsService.get('theme:darkMode') ? '255,255,255' : '0,0,0', }, margin: { l: 0, diff --git a/public/components/trace_analytics/components/services/__tests__/__snapshots__/services_table.test.tsx.snap b/public/components/trace_analytics/components/services/__tests__/__snapshots__/services_table.test.tsx.snap index 18768e49f..16eca8ff3 100644 --- a/public/components/trace_analytics/components/services/__tests__/__snapshots__/services_table.test.tsx.snap +++ b/public/components/trace_analytics/components/services/__tests__/__snapshots__/services_table.test.tsx.snap @@ -1933,9 +1933,12 @@ exports[`Services table component renders jaeger services table 1`] = ` className="euiFlexItem euiFlexItem--flexGrowZero" onClick={[Function]} > - +