Loki: Add all supported parsers to query builder (#47304)

* Loki: Add all supported parsers to query builderr

* Update test

* Add tests for new parsers
This commit is contained in:
Ivana Huckova
2022-04-05 14:52:06 +02:00
committed by GitHub
parent fea4d1f57a
commit c5ac19d499
5 changed files with 98 additions and 12 deletions

View File

@@ -205,8 +205,7 @@ function getLabelFilter(expr: string, node: SyntaxNode): QueryBuilderOperation {
const label = filter!.firstChild;
const op = label!.nextSibling;
const value = op!.nextSibling;
const params = [getString(expr, label), getString(expr, op), getString(expr, value).replace(/"/g, '')];
const params = [getString(expr, label), getString(expr, op), handleQuotes(getString(expr, value))];
//Special case of pipe filtering - no errors
if (params.join('') === `__error__=`) {
return {