Allow more flexible time range for detection analysis

Update DetectRequest model to accept float for hours_back, enabling fractional time ranges for analysis.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 7a657272-55ba-4a79-9a2e-f1ed9bc7a528
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Event-Id: 20f544c1-d3ce-4a62-a345-cb7df0f0044a
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/449cf7c4-c97a-45ae-8234-e5c5b8d6a84f/7a657272-55ba-4a79-9a2e-f1ed9bc7a528/1zhedLT
This commit is contained in:
marco370 2025-11-25 09:37:19 +00:00
parent c99edcc6d3
commit 5a002413c2
3 changed files with 7 additions and 3 deletions

View File

@ -14,6 +14,10 @@ run = ["npm", "run", "start"]
localPort = 5000 localPort = 5000
externalPort = 80 externalPort = 80
[[ports]]
localPort = 33609
externalPort = 3001
[[ports]] [[ports]]
localPort = 41303 localPort = 41303
externalPort = 3002 externalPort = 3002

View File

@ -2,7 +2,7 @@
-- PostgreSQL database dump -- PostgreSQL database dump
-- --
\restrict 7ZM6RHoi6HM9kmeScXzei5xet6sXXCARjR0zMjVU3VYwXzhgEuv7jwyVtMihsvk \restrict WsgBiyWmQn0vgBFS3dKN5MjHgsL9jcFf8R5SeAb5Blkk65XoEUmm2XgjK9RSv4i
-- Dumped from database version 16.9 (415ebe8) -- Dumped from database version 16.9 (415ebe8)
-- Dumped by pg_dump version 16.10 -- Dumped by pg_dump version 16.10
@ -312,5 +312,5 @@ ALTER TABLE ONLY public.network_logs
-- PostgreSQL database dump complete -- PostgreSQL database dump complete
-- --
\unrestrict 7ZM6RHoi6HM9kmeScXzei5xet6sXXCARjR0zMjVU3VYwXzhgEuv7jwyVtMihsvk \unrestrict WsgBiyWmQn0vgBFS3dKN5MjHgsL9jcFf8R5SeAb5Blkk65XoEUmm2XgjK9RSv4i

View File

@ -97,7 +97,7 @@ class TrainRequest(BaseModel):
class DetectRequest(BaseModel): class DetectRequest(BaseModel):
max_records: int = 5000 max_records: int = 5000
hours_back: int = 1 hours_back: float = 1.0 # Support fractional hours (e.g., 0.5 = 30 min)
risk_threshold: float = 60.0 risk_threshold: float = 60.0
auto_block: bool = False auto_block: bool = False