From b03fadc2ec6c927c50254e11671c203415e05ca5 Mon Sep 17 00:00:00 2001 From: SagarRajput-7 <162284829+SagarRajput-7@users.noreply.github.com> Date: Wed, 9 Oct 2024 13:31:59 +0530 Subject: [PATCH] chore: hide promql from panel type - pie (#6140) --- .../NewWidget/LeftContainer/QuerySection/index.tsx | 2 +- frontend/src/container/NewWidget/utils.ts | 6 +----- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/frontend/src/container/NewWidget/LeftContainer/QuerySection/index.tsx b/frontend/src/container/NewWidget/LeftContainer/QuerySection/index.tsx index 71d259784a3d..d98bd25e1ca5 100644 --- a/frontend/src/container/NewWidget/LeftContainer/QuerySection/index.tsx +++ b/frontend/src/container/NewWidget/LeftContainer/QuerySection/index.tsx @@ -214,7 +214,7 @@ function QuerySection({ useEffect(() => { // switch to query builder if query type is not supported if ( - selectedGraph === PANEL_TYPES.TABLE && + (selectedGraph === PANEL_TYPES.TABLE || selectedGraph === PANEL_TYPES.PIE) && currentQuery.queryType === EQueryType.PROM ) { handleQueryCategoryChange(EQueryType.QUERY_BUILDER); diff --git a/frontend/src/container/NewWidget/utils.ts b/frontend/src/container/NewWidget/utils.ts index cd684cad785f..f8eef3157d18 100644 --- a/frontend/src/container/NewWidget/utils.ts +++ b/frontend/src/container/NewWidget/utils.ts @@ -517,11 +517,7 @@ export const PANEL_TYPE_TO_QUERY_TYPES: Record = { EQueryType.CLICKHOUSE, EQueryType.PROM, ], - [PANEL_TYPES.PIE]: [ - EQueryType.QUERY_BUILDER, - EQueryType.CLICKHOUSE, - EQueryType.PROM, - ], + [PANEL_TYPES.PIE]: [EQueryType.QUERY_BUILDER, EQueryType.CLICKHOUSE], [PANEL_TYPES.HISTOGRAM]: [ EQueryType.QUERY_BUILDER, EQueryType.CLICKHOUSE,