diff --git a/public/app/features/explore/Logs.tsx b/public/app/features/explore/Logs.tsx index 30db1ec349c..7e3cdfe9315 100644 --- a/public/app/features/explore/Logs.tsx +++ b/public/app/features/explore/Logs.tsx @@ -49,7 +49,7 @@ function renderMetaItem(value: any, kind: LogsMetaKind) { } interface Props { - data: LogsModel; + data?: LogsModel; exploreId: string; highlighterExpressions: string[]; loading: boolean; @@ -165,6 +165,11 @@ export default class Logs extends PureComponent { scanning, scanRange, } = this.props; + + if (!data) { + return null; + } + const { dedup, deferLogs, hiddenLogLevels, renderAll, showLocalTime, showUtc } = this.state; let { showLabels } = this.state; const hasData = data && data.rows && data.rows.length > 0; diff --git a/public/app/features/explore/LogsContainer.tsx b/public/app/features/explore/LogsContainer.tsx index e58cd2b5e95..76970ef343a 100644 --- a/public/app/features/explore/LogsContainer.tsx +++ b/public/app/features/explore/LogsContainer.tsx @@ -47,12 +47,13 @@ export class LogsContainer extends PureComponent { scanning, scanRange, } = this.props; + return ( { } case ActionTypes.QueryTransactionStart: { - const { datasourceInstance, queryIntervals, queryTransactions } = state; + const { queryTransactions } = state; const { resultType, rowIndex, transaction } = action.payload; // Discarding existing transactions of same type const remainingTransactions = queryTransactions.filter( @@ -288,15 +288,9 @@ export const itemReducer = (state, action: Action): ExploreItemState => { // Append new transaction const nextQueryTransactions: QueryTransaction[] = [...remainingTransactions, transaction]; - const results = calculateResultsFromQueryTransactions( - nextQueryTransactions, - datasourceInstance, - queryIntervals.intervalMs - ); return { ...state, - ...results, queryTransactions: nextQueryTransactions, showingStartPage: false, };