gbrian / grafana-timelion-datasource

ELK Timelion's data source for Grafana
MIT License
15 stars 12 forks source link

Use Lucene interpolation engine when building queries #10

Closed nbarrientos closed 6 years ago

nbarrientos commented 6 years ago

Along the lines of 9bff0343fcb15edd61c49221cf37ce78ae6023af.

This patch instructs the plugin to use the 'lucene' interpolation engine when building query parameters.

Example query:

 "q='bar:$Bar'"

After interpolation (unpatched):

  'bar:{a,b}'

After interpolation (patched):

  'bar:"a" OR "b"'
gbrian commented 6 years ago

👏 Great and thanks for the code, let me check as currently, I'm using a lot of templating with this plugin.

PS: I'm running https://github.com/gbrian/repofunding to help me and anyone to maintain their repositories. It is on the roadmap to allow any developer to request crowdfunding for fixing issues or for the repository owner to use crowdfunding to pay developers... maybe we can run a test? Let me know your comments Thanks

nbarrientos commented 6 years ago

I'd be happy to be paid for providing a patch, indeed :)

gbrian commented 6 years ago

Hi @nbarrientos , I'll be glad on paying for your support and hopefully someone else as well! :) I updated the plugin to work with latest version of Grafana and they changed the templaSrv replace function. BTW we have more control now, check pic below: image

Thanks for your support and hope you find this plugin useful...btw I'll be checking your fork for goodies! 😅