diff --git a/public/app/plugins/datasource/loki/components/LokiQueryEditor.tsx b/public/app/plugins/datasource/loki/components/LokiQueryEditor.tsx index a6f719369a7..fbacad4abd7 100644 --- a/public/app/plugins/datasource/loki/components/LokiQueryEditor.tsx +++ b/public/app/plugins/datasource/loki/components/LokiQueryEditor.tsx @@ -8,7 +8,7 @@ import { LokiOptionFields } from './LokiOptionFields'; import { LokiQueryEditorProps } from './types'; export function LokiQueryEditor(props: LokiQueryEditorProps) { - const { query, data, datasource, onChange, onRunQuery } = props; + const { query, data, datasource, onChange, onRunQuery, range } = props; const onLegendChange = (e: React.SyntheticEvent) => { const nextQuery = { ...query, legendFormat: e.currentTarget.value }; @@ -47,6 +47,7 @@ export function LokiQueryEditor(props: LokiQueryEditorProps) { history={[]} data={data} data-testid={testIds.editor} + range={range} ExtraFieldElement={ <> `; @@ -115,5 +121,11 @@ exports[`Render LokiQueryEditor with legend should update timerange 1`] = ` "refId": "A", } } + range={ + Object { + "from": "2019-01-01T00:00:00.000Z", + "to": "2020-01-02T00:00:00.000Z", + } + } /> `;