|
|
|
@ -4,6 +4,7 @@ import { CoreApp, LoadingState } from '@grafana/data'; |
|
|
|
|
import { EditorHeader, EditorRows, FlexItem, InlineSelect, Space } from '@grafana/experimental'; |
|
|
|
|
import { reportInteraction } from '@grafana/runtime'; |
|
|
|
|
import { Button, ConfirmModal } from '@grafana/ui'; |
|
|
|
|
import { FeedbackLink } from 'app/plugins/datasource/prometheus/querybuilder/shared/FeedbackLink'; |
|
|
|
|
import { QueryEditorModeToggle } from 'app/plugins/datasource/prometheus/querybuilder/shared/QueryEditorModeToggle'; |
|
|
|
|
import { QueryHeaderSwitch } from 'app/plugins/datasource/prometheus/querybuilder/shared/QueryHeaderSwitch'; |
|
|
|
|
import { QueryEditorMode } from 'app/plugins/datasource/prometheus/querybuilder/shared/types'; |
|
|
|
@ -93,7 +94,12 @@ export const LokiQueryEditorSelector = React.memo<LokiQueryEditorProps>((props) |
|
|
|
|
}} |
|
|
|
|
options={lokiQueryModeller.getQueryPatterns().map((x) => ({ label: x.name, value: x }))} |
|
|
|
|
/> |
|
|
|
|
<QueryHeaderSwitch label="Raw query" value={rawQuery} onChange={onQueryPreviewChange} /> |
|
|
|
|
{editorMode === QueryEditorMode.Builder && ( |
|
|
|
|
<> |
|
|
|
|
<QueryHeaderSwitch label="Raw query" value={rawQuery} onChange={onQueryPreviewChange} /> |
|
|
|
|
<FeedbackLink feedbackUrl="https://github.com/grafana/grafana/discussions/50785" /> |
|
|
|
|
</> |
|
|
|
|
)} |
|
|
|
|
<FlexItem grow={1} /> |
|
|
|
|
{app !== CoreApp.Explore && ( |
|
|
|
|
<Button |
|
|
|
|