Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
[WIP] support for loading function definitions from graphite #10139
This PR aims to add support for loading graphite function definitions from the endpoint introduced in graphite-project/graphite-web#2146
This will allow Grafana to automatically show functions and parameters available in the target graphite instance, including functions loaded via plugins.
Work is not complete yet, but it is functional.
@torkelo there is still something funny going on here that I suspect I exposed via the change to quote non-numeric values provided for numeric parameters, which caused
It seems to be related to the way the initial parameter is hidden and the special handling for passing through series references. It seems like it would be much clearer if
referenced this pull request
Dec 9, 2017
@@ Coverage Diff @@ ## master #10139 +/- ## ========================================== - Coverage 49.79% 49.79% -0.01% ========================================== Files 312 312 Lines 22096 22102 +6 Branches 1125 1130 +5 ========================================== + Hits 11003 11005 +2 - Misses 10452 10456 +4 Partials 641 641
This was referenced
Dec 11, 2017
2 times, most recently
Dec 21, 2017
@torkelo I think this is ready for you to take a look at. One thing I haven't yet been able to figure out is that every now and then the popovers for the function dropdowns don't close properly. Not sure if you have a better way of handling them, I was having a lot more issues when trying to use the popoverSrv for them, possibly because of the way the typeahead elements get removed from the DOM.
I pulled, built and started testing out this branch. A couple of preliminary notes:
@shanson7 Thanks for the feedback!
Initially I had the play button change to pause so you could toggle it back again, but it seemed cleaner to just have it go away.
As far as
It doesn't seem like the tag key autocomplete request replaces template variables.
In the template variables I am to successfully build up a multiple template variables using both
However, when I try to use it in a panel with something like:
name = $var1.$var2.$var2
When I click to add another tag (like
The request that gets sent to the autocomplete doesn't substitute the selected values and no tag keys show up. (it sends
torkelo left a comment •
This looks really great. Since most of the code changes are in tricky test angular directives I guess we can be a bit lax with test coverage. But some tests for getFuncDefs and new code in metricFindQuery would be good.
Also the popover in the function selection menu gets stuck quite option. I can take a look at that.