feat: Add Scan History tab with rescan capability

- New Scan History tab shows all past scans
- Each scan shows: tool, target, status, timestamp, findings count
- Rescan button to quickly re-run any previous scan with same settings
- Copy command button copies scan command to clipboard and terminal
- Clear All button to purge scan history
- Relative timestamps (e.g. '5 min ago', '2 hours ago')
- Status badges: running (yellow), completed (green), failed (red)
- Backend endpoints for clearing scan history
This commit is contained in:
2025-11-28 14:55:29 -05:00
parent 707232ff83
commit 304d223a49
3 changed files with 197 additions and 0 deletions

View File

@@ -721,6 +721,14 @@ async def list_scans():
return list(scan_results.values())
@app.delete("/scans/clear")
async def clear_scans():
"""Clear all scan history."""
global scan_results
scan_results = {}
return {"status": "cleared", "message": "All scan history cleared"}
# ============== Output Parsing ==============
def parse_tool_output(tool: str, output: str) -> Dict[str, Any]: