-
Notifications
You must be signed in to change notification settings - Fork 48
Dropdown selectors for template variables #349
Comments
We're in dire need of this, and consider implementing hacks to have it. @juliusv Are you guys thinking about adding selectors for template variables anytime soon? |
Do you currently have anything in place? You can open a pull request and we will take a look at it |
No, we're considering investing time in this, but given that we have little experience with Ruby, it'll probably take a while ;) |
it would probably be almost entirely javascript, but i'll talk with @juliusv to see what he thinks about it |
Any ideas? If you guys don't have the time to implement this, some code pointers as to where to start would be much appreciated :) |
variables are added here: your template variables are stored on the that array is what gets rendered on the page: |
Hey, I'd just caution against adding fields to the JSON which are not reflected in the GUI. So far the JSON has simply been an internal representation of the settings that you can edit via the GUI. But the JSON is more of an implementation detail. It'd also be great in general to have a UI for this, but that always requires careful thought to not clutter the UI completely for users who don't use that feature. Would love to see some UI sketches for this... |
It should be possible (e.g. in JSON) to specify expressions that would populate a drop-down selector for a given variable. For example:
I have a dashboard that is parametrised by
var.job=web-prod
,var.job=web-alpha
etc. I have no way for users to discover this,and when they go to a dashboard, they see empty graphs.Nor is there an easy way to switch between all job names. The job names are already in prometheus data (just list
job
labels ofup{}
).It would be great if JSON allowed me to specify a drop down for this. This would make template variables easily discoverable and give users the ability to see what they can filter by.
The text was updated successfully, but these errors were encountered: