Datasource: Change query filtering (#84656)

* call filterQuery from queryrunner

* test query hide filtering

* fix more broken tests

* lint errrors

* remove redundant filterQuery call

* skip filter in variable queries

* fix broken cypress test

* change tooltip text

* fix translations

* fix comments

* do not execute query is targets are empty

* add more tests

* remove unsued import

* update translations

* revert id change

* change header text

* update comment for hide prop

* rename hide query prop

* change tooltip and introduce different toggle state text

* update tests

* update comment and regenerate types

* run extract again

* fix broken e2e test

* track event

* fix build issues

* revert changes in wire file
This commit is contained in:
Erik Sundell
2024-03-21 13:39:39 +01:00
committed by GitHub
parent 410f5e3e3a
commit 29d4f6a217
29 changed files with 476 additions and 214 deletions

View File

@@ -84,9 +84,7 @@ type DataQuery struct {
// TODO this shouldn't be unknown but DataSourceRef | null
Datasource *any `json:"datasource,omitempty"`
// Hide true if query is disabled (ie should not be returned to the dashboard)
// Note this does not always imply that the query should not be executed since
// the results from a hidden query may be used as the input to other queries (SSE etc)
// If hide is set to true, Grafana will filter out the response(s) associated with this query before returning it to the panel.
Hide *bool `json:"hide,omitempty"`
// Specify the query flavor
@@ -171,9 +169,7 @@ type TestDataDataQuery struct {
ErrorType *TestDataDataQueryErrorType `json:"errorType,omitempty"`
FlamegraphDiff *bool `json:"flamegraphDiff,omitempty"`
// Hide true if query is disabled (ie should not be returned to the dashboard)
// Note this does not always imply that the query should not be executed since
// the results from a hidden query may be used as the input to other queries (SSE etc)
// If hide is set to true, Grafana will filter out the response(s) associated with this query before returning it to the panel.
Hide *bool `json:"hide,omitempty"`
Labels *string `json:"labels,omitempty"`
LevelColumn *bool `json:"levelColumn,omitempty"`