Skip to content
Open
Show file tree
Hide file tree
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
8 changes: 8 additions & 0 deletions dashboard.go
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,7 @@ type Dashboards struct {

type ChartAttributes struct {
DashboardLinks DashboardLinks `json:"dashboardLinks,omitempty"`
DashboardLayout DashboardLayout `json:"dashboardLayout,omitempty"`
}

type DashboardLinks struct {
Expand All @@ -252,6 +253,13 @@ type DashboardLink struct {
Destination string `json:"destination,omitempty"`
}

type DashboardLayout struct {
X int `json:"x,omitempty"`
Y int `json:"y,omitempty"`
H int `json:"h,omitempty"`
W int `json:"w,omitempty"`
}

const baseDashboardPath = "/api/v2/dashboard"

// UnmarshalJSON is a custom JSON unmarshaller for an Dashboard, used in order to
Expand Down
6 changes: 6 additions & 0 deletions fixtures/paginated-dashboard-0.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,12 @@
"*": {
"destination": "/dashboards/test-url"
}
},
"dashboardLayout": {
"x": 0,
"y": 0,
"h": 5,
"w": 12
}
},
"summarization": "MEAN"
Expand Down