summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Wienand <iwienand@redhat.com>2018-06-08 15:26:09 +1000
committerIan Wienand <iwienand@redhat.com>2018-06-08 15:31:22 +1000
commita5d14a2fafda910af27024c61e2bc82e2bc33dd7 (patch)
treee94b88bb045c557f55d6d414e59fb18b5c6e2305
parent59247628c42576c2962b8c9aabb03ff1575055e1 (diff)
Add transparent
Graphs can have a "transparent" attribute to make them ... transparent. Change-Id: I7772943b92a0c46bc8d7cd5ae7255f4de774bdcf
Notes
Notes (review): Code-Review+2: Paul Belanger <pabelanger@redhat.com> Workflow+1: Paul Belanger <pabelanger@redhat.com> Verified+2: Zuul Submitted-by: Zuul Submitted-at: Tue, 03 Jul 2018 00:15:42 +0000 Reviewed-on: https://review.openstack.org/573527 Project: openstack-infra/grafyaml Branch: refs/heads/master
-rw-r--r--grafana_dashboards/schema/panel/base.py1
-rw-r--r--tests/schema/fixtures/dashboard-0030.json1
-rw-r--r--tests/schema/fixtures/dashboard-0030.yaml1
3 files changed, 3 insertions, 0 deletions
diff --git a/grafana_dashboards/schema/panel/base.py b/grafana_dashboards/schema/panel/base.py
index 4945579..79a0483 100644
--- a/grafana_dashboards/schema/panel/base.py
+++ b/grafana_dashboards/schema/panel/base.py
@@ -44,6 +44,7 @@ class Base(object):
44 'dashlist', 'graph', 'singlestat', 'text'), 44 'dashlist', 'graph', 'singlestat', 'text'),
45 v.Optional('id'): int, 45 v.Optional('id'): int,
46 v.Optional('format'): v.Any(self.formats, v.Length(min=1)), 46 v.Optional('format'): v.Any(self.formats, v.Length(min=1)),
47 v.Optional('transparent'): v.All(bool),
47 } 48 }
48 49
49 def get_schema(self): 50 def get_schema(self):
diff --git a/tests/schema/fixtures/dashboard-0030.json b/tests/schema/fixtures/dashboard-0030.json
index decec00..2b8ddbb 100644
--- a/tests/schema/fixtures/dashboard-0030.json
+++ b/tests/schema/fixtures/dashboard-0030.json
@@ -34,6 +34,7 @@
34 } 34 }
35 ], 35 ],
36 "title": "no title (click here)", 36 "title": "no title (click here)",
37 "transparent": true,
37 "type": "graph", 38 "type": "graph",
38 "x-axis": true, 39 "x-axis": true,
39 "y-axis": true 40 "y-axis": true
diff --git a/tests/schema/fixtures/dashboard-0030.yaml b/tests/schema/fixtures/dashboard-0030.yaml
index 6fd6e3b..4f250c8 100644
--- a/tests/schema/fixtures/dashboard-0030.yaml
+++ b/tests/schema/fixtures/dashboard-0030.yaml
@@ -10,6 +10,7 @@ dashboard:
10 - title: no title (click here) 10 - title: no title (click here)
11 type: graph 11 type: graph
12 datasource: graphite 12 datasource: graphite
13 transparent: true
13 targets: 14 targets:
14 - target: "stats.gauges.afs.afs01_dfw_openstack_org.part.vicepa.total" 15 - target: "stats.gauges.afs.afs01_dfw_openstack_org.part.vicepa.total"
15 refId: "A" 16 refId: "A"