Open grantsohn opened 1 year ago
Look at https://play.grafana.org/d/000000012/grafana-play-home?orgId=1# and then download or view the dashboard as JSON.
{ "datasource": { ... }, "fieldConfig": { "defaults": { "color": { "mode": "palette-classic" }, "custom": { ... }, "mappings": [], "thresholds": { ... }, "unit": "short" }, "overrides": [ ... ] },
Search for "mappings". You will see that "mappings" belongs to "fieldConfig" -> "defaults" but your code https://github.com/weaveworks/grafanalib/blob/main/grafanalib/core.py#L3179 is placing "mappings" under the Panel dict. This is preventing the mappings from being rendered in the panel.
mappings is supposed to work.
mappings are not being applied to the panel.
Download any dashboard and look for "mappings".
Look at https://play.grafana.org/d/000000012/grafana-play-home?orgId=1# and then download or view the dashboard as JSON.
Search for "mappings". You will see that "mappings" belongs to "fieldConfig" -> "defaults" but your code https://github.com/weaveworks/grafanalib/blob/main/grafanalib/core.py#L3179 is placing "mappings" under the Panel dict. This is preventing the mappings from being rendered in the panel.
What you expected to happen?
mappings is supposed to work.
What happened?
mappings are not being applied to the panel.
How to reproduce it?
Download any dashboard and look for "mappings".