feat(tasks): 任务列表新增漏洞数量列,描述/目标列收窄

- 任务列表接口 TaskListMetricsAll 批量统计每任务的漏洞数(findings 表,
  按 task_id),经 TaskDTO.findings 下发;列表页新增「漏洞」列,>0 高亮
- 描述/目标列宽 max-w-xs → max-w-40,目标列补 title 悬浮全文
- mock data/handler 同步补 findings 字段
This commit is contained in:
Autumn-27 committed 2026-09-24 13:26:22 -04:00
1 parent 9bc8d16a0b
commit e65d3e5202
7 files changed
+27 -3

No files matched your search

+1
View File
@@ -51,6 +51,7 @@ type TaskDTO struct {
GoalsTotal int `json:"goals_total"`
GoalsMet int `json:"goals_met"`
InFlight int `json:"in_flight"` // 运行中 Worker 数(state=running 的意图)
Findings int `json:"findings"` // 该任务已登记的漏洞数(findings 表)
LLMProfileID *int64 `json:"llm_profile_id,omitempty"` // LLM profile used for this task; nil = default
LLMProfileIDs []int64 `json:"llm_profile_ids"`
ActiveLLMProfileID *int64 `json:"active_llm_profile_id,omitempty"`
+1
View File
@@ -1040,6 +1040,7 @@ func (s *Server) listTasks(w http.ResponseWriter, r *http.Request) {
dto.GoalsTotal = metric.Goals.Total
dto.GoalsMet = metric.Goals.Met
dto.InFlight = metric.RunningIntents
dto.Findings = metric.Findings
dtos = append(dtos, dto)
}
writeJSON(w, 200, map[string]any{"tasks": dtos, "active": active})