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.

fix: re add threshold for promql alerts (#6355)

Yunus M5005923ef47a
diff --git a/frontend/src/container/FormAlertRules/RuleOptions.tsx b/frontend/src/container/FormAlertRules/RuleOptions.tsx
index 969e34b958..e9aa8f860f 100644
--- a/frontend/src/container/FormAlertRules/RuleOptions.tsx
+++ b/frontend/src/container/FormAlertRules/RuleOptions.tsx
@@ -386,32 +386,31 @@ function RuleOptions({
renderThresholdRuleOpts()}
<Space direction="vertical" size="large">
- {queryCategory !== EQueryType.PROM &&
- ruleType !== AlertDetectionTypes.ANOMALY_DETECTION_ALERT && (
- <Space direction="horizontal" align="center">
- <Form.Item noStyle name={['condition', 'target']}>
- <InputNumber
- addonBefore={t('field_threshold')}
- value={alertDef?.condition?.target}
- onChange={onChange}
- type="number"
- onWheel={(e): void => e.currentTarget.blur()}
- />
- </Form.Item>
-
- <Form.Item noStyle>
- <Select
- getPopupContainer={popupContainer}
- allowClear
- showSearch
- options={categorySelectOptions}
- placeholder={t('field_unit')}
- value={alertDef.condition.targetUnit}
- onChange={onChangeAlertUnit}
- />
- </Form.Item>
- </Space>
- )}
+ {ruleType !== AlertDetectionTypes.ANOMALY_DETECTION_ALERT && (
+ <Space direction="horizontal" align="center">
+ <Form.Item noStyle name={['condition', 'target']}>
+ <InputNumber
+ addonBefore={t('field_threshold')}
+ value={alertDef?.condition?.target}
+ onChange={onChange}
+ type="number"
+ onWheel={(e): void => e.currentTarget.blur()}
+ />
+ </Form.Item>
+
+ <Form.Item noStyle>
+ <Select
+ getPopupContainer={popupContainer}
+ allowClear
+ showSearch
+ options={categorySelectOptions}
+ placeholder={t('field_unit')}
+ value={alertDef.condition.targetUnit}
+ onChange={onChangeAlertUnit}
+ />
+ </Form.Item>
+ </Space>
+ )}
<Collapse>
<Collapse.Panel header={t('More options')} key="1">