summaryrefslogtreecommitdiff
path: root/grafana_dashboards/schema/dashboard.py
diff options
context:
space:
mode:
Diffstat (limited to 'grafana_dashboards/schema/dashboard.py')
-rw-r--r--grafana_dashboards/schema/dashboard.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/grafana_dashboards/schema/dashboard.py b/grafana_dashboards/schema/dashboard.py
index 2997056..ddffcda 100644
--- a/grafana_dashboards/schema/dashboard.py
+++ b/grafana_dashboards/schema/dashboard.py
@@ -14,6 +14,7 @@
14 14
15import voluptuous as v 15import voluptuous as v
16 16
17from grafana_dashboards.schema.links import Links
17from grafana_dashboards.schema.row import Row 18from grafana_dashboards.schema.row import Row
18from grafana_dashboards.schema.template import Template 19from grafana_dashboards.schema.template import Template
19 20
@@ -21,6 +22,7 @@ from grafana_dashboards.schema.template import Template
21class Dashboard(object): 22class Dashboard(object):
22 23
23 def get_schema(self): 24 def get_schema(self):
25
24 dashboard = { 26 dashboard = {
25 v.Required('timezone', default='utc'): v.Any('browser', 'utc'), 27 v.Required('timezone', default='utc'): v.Any('browser', 'utc'),
26 v.Required('title'): v.All(str, v.Length(min=1)), 28 v.Required('title'): v.All(str, v.Length(min=1)),
@@ -31,6 +33,8 @@ class Dashboard(object):
31 v.Required('to'): v.Any(v.Datetime(), str), 33 v.Required('to'): v.Any(v.Datetime(), str),
32 }, 34 },
33 } 35 }
36 links = Links().get_schema()
37 dashboard.update(links.schema)
34 rows = Row().get_schema() 38 rows = Row().get_schema()
35 dashboard.update(rows.schema) 39 dashboard.update(rows.schema)
36 templating = Template().get_schema() 40 templating = Template().get_schema()