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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user