grafana/public/app/plugins/datasource
Gareth Dawson 4e42f9b619
Loki: Add the ability to prettify logql queries (#64337)
* pushed to get help of a genius

* fix: error response is not json

* feat: make request on click

* refactor: remove print statement

* refactor: remove unnecessary code

* feat: convert grafana variables to value for API request

* use the parser to interpolate and recover the original query (#64591)

* Prettify query: use the parser to interpolate and recover the original query

* Fix typo

Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>

* Fix typo

Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>

* fix: reverse transformation not working

---------

Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
Co-authored-by: Gareth Dawson <gwdawson.work@gmail.com>

* fix: bugs created from merge

* refactor: move prettify code out of monaco editor

* fix: variables with the same value get converted back to the incorect variable

* refactor

* use consistent styling with bigquery

* fix: only allow text/plain and application/json

* fix: only make the request if the query is valid

* endpoint now returns application/json

* prettify from js

* WIP: not all cases are handles, code still needs cleaning up

* WIP

* large refactor, finished support for all pipeline expressions

* add tests for all format functions

* idk why these files changed

* add support for range aggregation expr & refactor

* add support for vector aggregation expressions

* add support for bin op expression

* add support for literal and vector expressions

* add tests and fix some bugs

* add support for distinct and decolorize

* feat: update variable replace and return

* fix: lezer throws an errow when using a range variable

* remove api implementation

* remove api implementation

* remove type assertions

* add feature flag

* update naming

* fix: bug incorrectly formatting unwrap with labelfilter

* support label replace expr

* remove duplicate code (after migration)

* add more tests

* validate query before formatting

* move tests to lezer repo

* add feature tracking

* populate feature tracking with some data

* upgrade lezer version to 0.1.7

* bump lezer to 0.1.8

* add tests

---------

Co-authored-by: Matias Chomicki <matyax@gmail.com>
Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
2023-07-21 13:03:56 +01:00
..
alertmanager GLDS: Text component (#71439) 2023-07-20 12:59:42 +02:00
azuremonitor Chore: Remove pfs.GrafanaPlugin from schemas (#71884) 2023-07-19 03:46:13 -04:00
cloud-monitoring Chore: Remove pfs.GrafanaPlugin from schemas (#71884) 2023-07-19 03:46:13 -04:00
cloudwatch Chore: Remove pfs.GrafanaPlugin from schemas (#71884) 2023-07-19 03:46:13 -04:00
dashboard DS Picker: Use new built-in DS icons (#69797) 2023-06-14 12:36:21 +03:00
elasticsearch Chore: Remove pfs.GrafanaPlugin from schemas (#71884) 2023-07-19 03:46:13 -04:00
grafana DataSourcePicker: refactor file drop out of query group (#68236) 2023-06-21 10:55:55 +02:00
grafana-pyroscope-datasource Chore: Remove pfs.GrafanaPlugin from schemas (#71884) 2023-07-19 03:46:13 -04:00
graphite Chore: Move getSearchFilterScopedVar to @grafana/data (#71839) 2023-07-19 13:56:14 +02:00
influxdb Chore: Influxdb variable type cleanup (#71874) 2023-07-18 18:43:30 +02:00
jaeger Tracing: Move upload trace to button (#69402) 2023-06-23 12:03:00 +01:00
loki Loki: Add the ability to prettify logql queries (#64337) 2023-07-21 13:03:56 +01:00
mixed DS Picker: Use new built-in DS icons (#69797) 2023-06-14 12:36:21 +03:00
mssql SQL Datasources: Reinstate SQL data source behavior around database selection when default configured databases already exist (#65659) 2023-06-06 10:28:52 -06:00
mysql Chore: Upgrade prettier to v3 (#71764) 2023-07-17 15:58:22 +01:00
opentsdb Chore: Upgrade prettier to v3 (#71764) 2023-07-17 15:58:22 +01:00
parca Chore: Remove pfs.GrafanaPlugin from schemas (#71884) 2023-07-19 03:46:13 -04:00
postgres SQL Datasources: Reinstate SQL data source behavior around database selection when default configured databases already exist (#65659) 2023-06-06 10:28:52 -06:00
prometheus Loki: Enable Query Splitting by default (#72094) 2023-07-21 13:53:10 +02:00
tempo Chore: Remove pfs.GrafanaPlugin from schemas (#71884) 2023-07-19 03:46:13 -04:00
testdata Chore: Remove liveTimer reference from testdata (#71997) 2023-07-21 09:18:41 +02:00
zipkin Tracing: Move upload trace to button (#69402) 2023-06-23 12:03:00 +01:00