- 工具配置:新增卸载 API/UI、Go 工具链、流水线构建自动安装依赖 - 修复 ListTools VerifyTool 递归栈溢出导致获取工具配置失败 - Node.js Alpine 安装改用 unofficial-builds musl 预编译包与 index.json 解析 LTS - 站点拨测:详情页路由、告警自动恢复、并发拨测与默认可观测频率 - 日志中心:RBAC、查询构建器、ES/Loki 增强与审计 request/response 展示 - 发布配置:构建节点、流水线远程执行、Deploy RBAC 导航拆分
24 lines
606 B
Go
24 lines
606 B
Go
package siteprobe
|
|
|
|
import (
|
|
"time"
|
|
|
|
"ezops/model"
|
|
|
|
"gorm.io/gorm"
|
|
)
|
|
|
|
// ResolveRecoveredProbeAlerts 拨测恢复后立即关闭探测类活跃告警 // Logan.Li
|
|
func ResolveRecoveredProbeAlerts(db *gorm.DB, taskID uint, lastResult string) {
|
|
if lastResult != "success" {
|
|
return
|
|
}
|
|
now := time.Now()
|
|
db.Model(&model.SiteAlert{}).
|
|
Where("task_id = ? AND status = ? AND trigger_type IN ?",
|
|
taskID, model.SiteAlertStatusActive,
|
|
[]string{"probe_fail", "probe_timeout", "http_status_error"}).
|
|
Updates(map[string]interface{}{
|
|
"status": model.SiteAlertStatusResolved, "resolved_at": now,
|
|
})
|
|
} |