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

[8.8] [SecuritySolution] Unsync highlight state between visualizations (#156453) #156719

Merged
merged 1 commit into from
May 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
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 @@ -53,6 +53,8 @@ const LensMarkDownRendererComponent: React.FC<LensMarkDownRendererProps> = ({
executionContext={{
type: 'cases',
}}
syncTooltips={false}
syncCursor={false}
/>
<LensChartTooltipFix />
</Container>
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -480,4 +480,19 @@ describe('getEventsHistogramLensAttributes', () => {
})
);
});

it('should render values in legend', () => {
const { result } = renderHook(
() =>
useLensAttributes({
getLensAttributes: getEventsHistogramLensAttributes,
stackByField: 'event.dataset',
}),
{ wrapper }
);

expect(result?.current?.state?.visualization).toEqual(
expect.objectContaining({ valuesInLegend: true })
);
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ export const getEventsHistogramLensAttributes: GetLensAttributes = (
yLeft: false,
yRight: true,
},
valuesInLegend: true,
},
query: {
query: '',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,19 @@ describe('getExternalAlertLensAttributes', () => {

expect(result?.current).toMatchSnapshot();
});

it('should render values in legend', () => {
const { result } = renderHook(
() =>
useLensAttributes({
getLensAttributes: getExternalAlertLensAttributes,
stackByField: 'event.dataset',
}),
{ wrapper }
);

expect(result?.current?.state?.visualization).toEqual(
expect.objectContaining({ valuesInLegend: true })
);
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,12 @@ export const getExternalAlertLensAttributes: GetLensAttributes = (
yLeftExtent: {
mode: 'full',
},
axisTitlesVisibilitySettings: {
x: false,
yLeft: false,
yRight: true,
},
valuesInLegend: true,
},
query: {
query: '',
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -157,4 +157,10 @@ describe('getDnsTopDomainsLensAttributes', () => {
}
`);
});

it('should render values in legend', () => {
expect(result?.current?.state?.visualization).toEqual(
expect.objectContaining({ valuesInLegend: true })
);
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ export const getDnsTopDomainsLensAttributes: GetLensAttributes = (
yLeft: false,
yRight: false,
},
valuesInLegend: true,
tickLabelsVisibilitySettings: {
x: true,
yLeft: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,4 +123,9 @@ describe('LensEmbeddable', () => {
it('should render with searchSessionId', () => {
expect(mockEmbeddableComponent.mock.calls[0][0].searchSessionId).toEqual(mockSearchSessionId);
});

it('should not sync highlight state between visualizations', () => {
expect(mockEmbeddableComponent.mock.calls[0][0].syncTooltips).toEqual(false);
expect(mockEmbeddableComponent.mock.calls[0][0].syncCursor).toEqual(false);
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,8 @@ const LensEmbeddableComponent: React.FC<LensEmbeddableComponentProps> = ({
extraActions={actions}
searchSessionId={searchSessionId}
showInspector={false}
syncTooltips={false}
syncCursor={false}
/>
</LensComponentWrapper>
)}
Expand Down