feat(monitor): F5 链路追踪后端对接 — traceApi mock桩改真实Jaeger/Tempo代理+demo兜底
- 后端新增 monitor_trace_datasources 表 + TraceDataSource 模型 (Jaeger/Tempo) - controller/trace_datasource.go — CRUD + TestConnection + SetDefault (7 路由) - controller/trace_proxy.go — Jaeger API 代理 + 响应格式转换 (Trace/服务/Span) - GET /traces — Trace 列表 (代理 Jaeger /api/traces) - GET /traces/services — 服务列表 + P95/P99/errorRate 聚合 - GET /traces/:traceId — Trace 详情 (Span 树转换) - Demo 数据兜底: 无数据源时返回模拟数据 (6 Trace + 5 服务 + 5 Span) - 前端 traceApi 从 mock 改真实 HTTP 调用 - 前端新增 trace-datasource.ts 数据源管理 API - ROADMAP/TDD_PLAN/PROJECT_EVALUATION 文档同步更新 - 综合评分 90→91, 功能完整性 92→94 (mock API 清零)
This commit is contained in:
1 parent
0c2c0adaaf
commit
894cb16a05
23 files changed
+1085
-52
No files matched your search
@@ -70,6 +70,7 @@ func (h *AlertHandler) CreateRule(c *gin.Context) {
|
||||
Expression: req.Expression,
|
||||
Severity: req.Severity,
|
||||
Duration: req.Duration,
|
||||
DatasourceID: req.DatasourceID,
|
||||
Labels: req.Labels,
|
||||
Annotations: req.Annotations,
|
||||
NotifyChannels: toJSON(req.NotifyChannels),
|
||||
@@ -139,6 +140,9 @@ func (h *AlertHandler) UpdateRule(c *gin.Context) {
|
||||
if req.Duration > 0 {
|
||||
updates["duration"] = req.Duration
|
||||
}
|
||||
if req.DatasourceID > 0 {
|
||||
updates["datasource_id"] = req.DatasourceID
|
||||
}
|
||||
if req.Labels != "" {
|
||||
updates["labels"] = req.Labels
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user