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 = [
|
yaxes_format = [
|
||||||
{
|
{
|
||||||
v.Optional('decimals'): int,
|
v.Optional('decimals'): v.All(int),
|
||||||
v.Optional('format', default='short'): y_format,
|
v.Optional('format', default='short'): y_format,
|
||||||
v.Optional('label', default=''): v.All(str),
|
v.Optional('label', default=''): v.All(str),
|
||||||
v.Optional('logBase', default=1): v.All(int, v.Range(min=1)),
|
v.Optional('logBase', default=1): v.All(int, v.Range(min=1)),
|
||||||
|
@ -137,6 +137,7 @@ class Graph(Base):
|
||||||
graph = {
|
graph = {
|
||||||
v.Required('bars', default=False): v.All(bool),
|
v.Required('bars', default=False): v.All(bool),
|
||||||
v.Optional('datasource'): v.All(str),
|
v.Optional('datasource'): v.All(str),
|
||||||
|
v.Optional('decimals'): v.All(int),
|
||||||
v.Required('fill', default=1): v.All(int),
|
v.Required('fill', default=1): v.All(int),
|
||||||
v.Optional('hideTimeOverride'): v.All(bool),
|
v.Optional('hideTimeOverride'): v.All(bool),
|
||||||
v.Optional('leftYAxisLabel'): v.All(str, v.Length(min=1)),
|
v.Optional('leftYAxisLabel'): v.All(str, v.Length(min=1)),
|
||||||
|
|
|
@ -9,6 +9,7 @@
|
||||||
"panels": [
|
"panels": [
|
||||||
{
|
{
|
||||||
"bars": false,
|
"bars": false,
|
||||||
|
"decimals": 2,
|
||||||
"editable": true,
|
"editable": true,
|
||||||
"error": false,
|
"error": false,
|
||||||
"fill": 1,
|
"fill": 1,
|
||||||
|
|
|
@ -6,6 +6,7 @@ dashboard:
|
||||||
panels:
|
panels:
|
||||||
- title: no title (click here)
|
- title: no title (click here)
|
||||||
type: graph
|
type: graph
|
||||||
|
decimals: 2
|
||||||
leftYAxisLabel: left label
|
leftYAxisLabel: left label
|
||||||
rightYAxisLabel: right label
|
rightYAxisLabel: right label
|
||||||
yaxes:
|
yaxes:
|
||||||
|
|
Loading…
Reference in New Issue