Ivana Huckova
5009c330ca
Loki: Add tests for explain section in builder and code editor ( #53113 )
...
* Loki: Add tests for new explain section
* Update any assertions
2022-08-02 17:20:22 +02:00
Ivana Huckova
b8e4c2abeb
Loki: Move explain section to builder mode ( #52879 )
...
* Loki: Move explain to builder and code mode
* Update
* Update transition
* Fix tests
* Fix tests
* Prometheus: Move explain section to builder mode (#52935 )
* Prometheus: Move explain section to builder mode
* Show explain switch before raw query switch
* Store explain switch value in localstorage
* Make explain available for code mode too
* Introduce useFlag hook for query editor switches
* Remove Explain mode
Co-authored-by: ismail simsek <ismailsimsek09@gmail.com >
2022-07-29 17:09:43 +02:00
Ivana Huckova
3f681114e5
Loki: Show label options for unwrap operation ( #52810 )
...
* Loki: Show options for unwrap operation
* Add comment for check
2022-07-27 10:45:30 +02:00
Scott Lepper
de956fc3d8
Core code editor/builder components ( #52421 )
...
* migrate experimental to core grafana - update refs
Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com >
2022-07-20 12:50:08 -04:00
Ivana Huckova
10cb84e401
Loki: Implement hints for query builder ( #51795 )
...
* Loki: Implement hints for query builder
* Update name of file
* Update imports
* Refactor
* Remove unused import
* Unify
* Revert "Unify"
This reverts commit 78da0e27e3 .
* Unify
* Fix types
* Fix tests
* Fix type error
* Simplify
* Update test
* Add documentation
* Update comment
* Add tests for addParserToQuery
* Smaller updates
2022-07-07 15:49:31 +02:00
Ivana Huckova
66b4a9e6a1
Loki: Remove unused prop from query builder ( #51504 )
2022-06-30 16:02:27 +02:00
Ivana Huckova
60454192b7
Loki: Add e2e test for query builder ( #51314 )
...
* Loki: Add e2e test for query builder
* Update
* Update test
* Update test
* Update test
* Update test
* Add more checks in test
* Update betterer
* Update betterer
2022-06-29 11:04:27 +02:00
Ivana Huckova
0073f1b0b5
Update header ( #50787 )
2022-06-14 16:24:44 +02:00
Ivana Huckova
088a1880d8
Loki, Prometheus: Show Query patterns in all editor modes ( #50263 )
2022-06-13 09:45:01 +02:00
Gábor Farkas
c412a3b052
logs: track the usage of certain features ( #50325 )
...
* logs: track the usage of certain features
* Add report interaction for logs interactions
* mock reportInteraction in test
* mock reportInteraction
Co-authored-by: Ivana Huckova <ivana.huckova@gmail.com >
2022-06-09 15:53:23 +02:00
Ivana Huckova
9f6afb3475
Prometheus, Loki: Update run queries button ( #50005 )
...
* Prometheus, Loki: Updare run queries button
* Update docs
* Update docs
2022-06-07 09:57:56 +02:00
Andrej Ocenas
37aedd6906
Loki: Add user analytics for query editor mode ( #49619 )
...
* Add reportInteraction call
* Update public/app/plugins/datasource/loki/querybuilder/components/LokiQueryEditorSelector.tsx
Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com >
2022-06-06 10:38:45 +02:00
Andrej Ocenas
cc90f9bb69
Prometheus/Loki: Add raw query and syntax highlight in explain mode ( #50070 )
2022-06-02 13:50:58 +02:00
Andrej Ocenas
c63071f519
Prometheus/Loki: Show raw query by default in the builder( #50007 )
2022-06-02 13:50:10 +02:00
Andrej Ocenas
72367cf1ad
Prometheus: Cleanup annotation editor ( #49615 )
...
* Remove unused code
* Remove test
* Remove Builder mode and simplify the code
* Fix step mapping
* Fix import
* change placeholder
2022-05-31 11:50:23 +02:00
Ivana Huckova
5f6b23e45a
AutoSizeInput: Move to @grafana/ui ( #48811 )
...
* AutoSizeInput: Move to @grafana/ui
* Update packages/grafana-ui/src/components/AutoSizeInput/AutoSizeInput.mdx
Co-authored-by: JitaC <70489351+achatterjee-grafana@users.noreply.github.com >
* Update packages/grafana-ui/src/components/AutoSizeInput/AutoSizeInput.mdx
Co-authored-by: JitaC <70489351+achatterjee-grafana@users.noreply.github.com >
* Update packages/grafana-ui/src/components/AutoSizeInput/AutoSizeInput.mdx
Co-authored-by: JitaC <70489351+achatterjee-grafana@users.noreply.github.com >
* Fix linter error
* Update packages/grafana-ui/src/components/AutoSizeInput/AutoSizeInput.mdx
Co-authored-by: JitaC <70489351+achatterjee-grafana@users.noreply.github.com >
* Update packages/grafana-ui/src/components/AutoSizeInput/AutoSizeInput.mdx
Co-authored-by: JitaC <70489351+achatterjee-grafana@users.noreply.github.com >
* Move AutoSizeInput to Input folder
* Use iconOptions in storybook
Co-authored-by: JitaC <70489351+achatterjee-grafana@users.noreply.github.com >
2022-05-30 10:46:33 +02:00
Gábor Farkas
386181cf45
Loki code editor: do not run query on blur in explore mode ( #49241 )
...
* loki code editor: do not run query on blur in explore mode
* loki: code editor: better change tracking
* fixed comment
Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com >
Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com >
2022-05-26 15:03:36 +02:00
Andrej Ocenas
4124294011
Prometheus: Migrate annotation editor to react ( #48814 )
...
* Modify the annotation support api
* Migrate annotation editor component
* Update public/app/features/annotations/standardAnnotationSupport.ts
Co-authored-by: Ryan McKinley <ryantxu@gmail.com >
* Move the escape hatches out of the public API
* Fix props transforms
* Break import cycle
Co-authored-by: Ryan McKinley <ryantxu@gmail.com >
2022-05-24 17:43:58 +02:00
Andrej Ocenas
7cd034f33a
Loki: Cleanup some code for default editorMode ( #49431 )
2022-05-23 19:21:00 +02:00
Ashley Harrison
06d3c27bc1
Select: Portal menu by default ( #48176 )
...
* Remove menuShouldPortal from all <Select /> components
* fix unit tests
* leave menuShouldPortal as an escape hatch
* Fix import order
2022-05-04 15:12:59 +01:00
Alexander Kubyshkin
f00ffb190c
Escape backslashes in regexps in Loki label browser ( #45809 , #47039 ). ( #47412 )
...
* Escape backslashes in regexps in Loki label browser (#45809 , #47039 ).
* Escape values in Loki Query Builder.
* Escape more values in Loki Query Builder.
2022-05-04 12:49:04 +02:00
Ivana Huckova
769be876a5
Loki, Prometheus: Remember preferred editor ( #48580 )
...
* Loki: Remember default editor
* Loki: Add tests
* Prometheus: Set default editor type
* Fix and refactor tests
* Remove unused import
2022-05-03 14:50:13 +02:00
Josh Hunt
3c6e0e8ef8
Chore: ESlint import order ( #44959 )
...
* Add and configure eslint-plugin-import
* Fix the lint:ts npm command
* Autofix + prettier all the files
* Manually fix remaining files
* Move jquery code in jest-setup to external file to safely reorder imports
* Resolve issue caused by circular dependencies within Prometheus
* Update .betterer.results
* Fix missing // @ts-ignore
* ignore iconBundle.ts
* Fix missing // @ts-ignore
2022-04-22 14:33:13 +01:00
Ivana Huckova
ce6aed21a7
Loki: Show raw query and patterns only in query builder ( #48049 )
2022-04-21 14:23:03 +02:00
Ashley Harrison
d832bde270
Upgrade @testing-library/user-event to v14 ( #47898 )
...
* Update dependency @testing-library/user-event to v14
* everything is async...
* everything is async pt.2
* Fix cascader tests
* hack the yarn.lock file to remove the old version of @testing-library/dom
* some more fixes!
* MOAR FIXES
* more fixes
* remove a bunch of places where we're wrapping in act()
* down to 7 failing tests...
* Fix arrow tests
* Fix rest of NavBarItem tests
* Fix last tests
* Use {Enter} instead of {enter}
* Revert "Use {Enter} instead of {enter}"
This reverts commit e72453bb52 .
* remove some unused act imports
* Fix LibraryPanelsSearch tests
* more stable test
* More consistent test...
Co-authored-by: Renovate Bot <bot@renovateapp.com >
2022-04-21 13:15:21 +01:00
Torkel Ödegaard
68aac0bd90
Prometheus/Loki: Fixes the query type option when multiple queries present ( #47846 )
2022-04-20 14:01:01 +02:00
Ivana Huckova
677327ea07
Show error when operations, but no stream selector ( #47890 )
2022-04-19 16:54:08 +02:00
Ivana Huckova
a068712ac2
Loki: Updates to raw query and run query button ( #47874 )
...
* Loki: Create toggle-able raw query
* Update name
2022-04-19 15:29:40 +02:00
Ivana Huckova
2aa6f4d17b
Loki: Fix showing of default visual query only if no expression ( #47764 )
...
* AutoSizeInput: Fix updating of value
* Update
* Revert "Update"
This reverts commit a3b527e0c6 .
* Revert "AutoSizeInput: Fix updating of value"
This reverts commit d4b4ae0a10 .
* Fix showing of default visual query only if no expression
* Update public/app/plugins/datasource/loki/querybuilder/components/LokiQueryBuilderContainer.tsx
* Update public/app/plugins/datasource/loki/querybuilder/components/LokiQueryBuilderContainer.tsx
* Update
* Update
2022-04-19 15:29:27 +02:00
Ivana Huckova
5df05e31bb
Loki: Use single string expr as a state for the visual editor ( #47566 )
...
* Loki: Use expr as state for visual editor
* Loki: Use query with line filter as default for visual editor
* Refactor based on feedback
* fix background for query text row
Co-authored-by: Torkel Ödegaard <torkel@grafana.com >
2022-04-14 10:59:39 +02:00
Andrej Ocenas
0d3879d1c1
Prometheus: Add beta tag to mode switch for Builder mode ( #47376 )
...
* Add beta tag to mode switch
* Fix selectors
2022-04-06 11:50:12 +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
Torkel Ödegaard
feaa4a5c64
Loki: Support binary operations and nested queries in new builder ( #47012 )
...
* Binary ops support
* Add support for nested expressions in loki
* Nested queries working
* Fixing tests
* Share more code between loki and prometheus query modellers
2022-03-29 18:50:07 +02:00
Torkel Ödegaard
5f9cd7b875
Loki: Add aggregate by label support ( #46965 )
...
* Loki: Add aggregate by label support
* Label lookups now work for loki
* Fixed ts issue
* review comment fixed
2022-03-29 17:49:21 +02:00
Torkel Ödegaard
1c648cb52c
Loki: Adds options to the new query builder ( #46783 )
...
* Initial commit for loki builder options
* Loki query options
* Added some basic tests
* Update public/app/plugins/datasource/loki/querybuilder/components/LokiQueryBuilderOptions.test.tsx
Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com >
* Updated options
* All option changes should trigger query
* Fixed ts issue
Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com >
2022-03-25 13:13:55 +01:00
Ivana Huckova
7839fadf00
Loki: Fix fetching of second label set for the streams selector ( #46898 )
...
* Fix fetching of labels
* Add test
2022-03-23 17:59:48 +00:00
Torkel Ödegaard
3b487c2661
Loki: Initial loki builder tests ( #46076 )
2022-03-03 14:30:17 +01:00
Ivana Huckova
c23bc1e7b7
Prometheus: Show variable options in query builder ( #44784 )
...
* Prometheus: Show variable options
* Remove lint error
* Fix test for CodeQL
* Update public/app/plugins/datasource/prometheus/datasource.ts
Co-authored-by: Torkel Ödegaard <torkel@grafana.org >
* Update public/app/plugins/datasource/loki/datasource.ts
Co-authored-by: Torkel Ödegaard <torkel@grafana.org >
Co-authored-by: Torkel Ödegaard <torkel@grafana.org >
2022-02-03 11:40:19 +01:00
Torkel Ödegaard
fb680b3575
Loki: Query builder, hook up instant toggle and improve inline switch ( #44704 )
2022-02-01 13:56:11 +01:00
Torkel Ödegaard
64e1e91403
PromQueryBuilder: Query builder and components that can be shared with a loki query builder and others ( #42854 )
2022-01-31 06:57:14 +00:00