Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Backport 2.x] Minor bug fixes for trace analytics v2 (#1894) #1893

Merged
merged 2 commits into from
Jun 11, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 _ 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 @@
showticklabels: true,
tickvals: props.ticks,
ticktexts: props.ticks,
color: uiSettingsService.get('theme:darkMode') ? '255,255,255' : '0,0,0',
},
margin: {
l: 0,
Expand All @@ -106,7 +108,7 @@

useEffect(() => {
if (Object.keys(props.ticks).length > 0) setScaleProps(getScaleProps());
}, [props.idSelected, props.serviceMap, props.ticks]);

Check warning on line 111 in public/components/trace_analytics/components/common/plots/service_map_scale.tsx

View workflow job for this annotation

GitHub Actions / Lint

React Hook useEffect has a missing dependency: 'getScaleProps'. Either include it or remove the dependency array

return (
<div style={{ minHeight: 400, minWidth: 65 }}>
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 @@ -32,12 +32,12 @@
import { ServiceTrendsPlots } from './service_trends_plots';

interface ServicesTableProps {
items: any[];

Check warning on line 35 in public/components/trace_analytics/components/services/services_table.tsx

View workflow job for this annotation

GitHub Actions / Lint

Unexpected any. Specify a different type
selectedItems: any[];

Check warning on line 36 in public/components/trace_analytics/components/services/services_table.tsx

View workflow job for this annotation

GitHub Actions / Lint

Unexpected any. Specify a different type
setSelectedItems: React.Dispatch<React.SetStateAction<any[]>>;

Check warning on line 37 in public/components/trace_analytics/components/services/services_table.tsx

View workflow job for this annotation

GitHub Actions / Lint

Unexpected any. Specify a different type
addServicesGroupFilter: () => void;
loading: boolean;
traceColumnAction: any;

Check warning on line 40 in public/components/trace_analytics/components/services/services_table.tsx

View workflow job for this annotation

GitHub Actions / Lint

Unexpected any. Specify a different type
setCurrentSelectedService: (value: React.SetStateAction<string>) => void;
addFilter: (filter: FilterType) => void;
setRedirect: (redirect: boolean) => void;
Expand Down Expand Up @@ -69,7 +69,7 @@
} = props;

const selectionValue = {
onSelectionChange: (selections: any[]) => setSelectedItems(selections),

Check warning on line 72 in public/components/trace_analytics/components/services/services_table.tsx

View workflow job for this annotation

GitHub Actions / Lint

Unexpected any. Specify a different type
};

const nameColumnAction = (serviceName: string) => {
Expand Down Expand Up @@ -125,9 +125,9 @@
name: 'Name',
align: 'left',
sortable: true,
render: (item: any) => (

Check warning on line 128 in public/components/trace_analytics/components/services/services_table.tsx

View workflow job for this annotation

GitHub Actions / Lint

Unexpected any. Specify a different type
<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 All @@ -136,7 +136,7 @@
name: 'Average duration (ms)',
align: 'right',
sortable: true,
render: (item: any, row: any) => (

Check warning on line 139 in public/components/trace_analytics/components/services/services_table.tsx

View workflow job for this annotation

GitHub Actions / Lint

Unexpected any. Specify a different type

Check warning on line 139 in public/components/trace_analytics/components/services/services_table.tsx

View workflow job for this annotation

GitHub Actions / Lint

Unexpected any. Specify a different type
<ServiceTrendsPlots
item={item}
row={row}
Expand All @@ -151,7 +151,7 @@
name: 'Error rate',
align: 'right',
sortable: true,
render: (item: any, row: any) => (

Check warning on line 154 in public/components/trace_analytics/components/services/services_table.tsx

View workflow job for this annotation

GitHub Actions / Lint

Unexpected any. Specify a different type
<ServiceTrendsPlots
item={item}
row={row}
Expand Down Expand Up @@ -245,7 +245,7 @@
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
Loading