Commit cf7ace6a by David Committed by GitHub

Rename live option in queries (#19658)

parent aa70abb3
...@@ -33,7 +33,7 @@ import { ...@@ -33,7 +33,7 @@ import {
isDateTime, isDateTime,
dateTimeForTimeZone, dateTimeForTimeZone,
} from '@grafana/data'; } from '@grafana/data';
import { ExploreId, ExploreUIState, ExploreMode } from 'app/types/explore'; import { ExploreId, ExploreUIState, ExploreMode, QueryOptions } from 'app/types/explore';
import { import {
updateDatasourceInstanceAction, updateDatasourceInstanceAction,
changeQueryAction, changeQueryAction,
...@@ -463,12 +463,12 @@ export function runQueries(exploreId: ExploreId): ThunkResult<void> { ...@@ -463,12 +463,12 @@ export function runQueries(exploreId: ExploreId): ThunkResult<void> {
stopQueryState(querySubscription); stopQueryState(querySubscription);
const queryOptions = { const queryOptions: QueryOptions = {
minInterval, minInterval,
// This is used for logs streaming for buffer size, with undefined it falls back to datasource config if it // This is used for logs streaming for buffer size, with undefined it falls back to datasource config if it
// supports that. // supports that.
maxDataPoints: mode === ExploreMode.Logs ? undefined : containerWidth, maxDataPoints: mode === ExploreMode.Logs ? undefined : containerWidth,
live, liveStreaming: live,
showingGraph, showingGraph,
showingTable, showingTable,
}; };
......
...@@ -797,7 +797,7 @@ describe('ElasticResponse', () => { ...@@ -797,7 +797,7 @@ describe('ElasticResponse', () => {
interval: '10s', interval: '10s',
isLogsQuery: true, isLogsQuery: true,
key: 'Q-1561369883389-0.7611823271062786-0', key: 'Q-1561369883389-0.7611823271062786-0',
live: false, liveStreaming: false,
maxDataPoints: 1620, maxDataPoints: 1620,
query: '', query: '',
timeField: '@timestamp', timeField: '@timestamp',
......
...@@ -216,7 +216,7 @@ export class LokiDatasource extends DataSourceApi<LokiQuery, LokiOptions> { ...@@ -216,7 +216,7 @@ export class LokiDatasource extends DataSourceApi<LokiQuery, LokiOptions> {
const subQueries = options.targets const subQueries = options.targets
.filter(target => target.expr && !target.hide) .filter(target => target.expr && !target.hide)
.map(target => { .map(target => {
if (target.live) { if (target.liveStreaming) {
return this.runLiveQuery(options, target); return this.runLiveQuery(options, target);
} }
return this.runQuery(options, target); return this.runQuery(options, target);
......
...@@ -3,7 +3,7 @@ import { Labels } from '@grafana/data'; ...@@ -3,7 +3,7 @@ import { Labels } from '@grafana/data';
export interface LokiQuery extends DataQuery { export interface LokiQuery extends DataQuery {
expr: string; expr: string;
live?: boolean; liveStreaming?: boolean;
query?: string; query?: string;
regexp?: string; regexp?: string;
} }
......
...@@ -345,7 +345,9 @@ export interface QueryIntervals { ...@@ -345,7 +345,9 @@ export interface QueryIntervals {
export interface QueryOptions { export interface QueryOptions {
minInterval: string; minInterval: string;
maxDataPoints?: number; maxDataPoints?: number;
live?: boolean; liveStreaming?: boolean;
showingGraph?: boolean;
showingTable?: boolean;
} }
export interface QueryTransaction { export interface QueryTransaction {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment