-
Notifications
You must be signed in to change notification settings - Fork 12.1k
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
Support auto-refresh of filters with page refresh #366
Comments
formatted code from above: dashboard.services.filter = {
time: {
from: "now-" + (ARGS.from || timspan),
to: "now"
},
list: [
{
type: "filter",
name: "table_name",
query: "apps.database.[[table_name]].*",
includeAll: true,
current: {
text: tableName,
value: tableName
}
}
]
} |
Thanks for the reformat. Basically I'd like to dynamically load the options section. |
changed title of issue to better reflect what is required. It is kind of tricky as all of the places when filters are applied to queries need to be async (as the first time will require the options be fetched from graphite). But should relatively easy. |
Updated the title. ideally the query defined for the list type would be the value called. Thanks! |
Any plans for this feature soon? |
Not within this month, maybe some time in august. On vacation now. Back in August, working full time on grafana! |
Seems to work ok in master. {
"type": "query",
"name": "app",
"query": "apps.*",
"includeAll": true,
"options": [],
"current": {
"text": "All",
"value": "*"
},
"datasource": null,
"allFormat": "wildcard",
"refresh": true
}, Notice the new refresh option. |
By saving a template to elastic search and then examining the json stored there, I now can see how the filter lists work. Basically I'm trying to combine the scripted template capabilities (for using the same template with url parameters controlling the changing pieces) with the filtering capabilities.
The end goal is that:
BONUS:
It's a goal to not have elastic search as a part of this at all. If there is some code that I can put in my template.js file to dynamically retrieve a filter list, that would be great. I'm not a JS expert, hence my question.
current hack:
dashboard.services.filter = {
time: {
from: "now-" + (ARGS.from || timspan),
to: "now"
},
list: [
{
type: "filter",
name: "table_name",
query: "apps.database.[[table_name]].*",
includeAll: true,
current: {
text: tableName,
value: tableName
}
}
]
};
How to dynamically populate list elements via dashboard?
The text was updated successfully, but these errors were encountered: