From 63df11b729c69762cbf8e62aae06de125c094da1 Mon Sep 17 00:00:00 2001 From: Ludovic Viaud Date: Fri, 16 Dec 2022 15:09:47 +0100 Subject: [PATCH] Prometheus: Hide query section when empty (#60304) --- .../prometheus/querybuilder/components/QueryPreview.tsx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/public/app/plugins/datasource/prometheus/querybuilder/components/QueryPreview.tsx b/public/app/plugins/datasource/prometheus/querybuilder/components/QueryPreview.tsx index 815a4140e0c..048c6085a67 100644 --- a/public/app/plugins/datasource/prometheus/querybuilder/components/QueryPreview.tsx +++ b/public/app/plugins/datasource/prometheus/querybuilder/components/QueryPreview.tsx @@ -10,6 +10,10 @@ export interface Props { } export function QueryPreview({ query }: Props) { + if (!query) { + return null; + } + return (