Commit f04b59e
authored
feat(observability-lib): add SortBy and SortDesc to LegendOptions (#1799)
* feat(observability-lib): add SortBy and SortDesc to LegendOptions
Expose the underlying Grafana SDK's VizLegendOptions sorting fields
to allow legend tables to be sorted by a specific calculation field
(e.g., "Last *", "Max") in ascending or descending order.
This enables dashboards to surface the most important series at the
top of the legend table, improving readability for error rate panels.
* refactor: simplify SortDesc handling per review feedback
Only set SortDesc when SortBy is specified, and pass the value directly
rather than hardcoding true.
* fix: address review comments
- Fix comment examples to match actual Grafana format ("Last *", "Max")
- Only set SortDesc when true to avoid unnecessary explicit false values1 parent 86b1030 commit f04b59e
1 file changed
+9
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
| 58 | + | |
| 59 | + | |
58 | 60 | | |
59 | 61 | | |
60 | 62 | | |
| |||
77 | 79 | | |
78 | 80 | | |
79 | 81 | | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
80 | 89 | | |
81 | 90 | | |
82 | 91 | | |
| |||
0 commit comments