Commit Graph

14 Commits

Author SHA1 Message Date
Ian Wienand 5f785f7782 Add import of json files
This simply takes any json files present and loads them into Grafana
directly.  The idea is that you can edit the dashboards using the
inbuilt editor, then copy the dashboard JSON and keep it externally
version controlled.  No parsing or validation is done on the JSON
files; we are assuming they have not been hand-modified from what
Grafana generates.

Change-Id: I38695aed2404f8b7fc350d949b7a9212498c35cb
2020-06-25 15:04:14 +10:00
Ian Wienand 59247628c4 Update documentation
Add some expanded documentation on what grafyaml actually does to
README.rst

While we're here, fix this up to use openstackdocs theme and the
latest sphinx, as it was producing a bunch of warnings.

Change-Id: I570b44cb911cd48d53d62234426edeabb22b1469
2018-06-04 20:42:30 +10:00
Iswarya_Vakati 91180e0476 Removes unnecessary utf-8 encoding
This patches removes unnecessary utf-8 encoding in
doc/source/conf.py
grafana_dashboards/__init__.py
tests/base.py
tests/schema/base.py
tests/schema/fixtures/dashboard-0010.yaml
tests/schema/fixtures/dashboard-0011.yaml
tests/schema/fixtures/dashboard-0012.yaml

Change-Id: I75b80ee943b4da7381e124743386c3ea6eb4db42
2017-01-11 05:27:12 +00:00
Paul Belanger 2c92819451 Add datasource support
We now support the ability to create a datasource using yaml files.

Change-Id: I1db38ac25bc309398924c15635ea5dee4eaf264c
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2015-11-03 12:36:59 -05:00
Paul Belanger fd76590e4b Add delete command to CLI
Add the ability to delete dashboards based on the provided yaml file.
We also removed the assert_dashboard_exists function, as it didn't
really save us code.

Change-Id: I417a72fcc5252b36cadfe8881b4f5ca6acb7c753
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2015-10-16 11:33:32 -04:00
Paul Belanger 3a32d511bb Rework grafana object for future functionality
Currently we only support dashboards for Grafana, this is about to
change. For example, we also need to add the ability to create
datasources and even users. Here we are breaking out the logic into
more specific functions.

Additionaly, this helps when we eventually break out this code into
python-grafana.

Change-Id: I10a618adbf9052c8dccda38fefb7abf3a148d3b6
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2015-10-09 14:00:28 -04:00
Paul Belanger 4e643e5d06 Replace oslo_config dependency with argparse
This is for the same reasoning as oslo_log. We don't want to depending
on OpenStack libraries.

Change-Id: I34e66af578d3f4b5ac5e710554aad91524285816
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2015-10-09 10:12:57 -04:00
Paul Belanger 3a66817727 Replace oslo_log dependency with standard logging
When I first started grafyaml, I wanted to better understand how
existing OpenStack libraries worked. So, with that in mind, I choose
oslo_log as the logging class for this program.  However, now that we
have imported it under openstack-infra, we don't really want to depend
on OpenStack libraries, incase there is a breakage.  The main reason
for this, if OpenStack libraries break, we still want the
infrastructure to work so we can fix the problem.

Change-Id: Iee9b1d9d9abb4da4d285531b64a7e2505240be12
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2015-10-06 09:15:20 -04:00
Paul Belanger 30f7d21f3f Make sure dashboard exists after we create it
The long term goal here is to eventually create python-grafana from
our embedded grafana.py file. So, most of this code just makes the
Grafana object more user friendly.

However, we've also added some validation around create_dashboard, we
added some checks before we create and after. To ensure we actually
created our new dashboards.

Finally, add some sphinx docs since everybody loves documentation.

Change-Id: Icbba403afe5208fbef1855118d4c3f4293461e00
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2015-10-02 13:42:35 -04:00
Jenkins a61e30d33b Merge "Add docs for grafana-dashboards command" 2015-10-01 14:25:55 +00:00
James E. Blair ae0bc35810 Revert "Drop oslosphinx requirement"
This reverts commit 562d075a46.

Change-Id: Ibcbfb1da52a177fc213bc9e105e73be34b2a2429
2015-09-28 13:56:26 -07:00
Paul Belanger 789bf1f3a2 Add docs for grafana-dashboards command
Also rework index file to include README over a dedicated readme file.

Change-Id: I70108fb627131e7a8bfec6e64cbfc093e65ca48b
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2015-09-28 15:56:58 -04:00
Paul Belanger 562d075a46 Drop oslosphinx requirement
Since we are not an official OpenStack project, no need to look like
one.

Change-Id: I6925799ebaf4086ea499be81c2be9de2aedb57ac
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2015-09-28 14:34:52 -04:00
Paul Belanger f65385a578 Initial Cookiecutter Commit. 2015-05-04 13:14:07 -04:00