From 9814454c29db106c083c1558836efe25844b5780 Mon Sep 17 00:00:00 2001 From: Fabian Simon Date: Fri, 15 Dec 2023 17:18:54 +0100 Subject: [PATCH] fix(https://github.com/K-Phoen/grabana/issues/238): added RepeatDirection as first step for include it to grabana --- panel.go | 27 ++++++++++++++++++--------- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git a/panel.go b/panel.go index 5777a48..4d67219 100644 --- a/panel.go +++ b/panel.go @@ -47,6 +47,13 @@ const ( const MixedSource = "-- Mixed --" +type RepeatDirection string + +const ( + RepeatDirectionVertical RepeatDirection = "v" + RepeatDirectionHorizontal RepeatDirection = "h" +) + type ( // Panel represents panels of different types defined in Grafana. Panel struct { @@ -80,15 +87,17 @@ type ( X *int `json:"x,omitempty"` Y *int `json:"y,omitempty"` } `json:"gridPos,omitempty"` - Height interface{} `json:"height,omitempty"` // general - HideTimeOverride *bool `json:"hideTimeOverride,omitempty"` - ID uint `json:"id"` - IsNew bool `json:"isNew"` - Links []Link `json:"links,omitempty"` // general - MinSpan *float32 `json:"minSpan,omitempty"` // templating options - OfType panelType `json:"-"` // it required for defining type of the panel - Renderer *string `json:"renderer,omitempty"` // display styles - Repeat *string `json:"repeat,omitempty"` // templating options + Height interface{} `json:"height,omitempty"` // general + HideTimeOverride *bool `json:"hideTimeOverride,omitempty"` + ID uint `json:"id"` + IsNew bool `json:"isNew"` + Links []Link `json:"links,omitempty"` // general + MinSpan *float32 `json:"minSpan,omitempty"` // templating options + OfType panelType `json:"-"` // it required for defining type of the panel + Renderer *string `json:"renderer,omitempty"` // display styles + Repeat *string `json:"repeat,omitempty"` // templating options + RepeatDirection *RepeatDirection `json:"repeatDirection,omitempty"` + // RepeatIteration *int64 `json:"repeatIteration,omitempty"` RepeatPanelID *uint `json:"repeatPanelId,omitempty"` ScopedVars map[string]struct {