mirror of
https://github.com/grafana/grafana.git
synced 2025-09-19 18:43:12 +08:00
SQL: Add timeFilter macro to query builder (#74575)
* Add timeFilter macro to query builder * Only render SQLWhereRow when fields are there * Change the default query to timeseries and remove 50 limit * Add timeFilter macro for the first time when timeSeries * Add test for timeFilter macro * Lint fix * Annotation query format should be table * Set order by as default * Revert changes that made time series default * Fix e2e test * Fix e2e test * Make sure to reset the date value when operator is changed * Add docs
This commit is contained in:
@ -114,10 +114,17 @@ Add further value columns by clicking the plus button and another column dropdow
|
||||
|
||||
### Filter data (WHERE)
|
||||
|
||||
To add a filter, flip the switch at the top of the editor.
|
||||
Using the first dropdown, select if all the filters need to match (AND) or if only one of the filters needs to match (OR).
|
||||
To add a filter, toggle the **Filter** switch at the top of the editor.
|
||||
This reveals a **Filter by column value** section with two dropdown selectors.
|
||||
|
||||
To add more columns to filter on use the plus button.
|
||||
Use the first dropdown to choose whether all of the filters need to match (`AND`), or if only one of the filters needs to match (`OR`).
|
||||
Use the second dropdown to choose a filter.
|
||||
|
||||
To filter on more columns, click the plus (`+`) button to the right of the condition dropdown.
|
||||
|
||||
To remove a filter, click the `x` button next to that filter's dropdown.
|
||||
|
||||
After selecting a date type column, you can choose Macros from the operators list and select timeFilter which will add the $\_\_timeFilter macro to the query with the selected date column.
|
||||
|
||||
### Group By
|
||||
|
||||
|
Reference in New Issue
Block a user