-
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
Periodic/time-delayed Template reloads #8888
Comments
A more generic solution might be a HTTP endpoint the user could access to trigger reloads. That way, those reloads should be invisible for most front-end users. |
since the template system is all in the frontend, the template variable query is executed & values fetched an inserted into dashboard json by the frontend, it's tricky to do this via api / cronjob etc.
This would work but have one big flaw in in order to save the new values (so subsequent dashboard loads also do not trigger refresh) the dashboard needs to be saved, and doing that automatically is not a good idea. |
I can see how saving things automatically is risky with the current setup. On the other hand, there will be some state that needs to be handled distinct from the UI in the longer term, anyway. |
I would slot the periodic reloads somewhere between "On dashboard load" and "On timerange change", meaning the values would be loaded first on dashboard load, then periodically. This means the dashboard wouldn't need to be saved when values change. I know this doesn't answer RichiH's problem, but dashboard load generally involves a lot of querying and I don't see how adding one more query is that much overhead. |
It depends on how expensive the different queries are. Personally, I don't see much benefit in #8888 (comment) but I don't see harm in it, either. Unless people keep tabs open which then generate load without value. |
How about this:
Note that step 3 would ideally happen on the server before even loading & transmitting potentially stale data This would even integrate nicely with service discovery, where I could potentially pre-seed my dashboard files on disk with up-to-date template values. |
This feature request has been open for a long time with few received upvotes or comments, so we are closing it. We're trying to limit open GitHub issues in order to better track planned work and features. This doesn't mean that we'll never ever implement it or that we will never accept a PR for it. A closed issue can still attract upvotes and act as a ticket to track feature demand/interest. Thank You to you for taking the time to create this issue! |
Currently, I can refresh templates:
We're having thousands of values which change at least daily in some templates, so the latter two are too often, but the first one is also a no-go.
Having periodic updates, either by a cronjob or time-delayed by "refresh if template older than X time" would fix this issue.
The text was updated successfully, but these errors were encountered: