haohanyang / mongodb-datasource

Simple MongoDB datasource for Grafana
Apache License 2.0
11 stars 5 forks source link

Dashboard -> Variables #16

Open neilor-mendes opened 2 days ago

neilor-mendes commented 2 days ago

@haohanyang is it also possible to add the feature to support dashboard variables? I tried it but seems the plugins is missing some components to make it work.

Variables is very useful to create more interactive and dynamic dashboards

image

Found this link, maybe it can help: https://grafana.com/developers/plugin-tools/how-to-guides/data-source-plugins/add-support-for-variables

haohanyang commented 2 days ago

The plugin doesn's support Query Variable but it supports , for example, custom variables which you enter manually from the dashboard. If that is want you want?

image
neilor-mendes commented 2 days ago

Are you planning to develop the Query Variable ?

Actually I'd like to dynamically, based on a query, build the list of possible values available for the filter instead of the custom variable. My use case we has a lot of different values and would be nice to count on it.

Here is an example but for influx db https://youtu.be/6jYKn5ULJX0?t=368

haohanyang commented 2 days ago

I didn't read through the "Query Variables" in the first time when I implemented the plugin. But it looks like a power feature. Will plan it for future release.

neilor-mendes commented 2 days ago

Do you have an ETA for it? Just to understand how I can overcome this need now.

haohanyang commented 2 days ago

I anticipate the first iteration could happen in this week

haohanyang commented 2 hours ago

Added https://github.com/haohanyang/mongodb-datasource/pull/17 to fix this

Package: https://github.com/haohanyang/mongodb-datasource/actions/runs/11371029920