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.
43 lines
1.9 KiB
Python
43 lines
1.9 KiB
Python
from pathlib import Path
|
|
p=Path(r'd:/Projects/Dev/ThreatHunt/frontend/src/components/FileUpload.tsx')
|
|
t=p.read_text(encoding='utf-8')
|
|
marker=''' {/* Per-file progress list */}
|
|
'''
|
|
add=''' {huntId && huntProgress && (
|
|
<Paper sx={{ p: 1.5, mt: 1.5 }}>
|
|
<Stack direction="row" alignItems="center" spacing={1} sx={{ mb: 0.8 }}>
|
|
<Typography variant="body2" sx={{ fontWeight: 600 }}>
|
|
Master Processing Progress
|
|
</Typography>
|
|
<Chip
|
|
size="small"
|
|
label={huntProgress.status.toUpperCase()}
|
|
color={huntProgress.status === 'ready' ? 'success' : huntProgress.status === 'processing' ? 'warning' : 'default'}
|
|
variant="outlined"
|
|
/>
|
|
<Box sx={{ flexGrow: 1 }} />
|
|
<Typography variant="caption" color="text.secondary">
|
|
{huntProgress.progress_percent.toFixed(1)}%
|
|
</Typography>
|
|
</Stack>
|
|
<LinearProgress
|
|
variant="determinate"
|
|
value={Math.max(0, Math.min(100, huntProgress.progress_percent))}
|
|
sx={{ height: 8, borderRadius: 4 }}
|
|
/>
|
|
<Stack direction="row" spacing={1} sx={{ mt: 1 }} flexWrap="wrap" useFlexGap>
|
|
<Chip size="small" label={`Datasets ${huntProgress.dataset_completed}/${huntProgress.dataset_total}`} variant="outlined" />
|
|
<Chip size="small" label={`Active jobs ${huntProgress.active_jobs}`} variant="outlined" />
|
|
<Chip size="small" label={`Queued jobs ${huntProgress.queued_jobs}`} variant="outlined" />
|
|
<Chip size="small" label={`Network ${huntProgress.network_status}`} variant="outlined" />
|
|
</Stack>
|
|
</Paper>
|
|
)}
|
|
|
|
'''
|
|
if marker not in t:
|
|
raise SystemExit('marker not found')
|
|
t=t.replace(marker, add+marker)
|
|
p.write_text(t,encoding='utf-8')
|
|
print('inserted master progress block')
|