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.
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/AUPScanner.tsx')
|
|
t=p.read_text(encoding='utf-8')
|
|
old='''const RESULT_COLUMNS: GridColDef[] = [
|
|
{
|
|
field: 'theme_name', headerName: 'Theme', width: 140,
|
|
renderCell: (params) => (
|
|
<Chip label={params.value} size="small"
|
|
sx={{ bgcolor: params.row.theme_color, color: '#fff', fontWeight: 600 }} />
|
|
),
|
|
},
|
|
{ field: 'keyword', headerName: 'Keyword', width: 140 },
|
|
{ field: 'source_type', headerName: 'Source', width: 120 },
|
|
{ field: 'dataset_name', headerName: 'Dataset', width: 150 },
|
|
{ field: 'field', headerName: 'Field', width: 130 },
|
|
{ field: 'matched_value', headerName: 'Matched Value', flex: 1, minWidth: 200 },
|
|
{ field: 'row_index', headerName: 'Row #', width: 80, type: 'number' },
|
|
];
|
|
'''
|
|
new='''const RESULT_COLUMNS: GridColDef[] = [
|
|
{
|
|
field: 'theme_name', headerName: 'Theme', width: 140,
|
|
renderCell: (params) => (
|
|
<Chip label={params.value} size="small"
|
|
sx={{ bgcolor: params.row.theme_color, color: '#fff', fontWeight: 600 }} />
|
|
),
|
|
},
|
|
{ field: 'keyword', headerName: 'Keyword', width: 140 },
|
|
{ field: 'dataset_name', headerName: 'Dataset', width: 170 },
|
|
{ field: 'hostname', headerName: 'Hostname', width: 170, valueGetter: (v, row) => row.hostname || '' },
|
|
{ field: 'username', headerName: 'User', width: 160, valueGetter: (v, row) => row.username || '' },
|
|
{ field: 'matched_value', headerName: 'Matched Value', flex: 1, minWidth: 220 },
|
|
{ field: 'field', headerName: 'Field', width: 130 },
|
|
{ field: 'source_type', headerName: 'Source', width: 120 },
|
|
{ field: 'row_index', headerName: 'Row #', width: 90, type: 'number' },
|
|
];
|
|
'''
|
|
if old not in t:
|
|
raise SystemExit('RESULT_COLUMNS block not found')
|
|
t=t.replace(old,new)
|
|
p.write_text(t,encoding='utf-8')
|
|
print('updated AUP results grid columns with dataset/hostname/user/matched value focus')
|