Commit Graph

4 Commits

Author SHA1 Message Date
Paul Belanger f95956b3e2 Add support for template query
A cool feature grafana has is the ability to template dashboards with
variables. This code now provides that ability to the user.

Change-Id: Ib2f565e3d39523105b2c07d29d5257494a8bae67
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2016-01-09 10:27:18 -08:00
Paul Belanger 5c620dcbc6 Default dashboard timezone to UTC
We also allow the user to override the setting to browser as well.

Change-Id: Id7ebdc3140d8fc50d0e70876fa2341a102821e1f
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2015-11-13 10:14:07 -05:00
Paul Belanger 42ef61dde0 Add a slug to better track dashboards
Currently grafana will generate a slug based on the title name. For
now, we can use an existing python library to do this.  Ideally, we'll
need to make sure the slugs generated between both are kept in sync.

How hard can that be?

Also move our validation logic into parser.py, since they are closely
related.

Change-Id: Id43f51d3f9db9131c25a8130f957572344a7d8f1
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2015-09-28 10:15:10 -04:00
Paul Belanger b91de6e8e9 Rework unit tests
With help from JJB we now compare yaml to json, making sure we generating the
proper JSON from the schema

Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2015-05-11 14:38:24 -04:00