diff --git a/public/app/features/explore/LogsVolumePanelList.test.tsx b/public/app/features/explore/LogsVolumePanelList.test.tsx index d9a0473747a..160628c8271 100644 --- a/public/app/features/explore/LogsVolumePanelList.test.tsx +++ b/public/app/features/explore/LogsVolumePanelList.test.tsx @@ -63,7 +63,7 @@ describe('LogsVolumePanelList', () => { }, onLoadCallback ); - expect(screen.getByText('The logs volume query is taking too long and has timed out')).toBeInTheDocument(); + expect(screen.getByText('The logs volume query has timed out')).toBeInTheDocument(); await userEvent.click(screen.getByRole('button', { name: 'Retry' })); expect(onLoadCallback).toHaveBeenCalled(); }); diff --git a/public/app/features/explore/LogsVolumePanelList.tsx b/public/app/features/explore/LogsVolumePanelList.tsx index c3295896ef6..f530336822d 100644 --- a/public/app/features/explore/LogsVolumePanelList.tsx +++ b/public/app/features/explore/LogsVolumePanelList.tsx @@ -69,7 +69,7 @@ export const LogsVolumePanelList = ({ } else if (timeoutError) { return ( SHORT_ERROR_MESSAGE_LIMIT; + const theme = useTheme2(); + const styles = getStyles(theme); return ( - - {showButton ? ( - - ) : ( - message - )} - {suggestedAction && onSuggestedAction && ( - - )} - +
+ +
+ {showButton ? ( + + ) : ( + message + )} + {suggestedAction && onSuggestedAction && ( +
+ +
+ )} +
+
+
); } + +const getStyles = (theme: GrafanaTheme2) => { + return { + supplementaryErrorContainer: css` + width: 50%; + min-width: ${theme.breakpoints.values.sm}px; + margin: 0 auto; + `, + suggestedActionWrapper: css` + height: ${theme.spacing(6)}; + button { + position: absolute; + right: ${theme.spacing(2)}; + top: ${theme.spacing(7)}; + } + `, + }; +};