Loki: Add $__range variable (#36175)

* Add  variable to Loki

* Add tests

* Update, remove redundant options

* Add missing import

* Update docs/sources/datasources/loki.md

Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>

* Update docs/sources/datasources/loki.md

Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
This commit is contained in:
Ivana Huckova
2021-07-06 08:56:01 +02:00
committed by GitHub
co-authored by achatterjee-grafana
parent 3a6ec01c05
commit 666656c925
4 changed files with 64 additions and 6 deletions
@@ -70,7 +70,7 @@ This variable is the ID of the current organization.
## $__range
Currently only supported for Prometheus data sources. This variable represents the range for the current dashboard. It is calculated by `to - from`. It has a millisecond and a second representation called `$__range_ms` and `$__range_s`.
Currently only supported for Prometheus and Loki data sources. This variable represents the range for the current dashboard. It is calculated by `to - from`. It has a millisecond and a second representation called `$__range_ms` and `$__range_s`.
## $__rate_interval