mirror of
https://github.com/mblanke/ThreatHunt.git
synced 2026-03-01 14:00:20 -05:00
- Implemented PlaybookManager for creating and managing investigation playbooks with templates. - Added SavedSearches component for managing bookmarked queries and recurring scans. - Introduced TimelineView for visualizing forensic event timelines with zoomable charts. - Enhanced backend processing with auto-queued jobs for dataset uploads and improved database concurrency. - Updated frontend components for better user experience and performance optimizations. - Documented changes in update log for future reference.
14 lines
647 B
Python
14 lines
647 B
Python
from pathlib import Path
|
|
|
|
p = Path(r"d:\Projects\Dev\ThreatHunt\frontend\src\components\NetworkMap.tsx")
|
|
text = p.read_text(encoding="utf-8")
|
|
|
|
anchor = " useEffect(() => { canvasSizeRef.current = canvasSize; }, [canvasSize]);\n"
|
|
insert = anchor + "\n const sleep = (ms: number) => new Promise<void>(resolve => setTimeout(resolve, ms));\n"
|
|
if "const sleep = (ms: number)" not in text and anchor in text:
|
|
text = text.replace(anchor, insert)
|
|
|
|
text = text.replace("await new Promise(r => setTimeout(r, delayMs + jitter));", "await sleep(delayMs + jitter);")
|
|
|
|
p.write_text(text, encoding="utf-8")
|
|
print("Patched sleep helper + polling awaits") |