mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Merge remote-tracking branch 'origin/main' into drclau/unistor/replace-authenticators-3
This commit is contained in:
commit
c80c46ca6a
@ -5,7 +5,7 @@
|
||||
//
|
||||
exports[`better eslint`] = {
|
||||
value: `{
|
||||
"e2e/scenes/utils/support/types.ts:5381": [
|
||||
"e2e/old-arch/utils/support/types.ts:5381": [
|
||||
[0, 0, 0, "Do not use any type assertions.", "0"]
|
||||
],
|
||||
"e2e/utils/support/types.ts:5381": [
|
||||
@ -1655,8 +1655,7 @@ exports[`better eslint`] = {
|
||||
"public/app/features/alerting/unified/components/contact-points/ContactPoints.tsx:5381": [
|
||||
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "0"],
|
||||
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "1"],
|
||||
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "2"],
|
||||
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "3"]
|
||||
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "2"]
|
||||
],
|
||||
"public/app/features/alerting/unified/components/contact-points/components/ContactPointsFilter.tsx:5381": [
|
||||
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "0"]
|
||||
@ -1766,12 +1765,6 @@ exports[`better eslint`] = {
|
||||
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "1"],
|
||||
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "2"]
|
||||
],
|
||||
"public/app/features/alerting/unified/components/receivers/DuplicateTemplateView.tsx:5381": [
|
||||
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "0"]
|
||||
],
|
||||
"public/app/features/alerting/unified/components/receivers/EditTemplateView.tsx:5381": [
|
||||
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "0"]
|
||||
],
|
||||
"public/app/features/alerting/unified/components/receivers/GlobalConfigForm.tsx:5381": [
|
||||
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "0"],
|
||||
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "1"],
|
||||
@ -1895,8 +1888,7 @@ exports[`better eslint`] = {
|
||||
],
|
||||
"public/app/features/alerting/unified/components/rule-editor/AnnotationsStep.tsx:5381": [
|
||||
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "0"],
|
||||
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "1"],
|
||||
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "2"]
|
||||
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "1"]
|
||||
],
|
||||
"public/app/features/alerting/unified/components/rule-editor/CloudAlertPreview.tsx:5381": [
|
||||
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "0"],
|
||||
@ -2091,8 +2083,7 @@ exports[`better eslint`] = {
|
||||
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "2"],
|
||||
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "3"],
|
||||
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "4"],
|
||||
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "5"],
|
||||
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "6"]
|
||||
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "5"]
|
||||
],
|
||||
"public/app/features/alerting/unified/components/rule-editor/query-and-alert-condition/SmartAlertTypeDetector.tsx:5381": [
|
||||
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "0"],
|
||||
@ -2776,6 +2767,9 @@ exports[`better eslint`] = {
|
||||
"public/app/features/dashboard-scene/scene/PanelMenuBehavior.tsx:5381": [
|
||||
[0, 0, 0, "Do not use any type assertions.", "0"]
|
||||
],
|
||||
"public/app/features/dashboard-scene/scene/PanelSearchLayout.tsx:5381": [
|
||||
[0, 0, 0, "Do not use any type assertions.", "0"]
|
||||
],
|
||||
"public/app/features/dashboard-scene/scene/row-actions/RowActions.tsx:5381": [
|
||||
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "0"],
|
||||
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "1"],
|
||||
@ -2785,6 +2779,10 @@ exports[`better eslint`] = {
|
||||
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "0"],
|
||||
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "1"]
|
||||
],
|
||||
"public/app/features/dashboard-scene/scene/types.ts:5381": [
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "0"],
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "1"]
|
||||
],
|
||||
"public/app/features/dashboard-scene/serialization/angularMigration.test.ts:5381": [
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "0"]
|
||||
],
|
||||
@ -7228,7 +7226,7 @@ exports[`no undocumented stories`] = {
|
||||
|
||||
exports[`no gf-form usage`] = {
|
||||
value: `{
|
||||
"e2e/scenes/utils/flows/addDataSource.ts:5381": [
|
||||
"e2e/old-arch/utils/flows/addDataSource.ts:5381": [
|
||||
[0, 0, 0, "gf-form usage has been deprecated. Use a component from @grafana/ui or custom CSS instead.", "5381"]
|
||||
],
|
||||
"e2e/utils/flows/addDataSource.ts:5381": [
|
||||
|
197
.drone.yml
197
.drone.yml
@ -18,7 +18,7 @@ services: []
|
||||
steps:
|
||||
- commands:
|
||||
- echo $DRONE_RUNNER_NAME
|
||||
image: alpine:3.19.1
|
||||
image: alpine:3.20.3
|
||||
name: identify-runner
|
||||
- commands:
|
||||
- go build -o ./bin/build -ldflags '-extldflags -static' ./pkg/build/cmd
|
||||
@ -69,7 +69,7 @@ services: []
|
||||
steps:
|
||||
- commands:
|
||||
- echo $DRONE_RUNNER_NAME
|
||||
image: alpine:3.19.1
|
||||
image: alpine:3.20.3
|
||||
name: identify-runner
|
||||
- commands:
|
||||
- go build -o ./bin/build -ldflags '-extldflags -static' ./pkg/build/cmd
|
||||
@ -120,7 +120,7 @@ services: []
|
||||
steps:
|
||||
- commands:
|
||||
- echo $DRONE_RUNNER_NAME
|
||||
image: alpine:3.19.1
|
||||
image: alpine:3.20.3
|
||||
name: identify-runner
|
||||
- commands:
|
||||
- yarn install --immutable || yarn install --immutable
|
||||
@ -178,7 +178,7 @@ services: []
|
||||
steps:
|
||||
- commands:
|
||||
- echo $DRONE_RUNNER_NAME
|
||||
image: alpine:3.19.1
|
||||
image: alpine:3.20.3
|
||||
name: identify-runner
|
||||
- commands:
|
||||
- yarn install --immutable || yarn install --immutable
|
||||
@ -279,7 +279,7 @@ steps:
|
||||
name: clone-enterprise
|
||||
- commands:
|
||||
- echo $DRONE_RUNNER_NAME
|
||||
image: alpine:3.19.1
|
||||
image: alpine:3.20.3
|
||||
name: identify-runner
|
||||
- commands:
|
||||
- yarn install --immutable || yarn install --immutable
|
||||
@ -367,7 +367,7 @@ steps:
|
||||
name: clone-enterprise
|
||||
- commands:
|
||||
- echo $DRONE_RUNNER_NAME
|
||||
image: alpine:3.19.1
|
||||
image: alpine:3.20.3
|
||||
name: identify-runner
|
||||
- commands:
|
||||
- '# It is required that code generated from Thema/CUE be committed and in sync
|
||||
@ -454,7 +454,7 @@ services: []
|
||||
steps:
|
||||
- commands:
|
||||
- echo $DRONE_RUNNER_NAME
|
||||
image: alpine:3.19.1
|
||||
image: alpine:3.20.3
|
||||
name: identify-runner
|
||||
- commands:
|
||||
- go build -o ./bin/build -ldflags '-extldflags -static' ./pkg/build/cmd
|
||||
@ -543,11 +543,11 @@ services: []
|
||||
steps:
|
||||
- commands:
|
||||
- echo $DRONE_RUNNER_NAME
|
||||
image: alpine:3.19.1
|
||||
image: alpine:3.20.3
|
||||
name: identify-runner
|
||||
- commands:
|
||||
- mkdir -p bin
|
||||
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.50/grabpl
|
||||
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.53/grabpl
|
||||
- chmod +x bin/grabpl
|
||||
image: byrnedo/alpine-curl:0.1.8
|
||||
name: grabpl
|
||||
@ -648,7 +648,7 @@ steps:
|
||||
GF_APP_MODE: development
|
||||
GF_SERVER_HTTP_PORT: "3001"
|
||||
GF_SERVER_ROUTER_LOGGING: "1"
|
||||
image: alpine:3.19.1
|
||||
image: alpine:3.20.3
|
||||
name: grafana-server
|
||||
- commands:
|
||||
- ./bin/build e2e-tests --port 3001 --suite dashboards-suite
|
||||
@ -660,14 +660,14 @@ steps:
|
||||
image: cypress/included:13.10.0
|
||||
name: end-to-end-tests-dashboards-suite
|
||||
- commands:
|
||||
- ./bin/build e2e-tests --port 3001 --suite scenes/dashboards-suite
|
||||
- ./bin/build e2e-tests --port 3001 --suite old-arch/dashboards-suite
|
||||
depends_on:
|
||||
- grafana-server
|
||||
- build-test-plugins
|
||||
environment:
|
||||
HOST: grafana-server
|
||||
image: cypress/included:13.10.0
|
||||
name: end-to-end-tests-scenes/dashboards-suite
|
||||
name: end-to-end-tests-old-arch/dashboards-suite
|
||||
- commands:
|
||||
- ./bin/build e2e-tests --port 3001 --suite smoke-tests-suite
|
||||
depends_on:
|
||||
@ -678,14 +678,14 @@ steps:
|
||||
image: cypress/included:13.10.0
|
||||
name: end-to-end-tests-smoke-tests-suite
|
||||
- commands:
|
||||
- ./bin/build e2e-tests --port 3001 --suite scenes/smoke-tests-suite
|
||||
- ./bin/build e2e-tests --port 3001 --suite old-arch/smoke-tests-suite
|
||||
depends_on:
|
||||
- grafana-server
|
||||
- build-test-plugins
|
||||
environment:
|
||||
HOST: grafana-server
|
||||
image: cypress/included:13.10.0
|
||||
name: end-to-end-tests-scenes/smoke-tests-suite
|
||||
name: end-to-end-tests-old-arch/smoke-tests-suite
|
||||
- commands:
|
||||
- ./bin/build e2e-tests --port 3001 --suite panels-suite
|
||||
depends_on:
|
||||
@ -696,14 +696,14 @@ steps:
|
||||
image: cypress/included:13.10.0
|
||||
name: end-to-end-tests-panels-suite
|
||||
- commands:
|
||||
- ./bin/build e2e-tests --port 3001 --suite scenes/panels-suite
|
||||
- ./bin/build e2e-tests --port 3001 --suite old-arch/panels-suite
|
||||
depends_on:
|
||||
- grafana-server
|
||||
- build-test-plugins
|
||||
environment:
|
||||
HOST: grafana-server
|
||||
image: cypress/included:13.10.0
|
||||
name: end-to-end-tests-scenes/panels-suite
|
||||
name: end-to-end-tests-old-arch/panels-suite
|
||||
- commands:
|
||||
- ./bin/build e2e-tests --port 3001 --suite various-suite
|
||||
depends_on:
|
||||
@ -714,14 +714,14 @@ steps:
|
||||
image: cypress/included:13.10.0
|
||||
name: end-to-end-tests-various-suite
|
||||
- commands:
|
||||
- ./bin/build e2e-tests --port 3001 --suite scenes/various-suite
|
||||
- ./bin/build e2e-tests --port 3001 --suite old-arch/various-suite
|
||||
depends_on:
|
||||
- grafana-server
|
||||
- build-test-plugins
|
||||
environment:
|
||||
HOST: grafana-server
|
||||
image: cypress/included:13.10.0
|
||||
name: end-to-end-tests-scenes/various-suite
|
||||
name: end-to-end-tests-old-arch/various-suite
|
||||
- commands:
|
||||
- cd /
|
||||
- ./cpp-e2e/scripts/ci-run.sh azure ${DRONE_SOURCE_BRANCH}
|
||||
@ -868,7 +868,7 @@ steps:
|
||||
- /src/grafana-build artifacts -a docker:grafana:linux/amd64 -a docker:grafana:linux/amd64:ubuntu
|
||||
-a docker:grafana:linux/arm64 -a docker:grafana:linux/arm64:ubuntu -a docker:grafana:linux/arm/v7
|
||||
-a docker:grafana:linux/arm/v7:ubuntu --yarn-cache=$$YARN_CACHE_FOLDER --build-id=$$DRONE_BUILD_NUMBER
|
||||
--go-version=1.23.1 --ubuntu-base=ubuntu:22.04 --alpine-base=alpine:3.19.1 --tag-format='{{
|
||||
--go-version=1.23.1 --ubuntu-base=ubuntu:22.04 --alpine-base=alpine:3.20.3 --tag-format='{{
|
||||
.version_base }}-{{ .buildID }}-{{ .arch }}' --grafana-dir=$$PWD --ubuntu-tag-format='{{
|
||||
.version_base }}-{{ .buildID }}-ubuntu-{{ .arch }}' > docker.txt
|
||||
- find ./dist -name '*docker*.tar.gz' -type f | xargs -n1 docker load -i
|
||||
@ -1003,7 +1003,7 @@ steps:
|
||||
name: clone-enterprise
|
||||
- commands:
|
||||
- mkdir -p bin
|
||||
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.50/grabpl
|
||||
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.53/grabpl
|
||||
- chmod +x bin/grabpl
|
||||
image: byrnedo/alpine-curl:0.1.8
|
||||
name: grabpl
|
||||
@ -1016,7 +1016,7 @@ steps:
|
||||
name: compile-build-cmd
|
||||
- commands:
|
||||
- echo $DRONE_RUNNER_NAME
|
||||
image: alpine:3.19.1
|
||||
image: alpine:3.20.3
|
||||
name: identify-runner
|
||||
- commands:
|
||||
- '# It is required that code generated from Thema/CUE be committed and in sync
|
||||
@ -1205,7 +1205,7 @@ services: []
|
||||
steps:
|
||||
- commands:
|
||||
- echo $DRONE_RUNNER_NAME
|
||||
image: alpine:3.19.1
|
||||
image: alpine:3.20.3
|
||||
name: identify-runner
|
||||
- commands:
|
||||
- yarn install --immutable || yarn install --immutable
|
||||
@ -1562,7 +1562,7 @@ services: []
|
||||
steps:
|
||||
- commands:
|
||||
- echo $DRONE_RUNNER_NAME
|
||||
image: alpine:3.19.1
|
||||
image: alpine:3.20.3
|
||||
name: identify-runner
|
||||
- commands:
|
||||
- yarn install --immutable || yarn install --immutable
|
||||
@ -1638,7 +1638,7 @@ services: []
|
||||
steps:
|
||||
- commands:
|
||||
- echo $DRONE_RUNNER_NAME
|
||||
image: alpine:3.19.1
|
||||
image: alpine:3.20.3
|
||||
name: identify-runner
|
||||
- commands:
|
||||
- yarn install --immutable || yarn install --immutable
|
||||
@ -1696,7 +1696,7 @@ services: []
|
||||
steps:
|
||||
- commands:
|
||||
- echo $DRONE_RUNNER_NAME
|
||||
image: alpine:3.19.1
|
||||
image: alpine:3.20.3
|
||||
name: identify-runner
|
||||
- commands:
|
||||
- yarn install --immutable || yarn install --immutable
|
||||
@ -1762,7 +1762,7 @@ services: []
|
||||
steps:
|
||||
- commands:
|
||||
- echo $DRONE_RUNNER_NAME
|
||||
image: alpine:3.19.1
|
||||
image: alpine:3.20.3
|
||||
name: identify-runner
|
||||
- commands:
|
||||
- '# It is required that code generated from Thema/CUE be committed and in sync
|
||||
@ -1842,7 +1842,7 @@ services: []
|
||||
steps:
|
||||
- commands:
|
||||
- echo $DRONE_RUNNER_NAME
|
||||
image: alpine:3.19.1
|
||||
image: alpine:3.20.3
|
||||
name: identify-runner
|
||||
- commands:
|
||||
- go build -o ./bin/build -ldflags '-extldflags -static' ./pkg/build/cmd
|
||||
@ -1908,7 +1908,7 @@ services: []
|
||||
steps:
|
||||
- commands:
|
||||
- echo $DRONE_RUNNER_NAME
|
||||
image: alpine:3.19.1
|
||||
image: alpine:3.20.3
|
||||
name: identify-runner
|
||||
- commands:
|
||||
- yarn install --immutable || yarn install --immutable
|
||||
@ -1968,11 +1968,11 @@ services: []
|
||||
steps:
|
||||
- commands:
|
||||
- echo $DRONE_RUNNER_NAME
|
||||
image: alpine:3.19.1
|
||||
image: alpine:3.20.3
|
||||
name: identify-runner
|
||||
- commands:
|
||||
- mkdir -p bin
|
||||
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.50/grabpl
|
||||
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.53/grabpl
|
||||
- chmod +x bin/grabpl
|
||||
image: byrnedo/alpine-curl:0.1.8
|
||||
name: grabpl
|
||||
@ -2072,7 +2072,7 @@ steps:
|
||||
GF_APP_MODE: development
|
||||
GF_SERVER_HTTP_PORT: "3001"
|
||||
GF_SERVER_ROUTER_LOGGING: "1"
|
||||
image: alpine:3.19.1
|
||||
image: alpine:3.20.3
|
||||
name: grafana-server
|
||||
- commands:
|
||||
- ./bin/build e2e-tests --port 3001 --suite dashboards-suite
|
||||
@ -2084,14 +2084,14 @@ steps:
|
||||
image: cypress/included:13.10.0
|
||||
name: end-to-end-tests-dashboards-suite
|
||||
- commands:
|
||||
- ./bin/build e2e-tests --port 3001 --suite scenes/dashboards-suite
|
||||
- ./bin/build e2e-tests --port 3001 --suite old-arch/dashboards-suite
|
||||
depends_on:
|
||||
- grafana-server
|
||||
- build-test-plugins
|
||||
environment:
|
||||
HOST: grafana-server
|
||||
image: cypress/included:13.10.0
|
||||
name: end-to-end-tests-scenes/dashboards-suite
|
||||
name: end-to-end-tests-old-arch/dashboards-suite
|
||||
- commands:
|
||||
- ./bin/build e2e-tests --port 3001 --suite smoke-tests-suite
|
||||
depends_on:
|
||||
@ -2102,14 +2102,14 @@ steps:
|
||||
image: cypress/included:13.10.0
|
||||
name: end-to-end-tests-smoke-tests-suite
|
||||
- commands:
|
||||
- ./bin/build e2e-tests --port 3001 --suite scenes/smoke-tests-suite
|
||||
- ./bin/build e2e-tests --port 3001 --suite old-arch/smoke-tests-suite
|
||||
depends_on:
|
||||
- grafana-server
|
||||
- build-test-plugins
|
||||
environment:
|
||||
HOST: grafana-server
|
||||
image: cypress/included:13.10.0
|
||||
name: end-to-end-tests-scenes/smoke-tests-suite
|
||||
name: end-to-end-tests-old-arch/smoke-tests-suite
|
||||
- commands:
|
||||
- ./bin/build e2e-tests --port 3001 --suite panels-suite
|
||||
depends_on:
|
||||
@ -2120,14 +2120,14 @@ steps:
|
||||
image: cypress/included:13.10.0
|
||||
name: end-to-end-tests-panels-suite
|
||||
- commands:
|
||||
- ./bin/build e2e-tests --port 3001 --suite scenes/panels-suite
|
||||
- ./bin/build e2e-tests --port 3001 --suite old-arch/panels-suite
|
||||
depends_on:
|
||||
- grafana-server
|
||||
- build-test-plugins
|
||||
environment:
|
||||
HOST: grafana-server
|
||||
image: cypress/included:13.10.0
|
||||
name: end-to-end-tests-scenes/panels-suite
|
||||
name: end-to-end-tests-old-arch/panels-suite
|
||||
- commands:
|
||||
- ./bin/build e2e-tests --port 3001 --suite various-suite
|
||||
depends_on:
|
||||
@ -2138,14 +2138,14 @@ steps:
|
||||
image: cypress/included:13.10.0
|
||||
name: end-to-end-tests-various-suite
|
||||
- commands:
|
||||
- ./bin/build e2e-tests --port 3001 --suite scenes/various-suite
|
||||
- ./bin/build e2e-tests --port 3001 --suite old-arch/various-suite
|
||||
depends_on:
|
||||
- grafana-server
|
||||
- build-test-plugins
|
||||
environment:
|
||||
HOST: grafana-server
|
||||
image: cypress/included:13.10.0
|
||||
name: end-to-end-tests-scenes/various-suite
|
||||
name: end-to-end-tests-old-arch/various-suite
|
||||
- commands:
|
||||
- cd /
|
||||
- ./cpp-e2e/scripts/ci-run.sh azure ${DRONE_SOURCE_BRANCH}
|
||||
@ -2328,7 +2328,7 @@ steps:
|
||||
- /src/grafana-build artifacts -a docker:grafana:linux/amd64 -a docker:grafana:linux/amd64:ubuntu
|
||||
-a docker:grafana:linux/arm64 -a docker:grafana:linux/arm64:ubuntu -a docker:grafana:linux/arm/v7
|
||||
-a docker:grafana:linux/arm/v7:ubuntu --yarn-cache=$$YARN_CACHE_FOLDER --build-id=$$DRONE_BUILD_NUMBER
|
||||
--go-version=1.23.1 --ubuntu-base=ubuntu:22.04 --alpine-base=alpine:3.19.1 --tag-format='{{
|
||||
--go-version=1.23.1 --ubuntu-base=ubuntu:22.04 --alpine-base=alpine:3.20.3 --tag-format='{{
|
||||
.version_base }}-{{ .buildID }}-{{ .arch }}' --grafana-dir=$$PWD --ubuntu-tag-format='{{
|
||||
.version_base }}-{{ .buildID }}-ubuntu-{{ .arch }}' > docker.txt
|
||||
- find ./dist -name '*docker*.tar.gz' -type f | xargs -n1 docker load -i
|
||||
@ -2525,7 +2525,7 @@ services:
|
||||
steps:
|
||||
- commands:
|
||||
- mkdir -p bin
|
||||
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.50/grabpl
|
||||
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.53/grabpl
|
||||
- chmod +x bin/grabpl
|
||||
image: byrnedo/alpine-curl:0.1.8
|
||||
name: grabpl
|
||||
@ -2538,7 +2538,7 @@ steps:
|
||||
name: compile-build-cmd
|
||||
- commands:
|
||||
- echo $DRONE_RUNNER_NAME
|
||||
image: alpine:3.19.1
|
||||
image: alpine:3.20.3
|
||||
name: identify-runner
|
||||
- commands:
|
||||
- '# It is required that code generated from Thema/CUE be committed and in sync
|
||||
@ -2730,7 +2730,7 @@ steps:
|
||||
name: identify-runner
|
||||
- commands:
|
||||
- $$ProgressPreference = "SilentlyContinue"
|
||||
- Invoke-WebRequest https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.50/windows/grabpl.exe
|
||||
- Invoke-WebRequest https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.53/windows/grabpl.exe
|
||||
-OutFile grabpl.exe
|
||||
image: grafana/ci-wix:0.1.1
|
||||
name: windows-init
|
||||
@ -2856,7 +2856,7 @@ services: []
|
||||
steps:
|
||||
- commands:
|
||||
- echo $DRONE_RUNNER_NAME
|
||||
image: alpine:3.19.1
|
||||
image: alpine:3.20.3
|
||||
name: identify-runner
|
||||
- commands:
|
||||
- yarn install --immutable || yarn install --immutable
|
||||
@ -2912,7 +2912,7 @@ services: []
|
||||
steps:
|
||||
- commands:
|
||||
- echo $DRONE_RUNNER_NAME
|
||||
image: alpine:3.19.1
|
||||
image: alpine:3.20.3
|
||||
name: identify-runner
|
||||
- commands:
|
||||
- yarn install --immutable || yarn install --immutable
|
||||
@ -2976,7 +2976,7 @@ services: []
|
||||
steps:
|
||||
- commands:
|
||||
- echo $DRONE_RUNNER_NAME
|
||||
image: alpine:3.19.1
|
||||
image: alpine:3.20.3
|
||||
name: identify-runner
|
||||
- commands:
|
||||
- '# It is required that code generated from Thema/CUE be committed and in sync
|
||||
@ -3054,7 +3054,7 @@ services: []
|
||||
steps:
|
||||
- commands:
|
||||
- echo $DRONE_RUNNER_NAME
|
||||
image: alpine:3.19.1
|
||||
image: alpine:3.20.3
|
||||
name: identify-runner
|
||||
- commands:
|
||||
- go build -o ./bin/build -ldflags '-extldflags -static' ./pkg/build/cmd
|
||||
@ -3157,7 +3157,7 @@ services:
|
||||
steps:
|
||||
- commands:
|
||||
- mkdir -p bin
|
||||
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.50/grabpl
|
||||
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.53/grabpl
|
||||
- chmod +x bin/grabpl
|
||||
image: byrnedo/alpine-curl:0.1.8
|
||||
name: grabpl
|
||||
@ -3170,7 +3170,7 @@ steps:
|
||||
name: compile-build-cmd
|
||||
- commands:
|
||||
- echo $DRONE_RUNNER_NAME
|
||||
image: alpine:3.19.1
|
||||
image: alpine:3.20.3
|
||||
name: identify-runner
|
||||
- commands:
|
||||
- '# It is required that code generated from Thema/CUE be committed and in sync
|
||||
@ -3398,11 +3398,11 @@ services: []
|
||||
steps:
|
||||
- commands:
|
||||
- echo $DRONE_RUNNER_NAME
|
||||
image: alpine:3.19.1
|
||||
image: alpine:3.20.3
|
||||
name: identify-runner
|
||||
- commands:
|
||||
- mkdir -p bin
|
||||
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.50/grabpl
|
||||
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.53/grabpl
|
||||
- chmod +x bin/grabpl
|
||||
image: byrnedo/alpine-curl:0.1.8
|
||||
name: grabpl
|
||||
@ -3529,11 +3529,11 @@ services: []
|
||||
steps:
|
||||
- commands:
|
||||
- echo $DRONE_RUNNER_NAME
|
||||
image: alpine:3.19.1
|
||||
image: alpine:3.20.3
|
||||
name: identify-runner
|
||||
- commands:
|
||||
- mkdir -p bin
|
||||
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.50/grabpl
|
||||
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.53/grabpl
|
||||
- chmod +x bin/grabpl
|
||||
image: byrnedo/alpine-curl:0.1.8
|
||||
name: grabpl
|
||||
@ -3868,14 +3868,14 @@ steps:
|
||||
- echo "deb [signed-by=/etc/apt/keyrings/grafana.gpg] https://apt.grafana.com stable
|
||||
main" | tee -a /etc/apt/sources.list.d/grafana.list
|
||||
- 'echo "Step 5: Installing Grafana..."'
|
||||
- for i in $(seq 1 10); do
|
||||
- for i in $(seq 1 60); do
|
||||
- ' if apt-get update >/dev/null 2>&1 && DEBIAN_FRONTEND=noninteractive apt-get
|
||||
install -yq grafana=${TAG} >/dev/null 2>&1; then'
|
||||
- ' echo "Command succeeded on attempt $i"'
|
||||
- ' break'
|
||||
- ' else'
|
||||
- ' echo "Attempt $i failed"'
|
||||
- ' if [ $i -eq 10 ]; then'
|
||||
- ' if [ $i -eq 60 ]; then'
|
||||
- ' echo ''All attempts failed'''
|
||||
- ' exit 1'
|
||||
- ' fi'
|
||||
@ -3918,13 +3918,13 @@ steps:
|
||||
- dnf list available grafana-${TAG}
|
||||
- if [ $? -eq 0 ]; then
|
||||
- ' echo "Grafana package found in repository. Installing from repo..."'
|
||||
- for i in $(seq 1 5); do
|
||||
- for i in $(seq 1 60); do
|
||||
- ' if dnf install -y --nogpgcheck grafana-${TAG} >/dev/null 2>&1; then'
|
||||
- ' echo "Command succeeded on attempt $i"'
|
||||
- ' break'
|
||||
- ' else'
|
||||
- ' echo "Attempt $i failed"'
|
||||
- ' if [ $i -eq 5 ]; then'
|
||||
- ' if [ $i -eq 60 ]; then'
|
||||
- ' echo ''All attempts failed'''
|
||||
- ' exit 1'
|
||||
- ' fi'
|
||||
@ -4045,14 +4045,14 @@ steps:
|
||||
- echo "deb [signed-by=/etc/apt/keyrings/grafana.gpg] https://apt.grafana.com stable
|
||||
main" | tee -a /etc/apt/sources.list.d/grafana.list
|
||||
- 'echo "Step 5: Installing Grafana..."'
|
||||
- for i in $(seq 1 10); do
|
||||
- for i in $(seq 1 60); do
|
||||
- ' if apt-get update >/dev/null 2>&1 && DEBIAN_FRONTEND=noninteractive apt-get
|
||||
install -yq grafana=${TAG} >/dev/null 2>&1; then'
|
||||
- ' echo "Command succeeded on attempt $i"'
|
||||
- ' break'
|
||||
- ' else'
|
||||
- ' echo "Attempt $i failed"'
|
||||
- ' if [ $i -eq 10 ]; then'
|
||||
- ' if [ $i -eq 60 ]; then'
|
||||
- ' echo ''All attempts failed'''
|
||||
- ' exit 1'
|
||||
- ' fi'
|
||||
@ -4096,13 +4096,13 @@ steps:
|
||||
- dnf list available grafana-${TAG}
|
||||
- if [ $? -eq 0 ]; then
|
||||
- ' echo "Grafana package found in repository. Installing from repo..."'
|
||||
- for i in $(seq 1 5); do
|
||||
- for i in $(seq 1 60); do
|
||||
- ' if dnf install -y --nogpgcheck grafana-${TAG} >/dev/null 2>&1; then'
|
||||
- ' echo "Command succeeded on attempt $i"'
|
||||
- ' break'
|
||||
- ' else'
|
||||
- ' echo "Attempt $i failed"'
|
||||
- ' if [ $i -eq 5 ]; then'
|
||||
- ' if [ $i -eq 60 ]; then'
|
||||
- ' echo ''All attempts failed'''
|
||||
- ' exit 1'
|
||||
- ' fi'
|
||||
@ -4165,6 +4165,49 @@ volumes:
|
||||
path: /var/run/docker.sock
|
||||
name: docker
|
||||
---
|
||||
clone:
|
||||
retries: 3
|
||||
depends_on: []
|
||||
image_pull_secrets:
|
||||
- gcr
|
||||
- gar
|
||||
kind: pipeline
|
||||
name: publish-grafanacom
|
||||
node:
|
||||
type: no-parallel
|
||||
platform:
|
||||
arch: amd64
|
||||
os: linux
|
||||
services: []
|
||||
steps:
|
||||
- commands:
|
||||
- go build -o ./bin/build -ldflags '-extldflags -static' ./pkg/build/cmd
|
||||
depends_on: []
|
||||
environment:
|
||||
CGO_ENABLED: 0
|
||||
image: golang:1.23.1-alpine
|
||||
name: compile-build-cmd
|
||||
- commands:
|
||||
- ./bin/build publish grafana-com --edition oss ${DRONE_TAG}
|
||||
depends_on:
|
||||
- compile-build-cmd
|
||||
environment:
|
||||
GCP_KEY:
|
||||
from_secret: gcp_grafanauploads_base64
|
||||
GRAFANA_COM_API_KEY:
|
||||
from_secret: grafana_api_key
|
||||
image: grafana/grafana-ci-deploy:1.3.3
|
||||
name: publish-grafanacom
|
||||
trigger:
|
||||
event:
|
||||
- promote
|
||||
target: publish-grafanacom
|
||||
type: docker
|
||||
volumes:
|
||||
- host:
|
||||
path: /var/run/docker.sock
|
||||
name: docker
|
||||
---
|
||||
clone:
|
||||
retries: 3
|
||||
depends_on:
|
||||
@ -4188,7 +4231,7 @@ steps:
|
||||
environment:
|
||||
_EXPERIMENTAL_DAGGER_CLOUD_TOKEN:
|
||||
from_secret: dagger_token
|
||||
ALPINE_BASE: alpine:3.19.1
|
||||
ALPINE_BASE: alpine:3.20.3
|
||||
CDN_DESTINATION:
|
||||
from_secret: rgm_cdn_destination
|
||||
DESTINATION:
|
||||
@ -4305,7 +4348,7 @@ services: []
|
||||
steps:
|
||||
- commands:
|
||||
- echo $DRONE_RUNNER_NAME
|
||||
image: alpine:3.19.1
|
||||
image: alpine:3.20.3
|
||||
name: identify-runner
|
||||
- commands:
|
||||
- yarn install --immutable || yarn install --immutable
|
||||
@ -4361,7 +4404,7 @@ services: []
|
||||
steps:
|
||||
- commands:
|
||||
- echo $DRONE_RUNNER_NAME
|
||||
image: alpine:3.19.1
|
||||
image: alpine:3.20.3
|
||||
name: identify-runner
|
||||
- commands:
|
||||
- '# It is required that code generated from Thema/CUE be committed and in sync
|
||||
@ -4443,7 +4486,7 @@ steps:
|
||||
environment:
|
||||
_EXPERIMENTAL_DAGGER_CLOUD_TOKEN:
|
||||
from_secret: dagger_token
|
||||
ALPINE_BASE: alpine:3.19.1
|
||||
ALPINE_BASE: alpine:3.20.3
|
||||
CDN_DESTINATION:
|
||||
from_secret: rgm_cdn_destination
|
||||
DESTINATION:
|
||||
@ -4514,7 +4557,7 @@ steps:
|
||||
name: identify-runner
|
||||
- commands:
|
||||
- $$ProgressPreference = "SilentlyContinue"
|
||||
- Invoke-WebRequest https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.50/windows/grabpl.exe
|
||||
- Invoke-WebRequest https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.53/windows/grabpl.exe
|
||||
-OutFile grabpl.exe
|
||||
image: grafana/ci-wix:0.1.1
|
||||
name: windows-init
|
||||
@ -4626,7 +4669,7 @@ steps:
|
||||
environment:
|
||||
_EXPERIMENTAL_DAGGER_CLOUD_TOKEN:
|
||||
from_secret: dagger_token
|
||||
ALPINE_BASE: alpine:3.19.1
|
||||
ALPINE_BASE: alpine:3.20.3
|
||||
CDN_DESTINATION:
|
||||
from_secret: rgm_cdn_destination
|
||||
DESTINATION:
|
||||
@ -4728,7 +4771,7 @@ services: []
|
||||
steps:
|
||||
- commands:
|
||||
- echo $DRONE_RUNNER_NAME
|
||||
image: alpine:3.19.1
|
||||
image: alpine:3.20.3
|
||||
name: identify-runner
|
||||
- commands:
|
||||
- yarn install --immutable || yarn install --immutable
|
||||
@ -4782,7 +4825,7 @@ services: []
|
||||
steps:
|
||||
- commands:
|
||||
- echo $DRONE_RUNNER_NAME
|
||||
image: alpine:3.19.1
|
||||
image: alpine:3.20.3
|
||||
name: identify-runner
|
||||
- commands:
|
||||
- '# It is required that code generated from Thema/CUE be committed and in sync
|
||||
@ -4862,7 +4905,7 @@ steps:
|
||||
environment:
|
||||
_EXPERIMENTAL_DAGGER_CLOUD_TOKEN:
|
||||
from_secret: dagger_token
|
||||
ALPINE_BASE: alpine:3.19.1
|
||||
ALPINE_BASE: alpine:3.20.3
|
||||
CDN_DESTINATION:
|
||||
from_secret: rgm_cdn_destination
|
||||
DESTINATION:
|
||||
@ -5009,7 +5052,7 @@ steps:
|
||||
environment:
|
||||
_EXPERIMENTAL_DAGGER_CLOUD_TOKEN:
|
||||
from_secret: dagger_token
|
||||
ALPINE_BASE: alpine:3.19.1
|
||||
ALPINE_BASE: alpine:3.20.3
|
||||
CDN_DESTINATION:
|
||||
from_secret: rgm_cdn_destination
|
||||
DESTINATION:
|
||||
@ -5119,7 +5162,7 @@ steps:
|
||||
environment:
|
||||
_EXPERIMENTAL_DAGGER_CLOUD_TOKEN:
|
||||
from_secret: dagger_token
|
||||
ALPINE_BASE: alpine:3.19.1
|
||||
ALPINE_BASE: alpine:3.20.3
|
||||
CDN_DESTINATION:
|
||||
from_secret: rgm_cdn_destination
|
||||
DESTINATION:
|
||||
@ -5316,13 +5359,13 @@ services:
|
||||
steps:
|
||||
- commands:
|
||||
- mkdir -p bin
|
||||
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.50/grabpl
|
||||
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.53/grabpl
|
||||
- chmod +x bin/grabpl
|
||||
image: byrnedo/alpine-curl:0.1.8
|
||||
name: grabpl
|
||||
- commands:
|
||||
- echo $DRONE_RUNNER_NAME
|
||||
image: alpine:3.19.1
|
||||
image: alpine:3.20.3
|
||||
name: identify-runner
|
||||
- commands:
|
||||
- '# It is required that code generated from Thema/CUE be committed and in sync
|
||||
@ -5820,7 +5863,7 @@ steps:
|
||||
- trivy --exit-code 0 --severity UNKNOWN,LOW,MEDIUM node:20-bookworm
|
||||
- trivy --exit-code 0 --severity UNKNOWN,LOW,MEDIUM google/cloud-sdk:431.0.0
|
||||
- trivy --exit-code 0 --severity UNKNOWN,LOW,MEDIUM grafana/grafana-ci-deploy:1.3.3
|
||||
- trivy --exit-code 0 --severity UNKNOWN,LOW,MEDIUM alpine:3.19.1
|
||||
- trivy --exit-code 0 --severity UNKNOWN,LOW,MEDIUM alpine:3.20.3
|
||||
- trivy --exit-code 0 --severity UNKNOWN,LOW,MEDIUM ubuntu:22.04
|
||||
- trivy --exit-code 0 --severity UNKNOWN,LOW,MEDIUM byrnedo/alpine-curl:0.1.8
|
||||
- trivy --exit-code 0 --severity UNKNOWN,LOW,MEDIUM plugins/slack
|
||||
@ -5857,7 +5900,7 @@ steps:
|
||||
- trivy --exit-code 1 --severity HIGH,CRITICAL node:20-bookworm
|
||||
- trivy --exit-code 1 --severity HIGH,CRITICAL google/cloud-sdk:431.0.0
|
||||
- trivy --exit-code 1 --severity HIGH,CRITICAL grafana/grafana-ci-deploy:1.3.3
|
||||
- trivy --exit-code 1 --severity HIGH,CRITICAL alpine:3.19.1
|
||||
- trivy --exit-code 1 --severity HIGH,CRITICAL alpine:3.20.3
|
||||
- trivy --exit-code 1 --severity HIGH,CRITICAL ubuntu:22.04
|
||||
- trivy --exit-code 1 --severity HIGH,CRITICAL byrnedo/alpine-curl:0.1.8
|
||||
- trivy --exit-code 1 --severity HIGH,CRITICAL plugins/slack
|
||||
@ -6108,6 +6151,6 @@ kind: secret
|
||||
name: gcr_credentials
|
||||
---
|
||||
kind: signature
|
||||
hmac: 7335b2e56769f72716f5dac524741e423abb99eacf775fa635e59c2d658c8aee
|
||||
hmac: 766cd43d479f82bdb5bbaa3b48ed87ad13ea71d3418deb5d0c89ec7b77ae0475
|
||||
|
||||
...
|
||||
|
16
.github/CODEOWNERS
vendored
16
.github/CODEOWNERS
vendored
@ -80,7 +80,16 @@
|
||||
/pkg/apis/query @grafana/grafana-datasources-core-services
|
||||
/pkg/bus/ @grafana/grafana-search-and-storage
|
||||
/pkg/cmd/ @grafana/grafana-backend-group
|
||||
/pkg/cmd/grafana/apiserver @grafana/grafana-app-platform-squad
|
||||
/pkg/cmd/grafana-cli/commands/install_command.go @grafana/plugins-platform-backend
|
||||
/pkg/cmd/grafana-cli/commands/install_command_test.go @grafana/plugins-platform-backend
|
||||
/pkg/cmd/grafana-cli/commands/listremote_command.go @grafana/plugins-platform-backend
|
||||
/pkg/cmd/grafana-cli/commands/listversions_command.go @grafana/plugins-platform-backend
|
||||
/pkg/cmd/grafana-cli/commands/ls_command_test.go @grafana/plugins-platform-backend
|
||||
/pkg/cmd/grafana-cli/commands/ls_command.go @grafana/plugins-platform-backend
|
||||
/pkg/cmd/grafana-cli/commands/remove_command.go @grafana/plugins-platform-backend
|
||||
/pkg/cmd/grafana-cli/commands/upgrade_command.go @grafana/plugins-platform-backend
|
||||
/pkg/cmd/grafana-cli/commands/upgrade_all_command.go @grafana/plugins-platform-backend
|
||||
/pkg/cmd/grafana-cli/commands/upgrade_all_command_test.go @grafana/plugins-platform-backend
|
||||
/pkg/components/apikeygen/ @grafana/identity-squad
|
||||
/pkg/components/satokengen/ @grafana/identity-squad
|
||||
/pkg/components/dashdiffs/ @grafana/grafana-app-platform-squad
|
||||
@ -440,7 +449,7 @@ playwright.config.ts @grafana/plugins-platform-frontend
|
||||
/public/app/features/invites/ @grafana/grafana-frontend-platform
|
||||
/public/app/features/library-panels/ @grafana/dashboards-squad
|
||||
/public/app/features/logs/ @grafana/observability-logs
|
||||
/public/app/features/live/ @grafana/grafana-app-platform-squad
|
||||
/public/app/features/live/ @grafana/dashboards-squad
|
||||
/public/app/features/apiserver/ @grafana/grafana-app-platform-squad
|
||||
/public/app/features/manage-dashboards/ @grafana/dashboards-squad
|
||||
/public/app/features/notifications/ @grafana/grafana-frontend-platform
|
||||
@ -492,7 +501,7 @@ playwright.config.ts @grafana/plugins-platform-frontend
|
||||
/public/app/plugins/panel/geomap/ @grafana/dataviz-squad
|
||||
/public/app/plugins/panel/canvas/ @grafana/dataviz-squad
|
||||
/public/app/plugins/panel/candlestick/ @grafana/dataviz-squad
|
||||
/public/app/plugins/panel/live/ @grafana/grafana-app-platform-squad
|
||||
/public/app/plugins/panel/live/ @grafana/dashboards-squad
|
||||
/public/app/plugins/panel/news/ @grafana/grafana-frontend-platform
|
||||
/public/app/plugins/panel/stat/ @grafana/dataviz-squad
|
||||
/public/app/plugins/panel/text/ @grafana/grafana-frontend-platform
|
||||
@ -737,7 +746,6 @@ embed.go @grafana/grafana-as-code
|
||||
/.github/workflows/i18n-crowdin-download.yml @grafana/grafana-frontend-platform
|
||||
/.github/workflows/pr-go-workspace-check.yml @grafana/grafana-app-platform-squad
|
||||
/.github/workflows/pr-k8s-codegen-check.yml @grafana/grafana-app-platform-squad
|
||||
/.github/workflows/run-scenes-e2e.yml @grafana/dashboards-squad
|
||||
/.github/workflows/go_lint.yml @grafana/grafana-backend-services-squad
|
||||
/.github/workflows/trivy-scan.yml @grafana/grafana-backend-services-squad
|
||||
/.github/workflows/changelog.yml @zserge
|
||||
|
232
.github/commands.json
vendored
232
.github/commands.json
vendored
@ -475,14 +475,6 @@
|
||||
"url": "https://github.com/orgs/grafana/projects/665"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "label",
|
||||
"name": "area/dashboard",
|
||||
"action": "addToProject",
|
||||
"addToProject": {
|
||||
"url": "https://github.com/orgs/grafana/projects/202"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "label",
|
||||
"name": "type/build-packaging",
|
||||
@ -507,14 +499,6 @@
|
||||
"url": "https://github.com/orgs/grafana/projects/56"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "label",
|
||||
"name": "area/dashboard/templating",
|
||||
"action": "addToProject",
|
||||
"addToProject": {
|
||||
"url": "https://github.com/orgs/grafana/projects/202"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "label",
|
||||
"name": "area/auth",
|
||||
@ -579,14 +563,6 @@
|
||||
"url": "https://github.com/orgs/grafana/projects/203"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "label",
|
||||
"name": "area/dashboards/panel",
|
||||
"action": "addToProject",
|
||||
"addToProject": {
|
||||
"url": "https://github.com/orgs/grafana/projects/202"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "label",
|
||||
"name": "area/public-dashboards",
|
||||
@ -635,14 +611,6 @@
|
||||
"url": "https://github.com/orgs/grafana/projects/112"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "label",
|
||||
"name": "area/dashboard/data-links",
|
||||
"action": "addToProject",
|
||||
"addToProject": {
|
||||
"url": "https://github.com/orgs/grafana/projects/202"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "label",
|
||||
"name": "area/backend/api",
|
||||
@ -675,22 +643,6 @@
|
||||
"url": "https://github.com/orgs/grafana/projects/221"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "label",
|
||||
"name": "area/dashboard/snapshot",
|
||||
"action": "addToProject",
|
||||
"addToProject": {
|
||||
"url": "https://github.com/orgs/grafana/projects/202"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "label",
|
||||
"name": "area/dashboard/folders",
|
||||
"action": "addToProject",
|
||||
"addToProject": {
|
||||
"url": "https://github.com/orgs/grafana/projects/202"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "label",
|
||||
"name": "area/configuration",
|
||||
@ -715,14 +667,6 @@
|
||||
"url": "https://github.com/orgs/grafana/projects/660"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "label",
|
||||
"name": "area/dashboard/timerange",
|
||||
"action": "addToProject",
|
||||
"addToProject": {
|
||||
"url": "https://github.com/orgs/grafana/projects/202"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "label",
|
||||
"name": "datasource/MSSQL",
|
||||
@ -827,6 +771,174 @@
|
||||
"url": "https://github.com/orgs/grafana/projects/202"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "label",
|
||||
"name": "area/dashboard/links",
|
||||
"action": "addToProject",
|
||||
"addToProject": {
|
||||
"url": "https://github.com/orgs/grafana/projects/202"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "label",
|
||||
"name": "area/dashboard/templating",
|
||||
"action": "addToProject",
|
||||
"addToProject": {
|
||||
"url": "https://github.com/orgs/grafana/projects/202"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "label",
|
||||
"name": "area/dashboard/variables",
|
||||
"action": "addToProject",
|
||||
"addToProject": {
|
||||
"url": "https://github.com/orgs/grafana/projects/202"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "label",
|
||||
"name": "area/dashboards/panel",
|
||||
"action": "addToProject",
|
||||
"addToProject": {
|
||||
"url": "https://github.com/orgs/grafana/projects/202"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "label",
|
||||
"name": "area/dashboard/data-links",
|
||||
"action": "addToProject",
|
||||
"addToProject": {
|
||||
"url": "https://github.com/orgs/grafana/projects/202"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "label",
|
||||
"name": "area/dashboard/rows",
|
||||
"action": "addToProject",
|
||||
"addToProject": {
|
||||
"url": "https://github.com/orgs/grafana/projects/202"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "label",
|
||||
"name": "area/dashboard/edit",
|
||||
"action": "addToProject",
|
||||
"addToProject": {
|
||||
"url": "https://github.com/orgs/grafana/projects/202"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "label",
|
||||
"name": "area/panel/edit",
|
||||
"action": "addToProject",
|
||||
"addToProject": {
|
||||
"url": "https://github.com/orgs/grafana/projects/202"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "label",
|
||||
"name": "area/dashboard/scenes",
|
||||
"action": "addToProject",
|
||||
"addToProject": {
|
||||
"url": "https://github.com/orgs/grafana/projects/202"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "label",
|
||||
"name": "area/dashboard/snapshot",
|
||||
"action": "addToProject",
|
||||
"addToProject": {
|
||||
"url": "https://github.com/orgs/grafana/projects/202"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "label",
|
||||
"name": "area/dashboard/folders",
|
||||
"action": "addToProject",
|
||||
"addToProject": {
|
||||
"url": "https://github.com/orgs/grafana/projects/202"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "label",
|
||||
"name": "area/dashboard/timerange",
|
||||
"action": "addToProject",
|
||||
"addToProject": {
|
||||
"url": "https://github.com/orgs/grafana/projects/202"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "label",
|
||||
"name": "area/dashboard/repeating",
|
||||
"action": "addToProject",
|
||||
"addToProject": {
|
||||
"url": "https://github.com/orgs/grafana/projects/202"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "label",
|
||||
"name": "area/dashboard/annotations",
|
||||
"action": "addToProject",
|
||||
"addToProject": {
|
||||
"url": "https://github.com/orgs/grafana/projects/202"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "label",
|
||||
"name": "area/dashboard/library-panel",
|
||||
"action": "addToProject",
|
||||
"addToProject": {
|
||||
"url": "https://github.com/orgs/grafana/projects/202"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "label",
|
||||
"name": "area/dashboard/kiosk",
|
||||
"action": "addToProject",
|
||||
"addToProject": {
|
||||
"url": "https://github.com/orgs/grafana/projects/202"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "label",
|
||||
"name": "area/dashboard/tv",
|
||||
"action": "addToProject",
|
||||
"addToProject": {
|
||||
"url": "https://github.com/orgs/grafana/projects/202"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "label",
|
||||
"name": "area/dashboard/import",
|
||||
"action": "addToProject",
|
||||
"addToProject": {
|
||||
"url": "https://github.com/orgs/grafana/projects/202"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "label",
|
||||
"name": "area/panel/field-override",
|
||||
"action": "addToProject",
|
||||
"addToProject": {
|
||||
"url": "https://github.com/orgs/grafana/projects/202"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "label",
|
||||
"name": "area/panel/repeat",
|
||||
"action": "addToProject",
|
||||
"addToProject": {
|
||||
"url": "https://github.com/orgs/grafana/projects/202"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "label",
|
||||
"name": "area/dashboard/settings",
|
||||
"action": "addToProject",
|
||||
"addToProject": {
|
||||
"url": "https://github.com/orgs/grafana/projects/202"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "label",
|
||||
"name": "area/backend/db/sqlite",
|
||||
@ -859,14 +971,6 @@
|
||||
"url": "https://github.com/orgs/grafana/projects/78"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "label",
|
||||
"name": "area/dashboard/links",
|
||||
"action": "addToProject",
|
||||
"addToProject": {
|
||||
"url": "https://github.com/orgs/grafana/projects/202"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "label",
|
||||
"name": "datasource/Zipkin",
|
||||
|
47
.github/workflows/run-scenes-e2e.yml
vendored
47
.github/workflows/run-scenes-e2e.yml
vendored
@ -1,47 +0,0 @@
|
||||
name: Run dashboard scenes e2e
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: "0 8 * * 1-5" # every day at 08:00UTC on weekdays
|
||||
# push # uncomment for test run during PR
|
||||
|
||||
env:
|
||||
ARCH: linux-amd64
|
||||
|
||||
jobs:
|
||||
dashboard-scenes-e2e:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
- name: Pin Go version to mod file
|
||||
uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version-file: 'go.mod'
|
||||
- run: go version
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 20
|
||||
- name: Install dependencies
|
||||
run: yarn install --immutable
|
||||
- name: Build grafana
|
||||
run: make build
|
||||
- name: Install Cypress dependencies
|
||||
uses: cypress-io/github-action@v6
|
||||
with:
|
||||
runTests: false
|
||||
- name: Run dashboard scenes e2e
|
||||
run: yarn e2e:scenes
|
||||
- name: "Send Slack notification"
|
||||
if: ${{ failure() }}
|
||||
uses: slackapi/slack-github-action@v1.26.0
|
||||
with:
|
||||
payload: >
|
||||
{
|
||||
"icon_emoji": ":this-is-fine-fire:",
|
||||
"username": "Dashboard scenes e2e tests failed",
|
||||
"text": "Link to run: https://github.com/${{github.repository}}/actions/runs/${{github.run_id}}",
|
||||
"channel": "#grafana-dashboards-squad"
|
||||
}
|
||||
env:
|
||||
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
|
97
CHANGELOG.md
97
CHANGELOG.md
@ -1,3 +1,92 @@
|
||||
<!-- 11.2.2 START -->
|
||||
|
||||
# 11.2.2 (2024-10-01)
|
||||
|
||||
### Features and enhancements
|
||||
|
||||
- **Chore:** Bump Go to 1.22.7 [#93353](https://github.com/grafana/grafana/pull/93353), [@hairyhenderson](https://github.com/hairyhenderson)
|
||||
- **Chore:** Bump Go to 1.22.7 (Enterprise)
|
||||
- **Data sources:** Hide the datasource redirection banner for users who can't interact with data sources [#93103](https://github.com/grafana/grafana/pull/93103), [@IevaVasiljeva](https://github.com/IevaVasiljeva)
|
||||
|
||||
### Bug fixes
|
||||
|
||||
- **Alerting:** Fix preview of silences when label name contains spaces [#93051](https://github.com/grafana/grafana/pull/93051), [@tomratcliffe](https://github.com/tomratcliffe)
|
||||
- **Alerting:** Make query wrapper match up datasource UIDs if necessary [#93114](https://github.com/grafana/grafana/pull/93114), [@tomratcliffe](https://github.com/tomratcliffe)
|
||||
- **AzureMonitor:** Deduplicate resource picker rows [#93705](https://github.com/grafana/grafana/pull/93705), [@aangelisc](https://github.com/aangelisc)
|
||||
- **AzureMonitor:** Improve resource picker efficiency [#93440](https://github.com/grafana/grafana/pull/93440), [@aangelisc](https://github.com/aangelisc)
|
||||
- **AzureMonitor:** Remove Basic Logs retention warning [#93123](https://github.com/grafana/grafana/pull/93123), [@aangelisc](https://github.com/aangelisc)
|
||||
- **CloudWatch:** Fix segfault when migrating legacy queries [#93544](https://github.com/grafana/grafana/pull/93544), [@iwysiu](https://github.com/iwysiu)
|
||||
- **Correlations:** Limit access to correlations page to users who can access Explore [#93676](https://github.com/grafana/grafana/pull/93676), [@ifrost](https://github.com/ifrost)
|
||||
- **DashboardScene:** Fix broken error handling and error rendering [#93690](https://github.com/grafana/grafana/pull/93690), [@torkelo](https://github.com/torkelo)
|
||||
- **Plugins:** Avoid returning 404 for `AutoEnabled` apps [#93488](https://github.com/grafana/grafana/pull/93488), [@wbrowne](https://github.com/wbrowne)
|
||||
|
||||
<!-- 11.2.2 END -->
|
||||
<!-- 11.1.7 START -->
|
||||
|
||||
# 11.1.7 (2024-10-01)
|
||||
|
||||
### Features and enhancements
|
||||
|
||||
- **Chore:** Bump Go to 1.22.7 [#93355](https://github.com/grafana/grafana/pull/93355), [@hairyhenderson](https://github.com/hairyhenderson)
|
||||
- **Chore:** Bump Go to 1.22.7 (Enterprise)
|
||||
|
||||
### Bug fixes
|
||||
|
||||
- **Alerting:** Fix preview of silences when label name contains spaces [#93050](https://github.com/grafana/grafana/pull/93050), [@tomratcliffe](https://github.com/tomratcliffe)
|
||||
- **Alerting:** Make query wrapper match up datasource UIDs if necessary [#93115](https://github.com/grafana/grafana/pull/93115), [@tomratcliffe](https://github.com/tomratcliffe)
|
||||
- **AzureMonitor:** Deduplicate resource picker rows [#93704](https://github.com/grafana/grafana/pull/93704), [@aangelisc](https://github.com/aangelisc)
|
||||
- **AzureMonitor:** Improve resource picker efficiency [#93439](https://github.com/grafana/grafana/pull/93439), [@aangelisc](https://github.com/aangelisc)
|
||||
- **AzureMonitor:** Remove Basic Logs retention warning [#93122](https://github.com/grafana/grafana/pull/93122), [@aangelisc](https://github.com/aangelisc)
|
||||
- **Correlations:** Limit access to correlations page to users who can access Explore [#93675](https://github.com/grafana/grafana/pull/93675), [@ifrost](https://github.com/ifrost)
|
||||
- **Plugins:** Avoid returning 404 for `AutoEnabled` apps [#93487](https://github.com/grafana/grafana/pull/93487), [@wbrowne](https://github.com/wbrowne)
|
||||
|
||||
<!-- 11.1.7 END -->
|
||||
<!-- 11.0.6 START -->
|
||||
|
||||
# 11.0.6 (2024-10-01)
|
||||
|
||||
### Features and enhancements
|
||||
|
||||
- **Chore:** Bump Go to 1.22.7 [#93358](https://github.com/grafana/grafana/pull/93358), [@hairyhenderson](https://github.com/hairyhenderson)
|
||||
- **Chore:** Bump Go to 1.22.7 (Enterprise)
|
||||
|
||||
### Bug fixes
|
||||
|
||||
- **AzureMonitor:** Deduplicate resource picker rows [#93703](https://github.com/grafana/grafana/pull/93703), [@aangelisc](https://github.com/aangelisc)
|
||||
- **AzureMonitor:** Improve resource picker efficiency [#93438](https://github.com/grafana/grafana/pull/93438), [@aangelisc](https://github.com/aangelisc)
|
||||
- **Correlations:** Limit access to correlations page to users who can access Explore [#93674](https://github.com/grafana/grafana/pull/93674), [@ifrost](https://github.com/ifrost)
|
||||
- **Plugins:** Avoid returning 404 for `AutoEnabled` apps [#93486](https://github.com/grafana/grafana/pull/93486), [@wbrowne](https://github.com/wbrowne)
|
||||
|
||||
<!-- 11.0.6 END -->
|
||||
<!-- 10.4.10 START -->
|
||||
|
||||
# 10.4.10 (2024-10-01)
|
||||
|
||||
### Features and enhancements
|
||||
|
||||
- **Chore:** Bump Go to 1.22.7 [#93359](https://github.com/grafana/grafana/pull/93359), [@hairyhenderson](https://github.com/hairyhenderson)
|
||||
- **Chore:** Bump Go to 1.22.7 (Enterprise)
|
||||
|
||||
### Bug fixes
|
||||
|
||||
- **AzureMonitor:** Deduplicate resource picker rows [#93702](https://github.com/grafana/grafana/pull/93702), [@aangelisc](https://github.com/aangelisc)
|
||||
- **Correlations:** Limit access to correlations page to users who can access Explore [#93673](https://github.com/grafana/grafana/pull/93673), [@ifrost](https://github.com/ifrost)
|
||||
|
||||
<!-- 10.4.10 END -->
|
||||
<!-- 10.3.11 START -->
|
||||
|
||||
# 10.3.11 (2024-10-01)
|
||||
|
||||
### Features and enhancements
|
||||
|
||||
- **Chore:** Bump Go to 1.22.7 [#93360](https://github.com/grafana/grafana/pull/93360), [@hairyhenderson](https://github.com/hairyhenderson)
|
||||
- **Chore:** Bump Go to 1.22.7 (Enterprise)
|
||||
|
||||
### Bug fixes
|
||||
|
||||
- **Correlations:** Limit access to correlations page to users who can access Explore [#93672](https://github.com/grafana/grafana/pull/93672), [@ifrost](https://github.com/ifrost)
|
||||
|
||||
<!-- 10.3.11 END -->
|
||||
<!-- 11.2.1 START -->
|
||||
|
||||
# 11.2.1 (2024-09-26)
|
||||
@ -21,6 +110,7 @@
|
||||
- **Reporting:** Disable dashboardSceneSolo when rendering PDFs the old way (Enterprise)
|
||||
- **Templating:** Fix searching non-latin template variables [#92893](https://github.com/grafana/grafana/pull/92893), [@leeoniya](https://github.com/leeoniya)
|
||||
- **TutorialCard:** Fix link to tutorial not opening [#92647](https://github.com/grafana/grafana/pull/92647), [@eledobleefe](https://github.com/eledobleefe)
|
||||
- **Alerting:** Fixed CVE-2024-8118.
|
||||
|
||||
### Plugin development fixes & changes
|
||||
|
||||
@ -43,6 +133,7 @@
|
||||
### Plugin development fixes & changes
|
||||
|
||||
- **Bugfix:** QueryField typeahead missing background color [#92316](https://github.com/grafana/grafana/pull/92316), [@mckn](https://github.com/mckn)
|
||||
- **Alerting:** Fixed CVE-2024-8118.
|
||||
|
||||
<!-- 11.1.6 END -->
|
||||
<!-- 11.0.5 START -->
|
||||
@ -57,6 +148,7 @@
|
||||
|
||||
- **Provisioning:** Prevent provisioning folder errors from failing startup [#92588](https://github.com/grafana/grafana/pull/92588), [@suntala](https://github.com/suntala)
|
||||
- **TutorialCard:** Fix link to tutorial not opening [#92645](https://github.com/grafana/grafana/pull/92645), [@eledobleefe](https://github.com/eledobleefe)
|
||||
- **Alerting:** Fixed CVE-2024-8118.
|
||||
|
||||
<!-- 11.0.5 END -->
|
||||
<!-- 10.4.9 START -->
|
||||
@ -70,12 +162,17 @@
|
||||
### Bug fixes
|
||||
|
||||
- **Provisioning:** Prevent provisioning folder errors from failing startup [#92591](https://github.com/grafana/grafana/pull/92591), [@suntala](https://github.com/suntala)
|
||||
- **Alerting:** Fixed CVE-2024-8118.
|
||||
|
||||
<!-- 10.4.9 END -->
|
||||
<!-- 10.3.10 START -->
|
||||
|
||||
# 10.3.10 (2024-09-26)
|
||||
|
||||
### Bug fixes
|
||||
|
||||
- **Alerting:** Fixed CVE-2024-8118.
|
||||
|
||||
<!-- 10.3.10 END -->
|
||||
<!-- 11.2.0 START -->
|
||||
|
||||
|
@ -582,6 +582,9 @@ oauth_auto_login = false
|
||||
# OAuth state max age cookie duration in seconds. Defaults to 600 seconds.
|
||||
oauth_state_cookie_max_age = 600
|
||||
|
||||
# Sets a custom oAuth error message. This is useful if you need to point the users to a specific location for support.
|
||||
oauth_login_error_message = oauth.login.error
|
||||
|
||||
# Minimum wait time in milliseconds for the server lock retry mechanism.
|
||||
# The server lock retry mechanism is used to prevent multiple Grafana instances from
|
||||
# simultaneously refreshing OAuth tokens. This mechanism waits at least this amount
|
||||
@ -615,6 +618,10 @@ id_response_header_prefix = X-Grafana
|
||||
# The header value will encode the namespace ("user:<id>", "api-key:<id>", "service-account:<id>")
|
||||
id_response_header_namespaces = user api-key service-account
|
||||
|
||||
# Enables the use of managed service accounts for plugin authentication
|
||||
# This feature currently **only supports single-organization deployments**
|
||||
managed_service_accounts_enabled = false
|
||||
|
||||
#################################### SSO Settings ###########################
|
||||
[sso_settings]
|
||||
# interval for reloading the SSO Settings from the database
|
||||
|
@ -583,6 +583,9 @@
|
||||
# Deprecated, use auto_login option for specific provider instead.
|
||||
;oauth_auto_login = false
|
||||
|
||||
# Sets a custom oAuth error message. This is useful if you need to point the users to a specific location for support.
|
||||
;oauth_login_error_message = oauth.login.error
|
||||
|
||||
# OAuth state max age cookie duration in seconds. Defaults to 600 seconds.
|
||||
;oauth_state_cookie_max_age = 600
|
||||
|
||||
@ -619,6 +622,10 @@
|
||||
# The header value will encode the namespace ("user:<id>", "api-key:<id>", "service-account:<id>")
|
||||
;id_response_header_namespaces = user api-key service-account
|
||||
|
||||
# Enables the use of managed service accounts for plugin authentication
|
||||
# This feature currently **only supports single-organization deployments**
|
||||
; managed_service_accounts_enabled = false
|
||||
|
||||
#################################### Anonymous Auth ######################
|
||||
[auth.anonymous]
|
||||
# enable anonymous access
|
||||
|
@ -12,16 +12,18 @@ weight: 900
|
||||
|
||||
# Correlations
|
||||
|
||||
You can create interactive links for Explore visualizations to run queries related to presented data by setting up Correlations.
|
||||
You can create interactive links for Explore visualizations by setting up Correlations. These links can either run queries or generate external URLs related to presented data.
|
||||
|
||||
A correlation defines how data in one [data source]({{< relref "../../datasources" >}}) is used to query data in another data source.
|
||||
A correlation defines how data in one [data source]({{< relref "../../datasources" >}}) is used to query data in another data source or to generate an external URL.
|
||||
Some examples:
|
||||
|
||||
- an application name returned in a logs data source can be used to query metrics related to that application in a metrics data source, or
|
||||
- a user name returned by an SQL data source can be used to query logs related to that particular user in a logs data source
|
||||
- a customer ID in a logs data source can link to a different platform that has a profile on that customer.
|
||||
|
||||
[Explore]({{< relref "../../explore" >}}) takes user-defined correlations to display links inside the visualizations.
|
||||
You can click on a link to run the related query and see results in [Explore Split View]({{< relref "../../explore#split-and-compare" >}}).
|
||||
If a correlation links to a query, you can click on that link to run the related query and see results in [Explore Split View]({{< relref "../../explore#split-and-compare" >}}).
|
||||
If a correlation links to an external URL, you can click on the link to open the URL in a new tab in your browser.
|
||||
|
||||
Explore visualizations that currently support showing links based on correlations:
|
||||
|
||||
|
@ -86,12 +86,26 @@ Multiple alert instances can be created as a result of one alert rule (also know
|
||||
For Grafana Cloud Free Forever, you can create up to 100 free Grafana-managed alert rules with each alert rule having a maximum of 1000 alert instances.
|
||||
{{% /admonition %}}
|
||||
|
||||
Grafana managed alert rules can only be edited or deleted by users with Edit permissions for the folder storing the rules.
|
||||
Grafana-managed alert rules can only be edited or deleted by users with Edit permissions for the folder storing the rules.
|
||||
|
||||
If you delete an alerting resource created in the UI, you can no longer retrieve it.
|
||||
If you delete an alert resource created in the UI, you can no longer retrieve it.
|
||||
To make a backup of your configuration and to be able to restore deleted alerting resources, create your alerting resources using file provisioning, Terraform, or the Alerting API.
|
||||
|
||||
In the following sections, we’ll guide you through the process of creating your Grafana-managed alert rules.
|
||||
## Before you begin
|
||||
|
||||
You can use default or advanced options for Grafana-managed alert rule creation. The default options streamline rule creation with a cleaner header and a single query and condition. For more complex rules, use advanced options to add multiple queries and expressions.
|
||||
|
||||
Default and advanced options are enabled by default for Grafana Cloud users and this feature is being rolled out progressively.
|
||||
|
||||
For OSS users,enable the `alertingQueryAndExpressionsStepMode` feature toggle.
|
||||
|
||||
{{% admonition type="note" %}}
|
||||
Once you have created an alert rule using one of the options, the system defaults to this option for the next alert rule you create.
|
||||
|
||||
You can toggle between the two options. However, if you want to switch from advanced options to the default, it may be that your query and expressions cannot be converted. In this case, a warning message checks whether you want to continue to reset to default settings.
|
||||
{{% /admonition %}}
|
||||
|
||||
## Steps
|
||||
|
||||
To create a Grafana-managed alert rule, use the in-product alert creation flow and follow these steps.
|
||||
|
||||
@ -108,14 +122,26 @@ To get started quickly, refer to our [tutorial on getting started with Grafana a
|
||||
|
||||
Define a query to get the data you want to measure and a condition that needs to be met before an alert rule fires.
|
||||
|
||||
{{< collapse title="Default options" >}}
|
||||
|
||||
1. Add a query.
|
||||
1. Add an alert condition.
|
||||
|
||||
The **When** input includes the reducer function and the last input is the threshold.
|
||||
|
||||
1. Click **Preview** to verify.
|
||||
{{< /collapse >}}
|
||||
|
||||
{{< collapse title="Advanced options" >}}
|
||||
|
||||
1. Select a data source.
|
||||
1. From the **Options** dropdown, specify a [time range](ref:time-units-and-relative-ranges).
|
||||
|
||||
**Note:**
|
||||
|
||||
{{% admonition type="note" %}}
|
||||
Grafana Alerting only supports fixed relative time ranges, for example, `now-24hr: now`.
|
||||
|
||||
It does not support absolute time ranges: `2021-12-02 00:00:00 to 2021-12-05 23:59:592` or semi-relative time ranges: `now/d to: now`.
|
||||
{{% /admonition %}}
|
||||
|
||||
1. Add a query.
|
||||
|
||||
@ -138,6 +164,7 @@ Define a query to get the data you want to measure and a condition that needs to
|
||||
You can only add one recovery threshold in a query and it must be the alert condition.
|
||||
|
||||
1. Click **Set as alert condition** on the query or expression you want to set as your alert condition.
|
||||
{{< /collapse >}}
|
||||
|
||||
## Set alert evaluation behavior
|
||||
|
||||
|
@ -36,6 +36,64 @@ Each template is evaluated whenever the alert rule is evaluated, and is evaluate
|
||||
Extra whitespace in label templates can break matches with notification policies.
|
||||
{{% /admonition %}}
|
||||
|
||||
## Variables
|
||||
|
||||
In Grafana templating, the `$` and `.` symbols are used to reference variables and their properties. You can reference variables directly in your alert rule definitions using the `$` symbol followed by the variable name. Similarly, you can access properties of variables using the dot (`.`) notation within alert rule definitions.
|
||||
|
||||
The following variables are available to you when templating labels and annotations:
|
||||
|
||||
### The labels variable
|
||||
|
||||
The `$labels` variable contains all labels from the query. For example, suppose you have a query that returns CPU usage for all of your servers, and you have an alert rule that fires when any of your servers have exceeded 80% CPU usage for the last 5 minutes. You want to add a summary annotation to the alert that tells you which server is experiencing high CPU usage. With the `$labels` variable you can write a template that prints a human-readable sentence such as:
|
||||
|
||||
```
|
||||
CPU usage for {{ index $labels "instance" }} has exceeded 80% for the last 5 minutes
|
||||
```
|
||||
|
||||
> If you are using a classic condition then `$labels` will not contain any labels from the query. Classic conditions discard these labels in order to enforce uni-dimensional behavior (at most one alert per alert rule). If you want to use labels from the query in your template then use the example [here](#print-all-labels-from-a-classic-condition).
|
||||
|
||||
### The value variable
|
||||
|
||||
The `$value` variable is a string containing the labels and values of all instant queries; threshold, reduce and math expressions, and classic conditions in the alert rule. It does not contain the results of range queries, as these can return anywhere from 10s to 10,000s of rows or metrics. If it did, for especially large queries a single alert could use 10s of MBs of memory and Grafana would run out of memory very quickly.
|
||||
|
||||
To print the `$value` variable in the summary you would write something like this:
|
||||
|
||||
```
|
||||
CPU usage for {{ index $labels "instance" }} has exceeded 80% for the last 5 minutes: {{ $value }}
|
||||
```
|
||||
|
||||
And would look something like this:
|
||||
|
||||
```
|
||||
CPU usage for instance1 has exceeded 80% for the last 5 minutes: [ var='A' labels={instance=instance1} value=81.234 ]
|
||||
```
|
||||
|
||||
Here `var='A'` refers to the instant query with Ref ID A, `labels={instance=instance1}` refers to the labels, and `value=81.234` refers to the average CPU usage over the last 5 minutes.
|
||||
|
||||
If you want to print just some of the string instead of the full string then use the `$values` variable. It contains the same information as `$value`, but in a structured table, and is much easier to use then writing a regular expression to match just the text you want.
|
||||
|
||||
### The values variable
|
||||
|
||||
The `$values` variable is a table containing the labels and floating point values of all instant queries and expressions, indexed by their Ref IDs.
|
||||
|
||||
To print the value of the instant query with Ref ID A:
|
||||
|
||||
```
|
||||
CPU usage for {{ index $labels "instance" }} has exceeded 80% for the last 5 minutes: {{ index $values "A" }}
|
||||
```
|
||||
|
||||
For example, given an alert with the labels `instance=server1` and an instant query with the value `81.2345`, this would print:
|
||||
|
||||
```
|
||||
CPU usage for instance1 has exceeded 80% for the last 5 minutes: 81.2345
|
||||
```
|
||||
|
||||
If the query in Ref ID A is a range query rather than an instant query then add a reduce expression with Ref ID B and replace `(index $values "A")` with `(index $values "B")`:
|
||||
|
||||
```
|
||||
CPU usage for {{ index $labels "instance" }} has exceeded 80% for the last 5 minutes: {{ index $values "B" }}
|
||||
```
|
||||
|
||||
## Examples
|
||||
|
||||
The following examples attempt to show the most common use-cases we have seen for templates. You can use these examples verbatim, or adapt them as necessary for your use case. For more information on how to write text/template refer see [the beginner's guide to alert notification templates in Grafana](https://grafana.com/blog/2023/04/05/grafana-alerting-a-beginners-guide-to-templating-alert-notifications/).
|
||||
@ -216,62 +274,6 @@ B2: 84.5678
|
||||
B3: 95.6789
|
||||
```
|
||||
|
||||
## Variables
|
||||
|
||||
The following variables are available to you when templating labels and annotations:
|
||||
|
||||
### The labels variable
|
||||
|
||||
The `$labels` variable contains all labels from the query. For example, suppose you have a query that returns CPU usage for all of your servers, and you have an alert rule that fires when any of your servers have exceeded 80% CPU usage for the last 5 minutes. You want to add a summary annotation to the alert that tells you which server is experiencing high CPU usage. With the `$labels` variable you can write a template that prints a human-readable sentence such as:
|
||||
|
||||
```
|
||||
CPU usage for {{ index $labels "instance" }} has exceeded 80% for the last 5 minutes
|
||||
```
|
||||
|
||||
> If you are using a classic condition then `$labels` will not contain any labels from the query. Classic conditions discard these labels in order to enforce uni-dimensional behavior (at most one alert per alert rule). If you want to use labels from the query in your template then use the example [here](#print-all-labels-from-a-classic-condition).
|
||||
|
||||
### The value variable
|
||||
|
||||
The `$value` variable is a string containing the labels and values of all instant queries; threshold, reduce and math expressions, and classic conditions in the alert rule. It does not contain the results of range queries, as these can return anywhere from 10s to 10,000s of rows or metrics. If it did, for especially large queries a single alert could use 10s of MBs of memory and Grafana would run out of memory very quickly.
|
||||
|
||||
To print the `$value` variable in the summary you would write something like this:
|
||||
|
||||
```
|
||||
CPU usage for {{ index $labels "instance" }} has exceeded 80% for the last 5 minutes: {{ $value }}
|
||||
```
|
||||
|
||||
And would look something like this:
|
||||
|
||||
```
|
||||
CPU usage for instance1 has exceeded 80% for the last 5 minutes: [ var='A' labels={instance=instance1} value=81.234 ]
|
||||
```
|
||||
|
||||
Here `var='A'` refers to the instant query with Ref ID A, `labels={instance=instance1}` refers to the labels, and `value=81.234` refers to the average CPU usage over the last 5 minutes.
|
||||
|
||||
If you want to print just some of the string instead of the full string then use the `$values` variable. It contains the same information as `$value`, but in a structured table, and is much easier to use then writing a regular expression to match just the text you want.
|
||||
|
||||
### The values variable
|
||||
|
||||
The `$values` variable is a table containing the labels and floating point values of all instant queries and expressions, indexed by their Ref IDs.
|
||||
|
||||
To print the value of the instant query with Ref ID A:
|
||||
|
||||
```
|
||||
CPU usage for {{ index $labels "instance" }} has exceeded 80% for the last 5 minutes: {{ index $values "A" }}
|
||||
```
|
||||
|
||||
For example, given an alert with the labels `instance=server1` and an instant query with the value `81.2345`, this would print:
|
||||
|
||||
```
|
||||
CPU usage for instance1 has exceeded 80% for the last 5 minutes: 81.2345
|
||||
```
|
||||
|
||||
If the query in Ref ID A is a range query rather than an instant query then add a reduce expression with Ref ID B and replace `(index $values "A")` with `(index $values "B")`:
|
||||
|
||||
```
|
||||
CPU usage for {{ index $labels "instance" }} has exceeded 80% for the last 5 minutes: {{ index $values "B" }}
|
||||
```
|
||||
|
||||
## Functions
|
||||
|
||||
The following functions are available to you when templating labels and annotations:
|
||||
|
@ -87,6 +87,8 @@ refs:
|
||||
|
||||
Use contact points to select your preferred communication channel for receiving notifications when your alert rules are firing. You can add, edit, delete, export, and test a contact point.
|
||||
|
||||
Testing a contact point is only available for Grafana Alertmanager.
|
||||
|
||||
On the **Contact Points** tab, you can:
|
||||
|
||||
- Search for name and type of contact points and integrations.
|
||||
@ -144,6 +146,8 @@ Complete the following steps to add templates to your contact point.
|
||||
|
||||
## Test a contact point
|
||||
|
||||
** For Grafana Alertmanager only.**
|
||||
|
||||
Complete the following steps to test a contact point.
|
||||
|
||||
1. In the left-side menu, click **Alerts & IRM** and then **Alerting**.
|
||||
@ -162,6 +166,7 @@ The following table lists the contact point integrations supported by Grafana.
|
||||
| Name | Type |
|
||||
| ---------------------------- | ------------------------- |
|
||||
| Alertmanager | `prometheus-alertmanager` |
|
||||
| Amazon SNS | `sns` |
|
||||
| Cisco Webex Teams | `webex` |
|
||||
| DingDing | `dingding` |
|
||||
| [Discord](ref:discord) | `discord` |
|
||||
|
@ -18,34 +18,59 @@ weight: 0
|
||||
|
||||
# Configure Amazon SNS for Alerting
|
||||
|
||||
Use the Grafana Alerting - Amazon SNS integration to send notifications to Amazon SNS when your alerts are firing.
|
||||
Use the Grafana Alerting - Amazon SNS integration to send notifications to Amazon SNS when your alerts are firing. You can receive notifications via the various subscriber channels supported by SNS.
|
||||
|
||||
## Before you begin
|
||||
|
||||
To configure Amazon SNS to receive alert notifications, complete the following steps.
|
||||
Before you begin, ensure you have the following:
|
||||
|
||||
1. Create a new topic in https://console.aws.amazon.com/sns.
|
||||
1. Open the topic and create a new subscription.
|
||||
1. Choose the protocol HTTPS.
|
||||
1. Copy the URL.
|
||||
- **AWS SNS Topic**: An SNS topic to send notifications to.
|
||||
- **AWS IAM Identity with necessary access**: An IAM identity (e.g. user, role) with the necessary permissions to publish messages to the SNS topic.
|
||||
|
||||
For more information, refer to [Amazon SNS documentation](https://docs.aws.amazon.com/sns/latest/dg/welcome.html).
|
||||
For an example setup, see [Example Minimal Setup Using Assumed IAM Role]({{< relref "#example-minimal-setup-using-assumed-iam-role" >}}).
|
||||
|
||||
## Procedure
|
||||
## Adding the SNS Contact Point in Grafana
|
||||
|
||||
To create your Amazon SNS integration in Grafana Alerting, complete the following steps.
|
||||
With AWS resources configured, proceed to add SNS as a contact point in Grafana.
|
||||
|
||||
1. Navigate to **Alerts & IRM** -> **Alerting** -> **Contact points**.
|
||||
1. Click **+ Add contact point**.
|
||||
1. Enter a contact point name.
|
||||
1. From the Integration list, select **AWS SNS**.
|
||||
1. Copy in the URL from above into the **The Amazon SNS API URL** field.
|
||||
1. Click **Test** to check that your integration works.
|
||||
1. Click **Save contact point**.
|
||||
- Navigate to **Alerts & IRM** -> **Alerting** -> **Contact points**.
|
||||
- Click on **"Add contact point"**.
|
||||
- **Name**: Enter a descriptive name (e.g., `AWS SNS`).
|
||||
- Choose **"AWS SNS"** from the list of contact point types.
|
||||
|
||||
## Next steps
|
||||
### 2. Configure SNS Settings
|
||||
|
||||
The Amazon SNS contact point is ready to receive alert notifications.
|
||||
#### SNS Settings
|
||||
|
||||
- **The Amazon SNS API URL**: (Optional) The SNS API URL, e.g., `https://sns.us-east-2.amazonaws.com`. If not specified, the SNS API URL from the SNS SDK will be used.
|
||||
- **Signature Version (sigv4)**: Configures AWS's Signature Verification 4 signing process to sign requests.
|
||||
- **Region**: (Optional) The AWS region. If blank, the region from the default credentials chain is used.
|
||||
- **Access Key**: The AWS API access key.
|
||||
- **Secret Key**: The AWS API secret key.
|
||||
- **Profile**: (Optional) Named AWS profile used to authenticate.
|
||||
- **Role ARN**: (Optional) The ARN of an AWS IAM role to assume for authentication, serving as an alternative to using AWS API keys.
|
||||
- **SNS topic ARN**: (Optional) If you don't specify this value, you must specify a value for the `Phone number` or `Target ARN`. If you are using a FIFO SNS topic you should set a message group interval longer than 5 minutes to prevent messages with the same group key being deduplicated by the SNS default deduplication window.
|
||||
- **Phone number**: (Optional) Phone number if message is delivered via SMS in E.164 format. If you don't specify this value, you must specify a value for the `SNS topic ARN` or `Target ARN`.
|
||||
- **Target ARN**: (Optional) The mobile platform endpoint ARN if message is delivered via mobile notifications. If you don't specify this value, you must specify a value for the `SNS topic ARN` or `Phone number`.
|
||||
- **Subject**: (Optional) Customize the subject line or use the default template. This field is templateable.
|
||||
- **Message**: (Optional) Customize the message content or use the default template. This field is templateable.
|
||||
- **Attributes**: (Optional) Add any SNS message attributes.
|
||||
|
||||
{{< admonition type="note" >}}
|
||||
Both `Access Key` and `Secret Key` must be provided together or left blank together. If blank it defaults to a chain of credential
|
||||
providers to search for credentials in environment variables, shared credential file, and EC2 Instance Roles.
|
||||
|
||||
Environment variables: `AWS_ACCESS_KEY_ID` and `AWS_SECRET_ACCESS_KEY`.
|
||||
{{< /admonition >}}
|
||||
|
||||
### 3. Test & Save the Contact Point
|
||||
|
||||
- Click **"Test"** to verify that the SNS configuration is working correctly.
|
||||
- After the test is successful, click **"Save contact point"** to add the SNS contact point.
|
||||
|
||||
### 4. Next steps
|
||||
|
||||
The SNS contact point is ready to receive alert notifications.
|
||||
|
||||
To add this contact point to your alert, complete the following steps.
|
||||
|
||||
@ -55,3 +80,124 @@ To add this contact point to your alert, complete the following steps.
|
||||
1. Under Notifications click **Select contact point**.
|
||||
1. From the drop-down menu, select the previously created contact point.
|
||||
1. **Click Save rule and exit**.
|
||||
|
||||
## Example Minimal Setup Using Assumed IAM Role
|
||||
|
||||
This section outlines a minimal setup to configure SNS with Grafana using an assumed IAM Role.
|
||||
|
||||
### 1. Create an SNS Topic
|
||||
|
||||
1. **Navigate to SNS in AWS Console**:
|
||||
|
||||
- Go to the [Amazon SNS Console](https://console.aws.amazon.com/sns/v3/home).
|
||||
|
||||
2. **Create a new topic** [[AWS Documentation](https://docs.aws.amazon.com/sns/latest/dg/sns-create-topic.html)]:
|
||||
|
||||
- On the **Topics** page, choose **"Create topic"**.
|
||||
- Select **"Standard"** as the type.
|
||||
- Enter a **Name** for your topic, e.g., `My-Topic`.
|
||||
- **Encryption**: Leave disabled for this minimal setup.
|
||||
- Click **"Create topic"**.
|
||||
|
||||
3. (Optional) **Add an email subscriber to help test** [[AWS Documentation](https://docs.aws.amazon.com/sns/latest/dg/sns-email-notifications.html)]:
|
||||
- Within your newly created topic, click on **"Create subscription"**.
|
||||
- **Protocol**: Choose `Email`.
|
||||
- **Endpoint**: Enter your email address to receive test notifications.
|
||||
- Click **"Create subscription"**.
|
||||
- **Confirm Subscription**: Check your email and confirm the subscription by clicking the provided link.
|
||||
|
||||
### 2. Create an IAM Role
|
||||
|
||||
1. **Navigate to IAM in AWS Console**:
|
||||
|
||||
- Go to the [IAM Console](https://console.aws.amazon.com/iam/home).
|
||||
|
||||
2. **Create a new role** [[AWS Documentation](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_create_for-user.html)]:
|
||||
|
||||
- On the **Roles** page, choose **"Create role"**.
|
||||
- **Trusted Entity**: Select **"This account"**.
|
||||
- Click **"Next"** until the end, name it (e.g., `GrafanaSNSRole`), and click **"Create role"**.
|
||||
|
||||
3. **Attach Inline Policy**:
|
||||
|
||||
- After creating the role, select it and navigate to the **"Permissions"** tab.
|
||||
- Click on **"Add permission"** > **"Create inline policy"**.
|
||||
- Switch to the **"JSON"** tab and paste the following policy, replacing `Resource` with your SNS topic ARN:
|
||||
|
||||
```json
|
||||
{
|
||||
"Version": "2012-10-17",
|
||||
"Statement": [
|
||||
{
|
||||
"Effect": "Allow",
|
||||
"Action": ["sns:Publish", "sns:GetTopicAttributes"],
|
||||
"Resource": "arn:aws:sns:<region>:<account_id>:<topic_name>"
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
- Click **"Next"**, name it (e.g., `SNSPublishPolicy`), and click **"Create policy"**.
|
||||
|
||||
### 3. Create an IAM Policy
|
||||
|
||||
1. **Create a new policy to allow assuming the above IAM role** [[AWS Documentation](https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_create-console.html)]:
|
||||
|
||||
- In the IAM Console, on the **Policies** page, choose **"Create policy"**.
|
||||
- Switch to the **"JSON"** tab and paste the following policy, replacing `Resource` with the ARN of the role you created earlier:
|
||||
|
||||
```json
|
||||
{
|
||||
"Version": "2012-10-17",
|
||||
"Statement": [
|
||||
{
|
||||
"Effect": "Allow",
|
||||
"Action": "sts:AssumeRole",
|
||||
"Resource": "arn:aws:iam::<account_id>:role/GrafanaSNSRole"
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
2. **Review and Create**:
|
||||
- Click **"Next"**, name it (e.g., `AssumeSNSRolePolicy`), and click **"Create policy"**.
|
||||
|
||||
### 4. Create an IAM User
|
||||
|
||||
1. **Create a new IAM user to assume the above role** [[AWS Documentation](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_users_create.html)]:
|
||||
|
||||
- In the IAM Console, on the **Users** page, choose **"Create user"**.
|
||||
- Enter a **User name**, e.g., `grafana-sns-user`.
|
||||
- Click **"Next"**.
|
||||
- Select **"Attach policies directly"**.
|
||||
- Search for the policy you created earlier (`AssumeSNSRolePolicy`) and select it.
|
||||
- Click **"Next"** , and click **"Create user"**.
|
||||
|
||||
2. **Generate credentials**:
|
||||
- Within your newly created user, click on **"Create access key"**.
|
||||
- Select an appropriate use-case, e.g., `Application running outside AWS`.
|
||||
- Click **"Next"** , and click **"Create access key"**.
|
||||
- **Save Credentials**: Note the **Access key ID** and **Secret access key**. You'll need these for Grafana's configuration.
|
||||
|
||||
### 5. Add the SNS Contact Point in Grafana
|
||||
|
||||
After creating the IAM user and obtaining the necessary credentials, proceed to [configure the SNS contact point in Grafana]({{< relref "#adding-the-sns-contact-point-in-grafana" >}}) using the following details:
|
||||
|
||||
- **The Amazon SNS API URL**: `https://sns.us-east-1.amazonaws.com`
|
||||
- **Signature Version (sigv4)**:
|
||||
- **Region**: `us-east-1`
|
||||
- **Access Key**: `<YOUR_ACCESS_KEY>`.
|
||||
- **Secret Key**: `<YOUR_SECRET_ACCESS_KEY>`
|
||||
- **Role ARN**: `arn:aws:iam::<account_id>:role/GrafanaSNSRole`
|
||||
- **SNS topic ARN**: `arn:aws:sns:<region>:<account_id>:My-Topic`
|
||||
|
||||
{{< admonition type="note" >}}
|
||||
Replace the placeholder values (`https://sns.us-east-1.amazonaws.com`, `us-east-1`, `<YOUR_ACCESS_KEY>`, `<YOUR_SECRET_ACCESS_KEY>`, `arn:aws:iam::<account_id>:role/GrafanaSNSRole`, `arn:aws:sns:<region>:<account_id>:My-Topic`) with your actual AWS credentials and ARNs.
|
||||
{{< /admonition >}}
|
||||
|
||||
## Additional Resources
|
||||
|
||||
- [Amazon SNS Documentation](https://docs.aws.amazon.com/sns/index.html)
|
||||
- [AWS IAM Documentation](https://docs.aws.amazon.com/iam/index.html)
|
||||
- [Prometheus Alertmanager SNS Integration](https://prometheus.io/docs/alerting/configuration/#sns_config)
|
||||
- [Cloudwatch AWS Authentication]({{< relref "../../../../datasources/aws-cloudwatch/aws-authentication" >}})
|
||||
|
@ -39,6 +39,8 @@ To create your Discord integration in Grafana Alerting, complete the following s
|
||||
1. In the **Webhook URL** field, paste in your Webhook URL.
|
||||
1. Click **Test** to check that your integration works.
|
||||
|
||||
** For Grafana Alertmanager only.**
|
||||
|
||||
A test alert notification should be sent to the Discord channel that you associated with the Webhook.
|
||||
|
||||
1. Click **Save contact point**.
|
||||
|
@ -79,6 +79,9 @@ To set up email integration, complete the following steps.
|
||||
E-mail addresses are case sensitive. Ensure that the e-mail address entered is correct.
|
||||
|
||||
1. Click **Test** to check that your integration works.
|
||||
|
||||
** For Grafana Alertmanager only.**
|
||||
|
||||
1. Click **Save contact point**.
|
||||
|
||||
## Next steps
|
||||
|
@ -39,6 +39,8 @@ To create your Google Chat integration in Grafana Alerting, complete the followi
|
||||
1. In the **URL** field, paste in your Webhook URL.
|
||||
1. Click **Test** to check that your integration works.
|
||||
|
||||
** For Grafana Alertmanager only.**
|
||||
|
||||
A test alert notification should be sent to the Google Chat space that you associated with the Webhook.
|
||||
|
||||
1. Click **Save contact point**.
|
||||
|
@ -14,7 +14,7 @@ labels:
|
||||
- oss
|
||||
menuTitle: MQTT notifier
|
||||
title: Configure the MQTT notifier for Alerting
|
||||
weight: 80
|
||||
weight: 0
|
||||
---
|
||||
|
||||
# Configure the MQTT notifier for Alerting
|
||||
@ -33,7 +33,11 @@ To configure the MQTT integration for Alerting, complete the following steps.
|
||||
1. Enter the MQTT topic name in the **Topic** field.
|
||||
1. In **Optional MQTT settings**, specify additional settings for the MQTT integration if needed.
|
||||
1. Click **Test** to check that your integration works.
|
||||
|
||||
** For Grafana Alertmanager only.**
|
||||
|
||||
A test alert notification should be sent to the MQTT broker.
|
||||
|
||||
1. Click **Save** contact point.
|
||||
|
||||
The integration sends data in JSON format by default. You can change that using **Message format** field in the **Optional MQTT settings** section. There are two supported formats:
|
||||
|
@ -44,6 +44,8 @@ To create your Opsgenie integration in Grafana Alerting, complete the following
|
||||
1. In the **Alert API URL**, enter `https://api.opsgenie.com/v2/alerts`.
|
||||
1. Click **Test** to check that your integration works.
|
||||
|
||||
** For Grafana Alertmanager only.**
|
||||
|
||||
A test alert notification is sent to the Alerts page in Opsgenie.
|
||||
|
||||
1. Click **Save contact point**.
|
||||
|
@ -78,6 +78,9 @@ To create your Slack integration in Grafana Alerting, complete the following ste
|
||||
- In the **Token** field, copy in the Bot User OAuth Token that starts with “xoxb-”.
|
||||
1. If you are using a Webhook URL, in the **Webhook** field, copy in your Slack app Webhook URL.
|
||||
1. Click **Test** to check that your integration works.
|
||||
|
||||
** For Grafana Alertmanager only.**
|
||||
|
||||
1. Click **Save contact point**.
|
||||
|
||||
## Next steps
|
||||
|
@ -43,7 +43,11 @@ To create your MS Teams integration in Grafana Alerting, complete the following
|
||||
1. From the Integration list, select **Microsoft Teams**.
|
||||
1. In the **URL** field, copy in your Webhook URL.
|
||||
1. Click **Test** to check that your integration works.
|
||||
|
||||
** For Grafana Alertmanager only.**
|
||||
|
||||
A test alert notification should be sent to the MS Team channel.
|
||||
|
||||
1. Click **Save** contact point.
|
||||
|
||||
## Next steps
|
||||
|
@ -64,6 +64,9 @@ To create your Telegram integration in Grafana Alerting, complete the following
|
||||
1. In the **BOT API Token** field, copy in the bot API token.
|
||||
1. In the **Chat ID** field, copy in the chat ID.
|
||||
1. Click **Test** to check that your integration works.
|
||||
|
||||
** For Grafana Alertmanager only.**
|
||||
|
||||
1. Click **Save contact point**.
|
||||
|
||||
## Next steps
|
||||
|
@ -57,6 +57,8 @@ To create your PagerDuty integration in Grafana Alerting, complete the following
|
||||
1. In the **Integration Key** field, copy in your integration key.
|
||||
1. Click **Test** to check that your integration works.
|
||||
|
||||
** For Grafana Alertmanager only.**
|
||||
|
||||
An incident should display in the Service’s Activity tab in PagerDuty.
|
||||
|
||||
1. Click **Save contact point**.
|
||||
|
@ -152,6 +152,9 @@ To create your Webhook integration in Grafana Alerting, complete the following s
|
||||
1. From the Integration list, select **Webhook**.
|
||||
1. In the **URL** field, copy in your Webhook URL.
|
||||
1. Click **Test** to check that your integration works.
|
||||
|
||||
** For Grafana Alertmanager only.**
|
||||
|
||||
1. Click **Save contact point**.
|
||||
|
||||
## Next steps
|
||||
|
@ -53,19 +53,6 @@ The pending period specifies how long the condition must be met before firing, e
|
||||
|
||||
You can also set the pending period to zero to skip it and have the alert fire immediately once the condition is met.
|
||||
|
||||
## Condition operator
|
||||
|
||||
There are several condition operators available.
|
||||
|
||||
- **and**: Two conditions before and after must be true for the overall condition to be true.
|
||||
- **or**: If one of conditions before and after are true, the overall condition is true.
|
||||
- **logic-or**: If the condition before logic-or is true, the overall condition is immediately true, without evaluating subsequent conditions.
|
||||
|
||||
Here are some examples of operators.
|
||||
|
||||
- `TRUE and TRUE or FALSE and FALSE` evaluate to `FALSE`, because last two conditions return `FALSE`.
|
||||
- `TRUE and TRUE logic-or FALSE and FALSE` evaluate to `TRUE`, because the preceding condition returns `TRUE`.
|
||||
|
||||
## Evaluation example
|
||||
|
||||
Keep in mind:
|
||||
|
@ -111,6 +111,12 @@ Classic conditions exist mainly for compatibility reasons and should be avoided
|
||||
|
||||
Classic condition checks if any time series data matches the alert condition. It always produce one alert instance only, no matter how many time series meet the condition.
|
||||
|
||||
| Condition operators | How it works |
|
||||
| ------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| and | Two conditions before and after must be true for the overall condition to be true. |
|
||||
| or | If one of conditions before and after are true, the overall condition is true. |
|
||||
| logic-or | If the condition before `logic-or` is true, the overall condition is immediately true, without evaluating subsequent conditions. For instance, `TRUE and TRUE logic-or FALSE and FALSE` evaluate to `TRUE`, because the preceding condition returns `TRUE`. |
|
||||
|
||||
## Aggregations
|
||||
|
||||
Grafana Alerting provides the following aggregation functions to enable you to further refine your query.
|
||||
|
@ -1,164 +0,0 @@
|
||||
---
|
||||
aliases:
|
||||
- ../../contact-points/message-templating/ # /docs/grafana/<GRAFANA_VERSION>/alerting/contact-points/message-templating/
|
||||
- ../../alert-rules/message-templating/ # /docs/grafana/<GRAFANA_VERSION>/alerting/alert-rules/message-templating/
|
||||
- ../../unified-alerting/message-templating/ # /docs/grafana/<GRAFANA_VERSION>/alerting/unified-alerting/message-templating/
|
||||
canonical: https://grafana.com/docs/grafana/latest/alerting/fundamentals/notifications/templates/
|
||||
description: Learn about templates
|
||||
keywords:
|
||||
- grafana
|
||||
- alerting
|
||||
- guide
|
||||
- contact point
|
||||
- templating
|
||||
labels:
|
||||
products:
|
||||
- cloud
|
||||
- enterprise
|
||||
- oss
|
||||
title: Templates
|
||||
weight: 115
|
||||
refs:
|
||||
variables-label-annotation:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/alerting/alerting-rules/templating-labels-annotations/
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana-cloud/alerting-and-irm/alerting/alerting-rules/templating-labels-annotations/
|
||||
---
|
||||
|
||||
# Templates
|
||||
|
||||
Use templating to customize, format, and reuse alert notification messages. Create more flexible and informative alert notification messages by incorporating dynamic content, such as metric values, labels, and other contextual information.
|
||||
|
||||
In Grafana, there are two ways to template your alert notification messages:
|
||||
|
||||
1. Labels and annotations
|
||||
|
||||
- Template labels and annotations in alert rules.
|
||||
- Labels and annotations contain information about an alert.
|
||||
- Labels are used to differentiate an alert from all other alerts, while annotations are used to add additional information to an existing alert.
|
||||
|
||||
2. Notification templates
|
||||
|
||||
- Template notifications in contact points.
|
||||
- Add notification templates to contact points for reuse and consistent messaging in your notifications.
|
||||
- Use notification templates to change the title, message, and format of the message in your notifications.
|
||||
|
||||
This diagram illustrates the entire process of templating, from the creation of labels and annotations in alert rules or notification templates in contact points, to what they look like when exported and applied in your alert notification messages.
|
||||
|
||||
{{< figure src="/media/docs/alerting/grafana-templating-diagram-2.jpg" max-width="1200px" caption="How Templating works" >}}
|
||||
|
||||
In this diagram:
|
||||
|
||||
- **Monitored Application**: A web server, database, or any other service generating metrics. For example, it could be an NGINX server providing metrics about request rates, response times, and so on.
|
||||
- **Prometheus**: Prometheus collects metrics from the monitored application. For example, it might scrape metrics from the NGINX server, including labels like instance (the server hostname) and job (the service name).
|
||||
- **Grafana**: Grafana queries Prometheus to retrieve metrics data. For example, you might create an alert rule to monitor NGINX request rates over time, and template labels or annotations based on the instance label.
|
||||
- **Alertmanager**: Part of the Prometheus ecosystem, Alertmanager handles alert notifications. For example, if the request rate exceeds a certain threshold on a particular NGINX server, Alertmanager can send an alert notification to, for example, Slack or email, including the server name and the exceeded threshold (the instance label will be interpolated, and the actual server name will appear in the alert notification).
|
||||
- **Alert notification**: When an alert rule condition is met, Alertmanager sends a notification to various channels such as Slack, Grafana OnCall, etc. These notifications can include information from the labels associated with the alerting rule. For example, if an alert triggers due to high CPU usage on a specific server, the notification message can include details like server name (instance label), disk usage percentage, and the threshold that was exceeded.
|
||||
|
||||
## Labels and annotations
|
||||
|
||||
Labels and annotations contain information about an alert. Labels are used to differentiate an alert from all other alerts, while annotations are used to add additional information to an existing alert.
|
||||
|
||||
### Template labels
|
||||
|
||||
Label templates are applied in the alert rule itself (i.e. in the Configure labels and notifications section of an alert).
|
||||
|
||||
{{<admonition type="note">}}
|
||||
Think about templating labels when you need to improve or change how alerts are uniquely identified. This is especially helpful if the labels you get from your query aren't detailed enough. Keep in mind that it's better to keep long sentences for summaries and descriptions. Also, avoid using the query's value in labels because it may result in the creation of many alerts when you actually only need one.
|
||||
{{</admonition>}}
|
||||
|
||||
Templating can be applied by using variables and functions. These variables can represent dynamic values retrieved from your data queries.
|
||||
|
||||
{{<admonition type="note">}}
|
||||
In Grafana templating, the $ and . symbols are used to reference variables and their properties. You can reference variables directly in your alert rule definitions using the $ symbol followed by the variable name. Similarly, you can access properties of variables using the dot (.) notation within alert rule definitions.
|
||||
{{</admonition>}}
|
||||
|
||||
Here are some commonly used built-in [variables](ref:variables-label-annotation) to interact with the name and value of labels in Grafana alerting:
|
||||
|
||||
- The `$labels` variable, which contains all labels from the query.
|
||||
|
||||
For example, let's say you have an alert rule that triggers when the CPU usage exceeds a certain threshold. You want to create annotations that provide additional context when this alert is triggered, such as including the specific server that experienced the high CPU usage.
|
||||
|
||||
The host {{ index $labels "instance" }} has exceeded 80% CPU usage for the last 5 minutes
|
||||
|
||||
The outcome of this template would print:
|
||||
|
||||
The host instance 1 has exceeded 80% CPU usage for the last 5 minutes
|
||||
|
||||
- The `$value` variable, which is a string containing the labels and values of all instant queries; threshold, reduce and math expressions, and classic conditions in the alert rule.
|
||||
|
||||
In the context of the previous example, $value variable would write something like this:
|
||||
|
||||
CPU usage for {{ index $labels "instance" }} has exceeded 80% for the last 5 minutes: {{ $value }}
|
||||
|
||||
The outcome of this template would print:
|
||||
|
||||
CPU usage for instance1 has exceeded 80% for the last 5 minutes: [ var='A' labels={instance=instance1} value=81.234 ]
|
||||
|
||||
- The `$values` variable is a table containing the labels and floating point values of all instant queries and expressions, indexed by their Ref IDs (i.e. the id that identifies the query or expression. By default the Red ID of the query is “A”).
|
||||
|
||||
Given an alert with the labels instance=server1 and an instant query with the value 81.2345, would write like this:
|
||||
|
||||
CPU usage for {{ index $labels "instance" }} has exceeded 80% for the last 5 minutes: {{ index $values "A" }}
|
||||
|
||||
And it would print:
|
||||
|
||||
CPU usage for instance1 has exceeded 80% for the last 5 minutes: 81.2345
|
||||
|
||||
{{% admonition type="caution" %}}
|
||||
Extra whitespace in label templates can break matches with notification policies.
|
||||
{{% /admonition %}}
|
||||
|
||||
### Template annotations
|
||||
|
||||
Both labels and annotations have the same structure: a set of named values; however their intended uses are different. The purpose of annotations is to add additional information to existing alerts.
|
||||
|
||||
There are a number of suggested annotations in Grafana such as `description`, `summary`, `runbook_url`, `dashboardUId` and `panelId`. Like labels, annotations must have a name, and their value can contain a combination of text and template code that is evaluated when an alert is fired.
|
||||
|
||||
Here is an example of templating an annotation in the context of an alert rule. The text/template is added into the Add annotations section.
|
||||
|
||||
CPU usage for {{ index $labels "instance" }} has exceeded 80% for the last 5 minutes
|
||||
|
||||
The outcome of this template would print
|
||||
|
||||
CPU usage for Instance 1 has exceeded 80% for the last 5 minutes
|
||||
|
||||
### Template notifications
|
||||
|
||||
Notification templates represent the alternative approach to templating designed for reusing templates. Notifications are messages to inform users about events or conditions triggered by alerts. You can create reusable notification templates to customize the content and format of alert notifications. Variables, labels, or other context-specific details can be added to the templates to dynamically insert information like metric values.
|
||||
|
||||
Here is an example of a notification template:
|
||||
|
||||
```go
|
||||
{{ define "alerts.message" -}}
|
||||
{{ if .Alerts.Firing -}}
|
||||
{{ len .Alerts.Firing }} firing alert(s)
|
||||
{{ template "alerts.summarize" .Alerts.Firing }}
|
||||
{{- end }}
|
||||
{{- if .Alerts.Resolved -}}
|
||||
{{ len .Alerts.Resolved }} resolved alert(s)
|
||||
{{ template "alerts.summarize" .Alerts.Resolved }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{ define "alerts.summarize" -}}
|
||||
{{ range . -}}
|
||||
- {{ index .Annotations "summary" }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
```
|
||||
|
||||
This is the message you would receive in your contact point:
|
||||
|
||||
1 firing alert(s)
|
||||
- The database server db1 has exceeded 75% of available disk space. Disk space used is 76%, please resize the disk size within the next 24 hours
|
||||
|
||||
1 resolved alert(s)
|
||||
- The web server web1 has been responding to 5% of HTTP requests with 5xx errors for the last 5 minutes
|
||||
|
||||
Once the template is created, you need to make reference to it in your **Contact point** (in the Optional `[contact point]` settings) .
|
||||
|
||||
{{<admonition type="note">}}
|
||||
It's not recommended to include individual alert information within notification templates. Instead, it's more effective to incorporate such details within the rule using labels and annotations.
|
||||
{{</admonition>}}
|
187
docs/sources/alerting/fundamentals/templates.md
Normal file
187
docs/sources/alerting/fundamentals/templates.md
Normal file
@ -0,0 +1,187 @@
|
||||
---
|
||||
aliases:
|
||||
- ../fundamentals/notifications/templates/ # /docs/grafana/<GRAFANA_VERSION>/alerting/fundamentals/notifications/templates/
|
||||
- ../contact-points/message-templating/ # /docs/grafana/<GRAFANA_VERSION>/alerting/contact-points/message-templating/
|
||||
- ../alert-rules/message-templating/ # /docs/grafana/<GRAFANA_VERSION>/alerting/alert-rules/message-templating/
|
||||
- ../unified-alerting/message-templating/ # /docs/grafana/<GRAFANA_VERSION>/alerting/unified-alerting/message-templating/
|
||||
canonical: https://grafana.com/docs/grafana/latest/alerting/fundamentals/notifications/templates/
|
||||
description: Use templating to customize, format, and reuse alert notification messages. Create more flexible and informative alert notification messages by incorporating dynamic content, such as metric values, labels, and other contextual information.
|
||||
keywords:
|
||||
- grafana
|
||||
- alerting
|
||||
- guide
|
||||
- contact point
|
||||
- templating
|
||||
labels:
|
||||
products:
|
||||
- cloud
|
||||
- enterprise
|
||||
- oss
|
||||
title: Templates
|
||||
meta_image: /media/docs/alerting/how-notification-templates-works.png
|
||||
weight: 115
|
||||
refs:
|
||||
labels:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/alerting/fundamentals/alert-rules/annotation-label/#labels
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana-cloud/alerting-and-irm/alerting/fundamentals/alert-rules/annotation-label/#labels
|
||||
annotations:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/alerting/fundamentals/alert-rules/annotation-label/#annotations
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana-cloud/alerting-and-irm/alerting/fundamentals/alert-rules/annotation-label/#annotations
|
||||
templating-labels-annotations:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/alerting/alerting-rules/templating-labels-annotations/
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana-cloud/alerting-and-irm/alerting/alerting-rules/templating-labels-annotations/
|
||||
notification-message-reference:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/alerting/configure-notifications/template-notifications/reference/
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana-cloud/alerting-and-irm/alerting/configure-notifications/template-notifications/reference/
|
||||
notification-messages:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/alerting/configure-notifications/template-notifications/
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana-cloud/alerting-and-irm/alerting/configure-notifications/template-notifications/
|
||||
create-notification-templates:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/alerting/configure-notifications/template-notifications/create-notification-templates/
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana-cloud/alerting-and-irm/alerting/configure-notifications/template-notifications/create-notification-templates/
|
||||
---
|
||||
|
||||
# Templates
|
||||
|
||||
Use templating to customize, format, and reuse alert notification messages. Create more flexible and informative alert notification messages by incorporating dynamic content, such as metric values, labels, and other contextual information.
|
||||
|
||||
In Grafana, you have various options to template your alert notification messages:
|
||||
|
||||
1. [Alert rule annotations](#template-annotations)
|
||||
|
||||
- Annotations add extra information, like `summary` and `description`, to alert instances for notification messages.
|
||||
- Template annotations to display query values that are meaningful to the alert, for example, the server name or the threshold query value.
|
||||
|
||||
1. [Alert rule labels](#template-labels)
|
||||
|
||||
- Labels are used to differentiate an alert instance from all other alert instances.
|
||||
- Template labels to add an additional label based on a query value, or when the labels from the query are incomplete or not descriptive enough.
|
||||
|
||||
1. [Notification templates](#template-notifications)
|
||||
- Notification templates are used by contact points for consistent messaging in notification titles and descriptions.
|
||||
- Template notifications when you want to customize the appearance and information of your notifications.
|
||||
- Avoid using notification templates to add extra information to alert instances—use annotations instead.
|
||||
|
||||
This diagram illustrates the entire templating process, from querying labels and templating the alert summary and notification to the final alert notification message.
|
||||
|
||||
{{< figure src="/media/docs/alerting/how-notification-templates-works.png" max-width="1200px" caption="How templating works" >}}
|
||||
|
||||
In this diagram:
|
||||
|
||||
1. The alert rule query returns `12345`, along with the values of the `instance` and `job` labels.
|
||||
1. This query result breaches the alert rule condition, firing the alert instance.
|
||||
1. The alert instance generates an annotation summary, defined by the template used in the alert rule summary. In this case, it displays the value of the `instance` label: `server1`.
|
||||
1. The Alertmanager receives the firing alert instance, including the final annotation summary, and determines the contact point that will process the alert.
|
||||
1. The Alertmanager uses the contact point's notification template to format the message, then sends the notification to the configured destination(s)—an email address.
|
||||
|
||||
## Template annotations
|
||||
|
||||
[Annotations](ref:annotations) can be defined in the alert rule to add extra information to alert instances.
|
||||
|
||||
When creating an alert rule, Grafana suggests several optional annotations, such as `description`, `summary`, `runbook_url`, `dashboardUId` and `panelId`, which help identify and respond to alerts. You can also create custom annotations.
|
||||
|
||||
Annotations are key-value pairs, and their values can contain a combination of text and template code that is evaluated when the alert fires.
|
||||
|
||||
Annotations can contain plain text, but you should template annotations if you need to display query values that are relevant to the alert, for example:
|
||||
|
||||
- Show the query value that triggers the alert.
|
||||
- Include labels returned by the query that identify the alert.
|
||||
- Format the annotation message depending on a query value.
|
||||
|
||||
Here’s an example of templating an annotation, which explains where and why the alert was triggered. In this case, the alert triggers when CPU usage exceeds a threshold, and the `summary` annotation provides the relevant details.
|
||||
|
||||
```
|
||||
CPU usage for {{ index $labels "instance" }} has exceeded 80% ({{ index $values "A" }}) for the last 5 minutes.
|
||||
```
|
||||
|
||||
The outcome of this template would be:
|
||||
|
||||
```
|
||||
CPU usage for Instance 1 has exceeded 80% (81.2345) for the last 5 minutes.
|
||||
```
|
||||
|
||||
Implement annotations that provide meaningful information to respond to your alerts. Annotations are displayed in the Grafana alert detail view and are included by default in notifications.
|
||||
|
||||
For more details on how to template annotations, refer to [Template annotations and labels](ref:templating-labels-annotations).
|
||||
|
||||
## Template labels
|
||||
|
||||
[Labels](ref:labels) are used to differentiate one alert instance from all other alert instances, as the set of labels uniquely identifies an alert instance. Notification policies and silences use labels to handle alert instances.
|
||||
|
||||
Template labels when you need to improve or change how alerts are uniquely identified. This is helpful if the labels you get from your query aren't detailed enough.
|
||||
|
||||
Here’s an example of templating a `severity` label based on the query value:
|
||||
|
||||
```
|
||||
{{ if (gt $values.A.Value 90.0) -}}
|
||||
critical
|
||||
{{ else if (gt $values.A.Value 80.0) -}}
|
||||
high
|
||||
{{ else if (gt $values.A.Value 60.0) -}}
|
||||
medium
|
||||
{{ else -}}
|
||||
low
|
||||
{{- end }}
|
||||
```
|
||||
|
||||
Avoid using query values in labels, as this may result in the creation of numerous alerts when only one is needed. Use annotation to inform about the query value instead.
|
||||
|
||||
For more details on how to template labels, refer to [Template annotations and labels](ref:templating-labels-annotations).
|
||||
|
||||
## Template notifications
|
||||
|
||||
[Notification templates](ref:notification-messages) allow you to customize the content of your notifications, such as the subject of an email or the body of a Slack message.
|
||||
|
||||
Notification templates differ from templating annotations and labels in the following ways:
|
||||
|
||||
- Notification templates are assigned to the **Contact point**, rather than the alert rule.
|
||||
- If not specified, the contact point uses a default template that includes relevant alert information.
|
||||
- You can create reusable notification templates and reference them in other templates.
|
||||
- The same template can be shared across multiple contact points, making it easier to maintain and ensuring consistency.
|
||||
- While both annotation/label templates and notification templates use the same templating language, the available variables and functions differ. For more details, refer to the [notification template reference](ref:notification-message-reference) and [annotation/label template reference](ref:templating-labels-annotations).
|
||||
- Notification templates should not be used to add additional information to individual alerts—use annotations for that purpose.
|
||||
|
||||
Here is an example of a notification template that summarizes all firing and resolved alerts in a notification group:
|
||||
|
||||
```
|
||||
{{ define "alerts.message" -}}
|
||||
{{ if .Alerts.Firing -}}
|
||||
{{ len .Alerts.Firing }} firing alert(s)
|
||||
{{ template "alerts.summarize" .Alerts.Firing }}
|
||||
{{- end }}
|
||||
{{- if .Alerts.Resolved -}}
|
||||
{{ len .Alerts.Resolved }} resolved alert(s)
|
||||
{{ template "alerts.summarize" .Alerts.Resolved }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{ define "alerts.summarize" -}}
|
||||
{{ range . -}}
|
||||
- {{ index .Annotations "summary" }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
```
|
||||
|
||||
The notification message to the contact point would look like this:
|
||||
|
||||
```
|
||||
1 firing alert(s)
|
||||
- The database server db1 has exceeded 75% of available disk space. Disk space used is 76%, please resize the disk size within the next 24 hours.
|
||||
|
||||
1 resolved alert(s)
|
||||
- The web server web1 has been responding to 5% of HTTP requests with 5xx errors for the last 5 minutes.
|
||||
```
|
||||
|
||||
For instructions on creating and using notification templates, refer to [Create notification templates.](ref:create-notification-templates)
|
@ -1,10 +1,10 @@
|
||||
---
|
||||
aliases:
|
||||
- ../administration/reports/
|
||||
- ../enterprise/export-pdf/
|
||||
- ../enterprise/reporting/
|
||||
- ../panels/create-reports/
|
||||
- reporting/
|
||||
- ../administration/reports/ # /docs/grafana/latest/administration/reports/
|
||||
- ../enterprise/export-pdf/ # /docs/grafana/latest/enterprise/export-pdf/
|
||||
- ../enterprise/reporting/ # /docs/grafana/latest/enterprise/reporting/
|
||||
- ../panels/create-reports/ # /docs/grafana/latest/panels/create-reports/
|
||||
- reporting/ # /docs/grafana/latest/dashboards/reporting/
|
||||
keywords:
|
||||
- grafana
|
||||
- reporting
|
||||
|
@ -1,18 +1,13 @@
|
||||
---
|
||||
aliases:
|
||||
- ../administration/reports/
|
||||
- ../enterprise/export-pdf/
|
||||
- ../enterprise/reporting/
|
||||
- ../reference/share_dashboard/
|
||||
- ../reference/share_panel/
|
||||
- ../share-dashboards-panels/
|
||||
- ../sharing/
|
||||
- ../sharing/playlists/
|
||||
- ../sharing/share-dashboard/
|
||||
- ../sharing/share-panel/
|
||||
- ./
|
||||
- reporting/
|
||||
- share-dashboard/
|
||||
- ../reference/share_dashboard/ # /docs/grafana/latest/reference/share_dashboard/
|
||||
- ../reference/share_panel/ # /docs/grafana/latest/reference/share_panel/
|
||||
- ../share-dashboards-panels/ # /docs/grafana/latest/share-dashboards-panels/
|
||||
- ../sharing/ # /docs/grafana/latest/sharing/
|
||||
- ../sharing/playlists/ # /docs/grafana/latest/sharing/playlists/
|
||||
- ../sharing/share-dashboard/ # /docs/grafana/latest/sharing/share-dashboard/
|
||||
- ../sharing/share-panel/ # /docs/grafana/latest/sharing/share-panel/
|
||||
- share-dashboard/ # /docs/grafana/latest/dashboards/share-dashboard/
|
||||
keywords:
|
||||
- grafana
|
||||
- dashboard
|
||||
|
@ -171,6 +171,8 @@ The following options are the same for both **Builder** and **Code** mode:
|
||||
|
||||
- **Line limit** -Defines the upper limit for the number of log lines returned by a query. The default is `1000`
|
||||
|
||||
- **Direction** - Determines the search order. **Backward** is a backward search starting at the end of the time range. **Forward** is a forward search starting at the beginning of the time range. The default is **Backward**
|
||||
|
||||
- **Step** Sets the step parameter of Loki metrics queries. The default value equals to the value of `$__interval` variable, which is calculated using the time range and the width of the graph (the number of pixels).
|
||||
|
||||
- **Resolution** Deprecated. Sets the step parameter of Loki metrics range queries. With a resolution of `1/1`, each pixel corresponds to one data point. `1/2` retrieves one data point for every other pixel, `1/10` retrieves one data point per 10 pixels, and so on. Lower resolutions perform better.
|
||||
|
@ -73,7 +73,7 @@ For instructions on how to add a data source to Grafana, refer to the [administr
|
||||
Only users with the organization administrator role can add data sources.
|
||||
Administrators can also [configure the data source via YAML](#provision-the-data-source) with Grafana's provisioning system.
|
||||
|
||||
{{< docs/play title="MySQL: Cities of the World Sample Data Set" url="https://play.grafana.org/d/8JOvPQr7k/" >}}
|
||||
{{< docs/play title="MySQL Overview" url="https://play.grafana.org/d/edyh1ib7db6rkb/mysql-overview" >}}
|
||||
|
||||
## Configure the data source
|
||||
|
||||
|
@ -66,6 +66,8 @@ For instructions on how to add a data source to Grafana, refer to the [administr
|
||||
Only users with the organization administrator role can add data sources.
|
||||
Administrators can also [configure the data source via YAML](#provision-the-data-source) with Grafana's provisioning system.
|
||||
|
||||
{{< docs/play title="PostgreSQL Overview" url="https://play.grafana.org/d/ddvpgdhiwjvuod/postgresql-overview" >}}
|
||||
|
||||
## PostgreSQL settings
|
||||
|
||||
To configure basic settings for the data source, complete the following steps:
|
||||
|
@ -46,6 +46,11 @@ refs:
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/explore/explore-inspector/
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/explore/explore-inspector/
|
||||
explore-traces-app:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/explore/simplified-exploration/traces/
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana-cloud/visualizations/simplified-exploration/traces/
|
||||
---
|
||||
|
||||
# Query tracing data
|
||||
@ -55,6 +60,10 @@ The queries use [TraceQL](/docs/tempo/latest/traceql), the query language design
|
||||
|
||||
For general documentation on querying data sources in Grafana, refer to [Query and transform data](ref:query-transform-data).
|
||||
|
||||
{{< admonition type="tip" >}}
|
||||
Don't know TraceQL? Try [Explore Traces](ref:explore-traces-app), an intuitive, queryless app that lets you explore your tracing data using RED metrics.
|
||||
{{< /admonition >}}
|
||||
|
||||
## Before you begin
|
||||
|
||||
You can compose TraceQL queries in Grafana and Grafana Cloud using **Explore** and a Tempo data source.
|
||||
|
@ -40,4 +40,8 @@ The Grafana Explore apps are designed for effortless data exploration through in
|
||||
|
||||
Easily explore telemetry signals with these specialized tools, tailored specifically for the Grafana databases to provide quick and accurate insights.
|
||||
|
||||
To learn more, read [A queryless experience for exploring metrics, logs, traces, and profiles: Introducing the Explore apps suite for Grafana](https://grafana.com/blog/2024/09/24/queryless-metrics-logs-traces-profiles/).
|
||||
|
||||
{{< youtube id="MSHeWWsHaIA" >}}
|
||||
|
||||
{{< card-grid key="cards" type="simple" >}}
|
||||
|
@ -51,7 +51,7 @@ refs:
|
||||
|
||||
Geomaps allow you to view and customize the world map using geospatial data. It's the ideal visualization if you have data that includes location information and you want to see it displayed in a map.
|
||||
|
||||
You can configure and overlay [map layers](#types), like heatmaps and networks, and blend included basemaps or your own custom maps. This helps you to easily focus on the important location-based characteristics of the data.
|
||||
You can configure and overlay [map layers](#layer-type), like heatmaps and networks, and blend included basemaps or your own custom maps. This helps you to easily focus on the important location-based characteristics of the data.
|
||||
|
||||
{{< figure src="/static/img/docs/geomap-panel/geomap-example-8-1-0.png" max-width="1200px" alt="Geomap visualization" >}}
|
||||
|
||||
@ -141,42 +141,42 @@ The other location types— airport codes or US state codes—aren't aut
|
||||
|
||||
If you want to use other codes or give the field a custom name, you can follow the steps in the [Location mode](#location-mode) section.
|
||||
|
||||
## Panel options
|
||||
## Configuration options
|
||||
|
||||
### Panel options
|
||||
|
||||
{{< docs/shared lookup="visualizations/panel-options.md" source="grafana" version="<GRAFANA_VERSION>" >}}
|
||||
|
||||
## Map View
|
||||
### Map view options
|
||||
|
||||
The map view controls the initial view of the map when the dashboard loads.
|
||||
|
||||
### Initial View
|
||||
#### Initial View
|
||||
|
||||
The initial view configures how the geomap renders when the panel is first loaded.
|
||||
|
||||
- **View** sets the center for the map when the panel first loads.
|
||||
- **Fit to data** fits the map view based on the data extents of Map layers and updates when data changes.
|
||||
- **Data** option allows selection of extent based on data from "All layers", a single "Layer", or the "Last value" from a selected layer.
|
||||
- **Layer** can be selected if fitting data from a single "Layer" or the "Last value" of a layer.
|
||||
- **Padding** sets padding in relative percent beyond data extent (not available when looking at "Last value" only).
|
||||
- **Max Zoom** sets the maximum zoom level when fitting data.
|
||||
- **Coordinates** sets the map view based on:
|
||||
- **Latitude**
|
||||
- **Longitude**
|
||||
- Default Views are also available including:
|
||||
- **(0°, 0°)**
|
||||
- **North America**
|
||||
- **South America**
|
||||
- **Europe**
|
||||
- **Africa**
|
||||
- **West Asia**
|
||||
- **South Asia**
|
||||
- **South-East Asia**
|
||||
- **East Asia**
|
||||
- **Australia**
|
||||
- **Oceania**
|
||||
- **Zoom** sets the initial zoom level.
|
||||
- **View** - Sets the center for the map when the panel first loads. Refer to the table following this list for view selections.
|
||||
- **Zoom** - Sets the initial zoom level.
|
||||
- **Use current map settings** - Use the settings of the current map to set the center.
|
||||
|
||||
### Share view
|
||||
<!-- prettier-ignore-start -->
|
||||
| View selection | Description |
|
||||
|---|---|
|
||||
| Fit to data | fits the map view based on the data extents of Map layers and updates when data changes.<ul><li>**Data** - option allows selection of extent based on data from "All layers", a single "Layer", or the "Last value" from a selected layer.</li><li>**Layer** - can be selected if fitting data from a single "Layer" or the "Last value" of a layer.</li><li>**Padding** - sets padding in relative percent beyond data extent (not available when looking at "Last value" only).</li><li>**Max zoom** - sets the maximum zoom level when fitting data.</li> |
|
||||
| (0°, 0°) | |
|
||||
| Coordinates | sets the map view based on: **Latitude** and **Longitude**. |
|
||||
<!-- prettier-ignore-end -->
|
||||
|
||||
Default Views are also available including:
|
||||
|
||||
<!-- prettier-ignore-start -->
|
||||
| | | | | |
|
||||
| ------------- | ------------- | ------ | ------ | --------- |
|
||||
| North America | South America | Europe | Africa | West Asia |
|
||||
| South Asia | South-East Asia | East Asia | Australia | Oceania |
|
||||
<!-- prettier-ignore-end -->
|
||||
|
||||
#### Share view
|
||||
|
||||
The **Share view** option allows you to link the movement and zoom actions of multiple map visualizations within the same dashboard. The map visualizations that have this option enabled act in tandem when one of them is moved or zoomed, leaving the other ones independent.
|
||||
|
||||
@ -184,11 +184,28 @@ The **Share view** option allows you to link the movement and zoom actions of mu
|
||||
You might need to reload the dashboard for this feature to work.
|
||||
{{< /admonition >}}
|
||||
|
||||
## Map layers
|
||||
### Map layers options
|
||||
|
||||
Geomaps support showing multiple layers. Each layer determines how you visualize geospatial data on top of the base map.
|
||||
|
||||
### Types
|
||||
There are three options that you need to set for all maps:
|
||||
|
||||
- [Layer type](#layer-type)
|
||||
- [Data](#data)
|
||||
- [Location mode](#location-mode)
|
||||
|
||||
Other options are dependent on your map layer type and are described within the layer type section.
|
||||
|
||||
The layer controls allow you to create layers, change their name, reorder and delete layers.
|
||||
|
||||
- **Add layer** creates an additional, configurable data layer for the geomap. When you add a layer, you are prompted to select a layer type. You can change the layer type at any point during panel configuration. See the **Layer Types** section above for details on each layer type.
|
||||
- **Edit layer name (pencil icon)** renames the layer.
|
||||
- **Trash Bin** deletes the layer.
|
||||
- **Reorder (six dots/grab handle)** allows you to change the layer order. Data on higher layers will appear above data on lower layers. The visualization will update the layer order as you drag and drop to help simplify choosing a layer order.
|
||||
|
||||
You can add multiple layers of data to a single geomap in order to create rich, detailed visualizations.
|
||||
|
||||
#### Layer type
|
||||
|
||||
There are seven map layer types to choose from in a geomap.
|
||||
|
||||
@ -199,6 +216,10 @@ There are seven map layer types to choose from in a geomap.
|
||||
- [Route (Beta)](#route-layer-beta) render data points as a route.
|
||||
- [Photos (Beta)](#photos-layer-beta) renders a photo at each data point.
|
||||
- [Network (Beta)](#network-layer-beta) visualizes a network graph from the data.
|
||||
- [Open Street Map](#open-street-map-layer) adds a map from a collaborative free geographic world database.
|
||||
- [CARTO basemap](#carto-basemap-layer) adds a layer from CARTO Raster basemaps.
|
||||
- [ArcGIS MapServer](#arcgis-mapserver-layer) adds a layer from an ESRI ArcGIS MapServer.
|
||||
- [XYZ Tile layer](#xyz-tile-layer) adds a map from a generic tile layer.
|
||||
|
||||
{{% admonition type="note" %}}
|
||||
Beta is equivalent to the [public preview](/docs/release-life-cycle/) release stage.
|
||||
@ -209,9 +230,7 @@ There are also two experimental (or alpha) layer types.
|
||||
- **Icon at last point (alpha)** renders an icon at the last data point.
|
||||
- **Dynamic GeoJSON (alpha)** styles a GeoJSON file based on query results.
|
||||
|
||||
{{% admonition type="note" %}}
|
||||
To enable experimental layers:
|
||||
Set `enable_alpha` to `true` in your configuration file:
|
||||
To enable experimental layers. Set `enable_alpha` to `true` in your configuration file:
|
||||
|
||||
```
|
||||
[panels]
|
||||
@ -224,29 +243,11 @@ To enable the experimental layers using Docker, run the following command:
|
||||
docker run -p 3000:3000 -e "GF_PANELS_ENABLE_ALPHA=true" grafana/grafana:<VERSION>
|
||||
```
|
||||
|
||||
{{% /admonition %}}
|
||||
|
||||
{{% admonition type="note" %}}
|
||||
[Basemap layer types](#types-1) can also be added as layers. You can specify an opacity.
|
||||
{{% /admonition %}}
|
||||
|
||||
### Layer Controls
|
||||
|
||||
The layer controls allow you to create layers, change their name, reorder and delete layers.
|
||||
|
||||
- **Add layer** creates an additional, configurable data layer for the geomap. When you add a layer, you are prompted to select a layer type. You can change the layer type at any point during panel configuration. See the **Layer Types** section above for details on each layer type.
|
||||
- The layer controls allow you to rename, delete, and reorder the layers of the visualization.
|
||||
- **Edit layer name (pencil icon)** renames the layer.
|
||||
- **Trash Bin** deletes the layer.
|
||||
- **Reorder (six dots/grab handle)** allows you to change the layer order. Data on higher layers will appear above data on lower layers. The visualization will update the layer order as you drag and drop to help simplify choosing a layer order.
|
||||
|
||||
You can add multiple layers of data to a single geomap in order to create rich, detailed visualizations.
|
||||
|
||||
### Data
|
||||
#### Data
|
||||
|
||||
Geomaps need a source of geographical data gathered from a data source query which can return multiple datasets. By default Grafana picks the first dataset, but this drop-down allows you to pick other datasets if the query returns more than one.
|
||||
|
||||
### Location mode
|
||||
#### Location mode
|
||||
|
||||
There are four options to map the data returned by the selected query:
|
||||
|
||||
@ -259,23 +260,290 @@ There are four options to map the data returned by the selected query:
|
||||
- **Geohash** specifies that your query holds geohash data. You will be prompted to select a string data field for the geohash from your database query.
|
||||
- **Lookup** specifies that your query holds location name data that needs to be mapped to a value. You will be prompted to select the lookup field from your database query and a gazetteer. The gazetteer is the directory that is used to map your queried data to a geographical point.
|
||||
|
||||
## Basemap layer
|
||||
#### Markers layer
|
||||
|
||||
The markers layer allows you to display data points as different marker shapes such as circles, squares, triangles, stars, and more.
|
||||
|
||||

|
||||
|
||||
<!-- prettier-ignore-start -->
|
||||
| Option | Description |
|
||||
| ------ | ----------- |
|
||||
| Data | Configure the data settings for the layer. For more information, refer to [Data](#data). |
|
||||
| Location | Configure the data settings for the layer. For more information, refer to [Location mode](#location-mode). |
|
||||
| Size | Configures the size of the markers. The default is `Fixed size`, which makes all marker sizes the same regardless of the data; however, there is also an option to size the markers based on data corresponding to a selected field. `Min` and `Max` marker sizes have to be set such that the markers can scale within this range. |
|
||||
| Symbol | Allows you to choose the symbol, icon, or graphic to aid in providing additional visual context to your data. Choose from assets that are included with Grafana such as simple symbols or the Unicon library. You can also specify a URL containing an image asset. The image must be a scalable vector graphic (SVG). |
|
||||
| Symbol Vertical Align | Configures the vertical alignment of the symbol relative to the data point. Note that the symbol's rotation angle is applied first around the data point, then the vertical alignment is applied relative to the rotation of the symbol. |
|
||||
| Symbol Horizontal Align | Configures the horizontal alignment of the symbol relative to the data point. Note that the symbol's rotation angle is applied first around the data point, then the horizontal alignment is applied relative to the rotation of the symbol. |
|
||||
| Color | Configures the color of the markers. The default `Fixed color` sets all markers to a specific color. There is also an option to have conditional colors depending on the selected field data point values and the color scheme set in the `Standard options` section. |
|
||||
| Fill opacity | Configures the transparency of each marker. |
|
||||
| Rotation angle | Configures the rotation angle of each marker. The default is `Fixed value`, which makes all markers rotate to the same angle regardless of the data; however, there is also an option to set the rotation of the markers based on data corresponding to a selected field. |
|
||||
| Text label | Configures a text label for each marker. |
|
||||
| Show legend | Allows you to toggle the legend for the layer. |
|
||||
| Display tooltip | Allows you to toggle tooltips for the layer. |
|
||||
<!-- prettier-ignore-end -->
|
||||
|
||||
#### Heatmap layer
|
||||
|
||||
The heatmap layer clusters various data points to visualize locations with different densities.
|
||||
To add a heatmap layer:
|
||||
|
||||
Click on the drop-down menu under Data Layer and choose `Heatmap`.
|
||||
|
||||
Similar to `Markers`, you are prompted with various options to determine which data points to visualize and how you want to visualize them.
|
||||
|
||||

|
||||
|
||||
<!-- prettier-ignore-start -->
|
||||
| Option | Description |
|
||||
| ------ | ----------- |
|
||||
| Data | Configure the data settings for the layer. For more information, refer to [Data](#data). |
|
||||
| Location | Configure the data settings for the layer. For more information, refer to [Location mode](#location-mode). |
|
||||
| Weight values | Configures the size of the markers. The default is `Fixed size`, which makes all marker sizes the same regardless of the data; however, there is also an option to size the markers based on data corresponding to a selected field. `Min` and `Max` marker sizes have to be set such that the markers can scale within this range. |
|
||||
| Radius | Configures the size of the heatmap clusters. |
|
||||
| Blur | Configures the amount of blur on each cluster. |
|
||||
| Opacity | Configures the opacity of each cluster. |
|
||||
| Display tooltip | Allows you to toggle tooltips for the layer. |
|
||||
<!-- prettier-ignore-end -->
|
||||
|
||||
#### GeoJSON layer
|
||||
|
||||
The GeoJSON layer allows you to select and load a static GeoJSON file from the filesystem.
|
||||
|
||||
<!-- prettier-ignore-start -->
|
||||
| Option | Description |
|
||||
| ------ | ----------- |
|
||||
| GeoJSON URL | Provides a choice of GeoJSON files that ship with Grafana. |
|
||||
| Default Style | Controls which styles to apply when no rules above match.<ul><li>**Color** - configures the color of the default style</li><li>**Opacity** - configures the default opacity</li></ul> |
|
||||
| Style Rules | Apply styles based on feature properties <ul><li>**Rule** - allows you to select a _feature_, _condition_, and _value_ from the GeoJSON file in order to define a rule. The trash bin icon can be used to delete the current rule.</li><li>**Color** - configures the color of the style for the current rule</li><li>**Opacity** - configures the transparency level for the current rule</li> |
|
||||
| Display tooltip | Allows you to toggle tooltips for the layer. |
|
||||
<!-- prettier-ignore-end -->
|
||||
|
||||
Styles can be set within the "properties" object of the GeoJSON with support for the following geometries:
|
||||
|
||||
**Polygon, MultiPolygon**
|
||||
|
||||
- **"fill"** - The color of the interior of the polygon(s)
|
||||
- **"fill-opacity"** - The opacity of the interior of the polygon(s)
|
||||
- **"stroke-width"** - The width of the line component of the polygon(s)
|
||||
|
||||
**Point, MultiPoint**
|
||||
|
||||
- **"marker-color"** - The color of the point(s)
|
||||
- **"marker-size"** - The size of the point(s)
|
||||
|
||||
**LineString, MultiLineString**
|
||||
|
||||
- **"stroke"** - The color of the line(s)
|
||||
- **"stroke-width"** - The width of the line(s)
|
||||
|
||||
#### Night / Day layer
|
||||
|
||||
The Night / Day layer displays night and day regions based on the current time range.
|
||||
|
||||
{{< figure src="/static/img/docs/geomap-panel/geomap-day-night-9-1-0.png" max-width="1200px" alt="Geomap panel Night / Day" >}}
|
||||
|
||||
<!-- prettier-ignore-start -->
|
||||
| Option | Description |
|
||||
| ------ | ----------- |
|
||||
| Data | Configures the data set for the layer. For more information, refer to [Data](#data). |
|
||||
| Show | Toggles the time source from panel time range. |
|
||||
| Night region color | Picks the color for the night region. |
|
||||
| Display sun | Toggles the sun icon. |
|
||||
| Opacity | Set the opacity from `0` (transparent) to `1` (opaque). |
|
||||
| Display tooltip | Allows you to toggle tooltips for the layer. |
|
||||
<!-- prettier-ignore-end -->
|
||||
|
||||
[Extensions for OpenLayers - DayNight](https://viglino.github.io/ol-ext/examples/layer/map.daynight.html)
|
||||
|
||||
#### Route layer (Beta)
|
||||
|
||||
{{% admonition type="caution" %}}
|
||||
The Route layer is currently in [public preview](/docs/release-life-cycle/). Grafana Labs offers limited support, and breaking changes might occur prior to the feature being made generally available.
|
||||
{{% /admonition %}}
|
||||
|
||||
The Route layer renders data points as a route.
|
||||
|
||||
{{< figure src="/media/docs/grafana/geomap-route-layer-basic-9-4-0.png" max-width="1200px" alt="Geomap panel Route" >}}
|
||||
|
||||
The layer can also render a route with arrows.
|
||||
|
||||
{{< figure src="/media/docs/grafana/geomap-route-layer-arrow-size-9-4-0.png" max-width="1200px" alt="Geomap panel Route arrows with size" >}}
|
||||
|
||||
<!-- prettier-ignore-start -->
|
||||
| Option | Description |
|
||||
| ------ | ----------- |
|
||||
| Data | configure the data settings for the layer. For more information, refer to [Data](#data). |
|
||||
| Location | configure the data settings for the layer. For more information, refer to [Location mode](#location-mode). |
|
||||
| Size | sets the route thickness. Fixed value by default. When field data is selected you can set the Min and Max range in which field data can scale. |
|
||||
| Color | sets the route color. Set to `Fixed color` by default. You can also tie the color to field data. |
|
||||
| Fill opacity | configures the opacity of the route. |
|
||||
| Text label | configures a text label for each route. |
|
||||
| Arrow | sets the arrow styling to display along route, in order of data. Choose from: **None**, **Forward**, and **Reverse** |
|
||||
| Display tooltip | allows you to toggle tooltips for the layer. |
|
||||
<!-- prettier-ignore-end -->
|
||||
|
||||
[Extensions for OpenLayers - Flow Line Style](http://viglino.github.io/ol-ext/examples/style/map.style.gpxline.html)
|
||||
|
||||
#### Photos layer (Beta)
|
||||
|
||||
{{% admonition type="caution" %}}
|
||||
The Photos layer is currently in [public preview](/docs/release-life-cycle/). Grafana Labs offers limited support, and breaking changes might occur prior to the feature being made generally available.
|
||||
{{% /admonition %}}
|
||||
|
||||
The Photos layer renders a photo at each data point.
|
||||
|
||||
{{< figure src="/static/img/docs/geomap-panel/geomap-photos-9-3-0.png" max-width="1200px" alt="Geomap panel Photos" >}}
|
||||
|
||||
<!-- prettier-ignore-start -->
|
||||
| Option | Description |
|
||||
| ------ | ----------- |
|
||||
| Data | Configure the data settings for the layer. For more information, refer to [Data](#data). |
|
||||
| Location | Configure the data settings for the layer. For more information, refer to [Location mode](#location-mode). |
|
||||
| Image Source field | Allows you to select a string field containing image data in either of the following formats:<ul><li>**Image URLs**</li><li>**Base64 encoded** - Image binary ("data:image/png;base64,...")</li></ul> |
|
||||
| Kind | Sets the frame style around the images. Choose from: **Square**, **Circle**, **Anchored**, and **Folio**. |
|
||||
| Crop | Toggles whether the images are cropped to fit. |
|
||||
| Shadow | Toggles a box shadow behind the images. |
|
||||
| Border | Sets the border size around images. |
|
||||
| Border color | Sets the border color around images. |
|
||||
| Radius | Sets the overall size of images in pixels. |
|
||||
| Display tooltip | Allows you to toggle tooltips for the layer. |
|
||||
<!-- prettier-ignore-end -->
|
||||
|
||||
[Extensions for OpenLayers - Image Photo Style](http://viglino.github.io/ol-ext/examples/style/map.style.photo.html)
|
||||
|
||||
#### Network layer (Beta)
|
||||
|
||||
{{% admonition type="caution" %}}
|
||||
The Network layer is currently in [public preview](/docs/release-life-cycle/). Grafana Labs offers limited support, and breaking changes might occur prior to the feature being made generally available.
|
||||
{{% /admonition %}}
|
||||
|
||||
The Network layer renders a network graph. This layer supports the same [data format supported by the node graph visualization](ref:data-format) with the addition of [geospatial data](#location-mode) included in the nodes data. The geospatial data is used to locate and render the nodes on the map.
|
||||
|
||||
{{< figure src="/media/docs/grafana/screenshot-grafana-10-1-geomap-network-layer-v2.png" max-width="750px" alt="Geomap network layer" >}}
|
||||
|
||||
You can convert node graph data to a network layer:
|
||||
{{< video-embed src="/media/docs/grafana/screen-recording-10-1-geomap-network-layer-from-node-graph.mp4" max-width="750px" alt="Node graph to Geomap network layer" >}}
|
||||
|
||||
<!-- prettier-ignore-start -->
|
||||
| Option | Description |
|
||||
| ------ | ----------- |
|
||||
| Data | Configure the data settings for the layer. For more information, refer to [Data](#data). |
|
||||
| Location | Configure the data settings for the layer. For more information, refer to [Location mode](#location-mode). |
|
||||
| Arrow | Sets the arrow direction to display for each edge, with forward meaning source to target. Choose from: **None**, **Forward**, **Reverse** and **Both**. |
|
||||
| Show legend | Allows you to toggle the legend for the layer. **Note:** The legend currently only supports node data. |
|
||||
| Display tooltip | Allows you to toggle tooltips for the layer. |
|
||||
<!-- prettier-ignore-end -->
|
||||
|
||||
##### Node styles options
|
||||
|
||||
<!-- prettier-ignore-start -->
|
||||
| Option | Description |
|
||||
| ------ | ----------- |
|
||||
| Size | Configures the size of the nodes. The default is `Fixed size`, which makes all node sizes the same regardless of the data; however, there is also an option to size the nodes based on data corresponding to a selected field. `Min` and `Max` node sizes have to be set such that the nodes can scale within this range. |
|
||||
| Symbol | Allows you to choose the symbol, icon, or graphic to aid in providing additional visual context to your data. Choose from assets that are included with Grafana such as simple symbols or the Unicon library. You can also specify a URL containing an image asset. The image must be a scalable vector graphic (SVG). |
|
||||
| Color | Configures the color of the nodes. The default `Fixed color` sets all nodes to a specific color. There is also an option to have conditional colors depending on the selected field data point values and the color scheme set in the `Standard options` section. |
|
||||
| Fill opacity | Configures the transparency of each node. |
|
||||
| Rotation angle | Configures the rotation angle of each node. The default is `Fixed value`, which makes all nodes rotate to the same angle regardless of the data; however, there is also an option to set the rotation of the nodes based on data corresponding to a selected field. |
|
||||
| Text label | Configures a text label for each node. |
|
||||
<!-- prettier-ignore-end -->
|
||||
|
||||
##### Edge styles options
|
||||
|
||||
<!-- prettier-ignore-start -->
|
||||
| Option | Description |
|
||||
| ------ | ----------- |
|
||||
| Size | Configures the line width of the edges. The default is `Fixed size`, which makes all edge line widths the same regardless of the data; however, there is also an option to size the edges based on data corresponding to a selected field. `Min` and `Max` eges sizes have to be set such that the edges can scale within this range. |
|
||||
| Color | Configures the color of the edges. The default `Fixed color` sets all edges to a specific color. There is also an option to have conditional colors depending on the selected field data point values and the color scheme set in the `Standard options` section. |
|
||||
| Fill opacity | Configures the transparency of each edge. |
|
||||
| Text label | Configures a text label for each edge. |
|
||||
<!-- prettier-ignore-end -->
|
||||
|
||||
#### Open Street Map layer
|
||||
|
||||
A map from a collaborative free geographic world database.
|
||||
|
||||
{{< figure src="/static/img/docs/geomap-panel/geomap-osm-9-1-0.png" max-width="1200px" alt="Geomap panel Open Street Map" >}}
|
||||
|
||||
- **Opacity** from 0 (transparent) to 1 (opaque)
|
||||
- **Display tooltip** - allows you to toggle tooltips for the layer.
|
||||
|
||||
[About Open Street Map](https://www.openstreetmap.org/about)
|
||||
|
||||
#### CARTO basemap layer
|
||||
|
||||
A CARTO layer is from CARTO Raster basemaps.
|
||||
|
||||
- **Theme**
|
||||
- Auto
|
||||
- Light
|
||||
{{< figure src="/static/img/docs/geomap-panel/geomap-carto-light-9-1-0.png" max-width="1200px" alt="Geomap panel CARTO light example" >}}
|
||||
- Dark
|
||||
{{< figure src="/static/img/docs/geomap-panel/geomap-carto-dark-9-1-0.png" max-width="1200px" alt="Geomap panel CARTO dark example" >}}
|
||||
- **Show labels** shows the Country details on top of the map.
|
||||
- **Opacity** from 0 (transparent) to 1 (opaque)
|
||||
- **Display tooltip** - allows you to toggle tooltips for the layer.
|
||||
|
||||
[About CARTO](https://carto.com/about-us/)
|
||||
|
||||
#### ArcGIS MapServer layer
|
||||
|
||||
An ArcGIS layer is a layer from an ESRI ArcGIS MapServer.
|
||||
|
||||
- **Server Instance** to select the map type.
|
||||
- World Street Map
|
||||
{{< figure src="/static/img/docs/geomap-panel/geomap-arcgis-wsm-9-1-0.png" max-width="1200px" alt="Geomap panel ArcGIS World Street Map" >}}
|
||||
- World Imagery
|
||||
{{< figure src="/static/img/docs/geomap-panel/geomap-arcgis-wi-9-1-0.png" max-width="1200px" alt="Geomap panel ArcGIS World Imagery" >}}
|
||||
- World Physical
|
||||
{{< figure src="/static/img/docs/geomap-panel/geomap-arcgis-wp-9-1-0.png" max-width="1200px" alt="Geomap panel ArcGIS World Physical" >}}
|
||||
- Topographic
|
||||
{{< figure src="/static/img/docs/geomap-panel/geomap-arcgis-topographic-9-1-0.png" max-width="1200px" alt="Geomap panel ArcGIS Topographic" >}}
|
||||
- USA Topographic
|
||||
{{< figure src="/static/img/docs/geomap-panel/geomap-arcgis-usa-topographic-9-1-0.png" max-width="1200px" alt="Geomap panel ArcGIS USA Topographic" >}}
|
||||
- World Ocean
|
||||
{{< figure src="/static/img/docs/geomap-panel/geomap-arcgis-ocean-9-1-0.png" max-width="1200px" alt="Geomap panel ArcGIS World Ocean" >}}
|
||||
- Custom MapServer (see [XYZ](#xyz-tile-layer) for formatting)
|
||||
- URL template
|
||||
- Attribution
|
||||
- **Opacity** from 0 (transparent) to 1 (opaque)
|
||||
- **Display tooltip** - allows you to toggle tooltips for the layer.
|
||||
|
||||
##### More Information
|
||||
|
||||
- [ArcGIS Services](https://services.arcgisonline.com/arcgis/rest/services)
|
||||
- [About ESRI](https://www.esri.com/en-us/about/about-esri/overview)
|
||||
|
||||
#### XYZ Tile layer
|
||||
|
||||
The XYZ Tile layer is a map from a generic tile layer.
|
||||
|
||||
{{< figure src="/static/img/docs/geomap-panel/geomap-xyz-9-1-0.png" max-width="1200px" alt="Geomap panel xyz example" >}}
|
||||
|
||||
- **URL template** - Set a valid tile server url, with {z}/{x}/{y} for example: https://tile.openstreetmap.org/{z}/{x}/{y}.png
|
||||
- **Attribution** sets the reference string for the layer if displayed in [map controls](#show-attribution)
|
||||
- **Opacity** from 0 (transparent) to 1 (opaque)
|
||||
|
||||
##### More information
|
||||
|
||||
- [Tiled Web Map Wikipedia](https://en.wikipedia.org/wiki/Tiled_web_map)
|
||||
- [List of Open Street Map Tile Servers](https://wiki.openstreetmap.org/wiki/Tile_servers)
|
||||
|
||||
### Basemap layer options
|
||||
|
||||
A basemap layer provides the visual foundation for a mapping application. It typically contains data with global coverage. Several base layer options
|
||||
are available each with specific configuration options to style the base map.
|
||||
|
||||
### Types
|
||||
Basemap layer types can also be added as layers. You can specify an opacity.
|
||||
|
||||
There are four basemap layer types to choose from in a geomap.
|
||||
|
||||
- [Open Street Map](#open-street-map-layer) adds a map from a collaborative free geographic world database.
|
||||
- [CARTO](#carto-layer) adds a layer from CARTO Raster basemaps.
|
||||
- [ArcGIS](#arcgis-layer) adds a layer from an ESRI ArcGIS MapServer.
|
||||
- [XYZ](#xyz-tile-layer) adds a map from a generic tile layer.
|
||||
- [CARTO basemap](#carto-basemap-layer) adds a layer from CARTO Raster basemaps.
|
||||
- [ArcGIS MapServer](#arcgis-mapserver-layer) adds a layer from an ESRI ArcGIS MapServer.
|
||||
- [XYZ Tile layer](#xyz-tile-layer) adds a map from a generic tile layer.
|
||||
|
||||
### Default
|
||||
|
||||
The default base layer uses the [CARTO](#carto-layer) map. You can define custom default base layers in the `.ini` configuration file.
|
||||
The default basemap layer uses the CARTO map. You can define custom default base layers in the `.ini` configuration file.
|
||||
|
||||

|
||||
|
||||
@ -299,6 +567,9 @@ geomap_default_baselayer = `{
|
||||
|
||||
- **esri-xyz** loads the ESRI tile server. There are already multiple server instances implemented to show the various map styles: `world-imagery`, `world-physical`, `topo`, `usa-topo`, and `ocean`. The `custom` server option allows you to configure your own ArcGIS map server. Here are some examples:
|
||||
|
||||
{{< tabs >}}
|
||||
{{< tab-content name="World imagery" >}}
|
||||
|
||||
```ini
|
||||
geomap_default_baselayer = `{
|
||||
"type": "esri-xyz",
|
||||
@ -308,6 +579,9 @@ geomap_default_baselayer = `{
|
||||
}`
|
||||
```
|
||||
|
||||
{{< /tab-content >}}
|
||||
{{< tab-content name="Custom" >}}
|
||||
|
||||
```ini
|
||||
geomap_default_baselayer = `{
|
||||
"type": "esri-xyz",
|
||||
@ -319,6 +593,9 @@ geomap_default_baselayer = `{
|
||||
}`
|
||||
```
|
||||
|
||||
{{< /tab-content >}}
|
||||
{{< /tabs >}}
|
||||
|
||||
- **osm-standard** loads the OpenStreetMap tile server. There are no additional configurations needed and the `config` fields can be left blank. Here is an example:
|
||||
|
||||
```ini
|
||||
@ -342,343 +619,57 @@ default_baselayer_config = `{
|
||||
|
||||
`enable_custom_baselayers` allows you to enable or disable custom open source base maps that are already implemented. The default is `true`.
|
||||
|
||||
## Markers layer
|
||||
|
||||
The markers layer allows you to display data points as different marker shapes such as circles, squares, triangles, stars, and more.
|
||||
|
||||

|
||||
|
||||
{{< figure src="/media/docs/grafana/panels-visualizations/geomap-markers-options-11-1-0.png" max-width="350px" alt="Markers layer options" >}}
|
||||
|
||||
- **Data** and **Location mode** configure the data settings for the layer. For more information, refer to [Data](#data) and [Location mode](#location-mode).
|
||||
- **Size** configures the size of the markers. The default is `Fixed size`, which makes all marker sizes the same regardless of the data; however, there is also an option to size the markers based on data corresponding to a selected field. `Min` and `Max` marker sizes have to be set such that the markers can scale within this range.
|
||||
- **Symbol** allows you to choose the symbol, icon, or graphic to aid in providing additional visual context to your data. Choose from assets that are included with Grafana such as simple symbols or the Unicon library. You can also specify a URL containing an image asset. The image must be a scalable vector graphic (SVG).
|
||||
- **Symbol Vertical Align** configures the vertical alignment of the symbol relative to the data point. Note that the symbol's rotation angle is applied first around the data point, then the vertical alignment is applied relative to the rotation of the symbol.
|
||||
- **Symbol Horizontal Align** configures the horizontal alignment of the symbol relative to the data point. Note that the symbol's rotation angle is applied first around the data point, then the horizontal alignment is applied relative to the rotation of the symbol.
|
||||
- **Color** configures the color of the markers. The default `Fixed color` sets all markers to a specific color. There is also an option to have conditional colors depending on the selected field data point values and the color scheme set in the `Standard options` section.
|
||||
- **Fill opacity** configures the transparency of each marker.
|
||||
- **Rotation angle** configures the rotation angle of each marker. The default is `Fixed value`, which makes all markers rotate to the same angle regardless of the data; however, there is also an option to set the rotation of the markers based on data corresponding to a selected field.
|
||||
- **Text label** configures a text label for each marker.
|
||||
- **Show legend** allows you to toggle the legend for the layer.
|
||||
- **Display tooltip** allows you to toggle tooltips for the layer.
|
||||
|
||||
## Heatmap layer
|
||||
|
||||
The heatmap layer clusters various data points to visualize locations with different densities.
|
||||
To add a heatmap layer:
|
||||
|
||||
Click on the drop-down menu under Data Layer and choose `Heatmap`.
|
||||
|
||||
Similar to `Markers`, you are prompted with various options to determine which data points to visualize and how you want to visualize them.
|
||||
|
||||

|
||||
|
||||
{{< figure src="/media/docs/grafana/panels-visualizations/geomap-heatmap-options-11-1-0.png" max-width="350px" alt="Heatmap layer options" >}}
|
||||
|
||||
- **Data** and **Location mode** configure the data settings for the layer. For more information, refer to [Data](#data) and [Location mode](#location-mode).
|
||||
- **Weight values** configure the intensity of the heatmap clusters. `Fixed value` keeps a constant weight value throughout all data points. This value should be in the range of 0~1. Similar to Markers, there is an alternate option in the drop-down to automatically scale the weight values depending on data values.
|
||||
- **Radius** configures the size of the heatmap clusters.
|
||||
- **Blur** configures the amount of blur on each cluster.
|
||||
- **Opacity** configures the opacity of each cluster.
|
||||
- **Display tooltip** allows you to toggle tooltips for the layer.
|
||||
|
||||
## GeoJSON layer
|
||||
|
||||
The GeoJSON layer allows you to select and load a static GeoJSON file from the filesystem.
|
||||
|
||||
- **GeoJSON URL** provides a choice of GeoJSON files that ship with Grafana.
|
||||
- **Default Style** controls which styles to apply when no rules above match.
|
||||
- **Color** configures the color of the default style
|
||||
- **Opacity** configures the default opacity
|
||||
- **Style Rules** apply styles based on feature properties
|
||||
- **Rule** allows you to select a _feature_, _condition_, and _value_ from the GeoJSON file in order to define a rule. The trash bin icon can be used to delete the current rule.
|
||||
- **Color** configures the color of the style for the current rule
|
||||
- **Opacity** configures the transparency level for the current rule
|
||||
- **Add style rule** creates additional style rules.
|
||||
- **Display tooltip** allows you to toggle tooltips for the layer.
|
||||
|
||||
{{% admonition type="note" %}}
|
||||
Styles can be set within the "properties" object of the GeoJSON with support for the following geometries:
|
||||
|
||||
- Polygon, MultiPolygon
|
||||
|
||||
- **"fill"** - The color of the interior of the polygon(s)
|
||||
- **"fill-opacity"** - The opacity of the interior of the polygon(s)
|
||||
- **"stroke-width"** - The width of the line component of the polygon(s)
|
||||
|
||||
- Point, MultiPoint
|
||||
|
||||
- **"marker-color"** - The color of the point(s)
|
||||
- **"marker-size"** - The size of the point(s)
|
||||
|
||||
- LineString, MultiLineString
|
||||
- **"stroke"** - The color of the line(s)
|
||||
- **"stroke-width"** - The width of the line(s)
|
||||
|
||||
{{% /admonition %}}
|
||||
|
||||
## Night / Day layer
|
||||
|
||||
The Night / Day layer displays night and day regions based on the current time range.
|
||||
|
||||
{{< figure src="/static/img/docs/geomap-panel/geomap-day-night-9-1-0.png" max-width="1200px" caption="Geomap panel Night / Day" >}}
|
||||
|
||||
### Options
|
||||
|
||||
- **Data** configures the data set for the layer. For more information, refer to [Data](#data).
|
||||
- **Show** toggles the time source from panel time range.
|
||||
- **Night region color** picks the color for the night region.
|
||||
- **Display sun** toggles the sun icon.
|
||||
- **Opacity** set the opacity from `0` (transparent) to `1` (opaque).
|
||||
- **Display tooltip** allows you to toggle tooltips for the layer.
|
||||
|
||||
{{< figure src="/static/img/docs/geomap-panel/geomap-day-night-options-9-1-0.png" max-width="1200px" caption="Geomap panel Night / Day options" >}}
|
||||
|
||||
### More information
|
||||
|
||||
- [**Extensions for OpenLayers - DayNight**](https://viglino.github.io/ol-ext/examples/layer/map.daynight.html)
|
||||
|
||||
## Route layer (Beta)
|
||||
|
||||
{{% admonition type="caution" %}}
|
||||
The Route layer is currently in [public preview](/docs/release-life-cycle/). Grafana Labs offers limited support, and breaking changes might occur prior to the feature being made generally available.
|
||||
{{% /admonition %}}
|
||||
|
||||
The Route layer renders data points as a route.
|
||||
|
||||
{{< figure src="/media/docs/grafana/geomap-route-layer-basic-9-4-0.png" max-width="1200px" caption="Geomap panel Route" >}}
|
||||
|
||||
### Options
|
||||
|
||||
- **Data** and **Location mode** configure the data settings for the layer. For more information, refer to [Data](#data) and [Location mode](#location-mode).
|
||||
- **Size** sets the route thickness. Fixed value by default. When field data is selected you can set the Min and Max range in which field data can scale.
|
||||
- **Color** sets the route color. Set to `Fixed color` by default. You can also tie the color to field data.
|
||||
- **Fill opacity** configures the opacity of the route.
|
||||
- **Text label** configures a text label for each route.
|
||||
- **Arrow** sets the arrow styling to display along route, in order of data.
|
||||
- **None**
|
||||
- **Forward**
|
||||
- **Reverse**
|
||||
- **Display tooltip** allows you to toggle tooltips for the layer.
|
||||
|
||||
{{< figure src="/media/docs/grafana/geomap-route-layer-arrow-size-9-4-0.png" max-width="1200px" caption="Geomap panel Route arrows with size" >}}
|
||||
|
||||
### More information
|
||||
|
||||
- [**Extensions for OpenLayers - Flow Line Style**](http://viglino.github.io/ol-ext/examples/style/map.style.gpxline.html)
|
||||
|
||||
## Photos layer (Beta)
|
||||
|
||||
{{% admonition type="caution" %}}
|
||||
The Photos layer is currently in [public preview](/docs/release-life-cycle/). Grafana Labs offers limited support, and breaking changes might occur prior to the feature being made generally available.
|
||||
{{% /admonition %}}
|
||||
|
||||
The Photos layer renders a photo at each data point.
|
||||
|
||||
{{< figure src="/static/img/docs/geomap-panel/geomap-photos-9-3-0.png" max-width="1200px" caption="Geomap panel Photos" >}}
|
||||
|
||||
### Options
|
||||
|
||||
- **Data** and **Location mode** configure the data settings for the layer. For more information, refer to [Data](#data) and [Location mode](#location-mode).
|
||||
- **Image Source field** allows you to select a string field containing image data in either of the following formats:
|
||||
- **Image URLs**
|
||||
- **Base64 encoded** - Image binary ("data:image/png;base64,...")
|
||||
- **Kind** sets the frame style around the images. Choose from:
|
||||
- **Square**
|
||||
- **Circle**
|
||||
- **Anchored**
|
||||
- **Folio**
|
||||
- **Crop** toggles whether the images are cropped to fit.
|
||||
- **Shadow** toggles a box shadow behind the images.
|
||||
- **Border** sets the border size around images.
|
||||
- **Border color** sets the border color around images.
|
||||
- **Radius** sets the overall size of images in pixels.
|
||||
- **Display tooltip** allows you to toggle tooltips for the layer.
|
||||
|
||||
{{< figure src="/static/img/docs/geomap-panel/geomap-photos-options-9-3-0.png" max-width="1200px" caption="Geomap panel Photos options" >}}
|
||||
|
||||
### More information
|
||||
|
||||
- [**Extensions for OpenLayers - Image Photo Style**](http://viglino.github.io/ol-ext/examples/style/map.style.photo.html)
|
||||
|
||||
## Network layer (Beta)
|
||||
|
||||
{{% admonition type="caution" %}}
|
||||
The Network layer is currently in [public preview](/docs/release-life-cycle/). Grafana Labs offers limited support, and breaking changes might occur prior to the feature being made generally available.
|
||||
{{% /admonition %}}
|
||||
|
||||
The Network layer renders a network graph. This layer supports the same [data format supported by the node graph visualization](ref:data-format) with the addition of [geospatial data](#location-mode) included in the nodes data. The geospatial data is used to locate and render the nodes on the map.
|
||||
|
||||
{{< figure src="/media/docs/grafana/screenshot-grafana-10-1-geomap-network-layer-v2.png" max-width="750px" caption="Geomap network layer" >}}
|
||||
{{< video-embed src="/media/docs/grafana/screen-recording-10-1-geomap-network-layer-from-node-graph.mp4" max-width="750px" caption="Node graph to Geomap network layer" >}}
|
||||
|
||||
### Options
|
||||
|
||||
- **Data** and **Location mode** configure the data settings for the layer. For more information, refer to [Data](#data) and [Location mode](#location-mode).
|
||||
- **Arrow** sets the arrow direction to display for each edge, with forward meaning source to target. Choose from:
|
||||
- **None**
|
||||
- **Forward**
|
||||
- **Reverse**
|
||||
- **Both**
|
||||
- **Show legend** allows you to toggle the legend for the layer. **Note:** The legend currently only supports node data.
|
||||
- **Display tooltip** allows you to toggle tooltips for the layer.
|
||||
|
||||
#### Node styles
|
||||
|
||||
- **Size** configures the size of the nodes. The default is `Fixed size`, which makes all node sizes the same regardless of the data; however, there is also an option to size the nodes based on data corresponding to a selected field. `Min` and `Max` node sizes have to be set such that the nodes can scale within this range.
|
||||
- **Symbol** allows you to choose the symbol, icon, or graphic to aid in providing additional visual context to your data. Choose from assets that are included with Grafana such as simple symbols or the Unicon library. You can also specify a URL containing an image asset. The image must be a scalable vector graphic (SVG).
|
||||
- **Color** configures the color of the nodes. The default `Fixed color` sets all nodes to a specific color. There is also an option to have conditional colors depending on the selected field data point values and the color scheme set in the `Standard options` section.
|
||||
- **Fill opacity** configures the transparency of each node.
|
||||
- **Rotation angle** configures the rotation angle of each node. The default is `Fixed value`, which makes all nodes rotate to the same angle regardless of the data; however, there is also an option to set the rotation of the nodes based on data corresponding to a selected field.
|
||||
- **Text label** configures a text label for each node.
|
||||
|
||||
#### Edge styles
|
||||
|
||||
- **Size** configures the line width of the edges. The default is `Fixed size`, which makes all edge line widths the same regardless of the data; however, there is also an option to size the edges based on data corresponding to a selected field. `Min` and `Max` eges sizes have to be set such that the edges can scale within this range.
|
||||
- **Color** configures the color of the edges. The default `Fixed color` sets all edges to a specific color. There is also an option to have conditional colors depending on the selected field data point values and the color scheme set in the `Standard options` section.
|
||||
- **Fill opacity** configures the transparency of each edge.
|
||||
- **Text label** configures a text label for each edge.
|
||||
|
||||
## CARTO layer
|
||||
|
||||
A CARTO layer is from CARTO Raster basemaps.
|
||||
|
||||
### Options
|
||||
|
||||
- **Theme**
|
||||
- Auto
|
||||
- Light
|
||||
{{< figure src="/static/img/docs/geomap-panel/geomap-carto-light-9-1-0.png" max-width="1200px" caption="Geomap panel CARTO light example" >}}
|
||||
- Dark
|
||||
{{< figure src="/static/img/docs/geomap-panel/geomap-carto-dark-9-1-0.png" max-width="1200px" caption="Geomap panel CARTO dark example" >}}
|
||||
- **Show labels** shows the Country details on top of the map.
|
||||
- **Opacity** from 0 (transparent) to 1 (opaque)
|
||||
|
||||
{{< figure src="/static/img/docs/geomap-panel/geomap-carto-options-9-1-0.png" max-width="1200px" caption="Geomap panel CARTO options" >}}
|
||||
|
||||
### More Information
|
||||
|
||||
- [**About CARTO**](https://carto.com/about-us/)
|
||||
|
||||
## XYZ tile layer
|
||||
|
||||
The XYZ tile layer is a map from a generic tile layer.
|
||||
|
||||
{{< figure src="/static/img/docs/geomap-panel/geomap-xyz-9-1-0.png" max-width="1200px" caption="Geomap panel xyz example" >}}
|
||||
|
||||
### Options
|
||||
|
||||
- **URL template**
|
||||
|
||||
> **Note:** Set a valid tile server url, with {z}/{x}/{y} for example: https://tile.openstreetmap.org/{z}/{x}/{y}.png
|
||||
|
||||
- **Attribution** sets the reference string for the layer if displayed in [map controls](#show-attribution)
|
||||
- **Opacity** from 0 (transparent) to 1 (opaque)
|
||||
|
||||
{{< figure src="/static/img/docs/geomap-panel/geomap-xyz-options-9-1-0.png" max-width="1200px" caption="Geomap panel xyz options" >}}
|
||||
|
||||
### More information
|
||||
|
||||
- [**Tiled Web Map Wikipedia**](https://en.wikipedia.org/wiki/Tiled_web_map)
|
||||
- [**List of Open Street Map Tile Servers**](https://wiki.openstreetmap.org/wiki/Tile_servers)
|
||||
|
||||
## Open Street Map layer
|
||||
|
||||
A map from a collaborative free geographic world database.
|
||||
|
||||
{{< figure src="/static/img/docs/geomap-panel/geomap-osm-9-1-0.png" max-width="1200px" caption="Geomap panel Open Street Map" >}}
|
||||
|
||||
### Options
|
||||
|
||||
- **Opacity** from 0 (transparent) to 1 (opaque)
|
||||
|
||||
{{< figure src="/static/img/docs/geomap-panel/geomap-osm-options-9-1-0.png" max-width="1200px" caption="Geomap panel Open Street Map options" >}}
|
||||
|
||||
### More Information
|
||||
|
||||
- [**About Open Street Map**](https://www.openstreetmap.org/about)
|
||||
|
||||
## ArcGIS layer
|
||||
|
||||
An ArcGIS layer is a layer from an ESRI ArcGIS MapServer.
|
||||
|
||||
### Options
|
||||
|
||||
- **Server Instance** to select the map type.
|
||||
- World Street Map
|
||||
{{< figure src="/static/img/docs/geomap-panel/geomap-arcgis-wsm-9-1-0.png" max-width="1200px" caption="Geomap panel ArcGIS World Street Map" >}}
|
||||
- World Imagery
|
||||
{{< figure src="/static/img/docs/geomap-panel/geomap-arcgis-wi-9-1-0.png" max-width="1200px" caption="Geomap panel ArcGIS World Imagery" >}}
|
||||
- World Physical
|
||||
{{< figure src="/static/img/docs/geomap-panel/geomap-arcgis-wp-9-1-0.png" max-width="1200px" caption="Geomap panel ArcGIS World Physical" >}}
|
||||
- Topographic
|
||||
{{< figure src="/static/img/docs/geomap-panel/geomap-arcgis-topographic-9-1-0.png" max-width="1200px" caption="Geomap panel ArcGIS Topographic" >}}
|
||||
- USA Topographic
|
||||
{{< figure src="/static/img/docs/geomap-panel/geomap-arcgis-usa-topographic-9-1-0.png" max-width="1200px" caption="Geomap panel ArcGIS USA Topographic" >}}
|
||||
- World Ocean
|
||||
{{< figure src="/static/img/docs/geomap-panel/geomap-arcgis-ocean-9-1-0.png" max-width="1200px" caption="Geomap panel ArcGIS World Ocean" >}}
|
||||
- Custom MapServer (see [XYZ](#xyz-tile-layer) for formatting)
|
||||
- URL template
|
||||
- Attribution
|
||||
- **Opacity** from 0 (transparent) to 1 (opaque)
|
||||
|
||||
{{< figure src="/static/img/docs/geomap-panel/geomap-arcgis-options-9-1-0.png" max-width="1200px" caption="Geomap panel ArcGIS options" >}}
|
||||
|
||||
### More Information
|
||||
|
||||
- [**ArcGIS Services**](https://services.arcgisonline.com/arcgis/rest/services)
|
||||
- [**About ESRI**](https://www.esri.com/en-us/about/about-esri/overview)
|
||||
|
||||
## Map Controls
|
||||
### Map controls options
|
||||
|
||||
The map controls section contains various options for map information and tool overlays.
|
||||
{{< figure src="/static/img/docs/geomap-panel/geomap-map-controls-9-1-0.png" max-width="1200px" caption="Geomap panel map controls" >}}
|
||||
|
||||
### Zoom
|
||||
|
||||
This section describes each of the zoom controls.
|
||||
<!-- prettier-ignore-start -->
|
||||
| Option | Description |
|
||||
| ------ | ----------- |
|
||||
| [Show zoom control](#show-zoom-control) | Displays zoom controls in the upper left corner. |
|
||||
| [Mouse wheel zoom](#mouse-wheel-zoom) | Enables the mouse wheel to be used for zooming in or out. |
|
||||
| [Show attribution](#show-attribution) | Displays attribution for basemap layers. |
|
||||
| [Show scale](#show-scale) | Displays scale information in the bottom left corner in meters (m) or kilometers (km). |
|
||||
| [Show measure tools](#show-measure-tools) | Displays measure tools in the upper right corner. This includes the [Length](#length) and [Area](#area) options. |
|
||||
| [Show debug](#show-debug) | Displays debug information in the upper right corner. |
|
||||
| [Tooltip](#tooltip) | Controls display of tooltips. |
|
||||
<!-- prettier-ignore-end -->
|
||||
|
||||
#### Show zoom control
|
||||
|
||||
Displays zoom controls in the upper left corner. This control can be useful when using systems that don't have a mouse.
|
||||
|
||||
{{< figure src="/static/img/docs/geomap-panel/geomap-map-controls-zoom-9-1-0.png" max-width="1200px" caption="Geomap panel zoom" >}}
|
||||
{{< figure src="/static/img/docs/geomap-panel/geomap-map-controls-zoom-9-1-0.png" max-width="1200px" alt="Geomap panel zoom" >}}
|
||||
|
||||
#### Mouse wheel zoom
|
||||
|
||||
Enables the mouse wheel to be used for zooming in or out.
|
||||
|
||||
### Show attribution
|
||||
#### Show attribution
|
||||
|
||||
Displays attribution for basemap layers.
|
||||
|
||||
{{< figure src="/static/img/docs/geomap-panel/geomap-map-controls-attribution-9-1-0.png" max-width="1200px" caption="Geomap panel attribution" >}}
|
||||
{{< figure src="/static/img/docs/geomap-panel/geomap-map-controls-attribution-9-1-0.png" max-width="1200px" alt="Geomap panel attribution" >}}
|
||||
|
||||
### Show scale
|
||||
#### Show scale
|
||||
|
||||
Displays scale information in the bottom left corner.
|
||||
Displays scale information in the bottom left corner in meters (m) or kilometers (km).
|
||||
|
||||
{{< figure src="/static/img/docs/geomap-panel/geomap-map-controls-scale-9-1-0.png" max-width="1200px" caption="Geomap panel scale" >}}
|
||||
{{< figure src="/static/img/docs/geomap-panel/geomap-map-controls-scale-9-1-0.png" max-width="1200px" alt="Geomap panel scale" >}}
|
||||
|
||||
{{% admonition type="note" %}}
|
||||
Currently only displays units in [m]/[km].
|
||||
{{% /admonition %}}
|
||||
|
||||
### Show measure tools
|
||||
#### Show measure tools
|
||||
|
||||
Displays measure tools in the upper right corner. Measurements appear only when this control is open.
|
||||
|
||||
{{< figure src="/static/img/docs/geomap-panel/geomap-map-controls-measure-9-1-0.png" max-width="1200px" caption="Geomap panel measure" >}}
|
||||
{{< figure src="/static/img/docs/geomap-panel/geomap-map-controls-measure-9-1-0.png" max-width="1200px" alt="Geomap panel measure" >}}
|
||||
|
||||
- **Click** to start measuring
|
||||
- **Continue clicking** to continue measurement
|
||||
- **Double-click** to end measurement
|
||||
|
||||
{{% admonition type="note" %}}
|
||||
When you change measurement type or units, the previous measurement is removed from the map. If the control is closed and then re-opened, the most recent measurement is displayed. A measurement can be modified by clicking and dragging on it.
|
||||
{{% /admonition %}}
|
||||
|
||||
#### Length
|
||||
##### Length
|
||||
|
||||
Get the spherical length of a geometry. This length is the sum of the great circle distances between coordinates. For multi-part geometries, the length is the sum of the length of each part. Geometries are assumed to be in 'EPSG:3857'.
|
||||
|
||||
@ -687,9 +678,9 @@ Get the spherical length of a geometry. This length is the sum of the great circ
|
||||
- **Miles (mi)**
|
||||
- **Nautical miles (nmi)**
|
||||
|
||||
{{< figure src="/static/img/docs/geomap-panel/geomap-map-controls-measure-length-9-1-0.png" max-width="1200px" caption="Geomap panel measure length" >}}
|
||||
{{< figure src="/static/img/docs/geomap-panel/geomap-map-controls-measure-length-9-1-0.png" max-width="1200px" alt="Geomap panel measure length" >}}
|
||||
|
||||
#### Area
|
||||
##### Area
|
||||
|
||||
Get the spherical area of a geometry. This area is calculated assuming that polygon edges are segments of great circles on a sphere. Geometries are assumed to be in 'EPSG:3857'.
|
||||
|
||||
@ -700,38 +691,38 @@ Get the spherical area of a geometry. This area is calculated assuming that poly
|
||||
- **Acres (acre)**
|
||||
- **Hectare (ha)**
|
||||
|
||||
{{< figure src="/static/img/docs/geomap-panel/geomap-map-controls-measure-area-9-1-0.png" max-width="1200px" caption="Geomap panel measure area" >}}
|
||||
{{< figure src="/static/img/docs/geomap-panel/geomap-map-controls-measure-area-9-1-0.png" max-width="1200px" alt="Geomap panel measure area" >}}
|
||||
|
||||
### Show debug
|
||||
#### Show debug
|
||||
|
||||
Displays debug information in the upper right corner. This can be useful for debugging or validating a data source.
|
||||
|
||||
- **Zoom** displays current zoom level of the map.
|
||||
- **Center** displays the current **longitude**, **latitude** of the map center.
|
||||
|
||||
{{< figure src="/static/img/docs/geomap-panel/geomap-map-controls-debug-9-1-0.png" max-width="1200px" caption="Geomap panel debug" >}}
|
||||
{{< figure src="/static/img/docs/geomap-panel/geomap-map-controls-debug-9-1-0.png" max-width="1200px" alt="Geomap panel debug" >}}
|
||||
|
||||
### Tooltip
|
||||
#### Tooltip
|
||||
|
||||
- **None** displays tooltips only when a data point is clicked.
|
||||
- **Details** displays tooltips when a mouse pointer hovers over a data point.
|
||||
|
||||
## Standard options
|
||||
### Standard options
|
||||
|
||||
{{< docs/shared lookup="visualizations/standard-options.md" source="grafana" version="<GRAFANA_VERSION>" >}}
|
||||
|
||||
## Data links
|
||||
### Data links
|
||||
|
||||
{{< docs/shared lookup="visualizations/datalink-options.md" source="grafana" version="<GRAFANA_VERSION>" >}}
|
||||
|
||||
## Value mappings
|
||||
### Value mappings
|
||||
|
||||
{{< docs/shared lookup="visualizations/value-mappings-options.md" source="grafana" version="<GRAFANA_VERSION>" >}}
|
||||
|
||||
## Thresholds
|
||||
### Thresholds
|
||||
|
||||
{{< docs/shared lookup="visualizations/thresholds-options-2.md" source="grafana" version="<GRAFANA_VERSION>" >}}
|
||||
|
||||
## Field overrides
|
||||
### Field overrides
|
||||
|
||||
{{< docs/shared lookup="visualizations/overrides-options.md" source="grafana" version="<GRAFANA_VERSION>" >}}
|
||||
|
@ -964,6 +964,10 @@ This setting is ignored if multiple OAuth providers are configured. Default is `
|
||||
How many seconds the OAuth state cookie lives before being deleted. Default is `600` (seconds)
|
||||
Administrators can increase this if they experience OAuth login state mismatch errors.
|
||||
|
||||
### oauth_login_error_message
|
||||
|
||||
A custom error message for when users are unauthorized. Default is a key for an internationalized phrase in the frontend, `Login provider denied login request`.
|
||||
|
||||
### oauth_refresh_token_server_lock_min_wait_ms
|
||||
|
||||
Minimum wait time in milliseconds for the server lock retry mechanism. Default is `1000` (milliseconds). The server lock retry mechanism is used to prevent multiple Grafana instances from simultaneously refreshing OAuth tokens. This mechanism waits at least this amount of time before retrying to acquire the server lock.
|
||||
@ -1090,6 +1094,16 @@ Set to `true` to enable verbose request signature logging when AWS Signature Ver
|
||||
|
||||
<hr />
|
||||
|
||||
### managed_service_accounts_enabled
|
||||
|
||||
> Only available in Grafana 11.3+.
|
||||
|
||||
Set to `true` to enable the use of managed service accounts for plugin authentication. Default is `false`.
|
||||
|
||||
> **Limitations:**
|
||||
> This feature currently **only supports single-organization deployments**.
|
||||
> The plugin's service account is automatically created in the default organization. This means the plugin can only access data and resources within that specific organization.
|
||||
|
||||
## [auth.anonymous]
|
||||
|
||||
Refer to [Anonymous authentication]({{< relref "../configure-security/configure-authentication/grafana#anonymous-authentication" >}}) for detailed instructions.
|
||||
|
@ -25,6 +25,7 @@ Most [generally available](https://grafana.com/docs/release-life-cycle/#general-
|
||||
| -------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------ |
|
||||
| `disableEnvelopeEncryption` | Disable envelope encryption (emergency only) | |
|
||||
| `publicDashboards` | [Deprecated] Public dashboards are now enabled by default; to disable them, use the configuration setting. This feature toggle will be removed in the next major version. | Yes |
|
||||
| `publicDashboardsScene` | Enables public dashboard rendering using scenes | Yes |
|
||||
| `featureHighlights` | Highlight Grafana Enterprise features | |
|
||||
| `correlations` | Correlations page | Yes |
|
||||
| `autoMigrateXYChartPanel` | Migrate old XYChart panel to new XYChart2 model | Yes |
|
||||
@ -56,6 +57,9 @@ Most [generally available](https://grafana.com/docs/release-life-cycle/#general-
|
||||
| `managedPluginsInstall` | Install managed plugins directly from plugins catalog | Yes |
|
||||
| `addFieldFromCalculationStatFunctions` | Add cumulative and window functions to the add field from calculation transformation | Yes |
|
||||
| `annotationPermissionUpdate` | Change the way annotation permissions work by scoping them to folders and dashboards. | Yes |
|
||||
| `dashboardSceneForViewers` | Enables dashboard rendering using Scenes for viewer roles | Yes |
|
||||
| `dashboardSceneSolo` | Enables rendering dashboards using scenes for solo panels | Yes |
|
||||
| `dashboardScene` | Enables dashboard rendering using scenes for all roles | Yes |
|
||||
| `ssoSettingsApi` | Enables the SSO settings API and the OAuth configuration UIs in Grafana | Yes |
|
||||
| `logsInfiniteScrolling` | Enables infinite scrolling for the Logs panel in Explore and Dashboards | Yes |
|
||||
| `exploreMetrics` | Enables the new Explore Metrics core app | Yes |
|
||||
@ -68,7 +72,9 @@ Most [generally available](https://grafana.com/docs/release-life-cycle/#general-
|
||||
| `tlsMemcached` | Use TLS-enabled memcached in the enterprise caching feature | Yes |
|
||||
| `cloudWatchNewLabelParsing` | Updates CloudWatch label parsing to be more accurate | Yes |
|
||||
| `newDashboardSharingComponent` | Enables the new sharing drawer design | |
|
||||
| `notificationBanner` | Enables the notification banner UI and API | Yes |
|
||||
| `pluginProxyPreserveTrailingSlash` | Preserve plugin proxy trailing slash. | |
|
||||
| `pinNavItems` | Enables pinning of nav items | Yes |
|
||||
| `openSearchBackendFlowEnabled` | Enables the backend query flow for Open Search datasource plugin | Yes |
|
||||
| `cloudWatchRoundUpEndTime` | Round up end time for metric queries to the next minute to avoid missing data | Yes |
|
||||
|
||||
@ -114,10 +120,9 @@ Most [generally available](https://grafana.com/docs/release-life-cycle/#general-
|
||||
Experimental features might be changed or removed without prior notice.
|
||||
|
||||
| Feature toggle name | Description |
|
||||
| ------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| --------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `live-service-web-worker` | This will use a webworker thread to processes events rather than the main thread |
|
||||
| `queryOverLive` | Use Grafana Live WebSocket to execute backend queries |
|
||||
| `publicDashboardsScene` | Enables public dashboard rendering using scenes |
|
||||
| `lokiExperimentalStreaming` | Support new streaming approach for loki (prototype, needs special loki build) |
|
||||
| `storage` | Configurable storage for dashboards, datasources, and resources |
|
||||
| `canvasPanelNesting` | Allow elements nesting |
|
||||
@ -160,6 +165,7 @@ Experimental features might be changed or removed without prior notice.
|
||||
| `kubernetesSnapshots` | Routes snapshot requests from /api to the /apis endpoint |
|
||||
| `kubernetesDashboards` | Use the kubernetes API in the frontend for dashboards |
|
||||
| `kubernetesFolders` | Use the kubernetes API in the frontend for folders, and route /api/folders requests to k8s |
|
||||
| `grafanaAPIServerTestingWithExperimentalAPIs` | Facilitate integration testing of experimental APIs |
|
||||
| `datasourceQueryTypes` | Show query type endpoints in datasource API servers (currently hardcoded for testdata, expressions, and prometheus) |
|
||||
| `queryService` | Register /apis/query.grafana.app/ -- will eventually replace /api/ds/query |
|
||||
| `queryServiceRewrite` | Rewrite requests targeting /ds/query to the query service |
|
||||
@ -171,9 +177,6 @@ Experimental features might be changed or removed without prior notice.
|
||||
| `alertmanagerRemotePrimary` | Enable Grafana to have a remote Alertmanager instance as the primary Alertmanager. |
|
||||
| `alertmanagerRemoteOnly` | Disable the internal Alertmanager and only use the external one defined. |
|
||||
| `extractFieldsNameDeduplication` | Make sure extracted field names are unique in the dataframe |
|
||||
| `dashboardSceneForViewers` | Enables dashboard rendering using Scenes for viewer roles |
|
||||
| `dashboardSceneSolo` | Enables rendering dashboards using scenes for solo panels |
|
||||
| `dashboardScene` | Enables dashboard rendering using scenes for all roles |
|
||||
| `pluginsSkipHostEnvVars` | Disables passing host environment variable to plugin processes |
|
||||
| `tableSharedCrosshair` | Enables shared crosshair in table panel |
|
||||
| `kubernetesFeatureToggles` | Use the kubernetes API for feature toggle management in the frontend |
|
||||
@ -186,16 +189,15 @@ Experimental features might be changed or removed without prior notice.
|
||||
| `queryLibrary` | Enables Query Library feature in Explore |
|
||||
| `logsExploreTableDefaultVisualization` | Sets the logs table as default visualisation in logs explore |
|
||||
| `alertingListViewV2` | Enables the new alert list view design |
|
||||
| `notificationBanner` | Enables the notification banner UI and API |
|
||||
| `dashboardRestore` | Enables deleted dashboard restore feature (backend only) |
|
||||
| `alertingCentralAlertHistory` | Enables the new central alert history. |
|
||||
| `pinNavItems` | Enables pinning of nav items |
|
||||
| `failWrongDSUID` | Throws an error if a datasource has an invalid UIDs |
|
||||
| `alertingApiServer` | Register Alerting APIs with the K8s API server |
|
||||
| `dashboardRestoreUI` | Enables the frontend to be able to restore a recently deleted dashboard |
|
||||
| `dataplaneAggregator` | Enable grafana dataplane aggregator |
|
||||
| `newFiltersUI` | Enables new combobox style UI for the Ad hoc filters variable in scenes architecture |
|
||||
| `lokiSendDashboardPanelNames` | Send dashboard and panel names to Loki when querying |
|
||||
| `alertingPrometheusRulesPrimary` | Uses Prometheus rules as the primary source of truth for ruler-enabled data sources |
|
||||
| `singleTopNav` | Unifies the top search bar and breadcrumb bar into one |
|
||||
| `exploreLogsShardSplitting` | Used in Explore Logs to split queries into multiple queries based on the number of shards |
|
||||
| `exploreLogsAggregatedMetrics` | Used in Explore Logs to query by aggregated metrics |
|
||||
|
@ -22,13 +22,13 @@ The following table shows all supported authentication providers and the feature
|
||||
| Provider | Multi Org Mapping | Enforce Sync | Role Mapping | Grafana Admin Mapping | Team Sync | Allowed groups | Active Sync | Skip OrgRole mapping | Auto Login | Single Logout |
|
||||
| :---------------------------------------------------- | :---------------- | :----------- | :----------- | :-------------------- | :-------- | :------------- | :---------- | :------------------- | :--------- | :------------ |
|
||||
| [Auth Proxy]({{< relref "./auth-proxy" >}}) | no | yes | yes | no | yes | no | N/A | no | N/A | N/A |
|
||||
| [Azure AD OAuth]({{< relref "./azuread" >}}) | no | yes | yes | yes | yes | yes | N/A | yes | yes | yes |
|
||||
| [Generic OAuth]({{< relref "./generic-oauth" >}}) | no | yes | yes | yes | yes | no | N/A | yes | yes | yes |
|
||||
| [GitHub OAuth]({{< relref "./github" >}}) | no | yes | yes | yes | yes | yes | N/A | yes | yes | yes |
|
||||
| [GitLab OAuth]({{< relref "./gitlab" >}}) | no | yes | yes | yes | yes | yes | N/A | yes | yes | yes |
|
||||
| [Google OAuth]({{< relref "./google" >}}) | no | no | no | no | yes | no | N/A | no | yes | yes |
|
||||
| [Azure AD OAuth]({{< relref "./azuread" >}}) | yes | yes | yes | yes | yes | yes | N/A | yes | yes | yes |
|
||||
| [Generic OAuth]({{< relref "./generic-oauth" >}}) | yes | yes | yes | yes | yes | no | N/A | yes | yes | yes |
|
||||
| [GitHub OAuth]({{< relref "./github" >}}) | yes | yes | yes | yes | yes | yes | N/A | yes | yes | yes |
|
||||
| [GitLab OAuth]({{< relref "./gitlab" >}}) | yes | yes | yes | yes | yes | yes | N/A | yes | yes | yes |
|
||||
| [Google OAuth]({{< relref "./google" >}}) | yes | no | no | no | yes | no | N/A | no | yes | yes |
|
||||
| [Grafana.com OAuth]({{< relref "./grafana-cloud" >}}) | no | no | yes | no | N/A | N/A | N/A | yes | yes | yes |
|
||||
| [Okta OAuth]({{< relref "./okta" >}}) | no | yes | yes | yes | yes | yes | N/A | yes | yes | yes |
|
||||
| [Okta OAuth]({{< relref "./okta" >}}) | yes | yes | yes | yes | yes | yes | N/A | yes | yes | yes |
|
||||
| [SAML]({{< relref "./saml" >}}) (Enterprise only) | yes | yes | yes | yes | yes | yes | N/A | yes | yes | yes |
|
||||
| [LDAP]({{< relref "./ldap" >}}) | yes | yes | yes | yes | yes | yes | yes | no | N/A | N/A |
|
||||
| [JWT Proxy]({{< relref "./jwt" >}}) | no | yes | yes | yes | no | no | N/A | no | N/A | N/A |
|
||||
|
@ -313,7 +313,7 @@ Payload:
|
||||
"roles": [
|
||||
"org_foo",
|
||||
"org_bar",
|
||||
"another_org'
|
||||
"another_org"
|
||||
],
|
||||
...
|
||||
},
|
||||
|
@ -280,13 +280,13 @@ Grafana supports user authentication through Okta, which is useful when you want
|
||||
- In the **Single sign on URL** field, use the `/saml/acs` endpoint URL of your Grafana instance, for example, `https://grafana.example.com/saml/acs`.
|
||||
- In the **Audience URI (SP Entity ID)** field, use the `/saml/metadata` endpoint URL, for example, `https://grafana.example.com/saml/metadata`.
|
||||
- Leave the default values for **Name ID format** and **Application username**.
|
||||
- In the **ATTRIBUTE STATEMENTS (OPTIONAL)** section, enter the SAML attributes to be shared with Grafana, for example:
|
||||
- In the **ATTRIBUTE STATEMENTS (OPTIONAL)** section, enter the SAML attributes to be shared with Grafana. The attribute names in Okta need to match exactly what is defined within Grafana, for example:
|
||||
|
||||
| Attribute name (in Grafana) | Value (in Okta profile) |
|
||||
| --------------------------- | -------------------------------------- |
|
||||
| Login | `user.login` |
|
||||
| Email | `user.email` |
|
||||
| DisplayName | `user.firstName + " " + user.lastName` |
|
||||
| Attribute name (in Grafana) | Name and value (in Okta profile) |
|
||||
| --------------------------- | -------------------------------------------------- |
|
||||
| Login | Login `user.login` |
|
||||
| Email | Email `user.email` |
|
||||
| DisplayName | DisplayName `user.firstName + " " + user.lastName` |
|
||||
|
||||
- In the **GROUP ATTRIBUTE STATEMENTS (OPTIONAL)** section, enter a group attribute name (for example, `Group`) and set filter to `Matches regex .*` to return all user groups.
|
||||
|
||||
|
@ -32,7 +32,11 @@ Usage insights logs are JSON objects that represent certain user activities, suc
|
||||
|
||||
### Scope
|
||||
|
||||
A log is created every time a user opens a dashboard or when a query is sent to a data source in the dashboard view. A query that is performed via Explore does not generate a log.
|
||||
A log is created every time:
|
||||
|
||||
- A user opens a dashboard.
|
||||
- A query is sent to a data source in the dashboard view.
|
||||
- A query is performed via Explore.
|
||||
|
||||
### Format
|
||||
|
||||
|
@ -97,6 +97,14 @@ On a minimal CentOS 8 installation, the following dependencies are required for
|
||||
libXcomposite libXdamage libXtst cups libXScrnSaver pango atk adwaita-cursor-theme adwaita-icon-theme at at-spi2-atk at-spi2-core cairo-gobject colord-libs dconf desktop-file-utils ed emacs-filesystem gdk-pixbuf2 glib-networking gnutls gsettings-desktop-schemas gtk-update-icon-cache gtk3 hicolor-icon-theme jasper-libs json-glib libappindicator-gtk3 libdbusmenu libdbusmenu-gtk3 libepoxy liberation-fonts liberation-narrow-fonts liberation-sans-fonts liberation-serif-fonts libgusb libindicator-gtk3 libmodman libproxy libsoup libwayland-cursor libwayland-egl libxkbcommon m4 mailx nettle patch psmisc redhat-lsb-core redhat-lsb-submod-security rest spax time trousers xdg-utils xkeyboard-config alsa-lib libX11-xcb
|
||||
```
|
||||
|
||||
**RHEL:**
|
||||
|
||||
On a minimal RHEL 8 installation, the following dependencies are required for the image rendering to function:
|
||||
|
||||
```bash
|
||||
linux-vdso.so.1 libdl.so.2 libpthread.so.0 libgobject-2.0.so.0 libglib-2.0.so.0 libnss3.so libnssutil3.so libsmime3.so libnspr4.so libatk-1.0.so.0 libatk-bridge-2.0.so.0 libcups.so.2 libgio-2.0.so.0 libdrm.so.2 libdbus-1.so.3 libexpat.so.1 libxcb.so.1 libxkbcommon.so.0 libm.so.6 libX11.so.6 libXcomposite.so.1 libXdamage.so.1 libXext.so.6 libXfixes.so.3 libXrandr.so.2 libgbm.so.1 libpango-1.0.so.0 libcairo.so.2 libasound.so.2 libatspi.so.0 libgcc_s.so.1 libc.so.6 /lib64/ld-linux-x86-64.so.2 libgnutls.so.30 libpcre.so.1 libffi.so.6 libplc4.so libplds4.so librt.so.1 libgmodule-2.0.so.0 libgssapi_krb5.so.2 libkrb5.so.3 libk5crypto.so.3 libcom_err.so.2 libavahi-common.so.3 libavahi-client.so.3 libcrypt.so.1 libz.so.1 libselinux.so.1 libresolv.so.2 libmount.so.1 libsystemd.so.0 libXau.so.6 libXrender.so.1 libthai.so.0 libfribidi.so.0 libpixman-1.so.0 libfontconfig.so.1 libpng16.so.16 libxcb-render.so.0 libidn2.so.0 libunistring.so.2 libtasn1.so.6 libnettle.so.6 libhogweed.so.4 libgmp.so.10 libkrb5support.so.0 libkeyutils.so.1 libpcre2-8.so.0 libuuid.so.1 liblz4.so.1 libgcrypt.so.20 libbz2.so.1
|
||||
```
|
||||
|
||||
## Certificate signed by internal certificate authorities
|
||||
|
||||
In many cases, Grafana runs on internal servers and uses certificates that have not been signed by a CA ([Certificate Authority](https://en.wikipedia.org/wiki/Certificate_authority)) known to Chrome, and therefore cannot be validated. Chrome internally uses NSS ([Network Security Services](https://en.wikipedia.org/wiki/Network_Security_Services)) for cryptographic operations such as the validation of certificates.
|
||||
@ -125,6 +133,22 @@ If this happens, then you have to add the certificate to the trust store. If you
|
||||
certutil –addstore "Root" <path>/internal-root-ca.crt.pem
|
||||
```
|
||||
|
||||
**Container:**
|
||||
|
||||
```Dockerfile
|
||||
FROM grafana/grafana-image-renderer:latest
|
||||
|
||||
USER root
|
||||
|
||||
RUN apk add --no-cache nss-tools
|
||||
|
||||
USER grafana
|
||||
|
||||
COPY internal-root-ca.crt.pem /etc/pki/tls/certs/internal-root-ca.crt.pem
|
||||
RUN mkdir -p /home/grafana/.pki/nssdb
|
||||
RUN certutil -d sql:/home/grafana/.pki/nssdb -A -n internal-root-ca -t C -i /etc/pki/tls/certs/internal-root-ca.crt.pem
|
||||
```
|
||||
|
||||
## Custom Chrome/Chromium
|
||||
|
||||
As a last resort, if you already have [Chrome](https://www.google.com/chrome/) or [Chromium](https://www.chromium.org/)
|
||||
|
@ -33,12 +33,11 @@ Complete the following steps to start the Grafana server using systemd and verif
|
||||
```bash
|
||||
sudo systemctl daemon-reload
|
||||
sudo systemctl start grafana-server
|
||||
sudo systemctl status grafana-server
|
||||
```
|
||||
|
||||
1. To verify that the service is running, run the following command:
|
||||
|
||||
```
|
||||
```bash
|
||||
sudo systemctl status grafana-server
|
||||
```
|
||||
|
||||
@ -56,7 +55,7 @@ sudo systemctl enable grafana-server.service
|
||||
|
||||
### Restart the Grafana server using systemd
|
||||
|
||||
To restart the Grafana server, run the following commands:
|
||||
To restart the Grafana server, run the following command:
|
||||
|
||||
```bash
|
||||
sudo systemctl restart grafana-server
|
||||
@ -70,16 +69,15 @@ SUSE or openSUSE users might need to start the server with the systemd method, t
|
||||
|
||||
Complete the following steps to start the Grafana server using init.d and verify that it is running:
|
||||
|
||||
1. To start the Grafana server, run the following commands:
|
||||
1. To start the Grafana server, run the following command:
|
||||
|
||||
```bash
|
||||
sudo service grafana-server start
|
||||
sudo service grafana-server status
|
||||
```
|
||||
|
||||
1. To verify that the service is running, run the following command:
|
||||
|
||||
```
|
||||
```bash
|
||||
sudo service grafana-server status
|
||||
```
|
||||
|
||||
@ -93,7 +91,7 @@ sudo update-rc.d grafana-server defaults
|
||||
|
||||
#### Restart the Grafana server using init.d
|
||||
|
||||
To restart the Grafana server, run the following commands:
|
||||
To restart the Grafana server, run the following command:
|
||||
|
||||
```bash
|
||||
sudo service grafana-server restart
|
||||
@ -121,8 +119,8 @@ Alternatively, you can use the `docker compose restart` command to restart Grafa
|
||||
|
||||
Configure your `docker-compose.yml` file. For example:
|
||||
|
||||
```bash
|
||||
version: "3.8"
|
||||
```yml
|
||||
version: '3.8'
|
||||
services:
|
||||
grafana:
|
||||
image: grafana/grafana:latest
|
||||
|
@ -19,7 +19,7 @@ If you are using `systemd` and want to start Grafana on a port that is lower tha
|
||||
|
||||
To learn more about capabilities, refer to [capabilities(7) — Linux manual page](https://man7.org/linux/man-pages/man7/capabilities.7.html).
|
||||
|
||||
```
|
||||
```ini
|
||||
[Service]
|
||||
# Give the CAP_NET_BIND_SERVICE capability
|
||||
CapabilityBoundingSet=CAP_NET_BIND_SERVICE
|
||||
|
@ -49,31 +49,43 @@ Before you dive in, remember that you can [explore advanced topics like alert in
|
||||
{{< /docs/ignore >}}
|
||||
|
||||
<!-- INTERACTIVE page intro.md END -->
|
||||
|
||||
<!-- INTERACTIVE page step1.md START -->
|
||||
<!-- INTERACTIVE ignore START -->
|
||||
|
||||
{{< docs/ignore >}}
|
||||
|
||||
## Set up the Grafana stack
|
||||
|
||||
{{< /docs/ignore >}}
|
||||
|
||||
## Before you begin
|
||||
|
||||
### Grafana Cloud users
|
||||
There are different ways you can follow along with this tutorial.
|
||||
|
||||
As a Grafana Cloud user, you don't have to install anything.
|
||||
### Grafana Cloud
|
||||
|
||||
<!-- INTERACTIVE ignore START -->
|
||||
As a Grafana Cloud user, you don't have to install anything. [Create your free account](http://grafana.com/auth/sign-up/create-user).
|
||||
|
||||
Continue to [Create a contact point](#create-a-contact-point).
|
||||
|
||||
<!-- INTERACTIVE ignore END -->
|
||||
### Interactive learning environment
|
||||
|
||||
### Grafana OSS users
|
||||
Alternatively, you can try out this example in our interactive learning environment: [Get started with Grafana Alerting](https://killercoda.com/grafana-labs/course/grafana/alerting-get-started/).
|
||||
|
||||
In order to run a Grafana stack locally, ensure you have the following applications installed.
|
||||
It's a fully configured environment with all the dependencies already installed.
|
||||
|
||||
### Grafana OSS
|
||||
|
||||
If you opt to run a Grafana stack locally, ensure you have the following applications installed:
|
||||
|
||||
- [Docker Compose](https://docs.docker.com/get-docker/) (included in Docker for Desktop for macOS and Windows)
|
||||
- [Git](https://git-scm.com/)
|
||||
|
||||
#### Set up the Grafana Stack (OSS users)
|
||||
#### Set up the Grafana stack (OSS users)
|
||||
|
||||
To demonstrate the observation of data using the Grafana stack, download the files to your local machine.
|
||||
<!-- INTERACTIVE ignore END -->
|
||||
|
||||
To demonstrate the observation of data using the Grafana stack, download and run the following files.
|
||||
|
||||
1. Clone the [tutorial environment repository](https://www.github.com/grafana/tutorial-environment).
|
||||
|
||||
@ -135,19 +147,6 @@ To demonstrate the observation of data using the Grafana stack, download the fil
|
||||
|
||||
{{< /docs/ignore >}}
|
||||
|
||||
<!-- INTERACTIVE ignore START -->
|
||||
|
||||
{{< admonition type="tip" >}}
|
||||
Alternatively, you can try out this example in our interactive learning environment: [Get started with Grafana Alerting](https://killercoda.com/grafana-labs/course/grafana/alerting-get-started/).
|
||||
|
||||
It's a fully configured environment with all the dependencies already installed.
|
||||
|
||||

|
||||
|
||||
Provide feedback, report bugs, and raise issues in the [Grafana Killercoda repository](https://github.com/grafana/killercoda).
|
||||
{{< /admonition >}}
|
||||
<!-- INTERACTIVE ignore END -->
|
||||
|
||||
<!-- INTERACTIVE page step1.md END -->
|
||||
<!-- INTERACTIVE page step2.md START -->
|
||||
|
||||
@ -223,10 +222,11 @@ In this section, we define queries, expressions (used to manipulate the data), a
|
||||
|
||||
### Set evaluation behavior
|
||||
|
||||
An [evaluation group](https://grafana.com/docs/grafana/latest/alerting/fundamentals/alert-rules/rule-evaluation/) defines when an alert rule fires, and it’s based on two settings:
|
||||
The [alert rule evaluation](https://grafana.com/docs/grafana/latest/alerting/fundamentals/alert-rules/rule-evaluation/) defines the conditions under which an alert rule triggers, based on the following settings:
|
||||
|
||||
- **Evaluation group**: how frequently the alert rule is evaluated.
|
||||
- **Evaluation interval**: how long the condition must be met to start firing. This allows your data time to stabilize before triggering an alert, helping to reduce the frequency of unnecessary notifications.
|
||||
- **Evaluation group**: every alert rule is assigned to an evaluation group. You can assign the alert rule to an existing evaluation group or create a new one.
|
||||
- **Evaluation interval**: determines how frequently the alert rule is checked. For instance, the evaluation may occur every 10s, 30s, 1m, 10m, etc.
|
||||
- **Pending period**: how long the condition must be met to trigger the alert rule.
|
||||
|
||||
To set up the evaluation:
|
||||
|
||||
|
@ -46,8 +46,8 @@ Cypress.on('uncaught:exception', (err) => {
|
||||
//
|
||||
|
||||
beforeEach(() => {
|
||||
if (Cypress.env('SCENES')) {
|
||||
cy.logToConsole('enabling dashboardScene feature toggle in localstorage');
|
||||
cy.setLocalStorage('grafana.featureToggles', 'dashboardScene=true');
|
||||
if (Cypress.env('DISABLE_SCENES')) {
|
||||
cy.logToConsole('disabling dashboardScene feature toggle in localstorage');
|
||||
cy.setLocalStorage('grafana.featureToggles', 'dashboardScene=false');
|
||||
}
|
||||
});
|
||||
|
@ -37,9 +37,15 @@ describe('Repeating a panel horizontally', () => {
|
||||
});
|
||||
|
||||
// Change to only show panels 1 + 3
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemLabels('horizontal').click();
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemLabels('horizontal')
|
||||
.parent()
|
||||
.within(() => {
|
||||
cy.get('input').click();
|
||||
});
|
||||
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownOptionTexts('1').click();
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownOptionTexts('3').click();
|
||||
|
||||
// blur the dropdown
|
||||
cy.get('body').click();
|
||||
|
||||
|
@ -38,9 +38,15 @@ describe('Repeating a panel vertically', () => {
|
||||
});
|
||||
|
||||
// Change to only show panels 1 + 3
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemLabels('vertical').click();
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemLabels('vertical')
|
||||
.parent()
|
||||
.within(() => {
|
||||
cy.get('input').click();
|
||||
});
|
||||
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownOptionTexts('1').click();
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownOptionTexts('3').click();
|
||||
|
||||
// blur the dropdown
|
||||
cy.get('body').click();
|
||||
|
||||
|
@ -32,10 +32,15 @@ describe('Repeating empty rows', () => {
|
||||
e2e.components.DashboardRow.title(title).should('be.visible');
|
||||
});
|
||||
|
||||
// Change to only show rows 1 + 3
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemLabels('row').click();
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemLabels('row')
|
||||
.parent()
|
||||
.within(() => {
|
||||
cy.get('input').click();
|
||||
});
|
||||
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownOptionTexts('1').click();
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownOptionTexts('3').click();
|
||||
|
||||
// blur the dropdown
|
||||
cy.get('body').click();
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
import testDashboard from '../dashboards/TestDashboard.json';
|
||||
import { e2e } from '../utils';
|
||||
|
||||
describe('Dashboard browse', () => {
|
||||
// Skipping due to race conditions with same old arch test e2e/dashboards-suite/dashboard-browse.spec.ts
|
||||
describe.skip('Dashboard browse', () => {
|
||||
beforeEach(() => {
|
||||
e2e.flows.login(Cypress.env('USERNAME'), Cypress.env('PASSWORD'));
|
||||
});
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { e2e } from '../utils';
|
||||
import '../../utils/support/clipboard';
|
||||
import '../utils/support/clipboard';
|
||||
|
||||
describe('Export as JSON', () => {
|
||||
beforeEach(() => {
|
@ -1,7 +1,8 @@
|
||||
import testDashboard from '../dashboards/DashboardLiveTest.json';
|
||||
import { e2e } from '../utils';
|
||||
|
||||
describe('Dashboard Live streaming support', () => {
|
||||
// Skipping due to flakiness/race conditions with same old arch test e2e/dashboards-suite/dashboard-live-streaming.spec.ts
|
||||
describe.skip('Dashboard Live streaming support', () => {
|
||||
beforeEach(() => {
|
||||
e2e.flows.login(Cypress.env('USERNAME'), Cypress.env('PASSWORD'));
|
||||
e2e.flows.importDashboard(testDashboard, 1000);
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { e2e } from '../utils';
|
||||
|
||||
describe('Public dashboards', () => {
|
||||
// Skipping due to race conditions with same old arch test e2e/dashboards-suite/dashboard-public-create.spec.ts
|
||||
describe.skip('Public dashboards', () => {
|
||||
beforeEach(() => {
|
||||
e2e.flows.login(Cypress.env('USERNAME'), Cypress.env('PASSWORD'));
|
||||
});
|
||||
@ -14,7 +14,7 @@ describe('Public dashboards', () => {
|
||||
cy.wait('@query');
|
||||
|
||||
// Open sharing modal
|
||||
e2e.pages.Dashboard.DashNav.shareButton().click();
|
||||
e2e.components.NavToolbar.shareDashboard().click();
|
||||
|
||||
// Select public dashboards tab
|
||||
e2e.components.Tab.title('Public dashboard').click();
|
||||
@ -74,7 +74,7 @@ describe('Public dashboards', () => {
|
||||
e2e.pages.Dashboard.DashNav.publicDashboardTag().should('exist');
|
||||
|
||||
// Open sharing modal
|
||||
e2e.pages.Dashboard.DashNav.shareButton().click();
|
||||
e2e.components.NavToolbar.shareDashboard().click();
|
||||
|
||||
// Select public dashboards tab
|
||||
cy.intercept('GET', '/api/dashboards/uid/ZqZnVvFZz/public-dashboards').as('query-public-dashboard');
|
||||
@ -114,7 +114,7 @@ describe('Public dashboards', () => {
|
||||
cy.wait('@query');
|
||||
|
||||
// Open sharing modal
|
||||
e2e.pages.Dashboard.DashNav.shareButton().click();
|
||||
e2e.components.NavToolbar.shareDashboard().click();
|
||||
|
||||
// Select public dashboards tab
|
||||
cy.intercept('GET', '/api/dashboards/uid/ZqZnVvFZz/public-dashboards').as('query-public-dashboard');
|
||||
|
@ -10,10 +10,10 @@ describe('Create a public dashboard with template variables shows a template var
|
||||
e2e.flows.openDashboard({ uid: 'HYaGDGIMk' });
|
||||
|
||||
// Open sharing modal
|
||||
e2e.pages.Dashboard.DashNav.shareButton().click();
|
||||
e2e.components.NavToolbar.shareDashboard().click();
|
||||
|
||||
// Select public dashboards tab
|
||||
e2e.components.Tab.title('Public dashboard').click();
|
||||
e2e.components.Tab.title('Public Dashboard').click();
|
||||
|
||||
// Warning Alert dashboard cannot be made public because it has template variables
|
||||
e2e.pages.ShareDashboardModal.PublicDashboard.TemplateVariablesWarningAlert().should('be.visible');
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { PublicDashboard } from '../../../public/app/features/dashboard/components/ShareModal/SharePublicDashboard/SharePublicDashboardUtils';
|
||||
import { PublicDashboard } from '../../public/app/features/dashboard/components/ShareModal/SharePublicDashboard/SharePublicDashboardUtils';
|
||||
import { e2e } from '../utils';
|
||||
import '../../utils/support/clipboard';
|
||||
import '../utils/support/clipboard';
|
||||
|
||||
describe('Shared dashboards', () => {
|
||||
beforeEach(() => {
|
@ -1,6 +1,6 @@
|
||||
import { ShareLinkConfiguration } from '../../../public/app/features/dashboard-scene/sharing/ShareButton/utils';
|
||||
import { ShareLinkConfiguration } from '../../public/app/features/dashboard-scene/sharing/ShareButton/utils';
|
||||
import { e2e } from '../utils';
|
||||
import '../../utils/support/clipboard';
|
||||
import '../utils/support/clipboard';
|
||||
|
||||
describe('Share internally', () => {
|
||||
beforeEach(() => {
|
@ -1,7 +1,7 @@
|
||||
import { SnapshotCreateResponse } from '../../../public/app/features/dashboard/services/SnapshotSrv';
|
||||
import { fromBaseUrl } from '../../utils/support/url';
|
||||
import { SnapshotCreateResponse } from '../../public/app/features/dashboard/services/SnapshotSrv';
|
||||
import { e2e } from '../utils';
|
||||
import '../../utils/support/clipboard';
|
||||
import { fromBaseUrl } from '../utils/support/url';
|
||||
import '../utils/support/clipboard';
|
||||
|
||||
describe('Snapshots', () => {
|
||||
beforeEach(() => {
|
@ -34,7 +34,7 @@ describe('Dashboard templating', () => {
|
||||
`Server:sqlstring = 'A''A\\"A','BB\\\B','CCC'`,
|
||||
`Server:date = NaN`,
|
||||
`Server:text = All`,
|
||||
`Server:queryparam = var-Server=All`,
|
||||
`Server:queryparam = var-Server=A%27A%22A&var-Server=BB%5CB&var-Server=CCC`,
|
||||
`1 < 2`,
|
||||
`Example: from=now-6h&to=now`,
|
||||
];
|
||||
|
@ -81,7 +81,8 @@ describe('Dashboard time zone support', () => {
|
||||
}
|
||||
});
|
||||
|
||||
it('Tests relative timezone support and overrides', () => {
|
||||
// TODO: remove skip once https://github.com/grafana/grafana/issues/86420 is done
|
||||
it.skip('Tests relative timezone support and overrides', () => {
|
||||
// Open dashboard
|
||||
e2e.flows.openDashboard({
|
||||
uid: 'd41dbaa2-a39e-4536-ab2b-caca52f1a9c8',
|
||||
@ -123,7 +124,6 @@ describe('Dashboard time zone support', () => {
|
||||
.within(() => {
|
||||
cy.contains('[role="row"]', '00:00:00').should('be.visible');
|
||||
});
|
||||
|
||||
// Test UTC timezone
|
||||
e2e.flows.setTimeRange({
|
||||
from: 'now-6h',
|
||||
|
@ -22,9 +22,9 @@ describe('Dashboards', () => {
|
||||
// Then we open and close the panel editor
|
||||
e2e.components.Panels.Panel.menu('Panel #50').click({ force: true }); // it only shows on hover
|
||||
e2e.components.Panels.Panel.menuItems('Edit').click();
|
||||
e2e.components.PanelEditor.applyButton().click();
|
||||
e2e.components.NavToolbar.editDashboard.backToDashboardButton().click();
|
||||
|
||||
// And the last panel should still be visible!
|
||||
// The last panel should still be visible!
|
||||
e2e.components.Panels.Panel.title('Panel #50').should('be.visible');
|
||||
});
|
||||
});
|
||||
|
@ -16,40 +16,50 @@ describe('Variables - Load options from Url', () => {
|
||||
|
||||
cy.wait('@query');
|
||||
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownValueLinkTexts('A').should('be.visible').click();
|
||||
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownDropDown()
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownValueLinkTexts('A')
|
||||
.should('be.visible')
|
||||
.within(() => {
|
||||
e2e.components.Variables.variableOption().should('have.length', 9);
|
||||
cy.get('input').click();
|
||||
});
|
||||
|
||||
e2e.components.Select.option().parent().should('have.length', 10);
|
||||
|
||||
e2e.components.Select.toggleAllOptions().should('have.text', 'Selected (1)');
|
||||
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownOptionTexts('All').should('be.visible');
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownOptionTexts('A').should('be.visible');
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownOptionTexts('B').should('be.visible');
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownOptionTexts('C').should('be.visible');
|
||||
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownValueLinkTexts('AA').should('be.visible').click();
|
||||
cy.get('body').click(0, 0);
|
||||
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownDropDown()
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownValueLinkTexts('AA')
|
||||
.should('be.visible')
|
||||
.within(() => {
|
||||
e2e.components.Variables.variableOption().should('have.length', 9);
|
||||
cy.get('input').click();
|
||||
});
|
||||
|
||||
e2e.components.Select.option().parent().should('have.length', 10);
|
||||
|
||||
e2e.components.Select.toggleAllOptions().should('have.text', 'Selected (1)');
|
||||
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownOptionTexts('All').should('be.visible');
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownOptionTexts('AA').should('be.visible');
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownOptionTexts('AB').should('be.visible');
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownOptionTexts('AC').should('be.visible');
|
||||
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownValueLinkTexts('All').should('be.visible').click();
|
||||
cy.get('body').click(0, 0);
|
||||
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownDropDown()
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownValueLinkTexts('$__all')
|
||||
.should('be.visible')
|
||||
.within(() => {
|
||||
e2e.components.Variables.variableOption().should('have.length', 9);
|
||||
cy.get('input').click();
|
||||
});
|
||||
|
||||
e2e.components.Select.option().parent().should('have.length', 10);
|
||||
|
||||
e2e.components.Select.toggleAllOptions().should('have.text', 'Selected (1)');
|
||||
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownOptionTexts('All').should('be.visible');
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownOptionTexts('AAA').should('be.visible');
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownOptionTexts('AAB').should('be.visible');
|
||||
@ -65,40 +75,50 @@ describe('Variables - Load options from Url', () => {
|
||||
|
||||
cy.wait('@query');
|
||||
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownValueLinkTexts('B').should('be.visible').click();
|
||||
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownDropDown()
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownValueLinkTexts('B')
|
||||
.should('be.visible')
|
||||
.within(() => {
|
||||
e2e.components.Variables.variableOption().should('have.length', 9);
|
||||
cy.get('input').click();
|
||||
});
|
||||
|
||||
e2e.components.Select.option().parent().should('have.length', 10);
|
||||
|
||||
e2e.components.Select.toggleAllOptions().should('have.text', 'Selected (1)');
|
||||
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownOptionTexts('All').should('be.visible');
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownOptionTexts('A').should('be.visible');
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownOptionTexts('B').should('be.visible');
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownOptionTexts('C').should('be.visible');
|
||||
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownValueLinkTexts('BB').should('be.visible').click();
|
||||
cy.get('body').click(0, 0);
|
||||
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownDropDown()
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownValueLinkTexts('BB')
|
||||
.should('be.visible')
|
||||
.within(() => {
|
||||
e2e.components.Variables.variableOption().should('have.length', 9);
|
||||
cy.get('input').click();
|
||||
});
|
||||
|
||||
e2e.components.Select.option().parent().should('have.length', 10);
|
||||
|
||||
e2e.components.Select.toggleAllOptions().should('have.text', 'Selected (1)');
|
||||
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownOptionTexts('All').should('be.visible');
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownOptionTexts('BA').should('be.visible');
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownOptionTexts('BB').should('be.visible');
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownOptionTexts('BC').should('be.visible');
|
||||
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownValueLinkTexts('BBB').should('be.visible').click();
|
||||
cy.get('body').click(0, 0);
|
||||
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownDropDown()
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownValueLinkTexts('BBB')
|
||||
.should('be.visible')
|
||||
.within(() => {
|
||||
e2e.components.Variables.variableOption().should('have.length', 9);
|
||||
cy.get('input').click();
|
||||
});
|
||||
|
||||
e2e.components.Select.option().parent().should('have.length', 10);
|
||||
|
||||
e2e.components.Select.toggleAllOptions().should('have.text', 'Selected (1)');
|
||||
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownOptionTexts('All').should('be.visible');
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownOptionTexts('BBA').should('be.visible');
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownOptionTexts('BBB').should('be.visible');
|
||||
@ -125,24 +145,25 @@ describe('Variables - Load options from Url', () => {
|
||||
|
||||
cy.wait('@query');
|
||||
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownValueLinkTexts('X').should('be.visible').click();
|
||||
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownDropDown()
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownValueLinkTexts('X')
|
||||
.should('be.visible')
|
||||
.within(() => {
|
||||
e2e.components.Variables.variableOption().should('have.length', 9);
|
||||
cy.get('input').click();
|
||||
});
|
||||
|
||||
e2e.components.Select.option().parent().should('have.length', 10);
|
||||
|
||||
e2e.components.Select.toggleAllOptions().should('have.text', 'Selected (1)');
|
||||
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownOptionTexts('All').should('be.visible');
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownOptionTexts('A').should('be.visible');
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownOptionTexts('B').should('be.visible');
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownOptionTexts('C').should('be.visible');
|
||||
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownValueLinkTexts('AA').should('be.visible').click();
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownDropDown()
|
||||
cy.get('body').click();
|
||||
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownValueLinkTexts('$__all')
|
||||
.should('be.visible')
|
||||
.within(() => {
|
||||
e2e.components.Variables.variableOption().should('have.length', 65);
|
||||
});
|
||||
.should('have.length', 2);
|
||||
});
|
||||
});
|
||||
|
@ -9,7 +9,7 @@ describe('Variables - Constant', () => {
|
||||
});
|
||||
|
||||
it('can add a new constant variable', () => {
|
||||
e2e.flows.openDashboard({ uid: `${PAGE_UNDER_TEST}?orgId=1&editview=templating` });
|
||||
e2e.flows.openDashboard({ uid: `${PAGE_UNDER_TEST}?orgId=1&editview=variables` });
|
||||
cy.contains(DASHBOARD_NAME).should('be.visible');
|
||||
|
||||
// Create a new "Constant" variable
|
||||
@ -22,11 +22,11 @@ describe('Variables - Constant', () => {
|
||||
e2e.pages.Dashboard.Settings.Variables.Edit.ConstantVariable.constantOptionsQueryInputV2().type('pesto').blur();
|
||||
e2e.pages.Dashboard.Settings.Variables.Edit.General.generalLabelInputV2().type('Variable under test').blur();
|
||||
|
||||
e2e.pages.Dashboard.Settings.Variables.Edit.General.previewOfValuesOption().eq(0).should('have.text', 'pesto');
|
||||
// e2e.pages.Dashboard.Settings.Variables.Edit.General.previewOfValuesOption().eq(0).should('have.text', 'pesto');
|
||||
|
||||
// Navigate back to the homepage and change the selected variable value
|
||||
e2e.pages.Dashboard.Settings.Variables.Edit.General.submitButton().click();
|
||||
e2e.pages.Dashboard.Settings.Actions.close().click();
|
||||
e2e.pages.Dashboard.Settings.Variables.Edit.General.applyButton().click();
|
||||
e2e.components.NavToolbar.editDashboard.backToDashboardButton().click();
|
||||
e2e.components.RefreshPicker.runButtonV2().click();
|
||||
|
||||
// Assert it was rendered
|
||||
|
@ -25,7 +25,7 @@ describe('Variables - Custom', () => {
|
||||
});
|
||||
|
||||
it('can add a custom template variable', () => {
|
||||
e2e.flows.openDashboard({ uid: `${PAGE_UNDER_TEST}?orgId=1&editview=templating` });
|
||||
e2e.flows.openDashboard({ uid: `${PAGE_UNDER_TEST}?orgId=1&editview=variables` });
|
||||
cy.contains(DASHBOARD_NAME).should('be.visible');
|
||||
|
||||
// Create a new "Custom" variable
|
||||
@ -34,17 +34,16 @@ describe('Variables - Custom', () => {
|
||||
assertPreviewValues(['one', 'two', 'three']);
|
||||
|
||||
// Navigate back to the homepage and change the selected variable value
|
||||
e2e.pages.Dashboard.Settings.Variables.Edit.General.submitButton().click();
|
||||
e2e.pages.Dashboard.Settings.Actions.close().click();
|
||||
e2e.pages.Dashboard.Settings.Variables.Edit.General.applyButton().click();
|
||||
e2e.components.NavToolbar.editDashboard.backToDashboardButton().click();
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownValueLinkTexts('one').click();
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownOptionTexts('two').click();
|
||||
|
||||
e2e.components.Select.option().contains('two').click();
|
||||
// Assert it was rendered
|
||||
cy.get('.markdown-html').should('include.text', 'VariableUnderTest: two');
|
||||
});
|
||||
|
||||
it('can add a custom template variable with labels', () => {
|
||||
e2e.flows.openDashboard({ uid: `${PAGE_UNDER_TEST}?orgId=1&editview=templating` });
|
||||
e2e.flows.openDashboard({ uid: `${PAGE_UNDER_TEST}?orgId=1&editview=variables` });
|
||||
cy.contains(DASHBOARD_NAME).should('be.visible');
|
||||
|
||||
// Create a new "Custom" variable
|
||||
@ -58,10 +57,10 @@ describe('Variables - Custom', () => {
|
||||
assertPreviewValues(['One', 'Two', 'Three']);
|
||||
|
||||
// Navigate back to the homepage and change the selected variable value
|
||||
e2e.pages.Dashboard.Settings.Variables.Edit.General.submitButton().click();
|
||||
e2e.pages.Dashboard.Settings.Actions.close().click();
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownValueLinkTexts('One').click();
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownOptionTexts('Two').click();
|
||||
e2e.pages.Dashboard.Settings.Variables.Edit.General.applyButton().click();
|
||||
e2e.components.NavToolbar.editDashboard.backToDashboardButton().click();
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownValueLinkTexts('1').click();
|
||||
e2e.components.Select.option().contains('Two').click();
|
||||
|
||||
// Assert it was rendered
|
||||
cy.get('.markdown-html').should('include.text', 'VariableUnderTest: 2');
|
||||
|
@ -3,16 +3,14 @@ import { e2e } from '../utils';
|
||||
const PAGE_UNDER_TEST = 'kVi2Gex7z/test-variable-output';
|
||||
const DASHBOARD_NAME = 'Test variable output';
|
||||
|
||||
const gdev_mysql = 'gdev-mysql';
|
||||
const gdev_mysql_ds_tests = 'gdev-mysql-ds-tests';
|
||||
|
||||
describe('Variables - Datasource', () => {
|
||||
// Skipping due to flakiness/race conditions with same old arch test e2e/dashboards-suite/new-datasource-variable.spec.ts
|
||||
describe.skip('Variables - Datasource', () => {
|
||||
beforeEach(() => {
|
||||
e2e.flows.login(Cypress.env('USERNAME'), Cypress.env('PASSWORD'));
|
||||
});
|
||||
|
||||
it('can add a new datasource variable', () => {
|
||||
e2e.flows.openDashboard({ uid: `${PAGE_UNDER_TEST}?orgId=1&editview=templating` });
|
||||
e2e.flows.openDashboard({ uid: `${PAGE_UNDER_TEST}?orgId=1&editview=variables` });
|
||||
cy.contains(DASHBOARD_NAME).should('be.visible');
|
||||
|
||||
// Create a new "Datasource" variable
|
||||
@ -23,26 +21,30 @@ describe('Variables - Datasource', () => {
|
||||
e2e.pages.Dashboard.Settings.Variables.Edit.General.generalNameInputV2().clear().type('VariableUnderTest').blur();
|
||||
e2e.pages.Dashboard.Settings.Variables.Edit.General.generalLabelInputV2().type('Variable under test').blur();
|
||||
|
||||
// If this is failing, but sure to check there are MySQL datasources named "gdev-mysql" and "gdev-mysql-ds-tests"
|
||||
// If this is failing, but sure to check there are Prometheus datasources named "gdev-prometheus" and "gdev-slow-prometheus"
|
||||
// Or, just update is to match some gdev datasources to test with :)
|
||||
e2e.pages.Dashboard.Settings.Variables.Edit.DatasourceVariable.datasourceSelect().within(() => {
|
||||
cy.get('input').type('MySQL{enter}');
|
||||
cy.get('input').type('Prometheus{enter}');
|
||||
});
|
||||
e2e.pages.Dashboard.Settings.Variables.Edit.General.previewOfValuesOption().should('contain.text', gdev_mysql);
|
||||
e2e.pages.Dashboard.Settings.Variables.Edit.General.previewOfValuesOption().should(
|
||||
'contain.text',
|
||||
gdev_mysql_ds_tests
|
||||
'gdev-prometheus'
|
||||
);
|
||||
e2e.pages.Dashboard.Settings.Variables.Edit.General.previewOfValuesOption().should(
|
||||
'contain.text',
|
||||
'gdev-slow-prometheus'
|
||||
);
|
||||
|
||||
// Navigate back to the homepage and change the selected variable value
|
||||
e2e.pages.Dashboard.Settings.Variables.Edit.General.submitButton().click();
|
||||
e2e.pages.Dashboard.Settings.Actions.close().click();
|
||||
e2e.pages.Dashboard.Settings.Variables.Edit.General.applyButton().click();
|
||||
e2e.components.NavToolbar.editDashboard.backToDashboardButton().click();
|
||||
e2e.components.RefreshPicker.runButtonV2().click();
|
||||
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownValueLinkTexts(gdev_mysql).click();
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownOptionTexts(gdev_mysql_ds_tests).click();
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownValueLinkTexts('gdev-prometheus').click();
|
||||
e2e.components.Select.option().contains('gdev-slow-prometheus').click();
|
||||
|
||||
// Assert it was rendered
|
||||
cy.get('.markdown-html').should('include.text', `VariableUnderTestText: ${gdev_mysql_ds_tests}`);
|
||||
cy.get('.markdown-html').should('include.text', 'VariableUnderTest: gdev-slow-prometheus-uid');
|
||||
cy.get('.markdown-html').should('include.text', 'VariableUnderTestText: gdev-slow-prometheus');
|
||||
});
|
||||
});
|
||||
|
@ -16,7 +16,7 @@ describe('Variables - Interval', () => {
|
||||
});
|
||||
|
||||
it('can add a new interval variable', () => {
|
||||
e2e.flows.openDashboard({ uid: `${PAGE_UNDER_TEST}?orgId=1&editview=templating` });
|
||||
e2e.flows.openDashboard({ uid: `${PAGE_UNDER_TEST}?orgId=1&editview=variables` });
|
||||
cy.contains(DASHBOARD_NAME).should('be.visible');
|
||||
|
||||
// Create a new "Interval" variable
|
||||
@ -35,12 +35,13 @@ describe('Variables - Interval', () => {
|
||||
assertPreviewValues(['10s', '10m', '60m', '90m', '1h30m']);
|
||||
|
||||
// Navigate back to the homepage and change the selected variable value
|
||||
e2e.pages.Dashboard.Settings.Variables.Edit.General.submitButton().click();
|
||||
e2e.pages.Dashboard.Settings.Actions.close().click();
|
||||
e2e.pages.Dashboard.Settings.Variables.Edit.General.applyButton().click();
|
||||
e2e.components.NavToolbar.editDashboard.backToDashboardButton().click();
|
||||
|
||||
e2e.components.RefreshPicker.runButtonV2().click();
|
||||
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownValueLinkTexts('10s').click();
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownOptionTexts('1h30m').click();
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemLabels('Variable under test').next().should('have.text', `10s`).click();
|
||||
e2e.components.Select.option().contains('1h30m').click();
|
||||
|
||||
// Assert it was rendered
|
||||
cy.get('.markdown-html').should('include.text', 'VariableUnderTest: 1h30m');
|
||||
|
@ -1,3 +1,5 @@
|
||||
import { selectors } from '@grafana/e2e-selectors';
|
||||
|
||||
import { e2e } from '../utils';
|
||||
|
||||
const PAGE_UNDER_TEST = '-Y-tnEDWk/templating-nested-template-variables';
|
||||
@ -9,10 +11,12 @@ describe('Variables - Query - Add variable', () => {
|
||||
});
|
||||
|
||||
it('query variable should be default and default fields should be correct', () => {
|
||||
e2e.flows.openDashboard({ uid: `${PAGE_UNDER_TEST}?orgId=1&editview=templating` });
|
||||
e2e.flows.openDashboard({ uid: `${PAGE_UNDER_TEST}?orgId=1&editview=variables` });
|
||||
cy.contains(DASHBOARD_NAME).should('be.visible');
|
||||
|
||||
e2e.pages.Dashboard.Settings.Variables.List.newButton().should('be.visible').click();
|
||||
cy.get(`[data-testid="${selectors.pages.Dashboard.Settings.Variables.List.newButton}"]`)
|
||||
.should('be.visible')
|
||||
.click();
|
||||
|
||||
e2e.pages.Dashboard.Settings.Variables.Edit.General.generalNameInputV2()
|
||||
.should('be.visible')
|
||||
@ -68,15 +72,17 @@ describe('Variables - Query - Add variable', () => {
|
||||
cy.get('input[type="checkbox"]').should('not.be.checked');
|
||||
});
|
||||
|
||||
e2e.pages.Dashboard.Settings.Variables.Edit.General.previewOfValuesOption().should('not.exist');
|
||||
e2e.pages.Dashboard.Settings.Variables.Edit.General.previewOfValuesOption().should('not.have.text');
|
||||
e2e.pages.Dashboard.Settings.Variables.Edit.General.selectionOptionsCustomAllInput().should('not.exist');
|
||||
});
|
||||
|
||||
it('adding a single value query variable', () => {
|
||||
e2e.flows.openDashboard({ uid: `${PAGE_UNDER_TEST}?orgId=1&editview=templating` });
|
||||
e2e.flows.openDashboard({ uid: `${PAGE_UNDER_TEST}?orgId=1&editview=variables` });
|
||||
cy.contains(DASHBOARD_NAME).should('be.visible');
|
||||
|
||||
e2e.pages.Dashboard.Settings.Variables.List.newButton().should('be.visible').click();
|
||||
cy.get(`[data-testid="${selectors.pages.Dashboard.Settings.Variables.List.newButton}"]`)
|
||||
.should('be.visible')
|
||||
.click();
|
||||
|
||||
e2e.pages.Dashboard.Settings.Variables.Edit.General.generalLabelInputV2()
|
||||
.should('be.visible')
|
||||
@ -101,29 +107,27 @@ describe('Variables - Query - Add variable', () => {
|
||||
|
||||
e2e.pages.Dashboard.Settings.Variables.Edit.General.submitButton().scrollIntoView().should('be.visible').click();
|
||||
|
||||
e2e.pages.Dashboard.Settings.Actions.close().click();
|
||||
e2e.components.NavToolbar.editDashboard.backToDashboardButton().click();
|
||||
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemLabels('a label').should('be.visible');
|
||||
e2e.pages.Dashboard.SubMenu.submenuItem()
|
||||
.should('have.length', 4)
|
||||
.eq(3)
|
||||
.within(() => {
|
||||
e2e.components.Variables.variableLinkWrapper().should('be.visible').click();
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownDropDown()
|
||||
.should('be.visible')
|
||||
.within(() => {
|
||||
e2e.components.Variables.variableOption().should('have.length', 1);
|
||||
cy.get('input').click();
|
||||
});
|
||||
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownOptionTexts('C').should('be.visible');
|
||||
});
|
||||
e2e.components.Select.option().should('have.length', 1);
|
||||
e2e.components.Select.option().contains('C');
|
||||
});
|
||||
|
||||
it('adding a multi value query variable', () => {
|
||||
e2e.flows.openDashboard({ uid: `${PAGE_UNDER_TEST}?orgId=1&editview=templating` });
|
||||
e2e.flows.openDashboard({ uid: `${PAGE_UNDER_TEST}?orgId=1&editview=variables` });
|
||||
cy.contains(DASHBOARD_NAME).should('be.visible');
|
||||
|
||||
e2e.pages.Dashboard.Settings.Variables.List.newButton().should('be.visible').click();
|
||||
cy.get(`[data-testid="${selectors.pages.Dashboard.Settings.Variables.List.newButton}"]`)
|
||||
.should('be.visible')
|
||||
.click();
|
||||
|
||||
e2e.pages.Dashboard.Settings.Variables.Edit.General.generalLabelInputV2()
|
||||
.should('be.visible')
|
||||
@ -161,22 +165,21 @@ describe('Variables - Query - Add variable', () => {
|
||||
|
||||
e2e.pages.Dashboard.Settings.Variables.Edit.General.submitButton().scrollIntoView().should('be.visible').click();
|
||||
|
||||
e2e.pages.Dashboard.Settings.Actions.close().click();
|
||||
e2e.components.NavToolbar.editDashboard.backToDashboardButton().click();
|
||||
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemLabels('a label').should('be.visible');
|
||||
e2e.pages.Dashboard.SubMenu.submenuItem()
|
||||
.should('have.length', 4)
|
||||
.eq(3)
|
||||
.within(() => {
|
||||
e2e.components.Variables.variableLinkWrapper().should('be.visible').click();
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownDropDown()
|
||||
.should('be.visible')
|
||||
.within(() => {
|
||||
e2e.components.Variables.variableOption().should('have.length', 2);
|
||||
cy.get('input').click();
|
||||
});
|
||||
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownOptionTexts('All').should('be.visible');
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownOptionTexts('C').should('be.visible');
|
||||
});
|
||||
e2e.components.Select.option().should('have.length', 3);
|
||||
|
||||
e2e.components.Select.toggleAllOptions().should('have.text', 'Selected (1)');
|
||||
|
||||
e2e.components.Select.option().contains('All');
|
||||
e2e.components.Select.option().contains('C');
|
||||
});
|
||||
});
|
||||
|
@ -9,7 +9,7 @@ describe('Variables - Text box', () => {
|
||||
});
|
||||
|
||||
it('can add a new text box variable', () => {
|
||||
e2e.flows.openDashboard({ uid: `${PAGE_UNDER_TEST}?orgId=1&editview=templating` });
|
||||
e2e.flows.openDashboard({ uid: `${PAGE_UNDER_TEST}?orgId=1&editview=variables` });
|
||||
cy.contains(DASHBOARD_NAME).should('be.visible');
|
||||
|
||||
// Create a new "text box" variable
|
||||
@ -22,13 +22,12 @@ describe('Variables - Text box', () => {
|
||||
e2e.pages.Dashboard.Settings.Variables.Edit.General.generalLabelInputV2().type('Variable under test').blur();
|
||||
e2e.pages.Dashboard.Settings.Variables.Edit.TextBoxVariable.textBoxOptionsQueryInputV2().type('cat-dog').blur();
|
||||
|
||||
e2e.pages.Dashboard.Settings.Variables.Edit.General.previewOfValuesOption().eq(0).should('have.text', 'cat-dog');
|
||||
|
||||
// Navigate back to the homepage and change the selected variable value
|
||||
e2e.pages.Dashboard.Settings.Variables.Edit.General.submitButton().click();
|
||||
e2e.pages.Dashboard.Settings.Actions.close().click();
|
||||
cy.get('#var-VariableUnderTest').clear().type('dog-cat').blur();
|
||||
|
||||
e2e.pages.Dashboard.Settings.Variables.Edit.General.applyButton().click();
|
||||
e2e.components.NavToolbar.editDashboard.backToDashboardButton().click();
|
||||
e2e.pages.Dashboard.SubMenu.submenuItem().within(() => {
|
||||
cy.get('input').clear().type('dog-cat').blur();
|
||||
});
|
||||
// Assert it was rendered
|
||||
cy.get('.markdown-html').should('include.text', 'VariableUnderTest: dog-cat');
|
||||
});
|
||||
|
@ -1,3 +1,5 @@
|
||||
import { selectors } from '@grafana/e2e-selectors';
|
||||
|
||||
import { e2e } from '../utils';
|
||||
|
||||
const PAGE_UNDER_TEST = '-Y-tnEDWk/templating-nested-template-variables';
|
||||
@ -10,39 +12,46 @@ describe('Variables - Set options from ui', () => {
|
||||
it('clicking a value that is not part of dependents options should change these to All', () => {
|
||||
e2e.flows.openDashboard({ uid: `${PAGE_UNDER_TEST}?orgId=1&var-datacenter=A&var-server=AA&var-pod=AAA` });
|
||||
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownValueLinkTexts('A').should('be.visible').click();
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownValueLinkTexts('A')
|
||||
.should('be.visible')
|
||||
.within(() => {
|
||||
cy.get('input').click();
|
||||
});
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownOptionTexts('A').should('be.visible').click();
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownOptionTexts('B').should('be.visible').click();
|
||||
|
||||
e2e.components.NavToolbar.container().click();
|
||||
cy.get('body').click();
|
||||
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownValueLinkTexts('B').scrollIntoView().should('be.visible');
|
||||
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownValueLinkTexts('All')
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownValueLinkTexts('$__all')
|
||||
.should('have.length', 2)
|
||||
.eq(0)
|
||||
.should('be.visible')
|
||||
.click();
|
||||
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownDropDown()
|
||||
.should('be.visible')
|
||||
.within(() => {
|
||||
e2e.components.Variables.variableOption().should('have.length', 9);
|
||||
cy.get('input').click();
|
||||
});
|
||||
|
||||
e2e.components.Select.option().parent().should('have.length', 10);
|
||||
|
||||
e2e.components.Select.toggleAllOptions().should('have.text', 'Selected (1)');
|
||||
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownOptionTexts('All').should('be.visible');
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownOptionTexts('BA').should('be.visible');
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownOptionTexts('BB').should('be.visible');
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownOptionTexts('BC').should('be.visible');
|
||||
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownValueLinkTexts('All').should('be.visible').click();
|
||||
cy.get('body').click();
|
||||
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownDropDown()
|
||||
.should('be.visible')
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemLabels('pod')
|
||||
.parent()
|
||||
.within(() => {
|
||||
e2e.components.Variables.variableOption().should('have.length', 65);
|
||||
cy.get('input').click();
|
||||
});
|
||||
|
||||
// length is 11 because of virtualized select options
|
||||
e2e.components.Select.option().parent().should('have.length', 11);
|
||||
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownOptionTexts('All').should('be.visible');
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownOptionTexts('BAA').should('be.visible');
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownOptionTexts('BAB').should('be.visible');
|
||||
@ -60,41 +69,47 @@ describe('Variables - Set options from ui', () => {
|
||||
|
||||
cy.wait('@query');
|
||||
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownValueLinkTexts('A').should('be.visible').click();
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownValueLinkTexts('A')
|
||||
.should('be.visible')
|
||||
.within(() => {
|
||||
cy.get('input').click();
|
||||
});
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownOptionTexts('B').should('be.visible').click();
|
||||
|
||||
e2e.components.NavToolbar.container().click();
|
||||
e2e.components.Select.toggleAllOptions().should('have.text', 'Selected (2)');
|
||||
|
||||
cy.get('body').click();
|
||||
|
||||
cy.wait('@query');
|
||||
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownValueLinkTexts('A + B').scrollIntoView().should('be.visible');
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownValueLinkTexts('A,B').scrollIntoView().should('be.visible');
|
||||
|
||||
e2e.components.LoadingIndicator.icon().should('have.length', 0);
|
||||
cy.get(`[aria-label="${selectors.components.LoadingIndicator.icon}"]`).should('not.exist');
|
||||
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownValueLinkTexts('AA').should('be.visible').click();
|
||||
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownDropDown()
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownValueLinkTexts('AA')
|
||||
.should('be.visible')
|
||||
.within(() => {
|
||||
e2e.components.Variables.variableOption().should('have.length', 17);
|
||||
cy.get('input').click();
|
||||
});
|
||||
|
||||
e2e.components.Select.option().should('have.length', 11);
|
||||
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownOptionTexts('All').should('be.visible');
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownOptionTexts('AA').should('be.visible');
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownOptionTexts('AB').should('be.visible');
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownOptionTexts('AC').should('be.visible');
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownOptionTexts('BA').should('be.visible');
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownOptionTexts('BB').should('be.visible');
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownOptionTexts('BC').should('be.visible');
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownOptionTexts('AD').should('be.visible');
|
||||
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownValueLinkTexts('AAA').should('be.visible').click();
|
||||
cy.get('body').click();
|
||||
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownDropDown()
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownValueLinkTexts('AAA')
|
||||
.should('be.visible')
|
||||
.within(() => {
|
||||
e2e.components.Variables.variableOption().should('have.length', 9);
|
||||
cy.get('input').click();
|
||||
});
|
||||
|
||||
e2e.components.Select.option().should('have.length', 10);
|
||||
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownOptionTexts('All').should('be.visible');
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownOptionTexts('AAA').should('be.visible');
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownOptionTexts('AAB').should('be.visible');
|
||||
@ -108,38 +123,46 @@ describe('Variables - Set options from ui', () => {
|
||||
cy.intercept({ pathname: '/api/ds/query' }).as('query');
|
||||
|
||||
cy.wait('@query');
|
||||
cy.get(`[aria-label="${selectors.components.LoadingIndicator.icon}"]`).should('not.exist');
|
||||
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownValueLinkTexts('A + B').should('be.visible').click();
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownOptionTexts('A').should('be.visible').click();
|
||||
|
||||
e2e.components.NavToolbar.container().click();
|
||||
|
||||
cy.wait('@query');
|
||||
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownValueLinkTexts('B').scrollIntoView().should('be.visible');
|
||||
|
||||
e2e.components.LoadingIndicator.icon().should('have.length', 0);
|
||||
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownValueLinkTexts('BB').should('be.visible').click();
|
||||
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownDropDown()
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownValueLinkTexts('A,B')
|
||||
.should('be.visible')
|
||||
.within(() => {
|
||||
e2e.components.Variables.variableOption().should('have.length', 9);
|
||||
cy.get('input').click();
|
||||
});
|
||||
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownOptionTexts('A').should('be.visible').click();
|
||||
|
||||
cy.get('body').click();
|
||||
|
||||
cy.wait('@query');
|
||||
cy.get(`[aria-label="${selectors.components.LoadingIndicator.icon}"]`).should('not.exist');
|
||||
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownValueLinkTexts('B').should('be.visible');
|
||||
|
||||
cy.get(`[aria-label="${selectors.components.LoadingIndicator.icon}"]`).should('not.exist');
|
||||
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownValueLinkTexts('BB')
|
||||
.should('be.visible')
|
||||
.within(() => {
|
||||
cy.get('input').click();
|
||||
});
|
||||
|
||||
e2e.components.Select.option().should('have.length', 10);
|
||||
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownOptionTexts('All').should('be.visible');
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownOptionTexts('BA').should('be.visible');
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownOptionTexts('BB').should('be.visible');
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownOptionTexts('BC').should('be.visible');
|
||||
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownValueLinkTexts('BBB').should('be.visible').click();
|
||||
cy.get('body').click(0, 0);
|
||||
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownDropDown()
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownValueLinkTexts('BBB')
|
||||
.should('be.visible')
|
||||
.within(() => {
|
||||
e2e.components.Variables.variableOption().should('have.length', 9);
|
||||
cy.get('input').click();
|
||||
});
|
||||
e2e.components.Select.option().should('have.length', 10);
|
||||
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownOptionTexts('BBA').should('be.visible');
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownOptionTexts('BBB').should('be.visible');
|
||||
|
@ -27,21 +27,27 @@ describe('Templating', () => {
|
||||
expect(links).to.have.length.greaterThan(13);
|
||||
|
||||
for (let index = 0; index < links.length; index++) {
|
||||
expect(Cypress.$(links[index]).attr('href')).contains(`var-custom=${variableValue}`);
|
||||
expect(Cypress.$(links[index]).attr('href')).contains(variableValue);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
e2e.components.DashboardLinks.dropDown().should('be.visible').click().wait('@tagsTemplatingSearch');
|
||||
|
||||
// verify all links, should have All value
|
||||
verifyLinks('All');
|
||||
verifyLinks('var-custom=%24__all');
|
||||
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownValueLinkTexts('All').should('be.visible').click();
|
||||
cy.get('body').click();
|
||||
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownValueLinkTexts('$__all')
|
||||
.should('be.visible')
|
||||
.within(() => {
|
||||
cy.get('input').click();
|
||||
});
|
||||
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownOptionTexts('p2').should('be.visible').click();
|
||||
|
||||
e2e.components.NavToolbar.container().click();
|
||||
cy.get('body').click();
|
||||
|
||||
e2e.components.DashboardLinks.dropDown()
|
||||
.scrollIntoView()
|
||||
.should('be.visible')
|
||||
|
@ -37,15 +37,9 @@ describe('Repeating a panel horizontally', () => {
|
||||
});
|
||||
|
||||
// Change to only show panels 1 + 3
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemLabels('horizontal')
|
||||
.parent()
|
||||
.within(() => {
|
||||
cy.get('input').click();
|
||||
});
|
||||
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemLabels('horizontal').click();
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownOptionTexts('1').click();
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownOptionTexts('3').click();
|
||||
|
||||
// blur the dropdown
|
||||
cy.get('body').click();
|
||||
|
@ -38,15 +38,9 @@ describe('Repeating a panel vertically', () => {
|
||||
});
|
||||
|
||||
// Change to only show panels 1 + 3
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemLabels('vertical')
|
||||
.parent()
|
||||
.within(() => {
|
||||
cy.get('input').click();
|
||||
});
|
||||
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemLabels('vertical').click();
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownOptionTexts('1').click();
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownOptionTexts('3').click();
|
||||
|
||||
// blur the dropdown
|
||||
cy.get('body').click();
|
||||
|
@ -32,15 +32,10 @@ describe('Repeating empty rows', () => {
|
||||
e2e.components.DashboardRow.title(title).should('be.visible');
|
||||
});
|
||||
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemLabels('row')
|
||||
.parent()
|
||||
.within(() => {
|
||||
cy.get('input').click();
|
||||
});
|
||||
|
||||
// Change to only show rows 1 + 3
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemLabels('row').click();
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownOptionTexts('1').click();
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownOptionTexts('3').click();
|
||||
|
||||
// blur the dropdown
|
||||
cy.get('body').click();
|
||||
|
@ -1,7 +1,7 @@
|
||||
import testDashboard from '../dashboards/TestDashboard.json';
|
||||
import { e2e } from '../utils';
|
||||
// Skipping due to race conditions with same old arch test e2e/dashboards-suite/dashboard-browse.spec.ts
|
||||
describe.skip('Dashboard browse', () => {
|
||||
|
||||
describe('Dashboard browse', () => {
|
||||
beforeEach(() => {
|
||||
e2e.flows.login(Cypress.env('USERNAME'), Cypress.env('PASSWORD'));
|
||||
});
|
@ -1,8 +1,7 @@
|
||||
import testDashboard from '../dashboards/DashboardLiveTest.json';
|
||||
import { e2e } from '../utils';
|
||||
|
||||
// Skipping due to flakiness/race conditions with same old arch test e2e/dashboards-suite/dashboard-live-streaming.spec.ts
|
||||
describe.skip('Dashboard Live streaming support', () => {
|
||||
describe('Dashboard Live streaming support', () => {
|
||||
beforeEach(() => {
|
||||
e2e.flows.login(Cypress.env('USERNAME'), Cypress.env('PASSWORD'));
|
||||
e2e.flows.importDashboard(testDashboard, 1000);
|
@ -1,6 +1,6 @@
|
||||
import { e2e } from '../utils';
|
||||
// Skipping due to race conditions with same old arch test e2e/dashboards-suite/dashboard-public-create.spec.ts
|
||||
describe.skip('Public dashboards', () => {
|
||||
|
||||
describe('Public dashboards', () => {
|
||||
beforeEach(() => {
|
||||
e2e.flows.login(Cypress.env('USERNAME'), Cypress.env('PASSWORD'));
|
||||
});
|
||||
@ -14,7 +14,7 @@ describe.skip('Public dashboards', () => {
|
||||
cy.wait('@query');
|
||||
|
||||
// Open sharing modal
|
||||
e2e.components.NavToolbar.shareDashboard().click();
|
||||
e2e.pages.Dashboard.DashNav.shareButton().click();
|
||||
|
||||
// Select public dashboards tab
|
||||
e2e.components.Tab.title('Public dashboard').click();
|
||||
@ -74,7 +74,7 @@ describe.skip('Public dashboards', () => {
|
||||
e2e.pages.Dashboard.DashNav.publicDashboardTag().should('exist');
|
||||
|
||||
// Open sharing modal
|
||||
e2e.components.NavToolbar.shareDashboard().click();
|
||||
e2e.pages.Dashboard.DashNav.shareButton().click();
|
||||
|
||||
// Select public dashboards tab
|
||||
cy.intercept('GET', '/api/dashboards/uid/ZqZnVvFZz/public-dashboards').as('query-public-dashboard');
|
||||
@ -114,7 +114,7 @@ describe.skip('Public dashboards', () => {
|
||||
cy.wait('@query');
|
||||
|
||||
// Open sharing modal
|
||||
e2e.components.NavToolbar.shareDashboard().click();
|
||||
e2e.pages.Dashboard.DashNav.shareButton().click();
|
||||
|
||||
// Select public dashboards tab
|
||||
cy.intercept('GET', '/api/dashboards/uid/ZqZnVvFZz/public-dashboards').as('query-public-dashboard');
|
@ -10,10 +10,10 @@ describe('Create a public dashboard with template variables shows a template var
|
||||
e2e.flows.openDashboard({ uid: 'HYaGDGIMk' });
|
||||
|
||||
// Open sharing modal
|
||||
e2e.components.NavToolbar.shareDashboard().click();
|
||||
e2e.pages.Dashboard.DashNav.shareButton().click();
|
||||
|
||||
// Select public dashboards tab
|
||||
e2e.components.Tab.title('Public Dashboard').click();
|
||||
e2e.components.Tab.title('Public dashboard').click();
|
||||
|
||||
// Warning Alert dashboard cannot be made public because it has template variables
|
||||
e2e.pages.ShareDashboardModal.PublicDashboard.TemplateVariablesWarningAlert().should('be.visible');
|
@ -34,7 +34,7 @@ describe('Dashboard templating', () => {
|
||||
`Server:sqlstring = 'A''A\\"A','BB\\\B','CCC'`,
|
||||
`Server:date = NaN`,
|
||||
`Server:text = All`,
|
||||
`Server:queryparam = var-Server=A%27A%22A&var-Server=BB%5CB&var-Server=CCC`,
|
||||
`Server:queryparam = var-Server=All`,
|
||||
`1 < 2`,
|
||||
`Example: from=now-6h&to=now`,
|
||||
];
|
@ -81,8 +81,7 @@ describe('Dashboard time zone support', () => {
|
||||
}
|
||||
});
|
||||
|
||||
// TODO: remove skip once https://github.com/grafana/grafana/issues/86420 is done
|
||||
it.skip('Tests relative timezone support and overrides', () => {
|
||||
it('Tests relative timezone support and overrides', () => {
|
||||
// Open dashboard
|
||||
e2e.flows.openDashboard({
|
||||
uid: 'd41dbaa2-a39e-4536-ab2b-caca52f1a9c8',
|
||||
@ -124,6 +123,7 @@ describe('Dashboard time zone support', () => {
|
||||
.within(() => {
|
||||
cy.contains('[role="row"]', '00:00:00').should('be.visible');
|
||||
});
|
||||
|
||||
// Test UTC timezone
|
||||
e2e.flows.setTimeRange({
|
||||
from: 'now-6h',
|
@ -22,9 +22,9 @@ describe('Dashboards', () => {
|
||||
// Then we open and close the panel editor
|
||||
e2e.components.Panels.Panel.menu('Panel #50').click({ force: true }); // it only shows on hover
|
||||
e2e.components.Panels.Panel.menuItems('Edit').click();
|
||||
e2e.components.NavToolbar.editDashboard.backToDashboardButton().click();
|
||||
e2e.components.PanelEditor.applyButton().click();
|
||||
|
||||
// The last panel should still be visible!
|
||||
// And the last panel should still be visible!
|
||||
e2e.components.Panels.Panel.title('Panel #50').should('be.visible');
|
||||
});
|
||||
});
|
@ -16,50 +16,40 @@ describe('Variables - Load options from Url', () => {
|
||||
|
||||
cy.wait('@query');
|
||||
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownValueLinkTexts('A')
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownValueLinkTexts('A').should('be.visible').click();
|
||||
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownDropDown()
|
||||
.should('be.visible')
|
||||
.within(() => {
|
||||
cy.get('input').click();
|
||||
e2e.components.Variables.variableOption().should('have.length', 9);
|
||||
});
|
||||
|
||||
e2e.components.Select.option().parent().should('have.length', 10);
|
||||
|
||||
e2e.components.Select.toggleAllOptions().should('have.text', 'Selected (1)');
|
||||
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownOptionTexts('All').should('be.visible');
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownOptionTexts('A').should('be.visible');
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownOptionTexts('B').should('be.visible');
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownOptionTexts('C').should('be.visible');
|
||||
|
||||
cy.get('body').click(0, 0);
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownValueLinkTexts('AA').should('be.visible').click();
|
||||
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownValueLinkTexts('AA')
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownDropDown()
|
||||
.should('be.visible')
|
||||
.within(() => {
|
||||
cy.get('input').click();
|
||||
e2e.components.Variables.variableOption().should('have.length', 9);
|
||||
});
|
||||
|
||||
e2e.components.Select.option().parent().should('have.length', 10);
|
||||
|
||||
e2e.components.Select.toggleAllOptions().should('have.text', 'Selected (1)');
|
||||
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownOptionTexts('All').should('be.visible');
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownOptionTexts('AA').should('be.visible');
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownOptionTexts('AB').should('be.visible');
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownOptionTexts('AC').should('be.visible');
|
||||
|
||||
cy.get('body').click(0, 0);
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownValueLinkTexts('All').should('be.visible').click();
|
||||
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownValueLinkTexts('$__all')
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownDropDown()
|
||||
.should('be.visible')
|
||||
.within(() => {
|
||||
cy.get('input').click();
|
||||
e2e.components.Variables.variableOption().should('have.length', 9);
|
||||
});
|
||||
|
||||
e2e.components.Select.option().parent().should('have.length', 10);
|
||||
|
||||
e2e.components.Select.toggleAllOptions().should('have.text', 'Selected (1)');
|
||||
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownOptionTexts('All').should('be.visible');
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownOptionTexts('AAA').should('be.visible');
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownOptionTexts('AAB').should('be.visible');
|
||||
@ -75,50 +65,40 @@ describe('Variables - Load options from Url', () => {
|
||||
|
||||
cy.wait('@query');
|
||||
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownValueLinkTexts('B')
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownValueLinkTexts('B').should('be.visible').click();
|
||||
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownDropDown()
|
||||
.should('be.visible')
|
||||
.within(() => {
|
||||
cy.get('input').click();
|
||||
e2e.components.Variables.variableOption().should('have.length', 9);
|
||||
});
|
||||
|
||||
e2e.components.Select.option().parent().should('have.length', 10);
|
||||
|
||||
e2e.components.Select.toggleAllOptions().should('have.text', 'Selected (1)');
|
||||
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownOptionTexts('All').should('be.visible');
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownOptionTexts('A').should('be.visible');
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownOptionTexts('B').should('be.visible');
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownOptionTexts('C').should('be.visible');
|
||||
|
||||
cy.get('body').click(0, 0);
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownValueLinkTexts('BB').should('be.visible').click();
|
||||
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownValueLinkTexts('BB')
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownDropDown()
|
||||
.should('be.visible')
|
||||
.within(() => {
|
||||
cy.get('input').click();
|
||||
e2e.components.Variables.variableOption().should('have.length', 9);
|
||||
});
|
||||
|
||||
e2e.components.Select.option().parent().should('have.length', 10);
|
||||
|
||||
e2e.components.Select.toggleAllOptions().should('have.text', 'Selected (1)');
|
||||
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownOptionTexts('All').should('be.visible');
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownOptionTexts('BA').should('be.visible');
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownOptionTexts('BB').should('be.visible');
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownOptionTexts('BC').should('be.visible');
|
||||
|
||||
cy.get('body').click(0, 0);
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownValueLinkTexts('BBB').should('be.visible').click();
|
||||
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownValueLinkTexts('BBB')
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownDropDown()
|
||||
.should('be.visible')
|
||||
.within(() => {
|
||||
cy.get('input').click();
|
||||
e2e.components.Variables.variableOption().should('have.length', 9);
|
||||
});
|
||||
|
||||
e2e.components.Select.option().parent().should('have.length', 10);
|
||||
|
||||
e2e.components.Select.toggleAllOptions().should('have.text', 'Selected (1)');
|
||||
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownOptionTexts('All').should('be.visible');
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownOptionTexts('BBA').should('be.visible');
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownOptionTexts('BBB').should('be.visible');
|
||||
@ -145,25 +125,24 @@ describe('Variables - Load options from Url', () => {
|
||||
|
||||
cy.wait('@query');
|
||||
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownValueLinkTexts('X')
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownValueLinkTexts('X').should('be.visible').click();
|
||||
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownDropDown()
|
||||
.should('be.visible')
|
||||
.within(() => {
|
||||
cy.get('input').click();
|
||||
e2e.components.Variables.variableOption().should('have.length', 9);
|
||||
});
|
||||
|
||||
e2e.components.Select.option().parent().should('have.length', 10);
|
||||
|
||||
e2e.components.Select.toggleAllOptions().should('have.text', 'Selected (1)');
|
||||
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownOptionTexts('All').should('be.visible');
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownOptionTexts('A').should('be.visible');
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownOptionTexts('B').should('be.visible');
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownOptionTexts('C').should('be.visible');
|
||||
|
||||
cy.get('body').click();
|
||||
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownValueLinkTexts('$__all')
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownValueLinkTexts('AA').should('be.visible').click();
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownDropDown()
|
||||
.should('be.visible')
|
||||
.should('have.length', 2);
|
||||
.within(() => {
|
||||
e2e.components.Variables.variableOption().should('have.length', 65);
|
||||
});
|
||||
});
|
||||
});
|
@ -9,7 +9,7 @@ describe('Variables - Constant', () => {
|
||||
});
|
||||
|
||||
it('can add a new constant variable', () => {
|
||||
e2e.flows.openDashboard({ uid: `${PAGE_UNDER_TEST}?orgId=1&editview=variables` });
|
||||
e2e.flows.openDashboard({ uid: `${PAGE_UNDER_TEST}?orgId=1&editview=templating` });
|
||||
cy.contains(DASHBOARD_NAME).should('be.visible');
|
||||
|
||||
// Create a new "Constant" variable
|
||||
@ -22,11 +22,11 @@ describe('Variables - Constant', () => {
|
||||
e2e.pages.Dashboard.Settings.Variables.Edit.ConstantVariable.constantOptionsQueryInputV2().type('pesto').blur();
|
||||
e2e.pages.Dashboard.Settings.Variables.Edit.General.generalLabelInputV2().type('Variable under test').blur();
|
||||
|
||||
// e2e.pages.Dashboard.Settings.Variables.Edit.General.previewOfValuesOption().eq(0).should('have.text', 'pesto');
|
||||
e2e.pages.Dashboard.Settings.Variables.Edit.General.previewOfValuesOption().eq(0).should('have.text', 'pesto');
|
||||
|
||||
// Navigate back to the homepage and change the selected variable value
|
||||
e2e.pages.Dashboard.Settings.Variables.Edit.General.applyButton().click();
|
||||
e2e.components.NavToolbar.editDashboard.backToDashboardButton().click();
|
||||
e2e.pages.Dashboard.Settings.Variables.Edit.General.submitButton().click();
|
||||
e2e.pages.Dashboard.Settings.Actions.close().click();
|
||||
e2e.components.RefreshPicker.runButtonV2().click();
|
||||
|
||||
// Assert it was rendered
|
@ -25,7 +25,7 @@ describe('Variables - Custom', () => {
|
||||
});
|
||||
|
||||
it('can add a custom template variable', () => {
|
||||
e2e.flows.openDashboard({ uid: `${PAGE_UNDER_TEST}?orgId=1&editview=variables` });
|
||||
e2e.flows.openDashboard({ uid: `${PAGE_UNDER_TEST}?orgId=1&editview=templating` });
|
||||
cy.contains(DASHBOARD_NAME).should('be.visible');
|
||||
|
||||
// Create a new "Custom" variable
|
||||
@ -34,16 +34,17 @@ describe('Variables - Custom', () => {
|
||||
assertPreviewValues(['one', 'two', 'three']);
|
||||
|
||||
// Navigate back to the homepage and change the selected variable value
|
||||
e2e.pages.Dashboard.Settings.Variables.Edit.General.applyButton().click();
|
||||
e2e.components.NavToolbar.editDashboard.backToDashboardButton().click();
|
||||
e2e.pages.Dashboard.Settings.Variables.Edit.General.submitButton().click();
|
||||
e2e.pages.Dashboard.Settings.Actions.close().click();
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownValueLinkTexts('one').click();
|
||||
e2e.components.Select.option().contains('two').click();
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownOptionTexts('two').click();
|
||||
|
||||
// Assert it was rendered
|
||||
cy.get('.markdown-html').should('include.text', 'VariableUnderTest: two');
|
||||
});
|
||||
|
||||
it('can add a custom template variable with labels', () => {
|
||||
e2e.flows.openDashboard({ uid: `${PAGE_UNDER_TEST}?orgId=1&editview=variables` });
|
||||
e2e.flows.openDashboard({ uid: `${PAGE_UNDER_TEST}?orgId=1&editview=templating` });
|
||||
cy.contains(DASHBOARD_NAME).should('be.visible');
|
||||
|
||||
// Create a new "Custom" variable
|
||||
@ -57,10 +58,10 @@ describe('Variables - Custom', () => {
|
||||
assertPreviewValues(['One', 'Two', 'Three']);
|
||||
|
||||
// Navigate back to the homepage and change the selected variable value
|
||||
e2e.pages.Dashboard.Settings.Variables.Edit.General.applyButton().click();
|
||||
e2e.components.NavToolbar.editDashboard.backToDashboardButton().click();
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownValueLinkTexts('1').click();
|
||||
e2e.components.Select.option().contains('Two').click();
|
||||
e2e.pages.Dashboard.Settings.Variables.Edit.General.submitButton().click();
|
||||
e2e.pages.Dashboard.Settings.Actions.close().click();
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownValueLinkTexts('One').click();
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownOptionTexts('Two').click();
|
||||
|
||||
// Assert it was rendered
|
||||
cy.get('.markdown-html').should('include.text', 'VariableUnderTest: 2');
|
@ -3,14 +3,16 @@ import { e2e } from '../utils';
|
||||
const PAGE_UNDER_TEST = 'kVi2Gex7z/test-variable-output';
|
||||
const DASHBOARD_NAME = 'Test variable output';
|
||||
|
||||
// Skipping due to flakiness/race conditions with same old arch test e2e/dashboards-suite/new-datasource-variable.spec.ts
|
||||
describe.skip('Variables - Datasource', () => {
|
||||
const gdev_mysql = 'gdev-mysql';
|
||||
const gdev_mysql_ds_tests = 'gdev-mysql-ds-tests';
|
||||
|
||||
describe('Variables - Datasource', () => {
|
||||
beforeEach(() => {
|
||||
e2e.flows.login(Cypress.env('USERNAME'), Cypress.env('PASSWORD'));
|
||||
});
|
||||
|
||||
it('can add a new datasource variable', () => {
|
||||
e2e.flows.openDashboard({ uid: `${PAGE_UNDER_TEST}?orgId=1&editview=variables` });
|
||||
e2e.flows.openDashboard({ uid: `${PAGE_UNDER_TEST}?orgId=1&editview=templating` });
|
||||
cy.contains(DASHBOARD_NAME).should('be.visible');
|
||||
|
||||
// Create a new "Datasource" variable
|
||||
@ -21,30 +23,26 @@ describe.skip('Variables - Datasource', () => {
|
||||
e2e.pages.Dashboard.Settings.Variables.Edit.General.generalNameInputV2().clear().type('VariableUnderTest').blur();
|
||||
e2e.pages.Dashboard.Settings.Variables.Edit.General.generalLabelInputV2().type('Variable under test').blur();
|
||||
|
||||
// If this is failing, but sure to check there are Prometheus datasources named "gdev-prometheus" and "gdev-slow-prometheus"
|
||||
// If this is failing, but sure to check there are MySQL datasources named "gdev-mysql" and "gdev-mysql-ds-tests"
|
||||
// Or, just update is to match some gdev datasources to test with :)
|
||||
e2e.pages.Dashboard.Settings.Variables.Edit.DatasourceVariable.datasourceSelect().within(() => {
|
||||
cy.get('input').type('Prometheus{enter}');
|
||||
cy.get('input').type('MySQL{enter}');
|
||||
});
|
||||
e2e.pages.Dashboard.Settings.Variables.Edit.General.previewOfValuesOption().should('contain.text', gdev_mysql);
|
||||
e2e.pages.Dashboard.Settings.Variables.Edit.General.previewOfValuesOption().should(
|
||||
'contain.text',
|
||||
'gdev-prometheus'
|
||||
);
|
||||
e2e.pages.Dashboard.Settings.Variables.Edit.General.previewOfValuesOption().should(
|
||||
'contain.text',
|
||||
'gdev-slow-prometheus'
|
||||
gdev_mysql_ds_tests
|
||||
);
|
||||
|
||||
// Navigate back to the homepage and change the selected variable value
|
||||
e2e.pages.Dashboard.Settings.Variables.Edit.General.applyButton().click();
|
||||
e2e.components.NavToolbar.editDashboard.backToDashboardButton().click();
|
||||
e2e.pages.Dashboard.Settings.Variables.Edit.General.submitButton().click();
|
||||
e2e.pages.Dashboard.Settings.Actions.close().click();
|
||||
e2e.components.RefreshPicker.runButtonV2().click();
|
||||
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownValueLinkTexts('gdev-prometheus').click();
|
||||
e2e.components.Select.option().contains('gdev-slow-prometheus').click();
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownValueLinkTexts(gdev_mysql).click();
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownOptionTexts(gdev_mysql_ds_tests).click();
|
||||
|
||||
// Assert it was rendered
|
||||
cy.get('.markdown-html').should('include.text', 'VariableUnderTest: gdev-slow-prometheus-uid');
|
||||
cy.get('.markdown-html').should('include.text', 'VariableUnderTestText: gdev-slow-prometheus');
|
||||
cy.get('.markdown-html').should('include.text', `VariableUnderTestText: ${gdev_mysql_ds_tests}`);
|
||||
});
|
||||
});
|
@ -16,7 +16,7 @@ describe('Variables - Interval', () => {
|
||||
});
|
||||
|
||||
it('can add a new interval variable', () => {
|
||||
e2e.flows.openDashboard({ uid: `${PAGE_UNDER_TEST}?orgId=1&editview=variables` });
|
||||
e2e.flows.openDashboard({ uid: `${PAGE_UNDER_TEST}?orgId=1&editview=templating` });
|
||||
cy.contains(DASHBOARD_NAME).should('be.visible');
|
||||
|
||||
// Create a new "Interval" variable
|
||||
@ -35,13 +35,12 @@ describe('Variables - Interval', () => {
|
||||
assertPreviewValues(['10s', '10m', '60m', '90m', '1h30m']);
|
||||
|
||||
// Navigate back to the homepage and change the selected variable value
|
||||
e2e.pages.Dashboard.Settings.Variables.Edit.General.applyButton().click();
|
||||
e2e.components.NavToolbar.editDashboard.backToDashboardButton().click();
|
||||
|
||||
e2e.pages.Dashboard.Settings.Variables.Edit.General.submitButton().click();
|
||||
e2e.pages.Dashboard.Settings.Actions.close().click();
|
||||
e2e.components.RefreshPicker.runButtonV2().click();
|
||||
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemLabels('Variable under test').next().should('have.text', `10s`).click();
|
||||
e2e.components.Select.option().contains('1h30m').click();
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownValueLinkTexts('10s').click();
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownOptionTexts('1h30m').click();
|
||||
|
||||
// Assert it was rendered
|
||||
cy.get('.markdown-html').should('include.text', 'VariableUnderTest: 1h30m');
|
@ -1,5 +1,3 @@
|
||||
import { selectors } from '@grafana/e2e-selectors';
|
||||
|
||||
import { e2e } from '../utils';
|
||||
|
||||
const PAGE_UNDER_TEST = '-Y-tnEDWk/templating-nested-template-variables';
|
||||
@ -11,12 +9,10 @@ describe('Variables - Query - Add variable', () => {
|
||||
});
|
||||
|
||||
it('query variable should be default and default fields should be correct', () => {
|
||||
e2e.flows.openDashboard({ uid: `${PAGE_UNDER_TEST}?orgId=1&editview=variables` });
|
||||
e2e.flows.openDashboard({ uid: `${PAGE_UNDER_TEST}?orgId=1&editview=templating` });
|
||||
cy.contains(DASHBOARD_NAME).should('be.visible');
|
||||
|
||||
cy.get(`[data-testid="${selectors.pages.Dashboard.Settings.Variables.List.newButton}"]`)
|
||||
.should('be.visible')
|
||||
.click();
|
||||
e2e.pages.Dashboard.Settings.Variables.List.newButton().should('be.visible').click();
|
||||
|
||||
e2e.pages.Dashboard.Settings.Variables.Edit.General.generalNameInputV2()
|
||||
.should('be.visible')
|
||||
@ -72,17 +68,15 @@ describe('Variables - Query - Add variable', () => {
|
||||
cy.get('input[type="checkbox"]').should('not.be.checked');
|
||||
});
|
||||
|
||||
e2e.pages.Dashboard.Settings.Variables.Edit.General.previewOfValuesOption().should('not.have.text');
|
||||
e2e.pages.Dashboard.Settings.Variables.Edit.General.previewOfValuesOption().should('not.exist');
|
||||
e2e.pages.Dashboard.Settings.Variables.Edit.General.selectionOptionsCustomAllInput().should('not.exist');
|
||||
});
|
||||
|
||||
it('adding a single value query variable', () => {
|
||||
e2e.flows.openDashboard({ uid: `${PAGE_UNDER_TEST}?orgId=1&editview=variables` });
|
||||
e2e.flows.openDashboard({ uid: `${PAGE_UNDER_TEST}?orgId=1&editview=templating` });
|
||||
cy.contains(DASHBOARD_NAME).should('be.visible');
|
||||
|
||||
cy.get(`[data-testid="${selectors.pages.Dashboard.Settings.Variables.List.newButton}"]`)
|
||||
.should('be.visible')
|
||||
.click();
|
||||
e2e.pages.Dashboard.Settings.Variables.List.newButton().should('be.visible').click();
|
||||
|
||||
e2e.pages.Dashboard.Settings.Variables.Edit.General.generalLabelInputV2()
|
||||
.should('be.visible')
|
||||
@ -107,27 +101,29 @@ describe('Variables - Query - Add variable', () => {
|
||||
|
||||
e2e.pages.Dashboard.Settings.Variables.Edit.General.submitButton().scrollIntoView().should('be.visible').click();
|
||||
|
||||
e2e.components.NavToolbar.editDashboard.backToDashboardButton().click();
|
||||
e2e.pages.Dashboard.Settings.Actions.close().click();
|
||||
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemLabels('a label').should('be.visible');
|
||||
e2e.pages.Dashboard.SubMenu.submenuItem()
|
||||
.should('have.length', 4)
|
||||
.eq(3)
|
||||
.within(() => {
|
||||
cy.get('input').click();
|
||||
e2e.components.Variables.variableLinkWrapper().should('be.visible').click();
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownDropDown()
|
||||
.should('be.visible')
|
||||
.within(() => {
|
||||
e2e.components.Variables.variableOption().should('have.length', 1);
|
||||
});
|
||||
|
||||
e2e.components.Select.option().should('have.length', 1);
|
||||
e2e.components.Select.option().contains('C');
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownOptionTexts('C').should('be.visible');
|
||||
});
|
||||
});
|
||||
|
||||
it('adding a multi value query variable', () => {
|
||||
e2e.flows.openDashboard({ uid: `${PAGE_UNDER_TEST}?orgId=1&editview=variables` });
|
||||
e2e.flows.openDashboard({ uid: `${PAGE_UNDER_TEST}?orgId=1&editview=templating` });
|
||||
cy.contains(DASHBOARD_NAME).should('be.visible');
|
||||
|
||||
cy.get(`[data-testid="${selectors.pages.Dashboard.Settings.Variables.List.newButton}"]`)
|
||||
.should('be.visible')
|
||||
.click();
|
||||
e2e.pages.Dashboard.Settings.Variables.List.newButton().should('be.visible').click();
|
||||
|
||||
e2e.pages.Dashboard.Settings.Variables.Edit.General.generalLabelInputV2()
|
||||
.should('be.visible')
|
||||
@ -165,21 +161,22 @@ describe('Variables - Query - Add variable', () => {
|
||||
|
||||
e2e.pages.Dashboard.Settings.Variables.Edit.General.submitButton().scrollIntoView().should('be.visible').click();
|
||||
|
||||
e2e.components.NavToolbar.editDashboard.backToDashboardButton().click();
|
||||
e2e.pages.Dashboard.Settings.Actions.close().click();
|
||||
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemLabels('a label').should('be.visible');
|
||||
e2e.pages.Dashboard.SubMenu.submenuItem()
|
||||
.should('have.length', 4)
|
||||
.eq(3)
|
||||
.within(() => {
|
||||
cy.get('input').click();
|
||||
e2e.components.Variables.variableLinkWrapper().should('be.visible').click();
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownDropDown()
|
||||
.should('be.visible')
|
||||
.within(() => {
|
||||
e2e.components.Variables.variableOption().should('have.length', 2);
|
||||
});
|
||||
|
||||
e2e.components.Select.option().should('have.length', 3);
|
||||
|
||||
e2e.components.Select.toggleAllOptions().should('have.text', 'Selected (1)');
|
||||
|
||||
e2e.components.Select.option().contains('All');
|
||||
e2e.components.Select.option().contains('C');
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownOptionTexts('All').should('be.visible');
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownOptionTexts('C').should('be.visible');
|
||||
});
|
||||
});
|
||||
});
|
@ -9,7 +9,7 @@ describe('Variables - Text box', () => {
|
||||
});
|
||||
|
||||
it('can add a new text box variable', () => {
|
||||
e2e.flows.openDashboard({ uid: `${PAGE_UNDER_TEST}?orgId=1&editview=variables` });
|
||||
e2e.flows.openDashboard({ uid: `${PAGE_UNDER_TEST}?orgId=1&editview=templating` });
|
||||
cy.contains(DASHBOARD_NAME).should('be.visible');
|
||||
|
||||
// Create a new "text box" variable
|
||||
@ -22,12 +22,13 @@ describe('Variables - Text box', () => {
|
||||
e2e.pages.Dashboard.Settings.Variables.Edit.General.generalLabelInputV2().type('Variable under test').blur();
|
||||
e2e.pages.Dashboard.Settings.Variables.Edit.TextBoxVariable.textBoxOptionsQueryInputV2().type('cat-dog').blur();
|
||||
|
||||
e2e.pages.Dashboard.Settings.Variables.Edit.General.previewOfValuesOption().eq(0).should('have.text', 'cat-dog');
|
||||
|
||||
// Navigate back to the homepage and change the selected variable value
|
||||
e2e.pages.Dashboard.Settings.Variables.Edit.General.applyButton().click();
|
||||
e2e.components.NavToolbar.editDashboard.backToDashboardButton().click();
|
||||
e2e.pages.Dashboard.SubMenu.submenuItem().within(() => {
|
||||
cy.get('input').clear().type('dog-cat').blur();
|
||||
});
|
||||
e2e.pages.Dashboard.Settings.Variables.Edit.General.submitButton().click();
|
||||
e2e.pages.Dashboard.Settings.Actions.close().click();
|
||||
cy.get('#var-VariableUnderTest').clear().type('dog-cat').blur();
|
||||
|
||||
// Assert it was rendered
|
||||
cy.get('.markdown-html').should('include.text', 'VariableUnderTest: dog-cat');
|
||||
});
|
@ -1,5 +1,3 @@
|
||||
import { selectors } from '@grafana/e2e-selectors';
|
||||
|
||||
import { e2e } from '../utils';
|
||||
|
||||
const PAGE_UNDER_TEST = '-Y-tnEDWk/templating-nested-template-variables';
|
||||
@ -12,46 +10,39 @@ describe('Variables - Set options from ui', () => {
|
||||
it('clicking a value that is not part of dependents options should change these to All', () => {
|
||||
e2e.flows.openDashboard({ uid: `${PAGE_UNDER_TEST}?orgId=1&var-datacenter=A&var-server=AA&var-pod=AAA` });
|
||||
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownValueLinkTexts('A')
|
||||
.should('be.visible')
|
||||
.within(() => {
|
||||
cy.get('input').click();
|
||||
});
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownValueLinkTexts('A').should('be.visible').click();
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownOptionTexts('A').should('be.visible').click();
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownOptionTexts('B').should('be.visible').click();
|
||||
|
||||
cy.get('body').click();
|
||||
e2e.components.NavToolbar.container().click();
|
||||
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownValueLinkTexts('B').scrollIntoView().should('be.visible');
|
||||
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownValueLinkTexts('$__all')
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownValueLinkTexts('All')
|
||||
.should('have.length', 2)
|
||||
.eq(0)
|
||||
.should('be.visible')
|
||||
.click();
|
||||
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownDropDown()
|
||||
.should('be.visible')
|
||||
.within(() => {
|
||||
cy.get('input').click();
|
||||
e2e.components.Variables.variableOption().should('have.length', 9);
|
||||
});
|
||||
|
||||
e2e.components.Select.option().parent().should('have.length', 10);
|
||||
|
||||
e2e.components.Select.toggleAllOptions().should('have.text', 'Selected (1)');
|
||||
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownOptionTexts('All').should('be.visible');
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownOptionTexts('BA').should('be.visible');
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownOptionTexts('BB').should('be.visible');
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownOptionTexts('BC').should('be.visible');
|
||||
|
||||
cy.get('body').click();
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownValueLinkTexts('All').should('be.visible').click();
|
||||
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemLabels('pod')
|
||||
.parent()
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownDropDown()
|
||||
.should('be.visible')
|
||||
.within(() => {
|
||||
cy.get('input').click();
|
||||
e2e.components.Variables.variableOption().should('have.length', 65);
|
||||
});
|
||||
|
||||
// length is 11 because of virtualized select options
|
||||
e2e.components.Select.option().parent().should('have.length', 11);
|
||||
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownOptionTexts('All').should('be.visible');
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownOptionTexts('BAA').should('be.visible');
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownOptionTexts('BAB').should('be.visible');
|
||||
@ -69,47 +60,41 @@ describe('Variables - Set options from ui', () => {
|
||||
|
||||
cy.wait('@query');
|
||||
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownValueLinkTexts('A')
|
||||
.should('be.visible')
|
||||
.within(() => {
|
||||
cy.get('input').click();
|
||||
});
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownValueLinkTexts('A').should('be.visible').click();
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownOptionTexts('B').should('be.visible').click();
|
||||
|
||||
e2e.components.Select.toggleAllOptions().should('have.text', 'Selected (2)');
|
||||
|
||||
cy.get('body').click();
|
||||
e2e.components.NavToolbar.container().click();
|
||||
|
||||
cy.wait('@query');
|
||||
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownValueLinkTexts('A,B').scrollIntoView().should('be.visible');
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownValueLinkTexts('A + B').scrollIntoView().should('be.visible');
|
||||
|
||||
cy.get(`[aria-label="${selectors.components.LoadingIndicator.icon}"]`).should('not.exist');
|
||||
e2e.components.LoadingIndicator.icon().should('have.length', 0);
|
||||
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownValueLinkTexts('AA')
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownValueLinkTexts('AA').should('be.visible').click();
|
||||
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownDropDown()
|
||||
.should('be.visible')
|
||||
.within(() => {
|
||||
cy.get('input').click();
|
||||
e2e.components.Variables.variableOption().should('have.length', 17);
|
||||
});
|
||||
|
||||
e2e.components.Select.option().should('have.length', 11);
|
||||
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownOptionTexts('All').should('be.visible');
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownOptionTexts('AA').should('be.visible');
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownOptionTexts('AB').should('be.visible');
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownOptionTexts('AC').should('be.visible');
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownOptionTexts('AD').should('be.visible');
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownOptionTexts('BA').should('be.visible');
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownOptionTexts('BB').should('be.visible');
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownOptionTexts('BC').should('be.visible');
|
||||
|
||||
cy.get('body').click();
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownValueLinkTexts('AAA').should('be.visible').click();
|
||||
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownValueLinkTexts('AAA')
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownDropDown()
|
||||
.should('be.visible')
|
||||
.within(() => {
|
||||
cy.get('input').click();
|
||||
e2e.components.Variables.variableOption().should('have.length', 9);
|
||||
});
|
||||
|
||||
e2e.components.Select.option().should('have.length', 10);
|
||||
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownOptionTexts('All').should('be.visible');
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownOptionTexts('AAA').should('be.visible');
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownOptionTexts('AAB').should('be.visible');
|
||||
@ -123,46 +108,38 @@ describe('Variables - Set options from ui', () => {
|
||||
cy.intercept({ pathname: '/api/ds/query' }).as('query');
|
||||
|
||||
cy.wait('@query');
|
||||
cy.get(`[aria-label="${selectors.components.LoadingIndicator.icon}"]`).should('not.exist');
|
||||
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownValueLinkTexts('A,B')
|
||||
.should('be.visible')
|
||||
.within(() => {
|
||||
cy.get('input').click();
|
||||
});
|
||||
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownValueLinkTexts('A + B').should('be.visible').click();
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownOptionTexts('A').should('be.visible').click();
|
||||
|
||||
cy.get('body').click();
|
||||
e2e.components.NavToolbar.container().click();
|
||||
|
||||
cy.wait('@query');
|
||||
cy.get(`[aria-label="${selectors.components.LoadingIndicator.icon}"]`).should('not.exist');
|
||||
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownValueLinkTexts('B').should('be.visible');
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownValueLinkTexts('B').scrollIntoView().should('be.visible');
|
||||
|
||||
cy.get(`[aria-label="${selectors.components.LoadingIndicator.icon}"]`).should('not.exist');
|
||||
e2e.components.LoadingIndicator.icon().should('have.length', 0);
|
||||
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownValueLinkTexts('BB')
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownValueLinkTexts('BB').should('be.visible').click();
|
||||
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownDropDown()
|
||||
.should('be.visible')
|
||||
.within(() => {
|
||||
cy.get('input').click();
|
||||
e2e.components.Variables.variableOption().should('have.length', 9);
|
||||
});
|
||||
|
||||
e2e.components.Select.option().should('have.length', 10);
|
||||
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownOptionTexts('All').should('be.visible');
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownOptionTexts('BA').should('be.visible');
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownOptionTexts('BB').should('be.visible');
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownOptionTexts('BC').should('be.visible');
|
||||
|
||||
cy.get('body').click(0, 0);
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownValueLinkTexts('BBB').should('be.visible').click();
|
||||
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownValueLinkTexts('BBB')
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownDropDown()
|
||||
.should('be.visible')
|
||||
.within(() => {
|
||||
cy.get('input').click();
|
||||
e2e.components.Variables.variableOption().should('have.length', 9);
|
||||
});
|
||||
e2e.components.Select.option().should('have.length', 10);
|
||||
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownOptionTexts('BBA').should('be.visible');
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownOptionTexts('BBB').should('be.visible');
|
@ -27,27 +27,21 @@ describe('Templating', () => {
|
||||
expect(links).to.have.length.greaterThan(13);
|
||||
|
||||
for (let index = 0; index < links.length; index++) {
|
||||
expect(Cypress.$(links[index]).attr('href')).contains(variableValue);
|
||||
expect(Cypress.$(links[index]).attr('href')).contains(`var-custom=${variableValue}`);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
e2e.components.DashboardLinks.dropDown().should('be.visible').click().wait('@tagsTemplatingSearch');
|
||||
|
||||
verifyLinks('var-custom=p1&var-custom=p2&var-custom=p3');
|
||||
// verify all links, should have All value
|
||||
verifyLinks('All');
|
||||
|
||||
cy.get('body').click();
|
||||
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownValueLinkTexts('$__all')
|
||||
.should('be.visible')
|
||||
.within(() => {
|
||||
cy.get('input').click();
|
||||
});
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownValueLinkTexts('All').should('be.visible').click();
|
||||
|
||||
e2e.pages.Dashboard.SubMenu.submenuItemValueDropDownOptionTexts('p2').should('be.visible').click();
|
||||
|
||||
cy.get('body').click();
|
||||
|
||||
e2e.components.NavToolbar.container().click();
|
||||
e2e.components.DashboardLinks.dropDown()
|
||||
.scrollIntoView()
|
||||
.should('be.visible')
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user