Skip to content

SigNoz is an open-source, OpenTelemetry-native observability platform for your team and their AI agents. Get logs, metrics, and traces in one tool with features like APM, distributed tracing, log management, infra monitoring, etc. Combined with SigNoz MCP and a native AI teammate (in SigNoz Cloud) it helps you build more resilient apps.

refactor: global time range for promql query (#3935)

Rajat Dabadee4ef137c7278
diff --git a/frontend/src/container/FormAlertRules/index.tsx b/frontend/src/container/FormAlertRules/index.tsx
index 023d6fc294..7b80b2150c 100644
--- a/frontend/src/container/FormAlertRules/index.tsx
+++ b/frontend/src/container/FormAlertRules/index.tsx
@@ -369,21 +369,7 @@ function FormAlertRules({
/>
);
- const renderPromChartPreview = (): JSX.Element => (
- <ChartPreview
- headline={
- <PlotTag
- queryType={currentQuery.queryType}
- panelType={panelType || PANEL_TYPES.TIME_SERIES}
- />
- }
- name="Chart Preview"
- query={stagedQuery}
- alertDef={alertDef}
- />
- );
-
- const renderChQueryChartPreview = (): JSX.Element => (
+ const renderPromAndChQueryChartPreview = (): JSX.Element => (
<ChartPreview
headline={
<PlotTag
@@ -431,9 +417,10 @@ function FormAlertRules({
>
{currentQuery.queryType === EQueryType.QUERY_BUILDER &&
renderQBChartPreview()}
- {currentQuery.queryType === EQueryType.PROM && renderPromChartPreview()}
+ {currentQuery.queryType === EQueryType.PROM &&
+ renderPromAndChQueryChartPreview()}
{currentQuery.queryType === EQueryType.CLICKHOUSE &&
- renderChQueryChartPreview()}
+ renderPromAndChQueryChartPreview()}
<StepContainer>
<BuilderUnitsFilter onChange={onUnitChangeHandler} />