mirror of
https://github.com/mblanke/ThreatHunt.git
synced 2026-03-01 05:50:21 -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.
41 lines
2.0 KiB
Python
41 lines
2.0 KiB
Python
from pathlib import Path
|
|
p=Path(r'd:/Projects/Dev/ThreatHunt/frontend/src/components/AUPScanner.tsx')
|
|
t=p.read_text(encoding='utf-8')
|
|
t=t.replace(' const [scanHunts, setScanHunts] = useState(true);',' const [scanHunts, setScanHunts] = useState(false);')
|
|
t=t.replace(' const [scanAnnotations, setScanAnnotations] = useState(true);',' const [scanAnnotations, setScanAnnotations] = useState(false);')
|
|
t=t.replace(' const [scanMessages, setScanMessages] = useState(true);',' const [scanMessages, setScanMessages] = useState(false);')
|
|
t=t.replace(' scan_messages: scanMessages,\n });',' scan_messages: scanMessages,\n prefer_cache: true,\n });')
|
|
# add cache chip in summary alert
|
|
old=''' {scanResult && (
|
|
<Alert severity={scanResult.total_hits > 0 ? 'warning' : 'success'} sx={{ py: 0.5 }}>
|
|
<strong>{scanResult.total_hits}</strong> hits across{' '}
|
|
<strong>{scanResult.rows_scanned}</strong> rows |{' '}
|
|
{scanResult.themes_scanned} themes, {scanResult.keywords_scanned} keywords scanned
|
|
</Alert>
|
|
)}
|
|
'''
|
|
new=''' {scanResult && (
|
|
<Alert severity={scanResult.total_hits > 0 ? 'warning' : 'success'} sx={{ py: 0.5 }}>
|
|
<strong>{scanResult.total_hits}</strong> hits across{' '}
|
|
<strong>{scanResult.rows_scanned}</strong> rows |{' '}
|
|
{scanResult.themes_scanned} themes, {scanResult.keywords_scanned} keywords scanned
|
|
{scanResult.cache_status && (
|
|
<Chip
|
|
size="small"
|
|
label={scanResult.cache_status === 'hit' ? 'Cached' : 'Live'}
|
|
sx={{ ml: 1, height: 20 }}
|
|
color={scanResult.cache_status === 'hit' ? 'success' : 'default'}
|
|
variant="outlined"
|
|
/>
|
|
)}
|
|
</Alert>
|
|
)}
|
|
'''
|
|
if old in t:
|
|
t=t.replace(old,new)
|
|
else:
|
|
print('warning: summary block not replaced')
|
|
|
|
p.write_text(t,encoding='utf-8')
|
|
print('updated AUPScanner.tsx')
|