VolkovLabs / business-media

The Business Media panel is a Grafana plugin that renders PNG, JPG, GIF, MP4, WEBM, MP3, OGG, and PDF files encoded in the base64 format and URL.
https://docs.volkovlabs.io
Apache License 2.0
24 stars 3 forks source link

Support for sanitized variables in URL field #53

Closed Here-Be-Dragons closed 2 years ago

Here-Be-Dragons commented 2 years ago

I am using your panel type with the Grafana-native "repeat by variable" functionality, which will duplicate the panel for each entry in an array variable. When you do this using the native "Panel Links" feature in Grafana, you can optionally include the variable name and it will replace the variable name with the value for the given repeated panel.

For instance, if I have a variable:

"myImages": ["image1","image2","image"]

and specify a Panel link:

d/z3PG9iV4z/some-other-dashboard?orgId=1&var-myImages=${myImages}

then for each repeated panel, the URL will include the rendered version of the URL, such as:

d/z3PG9iV4z/some-other-dashboard?orgId=1&var-myImages=image1

As it stands today, each repeated panel simply includes the link with the raw variable name unsubstituted. There are other panel types, such as Polystat that include a "sanitize" option to substitute the values which would be very helpful in the above scenario.

mikhail-vl commented 2 years ago

Hello, @Here-Be-Dragons,

Thank you for the feature request. I can quickly add replace variables functionality for the URL.

mikhail-vl commented 2 years ago

@Here-Be-Dragons PR with the feature merged.

I was planning to update the Grafana toolkit to the latest version and release a new version later this week.

Please let us know if there is anything else.

mikhail-vl commented 2 years ago

@Here-Be-Dragons Base64 Image Panel 3.3.0 released today and submitted to Grafana for review.

While under review, you can download from the GitHub: https://github.com/VolkovLabs/volkovlabs-image-panel/releases/tag/v3.3.0

Please let us know if you need anything else.

Here-Be-Dragons commented 2 years ago

I can't believe how quickly you turned this change around. Thank you!

mikhail-vl commented 2 years ago

@Here-Be-Dragons Thank you! Let us know if there is anything else.

mikhail-vl commented 2 years ago

@Here-Be-Dragons The Base64 image panel was updated in the Grafana Catalog today: https://grafana.com/grafana/plugins/volkovlabs-image-panel/

You can update to the the latest version from there.