feat: add configurable flow retention settings with super admin controls and pagination for workload flows

Add RuntimeSettingsRead/RuntimeSettingsUpdate schemas with flow_retention_hours field (1-8760 hours), implement runtime_setting helper to initialize/fetch runtime system setting with 24h default, add require_super_admin guard to validate * permission, update agent_heartbeat to use configurable retention_cutoff from runtime settings instead of hardcoded 24h, replace /settings GET endpoint to return RuntimeSettingsRead with flow_retention_hours,
This commit is contained in:
2026-07-09 22:59:31 +02:00
parent 8c59ab32d5
commit 1531b7ea47
6 changed files with 172 additions and 7 deletions
+11
View File
@@ -168,6 +168,17 @@ class FirewallApplyRequest(BaseModel):
dry_run: bool = True
class RuntimeSettingsRead(BaseModel):
product: str = "NexaFabric"
firewall_apply_requires_preview: bool = True
agent_optional: bool = True
flow_retention_hours: int = 24
class RuntimeSettingsUpdate(BaseModel):
flow_retention_hours: int = Field(ge=1, le=8760)
class ClusterRead(OrmModel):
id: str
name: str