mirror of
https://github.com/grafana/grafana.git
synced 2025-09-22 10:23:28 +08:00

* migrate experimental to core grafana - update refs Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
23 lines
567 B
TypeScript
23 lines
567 B
TypeScript
import React from 'react';
|
|
|
|
import { EditorRow, EditorFieldGroup, EditorField } from '@grafana/ui';
|
|
|
|
import { RawQuery } from '../../../prometheus/querybuilder/shared/RawQuery';
|
|
import { lokiGrammar } from '../../syntax';
|
|
|
|
export interface Props {
|
|
query: string;
|
|
}
|
|
|
|
export function QueryPreview({ query }: Props) {
|
|
return (
|
|
<EditorRow>
|
|
<EditorFieldGroup>
|
|
<EditorField label="Raw query">
|
|
<RawQuery query={query} lang={{ grammar: lokiGrammar, name: 'lokiql' }} />
|
|
</EditorField>
|
|
</EditorFieldGroup>
|
|
</EditorRow>
|
|
);
|
|
}
|