fix: Traefik routing OpenRemote/Ditto + QuantumLeap config (2026-05-08)
This commit is contained in:
23
import_dashboard_fixed.py
Normal file
23
import_dashboard_fixed.py
Normal file
@@ -0,0 +1,23 @@
|
||||
#!/usr/bin/env python3
|
||||
import json
|
||||
import requests
|
||||
|
||||
# Read the fixed dashboard
|
||||
with open('/home/eric/smart-city-digital-twin-martinique/grafana-dashboard-fixed.json', 'r') as f:
|
||||
dashboard = json.load(f)
|
||||
|
||||
# Import to Grafana
|
||||
url = "http://grafana.digitribe.fr/api/dashboards/db"
|
||||
auth = ('admin', 'Digitribe972')
|
||||
|
||||
payload = {
|
||||
"dashboard": dashboard,
|
||||
"overwrite": True
|
||||
}
|
||||
|
||||
try:
|
||||
resp = requests.post(url, json=payload, auth=auth)
|
||||
print(f"Status: {resp.status_code}")
|
||||
print(resp.json())
|
||||
except Exception as e:
|
||||
print(f"Error: {e}")
|
||||
Reference in New Issue
Block a user