mirror of
https://git.mirrors.martin98.com/https://github.com/SigNoz/signoz
synced 2025-08-14 09:05:55 +08:00
fix: re add threshold for promql alerts (#6355)
This commit is contained in:
parent
db4338be42
commit
5005923ef4
@ -386,32 +386,31 @@ function RuleOptions({
|
|||||||
renderThresholdRuleOpts()}
|
renderThresholdRuleOpts()}
|
||||||
|
|
||||||
<Space direction="vertical" size="large">
|
<Space direction="vertical" size="large">
|
||||||
{queryCategory !== EQueryType.PROM &&
|
{ruleType !== AlertDetectionTypes.ANOMALY_DETECTION_ALERT && (
|
||||||
ruleType !== AlertDetectionTypes.ANOMALY_DETECTION_ALERT && (
|
<Space direction="horizontal" align="center">
|
||||||
<Space direction="horizontal" align="center">
|
<Form.Item noStyle name={['condition', 'target']}>
|
||||||
<Form.Item noStyle name={['condition', 'target']}>
|
<InputNumber
|
||||||
<InputNumber
|
addonBefore={t('field_threshold')}
|
||||||
addonBefore={t('field_threshold')}
|
value={alertDef?.condition?.target}
|
||||||
value={alertDef?.condition?.target}
|
onChange={onChange}
|
||||||
onChange={onChange}
|
type="number"
|
||||||
type="number"
|
onWheel={(e): void => e.currentTarget.blur()}
|
||||||
onWheel={(e): void => e.currentTarget.blur()}
|
/>
|
||||||
/>
|
</Form.Item>
|
||||||
</Form.Item>
|
|
||||||
|
|
||||||
<Form.Item noStyle>
|
<Form.Item noStyle>
|
||||||
<Select
|
<Select
|
||||||
getPopupContainer={popupContainer}
|
getPopupContainer={popupContainer}
|
||||||
allowClear
|
allowClear
|
||||||
showSearch
|
showSearch
|
||||||
options={categorySelectOptions}
|
options={categorySelectOptions}
|
||||||
placeholder={t('field_unit')}
|
placeholder={t('field_unit')}
|
||||||
value={alertDef.condition.targetUnit}
|
value={alertDef.condition.targetUnit}
|
||||||
onChange={onChangeAlertUnit}
|
onChange={onChangeAlertUnit}
|
||||||
/>
|
/>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
</Space>
|
</Space>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
<Collapse>
|
<Collapse>
|
||||||
<Collapse.Panel header={t('More options')} key="1">
|
<Collapse.Panel header={t('More options')} key="1">
|
||||||
|
Loading…
x
Reference in New Issue
Block a user