Possible to provision Postgres Query Editor defaults?


I run grafana 7, 8 and 8.1 containerized on CentOS docker host.

We use quite compley Psotgres queries to hide table partioning, database normalization etc. from user and provide influx like UX with Dropdown selection of Datatags.
With template variables we have been successful to hide all this behind the visual Editor so user does not need to use code queries and only needs to adjust the expression value from dropdown.
In fact if he just duplicates a configured panel he only needs to modify this expression dropdown value.

Nevertheless on a new empty panel it is quite some clicking to add the needed elements in visual editor:

  • set the from table
  • set the time column
  • set the select column
  • add expression
  • select expression key
  • add and set group by

Therefore my question:
Is it possible to customize the default initial visual editor selection by configuration, so our users would not have to add filters but only select by dropdown there parameters?

See here how the final settings look:

Looks like this is pretty hardcoded? :frowning:

Thx a lot for your help!


Hi @agentbignose

There is a new feature called Library Panels, and it might solve your problem. You can use it to recreate reproducible panels that are linked to a main panel. You can later unlink panels to prevent cascading changes.

This topic was automatically closed after 365 days. New replies are no longer allowed.