Skip to content
This repository has been archived by the owner on Mar 28, 2024. It is now read-only.

Commit

Permalink
[Security Solution]Rule preview when returns zero value it overlaps t…
Browse files Browse the repository at this point in the history
…he No results match your search criteria banner (elastic#151869)

## Summary

Issue elastic#151262

These changes fixes broken empty preview results state on smaller
screens.

Bug:

<img width="1117" alt="Screenshot 2023-02-22 at 15 24 06"
src="https://user-images.githubusercontent.com/2700761/220650014-dff19a56-637a-4c25-aa43-174eea2c91a1.png">

Fix:

<img width="1117" alt="Screenshot 2023-02-22 at 15 23 25"
src="https://user-images.githubusercontent.com/2700761/220650063-33cf4382-d8c8-4b30-acc3-62427094f09a.png">
  • Loading branch information
e40pud authored and Sloane Perrault committed Mar 8, 2023
1 parent ef39b7d commit 70ac1ca
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -556,7 +556,7 @@ const StatefulEventsViewerComponent: React.FC<EventsViewerProps & PropsFromRedux
additionalMenuOptions={additionalRightMenuOptions}
/>

{!hasAlerts && !loading && !graphOverlay && <EmptyTable height="short" />}
{!hasAlerts && !loading && !graphOverlay && <EmptyTable />}
{hasAlerts && (
<FullWidthFlexGroupTable
$visible={!graphEventId && graphOverlay == null}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,12 @@ const panelStyle = {
maxWidth: 500,
};

export const EmptyTable: React.FC<{ height?: keyof typeof heights }> = ({ height = 'tall' }) => {
export const EmptyTable: React.FC = () => {
const { http } = useKibana<CoreStart>().services;

return (
<EuiPanel color="subdued" data-test-subj="tGridEmptyState">
<EuiFlexGroup style={{ height: heights[height] }} alignItems="center" justifyContent="center">
<EuiFlexGroup alignItems="center" justifyContent="center">
<EuiFlexItem grow={false}>
<EuiPanel hasBorder={true} style={panelStyle}>
<EuiFlexGroup>
Expand Down

0 comments on commit 70ac1ca

Please sign in to comment.