-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
added support for basic variables queries #38
Conversation
After installing the plugin with:
and adding the datasource, I get
|
Did you restart grafana? I just followed along with the instructions provided here to get things running locally. Essentially
|
@babaMar that is a known issue with release builds, see #17. In any case you shouldn't have to re-build the plugin, @ggranberry sorry I haven't had a chance to review this yet, hopefully this week. |
@ggranberry Great job!. I started to add query variable support to this plugin but I couldn't find enough time to wrap up my changes. I have a couple of suggestions:
|
@carvid getting back to this now that the Holidays are over. Can you give me more details on the key/value support? I see the support for multiple data paths in ordinary queries, and I can definitely replicate that. |
@retzkek I got caught up in the Holidays. Did you ever get a chance to take a look? |
@ggranberry sorry for the late response. Basically, you can set a |
@carvid from what I'm seeing in the source
|
This looks really good @ggranberry, thank you! Sorry for the delay. I've pushed a change to use the |
Is this feature available now? I could not find the documentation or examples on how to implement the Query Variables to return text and value so that I can make the grafana dashboards dynamic. A screenshot of an example of this functionality would be great. EDIT: I may have misunderstood this feature. I was looking for this feature available in PostgresSQL datasource but for GraphQL. https://grafana.com/docs/grafana/latest/datasources/postgres/#query-variable |
@tijimathew-iot yes this was released in v1.2.0. You use it like any other query variable, e.g. here's the example from the Deutsche Bahn demo: |
Thank you for responding. Is query returning an array or an dictionary to get list of values? |
Decided to keep it somewhat minimal here with things like multiple data paths. LMK if anyone knows a better way to handle variable interpolation than my
getVariables
function. ScopedVariables aren't provided to themetricFindValues
function so I had to get them from the templateSrv