Allow repeating panels and to set minspan

This allows dashboards that expand a templated var to multi-graphs

Change-Id: I9b78958d836bbd4f73b06d6c302124857863c3d2
This commit is contained in:
akrzos 2018-02-15 12:38:47 -05:00
parent 80fd8c8fe1
commit af54eb4eb1
3 changed files with 6 additions and 0 deletions

View File

@ -143,10 +143,12 @@ class Graph(Base):
v.Optional('legend'): v.All(legend),
v.Required('lines', default=True): v.All(bool),
v.Required('linewidth', default=2): v.All(int),
v.Optional('minSpan'): v.All(int, v.Range(min=0, max=12)),
v.Optional('nullPointMode'): v.All(null_point_modes),
v.Required('percentage', default=False): v.All(bool),
v.Required('pointradius', default=5): v.All(int),
v.Required('points', default=False): v.All(bool),
v.Optional('repeat'): v.All(str),
v.Optional('rightYAxisLabel'): v.All(str, v.Length(min=1)),
v.Optional('seriesOverrides'): v.All(series_overrides,
v.Length(min=1)),

View File

@ -26,9 +26,11 @@
},
"lines": true,
"linewidth": 2,
"minSpan": 4,
"percentage": false,
"pointradius": 5,
"points": false,
"repeat": "$hostname",
"span": 12,
"stack": false,
"steppedLine": false,

View File

@ -13,6 +13,8 @@ dashboard:
- title: no title (click here)
type: graph
datasource: graphite
minSpan: 4
repeat: $hostname
targets:
- target: $hostname.Cpu.cpu_prct_used
legend: