You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: enhance dashboard widget configuration and query handling
- Updated README to clarify chart widget configurations and added examples for bucketed multi-resource queries.
- Refactored dashboard API error handling to normalize validation errors more effectively.
- Introduced QueryBucketConfig type for better bucket configuration management in dashboard queries.
- Improved DashboardGroup.vue and WidgetShell.vue components by replacing button elements with reusable DashboardToolbarButton and DashboardToolbarIcon components.
- Added new DashboardToolbarButton and DashboardToolbarIcon components for better UI consistency.
- Enhanced StackedBarChart.vue to include tooltip functionality for better user interaction.
- Updated endpoint definitions to mark certain actions as dangerous for superadmin only.
- Upgraded adminforth dependency to version 2.71.0 for improved functionality.
- Modified schema definitions to support histogram queries and ensure proper validation.
- Implemented bucketed query handling in widgetDataService for more flexible data retrieval.
Copy file name to clipboardExpand all lines: README.md
+43-2Lines changed: 43 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -39,7 +39,7 @@ Each widget has common fields:
39
39
| Widget target | Config field | Main settings | Data usage |
40
40
| --- | --- | --- | --- |
41
41
| `table` | `table` | `pagination`, `page_size`, `columns` | Uses `query` to display raw or aggregate rows. |
42
-
| `chart` | `chart` | `type`, `x`, `y`, `label`, `value`, `series`, `buckets`, `color`, `colors` | Uses the same `query` shape for every chart type. Multi-resource charts use `query.source:steps`. |
42
+
| `chart` | `chart` | `type`, `x`, `y`, `label`, `value`, `series`, `buckets`, `color`, `colors` | Uses the same `query` shape for most chart types. Multi-resource charts use `query.source:steps`; add `query.bucket` for shared numeric buckets across resources. |
43
43
| `kpi_card` | `card` | `value`, `subtitle`, `comparison`, `sparkline` | Reads the first returned query row. |
44
44
| `gauge_card` | `card` | `value`, `target`, `progress`, `color` | Reads the first returned query row. |
45
45
| `pivot_table` | `pivot` | `rows`, `columns`, `values` | Uses query rows to build a pivot table. |
@@ -53,7 +53,7 @@ Chart widget types:
53
53
| `bar` | Uses `x` and `y`. |
54
54
| `stacked_bar` | Uses `x`, `y`, and `series`. |
55
55
| `funnel` | Uses `label`, `value`, and optional `colors`. Data comes from the same `query` shapes as every other chart. |
56
-
| `histogram` | Uses `x`, `y`, and optional `buckets`. |
56
+
| `histogram` | Uses `x`, `y`, and optional `buckets`. Current histogram runtime support is single-resource only: provide raw rows for the numeric field and let `chart.buckets` derive counts on the frontend. For multi-resource bucket distributions, use `stacked_bar` with `query.source:steps` and `query.bucket`. |
Bucketed multi-resource queries use `query.bucket`. The dashboard runs each step once per bucket and returns rows with `label`, `name`, `resource`, and the selected aggregate aliases:
0 commit comments