community-plugins icon indicating copy to clipboard operation
community-plugins copied to clipboard

feat(grafana): Use pagination for Grafana Dashboard search

Open robbat2 opened this issue 5 months ago • 1 comments

Grafana's Search API endpoint applies a default of limit of 1000 results - cutting off any dashboards past that point. Implement a trivial pagination wrapper to support further fetching.

Keep the default behavior the same - integrators must opt-in by setting grafanaDashboardMaxPages & grafanaDashboardSearchLimit.

Integrators with 1000-5000 Grafana dashboards may want to just raise grafanaDashboardSearchLimit, rather than using pagination. Over 5000 dashboards, pagination must be used.

Completes the earlier proposal in PR#3909.

Signed-off-by: Robin H. Johnson [email protected] Reference: https://github.com/backstage/community-plugins/issues/3735#issuecomment-2832849034 Reference: https://github.com/backstage/community-plugins/pull/3909

:heavy_check_mark: Checklist

  • [X] A changeset describing the change and affected packages. (more info)
  • [X] Added or updated documentation
  • [N/A] Tests for new functionality and regression tests for bug fixes: this functionality was never tested in the plugin previously
  • [ ] Screenshots attached (for UI changes)
  • [X] All your commits have a Signed-off-by line in the message. (more info)

robbat2 avatar Nov 23 '25 19:11 robbat2

Changed Packages

Package Name Package Path Changeset Bump Current Version
@backstage-community/plugin-grafana workspaces/grafana/plugins/grafana minor v0.11.0

backstage-goalie[bot] avatar Nov 23 '25 19:11 backstage-goalie[bot]

Thank you @robbat2, it looks good to me. Hopefully in the future we can have full search server side, but for now this is a good way to unblock you 👍

vinzscam avatar Dec 08 '25 16:12 vinzscam