Loki, Prometheus: Fix passing of query with defaults to code mode (#53646)

This commit is contained in:
Ivana Huckova
2022-08-12 15:00:55 +02:00
committed by GitHub
parent f34a03b2f1
commit fde5147d71
2 changed files with 2 additions and 2 deletions
@@ -129,7 +129,7 @@ export const LokiQueryEditorSelector = React.memo<LokiQueryEditorProps>((props)
<Space v={0.5} />
<EditorRows>
{editorMode === QueryEditorMode.Code && (
<LokiQueryCodeEditor {...props} onChange={onChangeInternal} showExplain={explain} />
<LokiQueryCodeEditor {...props} query={query} onChange={onChangeInternal} showExplain={explain} />
)}
{editorMode === QueryEditorMode.Builder && (
<LokiQueryBuilderContainer
@@ -126,7 +126,7 @@ export const PromQueryEditorSelector = React.memo<Props>((props) => {
</EditorHeader>
<Space v={0.5} />
<EditorRows>
{editorMode === QueryEditorMode.Code && <PromQueryCodeEditor {...props} showExplain={explain} />}
{editorMode === QueryEditorMode.Code && <PromQueryCodeEditor {...props} query={query} showExplain={explain} />}
{editorMode === QueryEditorMode.Builder && (
<PromQueryBuilderContainer
query={query}