mirror of
https://git.mirrors.martin98.com/https://github.com/SigNoz/signoz
synced 2025-08-14 16:36:17 +08:00
refactor: global time range for promql query (#3935)
This commit is contained in:
parent
dda01678e8
commit
e4ef137c72
@ -369,21 +369,7 @@ function FormAlertRules({
|
|||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
|
|
||||||
const renderPromChartPreview = (): JSX.Element => (
|
const renderPromAndChQueryChartPreview = (): 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 => (
|
|
||||||
<ChartPreview
|
<ChartPreview
|
||||||
headline={
|
headline={
|
||||||
<PlotTag
|
<PlotTag
|
||||||
@ -431,9 +417,10 @@ function FormAlertRules({
|
|||||||
>
|
>
|
||||||
{currentQuery.queryType === EQueryType.QUERY_BUILDER &&
|
{currentQuery.queryType === EQueryType.QUERY_BUILDER &&
|
||||||
renderQBChartPreview()}
|
renderQBChartPreview()}
|
||||||
{currentQuery.queryType === EQueryType.PROM && renderPromChartPreview()}
|
{currentQuery.queryType === EQueryType.PROM &&
|
||||||
|
renderPromAndChQueryChartPreview()}
|
||||||
{currentQuery.queryType === EQueryType.CLICKHOUSE &&
|
{currentQuery.queryType === EQueryType.CLICKHOUSE &&
|
||||||
renderChQueryChartPreview()}
|
renderPromAndChQueryChartPreview()}
|
||||||
|
|
||||||
<StepContainer>
|
<StepContainer>
|
||||||
<BuilderUnitsFilter onChange={onUnitChangeHandler} />
|
<BuilderUnitsFilter onChange={onUnitChangeHandler} />
|
||||||
|
Loading…
x
Reference in New Issue
Block a user