Skip to content

Commit c49c6e8

Browse files
authored
Minor bug fixes for trace analytics v2 (#1894)
* minor bug fixes for trace analytics Signed-off-by: Shenoy Pratik <[email protected]> (cherry picked from commit 3df8e90) * add mode param to attributes useEffect Signed-off-by: Shenoy Pratik <[email protected]> (cherry picked from commit 11c2239)
1 parent a06d483 commit c49c6e8

File tree

5 files changed

+14
-4
lines changed

5 files changed

+14
-4
lines changed

public/components/trace_analytics/components/common/plots/__tests__/__snapshots__/service_map_scale.test.tsx.snap

+2
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ exports[`Service map scale component renders service map scale plot 1`] = `
8585
"zeroline": false,
8686
},
8787
"yaxis": Object {
88+
"color": "0,0,0",
8889
"fixedrange": true,
8990
"range": Array [
9091
0,
@@ -205,6 +206,7 @@ exports[`Service map scale component renders service map scale plot 1`] = `
205206
"zeroline": false,
206207
},
207208
"yaxis": Object {
209+
"color": "0,0,0",
208210
"fixedrange": true,
209211
"range": Array [
210212
0,

public/components/trace_analytics/components/common/plots/service_map_scale.tsx

+2
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import { EuiFlexGroup, EuiFlexItem, EuiSpacer, EuiText } from '@elastic/eui';
77
import merge from 'lodash/merge';
88
import React, { useEffect, useState } from 'react';
99
import { BarOrientation } from '../../../../../../common/constants/shared';
10+
import { uiSettingsService } from '../../../../../../common/utils';
1011
import { Plt } from '../../../../visualizations/plotly/plot';
1112
import unmatchedNode from '../../../images/unmatched_node.png';
1213
import { getServiceMapScaleColor } from '../helper_functions';
@@ -88,6 +89,7 @@ export function ServiceMapScale(props: {
8889
showticklabels: true,
8990
tickvals: props.ticks,
9091
ticktexts: props.ticks,
92+
color: uiSettingsService.get('theme:darkMode') ? '255,255,255' : '0,0,0',
9193
},
9294
margin: {
9395
l: 0,

public/components/trace_analytics/components/services/__tests__/__snapshots__/services_table.test.tsx.snap

+8-2
Original file line numberDiff line numberDiff line change
@@ -1933,9 +1933,12 @@ exports[`Services table component renders jaeger services table 1`] = `
19331933
className="euiFlexItem euiFlexItem--flexGrowZero"
19341934
onClick={[Function]}
19351935
>
1936-
<EuiLink>
1936+
<EuiLink
1937+
data-test-subj="service-flyout-action-btnundefined"
1938+
>
19371939
<button
19381940
className="euiLink euiLink--primary"
1941+
data-test-subj="service-flyout-action-btnundefined"
19391942
disabled={false}
19401943
type="button"
19411944
>
@@ -4176,9 +4179,12 @@ exports[`Services table component renders services table 1`] = `
41764179
className="euiFlexItem euiFlexItem--flexGrowZero"
41774180
onClick={[Function]}
41784181
>
4179-
<EuiLink>
4182+
<EuiLink
4183+
data-test-subj="service-flyout-action-btnundefined"
4184+
>
41804185
<button
41814186
className="euiLink euiLink--primary"
4187+
data-test-subj="service-flyout-action-btnundefined"
41824188
disabled={false}
41834189
type="button"
41844190
>

public/components/trace_analytics/components/services/services_table.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ export function ServicesTable(props: ServicesTableProps) {
245245
render: (_item: any, row: any) => (
246246
<EuiFlexGroup justifyContent="center">
247247
<EuiFlexItem grow={false} onClick={() => setCurrentSelectedService(row.name)}>
248-
<EuiLink>
248+
<EuiLink data-test-subj={'service-flyout-action-btn' + row.itemId}>
249249
<EuiIcon type="inspect" color="primary" />
250250
</EuiLink>
251251
</EuiFlexItem>

public/components/trace_analytics/home.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ export const Home = (props: HomeProps) => {
156156

157157
useEffect(() => {
158158
if (mode === 'data_prepper') fetchAttributesFields();
159-
}, []);
159+
}, [mode]);
160160

161161
const serviceBreadcrumbs = [
162162
{

0 commit comments

Comments
 (0)