mirror of
https://github.com/mblanke/ThreatHunt.git
synced 2026-03-01 14:00:20 -05:00
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.
This commit is contained in:
@@ -77,6 +77,26 @@ class TestHuntEndpoints:
|
||||
assert resp.status_code == 404
|
||||
|
||||
|
||||
async def test_hunt_progress(self, client):
|
||||
create = await client.post("/api/hunts", json={"name": "Progress Hunt"})
|
||||
hunt_id = create.json()["id"]
|
||||
|
||||
# attach one dataset so progress has scope
|
||||
from tests.conftest import SAMPLE_CSV
|
||||
import io
|
||||
files = {"file": ("progress.csv", io.BytesIO(SAMPLE_CSV), "text/csv")}
|
||||
up = await client.post(f"/api/datasets/upload?hunt_id={hunt_id}", files=files)
|
||||
assert up.status_code == 200
|
||||
|
||||
res = await client.get(f"/api/hunts/{hunt_id}/progress")
|
||||
assert res.status_code == 200
|
||||
body = res.json()
|
||||
assert body["hunt_id"] == hunt_id
|
||||
assert "progress_percent" in body
|
||||
assert "dataset_total" in body
|
||||
assert "network_status" in body
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
class TestDatasetEndpoints:
|
||||
"""Test dataset upload and retrieval."""
|
||||
|
||||
Reference in New Issue
Block a user