Allow decimals to be specificed to limit decimals graphs
This allows graphs tool tips to be limited by a decimal count. Also fix forgotten validation on decimals setting specific to legends. Change-Id: I5840b0081dbb17ead0c49fa7d6d6ba1a2e82bb7c
This commit is contained in:
parent
80fd8c8fe1
commit
2c68efbb69
@ -83,7 +83,7 @@ class Graph(Base):
|
||||
)
|
||||
yaxes_format = [
|
||||
{
|
||||
v.Optional('decimals'): int,
|
||||
v.Optional('decimals'): v.All(int),
|
||||
v.Optional('format', default='short'): y_format,
|
||||
v.Optional('label', default=''): v.All(str),
|
||||
v.Optional('logBase', default=1): v.All(int, v.Range(min=1)),
|
||||
@ -137,6 +137,7 @@ class Graph(Base):
|
||||
graph = {
|
||||
v.Required('bars', default=False): v.All(bool),
|
||||
v.Optional('datasource'): v.All(str),
|
||||
v.Optional('decimals'): v.All(int),
|
||||
v.Required('fill', default=1): v.All(int),
|
||||
v.Optional('hideTimeOverride'): v.All(bool),
|
||||
v.Optional('leftYAxisLabel'): v.All(str, v.Length(min=1)),
|
||||
|
@ -9,6 +9,7 @@
|
||||
"panels": [
|
||||
{
|
||||
"bars": false,
|
||||
"decimals": 2,
|
||||
"editable": true,
|
||||
"error": false,
|
||||
"fill": 1,
|
||||
|
@ -6,6 +6,7 @@ dashboard:
|
||||
panels:
|
||||
- title: no title (click here)
|
||||
type: graph
|
||||
decimals: 2
|
||||
leftYAxisLabel: left label
|
||||
rightYAxisLabel: right label
|
||||
yaxes:
|
||||
|
Loading…
x
Reference in New Issue
Block a user