Skip to content

Commit

Permalink
Merge pull request #6 from piggito/master
Browse files Browse the repository at this point in the history
Add templating parameter to allow setting dashboard variables
  • Loading branch information
ahuret authored Oct 20, 2023
2 parents a510f89 + 4d01335 commit 6852ce0
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions dashboards.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ type Dashboard struct {
Annotations *Annotations `json:"annotations,omitempty"`
Panels []interface{} `json:"panels,omitempty"`
Time *Time `json:"time,omitempty"`
Templating *Templating `json:"templating,omitempty"`
}

type DashboardResult struct {
Expand All @@ -43,6 +44,10 @@ type Time struct {
To string `json:"to"`
}

type Templating struct {
List []interface{} `json:"list"`
}

func (s *DashboardsService) GetDashboardByUID(uid string) (*DashboardResult, *Response, error) {
u := fmt.Sprintf("dashboards/uid/%s", uid)

Expand Down

0 comments on commit 6852ce0

Please sign in to comment.