From 708aeb0682a7a7c74ec2d4ab6648880e0946bd27 Mon Sep 17 00:00:00 2001 From: Konrad Lalik Date: Wed, 6 Mar 2024 11:42:28 +0100 Subject: [PATCH] Alerting: Pass queryType parameter to the query model in recording rules preview (#83950) --- .../unified/components/rule-editor/RecordingRuleEditor.tsx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/public/app/features/alerting/unified/components/rule-editor/RecordingRuleEditor.tsx b/public/app/features/alerting/unified/components/rule-editor/RecordingRuleEditor.tsx index 3fe2feb640f..60a0d44fe61 100644 --- a/public/app/features/alerting/unified/components/rule-editor/RecordingRuleEditor.tsx +++ b/public/app/features/alerting/unified/components/rule-editor/RecordingRuleEditor.tsx @@ -68,8 +68,11 @@ export const RecordingRuleEditor: FC = ({ datasource: changedQuery.datasource, refId: changedQuery.refId, editorMode: changedQuery.editorMode, - instant: Boolean(changedQuery.instant), - range: Boolean(changedQuery.range), + // Instant and range are used by Prometheus queries + instant: changedQuery.instant, + range: changedQuery.range, + // Query type is used by Loki queries + queryType: changedQuery.queryType, legendFormat: changedQuery.legendFormat, }, };