|
@@ -12,7 +12,6 @@ import QueryField, { TypeaheadInput, QueryFieldState } from 'app/features/explor
|
|
|
// dom also includes Element polyfills
|
|
// dom also includes Element polyfills
|
|
|
import { getNextCharacter, getPreviousCousin } from 'app/features/explore/utils/dom';
|
|
import { getNextCharacter, getPreviousCousin } from 'app/features/explore/utils/dom';
|
|
|
import BracesPlugin from 'app/features/explore/slate-plugins/braces';
|
|
import BracesPlugin from 'app/features/explore/slate-plugins/braces';
|
|
|
-import RunnerPlugin from 'app/features/explore/slate-plugins/runner';
|
|
|
|
|
|
|
|
|
|
// Types
|
|
// Types
|
|
|
import { LokiQuery } from '../types';
|
|
import { LokiQuery } from '../types';
|
|
@@ -77,7 +76,6 @@ export interface LokiQueryFieldFormProps extends ExploreQueryFieldProps<ExploreD
|
|
|
|
|
|
|
|
export class LokiQueryFieldForm extends React.PureComponent<LokiQueryFieldFormProps> {
|
|
export class LokiQueryFieldForm extends React.PureComponent<LokiQueryFieldFormProps> {
|
|
|
plugins: any[];
|
|
plugins: any[];
|
|
|
- pluginsSearch: any[];
|
|
|
|
|
modifiedSearch: string;
|
|
modifiedSearch: string;
|
|
|
modifiedQuery: string;
|
|
modifiedQuery: string;
|
|
|
|
|
|
|
@@ -86,14 +84,11 @@ export class LokiQueryFieldForm extends React.PureComponent<LokiQueryFieldFormPr
|
|
|
|
|
|
|
|
this.plugins = [
|
|
this.plugins = [
|
|
|
BracesPlugin(),
|
|
BracesPlugin(),
|
|
|
- RunnerPlugin({ handler: props.onRunQuery }),
|
|
|
|
|
PluginPrism({
|
|
PluginPrism({
|
|
|
onlyIn: (node: any) => node.type === 'code_block',
|
|
onlyIn: (node: any) => node.type === 'code_block',
|
|
|
getSyntax: (node: any) => 'promql',
|
|
getSyntax: (node: any) => 'promql',
|
|
|
}),
|
|
}),
|
|
|
];
|
|
];
|
|
|
-
|
|
|
|
|
- this.pluginsSearch = [RunnerPlugin({ handler: props.onRunQuery })];
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
loadOptions = (selectedOptions: CascaderOption[]) => {
|
|
loadOptions = (selectedOptions: CascaderOption[]) => {
|