diff --git a/public/app/features/explore/Logs/Logs.tsx b/public/app/features/explore/Logs/Logs.tsx index ceeb7772aec..d04c45fe2fb 100644 --- a/public/app/features/explore/Logs/Logs.tsx +++ b/public/app/features/explore/Logs/Logs.tsx @@ -58,6 +58,7 @@ import { LogRows } from 'app/features/logs/components/LogRows'; import { LogRowContextModal } from 'app/features/logs/components/log-context/LogRowContextModal'; import { LogLevelColor, dedupLogRows, filterLogLevels } from 'app/features/logs/logsModel'; import { getLogLevel, getLogLevelFromKey, getLogLevelInfo } from 'app/features/logs/utils'; +import { LokiQueryDirection } from 'app/plugins/datasource/loki/dataquery.gen'; import { getState } from 'app/store/store'; import { ExploreItemState, useDispatch } from 'app/types'; @@ -733,6 +734,9 @@ const UnthemedLogs: React.FunctionComponent = (props: Props) => { const filteredLogs = filterRows(logRows, hiddenLogLevels); const { dedupedRows, dedupCount } = dedupRows(filteredLogs, dedupStrategy); const navigationRange = createNavigationRange(logRows); + const infiniteScrollAvailable = !logsQueries?.some( + (query) => 'direction' in query && query.direction === LokiQueryDirection.Scan + ); return ( <> @@ -932,7 +936,7 @@ const UnthemedLogs: React.FunctionComponent = (props: Props) => { > 0; const timeoutError = isTimeoutErrorResponse(logsVolumeData); const from = dateTime(Math.max(absoluteRange.from, allLogsVolumeMaximumRange.from)); @@ -95,7 +98,7 @@ export const LogsVolumePanelList = ({ if (logsVolumeData?.state === LoadingState.Loading) { return Loading...; - } else if (timeoutError) { + } else if (timeoutError && !canShowPartialData) { return ( ); - } else if (logsVolumeData?.error !== undefined) { + } else if (logsVolumeData?.error !== undefined && !canShowPartialData) { return ; } @@ -143,6 +146,14 @@ export const LogsVolumePanelList = ({ return (
+ {timeoutError && canShowPartialData && ( + + )} {Object.keys(logVolumes).map((name, index) => { return ( { + setDismissed(true); + }, []); + + const handleRemove = dismissable ? dismiss : onRemove; + + if (dismissed) { + return null; + } + return (
- + {showButton ? ( -
+
{!isOpen ? (