Bump grafana-sdk, update AddRow() signature and add new configs to panel options#1898
Bump grafana-sdk, update AddRow() signature and add new configs to panel options#1898
Conversation
|
👋 chudilka1, thanks for creating this pull request! To help reviewers, please consider creating future PRs as drafts first. This allows you to self-review and make any final changes before notifying the team. Once you're ready, you can mark it as "Ready for review" to request feedback. Thanks! |
|
There was a problem hiding this comment.
Pull request overview
This PR updates the Grafana Foundation SDK dependency and extends the internal dashboard/panel builders to support newly available configuration options and row behaviors.
Changes:
- Bump
github.com/grafana/grafana-foundation-sdk/gotov0.0.12. - Add
AddCollapsedRow()to allow creating collapsed dashboard rows. - Introduce
FieldMinMaxonPanelOptionsand wire it into multiple panel builders.
Reviewed changes
Copilot reviewed 3 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| observability-lib/grafana/panels.go | Adds FieldMinMax to PanelOptions and propagates it into several panel builder constructors. |
| observability-lib/grafana/builder.go | Adds AddCollapsedRow() that creates a row with Collapsed(true). |
| observability-lib/go.mod | Updates Grafana Foundation SDK requirement to v0.0.12. |
| observability-lib/go.sum | Updates checksums to match the new SDK version. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
observability-lib/grafana/builder.go
Outdated
| func (b *Builder) AddCollapsedRow(title string) { | ||
| b.dashboardBuilder.WithRow(dashboard.NewRowBuilder(title).Collapsed(true)) |
There was a problem hiding this comment.
This accomplishes what we need, but if we can find an elegant way to expose the underlying row builder API more directly, then we won't have to mirror every single thing in this wrapper to expose them each.
b798363 to
6c311f0
Compare
Uh oh!
There was an error while loading. Please reload this page.