Matias Chomicki
4950935401
Loki Query Builder: Add parsing support for aggregations with grouping ( #80145 )
...
Loki Query Builder: Add parsing support for aggregations with grouping arguments
2024-01-08 17:17:19 +01:00
Matias Chomicki
773e0680c5
Loki: Added support for "or" statements in line filters ( #78705 )
...
* Lezer: upgrade to 0.2.2
* Operations: update definitions
* Operations: update renderer
* Parsing: parse line filters with or operations
* Parsing: add unit test
* Formatting
* getHighlighterExpressionsFromQuery: add support for or statements
* Operation editor: trim button title if param name is empty
* getHighlighterExpressionsFromQuery: properly handle ip filters
2023-11-29 15:58:32 +01:00
Galen Kistler
a996f3b4a7
Loki Query Builder: Throw warning in query builder when order of operations is ambiguous ( #75198 )
...
* flag vector aggregations containing metric expressions (i.e.`(...)`) containing binary operation expressions with ambiguous error in the UI when switching between code and visual query builders.
2023-09-25 21:28:51 +03:00
Galen Kistler
ac98197132
Loki Query Builder: binary expression and numeric literal bugs ( #74950 )
...
* Following similar changes made to prometheus in #47198 , reverse the order of binary operator parameter array, and fix bugs introduced by importing prometheus lezer constants into loki parser
* add unit test asserting buildVisualQueryFromString does not properly parse queries with nested binary operations
* fix onOrIgnoring parsing logic which was always stripping out the value of the matcher when a boolean was found
2023-09-22 07:17:01 -05:00
Matias Chomicki
91ed2a6afe
Loki Query Editor: Add support for new logfmt features ( #74619 )
...
* Loki autocomplete: add IN_LOGFMT situation for log queries
* Loki autocomplete: add IN_LOGFMT situation for metric queries
* Loki autocomplete: improve handling of trailing pipes and spaces
* Loki autocomplete: add logfmt arguments completion
* Loki autocomplete: add flags support to IN_LOGFMT
* Loki autocomplete: extend IN_LOGFMT situation with labels and flag
* Loki autocomplete: return logQuery in IN_LOGFMT situation
* Loki autocomplete: offer label completions when IN_LOGFMT
* Query utils: update parser detection method
* Validation: update test
* Loki autocomplete: improve IN_LOGFMT detection when in metric query
* Loki autocomplete: improve logfmt suggestions
* Loki autocomplete: improve logfmt suggestions in different scenarios
* Loki autocomplete situation: refactor resolvers to support multiple paths
* Situation: add test case
* Loki autocomplete: allow user to use 2 flags
* Situation: change flag to flags
* Remove console log
* Validation: import test parser
* Completions: better handling of trailing comma scenario
* Upgrade lezer-logql
* Revert temporary imports
* Loki Query Builder: Add support for new logfmt features (#74858 )
* Query builder: add params to logfmt definition
* Logfmt operation: add default params
* Query builder: update deprecated JsonExpression
* Operation utils: update logfmt renderer
* Query builder: parse LogfmtParser
* Query builder: parse LogfmtExpressionParser
* Remove console log
* Remove unused variable
* Remove extra character from render
* Update unit tests
* Fix unit tests
* Operations: remove restParams from logfmt booleans
* Parsing: group cases
* Formatting
* Formatting
* Update modifyQuery
* LogContextProvider: update with parser changes
* LogContextProvider: remove unnecessary type castings
It takes more energy to write `as unknow as LokiQuery` than to write a refId.
* Formatting
* Situation: use charAt instead of substring with endsWith
* Situation: explain logfmt suggestions
* Logfmt: improve flag suggestions
* Remove console log
* Completions: update test
2023-09-22 12:34:17 +03:00
Sven Grossmann
07eb4b1b90
Loki: Remove distinct operation ( #73938 )
...
* remove distinct
* trigger ci
* update yarn.lock
* fix import
2023-08-28 19:26:59 +02:00
Ivana Huckova
fc9b8f6be1
Loki: Implement keep and drop operations ( #73636 )
...
* Update lezer
* Add functionalities for code and builder
* Add comment
2023-08-23 14:52:19 +02:00
Sven Grossmann
a81cee1d05
Loki: Fix parsing of escaped quotes in LogQL ( #69584 )
...
* fix parsing issue
* replace escaped quotes
2023-06-06 11:07:21 +02:00
Matias Chomicki
9abf8140c7
Loki: Add support for distinct operation in autocomplete and query builder ( #69003 )
...
* Loki Autocomplete: add support for suggesting distinct
* Loki query builder: add distinct as format operation
* Remove unused import
* Loki visual query: add support to parse distinct filters
* Query builder: use label param editor for distinct
* Loki Autocomplete: Improve distinct label suggestions
* Query Builder: improve distinct parsing
* Fix tests
* Update tests
2023-05-25 14:22:16 +02:00
Ivana Huckova
ca44164bea
Loki: Implement decolorize logql operation ( #68972 )
...
* Loki: Implement decolorize operation
* Fix tests
2023-05-24 15:23:54 +02:00
李国忠
9521b0d2d2
Explore: Fix vector(5) syntax error in loki log explore ( #63994 )
...
* [fix] loki log explore : fix vector(5) err
* changelog
* changelog fmt
* rollback change log
* fix test and pretty fmt
* Update package.json
update lezer-logql depedency to 0.1.2
* Update package.json
fix conflict
➤ YN0000: │ "@grafana/monaco-logql@npm:^0.0.6":
➤ YN0000: │ @@ -21988,9 +21987,9 @@
➤ YN0000: │ "@grafana/experimental": 1.1.0
➤ YN0000: │ "@grafana/faro-core": 1.0.0-beta2
➤ YN0000: │ "@grafana/faro-web-sdk": 1.0.0-beta2
➤ YN0000: │ "@grafana/google-sdk": 0.0.4
➤ YN0028: │ - "@grafana/lezer-logql": 0.1.1
➤ YN0028: │ + "@grafana/lezer-logql": 0.1.2
➤ YN0000: │ "@grafana/monaco-logql": ^0.0.6
➤ YN0000: │ "@grafana/runtime": "workspace:*"
➤ YN0000: │ "@grafana/scenes": ^0.0.14
➤ YN0000: │ "@grafana/schema": "workspace:*"
* Upgrade lezer-logql
* fix logql test
---------
Co-authored-by: Matias Chomicki <matyax@gmail.com >
2023-03-03 10:09:34 +01:00
Matias Chomicki
89e77d072f
Loki Query Builder: Fix bug parsing range params ( #61678 )
...
feat(loki-query-builder): fix bug parsing range params
2023-01-18 15:54:18 +01:00
Sven Grossmann
9f9bf4650d
Loki: Fix missing parameters on Query Builder operations ( #60677 )
...
* add missing mandatory params
* improve naming
* change let to const
2022-12-22 15:31:41 +01:00
Sven Grossmann
932349b5ab
Loki: Fix wrongly escaped label values when using LabelFilter ( #59812 )
...
* change backticks to quotes
* add unescaping to `addFilterAsLabelFilter`
* fix removal of wrong quotes
* change unescape order
2022-12-06 12:30:03 +01:00
Ivana Huckova
4469572b27
Loki: Add support for range aggregations with by grouping ( #56184 )
...
* Loki: Fix unwrapped range operations with grouping
* Update, fix tests
* Fix modeller
2022-10-05 11:32:33 +02:00
Matias Chomicki
7cf2b68e0a
Loki: Remove hardcoded values for LokiOperationId ( #53168 )
2022-08-03 12:50:43 +02:00
Ivana Huckova
77421907b7
Loki: Add support for IP label and line filter in query builder ( #52658 )
...
* Add support for IP line filter
* Add support for IP label filter
* Updates for Explain mode
* Update test
* Remove invalid options in LabelFilterIpMatches
2022-07-25 15:16:04 +02:00
Ivana Huckova
53b8e528fc
Loki: Add unwrap with conversion function to builder ( #52639 )
...
* Loki: Add unwrap with conversion operator to builder
* Update explain section
* Update test
2022-07-25 12:51:28 +02:00
Ivana Huckova
772b6396f5
Loki: Add hints for level-like labels ( #52414 )
...
* Loki: Add hint for level-like label
* Add test to addToQuery
* Add tests
* Update tests
* Update copy
* Get log position in metrics query and add test
* Update
2022-07-22 16:59:25 +02:00
Ivana Huckova
2090534635
Loki: Support json parser with expressions in query builder ( #51965 )
...
* Loki: Support json parser with expressions in query builder
* Add explain docs for json parser
2022-07-12 15:42:01 +02:00
Ivana Huckova
88279dda1c
Loki: Fix issues with using query patterns ( #50414 )
...
* WIP
* Loki: Fix running of query patterns
* Remove console.log
* Add test
* Update empty line filter test
2022-06-11 21:36:44 +02:00
Ivana Huckova
745b101d41
Loki: Fix unwrap parsing ( #49732 )
2022-05-27 14:00:51 +02:00
Ivana Huckova
caa82a124d
Loki,Prometheus: Fix of showing error message for empty query ( #47379 )
...
* Loki,Prometheus: Dont show error on empty query
* Add tests
2022-04-06 11:17:49 +02:00
Ivana Huckova
6938d5b975
Loki: Show error when parsing nodes not supported in visual query builder ( #47321 )
...
* Show error when parsing nodes not supported in visual query builder
* Refactor, simplify
* Spell fix
* Spell fix
2022-04-05 17:07:13 +02:00
Ivana Huckova
4c6d2ce618
Loki: Parse query with unwrap ( #47282 )
...
* Loki: Parse simple unwrap
* Update public/app/plugins/datasource/loki/querybuilder/parsing.ts
* Simplify
2022-04-04 18:44:23 +02:00
Ivana Huckova
24cf70dd29
Loki: Add parsing for vector aggregations with grouping ( #47257 )
...
* Parse aggregations with grouping
* Move getByType to shared parsing utils
2022-04-04 18:11:15 +02:00
Andrej Ocenas
1110666b6b
Loki: Fix parsing chained and scalar binary queries ( #47132 )
...
* Fix bin parsing for more cases
* Add test for some utils
* Removing console.log
* Simplify some code and fix typing
* Rename function
2022-04-01 18:33:09 +02:00
Ivana Huckova
554492ec4e
Loki: Add parsing of query to visual query ( #46700 )
...
* Create parser
* Add parsing
* Update comment
* Remove operations that we don't support
* Resolve type errors
* Update test
* Handle backticks
* Handle backticks
* Remove copied test, update test
* Parsing for binary operations
* Remove error about setting state after unmount
Co-authored-by: Andrej Ocenas <mr.ocenas@gmail.com >
2022-03-31 10:51:49 +02:00