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"
|
"type": "single-stat"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -73,6 +74,7 @@
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
"colors": [],
|
||||||
"type": "single-stat"
|
"type": "single-stat"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
@ -117,6 +117,7 @@
|
||||||
"h": 4,
|
"h": 4,
|
||||||
"i": "0fa47984-825b-46f1-9ca5-0366e3220008",
|
"i": "0fa47984-825b-46f1-9ca5-0366e3220008",
|
||||||
"name": "Mesos Master Uptime",
|
"name": "Mesos Master Uptime",
|
||||||
|
"colors": [],
|
||||||
"type": "single-stat",
|
"type": "single-stat",
|
||||||
"queries": [
|
"queries": [
|
||||||
{
|
{
|
||||||
|
|
|
@ -572,15 +572,16 @@ type DashboardsStore interface {
|
||||||
|
|
||||||
// Cell is a rectangle and multiple time series queries to visualize.
|
// Cell is a rectangle and multiple time series queries to visualize.
|
||||||
type Cell struct {
|
type Cell struct {
|
||||||
X int32 `json:"x"`
|
X int32 `json:"x"`
|
||||||
Y int32 `json:"y"`
|
Y int32 `json:"y"`
|
||||||
W int32 `json:"w"`
|
W int32 `json:"w"`
|
||||||
H int32 `json:"h"`
|
H int32 `json:"h"`
|
||||||
I string `json:"i"`
|
I string `json:"i"`
|
||||||
Name string `json:"name"`
|
Name string `json:"name"`
|
||||||
Queries []Query `json:"queries"`
|
Queries []Query `json:"queries"`
|
||||||
Axes map[string]Axis `json:"axes"`
|
Axes map[string]Axis `json:"axes"`
|
||||||
Type string `json:"type"`
|
Type string `json:"type"`
|
||||||
|
CellColors []CellColor `json:"colors"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// Layout is a collection of Cells for visualization
|
// Layout is a collection of Cells for visualization
|
||||||
|
|
Loading…
Reference in New Issue