fix(explore): Prevent double querying for Prometheus and Loki (#17004)

* fix(explore): Prevent double querying for Prometheus and Loki

- queries were triggered twice because two Enter handlers existed
- removed runner plugin from Loki and Prom query fields (runner plugin
is still being used in azure)

Part of #16995

* Set loki's mtrics capability to false

Loki is not a metrics store. Explore was using the `metrics` field in
the plugin definition to issue a second query run. But Loki shows only
one result viewer.

Fixes #16995
This commit is contained in:
David
2019-05-13 09:55:20 +02:00
committed by GitHub
parent e0b760e08e
commit bf5b60f74a
4 changed files with 5 additions and 10 deletions

View File

@@ -12,7 +12,6 @@ import { TypeaheadOutput, HistoryItem } from 'app/types/explore';
// dom also includes Element polyfills
import { getNextCharacter, getPreviousCousin } from 'app/features/explore/utils/dom';
import BracesPlugin from 'app/features/explore/slate-plugins/braces';
import RunnerPlugin from 'app/features/explore/slate-plugins/runner';
import QueryField, { TypeaheadInput, QueryFieldState } from 'app/features/explore/QueryField';
import { PromQuery } from '../types';
import { CancelablePromise, makePromiseCancelable } from 'app/core/utils/CancelablePromise';
@@ -126,7 +125,6 @@ class PromQueryField extends React.PureComponent<PromQueryFieldProps, PromQueryF
this.plugins = [
BracesPlugin(),
RunnerPlugin({ handler: props.onRunQuery }),
PluginPrism({
onlyIn: (node: any) => node.type === 'code_block',
getSyntax: (node: any) => 'promql',