Skip to content

Commit

Permalink
fix(K-Phoen/grabana#238): added RepeatDirection as first step for inc…
Browse files Browse the repository at this point in the history
…lude it to grabana
  • Loading branch information
Fabian Simon committed Dec 15, 2023
1 parent e77b635 commit 9814454
Showing 1 changed file with 18 additions and 9 deletions.
27 changes: 18 additions & 9 deletions panel.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit 9814454

Please sign in to comment.