Loki: Redesign and improve query patterns (#55097)

* WIP

* WIP

* Query patterns: Redesign and improve feature

* Remove duplicated pattern

* Remove empty line

* Refactor

* Add tests

* Update docs and e2e test

* Update public/app/plugins/datasource/loki/querybuilder/LokiQueryModeller.ts

Co-authored-by: Matias Chomicki <matyax@gmail.com>

* Update public/app/plugins/datasource/loki/querybuilder/LokiQueryModeller.ts

Co-authored-by: Matias Chomicki <matyax@gmail.com>

* Update public/app/plugins/datasource/loki/querybuilder/LokiQueryModeller.ts

Co-authored-by: Matias Chomicki <matyax@gmail.com>

* Use capitalize

* Refactor to use QueryPatternsCard component

* Update public/app/plugins/datasource/loki/querybuilder/LokiQueryModeller.ts

Co-authored-by: Matias Chomicki <matyax@gmail.com>

* Update feature tracking for v2

* QueryPatternsCard: Remove unnecessary key

* Update naming for card

* Mock reportInteraction in tests

Co-authored-by: Matias Chomicki <matyax@gmail.com>
This commit is contained in:
Ivana Huckova
2022-09-26 14:03:13 +02:00
committed by GitHub
parent 231de5a32f
commit c0ecdf6783
9 changed files with 446 additions and 55 deletions

View File

@@ -106,11 +106,11 @@ With Loki log browser you can easily navigate through your list of labels and va
In addition to `Run query` button and mode switcher, in builder mode additional elements are available:
| Name | Description |
| -------------- | --------------------------------------------------------------------------------------------------------------------------------- |
| Query patterns | A list of useful operation patterns that can be used to quickly add multiple operations to your query to achieve a specific goal. |
| Explain | Toggle to show a step by step explanation of all query parts and the operations. |
| Raw query | Toggle to show raw query generated by the builder that will be sent to Loki instance. |
| Name | Description |
| --------------------- | --------------------------------------------------------------------------------------------------------------------------------- |
| Kick start your query | A list of useful operation patterns that can be used to quickly add multiple operations to your query to achieve a specific goal. |
| Explain | Toggle to show a step by step explanation of all query parts and the operations. |
| Raw query | Toggle to show raw query generated by the builder that will be sent to Loki instance. |
#### Labels selector
@@ -293,6 +293,6 @@ datasources:
type: jaeger
url: http://jaeger-tracing-query:16686/
access: proxy
# UID should match the datasourceUid in dervidedFields.
# UID should match the datasourceUid in derivedFields.
uid: my_jaeger_uid
```