Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

Feature request: Variables in fields #142

Closed
txjmb opened this issue Jul 2, 2021 · 4 comments
Closed

Feature request: Variables in fields #142

txjmb opened this issue Jul 2, 2021 · 4 comments
Labels
type/feature-request Requested new feature or enhancement

Comments

@txjmb
Copy link

txjmb commented Jul 2, 2021

Thank you for the excellent plugin!

We have a feature request to enable using variables in field definition jsonpaths. This will require some sort of escaping I'm sure because $ is important in jsonpath, but I'm sure there's some way we can come up with to reasonably escape variables in the jsonpath. This would allow parts or all of the jsonpath to be driven by variables enabling dropdown-driven changes to that part of the query when necessary.

Happy to pitch in and help if this feature makes sense for everyone.

Thank you for your consideration.

@marcusolsson
Copy link
Contributor

I can definitely see how this would be useful. I don't actually know whether $ is used for anything other than the root, and whether we could assume it's always followed by a period. I'd be happy to accept this if we can find a way to avoid conflicts.

@marcusolsson marcusolsson added kind/support type/feature-request Requested new feature or enhancement and removed kind/support labels Jul 3, 2021
@txjmb
Copy link
Author

txjmb commented Jul 16, 2021

Ok, thank you. We will do a fork and a PR as soon as we are able. After reviewing jsonpath documentation, it does seem that $ is solely used to refer to the root of the json document. I can't think of ways it could be used outside of the first character. At least not yet...

@hafeja
Copy link

hafeja commented Jul 22, 2021

Hello @txjmb ,

it looks like this feature request has the same scope like #95.

It would be great if you find a solution for it.

@txjmb
Copy link
Author

txjmb commented Jul 24, 2021

Hmm... Thanks for pointing this out @hafeja , this does seem to be related, although the use of the data source is in a different context (setting variables). I'll take a look...

@marcusolsson marcusolsson moved this to Triage in Grafana plugins Mar 7, 2022
@grafana grafana locked and limited conversation to collaborators Mar 7, 2022
@marcusolsson marcusolsson converted this issue into discussion #249 Mar 7, 2022

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
type/feature-request Requested new feature or enhancement
Projects
None yet
Development

No branches or pull requests

3 participants