* InfluxDB: Send retention policy with InfluQL queries if it's been specified.
In InfluxDB v2, due to technical limitations of the InfluxDB v1
compatibility layer, retention policies in a query (e.g. "<retention
policy>.<measurement_name>") aren't honored and must be specified in the
URL query parameter `rp` to be applied. Grafana doesn't send this query
parameter which results in all queries resolving to the default
retention policy when querying InfluxDB v2 servers using InfluxQL.
This addresses the issue by sending the `rp` query parameter for queries
that have specified a retention policy in the `target` given to
`runExploreQuery`.
The outcomes are:
1. InfluxQL queries executed against InfluxDB v2 databases will have the
necessary retention policy information for queries like `SHOW FIELD
KEYS FROM measurement` to function correctly.
2. InfluxQL queries executed against InfluxDB v1 databases will be
unaffected, because this `rp` query parameter is unsupported there.
You can read more about the rentention policy mapping behavior of
InfluxDB v2 in our documentation:
- https://docs.influxdata.com/influxdb/v2.6/reference/api/influxdb-1x/dbrp/#when-querying-data
- https://docs.influxdata.com/influxdb/v2.6/reference/api/influxdb-1x/query/#query-a-non-default-retention-policy
* Use the ? operator
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
* schematize data query
* add the stuff you dingus
* feat(testdatasource): add scenario to generated types
* use generated testdata query in frontend
* update code owners
* Add path exception for testdata datasource
* use specific numeric data types
* fix test
* fix e2e smoketest
* add test data query type
* use test data query type
* fix betterer
* Fix typo
* move to experimental
Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>
Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com>
Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
Co-authored-by: sam boyer <sdboyer@grafana.com>
Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>
* Fix recording rules being shown in the rules table on edit group modal
* Show no alerts message when there is not some non-recording rules and add tests
* Move specific mock constants to the test file
* Add config to remove Snapshot functionality (frontend is hidden and validation in the backend)
* Add test cases
* Remove unused mock on the test
* Moving Snapshot config from globar variables to settings.Cfg
* Removing warnings on code
* QueryEditorRow: Fixes issue loading query editor when data source variable selected
* Fix func name
* Removed wait
* restore waiting for with better check
* restore waiting for with better check
* Adapt state timeline to scuemata
* Refactor status history to cue model
* Refactor
* Refactor TimelineChart as a core component
* wip
* Change as per CR
Co-authored-by: sam boyer <sdboyer@grafana.com>
* Add schema for XYChart
* Minor cleanup
* remove unessecary fields from ScatterFieldConfigVeneer, and cleaning up more
* Fix counts
Co-authored-by: sam boyer <sdboyer@grafana.com>
* add: skip_org_role_sync setting for github
* fix: frontend
* rearranged tests
* refactor: assignGrafanaAdmin skip also
* Add: tests for allowGrafanaAdmin
- both for the case when both settings are set and the setting for only
allowGrafanaAdmin
* Apply suggestions from code review
Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
* Update docs/sources/setup-grafana/configure-grafana/_index.md
Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
* Update pkg/login/social/github_oauth.go
Co-authored-by: Ieva <ieva.vasiljeva@grafana.com>
* added vairable inside scope
* Update docs/sources/setup-grafana/configure-security/configure-authentication/github/index.md
* Update docs/sources/setup-grafana/configure-security/configure-authentication/github/index.md
Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
Co-authored-by: Ieva <ieva.vasiljeva@grafana.com>
* Fix recording rules form steps not showing alert information
* Fix docs about creating cloud and recording rules
* Update docs with suggested changes
* Implement log samples
* Explore: Implement logs sample panel
* Log samples: Add documentation
* Update docs
* Add info for log sample
* Fix label
* Update
* Default to true
* Fix copy in test
* Update public/app/features/explore/LogsSamplePanel.tsx
Co-authored-by: Sven Grossmann <sven.grossmann@grafana.com>
* Use timeZone from grafana/schema
* Rename data props to queryResponse
* Unify name to logs sample
* Remove redundant optional parameters in LogsSamplePanel
* Make intervalMs parameter optional in dataFrameToLogsModel and remove undefined argument when not needed
* Fix incorrect position of copy log line button
* Update public/app/core/logsModel.ts
Co-authored-by: Sven Grossmann <sven.grossmann@grafana.com>
Co-authored-by: Sven Grossmann <sven.grossmann@grafana.com>
* Add list of bindings for updating on change
* Revert "Add list of bindings for updating on change"
This reverts commit 092707371d.
* Clear keybindings before component render
* Reduce size of topnav search 'input' to 1/5th of the width, min width 200px
* Open command palette on topnav search box click
* Rename component
* fix comment
* feature flag the change
* update feature flag description