diff --git a/public/app/features/explore/GraphContainer.tsx b/public/app/features/explore/GraphContainer.tsx index e2610bcc781..c3a92f4007e 100644 --- a/public/app/features/explore/GraphContainer.tsx +++ b/public/app/features/explore/GraphContainer.tsx @@ -30,6 +30,11 @@ export class GraphContainer extends PureComponent { render() { const { exploreId, graphResult, loading, onChangeTime, showingGraph, showingTable, range, split } = this.props; const graphHeight = showingGraph && showingTable ? '200px' : '400px'; + + if (!graphResult) { + return null; + } + return ( { 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 ( { render() { const { loading, onClickCell, showingTable, tableResult } = this.props; + + if (!tableResult) { + return null; + } + return ( diff --git a/public/app/features/explore/state/reducers.ts b/public/app/features/explore/state/reducers.ts index 7a240350cb6..5e9cc23c64f 100644 --- a/public/app/features/explore/state/reducers.ts +++ b/public/app/features/explore/state/reducers.ts @@ -278,7 +278,7 @@ export const itemReducer = (state, action: Action): ExploreItemState => { } 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, }; diff --git a/public/sass/pages/_explore.scss b/public/sass/pages/_explore.scss index db542530885..dce944dc7b2 100644 --- a/public/sass/pages/_explore.scss +++ b/public/sass/pages/_explore.scss @@ -292,11 +292,6 @@ overflow: hidden; background: none; margin: $panel-margin / 2; - transition: background-color 1s ease; -} - -.explore-panel__loader--active { - background: $text-color-faint; } .explore-panel__loader--active:after { @@ -307,17 +302,20 @@ top: -50%; height: 250%; position: absolute; - animation: loader 2s cubic-bezier(0.17, 0.67, 0.83, 0.67); + animation: loader 2s cubic-bezier(0.17, 0.67, 0.83, 0.67) 500ms; animation-iteration-count: 100; + left: -25%; background: $blue; } @keyframes loader { from { left: -25%; + opacity: 0.1; } to { left: 100%; + opacity: 1; } }