From 9c8bd347871718bf0498c045be37870245385471 Mon Sep 17 00:00:00 2001 From: Erik Sundell Date: Tue, 4 Dec 2018 14:55:56 +0100 Subject: [PATCH] remove all query empty related code. root cause of the problem was to fix hasNonEmptyQuery --- public/app/features/explore/Explore.tsx | 2 -- public/app/features/explore/Logs.tsx | 15 ++------------- 2 files changed, 2 insertions(+), 15 deletions(-) diff --git a/public/app/features/explore/Explore.tsx b/public/app/features/explore/Explore.tsx index b381fdbcd41..7e0120c9079 100644 --- a/public/app/features/explore/Explore.tsx +++ b/public/app/features/explore/Explore.tsx @@ -840,7 +840,6 @@ export class Explore extends React.PureComponent { const tableLoading = queryTransactions.some(qt => qt.resultType === 'Table' && !qt.done); const logsLoading = queryTransactions.some(qt => qt.resultType === 'Logs' && !qt.done); const loading = queryTransactions.some(qt => !qt.done); - const queryEmpty = queryTransactions.some(qt => qt.resultType === 'Logs' && qt.done && qt.result.length === 0); return (
@@ -973,7 +972,6 @@ export class Explore extends React.PureComponent { range={range} scanning={scanning} scanRange={scanRange} - queryEmpty={queryEmpty} /> )} diff --git a/public/app/features/explore/Logs.tsx b/public/app/features/explore/Logs.tsx index 8d098813490..6447ec895ed 100644 --- a/public/app/features/explore/Logs.tsx +++ b/public/app/features/explore/Logs.tsx @@ -140,7 +140,6 @@ interface LogsProps { range?: RawTimeRange; scanning?: boolean; scanRange?: RawTimeRange; - queryEmpty: boolean; onChangeTime?: (range: RawTimeRange) => void; onClickLabel?: (label: string, value: string) => void; onStartScanning?: () => void; @@ -240,17 +239,7 @@ export default class Logs extends PureComponent { }; render() { - const { - className = '', - data, - loading = false, - onClickLabel, - position, - range, - scanning, - scanRange, - queryEmpty, - } = this.props; + const { className = '', data, loading = false, onClickLabel, position, range, scanning, scanRange } = this.props; const { dedup, deferLogs, hiddenLogLevels, renderAll, showLocalTime, showUtc } = this.state; let { showLabels } = this.state; const hasData = data && data.rows && data.rows.length > 0; @@ -369,7 +358,7 @@ export default class Logs extends PureComponent { {hasData && deferLogs && Rendering {dedupedData.rows.length} rows...}
{!loading && - queryEmpty && + !hasData && !scanning && (
No logs found.