flant / grafana-statusmap

Grafana panel plugin to visualize status of multiple objects over time
MIT License
831 stars 43 forks source link

Label templates showing wrong text when whitespace is in variable #277

Open ChAberle opened 2 years ago

ChAberle commented 2 years ago

What happened: We use Y-axis label with Label templates to modify the text displayed on the Y-axis. The alias is [[tag_taskName]]|[[tag_taskHost]]. The delimiter is | and the template ${__y_label_0} on ${__y_label_1} The problem is now, that the values in taskName has whitespaces in it, e.g. Test Task1 and taskHost is Myhost. The resulting name is: Task1 on Myhost

What you expected to happen: I would expect that right name including the whitespace, e.g. Test Task1 on Myhost. In influx the tag is correct shown with the whitespace.

Environment:

ChAberle commented 2 years ago

I found out that it helps to put a space before the tags, then the output works. _[[tag_taskName]]|[[tag_taskHost]] (replace _ with a space) works and [[tag_taskName]]|[[tag_taskHost]] doesn't.