Always return colors for single stat graphs
Addresses a change that requires single stat graphs to have an array of colors, specifically in the case of canned dashboards. An empty array is acceptable but an undefined value will break the page. Closes #2862 Closes #2841pull/10616/head
parent
b2e8612c64
commit
620aa7a518
|
@ -56,6 +56,7 @@
|
|||
]
|
||||
}
|
||||
],
|
||||
"colors": [],
|
||||
"type": "single-stat"
|
||||
},
|
||||
{
|
||||
|
@ -73,6 +74,7 @@
|
|||
]
|
||||
}
|
||||
],
|
||||
"colors": [],
|
||||
"type": "single-stat"
|
||||
},
|
||||
{
|
||||
|
|
|
@ -117,6 +117,7 @@
|
|||
"h": 4,
|
||||
"i": "0fa47984-825b-46f1-9ca5-0366e3220008",
|
||||
"name": "Mesos Master Uptime",
|
||||
"colors": [],
|
||||
"type": "single-stat",
|
||||
"queries": [
|
||||
{
|
||||
|
|
|
@ -572,15 +572,16 @@ type DashboardsStore interface {
|
|||
|
||||
// Cell is a rectangle and multiple time series queries to visualize.
|
||||
type Cell struct {
|
||||
X int32 `json:"x"`
|
||||
Y int32 `json:"y"`
|
||||
W int32 `json:"w"`
|
||||
H int32 `json:"h"`
|
||||
I string `json:"i"`
|
||||
Name string `json:"name"`
|
||||
Queries []Query `json:"queries"`
|
||||
Axes map[string]Axis `json:"axes"`
|
||||
Type string `json:"type"`
|
||||
X int32 `json:"x"`
|
||||
Y int32 `json:"y"`
|
||||
W int32 `json:"w"`
|
||||
H int32 `json:"h"`
|
||||
I string `json:"i"`
|
||||
Name string `json:"name"`
|
||||
Queries []Query `json:"queries"`
|
||||
Axes map[string]Axis `json:"axes"`
|
||||
Type string `json:"type"`
|
||||
CellColors []CellColor `json:"colors"`
|
||||
}
|
||||
|
||||
// Layout is a collection of Cells for visualization
|
||||
|
|
Loading…
Reference in New Issue