* Introduce response_limit for datasource responses
* Fix lint
* Fix tests
* Add case where limit <= 0 - added parametrized tests
* Add max_bytes_reader.go
* Use new httpclient.MaxBytesReader instead of net/http one
* Fixes according to reviewer's comments
* Add tests for max_bytes_reader
* Add small piece in configuration.md
* Further fixes according to reviewer's comments
* Fix linting - fix test
* Alerting: Persist notification log and silences to the database
This removes the dependency of having persistent disk to run grafana alerting. Instead of regularly flushing the notification log and silences to disk we now flush the binary content of those files to the database encoded as a base64 string.
* Revert "Prometheus: add functionality to specify desired step interval in dashboards panels (#36422)"
This reverts commit ddf5b65c51.
Co-authored-by: Ivana Huckova <ivana.huckova@gmail.com>
* Revert "Explore: add functionality for supporting different step modes in prometheus (#37829)"
This reverts commit f433cfd8d9.
Co-authored-by: Ivana Huckova <ivana.huckova@gmail.com>
* Revert stepMode BE implementation from #36796
Co-authored-by: "Ivana Huckova" <ivana.huckova@gmail.com>
* Change templateCaptureValue to support using template functions
This commit changes templateCaptureValue to use float64 for the value
instead of *float64. This change means that annotations and labels can
use the float64 value with functions such as printf and avoid having to
check for nil. It also means that absent values are now printed as 0.
* Use math.NaN() instead of 0 for absent value
Fix region annotations not displayed correctly when returning timeend column
as epoch timestamp and by that making sure that the returned data frame field
named timeend is treated as time type.
Fixes#38533
* convert SQLs to use sdk contracts
* make draft
* postgres
* intermedia
* get datasourceinfo filled at the beginning of the service
* move the interval into package because of cyclict import and fix all postgres tests
* fix mysql test
* fix mssql
* fix the test for pr https://github.com/grafana/grafana/issues/35839
* fix some issue about intervalv2 package
* update sql test
* wire migration for SQLs
* add sqls to the background process
* make it register instead of register and start
* revert formatting
* fix tests
* fix linter
* remove integration test
* Postgres test fix
Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
* Re-enable devenv dashboard validation
* Open up dashboard schema composition points
* Introduce composition space at front of scuemata
* Refactor go code to use new composition structure
* Bunch of small cleanups in dashboard.cue
* Enable both base and dist tests of devenv
* Get rid of obsolete CUE loading hacks
* Skip weird failures on these tests
Really don't seem to be testing for what we intend them to be testing
for.
* influxdb: influxql: alert: use already-computed interval-value when available
* reverted by-mistake changed import
* simplify code
now we can rely on DataQuery.Interval always being good
* removed unnecessary test
* fix lint-error
* Alerting: Fix alert flapping in the alertmanager
fixes a bug that caused Alerts that are evaluated at low intervals (sub 1 minute), to flap in the Alertmanager.
Mostly due to a combination of `EndsAt` and resend delay.
The Alertmanager uses `EndsAt` as a heuristic to know whenever it should resolve a firing alert, in the case that it hasn't heard
back from the alert generation system.
Because grafana sent the alert with an `EndsAt` which is equal to the `For` of the alert itself,
and we had a hard-coded 1 minute re-send delay (only applicable to firing alerts) this meant that a firing alert would resolve in the Alertmanager before we re-notify that it still firing.
This commit, increases the `EndsAt` by 3x the the resend delay or alert interval (depending on which one is higher). The resendDelay has been decreased to 30 seconds.
* Setup filter
* Enable filtering users by active in last 30 days
* Add loading state
* Update last active age strings
* Tweak user list
* Use theme spacing
* Improve table's accessibility
* Add more aria-labels
* AccessControl: add one-dimensional permissions to datasources in the backend
* AccessControl: add one-dimensional permissions to datasources in the frontend (#38080)
Co-authored-by: Hugo Häggmark <hugo.haggmark@grafana.com>
* LibraryPanels: Separates name from panel title
* WIP
* Chore: fixes update for duplicate lib panels
* Chore: reverts implementation
* Chore: show library options only for library panels
* Chore: ui fixes after PR comments
* Chore: fixes issue when creating library panels