summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Wienand <iwienand@redhat.com>2018-09-14 15:28:36 +1000
committerIan Wienand <iwienand@redhat.com>2018-09-14 16:21:25 +1000
commit5463ff095e09955b8d7f311e5d99a426562a2953 (patch)
tree868352cab45c67f294ecf6cb42ad09bf25b4db6a
parent2ffded73e99197bb172c915b36fb312e9dfd1712 (diff)
Add tooltip sortHEADmaster
You can sort the tooltips in descending (1) or ascending (2) order. Change-Id: I931419f832b6fd4a537431e34c099e5f2884d4c2
Notes
Notes (review): Code-Review+2: Ian Wienand <iwienand@redhat.com> Workflow+1: Ian Wienand <iwienand@redhat.com> Verified+2: Zuul Submitted-by: Zuul Submitted-at: Sun, 11 Nov 2018 23:03:29 +0000 Reviewed-on: https://review.openstack.org/602527 Project: openstack-infra/grafyaml Branch: refs/heads/master
-rw-r--r--grafana_dashboards/schema/panel/graph.py1
-rw-r--r--tests/schema/fixtures/dashboard-0012.json1
-rw-r--r--tests/schema/fixtures/dashboard-0012.yaml1
3 files changed, 3 insertions, 0 deletions
diff --git a/grafana_dashboards/schema/panel/graph.py b/grafana_dashboards/schema/panel/graph.py
index 66c54a5..a28be9e 100644
--- a/grafana_dashboards/schema/panel/graph.py
+++ b/grafana_dashboards/schema/panel/graph.py
@@ -66,6 +66,7 @@ class Graph(Base):
66 v.Required('query_as_alias', default=True): v.All(bool), 66 v.Required('query_as_alias', default=True): v.All(bool),
67 v.Required('shared', default=True): v.All(bool), 67 v.Required('shared', default=True): v.All(bool),
68 v.Required('value_type', default='cumulative'): v.All(value_types), 68 v.Required('value_type', default='cumulative'): v.All(value_types),
69 v.Optional('sort'): v.Range(min=0, max=2),
69 } 70 }
70 71
71 series_override = { 72 series_override = {
diff --git a/tests/schema/fixtures/dashboard-0012.json b/tests/schema/fixtures/dashboard-0012.json
index 22b7f5d..f2e5beb 100644
--- a/tests/schema/fixtures/dashboard-0012.json
+++ b/tests/schema/fixtures/dashboard-0012.json
@@ -25,6 +25,7 @@
25 "tooltip": { 25 "tooltip": {
26 "query_as_alias": true, 26 "query_as_alias": true,
27 "shared": true, 27 "shared": true,
28 "sort": 2,
28 "value_type": "individual" 29 "value_type": "individual"
29 }, 30 },
30 "type": "graph", 31 "type": "graph",
diff --git a/tests/schema/fixtures/dashboard-0012.yaml b/tests/schema/fixtures/dashboard-0012.yaml
index 18f24e6..3ebd6ab 100644
--- a/tests/schema/fixtures/dashboard-0012.yaml
+++ b/tests/schema/fixtures/dashboard-0012.yaml
@@ -8,3 +8,4 @@ dashboard:
8 type: graph 8 type: graph
9 tooltip: 9 tooltip:
10 value_type: individual 10 value_type: individual
11 sort: 2