feat: add initial setup wizard, workload insights, and policy audit mode
CI / backend (push) Failing after 3s
CI / frontend (push) Failing after 29s

Add setup wizard with status tracking via SystemSetting model, implement /setup/status and /setup/complete endpoints to create initial admin user and optional cluster configuration, add workload insights endpoint with traffic analysis and policy matching including audit mode detection, implement enforcement_mode property on Policy model with audit/enforced states, add Modal component for dialogs, create SetupWizard page with multi
This commit is contained in:
2026-07-09 12:47:08 +02:00
parent a911d36f34
commit 3cd2c0a2f1
18 changed files with 600 additions and 79 deletions
+11 -1
View File
@@ -49,6 +49,13 @@ class TimestampMixin:
updated_at: Mapped[datetime] = mapped_column(DateTime, default=datetime.utcnow, onupdate=datetime.utcnow)
class SystemSetting(Base, TimestampMixin):
__tablename__ = "system_settings"
key: Mapped[str] = mapped_column(String(100), primary_key=True)
value: Mapped[dict] = mapped_column(JSON, default=dict)
class User(Base, TimestampMixin):
__tablename__ = "users"
@@ -212,6 +219,10 @@ class Policy(Base, TimestampMixin):
definition: Mapped[dict] = mapped_column(JSON, default=dict)
last_compiled: Mapped[dict | None] = mapped_column(JSON)
@property
def enforcement_mode(self) -> str:
return (self.definition or {}).get("enforcement_mode", "enforced")
class ServiceCatalogItem(Base, TimestampMixin):
__tablename__ = "service_catalog"
@@ -251,4 +262,3 @@ class AuditLog(Base):
user_agent: Mapped[str | None] = mapped_column(String(512))
result: Mapped[str] = mapped_column(String(100), default="success")
error_text: Mapped[str | None] = mapped_column(Text)