修复:告警列表状态筛选映射错误 — handled应映射CLOSED,新增processing映射CONFIRMED
This commit is contained in:
@@ -144,8 +144,8 @@ async def get_alert_page(
|
||||
):
|
||||
"""分页查询告警列表"""
|
||||
# 兼容旧接口的 status 文本转换
|
||||
if alarmStatus and alarmStatus in ("pending", "handled", "ignored"):
|
||||
status_convert = {"pending": "NEW", "handled": "CONFIRMED", "ignored": "FALSE"}
|
||||
if alarmStatus and alarmStatus in ("pending", "processing", "handled", "ignored"):
|
||||
status_convert = {"pending": "NEW", "processing": "CONFIRMED", "handled": "CLOSED", "ignored": "FALSE"}
|
||||
alarmStatus = status_convert.get(alarmStatus, alarmStatus)
|
||||
|
||||
alarms, total = service.get_alarms(
|
||||
|
||||
Reference in New Issue
Block a user