-
Notifications
You must be signed in to change notification settings - Fork 19
Implement Grafana Query Builder #329
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
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am currently on 12.0.2 and everything is working will test version 11 |
The problem exists up to including v 11.4.6 and is fixed in 11.5.0. |
It looks like the issue is with the I think we should consider raising the minimum supported Grafana version. |
@archef2000, Could you please take a look at the tests and fix them? |
In my experience query builders are fairly hard to use manually, - click click click hundred times, - I prefer plain old text for that. But what do I know, I am probably a wrong dk :) |
Oops, looks like I tagged the wrong person 😅 |
As for me, to up the version is ok, but we need to test everything properly We could have another option to use, use the old Combobox, but I am not sure it would work in the newest versions. 11.3.1 as @Loori-R mentioned, is not an old version and many users are using versions 10-11. |
As an option, we could use |
I think using Select instead of Combobox is a better idea. We do not need to change the supported version, and we do not need to use the Alpha component. |
@Loori-R Can comfirm that with the Select component everything works. |
@archef2000 Would you mind replacing |
Already on it |
It looks like there are still some |
I am not finished yet and will make a commit once all are changed and tested |
This query should give me the value types of query: |
Not sure, but it seems like |
Seems like the query won’t return |
Sorry guys missed you question query
the next filter will get only type so the query like |
I was in the assumption that /field_values will return the values of the field that are available after the query. Just noticed it in the value_type operation, but then I will have to change the logic for all. Should I change the getFieldList function with an additional type? |
I don't quite understand what you're trying to achieve. For the expression:
|
For the value_type operation I want to get the availabe value types of the field specified. The field_values is explained so that I get all field values of the specified field from the result of the query. The query gives me the correct result, but the endpoint seems to ignore the query. |
Maybe we could just hardcode the supported value types (like |
I would suggest extracting only complex logic - for example, if additional checks are needed or it takes more than 2-3 lines. |
Why are only filters respected in the field_values/field_names endpoints. When it is stated otherwise in the docs? @Loori-R @dmitryk-dk |
The |
For the every filter I construct all operation before that one and get all (at this point) available field values, names, types. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the pull request! LGTM!
@dmitryk-dk mind giving it a final check and merging? |
I would like the operation field names/values recommendation to be correct. So an answer to my question would be appreciated to know if I need a different approach or if the implementation will be adjusted according to the docs. |
@valyala could you help clarify this? |
src/components/QueryEditor/QueryBuilder/Editors/SortedFieldsEditor.tsx
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
There still is a problem when unselecting an item in all Editors using the MultiSelect component, as the |
Any ETA of releasing this datasource improvements for builder ?? |
No as @valyala has not yet answered. The value prediction is completly wrong as the implementation does not match the official docs that I went after and there are some minor problems with some Editors that need fixing. |
@archef2000 is this related with this fix #308 (comment)? |
@kurayama Can confirm correctly working field_values/field_names endpoints. |
@archef2000 could you please clarify if there are any critical issues in this PR? |
I am currently fixing some errors like every operation with the SortedFieldsEditor and testing every operation once in Grafana version 12 and 11. |
I just found some operations that are not implemented yet as they were just recently added. |
Should a version number be added to the |
Yes, adding a version VictoriaLogs would help track changes. |
Add support for all operations of LogsQL in the Grafana Query Builder.
@Loori-R
#48