mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
* Add and configure eslint-plugin-import * Fix the lint:ts npm command * Autofix + prettier all the files * Manually fix remaining files * Move jquery code in jest-setup to external file to safely reorder imports * Resolve issue caused by circular dependencies within Prometheus * Update .betterer.results * Fix missing // @ts-ignore * ignore iconBundle.ts * Fix missing // @ts-ignore
27 lines
627 B
TypeScript
27 lines
627 B
TypeScript
import React from 'react';
|
|
|
|
import { LokiQueryField } from './LokiQueryField';
|
|
import { LokiQueryEditorProps } from './types';
|
|
|
|
export function LokiQueryEditorForAlerting(props: LokiQueryEditorProps) {
|
|
const { query, data, datasource, onChange, onRunQuery } = props;
|
|
|
|
return (
|
|
<LokiQueryField
|
|
datasource={datasource}
|
|
query={query}
|
|
onChange={onChange}
|
|
onRunQuery={onRunQuery}
|
|
onBlur={onRunQuery}
|
|
history={[]}
|
|
data={data}
|
|
placeholder="Enter a Loki query"
|
|
data-testid={testIds.editor}
|
|
/>
|
|
);
|
|
}
|
|
|
|
export const testIds = {
|
|
editor: 'loki-editor-cloud-alerting',
|
|
};
|