feat: Extend widget configuration for activity overview and improve validation
Deploy Development / deploy (push) Successful in 55s
Build Test / lint-backend (push) Successful in 1s
Build Test / build-frontend (push) Successful in 16s

- Added support for the "activity_overview" widget in the dashboard configuration, allowing for chart_days validation.
- Refactored validation logic to streamline error handling for both "body_overview" and "activity_overview" widgets.
- Updated the widget catalog description to reflect the new configuration options.
- Enhanced the DashboardLabPage to manage chart_days input for both widgets, improving user experience.
- Bumped app_dashboard version to 1.3.0 to reflect these enhancements.
This commit is contained in:
Lars committed 2026-04-07 12:20:23 +02:00
1 parent 4493b140bd
commit b617212145
9 files changed
+164 -60

No files matched your search

@@ -24,6 +24,17 @@ def test_body_unknown_key():
validate_widget_entry_config("body_overview", {"chart_days": 30, "extra": 1})
def test_activity_chart_days():
assert validate_widget_entry_config("activity_overview", {"chart_days": 14}) == {"chart_days": 14}
with pytest.raises(ValueError):
validate_widget_entry_config("activity_overview", {"chart_days": 5})
def test_kpi_config_rejected():
with pytest.raises(ValueError):
validate_widget_entry_config("kpi_board", {"chart_days": 30})
def test_layout_payload_with_chart_days_roundtrip():
p = DashboardLayoutPayload.model_validate(
{