mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Logs: Add toggle behavior support for "filter for" and "filter out" label within Logs Details (#70091)
* Datasource test: fix describe nesting * Parsing: export handleQuotes function * Modify query: add functions to detect the presence of a label and remove it * Loki: add support to toggle filters if already present * Datasource test: fix describe nesting * Loki: add support to toggle filter out if present * Remove label: handle escaped values * Datasource: add test case for escaped label values * Loki: remove = filter when applying != * Remove selector: add support for Selector node being far from Matcher * Modify query: add unit tests * Elasticsearch: create modifyQuery for elastic * Elastic modify query: implement functions * Elasticsearch: implement modifyQuery functions in datasource * Elasticsearch: update datasource test * Loki modify query: check for streamSelectorPositions length * Elasticsearch query has filter: escape filter value in regex * Remove unused type * Modify query: use query modeller instance from module
This commit is contained in:
@@ -597,7 +597,7 @@ function isIntervalVariableError(node: SyntaxNode) {
|
||||
return node?.parent?.type.id === Range;
|
||||
}
|
||||
|
||||
function handleQuotes(string: string) {
|
||||
export function handleQuotes(string: string) {
|
||||
if (string[0] === `"` && string[string.length - 1] === `"`) {
|
||||
return string
|
||||
.substring(1, string.length - 1)
|
||||
|
||||
Reference in New Issue
Block a user