From 0cbba071ea19458fa4a1f8769acebdf1871571e4 Mon Sep 17 00:00:00 2001 From: Amol Umbark Date: Fri, 25 Nov 2022 16:04:09 +0530 Subject: [PATCH] fix: [alerts] fixed selected interval for chart preview in ch use case (#1761) --- frontend/src/container/FormAlertRules/index.tsx | 1 + frontend/src/container/FormAlertRules/utils.ts | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/frontend/src/container/FormAlertRules/index.tsx b/frontend/src/container/FormAlertRules/index.tsx index a0791a4aa1..9f91aed088 100644 --- a/frontend/src/container/FormAlertRules/index.tsx +++ b/frontend/src/container/FormAlertRules/index.tsx @@ -468,6 +468,7 @@ function FormAlertRules({ threshold={alertDef.condition?.target} query={manualStagedQuery} userQueryKey={runQueryId} + selectedInterval={toChartInterval(alertDef.evalWindow)} /> ); }; diff --git a/frontend/src/container/FormAlertRules/utils.ts b/frontend/src/container/FormAlertRules/utils.ts index 9e6ec66d07..f759d0e37e 100644 --- a/frontend/src/container/FormAlertRules/utils.ts +++ b/frontend/src/container/FormAlertRules/utils.ts @@ -135,7 +135,7 @@ export const toChartInterval = (evalWindow: string | undefined): Time => { case '30m0s': return '30min'; case '60m0s': - return '30min'; + return '1hr'; case '4h0m0s': return '4hr'; case '24h0m0s':