Skip to content

Commit

Permalink
[Backport 2.x] Minor bug fixes for trace analytics v2 (#1894) (#1893)
Browse files Browse the repository at this point in the history
* minor bug fixes for trace analytics

Signed-off-by: Shenoy Pratik <[email protected]>

* add mode param to attributes useEffect

Signed-off-by: Shenoy Pratik <[email protected]>

---------

Signed-off-by: Shenoy Pratik <[email protected]>
  • Loading branch information
ps48 authored Jun 11, 2024
1 parent 9b14258 commit 14886ce
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1933,9 +1933,12 @@ exports[`Services table component renders jaeger services table 1`] = `
className="euiFlexItem euiFlexItem--flexGrowZero"
onClick={[Function]}
>
<EuiLink>
<EuiLink
data-test-subj="service-flyout-action-btnundefined"
>
<button
className="euiLink euiLink--primary"
data-test-subj="service-flyout-action-btnundefined"
disabled={false}
type="button"
>
Expand Down Expand Up @@ -4176,9 +4179,12 @@ exports[`Services table component renders services table 1`] = `
className="euiFlexItem euiFlexItem--flexGrowZero"
onClick={[Function]}
>
<EuiLink>
<EuiLink
data-test-subj="service-flyout-action-btnundefined"
>
<button
className="euiLink euiLink--primary"
data-test-subj="service-flyout-action-btnundefined"
disabled={false}
type="button"
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ export function ServicesTable(props: ServicesTableProps) {
sortable: true,
render: (item: any) => (
<EuiLink data-test-subj="service-link" onClick={() => nameColumnAction(item)}>
{item.length < 24 ? item : <div title={item}>{_.truncate(item, { length: 24 })}</div>}
{item.length < 24 ? item : <div title={item}>{truncate(item, { length: 24 })}</div>}
</EuiLink>
),
},
Expand Down Expand Up @@ -245,7 +245,7 @@ export function ServicesTable(props: ServicesTableProps) {
render: (_item: any, row: any) => (
<EuiFlexGroup justifyContent="center">
<EuiFlexItem grow={false} onClick={() => setCurrentSelectedService(row.name)}>
<EuiLink>
<EuiLink data-test-subj={'service-flyout-action-btn' + row.itemId}>
<EuiIcon type="inspect" color="primary" />
</EuiLink>
</EuiFlexItem>
Expand Down
2 changes: 1 addition & 1 deletion public/components/trace_analytics/home.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ export const Home = (props: HomeProps) => {

useEffect(() => {
if (mode === 'data_prepper') fetchAttributesFields();
}, []);
}, [mode]);

const serviceBreadcrumbs = [
{
Expand Down

0 comments on commit 14886ce

Please sign in to comment.