-
Notifications
You must be signed in to change notification settings - Fork 12.2k
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
Allow for multiple auto interval template variables #9216
Allow for multiple auto interval template variables #9216
Conversation
Added a test (spec?). It doesn't use the same setup as the other tests because it requires 2 variables to be created, but (with my limited understanding of frontend development) I would say it's sane. |
Friendly ping. |
Not sure about this as this looks like a breaking change. |
Not breaking. I am loading dashboards saved before I made the change into a Grafana instance built with the patch and while If you are still concerned though, I could add code to look for an existing auto value (in addition to looking for a missing one, currently) and updating its value to the new format. |
Any opinion? I'm willing to put in the grunt work. |
Friendly ping. |
I've tested the internal variable name change (unintentionally, as part of running various feature branches) for weeks now and have seen zero of errors (user visible or Chrome console). This is AFAICT because the internal Any chance of having this merged? Or else, any guidance on what sort of explicit handling of auto interval variables you would like to see implemented before you'd merge this? Thanks. |
Will old links with |
Thanks for bringing this up, I hadn't thought about it. I spent a bit of time checking and:
|
…to_interval_variables
…thub.com/alin-amana/grafana into allow_multiple_auto_interval_variables
That was supposed to be:
but I used double quotes when running git commit. Anyway, this change is now fully backwards compatible, as interval variables with an auto value will now create 2 "hidden" variables, |
…to_interval_variables
Codecov Report
@@ Coverage Diff @@
## master #9216 +/- ##
=======================================
Coverage 43.29% 43.29%
=======================================
Files 243 243
Lines 21449 21449
Branches 545 545
=======================================
Hits 9286 9286
Misses 11649 11649
Partials 514 514
Continue to review full report at Codecov.
|
This change is now fully backward compatible. Both the legacy Any chance of having it merged? It is literally 3 lines of code. |
thanks for taking the time with this PR, sorry it takes a while for us to respond (and merge). |
* grafana/master: (21 commits) Fix typo in template help tab replace store.js with store.ts, test for store.ts (grafana#9646) docs: update first page with data source guides docs: document annotations for postgres/mysql docs: update for template variables changelog: spelling Allow for multiple auto interval template variables (grafana#9216) changelog: adds note about closing grafana#9645 tech: remove rabbitmq event publisher changelog: note for grafana#9030 dont quote variables for mysql and postgres datasource (grafana#9611) asscoiate comment with name Update development.md changelog: adds note about closing grafana#9640 alerting: only editors can pause rules prom: adds pre built grafana dashboard changelog: adds note about closing grafana#9636 fix: another fix for playlist view state, grafana#9639 shore: migrating config/settings.js to typescript fix: fixed playlist controls and view state, fixes grafana#9639 ...
Allow for multiple auto interval template variables without them overwriting each other's value.
Apologies for the possibly crappy code quality and missing tests, not a frontend coder. The fix is the best I could come up with, the testing framework plus Grafana internals I couldn't really wrap my head around (it would have been useful to add a test ensuring multiple auto interval variables actually work. (I did test it manually and they work fine, but still.)