feat: Enhance Dashboard-Lab with widget catalog integration and layout updates
Deploy Development / deploy (push) Successful in 46s
Build Test / lint-backend (push) Successful in 0s
Build Test / build-frontend (push) Successful in 14s

- Integrated a new API endpoint for fetching the widget catalog in the Dashboard-Lab.
- Updated the dashboard layout schema to utilize the widget catalog for dynamic widget management.
- Refactored DashboardLabPage and PilotVizPage to leverage the new widget rendering system.
- Removed deprecated widget metadata from the frontend, streamlining the widget management process.
- Bumped app_dashboard version to 1.1.0 to reflect the new features and improvements.
This commit is contained in:
Lars committed 2026-04-07 11:47:16 +02:00
1 parent e5f6e6c10d
commit f6c5f96768
13 files changed
+275 -99

No files matched your search

+12 -17
View File
@@ -1,7 +1,7 @@
"""
Dashboard-Layout v1 (Nutzer-Lab): Validierung und Standard-Layout.
Single Source für erlaubte Widget-IDs (sync mit Frontend widgetRegistry).
Erlaubte Widget-IDs und Standard-Reihenfolge: widget_catalog.WIDGET_CATALOG
"""
from __future__ import annotations
@@ -9,27 +9,22 @@ from typing import Any, Literal
from pydantic import BaseModel, Field, model_validator
ALLOWED_WIDGET_IDS: frozenset[str] = frozenset(
{
"welcome",
"quick_capture",
"kpi_board",
"body_overview",
"activity_overview",
}
)
from widget_catalog import ALLOWED_WIDGET_IDS, WIDGET_CATALOG
# Abwärtskompatibel (Tests importieren weiterhin aus diesem Modul)
__all__ = [
"ALLOWED_WIDGET_IDS",
"DashboardLayoutPayload",
"DashboardWidgetEntry",
"coalesce_effective_layout",
"default_layout_dict",
]
def default_layout_dict() -> dict[str, Any]:
return {
"version": 1,
"widgets": [
{"id": "welcome", "enabled": True},
{"id": "quick_capture", "enabled": True},
{"id": "kpi_board", "enabled": True},
{"id": "body_overview", "enabled": True},
{"id": "activity_overview", "enabled": True},
],
"widgets": [{"id": e["id"], "enabled": True} for e in WIDGET_CATALOG],
}