diff --git a/grafana_dashboards/schema/panel/graph.py b/grafana_dashboards/schema/panel/graph.py index 361b7f2..0b0cc00 100644 --- a/grafana_dashboards/schema/panel/graph.py +++ b/grafana_dashboards/schema/panel/graph.py @@ -97,7 +97,7 @@ class Graph(Base): v.Required('alias'): v.All(str, v.Length(min=1)), v.Optional('bars'): v.All(bool), v.Optional('lines'): v.All(bool), - v.Optional('fill'): v.All(int, v.Range(min=1, max=10)), + v.Optional('fill'): v.All(int, v.Range(min=0, max=10)), v.Optional('width'): v.All(int, v.Range(min=1, max=10)), v.Optional('nullPointMode'): v.All(null_point_modes), v.Optional('fillBelowTo'): v.All(str), diff --git a/tests/schema/fixtures/dashboard-0016.json b/tests/schema/fixtures/dashboard-0016.json new file mode 100644 index 0000000..3aae74e --- /dev/null +++ b/tests/schema/fixtures/dashboard-0016.json @@ -0,0 +1,49 @@ +{ + "dashboard": { + "new-dashboard": { + "rows": [ + { + "collapse": false, + "editable": true, + "height": "250px", + "panels": [ + { + "bars": false, + "editable": true, + "error": false, + "fill": 1, + "lines": true, + "linewidth": 2, + "percentage": false, + "pointradius": 5, + "points": false, + "seriesOverrides": [ + { + "alias": "foo", + "fill": 0, + "lines": true + } + ], + "span": 12, + "stack": false, + "steppedLine": false, + "targets": [], + "title": "no title (click here)", + "type": "graph", + "x-axis": true, + "y-axis": true + } + ], + "showTitle": false, + "title": "New row" + } + ], + "templating": { + "enabled": false, + "list": [] + }, + "timezone": "utc", + "title": "New dashboard" + } + } +} diff --git a/tests/schema/fixtures/dashboard-0016.yaml b/tests/schema/fixtures/dashboard-0016.yaml new file mode 100644 index 0000000..d8098d4 --- /dev/null +++ b/tests/schema/fixtures/dashboard-0016.yaml @@ -0,0 +1,12 @@ +dashboard: + title: New dashboard + rows: + - title: New row + height: 250px + panels: + - title: no title (click here) + type: graph + seriesOverrides: + - alias: foo + fill: 0 + lines: True