grafana/grafana-json-datasource

Support for default values in the Datasource configuration

ledor473 opened this issue · 0 comments

We have an API that provides time-series data and while it's possible to query it using this plugin, it's pretty tedious and repetitive to have to configure every panel the same way.
It would be very nice if we could configure some fields as default values in the datasource configuration.

Currently, there's only a Query string configuration in the datasource level and it actually offer a higher priority rather than a default according to the document

Here's an example of the default values that I would like to set:

  • Fields:
    • 3 fields with their respective configuration (JSONPath/JSONata, type, name)
  • Params:
    • from and to set to $__unixEpochFrom() and $__unixEpochTo()
    • query set to empty (that way our users know where to put the query)
  • Experimental:
    • Group By and Metric to match the 3 fields that would be pre-populated

Thanks!