Version Control comment by API

We use the Grafana API for bulk edits on Dashboards:

We write back the changed Dashboard like this:

print (cli.dashboards.db.create(dashboard=tDashboard, overwrite=False))

This returns the slug on success, worked fine in Grafana 4.3, and still works in Grafana 4.4.

  1. In the version history, an empty comment is shown. We’d like a descriptive message.
  2. The compare functionality fails when comparing to such a comment-less version (even when only the version number has changed, so absolute minimum number of changes - seems like a bug. It just stalls the browser, waited several minutes)

We could not find in the docs how to add a commit message. We tried:

  tDashboard['message']='API Edit by Python script'
  print (cli.dashboards.db.create(dashboard=tDashboard, overwrite=False))

But that wasn’t it. Could you advise?

We missed updating the docs for this (updated now). For this call there is now a new parameter, message which sets the commit message

Can you describe this a bit more. I cannot recreate this.

Hi Daniel,

Thank you, that was it. You might want to update the example as well in the docs.

print cli.dashboards.db.create(dashboard=tDashboard, overwrite=False, message='API Edit by Python script')

About the diff/compare problem:
Here’s a copy of our grafana.db (all stripped except for one dashboard): WeTransfer - Send Large Files & Share Photos Online - Up to 2GB Free , admin/admin, Grafana 4.4.1.
If I compare for example version 237 to 238, something goes wrong.

Edit the Compare does work, it just takes a very long time. It seems to be related to stripped repeatIteration nodes, which are stripped because this is dynamic data and pollutes our normal VCS, and have no effect on the functionality of the Dashboard.

  1. Can you reproduce this?
  2. Can the compare performance be improved in this scenario? (Possibly you could do the same as we do; strip the repeatIteration nodes, since it reduces disk usage and improves the comparison UX tremendously)