CloudWatch Logs: If Grafana Live isn't enabled, don't use the Live Channel (#36358)

* If Live isn't enabled, don't use the Live Channel

* ..Import Config if you want to use it!
pull/36558/head
Thomas Cave 4 years ago committed by GitHub
parent a241f03167
commit 3e95c3826a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 8
      public/app/plugins/datasource/cloudwatch/datasource.ts

@ -64,6 +64,7 @@ import { CloudWatchLanguageProvider } from './language_provider';
import { VariableWithMultiSupport } from 'app/features/variables/types';
import { AwsUrl, encodeUrl } from './aws_url';
import { increasingInterval } from './utils/rxjs/increasingInterval';
import config from 'app/core/config';
const DS_QUERY_ENDPOINT = '/api/ds/query';
@ -126,8 +127,11 @@ export class CloudWatchDatasource extends DataSourceWithBackend<CloudWatchQuery,
const dataQueryResponses: Array<Observable<DataQueryResponse>> = [];
if (logQueries.length > 0) {
dataQueryResponses.push(this.handleLiveLogQueries(logQueries, options));
// dataQueryResponses.push(this.handleLogQueries(logQueries, options));
if (config.liveEnabled) {
dataQueryResponses.push(this.handleLiveLogQueries(logQueries, options));
} else {
dataQueryResponses.push(this.handleLogQueries(logQueries, options));
}
}
if (metricsQueries.length > 0) {

Loading…
Cancel
Save