// Libraries import React from 'react'; // Types import { InlineFormLabel } from '@grafana/ui'; import { LokiOptionFields } from './LokiOptionFields'; import { LokiQueryField } from './LokiQueryField'; import { LokiQueryEditorProps } from './types'; export function LokiQueryEditor(props: LokiQueryEditorProps) { const { query, data, datasource, onChange, onRunQuery, range } = props; const onLegendChange = (e: React.SyntheticEvent) => { const nextQuery = { ...query, legendFormat: e.currentTarget.value }; onChange(nextQuery); }; const legendField = (
Legend
); return ( {legendField} } /> ); } export const testIds = { editor: 'loki-editor', };