-
Notifications
You must be signed in to change notification settings - Fork 12k
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
Query editor adds single quote to variable when used in graphite function #11927
Comments
We also observe this. |
duplicate of #2078 |
@torkelo I believe you closed it by mistake |
not sure I did, as there already is an open issue for this (which I linked to) |
Ok, its a related but new issue introduced in 3a4e051#diff-2805d5a9f2c9a0e6e52590b65e8db820 int func params should not be required to be parsed to numbers, before that commit that test was only applied to parms of type int_or_interval (som functions can take both a number and string for same parameter). So to fix this we need to restore render function to this
That is only apply the _.isFinite(+value) when paramType === 'int_or_interval' |
The same change also introduced this bug, #12355 The _includes condition there should not be there. It seems the value sometimes is true/false (js boolean not string), and it will also make having a variable there not possible. if (paramType === 'boolean' && _.includes(['true', 'false'], value)) { |
In the specific case of highest/lowest you can run the master build of graphite-web which handles numeric strings until this is fixed in Grafana. |
… node, int and float types, fixes #11927
* fix: graphite function parameters should never be quoted for boolean, node, int and float types, fixes #11927 * Update gfunc.ts
I have the same problem, but for InfluxDB as the storage. I want to be able to do exclude entries that have a tag variable that is empty. I can do this with the manual editor: WHERE "tag" != '' But when I try to do this in the visual editor, it ends up as: WHERE "tag" != '''' So the quotes get re-quoted. This seems like a bug to me. |
Hello,
we have some dashboards that use a variable to display the Top 5 / 10 / 15 entries of a series.
We have noticed that after modifying the query (originally created in Grafana 4) the query is not working anymore.
The error is an internal server errors with details:
If I toggle the editor I can see that single quotes are added before and after the variable ($Top):
If I manually remove the single quotes. The query is performed successfully!
If I now toggle between the edit modes everything stays OK until I change the query in the dropdown editor mode.
Regards
Timo
Please include this information:
What Grafana version are you using?
5.1.2
What datasource are you using?
Graphite
What OS are you running grafana on?
Red Hat Enterprise Linux Server release 7.5 (Maipo)
What did you do?
Edit existing queries.
What was the expected result?
Query should display results.
What happened instead?
Query is showing Error:
The text was updated successfully, but these errors were encountered: