feat(grafana): Use pagination for Grafana Dashboard search
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-byline in the message. (more info)
Changed Packages
| Package Name | Package Path | Changeset Bump | Current Version |
|---|---|---|---|
| @backstage-community/plugin-grafana | workspaces/grafana/plugins/grafana | minor | v0.11.0 |
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 👍