Merge ~rmescandon/charm-grafana/+git/grafana-charm:dashboards-import-url-fix into ~prometheus-charmers/charm-grafana:master

Proposed by Roberto Mier Escandon
Status: Merged
Approved by: Gareth Woolridge
Approved revision: 283f8531fb4eed68f1ca71d2668fac068be0379d
Merged at revision: 0285f036a2fab76702b371bc022279de5390deff
Proposed branch: ~rmescandon/charm-grafana/+git/grafana-charm:dashboards-import-url-fix
Merge into: ~prometheus-charmers/charm-grafana:master
Diff against target: 13 lines (+1/-1)
1 file modified
actions/import-dashboard (+1/-1)
Reviewer Review Type Date Requested Status
Gareth Woolridge Approve
Review via email: mp+348751@code.launchpad.net

Commit message

Update import-dashboard URL where posting dashboards, as specified in http://docs.grafana.org/http_api/dashboard/

Otherwise, the action reports always error

To post a comment you must log in.
Revision history for this message
🤖 Canonical IS Merge Bot (canonical-is-mergebot) wrote :

This merge proposal is being monitored by mergebot. Change the status to Approved to merge.

Revision history for this message
Gareth Woolridge (moon127) wrote :

Tested against a dummy and the showback dashboard and seems to dtrt.

review: Approve
Revision history for this message
🤖 Canonical IS Merge Bot (canonical-is-mergebot) wrote :

Change successfully merged at revision 0285f036a2fab76702b371bc022279de5390deff

Revision history for this message
Gareth Woolridge (moon127) wrote :

I've built the new charm, tested it locally and in CI, and pushed to cs:grafana

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/actions/import-dashboard b/actions/import-dashboard
2index a90cf98..e7c6c53 100755
3--- a/actions/import-dashboard
4+++ b/actions/import-dashboard
5@@ -19,7 +19,7 @@ from grafana_utils import get_admin_password
6
7 def import_dashboard(dashboard):
8 headers = {'Content-Type': 'application/json'}
9- import_url = 'http://localhost:{}/api/dashboards/import'.format(
10+ import_url = 'http://localhost:{}/api/dashboards/db'.format(
11 config('port'))
12 passwd = get_admin_password()
13 if passwd is None:

Subscribers

People subscribed via source and target branches