Implement Grafana Query Builder#329
Implement Grafana Query Builder#329archef2000 wants to merge 53 commits intoVictoriaMetrics:mainfrom
Conversation
|
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 |
|
The |
|
can |
|
No as the OperationList component provided by grafana/ui just asks the queryModeller for all operation categories without any context. |
|
Quick question how far we are with releasing this version of datasource officially? |
@szibis Right now I don't have the exact ETA for releasing this feature. If I have any updates, I will let you know. |
|
@szibis @szibis Have you tried it already? |
|
The QueryModeller is pretty heavy to create and it would need more than just this change as there are many places where a full QueryModeller is used. Then there is the problem that nearly all operations that are placed result in a query that fails. You first need to fill it with information so that also requires knowledge. It also means limiting advanced users that might create a query out of order. And what happens when I drag a pipe to the start? The error code of vl-select is very informative and should be very easy to understand. There is always a learning curve of a new tool and after the first failed query it should be clear what is allowed. |
|
understand your concerns since it's a huge feature and it took significant time to implement, but i cannot agree with your statement regarding "learning curve". Builder is an intuitive tool, which should require no learning at all. by the way have you checked loki builder? it has required non-draggable filter, reusing this approach in current PR could improve UX a lot |
I can Try to test it but artifacts expired now from last build For What I am expecting is to simplify Engineers life. |
|
/build |
|
@szibis |
|
✅ Preview Build Completed!Version: 📦 Build Artifacts
|
|
@AndrewChubatiuk Where would that non draggable filter be? I can't seem to find it. |
|
Oh that. Will try to implement it. |
|
thank you for your effort! |
Loori-R
left a comment
There was a problem hiding this comment.
LGTM! Left a couple of minor readability/cleanup notes
|
@archef2000 Bugs
Screen.Recording.2025-12-18.at.19.10.36.mov
Screen.Recording.2025-12-18.at.12.04.54.mov
Screen.Recording.2025-12-18.at.13.18.46.mov
What I suggestI want to suggest moving these label filters to operations at the top of the list, like a quick action. Something like on screenshot: Could we add predefined and pinned(you cannot remove it) first operation as It will allow users build a effective fast executable queries. It will be nice if possible to detect if user didn't use the stream filter and we can hide |
|
Fixed 1. This quick action is sadly not possible as the only state I have is the string query |
|
After discussing with the team, we decided to wait until the autocomplete API is ready. We think that, based on this API, it will be possible to build a query builder that helps users build queries. After it, we will return to the query builder. |
|
Wouldn't it be easier to make that a seperate PR it would mainly be the editorHelper.ts file that needs changing. |







Add support for all operations of LogsQL in the Grafana Query Builder.
@Loori-R
#48