znetsixe de957cb971 fix(dashboardAPI): resolve InfluxDB datasource uid at push time
Templates baked in a hardcoded influxdb datasource uid that only matched the
Grafana the templates were authored against. Any other Grafana (fresh laptop,
VPS, rebuilt instance) rendered every panel as "Datasource <uid> not found".

resolveDatasourceUid() queries GET /api/datasources, picks the first influxdb
one, and caches the result. rewriteDatasourceUid() then walks panels, nested
row panels, panel.targets[], and templating.list[] and rewrites every influxdb
uid before the dashboard is pushed. Annotation datasources (type: "grafana")
and template-variable refs ($datasource) are left alone. Failure is silent and
panels keep the template uid, so behavior is never worse than before.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-28 18:33:22 +02:00
2025-09-22 16:04:19 +02:00
2025-08-07 13:56:52 +02:00
2025-05-13 09:53:25 +00:00
Description
No description provided
Readme 535 KiB
Languages
JavaScript 85%
HTML 15%