Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions grafana/dashboard.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ type Panel struct {
Type string
Title string
GridPos GridPos
Panels []Panel
}

// Panel represents a Grafana dashboard panel position
Expand Down Expand Up @@ -124,8 +125,18 @@ func populatePanelsFromV4JSON(dash Dashboard, dc dashContainer) Dashboard {
func populatePanelsFromV5JSON(dash Dashboard, dc dashContainer) Dashboard {
for _, p := range dc.Dashboard.Panels {
if p.Type == "row" {
if len(p.Panels) == 0 {
continue
}

for _, rowPanel := range p.Panels {
rowPanel.Title = sanitizeLaTexInput(rowPanel.Title)
dash.Panels = append(dash.Panels, rowPanel)
}

continue
}

p.Title = sanitizeLaTexInput(p.Title)
dash.Panels = append(dash.Panels, p)
}
Expand Down