Skip to content

Conversation

@isabelfaulds
Copy link

@isabelfaulds isabelfaulds commented Jan 13, 2026

Changes

Grafana Wrapper has AddPanel currently (which would add to row if defined, else panels). These updates add AddPanelToRow. No changes were needed for current dashboards. This makes it easier to switch back and forth between rows of multiple panels & stand alone panels.

Test Example Before Changes

Also if AddPanel() is used first, and Addrow() AddPanel() later then the initial AddPanels() might not get shown. This update prevents that from happening.
For example,
image

Test Example After Changes

After changes the gauge chart is no longer hidden and CPU Usage isn't placed into same row
image

SSH Tunnel Health Example After Changes

image
  • Other tested dashboards, like SSH Tunnel Health, not impacted

@isabelfaulds isabelfaulds force-pushed the grafana-wrapper-addpanel branch from e13e5c1 to fd49949 Compare January 15, 2026 20:28
@isabelfaulds
Copy link
Author

Test Example Dashboard Script After Changes
example.dashboard.py

@isabelfaulds
Copy link
Author

Test Example Dashboard Script Before Changes

example.dashboard.py

stacking,
extraJson)

row_or_panel = self.rows[-1].panels if self.rows else self.panels
Copy link
Contributor

@luuisabelle luuisabelle Jan 16, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

assuming this new update doesn't allow for standalone panels w/o rows, we can probably simplify this to just

self.rows[-1].panels.append(panel)

extraJson=None,
):
'''
Add panel to latest defined row
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe change this to "Add panel under a new defined row" for more clarity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants