From 13bd9ec9e0cb5ba3394eb69ac8a81f2cb1725fe7 Mon Sep 17 00:00:00 2001 From: mblanke Date: Mon, 23 Feb 2026 14:35:49 -0500 Subject: [PATCH] feat: Add Playbook Manager, Saved Searches, and Timeline View components - 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. --- .gitignore | 26 +++++++++++++++----------- backend/app/main.py | 9 +++++++++ scripts/dev-up.cmd | 4 ++++ scripts/dev-up.ps1 | 6 +++--- 4 files changed, 31 insertions(+), 14 deletions(-) create mode 100644 scripts/dev-up.cmd diff --git a/.gitignore b/.gitignore index 3cb1044..a6df585 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,4 @@ -# ── Python ──────────────────────────────────── +# ── Python ──────────────────────────────────── __pycache__/ *.py[cod] *$py.class @@ -8,34 +8,34 @@ build/ *.egg .eggs/ -# ── Virtual environments ───────────────────── +# ── Virtual environments ───────────────────── venv/ .venv/ env/ -# ── IDE / Editor ───────────────────────────── +# ── IDE / Editor ───────────────────────────── .vscode/ .idea/ *.swp *.swo *~ -# ── OS ──────────────────────────────────────── +# ── OS ──────────────────────────────────────── .DS_Store Thumbs.db -# ── Environment / Secrets ──────────────────── +# ── Environment / Secrets ──────────────────── .env *.env.local -# ── Database ───────────────────────────────── +# ── Database ───────────────────────────────── *.db *.sqlite3 -# ── Uploads ────────────────────────────────── +# ── Uploads ────────────────────────────────── uploads/ -# ── Node / Frontend ────────────────────────── +# ── Node / Frontend ────────────────────────── node_modules/ frontend/build/ frontend/.env.local @@ -43,14 +43,18 @@ npm-debug.log* yarn-debug.log* yarn-error.log* -# ── Docker ─────────────────────────────────── +# ── Docker ─────────────────────────────────── docker-compose.override.yml -# ── Test / Coverage ────────────────────────── +# ── Test / Coverage ────────────────────────── .coverage htmlcov/ .pytest_cache/ .mypy_cache/ -# ── Alembic ────────────────────────────────── +# ── Alembic ────────────────────────────────── alembic/versions/*.pyc + +*.db-wal +*.db-shm + diff --git a/backend/app/main.py b/backend/app/main.py index 47a08dd..96d66b6 100644 --- a/backend/app/main.py +++ b/backend/app/main.py @@ -196,3 +196,12 @@ async def root(): "openwebui": settings.OPENWEBUI_URL, }, } + + +@app.get("/health", tags=["health"]) +async def health(): + return { + "service": "ThreatHunt API", + "version": settings.APP_VERSION, + "status": "ok", + } diff --git a/scripts/dev-up.cmd b/scripts/dev-up.cmd new file mode 100644 index 0000000..3fddac1 --- /dev/null +++ b/scripts/dev-up.cmd @@ -0,0 +1,4 @@ +@echo off +setlocal +powershell -ExecutionPolicy Bypass -File "%~dp0dev-up.ps1" %* +exit /b %errorlevel% diff --git a/scripts/dev-up.ps1 b/scripts/dev-up.ps1 index e046a22..f426075 100644 --- a/scripts/dev-up.ps1 +++ b/scripts/dev-up.ps1 @@ -37,11 +37,11 @@ Write-Step 'Container status' docker compose ps Write-Step 'Health checks' -$backendOk = Wait-Http200 -url 'http://localhost:8000/openapi.json' -timeoutSeconds $HealthTimeoutSeconds +$backendOk = Wait-Http200 -url 'http://localhost:8000/health' -timeoutSeconds $HealthTimeoutSeconds $frontendOk = if ($BackendOnly) { $true } else { Wait-Http200 -url 'http://localhost:3000/' -timeoutSeconds $HealthTimeoutSeconds } if (-not $backendOk) { - Write-Error 'Backend health check failed: http://localhost:8000/openapi.json did not return HTTP 200 in time.' + Write-Error 'Backend health check failed: http://localhost:8000/health did not return HTTP 200 in time.' exit 1 } if (-not $frontendOk) { @@ -50,7 +50,7 @@ if (-not $frontendOk) { } Write-Step 'All good' -Write-Host 'Backend: http://localhost:8000/openapi.json (OK)' -ForegroundColor Green +Write-Host 'Backend: http://localhost:8000/health (OK)' -ForegroundColor Green if (-not $BackendOnly) { Write-Host 'Frontend: http://localhost:3000/ (OK)' -ForegroundColor Green }