Merge "Allow decimals to be specificed to limit decimals graphs"

This commit is contained in:
Zuul 2018-02-16 20:05:26 +00:00 committed by Gerrit Code Review
commit 07e6ff97a2
3 changed files with 4 additions and 1 deletions

View File

@ -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)),

View File

@ -9,6 +9,7 @@
"panels": [
{
"bars": false,
"decimals": 2,
"editable": true,
"error": false,
"fill": 1,

View File

@ -6,6 +6,7 @@ dashboard:
panels:
- title: no title (click here)
type: graph
decimals: 2
leftYAxisLabel: left label
rightYAxisLabel: right label
yaxes: