feat: 发现页支持按任务筛选/行内看报告与改名称类别严重度;任务列表输入去卡顿
- 发现列表新增「按任务」下拉(有漏洞的任务+条数),task_id 下推 SQL 筛选 - 展开行懒加载并渲染详细报告(Markdown),修 table 溢出:table-fixed + whitespace-normal + break-words + pre 换行 - 展开行前置「名称/类别/严重等级」可编辑并保存:patchFinding 增 name/vulnclass, DB 抽 setFindingCol 同步节点 payload - 详情页状态区加「漏洞 ID」,列表证据行去掉裸 id - 任务新建表单拆出独立组件消除输入卡顿;轮询 3s→10s+去重,时长 tick 仅 running 时跑
This commit is contained in:
1 parent
24a94cf8e5
commit
d9474814b5
6 files changed
+719
-378
No files matched your search
@@ -254,6 +254,11 @@ export const api = {
|
||||
patch<Finding>(`/exploration/findings/${id}`, { status }),
|
||||
setFindingSeverity: (id: string, severity: Severity) =>
|
||||
patch<Finding>(`/exploration/findings/${id}`, { severity }),
|
||||
// 一次保存漏洞的名称/类别/严重等级(发现列表行内编辑用),只传出现的字段。
|
||||
updateFinding: (
|
||||
id: string,
|
||||
fields: { name?: string; vulnclass?: string; severity?: Severity; status?: FindingStatus },
|
||||
) => patch<Finding>(`/exploration/findings/${id}`, fields),
|
||||
intents: (task?: string) => get<TaskNode[]>(`/exploration/intents${tq(task)}`).then(arr),
|
||||
tokenStats: (task?: string) =>
|
||||
get<{ workers: TokenUsage[]; total: TokenTotal }>(`/exploration/tokens${tq(task)}`).then((r) => ({
|
||||
|
||||
@@ -292,6 +292,15 @@ export interface FindingStats {
|
||||
medium: number;
|
||||
low: number;
|
||||
vulnclasses: string[];
|
||||
tasks: FindingTaskOption[];
|
||||
}
|
||||
|
||||
// FindingTaskOption 是发现页「按任务」筛选下拉的一项:有漏洞的任务(描述为空表示任务已删除,
|
||||
// 前端回退展示 id)及其漏洞条数。
|
||||
export interface FindingTaskOption {
|
||||
id: number;
|
||||
description: string;
|
||||
count: number;
|
||||
}
|
||||
|
||||
// FindingQuery 是发现列表分页/筛选/排序参数。
|
||||
@@ -301,6 +310,7 @@ export interface FindingQuery {
|
||||
severity?: "all" | Severity;
|
||||
status?: "all" | FindingStatus;
|
||||
vulnclass?: string;
|
||||
task?: string; // 任务 id;"all"/空 = 不按任务筛选
|
||||
sort?: "severity" | "time";
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user