diff --git a/.betterer.results b/.betterer.results index 3b87f1e2d7781..051b248f9299d 100644 --- a/.betterer.results +++ b/.betterer.results @@ -689,6 +689,11 @@ exports[`better eslint`] = { [0, 0, 0, "Styles should be written using objects.", "2"], [0, 0, 0, "Styles should be written using objects.", "3"] ], + "packages/grafana-plugin-configs/webpack.config.ts:5381": [ + [0, 0, 0, "Unexpected any. Specify a different type.", "0"], + [0, 0, 0, "Unexpected any. Specify a different type.", "1"], + [0, 0, 0, "Unexpected any. Specify a different type.", "2"] + ], "packages/grafana-runtime/src/analytics/types.ts:5381": [ [0, 0, 0, "Unexpected any. Specify a different type.", "0"] ], @@ -1756,11 +1761,6 @@ exports[`better eslint`] = { "public/app/features/admin/UserSessions.tsx:5381": [ [0, 0, 0, "Styles should be written using objects.", "0"] ], - "public/app/features/admin/Users/OrgUnits.tsx:5381": [ - [0, 0, 0, "Styles should be written using objects.", "0"], - [0, 0, 0, "Styles should be written using objects.", "1"], - [0, 0, 0, "Styles should be written using objects.", "2"] - ], "public/app/features/alerting/AlertTab.tsx:5381": [ [0, 0, 0, "Do not use any type assertions.", "0"], [0, 0, 0, "Unexpected any. Specify a different type.", "1"], @@ -2999,6 +2999,9 @@ exports[`better eslint`] = { "public/app/features/dashboard-scene/inspect/InspectJsonTab.tsx:5381": [ [0, 0, 0, "Use data-testid for E2E selectors instead of aria-label", "0"] ], + "public/app/features/dashboard-scene/scene/setDashboardPanelContext.test.ts:5381": [ + [0, 0, 0, "Unexpected any. Specify a different type.", "0"] + ], "public/app/features/dashboard-scene/serialization/angularMigration.test.ts:5381": [ [0, 0, 0, "Unexpected any. Specify a different type.", "0"], [0, 0, 0, "Unexpected any. Specify a different type.", "1"] @@ -3109,14 +3112,13 @@ exports[`better eslint`] = { ], "public/app/features/dashboard/components/DashboardPrompt/DashboardPrompt.tsx:5381": [ [0, 0, 0, "Do not use any type assertions.", "0"], - [0, 0, 0, "Unexpected any. Specify a different type.", "1"], + [0, 0, 0, "Do not use any type assertions.", "1"], [0, 0, 0, "Do not use any type assertions.", "2"], [0, 0, 0, "Do not use any type assertions.", "3"], [0, 0, 0, "Do not use any type assertions.", "4"], - [0, 0, 0, "Do not use any type assertions.", "5"], - [0, 0, 0, "Unexpected any. Specify a different type.", "6"], - [0, 0, 0, "Do not use any type assertions.", "7"], - [0, 0, 0, "Unexpected any. Specify a different type.", "8"] + [0, 0, 0, "Unexpected any. Specify a different type.", "5"], + [0, 0, 0, "Do not use any type assertions.", "6"], + [0, 0, 0, "Unexpected any. Specify a different type.", "7"] ], "public/app/features/dashboard/components/DashboardRow/DashboardRow.test.tsx:5381": [ [0, 0, 0, "Unexpected any. Specify a different type.", "0"] @@ -3249,11 +3251,6 @@ exports[`better eslint`] = { [0, 0, 0, "Do not use any type assertions.", "4"], [0, 0, 0, "Unexpected any. Specify a different type.", "5"] ], - "public/app/features/dashboard/components/PublicDashboardFooter/PublicDashboardsFooter.tsx:5381": [ - [0, 0, 0, "Styles should be written using objects.", "0"], - [0, 0, 0, "Styles should be written using objects.", "1"], - [0, 0, 0, "Styles should be written using objects.", "2"] - ], "public/app/features/dashboard/components/PublicDashboardNotAvailable/PublicDashboardNotAvailable.tsx:5381": [ [0, 0, 0, "Styles should be written using objects.", "0"], [0, 0, 0, "Styles should be written using objects.", "1"], @@ -3364,23 +3361,7 @@ exports[`better eslint`] = { [0, 0, 0, "Do not use any type assertions.", "2"], [0, 0, 0, "Unexpected any. Specify a different type.", "3"], [0, 0, 0, "Styles should be written using objects.", "4"], - [0, 0, 0, "Styles should be written using objects.", "5"], - [0, 0, 0, "Styles should be written using objects.", "6"], - [0, 0, 0, "Styles should be written using objects.", "7"], - [0, 0, 0, "Styles should be written using objects.", "8"], - [0, 0, 0, "Styles should be written using objects.", "9"], - [0, 0, 0, "Styles should be written using objects.", "10"], - [0, 0, 0, "Styles should be written using objects.", "11"], - [0, 0, 0, "Styles should be written using objects.", "12"], - [0, 0, 0, "Styles should be written using objects.", "13"], - [0, 0, 0, "Styles should be written using objects.", "14"], - [0, 0, 0, "Styles should be written using objects.", "15"], - [0, 0, 0, "Styles should be written using objects.", "16"], - [0, 0, 0, "Styles should be written using objects.", "17"], - [0, 0, 0, "Styles should be written using objects.", "18"], - [0, 0, 0, "Styles should be written using objects.", "19"], - [0, 0, 0, "Styles should be written using objects.", "20"], - [0, 0, 0, "Unexpected any. Specify a different type.", "21"] + [0, 0, 0, "Unexpected any. Specify a different type.", "5"] ], "public/app/features/dashboard/components/VersionHistory/DiffGroup.tsx:5381": [ [0, 0, 0, "Styles should be written using objects.", "0"], @@ -3547,13 +3528,8 @@ exports[`better eslint`] = { [0, 0, 0, "Unexpected any. Specify a different type.", "23"], [0, 0, 0, "Unexpected any. Specify a different type.", "24"], [0, 0, 0, "Unexpected any. Specify a different type.", "25"], - [0, 0, 0, "Unexpected any. Specify a different type.", "26"], - [0, 0, 0, "Do not use any type assertions.", "27"], - [0, 0, 0, "Unexpected any. Specify a different type.", "28"], - [0, 0, 0, "Unexpected any. Specify a different type.", "29"], - [0, 0, 0, "Unexpected any. Specify a different type.", "30"], - [0, 0, 0, "Unexpected any. Specify a different type.", "31"], - [0, 0, 0, "Unexpected any. Specify a different type.", "32"] + [0, 0, 0, "Do not use any type assertions.", "26"], + [0, 0, 0, "Unexpected any. Specify a different type.", "27"] ], "public/app/features/dashboard/state/PanelModel.test.ts:5381": [ [0, 0, 0, "Unexpected any. Specify a different type.", "0"], @@ -3794,10 +3770,8 @@ exports[`better eslint`] = { [0, 0, 0, "Do not use any type assertions.", "0"], [0, 0, 0, "Unexpected any. Specify a different type.", "1"] ], - "public/app/features/explore/Explore.tsx:5381": [ - [0, 0, 0, "Styles should be written using objects.", "0"], - [0, 0, 0, "Styles should be written using objects.", "1"], - [0, 0, 0, "Styles should be written using objects.", "2"] + "public/app/features/explore/ContentOutline/ContentOutline.tsx:5381": [ + [0, 0, 0, "Do not use any type assertions.", "0"] ], "public/app/features/explore/ExploreDrawer.tsx:5381": [ [0, 0, 0, "Styles should be written using objects.", "0"], @@ -5213,9 +5187,6 @@ exports[`better eslint`] = { [0, 0, 0, "Unexpected any. Specify a different type.", "14"], [0, 0, 0, "Do not use any type assertions.", "15"] ], - "public/app/features/transformers/FilterByValueTransformer/FilterByValueTransformerEditor.tsx:5381": [ - [0, 0, 0, "Styles should be written using objects.", "0"] - ], "public/app/features/transformers/FilterByValueTransformer/ValueMatchers/BasicMatcherEditor.tsx:5381": [ [0, 0, 0, "Unexpected any. Specify a different type.", "0"] ], @@ -6706,7 +6677,7 @@ exports[`better eslint`] = { [0, 0, 0, "Unexpected any. Specify a different type.", "10"], [0, 0, 0, "Unexpected any. Specify a different type.", "11"] ], - "public/app/plugins/datasource/prometheus/datasource.tsx:5381": [ + "public/app/plugins/datasource/prometheus/datasource.ts:5381": [ [0, 0, 0, "Unexpected any. Specify a different type.", "0"], [0, 0, 0, "Unexpected any. Specify a different type.", "1"], [0, 0, 0, "Unexpected any. Specify a different type.", "2"], @@ -7274,39 +7245,10 @@ exports[`better eslint`] = { "public/app/plugins/panel/gauge/GaugeMigrations.ts:5381": [ [0, 0, 0, "Unexpected any. Specify a different type.", "0"] ], - "public/app/plugins/panel/geomap/GeomapOverlay.tsx:5381": [ - [0, 0, 0, "Styles should be written using objects.", "0"], - [0, 0, 0, "Styles should be written using objects.", "1"], - [0, 0, 0, "Styles should be written using objects.", "2"], - [0, 0, 0, "Styles should be written using objects.", "3"] - ], - "public/app/plugins/panel/geomap/GeomapPanel.tsx:5381": [ - [0, 0, 0, "Styles should be written using objects.", "0"], - [0, 0, 0, "Styles should be written using objects.", "1"] - ], - "public/app/plugins/panel/geomap/components/DebugOverlay.tsx:5381": [ - [0, 0, 0, "Styles should be written using objects.", "0"] - ], "public/app/plugins/panel/geomap/components/MarkersLegend.tsx:5381": [ [0, 0, 0, "Do not use any type assertions.", "0"], [0, 0, 0, "Do not use any type assertions.", "1"], - [0, 0, 0, "Unexpected any. Specify a different type.", "2"], - [0, 0, 0, "Styles should be written using objects.", "3"], - [0, 0, 0, "Styles should be written using objects.", "4"], - [0, 0, 0, "Styles should be written using objects.", "5"], - [0, 0, 0, "Styles should be written using objects.", "6"], - [0, 0, 0, "Styles should be written using objects.", "7"], - [0, 0, 0, "Styles should be written using objects.", "8"], - [0, 0, 0, "Styles should be written using objects.", "9"], - [0, 0, 0, "Styles should be written using objects.", "10"] - ], - "public/app/plugins/panel/geomap/components/MeasureOverlay.tsx:5381": [ - [0, 0, 0, "Styles should be written using objects.", "0"], - [0, 0, 0, "Styles should be written using objects.", "1"], - [0, 0, 0, "Styles should be written using objects.", "2"], - [0, 0, 0, "Styles should be written using objects.", "3"], - [0, 0, 0, "Styles should be written using objects.", "4"], - [0, 0, 0, "Styles should be written using objects.", "5"] + [0, 0, 0, "Unexpected any. Specify a different type.", "2"] ], "public/app/plugins/panel/geomap/editor/GeomapStyleRulesEditor.tsx:5381": [ [0, 0, 0, "Unexpected any. Specify a different type.", "0"], @@ -7328,15 +7270,7 @@ exports[`better eslint`] = { ], "public/app/plugins/panel/geomap/editor/StyleRuleEditor.tsx:5381": [ [0, 0, 0, "Unexpected any. Specify a different type.", "0"], - [0, 0, 0, "Do not use any type assertions.", "1"], - [0, 0, 0, "Styles should be written using objects.", "2"], - [0, 0, 0, "Styles should be written using objects.", "3"], - [0, 0, 0, "Styles should be written using objects.", "4"], - [0, 0, 0, "Styles should be written using objects.", "5"], - [0, 0, 0, "Styles should be written using objects.", "6"] - ], - "public/app/plugins/panel/geomap/globalStyles.ts:5381": [ - [0, 0, 0, "Styles should be written using objects.", "0"] + [0, 0, 0, "Do not use any type assertions.", "1"] ], "public/app/plugins/panel/geomap/layers/basemaps/esri.ts:5381": [ [0, 0, 0, "Do not use any type assertions.", "0"] diff --git a/.drone.yml b/.drone.yml index 9af5f9fb069a9..8af3f0826ad7f 100644 --- a/.drone.yml +++ b/.drone.yml @@ -542,37 +542,6 @@ steps: NODE_OPTIONS: --max_old_space_size=8192 image: node:18.12.0-alpine name: build-frontend-packages -- commands: - - git clone "https://$${GITHUB_TOKEN}@github.com/grafana/grafana-enterprise.git" - --depth=1 - - cd grafana-enterprise - - git fetch origin "refs/tags/*:refs/tags/*" --quiet - - if git show-ref --tags $${TEST_TAG} --quiet; then git tag -d $${TEST_TAG} && git - push --delete origin $${TEST_TAG}; fi - - git tag $${TEST_TAG} && git push origin $${TEST_TAG} - - cd - - - git fetch https://$${GITHUB_TOKEN}@github.com/grafana/grafana.git "refs/tags/*:refs/tags/*" - --quiet && git fetch --quiet - - if git show-ref --tags $${TEST_TAG} --quiet; then git tag -d $${TEST_TAG} && git - push --delete https://$${GITHUB_TOKEN}@github.com/grafana/grafana.git $${TEST_TAG}; - fi - - git tag $${TEST_TAG} && git push https://$${GITHUB_TOKEN}@github.com/grafana/grafana.git - $${TEST_TAG} - environment: - GITHUB_TOKEN: - from_secret: github_token - TEST_TAG: v0.0.0-test - failure: ignore - image: alpine/git:2.40.1 - name: trigger-test-release - when: - branch: main - paths: - include: - - .drone.yml - - pkg/build/** - repo: - - grafana/grafana - failure: ignore image: grafana/drone-downstream name: trigger-enterprise-downstream @@ -831,7 +800,7 @@ services: - /bin/mimir -target=backend environment: {} image: grafana/mimir:latest - name: mimir + name: mimir_backend - environment: {} image: redis:6.2.11-alpine name: redis @@ -997,16 +966,20 @@ steps: image: golang:1.20.10-alpine name: memcached-integration-tests - commands: - - dockerize -wait tcp://mimir:8080 -timeout 120s + - dockerize -wait tcp://mimir_backend:8080 -timeout 120s image: jwilder/dockerize:0.6.1 name: wait-for-remote-alertmanager - commands: - apk add --update build-base - go clean -testcache - - go test -run IntegrationRemoteAlertmanager -covermode=atomic -timeout=2m ./pkg/... + - go test -run TestIntegrationRemoteAlertmanager -covermode=atomic -timeout=2m ./pkg/services/ngalert/notifier/... depends_on: - wire-install - wait-for-remote-alertmanager + environment: + AM_PASSWORD: test + AM_TENANT_ID: test + AM_URL: http://mimir_backend:8080 image: golang:1.20.10-alpine name: remote-alertmanager-integration-tests trigger: @@ -1209,7 +1182,7 @@ services: - /bin/mimir -target=backend environment: {} image: grafana/mimir:latest - name: mimir + name: mimir_backend - environment: {} image: redis:6.2.11-alpine name: redis @@ -2134,7 +2107,7 @@ services: - /bin/mimir -target=backend environment: {} image: grafana/mimir:latest - name: mimir + name: mimir_backend - environment: {} image: redis:6.2.11-alpine name: redis @@ -2279,16 +2252,20 @@ steps: image: golang:1.20.10-alpine name: memcached-integration-tests - commands: - - dockerize -wait tcp://mimir:8080 -timeout 120s + - dockerize -wait tcp://mimir_backend:8080 -timeout 120s image: jwilder/dockerize:0.6.1 name: wait-for-remote-alertmanager - commands: - apk add --update build-base - go clean -testcache - - go test -run IntegrationRemoteAlertmanager -covermode=atomic -timeout=2m ./pkg/... + - go test -run TestIntegrationRemoteAlertmanager -covermode=atomic -timeout=2m ./pkg/services/ngalert/notifier/... depends_on: - wire-install - wait-for-remote-alertmanager + environment: + AM_PASSWORD: test + AM_TENANT_ID: test + AM_URL: http://mimir_backend:8080 image: golang:1.20.10-alpine name: remote-alertmanager-integration-tests trigger: @@ -2363,38 +2340,6 @@ volumes: path: //./pipe/docker_engine/ name: docker --- -clone: - retries: 3 -depends_on: [] -kind: pipeline -name: notify-drone-changes -platform: - arch: amd64 - os: linux -steps: -- image: plugins/slack - name: slack - settings: - channel: slack-webhooks-test - template: "`.drone.yml` and `starlark` files have been changed on the OSS repo, - by: {{build.author}}. \nBranch: \nCommit hash: " - webhook: - from_secret: drone-changes-webhook -trigger: - branch: main - event: - - push - paths: - exclude: - - exclude - include: - - .drone.yml - repo: - - grafana/grafana -type: docker ---- clone: retries: 3 depends_on: @@ -3143,14 +3088,12 @@ services: [] steps: - commands: - echo $env:DRONE_RUNNER_NAME - failure: ignore image: mcr.microsoft.com/windows:1809 name: identify-runner - commands: - $$ProgressPreference = "SilentlyContinue" - Invoke-WebRequest https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.42/windows/grabpl.exe -OutFile grabpl.exe - failure: ignore image: grafana/ci-wix:0.1.1 name: windows-init - commands: @@ -3175,7 +3118,6 @@ steps: from_secret: github_token PRERELEASE_BUCKET: from_secret: prerelease_bucket - failure: ignore image: grafana/ci-wix:0.1.1 name: build-windows-installer trigger: @@ -3825,7 +3767,7 @@ services: - /bin/mimir -target=backend environment: {} image: grafana/mimir:latest - name: mimir + name: mimir_backend - environment: {} image: redis:6.2.11-alpine name: redis @@ -3963,16 +3905,20 @@ steps: image: golang:1.20.10-alpine name: memcached-integration-tests - commands: - - dockerize -wait tcp://mimir:8080 -timeout 120s + - dockerize -wait tcp://mimir_backend:8080 -timeout 120s image: jwilder/dockerize:0.6.1 name: wait-for-remote-alertmanager - commands: - apk add --update build-base - go clean -testcache - - go test -run IntegrationRemoteAlertmanager -covermode=atomic -timeout=2m ./pkg/... + - go test -run TestIntegrationRemoteAlertmanager -covermode=atomic -timeout=2m ./pkg/services/ngalert/notifier/... depends_on: - wire-install - wait-for-remote-alertmanager + environment: + AM_PASSWORD: test + AM_TENANT_ID: test + AM_URL: http://mimir_backend:8080 image: golang:1.20.10-alpine name: remote-alertmanager-integration-tests trigger: @@ -4661,6 +4607,6 @@ kind: secret name: gcr_credentials --- kind: signature -hmac: efc8706531a40b72753d483d3d8a7ba4941b5f54e0b21a68bcf47556a97a9ede +hmac: a7032573772937b59787f5c01c113b02afb07a9febf15664a68cbcee1458acc9 ... diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 5aa99db1f04ee..b7e4f1e67d122 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -187,6 +187,7 @@ /devenv/docker/blocks/maildev/ @grafana/alerting-frontend /devenv/docker/blocks/mariadb/ @grafana/grafana-bi-squad /devenv/docker/blocks/memcached/ @grafana/backend-platform +/devenv/docker/blocks/mimir_backend/ @grafana/alerting-backend-product /devenv/docker/blocks/mssql/ @grafana/grafana-bi-squad /devenv/docker/blocks/mssql_arm64/ @grafana/grafana-bi-squad /devenv/docker/blocks/mssql_tests/ @grafana/grafana-bi-squad @@ -506,6 +507,7 @@ cypress.config.js @grafana/grafana-frontend-platform /scripts/trigger_windows_build.sh @grafana/grafana-delivery /scripts/cleanup-husky.sh @grafana/frontend-ops /scripts/verify-repo-update/ @grafana/grafana-delivery +scripts/generate-icon-bundle.js @grafana/plugins-platform-frontend @grafana/grafana-frontend-platform /scripts/webpack/ @grafana/frontend-ops /scripts/generate-a11y-report.sh @grafana/grafana-frontend-platform diff --git a/.github/renovate.json5 b/.github/renovate.json5 index 2908208124703..6f64cde93fdf8 100644 --- a/.github/renovate.json5 +++ b/.github/renovate.json5 @@ -18,7 +18,7 @@ "@locker/near-membrane-shared", // critical library. we need to bump this only intentionally "@locker/near-membrane-shared-dom", // critical library. we need to bump this only intentionally ], - "includePaths": ["package.json", "packages/**"], + "includePaths": ["package.json", "packages/**", "public/app/plugins/**"], "ignorePaths": ["emails/**", "plugins-bundled/**", "**/mocks/**"], "labels": ["area/frontend", "dependencies", "no-backport", "no-changelog"], "postUpdateOptions": ["yarnDedupeHighest"], diff --git a/.gitignore b/.gitignore index e7580cc5fb814..b8b8a3ffed0bc 100644 --- a/.gitignore +++ b/.gitignore @@ -20,7 +20,7 @@ tsconfig.tsbuildinfo __debug_bin* # Yarn -.yarn/* +.yarn/ !.yarn/patches !.yarn/releases !.yarn/plugins @@ -200,3 +200,6 @@ deployment_tools_config.json # Temporary file for backporting PRs .pr-body.txt + +# Core plugin builds +public/app/plugins/**/dist/ \ No newline at end of file diff --git a/.yarn/sdks/eslint/package.json b/.yarn/sdks/eslint/package.json index 06e74e37b48f7..0f987e359a811 100644 --- a/.yarn/sdks/eslint/package.json +++ b/.yarn/sdks/eslint/package.json @@ -1,6 +1,6 @@ { "name": "eslint", - "version": "8.44.0-sdk", + "version": "8.51.0-sdk", "main": "./lib/api.js", "type": "commonjs" } diff --git a/Dockerfile b/Dockerfile index 22e1f1025839c..fc73ee1d659cb 100644 --- a/Dockerfile +++ b/Dockerfile @@ -18,6 +18,7 @@ COPY package.json yarn.lock .yarnrc.yml ./ COPY .yarn .yarn COPY packages packages COPY plugins-bundled plugins-bundled +COPY public public RUN yarn install --immutable diff --git a/Makefile b/Makefile index 54287b0ff0951..114f0e5c29c7c 100644 --- a/Makefile +++ b/Makefile @@ -164,6 +164,13 @@ test-go-integration: ## Run integration tests for backend with flags. @echo "test backend integration tests" $(GO) test -count=1 -run "^TestIntegration" -covermode=atomic -timeout=5m $(GO_INTEGRATION_TESTS) +.PHONY: test-go-integration-alertmanager +test-go-integration-alertmanager: ## Run integration tests for the remote alertmanager (config taken from the mimir_backend block). + @echo "test remote alertmanager integration tests" + $(GO) clean -testcache + AM_URL=http://localhost:8080 AM_TENANT_ID=test AM_PASSWORD=test \ + $(GO) test -count=1 -run "^TestIntegrationRemoteAlertmanager" -covermode=atomic -timeout=5m ./pkg/services/ngalert/notifier/... + .PHONY: test-go-integration-postgres test-go-integration-postgres: devenv-postgres ## Run integration tests for postgres backend with flags. @echo "test backend integration postgres tests" diff --git a/contribute/create-pull-request.md b/contribute/create-pull-request.md index b5b70abd56945..7fe1023a8979e 100644 --- a/contribute/create-pull-request.md +++ b/contribute/create-pull-request.md @@ -8,7 +8,7 @@ We know you're excited to create your first pull request. Before we get started, - Learn how to start [Contributing to Grafana](/CONTRIBUTING.md). - Make sure your code follows the relevant [style guides](/contribute/style-guides). -- It's recommened you [set up precommit hooks](/contribute/developer-guide.md) to auto-format when you commit +- It's recommended you [set up precommit hooks](/contribute/developer-guide.md) to auto-format when you commit ## Your first pull request diff --git a/contribute/feature-toggles.md b/contribute/feature-toggles.md index 26d13d3847e82..79e0178392da5 100644 --- a/contribute/feature-toggles.md +++ b/contribute/feature-toggles.md @@ -5,7 +5,7 @@ This guide helps you get started adding your feature behind a feature flag in Gr ## Steps to adding a feature toggle 1. Define the feature toggle in [registry.go](../pkg/services/featuremgmt/registry.go). To see what each feature stage means, look at the comments [here](../pkg/services/featuremgmt/features.go). If you are a community member, use the [CODEOWNERS](../.github/CODEOWNERS) file to determine which team owns the package you are updating. -2. Run the go tests mentioned at the top of [this file](../pkg/services/featuremgmt/toggles_gen.go). This will generate all the additional files needed: `toggles_gen` for the backend, `grafana-data` for the frontend, and docs. You can run the test by running `go test ./pkg/services/featuremgmt/...`. This will say the tests failed the first time, but it will have generated the right code. If you re-run the testss, it will pass. +2. Run the go tests mentioned at the top of [this file](../pkg/services/featuremgmt/toggles_gen.go). This will generate all the additional files needed: `toggles_gen` for the backend, `grafana-data` for the frontend, and docs. You can run the test by running `go test ./pkg/services/featuremgmt/...`. This will say the tests failed the first time, but it will have generated the right code. If you re-run the tests, it will pass. ## How to use it in the code diff --git a/contribute/merge-pull-request.md b/contribute/merge-pull-request.md index e58947d94ff0f..ac81ef130ce48 100644 --- a/contribute/merge-pull-request.md +++ b/contribute/merge-pull-request.md @@ -48,7 +48,7 @@ Instead, when it is merged & closed then a bot will look for the most appropriat That milestone should always reflect the branch that the pull request is merged into. For every major and minor release there is a milestone ending with `.x` (e.g. `10.0.x` for the 10.0.x releases). -Pull requests targetting `main` should use the `.x` milestone of the next minor (or major) version (you can find that version number inside the `package.json` file). +Pull requests targeting `main` should use the `.x` milestone of the next minor (or major) version (you can find that version number inside the `package.json` file). Backport pull requests should use the version of the target branch (e.g. `9.4.x` for the `v9.4.x` branch). ### Include in changelog and release notes? diff --git a/contribute/style-guides/themes.md b/contribute/style-guides/themes.md index f6118bd1d2375..5d4a2e0f877bb 100644 --- a/contribute/style-guides/themes.md +++ b/contribute/style-guides/themes.md @@ -126,7 +126,7 @@ For font family, font sizes and line heights use the variables under `theme.typo #### Using `ThemeContext` directly ```tsx -import { ThemeContext } from '@grafana/ui'; +import { ThemeContext } from '@grafana/data'; {(theme) => }; ``` diff --git a/devenv/dev-dashboards/panel-table/table_tests_new.json b/devenv/dev-dashboards/panel-table/table_tests_new.json index d3dfb294fb166..ba7632bc5f569 100644 --- a/devenv/dev-dashboards/panel-table/table_tests_new.json +++ b/devenv/dev-dashboards/panel-table/table_tests_new.json @@ -393,6 +393,10 @@ "value": { "mode": "continuous-GrYlRd" } + }, + { + "id": "unit", + "value": "r/sec" } ] }, @@ -538,6 +542,10 @@ "fixedColor": "red", "mode": "fixed" } + }, + { + "id": "unit", + "value": "r/sec" } ] }, @@ -563,6 +571,10 @@ "fixedColor": "purple", "mode": "fixed" } + }, + { + "id": "unit", + "value": "ms" } ] }, diff --git a/devenv/docker/blocks/mimir_backend/docker-compose.yaml b/devenv/docker/blocks/mimir_backend/docker-compose.yaml new file mode 100644 index 0000000000000..8666ab093cce5 --- /dev/null +++ b/devenv/docker/blocks/mimir_backend/docker-compose.yaml @@ -0,0 +1,16 @@ + mimir_backend: + image: grafana/mimir + container_name: mimir_backend + command: + - -target=backend + nginx: + environment: + - NGINX_ENVSUBST_OUTPUT_DIR=/etc/nginx + - MIMIR_BACKEND_URL=mimir_backend:8080 + hostname: nginx + image: nginxinc/nginx-unprivileged:1.22-alpine + ports: + - 8080:8080 + volumes: + - "./docker/blocks/mimir_backend/nginx/nginx.conf.template:/etc/nginx/templates/nginx.conf.template" + - "./docker/blocks/mimir_backend/nginx/.htpasswd:/etc/nginx/.htpasswd" \ No newline at end of file diff --git a/devenv/docker/blocks/mimir_backend/nginx/.htpasswd b/devenv/docker/blocks/mimir_backend/nginx/.htpasswd new file mode 100644 index 0000000000000..f2af629df1aeb --- /dev/null +++ b/devenv/docker/blocks/mimir_backend/nginx/.htpasswd @@ -0,0 +1,2 @@ +// test:test +test:$apr1$fzP1qWUA$gGOojmRicBlNiSdiSGjwv1 diff --git a/devenv/docker/blocks/mimir_backend/nginx/nginx.conf.template b/devenv/docker/blocks/mimir_backend/nginx/nginx.conf.template new file mode 100644 index 0000000000000..ba1125456439b --- /dev/null +++ b/devenv/docker/blocks/mimir_backend/nginx/nginx.conf.template @@ -0,0 +1,18 @@ +pid /tmp/nginx.pid; + +events {} + +http { + resolver 127.0.0.11 ipv6=off; + + server { + listen 8080; + proxy_set_header X-Scope-OrgID $http_x_scope_orgid; + + location / { + auth_basic "Mimir Backend"; + auth_basic_user_file /etc/nginx/.htpasswd; + proxy_pass http://${MIMIR_BACKEND_URL}; + } + } +} \ No newline at end of file diff --git a/devenv/docker/blocks/postgres/docker-compose.yaml b/devenv/docker/blocks/postgres/docker-compose.yaml index 7e05b29e8b190..86384988d011f 100644 --- a/devenv/docker/blocks/postgres/docker-compose.yaml +++ b/devenv/docker/blocks/postgres/docker-compose.yaml @@ -6,7 +6,7 @@ POSTGRES_DB: grafana ports: - "5432:5432" - command: postgres -c log_connections=on -c logging_collector=on -c log_destination=stderr -c log_directory=/var/log/postgresql + command: postgres -c log_connections=on -c log_disconnections=on -c log_destination=stderr healthcheck: test: [ "CMD", "pg_isready", "-q", "-d", "grafana", "-U", "grafana" ] timeout: 45s diff --git a/docs/sources/administration/correlations/correlation-configuration/index.md b/docs/sources/administration/correlations/correlation-configuration/index.md index 34298a847efca..4c63080b65e7b 100644 --- a/docs/sources/administration/correlations/correlation-configuration/index.md +++ b/docs/sources/administration/correlations/correlation-configuration/index.md @@ -55,6 +55,8 @@ In addition to mapping field values to shorter variable names, more correlation For more details, please see the example in [Use variables and transformations in a correlation]({{< relref "./use-variables-and-transformations" >}}). +Correlation creates a data link only if all variables have values in the selected data row. [Global variables]({{< relref "/docs/grafana/latest/dashboards/variables/add-template-variables#global-variables" >}}) are exception to this rule and are not required to be filled in from the returned data. These variables are interpolated automatically by data sources. + ### Correlation Transformations Correlations provide a way to extract more variables out of field values. The output of transformations is a set of new variables that can be accessed as any other variable. diff --git a/docs/sources/administration/correlations/create-a-new-correlation/index.md b/docs/sources/administration/correlations/create-a-new-correlation/index.md index edac5cf1747d8..c8f389f3dbf6f 100644 --- a/docs/sources/administration/correlations/create-a-new-correlation/index.md +++ b/docs/sources/administration/correlations/create-a-new-correlation/index.md @@ -13,6 +13,25 @@ weight: 40 Make sure you have permission to add new correlations. Only users with write permissions to data sources can define new correlations. +## Create a correlation in Explore's Correlations Editor + +1. Go to Explore page. +1. Select a data source that you would like to be [the source data source]({{< relref "/docs/grafana/latest/administration/correlations/correlation-configuration#source-data-source-and-result-field" >}}) for a new correlation. +1. Run a query producing data in [a supported visualization]({{< relref "/docs/grafana/latest/administration/correlations/#correlations" >}}). +1. Click "+ Add" button in the top toolbar and select "Add correlation" (you can also select "Correlations Editor" from the [Command Palette]({{< relref "/docs/grafana/latest/search/#command-palette" >}})). +1. Explore is now in Correlations Editor mode indicated by a blue border and top bar. You can exit Correlations Editor using the Exit button in the top bar. +1. The visualization is enriched with links allowing to create new correlations. Links are attached to the data that you can use to build a new query: + - Logs: links are displayed next to field values inside log details for each log row + - Table: every table cell is a link +1. Click on a link to begin adding new correlation. Links are associated with a field that will be used as [a results field of a correlation]({{< relref "/docs/grafana/latest/administration/correlations/correlation-configuration" >}}). This means the correlation link will be created on the link you select once the correlation is saved. +1. Explore opens a split view. Use the right pane to setup [the target query source of the correlation]({{< relref "/docs/grafana/latest/administration/correlations/correlation-configuration#target-query" >}}). +1. Build target query using [variables syntax]({{< relref "/docs/grafana/latest/dashboards/variables/variable-syntax" >}}) with variables from the list provided at the top of the pane. The list contains sample values from the selected data row. +1. Provide optional label and description. Label is used as the name of the link inside the visualization. It can contain variables. +1. Click "Save" button in the top bar to save the correlation and exit Correlations Editor mode. +1. The link used to create the correlation will be replaced with a data link in each row. The variables will be dynamically replaced with values from a selected row. + +Please check [an example]({{< relref "/docs/grafana/latest/administration/correlations/use-correlations-editor-in-explore" >}}) to see how to create a sample correlation using test data source. + ## Create a correlation in Administration page 1. Go to the Administration section in Grafana. diff --git a/docs/sources/administration/correlations/use-correlations-editor-in-explore/index.md b/docs/sources/administration/correlations/use-correlations-editor-in-explore/index.md new file mode 100644 index 0000000000000..6144b9954b5f7 --- /dev/null +++ b/docs/sources/administration/correlations/use-correlations-editor-in-explore/index.md @@ -0,0 +1,57 @@ +--- +labels: + products: + - enterprise + - oss +title: Use Correlations Editor in Explore +weight: 70 +--- + +# Use Correlations Editor in Explore + +## Before you begin + +This example shows how to create a correlation using Correlations Editor in Explore. + +Correlations allow you to use results of one query to run a new query in any data source. In this example you will run a query that renders tabular data. The data will be used to run a different query that yields a graph result. + +Please make sure you have setup up [a test data source]({{< relref "/docs/grafana/latest/datasources/testdata/#testdata-data-source" >}}). + +## Create a new correlation + +1. Go to Explore. +1. Select `test data source`. +1. Click on "+ Add" dropdown and select "Add correlation" button. +1. Explore is now in Correlations Editor mode indicated by a blue border. +1. Select scenario: `CSV File`. +1. Select file: `population_by_state.csv`. +1. Note that each cell is a link that you can click on to start creating a new correlation. + + {{< figure src="/static/img/docs/correlations/screenshot-correlations-editor-source-10.2.png" max-width="600px" caption="Selecting the source of a correlation" >}} + +1. Create new correlation that attaches a data link in the `State` column: click on any cell in the `State` column, e.g. "California". +1. Explore opens in split view. Select the same data source you selected in the left pane. +1. The helper above the query editor contains all available variables you can use the target query. Variables contain all data fields (table columns) from the selected row. +1. Select Scenario: `CSV Metric Values`. +1. In the Query Editor's `String Input` field provide variables with population values for each year: `${1980},${2000},${2020}`. This will generate a graph using variable values. +1. In the Query Editor's `Alias` field, write `${State}` + + {{< figure src="/static/img/docs/correlations/screenshot-correlations-editor-target-10.2.png" max-width="600px" caption="Setting up the target of a correlation" >}} + +1. Run a query to see that it produces a graph using sample values from the variables. +1. Save the correlation using "Save" button in the top. + +## Test a newly created correlations + +1. Once the correlation is saved Explore will exit Correlations Editor automatically and re-rerun the query in the left pane. +1. Click on a state name. Note how values from the row are inserted into the query on the right and the graph changes using the values for each row. The query is rerun with updates values every time you click on a state name. + + {{< figure src="/static/img/docs/correlations/screenshot-correlations-example-link-10.2.png" max-width="600px" caption="Result of clicking on a data link" >}} + +You can apply the same steps to any data source. Correlations allow you to create links in visualizations to run dynamic queries based on selected data. In this example we used data returned by a query to build a new query generating different visualization using the same data source. However, you can create correlations between any data sources to create custom exploration flows. + +## Correlations in the logs panel + +Correlations links in the logs panel show slightly differently than the table panel. When you enter the Correlation Editor mode when looking at logs, you will need to expand a log line to see the button that serves as the correlation link. + +{{< figure src="/static/img/docs/correlations/screenshot-correlations-editor-logs-10.2.png" max-width="600px" caption="Logs panel in the Correlations Editor" >}} diff --git a/docs/sources/alerting/fundamentals/contact-points/index.md b/docs/sources/alerting/fundamentals/contact-points/index.md index 3286e32ac2b05..3c28c0c5df57b 100644 --- a/docs/sources/alerting/fundamentals/contact-points/index.md +++ b/docs/sources/alerting/fundamentals/contact-points/index.md @@ -47,7 +47,7 @@ The following table lists the contact point integrations supported by Grafana. | [Google Chat](https://chat.google.com/) | `googlechat` | Supported | N/A | | [Kafka](https://kafka.apache.org/) | `kafka` | Supported | N/A | | [Line](https://line.me/en/) | `line` | Supported | N/A | -| [Microsoft Teams](https://teams.microsoft.com/) | `teams` | Supported | N/A | +| [Microsoft Teams](https://teams.microsoft.com/) | `teams` | Supported | Supported | | [Opsgenie](https://atlassian.com/opsgenie/) | `opsgenie` | Supported | Supported | | [Pagerduty](https://www.pagerduty.com/) | `pagerduty` | Supported | Supported | | [Prometheus Alertmanager](https://prometheus.io) | `prometheus-alertmanager` | Supported | N/A | diff --git a/docs/sources/dashboards/build-dashboards/annotate-visualizations/index.md b/docs/sources/dashboards/build-dashboards/annotate-visualizations/index.md index 28aa183baeaa5..6eedd05a43e9e 100644 --- a/docs/sources/dashboards/build-dashboards/annotate-visualizations/index.md +++ b/docs/sources/dashboards/build-dashboards/annotate-visualizations/index.md @@ -136,7 +136,7 @@ You can stop annotations from being fetched and drawn by taking the following st 1. Find and click the **Annotations & Alerts (Built-in)** query to open it. 1. Click the **Enabled** toggle to turn it off. -When you copy a dashboard using the **Save As** feature it will get a new dashboard id, so annotations created on source dashboard will no longer be visible on the copy. You can still show them if you add a new **Annotation Query** and filter by tags. However, this only works if the annotations on the source dashboard had tags to filter by. +When you copy a dashboard using the **Save As** feature it will get a new dashboard id, so annotations created on the source dashboard will no longer be visible on the copy. You can still show them if you add a new **Annotation Query** and filter by tags. However, this only works if the annotations on the source dashboard had tags to filter by. Following are some query options specific to the built-in annotation query. diff --git a/docs/sources/dashboards/dashboard-public/index.md b/docs/sources/dashboards/dashboard-public/index.md index 15286cd890592..80b9a2ee75311 100644 --- a/docs/sources/dashboards/dashboard-public/index.md +++ b/docs/sources/dashboards/dashboard-public/index.md @@ -13,12 +13,6 @@ weight: 8 # Public dashboards -{{% admonition type="note" %}} - -This feature is in [public preview](/docs/release-life-cycle/). - -{{% /admonition %}} - > **Warning:** Making your dashboard public could result in a large number of queries to the data sources used by your dashboard. > This can be mitigated by utilizing the enterprise [caching][] and/or rate limiting features. diff --git a/docs/sources/dashboards/manage-dashboards/index.md b/docs/sources/dashboards/manage-dashboards/index.md index 04711802967b4..c9ddc5dfaa3f2 100644 --- a/docs/sources/dashboards/manage-dashboards/index.md +++ b/docs/sources/dashboards/manage-dashboards/index.md @@ -32,10 +32,6 @@ weight: 8 # Manage dashboards -A dashboard is a set of one or more [panels][] that visually presents your data in one or more rows. - -For more information about creating dashboards, refer to [Add and organize panels](../add-organize-panels). - This topic includes techniques you can use to manage your Grafana dashboards, including: - [Creating and managing dashboard folders](#create-and-manage-dashboard-folders) @@ -43,48 +39,60 @@ This topic includes techniques you can use to manage your Grafana dashboards, in - [Organizing dashboards](#organize-a-dashboard) - [Troubleshooting dashboards](#troubleshoot-dashboards) +For more information about creating dashboards, refer to [Add and organize panels](../add-organize-panels). + +## Browse dashboards + +On the **Dashboards** page, you can browse and manage folders and dashboards. This includes the options to: + +- Create folders and dashboards +- Move dashboards between folders +- Delete multiple dashboards and folders +- Navigate to a folder +- Manage folder permissions. For more information, refer to [Dashboard permissions](https://grafana.com/docs/grafana//administration/roles-and-permissions/#dashboard-permissions). + +{{% admonition type="note" %}} +As of Grafana 10.2, there is no longer a special **General** folder. Dashboards without a folder are now shown at the top level alongside folders. +{{% /admonition %}} + ## Create a dashboard folder Folders help you organize and group dashboards, which is useful when you have many dashboards or multiple teams using the same Grafana instance. -**Before you begin:** - -- Ensure that you have Grafana Admin or Super Admin permissions. For more information about dashboard permissions, refer to [Dashboard permissions][]. +> **Before you begin:** Ensure you have Editor permissions or greater to create folders. For more information about dashboard permissions, refer to [Dashboard permissions][]. **To create a dashboard folder:** -1. Sign in to Grafana. -1. Click **Dashboards** in the left-side menu. -1. On the Dashboards page, click **New** and select **New folder** in the dropdown. +1. Click **Dashboards** in the main menu. +1. On the **Dashboards** page, click **New** and select **New folder** in the drop-down. 1. Enter a unique name and click **Create**. - Do not use the name of a folder that has already been provisioned (such as "General") and avoid special characters (except underscores and hyphens). - When you save a dashboard, you can either select a folder for the dashboard to be saved in or create a new folder. -## Manage dashboards +{{% admonition type="note" %}} +Alerts cannot be placed in folders with slashes (\ /) in the name. If you wish to place alerts in the folder, do not use slashes in the folder name. +{{% /admonition %}} -On the Dashboards page, you can: +**To edit the name of a folder:** -- create a folder -- create a dashboard -- move dashboards into folders -- delete multiple dashboards -- navigate to a folder page where you can assign folder and dashboard permissions +1. Click **Dashboards** in the main menu. +1. Navigate to the folder by selecting it in the list, or searching for it. +1. Click the pencil icon labelled **Edit title** in the header and update the name of the folder. -### Dashboard folder page +The new folder name is automatically saved. -You can complete the following tasks on a dashboard folder page: +### Folder permissions -- Move or delete dashboards in a folder -- Rename a folder (available on the Settings tab) -- Assign permissions to folders (which are inherited by the dashboards in the folder) +You can assign permissions to a folder. Any permissions you assign are inherited by the dashboards in the folder. You can assign permissions to organization roles, teams, and users. -To navigate to the dashboard folder page, hover over the name of the folder and click **Go to folder** in the dashboard search result list or on the Dashboards page. +**To modify permissions for a folder:** -### Dashboard permissions +1. Click **Dashboards** in the main menu. +1. Navigate to the folder by selecting it in the list, or searching for it. +1. On the folder's page, click **Folder actions** and select **Manage permissions** in the drop-down. +1. Update the permissions as desired. -You can assign permissions to a folder. Any permissions you assign are inherited by the dashboards in the folder. An Access Control List (ACL) is used where **Organization Role**, **Team**, and a **User** can be assigned permissions. +Changes are saved automatically. For more information about dashboard permissions, refer to [Dashboard permissions][]. @@ -96,10 +104,13 @@ You can use the Grafana UI or the [HTTP API][] to export and import dashboards. The dashboard export action creates a Grafana JSON file that contains everything you need, including layout, variables, styles, data sources, queries, and so on, so that you can later import the dashboard. -1. Click **Dashboards** in the left-side menu. +1. Click **Dashboards** in the main menu. 1. Open the dashboard you want to export. -1. Click the **Share** icon. +1. Click the **Share** icon in the top navigation bar. 1. Click **Export**. + + If you're exporting the dashboard to use in another instance, with different data source UIDs, enable the **Export for sharing externally** switch. + 1. Click **Save to file**. Grafana downloads a JSON file to your local machine. diff --git a/docs/sources/developers/angular_deprecation/angular-plugins.md b/docs/sources/developers/angular_deprecation/angular-plugins.md index 81fe7e45fb2d6..4b1e0eb810f2e 100644 --- a/docs/sources/developers/angular_deprecation/angular-plugins.md +++ b/docs/sources/developers/angular_deprecation/angular-plugins.md @@ -136,10 +136,6 @@ Latest Version: v0.0.6 | Signature: Community | Last Updated: 2021 > **Migration available - plugin superseded:** The original plugin only claims support for Grafana v4.x.x, it was replaced with a [new plugin](https://grafana.com/grafana/plugins/grafadruid-druid-datasource/) based on React. -### [Cognite Data Fusion](https://grafana.com/grafana/plugins/cognitedata-datasource/) - -Latest Version: 3.1.0 | Signature: Commercial | Last Updated: 2023 - ### [Akumuli](https://grafana.com/grafana/plugins/akumuli-datasource/) Latest Version: 1.3.12 | Signature: Community | Last Updated: 2021 diff --git a/docs/sources/developers/kinds/composable/table/panelcfg/schema-reference.md b/docs/sources/developers/kinds/composable/table/panelcfg/schema-reference.md index 6ec9c79f28b7c..0fbc39fba0104 100644 --- a/docs/sources/developers/kinds/composable/table/panelcfg/schema-reference.md +++ b/docs/sources/developers/kinds/composable/table/panelcfg/schema-reference.md @@ -170,6 +170,7 @@ It extends [GraphFieldConfig](#graphfieldconfig). | `fillOpacity` | number | No | | *(Inherited from [GraphFieldConfig](#graphfieldconfig))* | | `gradientMode` | string | No | | *(Inherited from [GraphFieldConfig](#graphfieldconfig))*
TODO docs
Possible values are: `none`, `opacity`, `hue`, `scheme`. | | `hideFrom` | [HideSeriesConfig](#hideseriesconfig) | No | | *(Inherited from [GraphFieldConfig](#graphfieldconfig))*
TODO docs | +| `hideValue` | boolean | No | | | | `lineColor` | string | No | | *(Inherited from [GraphFieldConfig](#graphfieldconfig))* | | `lineInterpolation` | string | No | | *(Inherited from [GraphFieldConfig](#graphfieldconfig))*
TODO docs
Possible values are: `linear`, `smooth`, `stepBefore`, `stepAfter`. | | `lineStyle` | [LineStyle](#linestyle) | No | | *(Inherited from [GraphFieldConfig](#graphfieldconfig))*
TODO docs | diff --git a/docs/sources/developers/kinds/core/dashboard/schema-reference.md b/docs/sources/developers/kinds/core/dashboard/schema-reference.md index 37206a725c2e3..42b36f9f4865e 100644 --- a/docs/sources/developers/kinds/core/dashboard/schema-reference.md +++ b/docs/sources/developers/kinds/core/dashboard/schema-reference.md @@ -117,6 +117,7 @@ FROM: AnnotationQuery in grafana-data/src/types/annotations.ts | `enable` | boolean | **Yes** | `true` | When enabled the annotation query is issued with every dashboard refresh | | `iconColor` | string | **Yes** | | Color to use for the annotation event markers | | `name` | string | **Yes** | | Name of annotation. | +| `builtIn` | number | No | `0` | Set to 1 for the standard annotation query all dashboards have by default. | | `filter` | [AnnotationPanelFilter](#annotationpanelfilter) | No | | | | `hide` | boolean | No | `false` | Annotation queries can be toggled on or off at the top of the dashboard.
When hide is true, the toggle is not shown in the dashboard. | | `target` | [AnnotationTarget](#annotationtarget) | No | | TODO: this should be a regular DataQuery that depends on the selected dashboard
these match the properties of the "grafana" datasouce that is default in most dashboards | diff --git a/docs/sources/developers/kinds/core/playlist/schema-reference.md b/docs/sources/developers/kinds/core/playlist/schema-reference.md deleted file mode 100644 index 6864981b00c26..0000000000000 --- a/docs/sources/developers/kinds/core/playlist/schema-reference.md +++ /dev/null @@ -1,117 +0,0 @@ ---- -keywords: - - grafana - - schema -labels: - products: - - cloud - - enterprise - - oss -title: Playlist kind ---- -> Both documentation generation and kinds schemas are in active development and subject to change without prior notice. - -## Playlist - -#### Maturity: [merged](../../../maturity/#merged) -#### Version: 0.0 - -A playlist is a series of dashboards that is automatically rotated in the browser, on a configurable interval. - -| Property | Type | Required | Default | Description | -|------------|---------------------|----------|---------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| `metadata` | [object](#metadata) | **Yes** | | metadata contains embedded CommonMetadata and can be extended with custom string fields
TODO: use CommonMetadata instead of redefining here; currently needs to be defined here
without external reference as using the CommonMetadata reference breaks thema codegen. | -| `spec` | [object](#spec) | **Yes** | | | -| `status` | [object](#status) | **Yes** | | | - -### Metadata - -metadata contains embedded CommonMetadata and can be extended with custom string fields -TODO: use CommonMetadata instead of redefining here; currently needs to be defined here -without external reference as using the CommonMetadata reference breaks thema codegen. - -It extends [_kubeObjectMetadata](#_kubeobjectmetadata). - -| Property | Type | Required | Default | Description | -|---------------------|------------------------|----------|---------|-----------------------------------------------------------------------------------------------------------------------------------------| -| `createdBy` | string | **Yes** | | | -| `creationTimestamp` | string | **Yes** | | *(Inherited from [_kubeObjectMetadata](#_kubeobjectmetadata))* | -| `extraFields` | [object](#extrafields) | **Yes** | | extraFields is reserved for any fields that are pulled from the API server metadata but do not have concrete fields in the CUE metadata | -| `finalizers` | string[] | **Yes** | | *(Inherited from [_kubeObjectMetadata](#_kubeobjectmetadata))* | -| `labels` | map[string]string | **Yes** | | *(Inherited from [_kubeObjectMetadata](#_kubeobjectmetadata))* | -| `resourceVersion` | string | **Yes** | | *(Inherited from [_kubeObjectMetadata](#_kubeobjectmetadata))* | -| `uid` | string | **Yes** | | *(Inherited from [_kubeObjectMetadata](#_kubeobjectmetadata))* | -| `updateTimestamp` | string | **Yes** | | | -| `updatedBy` | string | **Yes** | | | -| `deletionTimestamp` | string | No | | *(Inherited from [_kubeObjectMetadata](#_kubeobjectmetadata))* | - -### _kubeObjectMetadata - -_kubeObjectMetadata is metadata found in a kubernetes object's metadata field. -It is not exhaustive and only includes fields which may be relevant to a kind's implementation, -As it is also intended to be generic enough to function with any API Server. - -| Property | Type | Required | Default | Description | -|---------------------|-------------------|----------|---------|-------------| -| `creationTimestamp` | string | **Yes** | | | -| `finalizers` | string[] | **Yes** | | | -| `labels` | map[string]string | **Yes** | | | -| `resourceVersion` | string | **Yes** | | | -| `uid` | string | **Yes** | | | -| `deletionTimestamp` | string | No | | | - -### ExtraFields - -extraFields is reserved for any fields that are pulled from the API server metadata but do not have concrete fields in the CUE metadata - -| Property | Type | Required | Default | Description | -|----------|------|----------|---------|-------------| - -### Spec - -| Property | Type | Required | Default | Description | -|------------|---------------------------------|----------|---------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| `interval` | string | **Yes** | `5m` | Interval sets the time between switching views in a playlist.
FIXME: Is this based on a standardized format or what options are available? Can datemath be used? | -| `name` | string | **Yes** | | Name of the playlist. | -| `uid` | string | **Yes** | | Unique playlist identifier. Generated on creation, either by the
creator of the playlist of by the application. | -| `items` | [PlaylistItem](#playlistitem)[] | No | | The ordered list of items that the playlist will iterate over.
FIXME! This should not be optional, but changing it makes the godegen awkward | - -### PlaylistItem - -| Property | Type | Required | Default | Description | -|----------|--------|----------|---------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| `type` | string | **Yes** | | Type of the item.
Possible values are: `dashboard_by_uid`, `dashboard_by_id`, `dashboard_by_tag`. | -| `value` | string | **Yes** | | Value depends on type and describes the playlist item.

- dashboard_by_id: The value is an internal numerical identifier set by Grafana. This
is not portable as the numerical identifier is non-deterministic between different instances.
Will be replaced by dashboard_by_uid in the future. (deprecated)
- dashboard_by_tag: The value is a tag which is set on any number of dashboards. All
dashboards behind the tag will be added to the playlist.
- dashboard_by_uid: The value is the dashboard UID | -| `title` | string | No | | Title is an unused property -- it will be removed in the future | - -### Status - -| Property | Type | Required | Default | Description | -|--------------------|------------------------------------------------------------|----------|---------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| `additionalFields` | [object](#additionalfields) | No | | additionalFields is reserved for future use | -| `operatorStates` | map[string][status.#OperatorState](#status.#operatorstate) | No | | operatorStates is a map of operator ID to operator state evaluations.
Any operator which consumes this kind SHOULD add its state evaluation information to this field. | - -### AdditionalFields - -additionalFields is reserved for future use - -| Property | Type | Required | Default | Description | -|----------|------|----------|---------|-------------| - -### Status.#OperatorState - -| Property | Type | Required | Default | Description | -|--------------------|--------------------|----------|---------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| `lastEvaluation` | string | **Yes** | | lastEvaluation is the ResourceVersion last evaluated | -| `state` | string | **Yes** | | state describes the state of the lastEvaluation.
It is limited to three possible states for machine evaluation.
Possible values are: `success`, `in_progress`, `failed`. | -| `descriptiveState` | string | No | | descriptiveState is an optional more descriptive state field which has no requirements on format | -| `details` | [object](#details) | No | | details contains any extra information that is operator-specific | - -### Details - -details contains any extra information that is operator-specific - -| Property | Type | Required | Default | Description | -|----------|------|----------|---------|-------------| - - diff --git a/docs/sources/explore/_index.md b/docs/sources/explore/_index.md index a0795f7c3a6a3..a6175ec073b4d 100644 --- a/docs/sources/explore/_index.md +++ b/docs/sources/explore/_index.md @@ -67,6 +67,18 @@ In split view, timepickers for both panels can be linked (if you change one, the To close the newly created query, click on the Close Split button. +## Content outline + +The content outline is a side navigation bar that keeps track of the queries and visualization panels you created in Explore. It allows you to navigate between them quickly. + +The content outline also works in a split view. When you are in split view, the content outline is generated for each pane. + +To open the content outline: + +1. Click the Outline button in the top left corner of the Explore screen. + +You can then click on any panel icon in the content outline to navigate to that panel. + ## Share Explore URLs When using Explore, the URL in the browser address bar updates as you make changes to the queries. You can share or bookmark this URL. diff --git a/docs/sources/panels-visualizations/configure-data-links/index.md b/docs/sources/panels-visualizations/configure-data-links/index.md index af4b8bad8eaf2..da954089d97f5 100644 --- a/docs/sources/panels-visualizations/configure-data-links/index.md +++ b/docs/sources/panels-visualizations/configure-data-links/index.md @@ -50,7 +50,7 @@ These variables allow you to include the current time range in the data link URL ## Series variables -Series specific variables are available under `__series` namespace: +Series-specific variables are available under `__series` namespace: - `__series.name` - series name to the URL @@ -71,6 +71,17 @@ Value-specific variables are available under `__value` namespace: - `__value.text` - text representation of a value - `__value.calc` - calculation name if the value is result of calculation +Using value-specific variables in data links can show different results depending on the set option of Tooltip mode. + +## Data variables + +To access values and labels from other fields use: + +- `${__data.fields[i]}` - value of field `i` (on the same row) +- `${__data.fields["NameOfField"]}` - value of field using name instead of index +- `${__data.fields["NameOfField"]}` - value of field using name instead of index +- `${__data.fields[1].labels.cluster}` - access labels of another field + ## Template variables When linking to another dashboard that uses template variables, select variable values for whoever clicks the link. diff --git a/docs/sources/panels-visualizations/query-transform-data/transform-data/index.md b/docs/sources/panels-visualizations/query-transform-data/transform-data/index.md index c7ac4e7dc098a..a0895c8acdd6b 100644 --- a/docs/sources/panels-visualizations/query-transform-data/transform-data/index.md +++ b/docs/sources/panels-visualizations/query-transform-data/transform-data/index.md @@ -995,11 +995,10 @@ Here is the result after adding a Limit transformation with a value of '3': ### Time series to table transform -> **Note:** This transformation is available in Grafana 9.5+ as an opt-in beta feature. -> Modify Grafana [configuration file][] to enable the `timeSeriesTable` [feature toggle][] to use it. - Use this transformation to convert time series result into a table, converting time series data frame into a "Trend" field. "Trend" field can then be rendered using [sparkline cell type][], producing an inline sparkline for each table row. If there are multiple time series queries, each will result in a separate table data frame. These can be joined using join or merge transforms to produce a single table with multiple sparklines per row. +For each generated "Trend" field value calculation function can be selected. Default is "last non null value". This value will be displayed next to the sparkline and used for sorting table rows. + ### Format Time {{% admonition type="note" %}} @@ -1008,6 +1007,23 @@ This transformation is available in Grafana 10.1+ as an alpha feature. Use this transformation to format the output of a time field. Output can be formatted using (Moment.js format strings)[https://momentjs.com/docs/#/displaying/]. For instance, if you would like to display only the year of a time field the format string `YYYY` can be used to show the calendar year (e.g. 1999, 2012, etc.). +### Format string + +> **Note:** This transformation is an experimental feature. Engineering and on-call support is not available. Documentation is either limited or not provided outside of code comments. No SLA is provided. Enable the `formatString` in Grafana to use this feature. Contact Grafana Support to enable this feature in Grafana Cloud. + +Use this transformation to format the output of a string field. You can format output in the following ways: + +- Upper case - Formats the entire string in upper case characters. +- Lower case - Formats the entire string in lower case characters. +- Sentence case - Formats the the first character of the string in upper case. +- Title case - Formats the first character of each word in the string in upper case. +- Pascal case - Formats the first character of each word in the string in upper case and doesn't include spaces between words. +- Camel case - Formats the first character of each word in the string in upper case, except the first word, and doesn't include spaces between words. +- Snake case - Formats all characters in the string in lower case and uses underscores instead of spaces between words. +- Kebab case - Formats all characters in the string in lower case and uses dashes instead of spaces between words. +- Trim - Removes all leading and trailing spaces from the string. +- Substring - Returns a substring of the string, using the specified start and end positions. + {{% docs/reference %}} [Table panel]: "/docs/grafana/ -> /docs/grafana//panels-visualizations/visualizations/table" [Table panel]: "/docs/grafana-cloud/ -> /docs/grafana//panels-visualizations/visualizations/table" diff --git a/docs/sources/panels-visualizations/visualizations/table/index.md b/docs/sources/panels-visualizations/visualizations/table/index.md index 2f63da7e8251a..8459bf2b13f62 100644 --- a/docs/sources/panels-visualizations/visualizations/table/index.md +++ b/docs/sources/panels-visualizations/visualizations/table/index.md @@ -148,12 +148,9 @@ If you have a field value that is an image URL or a base64 encoded image you can ### Sparkline -> **Note:** This cell type is available in Grafana 9.5+ as an opt-in beta feature. -> Modify Grafana [configuration file][] to enable the `timeSeriesTable` [feature toggle][] to use it. - Shows value rendered as a sparkline. Requires [time series to table][] data transform. -{{< figure src="/static/img/docs/tables/sparkline.png" max-width="500px" caption="Sparkline" class="docs-image--no-shadow" >}} +{{< figure src="/static/img/docs/tables/sparkline2.png" max-width="500px" caption="Sparkline" class="docs-image--no-shadow" >}} ## Cell value inspect diff --git a/docs/sources/setup-grafana/configure-grafana/configure-custom-branding/index.md b/docs/sources/setup-grafana/configure-grafana/configure-custom-branding/index.md index ff0634252eb50..f85ebfd30ee21 100644 --- a/docs/sources/setup-grafana/configure-grafana/configure-custom-branding/index.md +++ b/docs/sources/setup-grafana/configure-grafana/configure-custom-branding/index.md @@ -120,18 +120,22 @@ To customize the footer of a public dashboard, add the following section to the ```ini [white_labeling.public_dashboards] -# Hides the footer for the public dashboards if set to "true". If +# Hides the footer for the public dashboards if set to `true`. # example: footer_hide = "true" ;footer_hide = # Set to text shown in the footer ;footer_text = -# Set to complete url to override public dashboard footer logo +# Set to complete url to override public dashboard footer logo. Default is `grafana-logo` and will display the Grafana logo. +# An empty value will hide the footer logo. ;footer_logo = # Set to link for the footer ;footer_link = + +# Set to `true` to hide the Grafana logo next to the title +;header_logo_hide = ``` If you specify `footer_hide` to `true`, all the other values are ignored because the footer will not be shown. diff --git a/docs/sources/setup-grafana/configure-grafana/enterprise-configuration/index.md b/docs/sources/setup-grafana/configure-grafana/enterprise-configuration/index.md index 986fb532aebdf..08da0da11bbdd 100644 --- a/docs/sources/setup-grafana/configure-grafana/enterprise-configuration/index.md +++ b/docs/sources/setup-grafana/configure-grafana/enterprise-configuration/index.md @@ -316,6 +316,10 @@ List of comma- or space-separated organizations. Each user must be a member of a List of comma- or space-separated Organization:OrgId:Role mappings. Organization can be `*` meaning "All users". Role is optional and can have the following values: `Admin`, `Editor` ,`Viewer` or `None`. +### role_values_none + +List of comma- or space-separated roles that will be mapped to the None role. + ### role_values_editor List of comma- or space-separated roles that will be mapped to the Editor role. diff --git a/docs/sources/setup-grafana/configure-grafana/feature-toggles/index.md b/docs/sources/setup-grafana/configure-grafana/feature-toggles/index.md index a2631cd9f0494..553de14518a73 100644 --- a/docs/sources/setup-grafana/configure-grafana/feature-toggles/index.md +++ b/docs/sources/setup-grafana/configure-grafana/feature-toggles/index.md @@ -19,38 +19,40 @@ This page contains a list of available feature toggles. To learn how to turn on Some features are enabled by default. You can disable these feature by setting the feature flag to "false" in the configuration. -| Feature toggle name | Description | Enabled by default | -| ------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------ | -| `disableEnvelopeEncryption` | Disable envelope encryption (emergency only) | | -| `featureHighlights` | Highlight Grafana Enterprise features | | -| `dataConnectionsConsole` | Enables a new top-level page called Connections. This page is an experiment that provides a better experience when you install and configure data sources and other plugins. | Yes | -| `cloudWatchCrossAccountQuerying` | Enables cross-account querying in CloudWatch datasources | Yes | -| `redshiftAsyncQueryDataSupport` | Enable async query data support for Redshift | Yes | -| `athenaAsyncQueryDataSupport` | Enable async query data support for Athena | Yes | -| `cloudwatchNewRegionsHandler` | Refactor of /regions endpoint, no user-facing changes | Yes | -| `nestedFolderPicker` | Enables the new folder picker to work with nested folders. Requires the nestedFolders feature flag | Yes | -| `accessTokenExpirationCheck` | Enable OAuth access_token expiration check and token refresh using the refresh_token | | -| `emptyDashboardPage` | Enable the redesigned user interface of a dashboard page that includes no panels | Yes | -| `disablePrometheusExemplarSampling` | Disable Prometheus exemplar sampling | | -| `logsContextDatasourceUi` | Allow datasource to provide custom UI for context view | Yes | -| `gcomOnlyExternalOrgRoleSync` | Prohibits a user from changing organization roles synced with Grafana Cloud auth provider | | -| `prometheusMetricEncyclopedia` | Adds the metrics explorer component to the Prometheus query builder as an option in metric select | Yes | -| `prometheusDataplane` | Changes responses to from Prometheus to be compliant with the dataplane specification. In particular it sets the numeric Field.Name from 'Value' to the value of the `__name__` label when present. | Yes | -| `lokiMetricDataplane` | Changes metric responses from Loki to be compliant with the dataplane specification. | Yes | -| `dataplaneFrontendFallback` | Support dataplane contract field name change for transformations and field name matchers where the name is different | Yes | -| `alertingNotificationsPoliciesMatchingInstances` | Enables the preview of matching instances for notification policies | Yes | -| `useCachingService` | When turned on, the new query and resource caching implementation using a wire service inject will be used in place of the previous middleware implementation | | -| `enableElasticsearchBackendQuerying` | Enable the processing of queries and responses in the Elasticsearch data source through backend | Yes | -| `advancedDataSourcePicker` | Enable a new data source picker with contextual information, recently used order and advanced mode | Yes | -| `cloudWatchLogsMonacoEditor` | Enables the Monaco editor for CloudWatch Logs queries | Yes | -| `recordedQueriesMulti` | Enables writing multiple items from a single query within Recorded Queries | Yes | -| `transformationsRedesign` | Enables the transformations redesign | Yes | -| `toggleLabelsInLogsUI` | Enable toggleable filters in log details view | Yes | -| `azureMonitorDataplane` | Adds dataplane compliant frame metadata in the Azure Monitor datasource | Yes | -| `prometheusConfigOverhaulAuth` | Update the Prometheus configuration page with the new auth component | Yes | -| `newBrowseDashboards` | New browse/manage dashboards UI | Yes | -| `alertingInsights` | Show the new alerting insights landing page | Yes | -| `cloudWatchWildCardDimensionValues` | Fetches dimension values from CloudWatch to correctly label wildcard dimensions | Yes | +| Feature toggle name | Description | Enabled by default | +| ------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------ | +| `disableEnvelopeEncryption` | Disable envelope encryption (emergency only) | | +| `publicDashboards` | Enables public access to dashboards | Yes | +| `featureHighlights` | Highlight Grafana Enterprise features | | +| `exploreContentOutline` | Content outline sidebar | Yes | +| `dataConnectionsConsole` | Enables a new top-level page called Connections. This page is an experiment that provides a better experience when you install and configure data sources and other plugins. | Yes | +| `cloudWatchCrossAccountQuerying` | Enables cross-account querying in CloudWatch datasources | Yes | +| `redshiftAsyncQueryDataSupport` | Enable async query data support for Redshift | Yes | +| `athenaAsyncQueryDataSupport` | Enable async query data support for Athena | Yes | +| `nestedFolderPicker` | Enables the new folder picker to work with nested folders. Requires the nestedFolders feature toggle | Yes | +| `accessTokenExpirationCheck` | Enable OAuth access_token expiration check and token refresh using the refresh_token | | +| `emptyDashboardPage` | Enable the redesigned user interface of a dashboard page that includes no panels | Yes | +| `disablePrometheusExemplarSampling` | Disable Prometheus exemplar sampling | | +| `logsContextDatasourceUi` | Allow datasource to provide custom UI for context view | Yes | +| `gcomOnlyExternalOrgRoleSync` | Prohibits a user from changing organization roles synced with Grafana Cloud auth provider | | +| `prometheusMetricEncyclopedia` | Adds the metrics explorer component to the Prometheus query builder as an option in metric select | Yes | +| `influxdbBackendMigration` | Query InfluxDB InfluxQL without the proxy | Yes | +| `prometheusDataplane` | Changes responses to from Prometheus to be compliant with the dataplane specification. In particular, when this feature toggle is active, the numeric `Field.Name` is set from 'Value' to the value of the `__name__` label. | Yes | +| `lokiMetricDataplane` | Changes metric responses from Loki to be compliant with the dataplane specification. | Yes | +| `dataplaneFrontendFallback` | Support dataplane contract field name change for transformations and field name matchers where the name is different | Yes | +| `alertingNotificationsPoliciesMatchingInstances` | Enables the preview of matching instances for notification policies | Yes | +| `useCachingService` | When active, the new query and resource caching implementation using a wire service inject replaces the previous middleware implementation. | | +| `enableElasticsearchBackendQuerying` | Enable the processing of queries and responses in the Elasticsearch data source through backend | Yes | +| `advancedDataSourcePicker` | Enable a new data source picker with contextual information, recently used order and advanced mode | Yes | +| `cloudWatchLogsMonacoEditor` | Enables the Monaco editor for CloudWatch Logs queries | Yes | +| `recordedQueriesMulti` | Enables writing multiple items from a single query within Recorded Queries | Yes | +| `transformationsRedesign` | Enables the transformations redesign | Yes | +| `toggleLabelsInLogsUI` | Enable toggleable filters in log details view | Yes | +| `azureMonitorDataplane` | Adds dataplane compliant frame metadata in the Azure Monitor datasource | Yes | +| `prometheusConfigOverhaulAuth` | Update the Prometheus configuration page with the new auth component | Yes | +| `newBrowseDashboards` | New browse/manage dashboards UI | Yes | +| `alertingInsights` | Show the new alerting insights landing page | Yes | +| `cloudWatchWildCardDimensionValues` | Fetches dimension values from CloudWatch to correctly label wildcard dimensions | Yes | ## Preview feature toggles @@ -58,7 +60,6 @@ Some features are enabled by default. You can disable these feature by setting t | -------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `trimDefaults` | Use cue schema to remove values that will be applied automatically | | `panelTitleSearch` | Search for dashboards using panel title | -| `publicDashboards` | Enables public access to dashboards | | `migrationLocking` | Lock database during migrations | | `correlations` | Correlations page | | `newDBLibrary` | Use jmoiron/sqlx rather than xorm for a few backend services | @@ -68,7 +69,6 @@ Some features are enabled by default. You can disable these feature by setting t | `accessControlOnCall` | Access control primitives for OnCall | | `nestedFolders` | Enable folder nesting | | `alertingNoNormalState` | Stop maintaining state of alerts that are not firing | -| `influxdbBackendMigration` | Query InfluxDB InfluxQL without the proxy | | `renderAuthJWT` | Uses JWT-based auth for rendering instead of relying on remote cache | | `refactorVariablesTimeRange` | Refactor time range variables flow to reduce number of API calls made when query variables are chained | | `faroDatasourceSelector` | Enable the data source selector within the Frontend Apps section of the Frontend Observability | @@ -84,71 +84,75 @@ Some features are enabled by default. You can disable these feature by setting t These features are early in their development lifecycle and so are not yet supported in Grafana Cloud. 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 | -| `lokiExperimentalStreaming` | Support new streaming approach for loki (prototype, needs special loki build) | -| `storage` | Configurable storage for dashboards, datasources, and resources | -| `datasourceQueryMultiStatus` | Introduce HTTP 207 Multi Status for api/ds/query | -| `traceToMetrics` | Enable trace to metrics links | -| `canvasPanelNesting` | Allow elements nesting | -| `scenes` | Experimental framework to build interactive dashboards | -| `disableSecretsCompatibility` | Disable duplicated secret storage in legacy tables | -| `logRequestsInstrumentedAsUnknown` | Logs the path for requests that are instrumented as unknown | -| `dockedMegaMenu` | Enable support for a persistent (docked) navigation menu | -| `showDashboardValidationWarnings` | Show warnings when dashboards do not validate against the schema | -| `mysqlAnsiQuotes` | Use double quotes to escape keyword in a MySQL query | -| `alertingBacktesting` | Rule backtesting API for alerting | -| `editPanelCSVDragAndDrop` | Enables drag and drop for CSV and Excel files | -| `lokiQuerySplitting` | Split large interval queries into subqueries with smaller time intervals | -| `lokiQuerySplittingConfig` | Give users the option to configure split durations for Loki queries | -| `individualCookiePreferences` | Support overriding cookie preferences per user | -| `timeSeriesTable` | Enable time series table transformer & sparkline cell type | -| `clientTokenRotation` | Replaces the current in-request token rotation so that the client initiates the rotation | -| `lokiLogsDataplane` | Changes logs responses from Loki to be compliant with the dataplane specification. | -| `disableSSEDataplane` | Disables dataplane specific processing in server side expressions. | -| `alertStateHistoryLokiSecondary` | Enable Grafana to write alert state history to an external Loki instance in addition to Grafana annotations. | -| `alertStateHistoryLokiPrimary` | Enable a remote Loki instance as the primary source for state history reads. | -| `alertStateHistoryLokiOnly` | Disable Grafana alerts from emitting annotations when a remote Loki instance is available. | -| `unifiedRequestLog` | Writes error logs to the request logger | -| `extraThemes` | Enables extra themes | -| `lokiPredefinedOperations` | Adds predefined query operations to Loki query editor | -| `pluginsFrontendSandbox` | Enables the plugins frontend sandbox | -| `dashboardEmbed` | Allow embedding dashboard for external use in Code editors | -| `frontendSandboxMonitorOnly` | Enables monitor only in the plugin frontend sandbox (if enabled) | -| `lokiFormatQuery` | Enables the ability to format Loki queries | -| `exploreScrollableLogsContainer` | Improves the scrolling behavior of logs in Explore | -| `pluginsDynamicAngularDetectionPatterns` | Enables fetching Angular detection patterns for plugins from GCOM and fallback to hardcoded ones | -| `vizAndWidgetSplit` | Split panels between visualizations and widgets | -| `prometheusIncrementalQueryInstrumentation` | Adds RudderStack events to incremental queries | -| `logsExploreTableVisualisation` | A table visualisation for logs in Explore | -| `awsDatasourcesTempCredentials` | Support temporary security credentials in AWS plugins for Grafana Cloud customers | -| `mlExpressions` | Enable support for Machine Learning in server-side expressions | -| `traceQLStreaming` | Enables response streaming of TraceQL queries of the Tempo data source | -| `metricsSummary` | Enables metrics summary queries in the Tempo data source | -| `grafanaAPIServer` | Enable Kubernetes API Server for Grafana resources | -| `grafanaAPIServerWithExperimentalAPIs` | Register experimental APIs with the k8s API server | -| `featureToggleAdminPage` | Enable admin page for managing feature toggles from the Grafana front-end | -| `permissionsFilterRemoveSubquery` | Alternative permission filter implementation that does not use subqueries for fetching the dashboard folder | -| `influxdbSqlSupport` | Enable InfluxDB SQL query language support with new querying UI | -| `angularDeprecationUI` | Display new Angular deprecation-related UI features | -| `dashgpt` | Enable AI powered features in dashboards | -| `sseGroupByDatasource` | Send query to the same datasource in a single request when using server side expressions | -| `requestInstrumentationStatusSource` | Include a status source label for request metrics and logs | -| `libraryPanelRBAC` | Enables RBAC support for library panels | -| `wargamesTesting` | Placeholder feature flag for internal testing | -| `externalCorePlugins` | Allow core plugins to be loaded as external | -| `pluginsAPIMetrics` | Sends metrics of public grafana packages usage by plugins | -| `httpSLOLevels` | Adds SLO level to http request metrics | -| `alertingModifiedExport` | Enables using UI for provisioned rules modification and export | -| `panelMonitoring` | Enables panel monitoring through logs and measurements | -| `enableNativeHTTPHistogram` | Enables native HTTP Histograms | -| `transformationsVariableSupport` | Allows using variables in transformations | -| `kubernetesPlaylists` | Use the kubernetes API in the frontend for playlists | -| `navAdminSubsections` | Splits the administration section of the nav tree into subsections | -| `recoveryThreshold` | Enables feature recovery threshold (aka hysteresis) for threshold server-side expression | -| `awsDatasourcesNewFormStyling` | Applies new form styling for configuration and query editors in AWS plugins | +| 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 | +| `lokiExperimentalStreaming` | Support new streaming approach for loki (prototype, needs special loki build) | +| `storage` | Configurable storage for dashboards, datasources, and resources | +| `datasourceQueryMultiStatus` | Introduce HTTP 207 Multi Status for api/ds/query | +| `traceToMetrics` | Enable trace to metrics links | +| `canvasPanelNesting` | Allow elements nesting | +| `scenes` | Experimental framework to build interactive dashboards | +| `disableSecretsCompatibility` | Disable duplicated secret storage in legacy tables | +| `logRequestsInstrumentedAsUnknown` | Logs the path for requests that are instrumented as unknown | +| `dockedMegaMenu` | Enable support for a persistent (docked) navigation menu | +| `cloudwatchNewRegionsHandler` | Refactor of /regions endpoint, no user-facing changes | +| `showDashboardValidationWarnings` | Show warnings when dashboards do not validate against the schema | +| `mysqlAnsiQuotes` | Use double quotes to escape keyword in a MySQL query | +| `alertingBacktesting` | Rule backtesting API for alerting | +| `editPanelCSVDragAndDrop` | Enables drag and drop for CSV and Excel files | +| `lokiQuerySplitting` | Split large interval queries into subqueries with smaller time intervals | +| `lokiQuerySplittingConfig` | Give users the option to configure split durations for Loki queries | +| `individualCookiePreferences` | Support overriding cookie preferences per user | +| `clientTokenRotation` | Replaces the current in-request token rotation so that the client initiates the rotation | +| `lokiLogsDataplane` | Changes logs responses from Loki to be compliant with the dataplane specification. | +| `disableSSEDataplane` | Disables dataplane specific processing in server side expressions. | +| `alertStateHistoryLokiSecondary` | Enable Grafana to write alert state history to an external Loki instance in addition to Grafana annotations. | +| `alertStateHistoryLokiPrimary` | Enable a remote Loki instance as the primary source for state history reads. | +| `alertStateHistoryLokiOnly` | Disable Grafana alerts from emitting annotations when a remote Loki instance is available. | +| `unifiedRequestLog` | Writes error logs to the request logger | +| `extraThemes` | Enables extra themes | +| `lokiPredefinedOperations` | Adds predefined query operations to Loki query editor | +| `pluginsFrontendSandbox` | Enables the plugins frontend sandbox | +| `dashboardEmbed` | Allow embedding dashboard for external use in Code editors | +| `frontendSandboxMonitorOnly` | Enables monitor only in the plugin frontend sandbox (if enabled) | +| `lokiFormatQuery` | Enables the ability to format Loki queries | +| `exploreScrollableLogsContainer` | Improves the scrolling behavior of logs in Explore | +| `pluginsDynamicAngularDetectionPatterns` | Enables fetching Angular detection patterns for plugins from GCOM and fallback to hardcoded ones | +| `vizAndWidgetSplit` | Split panels between visualizations and widgets | +| `prometheusIncrementalQueryInstrumentation` | Adds RudderStack events to incremental queries | +| `logsExploreTableVisualisation` | A table visualisation for logs in Explore | +| `awsDatasourcesTempCredentials` | Support temporary security credentials in AWS plugins for Grafana Cloud customers | +| `mlExpressions` | Enable support for Machine Learning in server-side expressions | +| `traceQLStreaming` | Enables response streaming of TraceQL queries of the Tempo data source | +| `metricsSummary` | Enables metrics summary queries in the Tempo data source | +| `grafanaAPIServer` | Enable Kubernetes API Server for Grafana resources | +| `grafanaAPIServerWithExperimentalAPIs` | Register experimental APIs with the k8s API server | +| `featureToggleAdminPage` | Enable admin page for managing feature toggles from the Grafana front-end | +| `permissionsFilterRemoveSubquery` | Alternative permission filter implementation that does not use subqueries for fetching the dashboard folder | +| `influxdbSqlSupport` | Enable InfluxDB SQL query language support with new querying UI | +| `angularDeprecationUI` | Display new Angular deprecation-related UI features | +| `dashgpt` | Enable AI powered features in dashboards | +| `sseGroupByDatasource` | Send query to the same datasource in a single request when using server side expressions | +| `requestInstrumentationStatusSource` | Include a status source label for request metrics and logs | +| `libraryPanelRBAC` | Enables RBAC support for library panels | +| `wargamesTesting` | Placeholder feature flag for internal testing | +| `externalCorePlugins` | Allow core plugins to be loaded as external | +| `pluginsAPIMetrics` | Sends metrics of public grafana packages usage by plugins | +| `httpSLOLevels` | Adds SLO level to http request metrics | +| `panelMonitoring` | Enables panel monitoring through logs and measurements | +| `enableNativeHTTPHistogram` | Enables native HTTP Histograms | +| `formatString` | Enable format string transformer | +| `transformationsVariableSupport` | Allows using variables in transformations | +| `kubernetesPlaylists` | Use the kubernetes API in the frontend for playlists | +| `navAdminSubsections` | Splits the administration section of the nav tree into subsections | +| `recoveryThreshold` | Enables feature recovery threshold (aka hysteresis) for threshold server-side expression | +| `teamHttpHeaders` | Enables datasources to apply team headers to the client requests | +| `awsDatasourcesNewFormStyling` | Applies new form styling for configuration and query editors in AWS plugins | +| `cachingOptimizeSerializationMemoryUsage` | If enabled, the caching backend gradually serializes query responses for the cache, comparing against the configured `[caching]max_value_mb` value as it goes. This can can help prevent Grafana from running out of memory while attempting to cache very large query responses. | +| `pluginsInstrumentationStatusSource` | Include a status source label for plugin request metrics and logs | +| `costManagementUi` | Toggles the display of the cost management ui plugin | ## Development feature toggles @@ -160,3 +164,4 @@ The following toggles require explicitly setting Grafana's [app mode]({{< relref | `externalServiceAuth` | Starts an OAuth2 authentication provider for external services | | `idForwarding` | Generate signed id token for identity that can be forwarded to plugins and external services | | `externalServiceAccounts` | Automatic service account and token setup for plugins | +| `panelTitleSearchInV1` | Enable searching for dashboards using panel title in search v1 | diff --git a/docs/sources/setup-grafana/configure-security/configure-authentication/saml/index.md b/docs/sources/setup-grafana/configure-security/configure-authentication/saml/index.md index b4372fb706838..99c6ccd74be2f 100644 --- a/docs/sources/setup-grafana/configure-security/configure-authentication/saml/index.md +++ b/docs/sources/setup-grafana/configure-security/configure-authentication/saml/index.md @@ -194,6 +194,7 @@ The table below describes all SAML configuration options. Continue reading below | `assertion_attribute_org` | No | Friendly name or name of the attribute within the SAML assertion to use as the user organization | | | `allowed_organizations` | No | List of comma- or space-separated organizations. User should be a member of at least one organization to log in. | | | `org_mapping` | No | List of comma- or space-separated Organization:OrgId:Role mappings. Organization can be `*` meaning "All users". Role is optional and can have the following values: `Viewer`, `Editor` or `Admin`. | | +| `role_values_none` | No | List of comma- or space-separated roles which will be mapped into the None role | | | `role_values_editor` | No | List of comma- or space-separated roles which will be mapped into the Editor role | | | `role_values_admin` | No | List of comma- or space-separated roles which will be mapped into the Admin role | | | `role_values_grafana_admin` | No | List of comma- or space-separated roles which will be mapped into the Grafana Admin (Super Admin) role | | @@ -364,6 +365,7 @@ Available in Grafana version 7.0 and later. Role sync allows you to map user roles from an identity provider to Grafana. To enable role sync, configure role attribute and possible values for the Editor, Admin, and Grafana Admin roles. For more information about user roles, refer to [Roles and permissions]({{< relref "../../../../administration/roles-and-permissions" >}}). 1. In the configuration file, set [`assertion_attribute_role`]({{< relref "../../../configure-grafana/enterprise-configuration#assertion_attribute_role" >}}) option to the attribute name where the role information will be extracted from. +1. Set the [`role_values_none`]({{< relref "../../../configure-grafana/enterprise-configuration#role_values_none" >}}) option to the values mapped to the `None` role. 1. Set the [`role_values_editor`]({{< relref "../../../configure-grafana/enterprise-configuration#role_values_editor" >}}) option to the values mapped to the `Editor` role. 1. Set the [`role_values_admin`]({{< relref "../../../configure-grafana/enterprise-configuration#role_values_admin" >}}) option to the values mapped to the organization `Admin` role. 1. Set the [`role_values_grafana_admin`]({{< relref "../../../configure-grafana/enterprise-configuration#role_values_grafana_admin" >}}) option to the values mapped to the `Grafana Admin` role. @@ -377,6 +379,7 @@ Example configuration: ```ini [auth.saml] assertion_attribute_role = role +role_values_none = none, external role_values_editor = editor, developer role_values_admin = admin, operator role_values_grafana_admin = superadmin diff --git a/docs/sources/setup-grafana/installation/docker/index.md b/docs/sources/setup-grafana/installation/docker/index.md index a2232db127791..31ae58ffe544e 100644 --- a/docs/sources/setup-grafana/installation/docker/index.md +++ b/docs/sources/setup-grafana/installation/docker/index.md @@ -38,15 +38,11 @@ docker run -d -p 3000:3000 --name=grafana grafana/grafana-enterprise Where: -run = run directly from the command line - -`d` = run in the background - -`p` = assign the port number, which in this case is `3000` - -`name` = assign a logical name to the container, for example, `grafana` - -`grafana/grafana-enterprise` = the image to run in the container +- [`docker run`](https://docs.docker.com/engine/reference/commandline/run/) is a Docker CLI command that runs a new container from an image +- `-d` (`--detach`) runs the container in the background +- `-p :` (`--publish`) publish a container's port(s) to the host, allowing you to reach the container's port via a host port. In this case, we can reach the container's port `3000` via the host's port `3000` +- `--name` assign a logical name to the container (e.g. `grafana`). This allows you to refer to the container by name instead of by ID. +- `grafana/grafana-enterprise` is the image to run ### Stop the Grafana container @@ -68,24 +64,24 @@ docker stop grafana ### Save your Grafana data -When you use Docker containers, their data is temporary by default. If you don't specify where to store the information, all the Grafana data will be lost when you stop the Docker container. To avoid losing your data, you can set up [persistent storage](https://docs.docker.com/storage/volumes/) or [bind mounts](https://docs.docker.com/storage/bind-mounts/) for your container. +By default, Grafana uses an embedded SQLite version 3 database to store configuration, users, dashboards, and other data. When you run Docker images as containers, changes to these Grafana data are written to the filesystem within the container, which will only persist for as long as the container exists. If you stop and remove the container, any filesystem changes (i.e. the Grafana data) will be discarded. To avoid losing your data, you can set up persistent storage using [Docker volumes](https://docs.docker.com/storage/volumes/) or [bind mounts](https://docs.docker.com/storage/bind-mounts/) for your container. > **Note:** Though both methods are similar, there is a slight difference. If you want your storage to be fully managed by Docker and accessed only through Docker containers and the Docker CLI, you should choose to use persistent storage. However, if you need full control of the storage and want to allow other processes besides Docker to access or modify the storage layer, then bind mounts is the right choice for your environment. -#### Use persistent storage (recommended) +#### Use Docker volumes (recommended) -It is recommended to have persistent storage because, without it, all data will be lost once the container is shut down. Use this method when you want the Docker service to manage the storage volume fully. +Use Docker volumes when you want the Docker Engine to manage the storage volume. -To use persistent storage, complete the following steps: +To use Docker volumes for persistent storage, complete the following steps: -1. Create a Grafana Docker volume `grafana-storage` by running the following commands: +1. Create a Docker volume to be used by the Grafana container, giving it a descriptive name (e.g. `grafana-storage`). Run the following command: ```bash # create a persistent volume for your data docker volume create grafana-storage # verify that the volume was created correctly - # you should see a json output + # you should see some JSON output docker volume inspect grafana-storage ``` @@ -99,15 +95,15 @@ To use persistent storage, complete the following steps: #### Use bind mounts -If you plan to use folders on your host for the database or configuration when running Grafana in Docker, you must start the container with a user with permission to access and write to the folder you map. +If you plan to use directories on your host for the database or configuration when running Grafana in Docker, you must start the container with a user with permission to access and write to the directory you map. To use bind mounts, run the following command: ```bash -# create a folder for your data +# create a directory for your data mkdir data -# start grafana with your user id and using the data folder +# start grafana with your user id and using the data directory docker run -d -p 3000:3000 --name=grafana \ --user "$(id -u)" \ --volume "$PWD/data:/var/lib/grafana" \ @@ -158,7 +154,7 @@ To install plugins in the Docker container, complete the following steps: > **Note:** If you do not specify a version number, the latest version is used. -1. To install a plugin from a custom URL, use the following convention to specify the URL: `;`. +1. To install a plugin from a custom URL, use the following convention to specify the URL: `;`. For example: @@ -170,7 +166,7 @@ To install plugins in the Docker container, complete the following steps: ## Example -The following example runs the latest stable version of Grafana, listening on port 3000, with the container named `grafana`, persistent storage in the grafana-storage docker volume, the server root URL set, and the official [clock panel](/grafana/plugins/grafana-clock-panel) plugin installed. +The following example runs the latest stable version of Grafana, listening on port 3000, with the container named `grafana`, persistent storage in the `grafana-storage` docker volume, the server root URL set, and the official [clock panel](/grafana/plugins/grafana-clock-panel) plugin installed. ```bash # create a persistent volume for your data @@ -212,7 +208,7 @@ To run the latest stable version of Grafana using Docker Compose, complete the f ```bash # first go into the directory where you have created this docker-compose.yaml file - cd /path/to/docker-compose-folder + cd /path/to/docker-compose-directory # now create the docker-compose.yaml file touch docker-compose.yaml @@ -260,19 +256,19 @@ docker compose down ### Save your Grafana data -When you use Docker containers, their data is temporary by default. If you don't specify where to store the information, all the Grafana data will be lost when you stop the Docker container. To avoid losing your data, you can set up [persistent storage](https://docs.docker.com/storage/volumes/) or [bind mounts](https://docs.docker.com/storage/bind-mounts/) for your container. +By default, Grafana uses an embedded SQLite version 3 database to store configuration, users, dashboards, and other data. When you run Docker images as containers, changes to these Grafana data are written to the filesystem within the container, which will only persist for as long as the container exists. If you stop and remove the container, any filesystem changes (i.e. the Grafana data) will be discarded. To avoid losing your data, you can set up persistent storage using [Docker volumes](https://docs.docker.com/storage/volumes/) or [bind mounts](https://docs.docker.com/storage/bind-mounts/) for your container. -#### Use persistent storage (recommended) +#### Use Docker volumes (recommended) -It is recommended to have persistent storage because without it, all data will be lost once the container is shut down. Use this method when you want the Docker service to fully manage the storage volume. +Use Docker volumes when you want the Docker Engine to manage the storage volume. -Complete the following steps to use persistent storage. +To use Docker volumes for persistent storage, complete the following steps: 1. Create a `docker-compose.yaml` file ```bash # first go into the directory where you have created this docker-compose.yaml file - cd /path/to/docker-compose-folder + cd /path/to/docker-compose-directory # now create the docker-compose.yaml file touch docker-compose.yaml @@ -290,9 +286,9 @@ Complete the following steps to use persistent storage. ports: - '3000:3000' volumes: - - grafana_data:/var/lib/grafana + - grafana-storage:/var/lib/grafana volumes: - grafana_data: {} + grafana-storage: {} ``` 1. Save the file and run the following command: @@ -303,7 +299,7 @@ Complete the following steps to use persistent storage. #### Use bind mounts -If you plan to use folders on your host for the database or configuration when running Grafana in Docker, you must start the container with a user that has the permission to access and write to the folder you map. +If you plan to use directories on your host for the database or configuration when running Grafana in Docker, you must start the container with a user that has the permission to access and write to the directory you map. To use bind mounts, complete the following steps: @@ -311,13 +307,13 @@ To use bind mounts, complete the following steps: ```bash # first go into the directory where you have created this docker-compose.yaml file - cd /path/to/docker-compose-folder + cd /path/to/docker-compose-directory # now create the docker-compose.yaml file touch docker-compose.yaml ``` -1. Create the folder where you will be mounting your data, in this case is `/data` e.g. in your current working directory: +1. Create the directory where you will be mounting your data, in this case is `/data` e.g. in your current working directory: ```bash mkdir $PWD/data @@ -350,7 +346,7 @@ To use bind mounts, complete the following steps: ### Example -The following example runs the latest stable version of Grafana, listening on port 3000, with the container named `grafana`, persistent storage in the grafana-storage docker volume, the server root URL set, and the official [clock panel](/grafana/plugins/grafana-clock-panel) plugin installed. +The following example runs the latest stable version of Grafana, listening on port 3000, with the container named `grafana`, persistent storage in the `grafana-storage` docker volume, the server root URL set, and the official [clock panel](/grafana/plugins/grafana-clock-panel/) plugin installed. ```bash version: "3.8" diff --git a/docs/sources/whatsnew/whats-new-next/README.md b/docs/sources/whatsnew/whats-new-next/README.md index f0bbaa6ee75b3..2fbaf560b8e74 100644 --- a/docs/sources/whatsnew/whats-new-next/README.md +++ b/docs/sources/whatsnew/whats-new-next/README.md @@ -10,6 +10,8 @@ Use the following template, replace any `` with the appropriate text ( + + _Available in in Grafana _ @@ -31,6 +33,10 @@ Intended availability of the feature when released outside of Grafana Cloud. The information is intentionally commented out so that it isn't displayed in the published page. If the feature is not going to be released outside of Grafana Cloud, omit the HTML comment entirely. +## _`DATE`_ + +The release date of the feature, fully written out. For example: September 12, 2023. + ## _`CLOUD AVAILABILITY`_ One of the following [release life cycle stages](https://grafana.com/docs/release-life-cycle/): @@ -72,6 +78,8 @@ For example, using the partial URL `/docs/grafana/next/explore/` to link to the +September 12, 2023 + _Available in public preview in Grafana Cloud Pro and Advanced_ The navigation in Grafana Cloud has been updated in the following ways... diff --git a/docs/sources/whatsnew/whats-new-next/index.md b/docs/sources/whatsnew/whats-new-next/index.md index 724719b637cbc..63cfe1541d410 100644 --- a/docs/sources/whatsnew/whats-new-next/index.md +++ b/docs/sources/whatsnew/whats-new-next/index.md @@ -18,10 +18,226 @@ weight: -37 Welcome to Grafana Cloud! Read on to learn about the newest changes to Grafana Cloud. +## Alerting insights + + + +October 30, 2023 + +_Generally available in Grafana Cloud_ + +Use Alerting insights to monitor your alerting data, discover key trends about your organization’s alert management performance, and find patterns in why things go wrong. + +## Correlations editor in Explore + + + + + +October 3, 2023 + +_Available in public preview in Grafana Cloud_ + +Creating correlations has just become easier. Try out our new correlations editor in **Explore** by selecting the **+ Add > Add correlation** option from the top bar or from the command palette. The editor shows all possible places where you can place data links and guides you through building and testing target queries. For more information, refer to [the documentation](https://grafana.com/docs/grafana//administration/correlations/). + +To enable this feature, contact Grafana Support. + +## Create correlations for provisioned data sources + + + + + +September 13, 2023 + +_Available in public preview in Grafana Cloud_ + +You can now create correlations using either the **Administration** page or provisioning, regardless of whether a data source was provisioned or not. In previous versions of Grafana, if a data source was provisioned, the only way to add correlations to it was also with provisioning. Now, that's no longer the case, and you can easily create new correlations mixing both methods—using the **Administration** page or provisioning. + +To enable this feature, contact Grafana Support. + +## Tempo data source: "Aggregate By" Search option to compute RED metrics over spans aggregated by attribute + + + + +October 24, 2023 + +_Experimental in Grafana Cloud_ + +We've added an **Aggregate By** option to the [TraceQL query editor](https://grafana.com/docs/grafana//datasources/tempo/query-editor/traceql-search/#write-traceql-queries-using-search) to leverage Grafana Cloud Traces' [metrics summary API](https://grafana.com/docs/grafana-cloud/monitor-infrastructure/traces/metrics-summary-api/). You can calculate RED metrics (total span count, percent erroring spans, and latency information) for spans of `kind=server` received in the last hour that match your filter criteria, grouped by whatever attributes you specify. + +This feature is disabled by default. To enable it, file contact Grafana Support. + +For more information, refer to the [documentation](https://grafana.com/docs/grafana//datasources/tempo/query-editor/traceql-search/#optional-use-aggregate-by). + +{{< figure src="/media/docs/tempo/metrics-summary-10-2.png" caption="Aggregate by" >}} + +## No basic role + + + + +October 12, 2023 + +_Generally available in Grafana Cloud_ + +We're excited to introduce the "No basic role," a new basic role with no permissions. A basic role in Grafana dictates the set of actions a user or entity can perform, known as permissions. This new role is especially beneficial if you're aiming for tailored, customized RBAC permissions for your service accounts or users. You can set this as a basic role through the API or UI. + +Previously, permissions were granted based on predefined sets of capabilities. Now, with the "No basic role," you have the flexibility to be even more granular. + +For more details on basic roles and permissions, refer to the [documentation](https://grafana.com/docs/grafana//administration/roles-and-permissions/). + +To assign the "No basic role" in your Grafana Cloud stack, contact Grafana Support and ask them to enable the `skip_org_role_sync` feature toggle. You'll be able to change basic roles that are synced using GCom. + +## Content outline + + + + +October 12, 2023 + +_Generally Available in Grafana Cloud_ + +Introducing Content Outline in Grafana **Explore**. We recognized the challenges of complex mixed queries, as well as, lengthy logs and traces results, leading to time-consuming navigation and the loss of context. Content outline is our first step towards seamless navigation from log lines to traces and back to queries ensuring quicker searches while preserving context. Experience efficient, contextual investigations with this update in Grafana Explore. To learn more, refer to the [Content outline documentation](https://grafana.com/docs/grafana//explore/#content-outline), as well as the following video demo. + +{{< video-embed src="/media/docs/grafana/explore/content-outline-demo.mp4" >}} + +## Issues snapshot in Kubernetes Monitoring + + + +September 29, 2023 + +_Generally available in Grafana Cloud_ + +To provide quicker identification and troubleshooting, the home page contains a snapshot of issues that reach the following thresholds: + +- Pods that have been in a non-running state for more than 15 minutes +- Nodes with CPU usage above 90% for more than five minutes +- Nodes using more than 90% of memory for more than five minutes +- Persistent Volumes with capacity above 90% +- Node disks with capacity above 90% + +(Release 1.3.1) +{{< figure max-width="80%" src="/media/docs/grafana-cloud/k8s/K8smon-snapshotview.png" caption="Home page snapshot view" >}} + +## Tabs navigation in Kubernetes Monitoring + + + +September 14, 2023 + +_Generally available in Grafana Cloud_ + +Quickly switch between the Cluster, namespace, workload, and Node views on the **Cluster Navigation** page using tabs. (Release 1.3.0) + +{{< figure max-width="40%" src="/media/docs/grafana-cloud/k8s/k8smon-clusternav-tabs.png" caption="Tabs on **Cluster Navigation** page" >}} + +## Data source menu on Cost and Efficiency views in Kubernetes Monitoring + + + +September 14, 2023 + +_Generally available in Grafana Cloud_ + +You can change the data source you are viewing on the **Cost** and **Efficiency** views. (Release 1.2.1) + +## Predict namespace memory usage in Kubernetes Monitoring + + + +September 14, 2023 + +_Generally available in Grafana Cloud_ + +Click **Predict Memory usage** to predict namespace memory usage on the namespace detail page. (Release 1.2.1) + +{{< figure max-width="50%" src="/media/docs/grafana-cloud/k8s/k8smon-predict-memusage-namespace.png" caption="**Predict Memory usage** button" >}} + +## Streamlined configuration of Kubernetes Monitoring + + + +September 15, 2023 + +_Generally available in Grafana Cloud_ + +Configure with [Grafana Kubernetes Monitoring Helm chart](https://grafana.com/docs/grafana-cloud/monitor-infrastructure/kubernetes-monitoring/configuration/config-k8s-agent-flow) using a streamlined process. With this method, you can set on/off switches to gather metrics, logs, events, traces, and cost metrics. (Release 1.2.0) + +{{< figure max-width="60%" src="/media/docs/grafana-cloud/k8s/k8smon-config-wizard.png" caption="Configuration wizard" >}} + +## Traces collection with Kubernetes Monitoring + + + +September 14, 2023 + +_Generally available in Grafana Cloud_ + +Collect traces when you configure Kubernetes Monitoring, and then use Tempo to create search queries. Refer to [Navigate to traces](/docs/grafana-cloud/monitor-infrastructure/kubernetes-monitoring/navigate-k8s-monitoring/#navigate-to-traces) for more information. (Release 1.3.0) + +## Kafka integration in Kubernetes Monitoring + + + +September 14, 2023 + +_Generally available in Grafana Cloud_ + +The Kafka integration is available for use in Kubernetes Monitoring. (Release 1.3.6) + +## Public dashboards + + + + +October 12, 2023 + +_Generally Available in Grafana Cloud_ + +Public dashboards allow you to share your visualizations and insights to a broader audience without the requirement of a login. You can effortlessly use our current sharing model and create a public dashboard URL to share with anyone using the generated public URL link. To learn more, refer to the [Public dashboards documentation](https://grafana.com/docs/grafana//dashboards/dashboard-public/), as well as the following video demo: + +{{< video-embed src="/media/docs/grafana/dashboards/public-dashboards-demo.mp4" >}} + +## Support for dashboard variables in transformations + + + + +October 24, 2023 + +_Experimental in Grafana Cloud_ + +Previously, the only transformation that supported [dashboard variables](https://grafana.com/docs/grafana//dashboards/variables/) was the **Add field from calculation** transformation. We've now extended the support for variables to the **Filter by value**, **Create heatmap**, **Histogram**, **Sort by**, **Limit**, **Filter by name**, and **Join by field** transformations. + +We've also made it easier to find the correct dashboard variable by displaying available variables in the fields that support them, either in the drop-down or as a suggestion when you type **$** or press Ctrl + Space: + +{{< figure src="/media/docs/grafana/transformations/completion.png" caption="Input with dashboard variable suggestions" >}} + +## Role mapping support for Google OIDC + + + + +October 24, 2023 + +_Generally available in Grafana Cloud_ + +You can now map Google groups to Grafana organizational roles when using Google OIDC. +This is useful if you want to limit the access users have to your Grafana instance. + +We've also added support for controlling allowed groups when using Google OIDC. + +Refer to the [Google Authentication documentation](https://grafana.com/docs/grafana//setup-grafana/configure-security/configure-authentication/google/) to learn how to use these new options. + ## Distributed tracing in Grafana Cloud k6 +September 19, 2023 + _Generally available in Grafana Cloud_ You can now use the Grafana Cloud Traces integration with Grafana Cloud k6 to quickly debug failed performance tests and proactively improve application reliability. @@ -40,6 +256,8 @@ To learn more, refer to the [Integration with Grafana Cloud Traces documentation +September 25, 2023 + _Generally available in Grafana Cloud_ The SAP HANA® data source now supports tenant databases connections by using the database name and/or instance number. For more information, refer to [SAP HANA® configuration](/docs/plugins/grafana-saphana-datasource/latest/#configuration). @@ -51,6 +269,8 @@ The SAP HANA® data source now supports tenant databases connections by using th +August 31, 2023 + _Generally available in Grafana Cloud_ The Datadog data source now supports log aggregation. This feature helps aggregate logs/events into buckets and compute metrics and time series. For more information, refer to [Datadog log aggregation](/docs/plugins/grafana-datadog-datasource/latest#logs-analytics--aggregation). @@ -62,6 +282,8 @@ The Datadog data source now supports log aggregation. This feature helps aggrega +September 1, 2023 + _Generally available in Grafana Cloud_ The Datadog data source supports blocking API requests based on upstream rate limits (for metric queries). With this update, you can set a rate limit percentage at which the plugin stops sending queries. @@ -75,6 +297,8 @@ To learn more, refer to [Datadog data source settings](/docs/plugins/grafana-dat +August 24, 2023 + _Generally available in Grafana Cloud_ The Tempo data source now supports query-type template variables. With this update, you can create variables for which the values are a list of attribute names or attribute values seen on spans received by Tempo. @@ -88,6 +312,8 @@ To learn more, refer to the following video demo, as well as the [Grafana Variab +October 3, 2023 + _Generally available in Grafana Cloud_ The [TraceQL query editor](https://grafana.com/docs/tempo/latest/traceql/#traceql-query-editor) has been improved to facilitate the creation of TraceQL queries. In particular, it now features improved autocompletion, syntax highlighting, and error reporting. @@ -99,32 +325,77 @@ The [TraceQL query editor](https://grafana.com/docs/tempo/latest/traceql/#traceq +September 13, 2023 + _Generally available in Grafana Cloud_ Use the Grafana Alerting - Grafana OnCall integration to effortlessly connect alerts generated by Grafana Alerting with Grafana OnCall. From there, you can route them according to defined escalation chains and schedules. To learn more, refer to the [Grafana OnCall integration for Alerting documentation](/docs/grafana/next/alerting/alerting-rules/manage-contact-points/configure-oncall/). -## New browse dashboards view +## New browse dashboards -_Available in public preview in Grafana Cloud_ +September 19, 2023 + +_Generally available in Grafana Cloud_ -We are gradually rolling out our new browse dashboards user interface. With this new feature, we removed the **General** folder, and dashboards now sit at the root level. The feature also provides easier editing functionality, as well as faster search renders. +The new browse dashboards interface features a more compact design, making it easier to navigate, search for, and manage for your folders and dashboards. The new interface also has many performance improvements, especially for instances with a large number of folders and dashboards. + +To make using folders easier and more consistent, there is no longer a special **General** folder. Dashboards without a folder, or dashboards previously in **General**, are now shown at the root level. To learn more, refer to the following video demo. {{< video-embed src="/media/docs/grafana/2023-09-11-New-Browse-Dashboards-Enablement-Video.mp4" >}} +## Multiple spansets per trace + + + + +October 24, 2023 + +_Generally available in Grafana Cloud_ + +The [TraceQL query editor](https://grafana.com/docs/tempo//traceql/#traceql-query-editor) has been improved to facilitate the grouping of multiple spans per trace in TraceQL queries. For example, when the following `by(resource.service.name)` is added to your TraceQL query, it will group the spans in each trace by `resource.service.name`. + +{{< figure src="/media/docs/tempo/multiple-spansets-per-trace-10-2.png" max-width="750px" caption="Multiple spansets per trace" >}} + ## Temporary credentials in CloudWatch data source +October 24, 2023 + _Available in private preview in Grafana Cloud_ The Grafana Assume Role authentication provider lets Grafana Cloud users of the CloudWatch data source authenticate with AWS without having to create and maintain long term AWS Users. Using the new assume role authentication method, you no longer have to rotate access and secret keys in your CloudWatch data source. Instead, Grafana Cloud users can create an identity access and management (IAM) role that has a trust relationship with Grafana's AWS account; Grafana's AWS account will then use AWS Secure Token Service (STS) to create temporary credentials to access the user's AWS data. To learn more, refer to the [CloudWatch authentication documentation](/docs/grafana/next/datasources/aws-cloudwatch/aws-authentication). + +## Recorded queries: Record multiple metrics from a single query + + + + +October 3, 2023 + +_Generally available in Grafana Cloud_ + +With recorded queries, a single recorded query can now record multiple metrics. + +## Permission validation on custom role creation and update + + + + + + +August 25, 2023 + +_Generally available in Grafana Cloud_ + +With the current release, we enabled RBAC permission validation (`rbac.permission_validation_enabled` setting) by default. This means that the permissions provided in the request during custom role creation or update are validated against the list of [available permissions and their scopes](https://grafana.com/docs/grafana//administration/roles-and-permissions/access-control/custom-role-actions-scopes/#action-definitions). If the request contains a permission that is not available or the scope of the permission is not valid, the request is rejected with an error message. diff --git a/e2e/custom-plugins/frontend-sandbox-panel-test/module.js b/e2e/custom-plugins/frontend-sandbox-panel-test/module.js index daf8a51d576e5..c30c97c2cf4d6 100644 --- a/e2e/custom-plugins/frontend-sandbox-panel-test/module.js +++ b/e2e/custom-plugins/frontend-sandbox-panel-test/module.js @@ -19,7 +19,8 @@ define(['react', '@grafana/data'], function (React, grafanaData) { }); } - const HelloWorld = () => { + const PanelComponent = () => { + const [testedGlobals, setTestedGlobals] = React.useState([]); const createIframe = () => { // direct iframe creation const iframe = document.createElement('iframe'); @@ -122,6 +123,41 @@ define(['react', '@grafana/data'], function (React, grafanaData) { outsideEl.dataset.sandboxTest = 'true'; }; + // a function for each global we want to test + const globalTests = [ + function () { + try { + console.log(window.Prism.languages); + return 'Prism'; + } catch (e) {} + }, + function () { + try { + console.log(window.jQuery.fn.jquery); + console.log(window.$.fn.jquery); + return 'jQuery'; + } catch (e) {} + }, + function () { + try { + console.log(window.locationSandbox); + return 'location'; + } catch (e) {} + }, + ]; + + // it'll assign a variable with one attribute of the Globals + // and create a new element with the name of the global. + const testGlobals = () => { + const results = globalTests.map((test) => test()); + setTestedGlobals(results); + }; + + const elements = testedGlobals.map((item) => { + const attributes = { 'data-sandbox-global': `${item}` }; + return React.createElement('div', attributes, item); + }); + return React.createElement( 'div', { className: 'frontend-sandbox-test' }, @@ -130,11 +166,13 @@ define(['react', '@grafana/data'], function (React, grafanaData) { { onClick: createIframe, 'data-testid': 'button-create-iframes' }, 'Create iframes' ), - React.createElement('button', { onClick: reachOut, 'data-testid': 'button-reach-out' }, 'Reach out') + React.createElement('button', { onClick: reachOut, 'data-testid': 'button-reach-out' }, 'Reach out'), + React.createElement('button', { onClick: testGlobals, 'data-testid': 'button-test-globals' }, 'Test Globals'), + React.createElement('div', null, elements) ); }; - const plugin = new grafanaData.PanelPlugin(HelloWorld); + const plugin = new grafanaData.PanelPlugin(PanelComponent); plugin.setPanelOptions((builder) => { builder.addCustomEditor({ diff --git a/e2e/panels-suite/frontend-sandbox-panel.spec.ts b/e2e/panels-suite/frontend-sandbox-panel.spec.ts index fb237f6f54e4c..bab59b99866a2 100644 --- a/e2e/panels-suite/frontend-sandbox-panel.spec.ts +++ b/e2e/panels-suite/frontend-sandbox-panel.spec.ts @@ -11,12 +11,10 @@ describe('Panel sandbox', () => { describe('Sandbox disabled', () => { beforeEach(() => { - e2e.flows.openDashboard({ - uid: DASHBOARD_ID, - queryParams: { - '__feature.pluginsFrontendSandbox': false, - }, + cy.window().then((win) => { + win.localStorage.setItem('grafana.featureToggles', 'pluginsFrontendSandbox=0'); }); + cy.reload(); }); it('Add iframes to body', () => { @@ -51,7 +49,6 @@ describe('Panel sandbox', () => { e2e.flows.openDashboard({ uid: DASHBOARD_ID, queryParams: { - '__feature.pluginsFrontendSandbox': false, editPanel: 1, }, }); @@ -64,15 +61,10 @@ describe('Panel sandbox', () => { describe('Sandbox enabled', () => { beforeEach(() => { - e2e.flows.openDashboard({ - uid: DASHBOARD_ID, - queryParams: { - '__feature.pluginsFrontendSandbox': true, - }, - }); cy.window().then((win) => { win.localStorage.setItem('grafana.featureToggles', 'pluginsFrontendSandbox=1'); }); + cy.reload(); }); it('Does not add iframes to body', () => { @@ -108,7 +100,6 @@ describe('Panel sandbox', () => { e2e.flows.openDashboard({ uid: DASHBOARD_ID, queryParams: { - '__feature.pluginsFrontendSandbox': false, editPanel: 1, }, }); @@ -118,6 +109,13 @@ describe('Panel sandbox', () => { cy.wait(100); // small delay to prevent false positives from too fast tests cy.get('[data-sandbox-test="panel-editor"]').should('not.exist'); }); + + it('Can access specific window global variables', () => { + cy.get('[data-testid="button-test-globals"]').click(); + cy.get('[data-sandbox-global="Prism"]').should('be.visible'); + cy.get('[data-sandbox-global="jQuery"]').should('be.visible'); + cy.get('[data-sandbox-global="location"]').should('be.visible'); + }); }); afterEach(() => { diff --git a/go.mod b/go.mod index 11835080ef7e6..8273280fcf4d3 100644 --- a/go.mod +++ b/go.mod @@ -12,13 +12,12 @@ replace cuelang.org/go => github.com/grafana/cue v0.0.0-20230926092038-971951014 // TODO: following otel replaces to pin the libraries so k8s.io/apiserver doesn't downgrade us inadvertantly // will need bumps as we upgrade otel in Grafana -replace go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp => go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.42.0 // @grafana/backend-platform - -replace go.opentelemetry.io/otel => go.opentelemetry.io/otel v1.16.0 // @grafana/backend-platform - -replace go.opentelemetry.io/otel/trace => go.opentelemetry.io/otel/trace v1.16.0 // @grafana/backend-platform - -replace go.opentelemetry.io/otel/metric => go.opentelemetry.io/otel/metric v1.16.0 // @grafana/backend-platform +replace ( + go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp => go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.45.0 // @grafana/backend-platform + go.opentelemetry.io/otel => go.opentelemetry.io/otel v1.19.0 // @grafana/backend-platform + go.opentelemetry.io/otel/metric => go.opentelemetry.io/otel/metric v1.19.0 // @grafana/backend-platform + go.opentelemetry.io/otel/trace => go.opentelemetry.io/otel/trace v1.19.0 // @grafana/backend-platform +) // Override Prometheus version because Prometheus v2.X is tagged as v0.X for Go modules purposes and Go assumes // that v1.Y is higher than v0.X, so when we resolve dependencies if any dependency imports v1.Y we'd @@ -34,10 +33,9 @@ require ( cuelang.org/go v0.6.0-0.dev // @grafana/grafana-as-code github.com/Azure/azure-sdk-for-go v65.0.0+incompatible // @grafana/backend-platform github.com/Azure/go-autorest/autorest v0.11.28 // @grafana/backend-platform - github.com/BurntSushi/toml v1.2.1 // @grafana/grafana-authnz-team + github.com/BurntSushi/toml v1.3.2 // @grafana/grafana-authnz-team github.com/Masterminds/semver v1.5.0 // @grafana/backend-platform github.com/VividCortex/mysqlerr v0.0.0-20170204212430-6c6b55f8796f // @grafana/backend-platform - github.com/apache/arrow/go/v12 v12.0.1 // @grafana/observability-metrics github.com/aws/aws-sdk-go v1.44.325 // @grafana/aws-datasources github.com/beevik/etree v1.2.0 // @grafana/backend-platform github.com/benbjohnson/clock v1.3.5 // @grafana/alerting-squad-backend @@ -63,11 +61,11 @@ require ( github.com/google/uuid v1.3.1 // @grafana/backend-platform github.com/google/wire v0.5.0 // @grafana/backend-platform github.com/gorilla/websocket v1.5.0 // @grafana/grafana-app-platform-squad - github.com/grafana/alerting v0.0.0-20231005194306-939f55779e5f // @grafana/alerting-squad-backend + github.com/grafana/alerting v0.0.0-20231017091417-a53b5db2235d // @grafana/alerting-squad-backend github.com/grafana/cuetsy v0.1.10 // @grafana/grafana-as-code github.com/grafana/grafana-aws-sdk v0.19.1 // @grafana/aws-datasources github.com/grafana/grafana-azure-sdk-go v1.9.0 // @grafana/backend-platform - github.com/grafana/grafana-plugin-sdk-go v0.180.0 // @grafana/plugins-platform-backend + github.com/grafana/grafana-plugin-sdk-go v0.185.0 // @grafana/plugins-platform-backend github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 // @grafana/backend-platform github.com/hashicorp/go-hclog v1.5.0 // @grafana/plugins-platform-backend github.com/hashicorp/go-plugin v1.4.9 // @grafana/plugins-platform-backend @@ -105,27 +103,27 @@ require ( github.com/yalue/merged_fs v1.2.2 // @grafana/grafana-as-code github.com/yudai/gojsondiff v1.0.0 // @grafana/backend-platform go.opentelemetry.io/collector/pdata v1.0.0-rc8 // @grafana/backend-platform - go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.42.0 // @grafana/grafana-operator-experience-squad + go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.45.0 // @grafana/grafana-operator-experience-squad go.opentelemetry.io/otel/exporters/jaeger v1.10.0 // @grafana/backend-platform - go.opentelemetry.io/otel/sdk v1.16.0 // @grafana/backend-platform - go.opentelemetry.io/otel/trace v1.16.0 // @grafana/backend-platform - golang.org/x/crypto v0.12.0 // @grafana/backend-platform + go.opentelemetry.io/otel/sdk v1.19.0 // @grafana/backend-platform + go.opentelemetry.io/otel/trace v1.19.0 // @grafana/backend-platform + golang.org/x/crypto v0.14.0 // @grafana/backend-platform golang.org/x/exp v0.0.0-20230321023759-10a507213a29 // @grafana/alerting-squad-backend - golang.org/x/net v0.14.0 // @grafana/grafana-bi-squad + golang.org/x/net v0.17.0 // @grafana/grafana-bi-squad golang.org/x/oauth2 v0.10.0 // @grafana/grafana-authnz-team golang.org/x/sync v0.3.0 // @grafana/alerting-squad-backend golang.org/x/time v0.3.0 // @grafana/backend-platform golang.org/x/tools v0.12.0 // @grafana/grafana-as-code gonum.org/v1/gonum v0.12.0 // @grafana/observability-metrics google.golang.org/api v0.126.0 // @grafana/backend-platform - google.golang.org/grpc v1.57.0 // @grafana/plugins-platform-backend + google.golang.org/grpc v1.58.2 // @grafana/plugins-platform-backend google.golang.org/protobuf v1.31.0 // @grafana/plugins-platform-backend gopkg.in/alexcesaro/quotedprintable.v3 v3.0.0-20150716171945-2caba252f4dc // indirect gopkg.in/ini.v1 v1.67.0 // @grafana/alerting-squad-backend gopkg.in/mail.v2 v2.3.1 // @grafana/backend-platform gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // @grafana/alerting-squad-backend - xorm.io/builder v0.3.6 // @grafana/backend-platform + xorm.io/builder v0.3.6 // indirect; @grafana/backend-platform xorm.io/core v0.7.3 // @grafana/backend-platform xorm.io/xorm v0.8.2 // @grafana/alerting-squad-backend ) @@ -177,7 +175,7 @@ require ( github.com/grpc-ecosystem/go-grpc-prometheus v1.2.1-0.20191002090509-6af20e3a5340 // indirect github.com/hashicorp/errwrap v1.1.0 // indirect github.com/hashicorp/go-msgpack v0.5.5 // indirect - github.com/hashicorp/go-multierror v1.1.1 // @grafana/grafana-as-code + github.com/hashicorp/go-multierror v1.1.1 // indirect; @grafana/alerting-squad github.com/hashicorp/go-sockaddr v1.0.2 // indirect github.com/hashicorp/golang-lru v0.6.0 // indirect github.com/hashicorp/yamux v0.1.1 // indirect @@ -193,7 +191,7 @@ require ( github.com/miekg/dns v1.1.51 // indirect github.com/mitchellh/go-testing-interface v1.14.1 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect - github.com/modern-go/reflect2 v1.0.2 // indirect + github.com/modern-go/reflect2 v1.0.2 // @grafana/alerting-squad-backend github.com/mpvl/unique v0.0.0-20150818121801-cbe035fff7de // indirect github.com/oklog/run v1.1.0 // indirect github.com/oklog/ulid v1.3.1 // indirect @@ -218,8 +216,8 @@ require ( go.opencensus.io v0.24.0 // indirect go.uber.org/atomic v1.11.0 // @grafana/alerting-squad-backend go.uber.org/goleak v1.2.1 // indirect - golang.org/x/sys v0.12.0 // indirect - golang.org/x/text v0.12.0 // @grafana/backend-platform + golang.org/x/sys v0.13.0 // indirect + golang.org/x/text v0.13.0 // @grafana/backend-platform golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect google.golang.org/appengine v1.6.7 // indirect google.golang.org/genproto v0.0.0-20230731193218-e0aa005b6bdf // indirect; @grafana/backend-platform @@ -245,11 +243,11 @@ require ( github.com/huandu/xstrings v1.3.1 // @grafana/partner-datasources github.com/jmoiron/sqlx v1.3.5 // @grafana/backend-platform github.com/matryer/is v1.4.0 // @grafana/grafana-as-code - github.com/urfave/cli v1.22.12 // @grafana/backend-platform - go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.42.0 // @grafana/plugins-platform-backend - go.opentelemetry.io/contrib/propagators/jaeger v1.17.0 // @grafana/backend-platform - go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.16.0 // @grafana/backend-platform - go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.16.0 // @grafana/backend-platform + github.com/urfave/cli v1.22.14 // @grafana/backend-platform + go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.45.0 // @grafana/plugins-platform-backend + go.opentelemetry.io/contrib/propagators/jaeger v1.20.0 // @grafana/backend-platform + go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.19.0 // @grafana/backend-platform + go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.19.0 // @grafana/backend-platform gocloud.dev v0.25.0 // @grafana/grafana-app-platform-squad ) @@ -278,7 +276,7 @@ require ( require ( github.com/grafana/grafana-apiserver v0.0.0-20230713001719-88a9ed41992d // @grafana/grafana-app-platform-squad - go.opentelemetry.io/otel v1.16.0 // @grafana/backend-platform + go.opentelemetry.io/otel v1.19.0 // @grafana/backend-platform k8s.io/apimachinery v0.27.1 // @grafana/grafana-app-platform-squad k8s.io/apiserver v0.27.1 // @grafana/grafana-app-platform-squad k8s.io/client-go v0.27.1 // @grafana/grafana-app-platform-squad @@ -290,6 +288,8 @@ require github.com/grafana/gofpdf v0.0.0-20231002120153-857cc45be447 // @grafana require github.com/grafana/pyroscope/api v0.2.0 // @grafana/observability-traces-and-profiling +require github.com/apache/arrow/go/v13 v13.0.0 // @grafana/observability-metrics + require ( cloud.google.com/go v0.110.6 // indirect cloud.google.com/go/compute/metadata v0.2.3 // indirect @@ -300,8 +300,6 @@ require ( github.com/agext/levenshtein v1.2.1 // indirect github.com/alicebob/gopher-json v0.0.0-20200520072559-a9ecdc9d1d3a // indirect github.com/antlr/antlr4/runtime/Go/antlr v1.4.10 // indirect - github.com/apache/arrow/go/v13 v13.0.0 // indirect - github.com/apache/thrift v0.18.1 // indirect github.com/apapsch/go-jsonmerge/v2 v2.0.0 // indirect github.com/apparentlymart/go-textseg/v13 v13.0.0 // indirect github.com/armon/go-metrics v0.4.1 // indirect @@ -354,7 +352,6 @@ require ( github.com/inconshreveable/mousetrap v1.1.0 // indirect github.com/invopop/yaml v0.2.0 // indirect github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 // indirect - github.com/klauspost/asmfmt v1.3.2 // indirect github.com/klauspost/cpuid/v2 v2.2.4 // indirect github.com/kr/pretty v0.3.1 // indirect github.com/kr/text v0.2.0 // indirect @@ -362,8 +359,6 @@ require ( github.com/mattn/go-colorable v0.1.13 // indirect github.com/mattn/go-ieproxy v0.0.3 // indirect github.com/mattn/goveralls v0.0.6 // indirect - github.com/minio/asm2plan9s v0.0.0-20200509001527-cdd76441f9d8 // indirect - github.com/minio/c2goasm v0.0.0-20190812172519-36a3d3bbc4f3 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect github.com/mitchellh/mapstructure v1.5.0 // indirect github.com/mitchellh/reflectwalk v1.0.2 // indirect @@ -404,12 +399,12 @@ require ( go.etcd.io/etcd/api/v3 v3.5.7 // indirect go.etcd.io/etcd/client/pkg/v3 v3.5.7 // indirect go.etcd.io/etcd/client/v3 v3.5.7 // indirect - go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.42.0 // indirect - go.opentelemetry.io/otel/metric v1.16.0 // indirect + go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.45.0 // indirect + go.opentelemetry.io/otel/metric v1.19.0 // indirect go.starlark.net v0.0.0-20221020143700-22309ac47eac // indirect go.uber.org/multierr v1.10.0 // indirect go.uber.org/zap v1.24.0 // indirect - golang.org/x/term v0.11.0 // indirect + golang.org/x/term v0.13.0 // indirect google.golang.org/genproto/googleapis/api v0.0.0-20230731193218-e0aa005b6bdf // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20230731193218-e0aa005b6bdf // indirect gopkg.in/fsnotify/fsnotify.v1 v1.4.7 // indirect @@ -484,7 +479,6 @@ require ( github.com/wk8/go-ordered-map v1.0.0 // @grafana/backend-platform github.com/xanzy/ssh-agent v0.3.0 // indirect github.com/xlab/treeprint v1.2.0 // @grafana/observability-traces-and-profiling - go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.16.0 // indirect go.opentelemetry.io/proto/otlp v1.0.0 // indirect gopkg.in/warnings.v0 v0.1.2 // indirect ) @@ -507,7 +501,4 @@ replace xorm.io/xorm => github.com/grafana/xorm v0.8.3-0.20230627081928-d04aa38a // This is required in order to get notification delivery errors from the receivers API. replace github.com/prometheus/alertmanager => github.com/grafana/prometheus-alertmanager v0.25.1-0.20230918083811-3513be6760b7 -// grpc v1.46.0 removed "WithBalancerName()" API, still in use by weaveworks/commons. -replace google.golang.org/grpc => google.golang.org/grpc v1.45.0 - exclude github.com/mattn/go-sqlite3 v2.0.3+incompatible diff --git a/go.sum b/go.sum index 85c749bd5d87c..e68097965cda4 100644 --- a/go.sum +++ b/go.sum @@ -4,6 +4,7 @@ buf.build/gen/go/parca-dev/parca/bufbuild/connect-go v1.4.1-20221222094228-8b1d3 buf.build/gen/go/parca-dev/parca/bufbuild/connect-go v1.4.1-20221222094228-8b1d3d0f62e6.1/go.mod h1:VYzBTKhjl92cl3sv+xznQcJHCezU7qnI0FhBAUb4n8c= buf.build/gen/go/parca-dev/parca/protocolbuffers/go v1.28.1-20221222094228-8b1d3d0f62e6.4 h1:3ThI7dcndwVLimMCxuiaVqMJEx5FfMXydD7flXlnDkQ= buf.build/gen/go/parca-dev/parca/protocolbuffers/go v1.28.1-20221222094228-8b1d3d0f62e6.4/go.mod h1:7dY08PsClUI7xt/6lEMJERgOcdf3d5Gnchm8qScIhRg= +cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.37.4/go.mod h1:NHPJ89PdicEuT9hdPXMROBD91xc5uRDxsMtSB16k7hw= cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= @@ -155,6 +156,7 @@ cloud.google.com/go/compute v1.12.0/go.mod h1:e8yNOBcBONZU1vJKCvCoDw/4JQsA0dpM4x cloud.google.com/go/compute v1.12.1/go.mod h1:e8yNOBcBONZU1vJKCvCoDw/4JQsA0dpM4x/6PIIOocU= cloud.google.com/go/compute v1.13.0/go.mod h1:5aPTS0cUNMIc1CE546K+Th6weJUNQErARyZtRXDJ8GE= cloud.google.com/go/compute v1.14.0/go.mod h1:YfLtxrj9sU4Yxv+sXzZkyPjEyPBZfXHUvjxega5vAdo= +cloud.google.com/go/compute v1.15.1/go.mod h1:bjjoF/NtFUrkD/urWfdHaKuOPDR5nWIs63rR+SXhcpA= cloud.google.com/go/compute v1.18.0/go.mod h1:1X7yHxec2Ga+Ss6jPyjxRxpu2uu7PLgsOVXvgU0yacs= cloud.google.com/go/compute v1.23.0 h1:tP41Zoavr8ptEqaW6j+LQOnyBBhO7OkOMAGrgLopTwY= cloud.google.com/go/compute v1.23.0/go.mod h1:4tCnrn48xsqlwSAiLf1HXMQk8CONslYbdiEZc9FEIbM= @@ -613,8 +615,8 @@ github.com/Azure/go-ntlmssp v0.0.0-20220621081337-cb9428e4ac1e/go.mod h1:chxPXzS github.com/AzureAD/microsoft-authentication-library-for-go v1.0.0 h1:OBhqkivkhkMqLPymWEppkm7vgPQY2XsHoEkaMQ0AdZY= github.com/AzureAD/microsoft-authentication-library-for-go v1.0.0/go.mod h1:kgDmCTgBzIEPFElEF+FK0SdjAor06dRq2Go927dnQ6o= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/BurntSushi/toml v1.2.1 h1:9F2/+DoOYIOksmaJFPw1tGFy1eDnIJXg+UHjuD8lTak= -github.com/BurntSushi/toml v1.2.1/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= +github.com/BurntSushi/toml v1.3.2 h1:o7IhLm0Msx3BaB+n3Ag7L8EVlByGnpq14C4YWiu/gL8= +github.com/BurntSushi/toml v1.3.2/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/CloudyKit/fastprinter v0.0.0-20200109182630-33d98a066a53/go.mod h1:+3IMCy2vIlbG1XG/0ggNQv0SvxCAIpPM5b1nCz56Xno= github.com/CloudyKit/jet/v3 v3.0.0/go.mod h1:HKQPgSJmdK8hdoAbKUUWajkHyHo4RaU5rMdUywE7VMo= @@ -627,7 +629,6 @@ github.com/GoogleCloudPlatform/cloudsql-proxy v1.29.0/go.mod h1:spvB9eLJH9dutlbP github.com/HdrHistogram/hdrhistogram-go v1.1.0/go.mod h1:yDgFjdqOqDEKOvasDdhWNXYg9BVp4O+o5f6V/ehm6Oo= github.com/HdrHistogram/hdrhistogram-go v1.1.2 h1:5IcZpTvzydCQeHzK4Ef/D5rrSqwxob0t8PQPMybUNFM= github.com/HdrHistogram/hdrhistogram-go v1.1.2/go.mod h1:yDgFjdqOqDEKOvasDdhWNXYg9BVp4O+o5f6V/ehm6Oo= -github.com/JohnCGriffin/overflow v0.0.0-20211019200055-46fa312c352c h1:RGWPOewvKIROun94nF7v2cua9qP+thov/7M50KEoeSU= github.com/JohnCGriffin/overflow v0.0.0-20211019200055-46fa312c352c/go.mod h1:X0CRv0ky0k6m906ixxpzmDRLvX58TFUKS2eePweuyxk= github.com/Joker/hpp v1.0.0/go.mod h1:8x5n+M1Hp5hC0g8okX3sR3vFQwynaX/UgSOM9MeBKzY= github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0= @@ -702,15 +703,11 @@ github.com/antlr/antlr4/runtime/Go/antlr v1.4.10 h1:yL7+Jz0jTC6yykIK/Wh74gnTJnrG github.com/antlr/antlr4/runtime/Go/antlr v1.4.10/go.mod h1:F7bn7fEU90QkQ3tnmaTx3LTKLEDqnwWODIYppRQ5hnY= github.com/apache/arrow/go/arrow v0.0.0-20210223225224-5bea62493d91/go.mod h1:c9sxoIT3YgLxH4UhLOCKaBlEojuMhVYpk4Ntv3opUTQ= github.com/apache/arrow/go/v10 v10.0.1/go.mod h1:YvhnlEePVnBS4+0z3fhPfUy7W1Ikj0Ih0vcRo/gZ1M0= -github.com/apache/arrow/go/v12 v12.0.1 h1:JsR2+hzYYjgSUkBSaahpqCetqZMr76djX80fF/DiJbg= -github.com/apache/arrow/go/v12 v12.0.1/go.mod h1:weuTY7JvTG/HDPtMQxEUp7pU73vkLWMLpY67QwZ/WWw= github.com/apache/arrow/go/v13 v13.0.0 h1:kELrvDQuKZo8csdWYqBQfyi431x6Zs/YJTEgUuSVcWk= github.com/apache/arrow/go/v13 v13.0.0/go.mod h1:W69eByFNO0ZR30q1/7Sr9d83zcVZmF2MiP3fFYAWJOc= github.com/apache/thrift v0.12.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= github.com/apache/thrift v0.13.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= github.com/apache/thrift v0.16.0/go.mod h1:PHK3hniurgQaNMZYaCLEqXKsYK8upmhPbmdP2FXSqgU= -github.com/apache/thrift v0.18.1 h1:lNhK/1nqjbwbiOPDBPFJVKxgDEGSepKuTh6OLiXW8kg= -github.com/apache/thrift v0.18.1/go.mod h1:rdQn/dCcDKEWjjylUeueum4vQEjG2v8v2PqriUnbr+I= github.com/apapsch/go-jsonmerge/v2 v2.0.0 h1:axGnT1gRIfimI7gJifB699GoE/oq+F2MU7Dml6nw9rQ= github.com/apapsch/go-jsonmerge/v2 v2.0.0/go.mod h1:lvDnEdqiQrp0O42VQGgmlKpxL1AP2+08jFMw88y4klk= github.com/apparentlymart/go-textseg/v13 v13.0.0 h1:Y+KvPE1NYz0xl601PVImeQfFyEy6iT90AvPUL1NNfNw= @@ -886,16 +883,23 @@ github.com/circonus-labs/circonus-gometrics v2.3.1+incompatible/go.mod h1:nmEj6D github.com/circonus-labs/circonusllhist v0.1.3/go.mod h1:kMXHVDlOchFAehlya5ePtbp5jckzBHf4XRpQvBOLI+I= github.com/clbanning/mxj v1.8.4/go.mod h1:BVjHeAH+rl9rs6f+QIpeRl0tfu10SXn1pUSa5PVGJng= github.com/clbanning/x2j v0.0.0-20191024224557-825249438eec/go.mod h1:jMjuTZXRI4dUb/I5gc9Hdhagfvm9+RyrPryS/auMzxE= +github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cloudflare/circl v1.3.3 h1:fE/Qz0QdIGqeWfnwq0RE0R7MI51s0M2E4Ga9kq5AEMs= github.com/cloudflare/circl v1.3.3/go.mod h1:5XYMA4rFBvNIrhs50XuiBJ15vF2pZn4nnUKZrLbUZFA= +github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= +github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= +github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI= +github.com/cncf/udpa/go v0.0.0-20220112060539-c52dc94e7fbe/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI= +github.com/cncf/xds/go v0.0.0-20210312221358-fbca930ec8ed/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20211001041855-01bcc9b48dfe/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20220314180256-7f1daf1720fc/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20230112175826-46e39c7b9b43 h1:XP+uhjN0yBCN/tPkr8Z0BNDc5rZam9RG6UWyf2FrSQ0= +github.com/cncf/xds/go v0.0.0-20230105202645-06c439db220b/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20230112175826-46e39c7b9b43/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20230607035331-e9ce68804cb4 h1:/inchEIKaYC1Akx+H+gqO04wryn5h75LSazbRlnya1k= github.com/cockroachdb/apd v1.1.0/go.mod h1:8Sl8LxpKi29FqWXR16WEFZRNSz3SoPzUzeMeY4+DwBQ= github.com/cockroachdb/apd/v2 v2.0.2 h1:weh8u7Cneje73dDh+2tEVLUvyBc89iwepWCD8b8034E= github.com/cockroachdb/apd/v2 v2.0.2/go.mod h1:DDxRlzC2lo3/vSlmSoS7JkqbbrARPuFOGr0B9pvN3Gw= @@ -1062,13 +1066,23 @@ github.com/emicklei/proto v1.10.0 h1:pDGyFRVV5RvV+nkBK9iy3q67FBy9Xa7vwrOTE+g5aGw github.com/emicklei/proto v1.10.0/go.mod h1:rn1FgRS/FANiZdD2djyH7TMA9jdRDcYQ9IEN9yvjX0A= github.com/emirpasic/gods v1.12.0 h1:QAUIPSaCu4G+POclxeqb3F+WPpdKqFGlw36+yOzGlrg= github.com/emirpasic/gods v1.12.0/go.mod h1:YfzfFFoVP/catgzJb4IKIqXjX78Ha8FMSDh3ymbK86o= +github.com/envoyproxy/go-control-plane v0.6.9/go.mod h1:SBwIajubJHhxtWwsL9s8ss4safvEdbitLhGGK48rN6g= +github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= +github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= +github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= +github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po= +github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= +github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= +github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.mod h1:hliV/p42l8fGbc6Y9bQ70uLwIvmJyVE5k4iMKlh8wCQ= github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0= github.com/envoyproxy/go-control-plane v0.10.2-0.20220325020618-49ff273808a1/go.mod h1:KJwIaB5Mv44NWtYuAOFCVOjcI94vtpEz2JU/D2v6IjE= -github.com/envoyproxy/go-control-plane v0.11.0 h1:jtLewhRR2vMRNnq2ZZUoCjUlgut+Y0+sDDWPOfwOi1o= +github.com/envoyproxy/go-control-plane v0.10.3/go.mod h1:fJJn/j26vwOu972OllsvAgJJM//w9BV6Fxbg2LuVd34= github.com/envoyproxy/go-control-plane v0.11.0/go.mod h1:VnHyVMpzcLvCFt9yUz1UnCwHLhwx1WguiVDV7pTG/tI= +github.com/envoyproxy/go-control-plane v0.11.1 h1:wSUXTlLfiAQRWs2F+p+EKOY9rUyis1MyGqJ2DIk5HpM= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/envoyproxy/protoc-gen-validate v0.9.1 h1:PS7VIOgmSVhWUEeZwTe7z7zouA22Cr590PzXKbZHOVY= +github.com/envoyproxy/protoc-gen-validate v0.6.7/go.mod h1:dyJXwwfPK2VSqiB9Klm1J6romD608Ba7Hij42vrOBCo= github.com/envoyproxy/protoc-gen-validate v0.9.1/go.mod h1:OKNgG7TCp5pF4d6XftA0++PMirau2/yoOwVac3AbF2w= +github.com/envoyproxy/protoc-gen-validate v1.0.2 h1:QkIBuU5k+x7/QXPvPPnWXWlCdaBFApVqftFV6k087DA= github.com/etcd-io/bbolt v1.3.3/go.mod h1:ZF2nL25h33cCyBtcyWeZ2/I3HQOfTP+0PIEvHjkjCrw= github.com/evanphx/json-patch v4.12.0+incompatible h1:4onqiflcdA9EOZ4RxV643DvftH5pOlLGNtQ5lPWQu84= github.com/evanphx/json-patch v4.12.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= @@ -1782,8 +1796,8 @@ github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWm github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/gotestyourself/gotestyourself v1.3.0/go.mod h1:zZKM6oeNM8k+FRljX1mnzVYeS8wiGgQyvST1/GafPbY= github.com/gotestyourself/gotestyourself v2.2.0+incompatible/go.mod h1:zZKM6oeNM8k+FRljX1mnzVYeS8wiGgQyvST1/GafPbY= -github.com/grafana/alerting v0.0.0-20231005194306-939f55779e5f h1:zz5YocNyxQ9X8Bvm2ezPOCGKxngrXX1XGLfywqk5+vU= -github.com/grafana/alerting v0.0.0-20231005194306-939f55779e5f/go.mod h1:6BES5CyEqz7fDAG3MYvJLe0hqGwvIoGDN8A1aNrLGus= +github.com/grafana/alerting v0.0.0-20231017091417-a53b5db2235d h1:fxHDUyKFc1mfyJAtW+Qxi66dMahYu+o5/lH+f8SoMHg= +github.com/grafana/alerting v0.0.0-20231017091417-a53b5db2235d/go.mod h1:6BES5CyEqz7fDAG3MYvJLe0hqGwvIoGDN8A1aNrLGus= github.com/grafana/codejen v0.0.3 h1:tAWxoTUuhgmEqxJPOLtJoxlPBbMULFwKFOcRsPRPXDw= github.com/grafana/codejen v0.0.3/go.mod h1:zmwwM/DRyQB7pfuBjTWII3CWtxcXh8LTwAYGfDfpR6s= github.com/grafana/cue v0.0.0-20230926092038-971951014e3f h1:TmYAMnqg3d5KYEAaT6PtTguL2GjLfvr6wnAX8Azw6tQ= @@ -1808,8 +1822,8 @@ github.com/grafana/grafana-google-sdk-go v0.1.0 h1:LKGY8z2DSxKjYfr2flZsWgTRTZ6HG github.com/grafana/grafana-google-sdk-go v0.1.0/go.mod h1:Vo2TKWfDVmNTELBUM+3lkrZvFtBws0qSZdXhQxRdJrE= github.com/grafana/grafana-plugin-sdk-go v0.94.0/go.mod h1:3VXz4nCv6wH5SfgB3mlW39s+c+LetqSCjFj7xxPC5+M= github.com/grafana/grafana-plugin-sdk-go v0.114.0/go.mod h1:D7x3ah+1d4phNXpbnOaxa/osSaZlwh9/ZUnGGzegRbk= -github.com/grafana/grafana-plugin-sdk-go v0.180.0 h1:+5aFolBj2H7ze7oejIUjrkmZ9lSydnsbo3e4Kn1CN1Y= -github.com/grafana/grafana-plugin-sdk-go v0.180.0/go.mod h1:fPX9spPWEzyUg0BLTQbdXCCq7PVSJZGNVKfNpiTQUts= +github.com/grafana/grafana-plugin-sdk-go v0.185.0 h1:wfnCx53gQO4PMTHvNlifzSU5iIrGSnhjOApIzMrbtGw= +github.com/grafana/grafana-plugin-sdk-go v0.185.0/go.mod h1:PHK8eQOz3ES28RmImdTHNOTxBZaH6mb/ytJGxk7VVJc= github.com/grafana/kindsys v0.0.0-20230508162304-452481b63482 h1:1YNoeIhii4UIIQpCPU+EXidnqf449d0C3ZntAEt4KSo= github.com/grafana/kindsys v0.0.0-20230508162304-452481b63482/go.mod h1:GNcfpy5+SY6RVbNGQW264gC0r336Dm+0zgQ5vt6+M8Y= github.com/grafana/prometheus-alertmanager v0.25.1-0.20230918083811-3513be6760b7 h1:7gsywzIb39SYZEp9qOnNaxD4d9OOkAfJGvnRUQUtlTM= @@ -2109,7 +2123,6 @@ github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvW github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= -github.com/klauspost/asmfmt v1.3.2 h1:4Ri7ox3EwapiOjCki+hw14RyKk201CN4rzyCJRFLpK4= github.com/klauspost/asmfmt v1.3.2/go.mod h1:AG8TuvYojzulgDAMCnYn50l/5QV3Bs/tp6j0HLHbNSE= github.com/klauspost/compress v1.8.2/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= github.com/klauspost/compress v1.9.5/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= @@ -2178,7 +2191,9 @@ github.com/linode/linodego v1.14.1/go.mod h1:NJlzvlNtdMRRkXb0oN6UWzUkj6t+IBsyveH github.com/luna-duclos/instrumentedsql v0.0.0-20181127104832-b7d587d28109/go.mod h1:PWUIzhtavmOR965zfawVsHXbEuU1G29BPZ/CB3C7jXk= github.com/luna-duclos/instrumentedsql v1.1.2/go.mod h1:4LGbEqDnopzNAiyxPPDXhLspyunZxgPTMJBKtC6U0BQ= github.com/luna-duclos/instrumentedsql v1.1.3/go.mod h1:9J1njvFds+zN7y85EDhN9XNQLANWwZt2ULeIC8yMNYs= +github.com/lyft/protoc-gen-star v0.6.0/go.mod h1:TGAoBVkt8w7MPG72TrKIu85MIdXwDuzJYeZuUPFPNwA= github.com/lyft/protoc-gen-star v0.6.1/go.mod h1:TGAoBVkt8w7MPG72TrKIu85MIdXwDuzJYeZuUPFPNwA= +github.com/lyft/protoc-gen-validate v0.0.13/go.mod h1:XbGvPuh87YZc5TdIa2/I4pLk0QoUACkjt2znoq26NVQ= github.com/m3db/prometheus_remote_client_golang v0.4.4 h1:DsAIjVKoCp7Ym35tAOFL1OuMLIdIikAEHeNPHY+yyM8= github.com/m3db/prometheus_remote_client_golang v0.4.4/go.mod h1:wHfVbA3eAK6dQvKjCkHhusWYegCk3bDGkA15zymSHdc= github.com/magefile/mage v1.11.0/go.mod h1:z5UZb/iS3GoOSn0JgWuiw7dxlurVYTu+/jHXqQg881A= @@ -2282,9 +2297,7 @@ github.com/miekg/dns v1.1.41/go.mod h1:p6aan82bvRIyn+zDIv9xYNUpwa73JcSh9BKwknJys github.com/miekg/dns v1.1.43/go.mod h1:+evo5L0630/F6ca/Z9+GAqzhjGyn8/c+TBaOyfEl0V4= github.com/miekg/dns v1.1.51 h1:0+Xg7vObnhrz/4ZCZcZh7zPXlmU0aveS2HDBd0m0qSo= github.com/miekg/dns v1.1.51/go.mod h1:2Z9d3CP1LQWihRZUf29mQ19yDThaI4DAYzte2CaQW5c= -github.com/minio/asm2plan9s v0.0.0-20200509001527-cdd76441f9d8 h1:AMFGa4R4MiIpspGNG7Z948v4n35fFGB3RR3G/ry4FWs= github.com/minio/asm2plan9s v0.0.0-20200509001527-cdd76441f9d8/go.mod h1:mC1jAcsrzbxHt8iiaC+zU4b1ylILSosueou12R++wfY= -github.com/minio/c2goasm v0.0.0-20190812172519-36a3d3bbc4f3 h1:+n/aFZefKZp7spd8DFdX7uMikMLXX4oubIzJF4kv/wI= github.com/minio/c2goasm v0.0.0-20190812172519-36a3d3bbc4f3/go.mod h1:RagcQ7I8IeTMnF8JTXieKnO4Z6JCsikNEzj0DwauVzE= github.com/minio/highwayhash v1.0.1/go.mod h1:BQskDq+xkJ12lmlUUi7U0M5Swg3EWR+dLTk+kldvVxY= github.com/minio/highwayhash v1.0.2/go.mod h1:BQskDq+xkJ12lmlUUi7U0M5Swg3EWR+dLTk+kldvVxY= @@ -2730,6 +2743,7 @@ github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B github.com/spf13/afero v1.2.0/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= github.com/spf13/afero v1.3.3/go.mod h1:5KUK8ByomD5Ti5Artl0RtHeI5pTF7MIDuXL3yY520V4= +github.com/spf13/afero v1.6.0/go.mod h1:Ai8FlHk4v/PARR026UzYexafAt9roJ7LcLMAmO6Z93I= github.com/spf13/afero v1.8.2/go.mod h1:CtAatgMJh6bJEIs48Ay/FOnkljP3WeGUG0MC1RfAqwo= github.com/spf13/afero v1.9.2 h1:j49Hj62F0n+DaZ1dDCvhABaPNSGNkt32oRFxI33IEMw= github.com/spf13/afero v1.9.2/go.mod h1:iUV7ddyEEZPO5gA3zD4fJt6iStLlL+Lg4m2cihcDf8Y= @@ -2790,7 +2804,6 @@ github.com/stretchr/testify v1.7.5/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= -github.com/stretchr/testify v1.8.3/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/subosito/gotenv v1.1.1/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= @@ -2844,8 +2857,8 @@ github.com/unrolled/secure v0.0.0-20180918153822-f340ee86eb8b/go.mod h1:mnPT77IA github.com/unrolled/secure v0.0.0-20181005190816-ff9db2ff917f/go.mod h1:mnPT77IAdsi/kV7+Es7y+pXALeV3h7G6dQF6mNYjcLA= github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= -github.com/urfave/cli v1.22.12 h1:igJgVw1JdKH+trcLWLeLwZjU9fEfPesQ+9/e4MQ44S8= -github.com/urfave/cli v1.22.12/go.mod h1:sSBEIC79qR6OvcmsD4U3KABeOTxDqQtdDnaFuUN30b8= +github.com/urfave/cli v1.22.14 h1:ebbhrRiGK2i4naQJr+1Xj92HXZCrK7MsyTS/ob3HnAk= +github.com/urfave/cli v1.22.14/go.mod h1:X0eDS6pD6Exaclxm99NJ3FiCDRED7vIHpx2mDOHLvkA= github.com/urfave/cli/v2 v2.25.0 h1:ykdZKuQey2zq0yin/l7JOm9Mh+pg72ngYMeB0ABn6q8= github.com/urfave/cli/v2 v2.25.0/go.mod h1:GHupkWPMM0M/sj1a2b4wUrWBPzazNrIjouW6fmdJLxc= github.com/urfave/negroni v1.0.0/go.mod h1:Meg73S6kFm/4PpbYdq35yYWoCZ9mS/YSx+lKnmiohz4= @@ -2978,40 +2991,39 @@ go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= go.opentelemetry.io/collector/pdata v1.0.0-rc8 h1:vBikWdZFsRiT5dVsLQhnE99w3edM7eem3Q9dSqMlStE= go.opentelemetry.io/collector/pdata v1.0.0-rc8/go.mod h1:BVCBhWgclYCh7Oi6BkMiQfRa6MXv1uRTlKXuL5oBby8= go.opentelemetry.io/contrib v0.18.0/go.mod h1:G/EtFaa6qaN7+LxqfIAT3GiZa7Wv5DTBUzl5H4LY0Kc= -go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.42.0 h1:ZOLJc06r4CB42laIXg/7udr0pbZyuAihN10A/XuiQRY= -go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.42.0/go.mod h1:5z+/ZWJQKXa9YT34fQNx5K8Hd1EoIhvtUygUQPqEOgQ= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.45.0 h1:RsQi0qJ2imFfCvZabqzM9cNXBG8k6gXMv1A0cXRmH6A= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.45.0/go.mod h1:vsh3ySueQCiKPxFLvjWC4Z135gIa34TQ/NSqkDTZYUM= go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.18.0/go.mod h1:iK1G0FgHurSJ/aYLg5LpnPI0pqdanM73S3dhyDp0Lk4= -go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.42.0 h1:0vzgiFDsCh/jxRCR1xcRrtMoeCu2itXz/PsXst5P8rI= -go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.42.0/go.mod h1:y0vOY2OKFMOTvwxKfurStPayUUKGHlNeVqNneHmFXr0= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.42.0 h1:pginetY7+onl4qN1vl0xW/V/v6OBZ0vVdH+esuJgvmM= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.42.0/go.mod h1:XiYsayHc36K3EByOO6nbAXnAWbrUxdjUROCEeeROOH8= -go.opentelemetry.io/contrib/propagators/jaeger v1.17.0 h1:Zbpbmwav32Ea5jSotpmkWEl3a6Xvd4tw/3xxGO1i05Y= -go.opentelemetry.io/contrib/propagators/jaeger v1.17.0/go.mod h1:tcTUAlmO8nuInPDSBVfG+CP6Mzjy5+gNV4mPxMbL0IA= +go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.45.0 h1:2ea0IkZBsWH+HA2GkD+7+hRw2u97jzdFyRtXuO14a1s= +go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.45.0/go.mod h1:4m3RnBBb+7dB9d21y510oO1pdB1V4J6smNf14WXcBFQ= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.45.0 h1:x8Z78aZx8cOF0+Kkazoc7lwUNMGy0LrzEMxTm4BbTxg= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.45.0/go.mod h1:62CPTSry9QZtOaSsE3tOzhx6LzDhHnXJ6xHeMNNiM6Q= +go.opentelemetry.io/contrib/propagators/jaeger v1.20.0 h1:iVhNKkMIpzyZqxk8jkDU2n4DFTD+FbpGacvooxEvyyc= +go.opentelemetry.io/contrib/propagators/jaeger v1.20.0/go.mod h1:cpSABr0cm/AH/HhbJjn+AudBVUMgZWdfN3Gb+ZqxSZc= go.opentelemetry.io/contrib/samplers/jaegerremote v0.9.0 h1:zRi6a8uX+cJGTPLXRPjFEzN27a26k5R7LiLK87ntXgg= go.opentelemetry.io/contrib/samplers/jaegerremote v0.9.0/go.mod h1:pzJOLTppaPbiPjPZEwGRf0VWx6G07hhOqznjKXIMkEk= -go.opentelemetry.io/otel v1.16.0 h1:Z7GVAX/UkAXPKsy94IU+i6thsQS4nb7LviLpnaNeW8s= -go.opentelemetry.io/otel v1.16.0/go.mod h1:vl0h9NUa1D5s1nv3A5vZOYWn8av4K8Ml6JDeHrT/bx4= +go.opentelemetry.io/otel v1.19.0 h1:MuS/TNf4/j4IXsZuJegVzI1cwut7Qc00344rgH7p8bs= +go.opentelemetry.io/otel v1.19.0/go.mod h1:i0QyjOq3UPoTzff0PJB2N66fb4S0+rSbSB15/oyH9fY= go.opentelemetry.io/otel/exporters/jaeger v1.10.0 h1:7W3aVVjEYayu/GOqOVF4mbTvnCuxF1wWu3eRxFGQXvw= go.opentelemetry.io/otel/exporters/jaeger v1.10.0/go.mod h1:n9IGyx0fgyXXZ/i0foLHNxtET9CzXHzZeKCucvRBFgA= go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.14.0/go.mod h1:UFG7EBMRdXyFstOwH028U0sVf+AvukSGhF0g8+dmNG8= -go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.16.0 h1:t4ZwRPU+emrcvM2e9DHd0Fsf0JTPVcbfa/BhTDF03d0= -go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.16.0/go.mod h1:vLarbg68dH2Wa77g71zmKQqlQ8+8Rq3GRG31uc0WcWI= go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.14.0/go.mod h1:HrbCVv40OOLTABmOn1ZWty6CHXkU8DK/Urc43tHug70= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.16.0 h1:cbsD4cUcviQGXdw8+bo5x2wazq10SKz8hEbtCRPcU78= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.16.0/go.mod h1:JgXSGah17croqhJfhByOLVY719k1emAXC8MVhCIJlRs= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.19.0 h1:Mne5On7VWdx7omSrSSZvM4Kw7cS7NQkOOmLcgscI51U= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.19.0/go.mod h1:IPtUMKL4O3tH5y+iXVyAXqpAwMuzC1IrxVS81rummfE= go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.14.0/go.mod h1:5w41DY6S9gZrbjuq6Y+753e96WfPha5IcsOSZTtullM= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.16.0 h1:TVQp/bboR4mhZSav+MdgXB8FaRho1RC8UwVn3T0vjVc= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.16.0/go.mod h1:I33vtIe0sR96wfrUcilIzLoA3mLHhRmz9S9Te0S3gDo= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.19.0 h1:3d+S281UTjM+AbF31XSOYn1qXn3BgIdWl8HNEpx08Jk= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.19.0/go.mod h1:0+KuTDyKL4gjKCF75pHOX4wuzYDUZYfAQdSu43o+Z2I= go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.14.0/go.mod h1:+N7zNjIJv4K+DeX67XXET0P+eIciESgaFDBqh+ZJFS4= -go.opentelemetry.io/otel/metric v1.16.0 h1:RbrpwVG1Hfv85LgnZ7+txXioPDoh6EdbZHo26Q3hqOo= -go.opentelemetry.io/otel/metric v1.16.0/go.mod h1:QE47cpOmkwipPiefDwo2wDzwJrlfxxNYodqc4xnGCo4= +go.opentelemetry.io/otel/metric v1.19.0 h1:aTzpGtV0ar9wlV4Sna9sdJyII5jTVJEvKETPiOKwvpE= +go.opentelemetry.io/otel/metric v1.19.0/go.mod h1:L5rUsV9kM1IxCj1MmSdS+JQAcVm319EUrDVLrt7jqt8= go.opentelemetry.io/otel/oteltest v0.18.0/go.mod h1:NyierCU3/G8DLTva7KRzGii2fdxdR89zXKH1bNWY7Bo= go.opentelemetry.io/otel/sdk v1.14.0/go.mod h1:bwIC5TjrNG6QDCHNWvW4HLHtUQ4I+VQDsnjhvyZCALM= -go.opentelemetry.io/otel/sdk v1.16.0 h1:Z1Ok1YsijYL0CSJpHt4cS3wDDh7p572grzNrBMiMWgE= -go.opentelemetry.io/otel/sdk v1.16.0/go.mod h1:tMsIuKXuuIWPBAOrH+eHtvhTL+SntFtXF9QD68aP6p4= -go.opentelemetry.io/otel/trace v1.16.0 h1:8JRpaObFoW0pxuVPapkgH8UhHQj+bJW8jJsCZEu5MQs= -go.opentelemetry.io/otel/trace v1.16.0/go.mod h1:Yt9vYq1SdNz3xdjZZK7wcXv1qv2pwLkqr2QVwea0ef0= +go.opentelemetry.io/otel/sdk v1.19.0 h1:6USY6zH+L8uMH8L3t1enZPR3WFEmSTADlqldyHtJi3o= +go.opentelemetry.io/otel/sdk v1.19.0/go.mod h1:NedEbbS4w3C6zElbLdPJKOpJQOrGUJ+GfzpjUvI0v1A= +go.opentelemetry.io/otel/trace v1.19.0 h1:DFVQmlVbfVeOuBRrwdtaehRrWiL1JoVs9CPIQ1Dzxpg= +go.opentelemetry.io/otel/trace v1.19.0/go.mod h1:mfaSyvGyEJEI0nyV2I4qhNQnbBOUUmYZpYojqMnX2vo= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= +go.opentelemetry.io/proto/otlp v0.15.0/go.mod h1:H7XAot3MsfNsj7EXtrA2q5xSNQ10UqI405h3+duxN4U= go.opentelemetry.io/proto/otlp v0.19.0/go.mod h1:H7XAot3MsfNsj7EXtrA2q5xSNQ10UqI405h3+duxN4U= go.opentelemetry.io/proto/otlp v1.0.0 h1:T0TX0tmXU8a3CbNXzEKGeU5mIVOdf0oykP+u2lIVU/I= go.opentelemetry.io/proto/otlp v1.0.0/go.mod h1:Sy6pihPLfYHkr3NkUbEhGHFhINUSI/v80hjKIs5JXpM= @@ -3123,8 +3135,9 @@ golang.org/x/crypto v0.6.0/go.mod h1:OFC/31mSvZgRz0V1QTNCzfAI1aIRzbiufJtkMIlEp58 golang.org/x/crypto v0.7.0/go.mod h1:pYwdfH91IfpZVANVyUOhSIPZaFoJGxTFbZhFTx+dXZU= golang.org/x/crypto v0.8.0/go.mod h1:mRqEX+O9/h5TFCrQhkgjo2yKi0yYA+9ecGkdQoHrywE= golang.org/x/crypto v0.9.0/go.mod h1:yrmDGqONDYtNj3tH8X9dzUun2m2lzPa9ngI6/RUPGR0= -golang.org/x/crypto v0.12.0 h1:tFM/ta59kqch6LlvYnPa0yx5a83cL2nHflFhYKvv9Yk= golang.org/x/crypto v0.12.0/go.mod h1:NF0Gs7EO5K4qLn+Ylc+fih8BSTeIjAP05siRnAh98yw= +golang.org/x/crypto v0.14.0 h1:wBqGXzWJW6m1XrIKlAH0Hs1JJ7+9KBwnIO8v66Q9cHc= +golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4= golang.org/x/exp v0.0.0-20180321215751-8460e604b9de/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20180807140117-3d87b88a115f/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= @@ -3158,6 +3171,7 @@ golang.org/x/image v0.0.0-20210607152325-775e3b0c77b9/go.mod h1:023OzeP/+EPmXeap golang.org/x/image v0.0.0-20210628002857-a66eb6448b8d/go.mod h1:023OzeP/+EPmXeapQh35lcL3II3LrY8Ic+EFFKVhULM= golang.org/x/image v0.0.0-20211028202545-6944b10bf410/go.mod h1:023OzeP/+EPmXeapQh35lcL3II3LrY8Ic+EFFKVhULM= golang.org/x/image v0.0.0-20220302094943-723b81ca9867/go.mod h1:023OzeP/+EPmXeapQh35lcL3II3LrY8Ic+EFFKVhULM= +golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= @@ -3193,6 +3207,7 @@ golang.org/x/mod v0.12.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/net v0.0.0-20180530234432-1e491301e022/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180816102801-aaf60122140d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180921000356-2f5d2388922f/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180926154720-4dfa2610cdf3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -3265,6 +3280,7 @@ golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qx golang.org/x/net v0.0.0-20210610132358-84b48f89b13b/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210614182718-04defd469f4e/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20210813160813-60bc85c4be6d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210917221730-978cfadd31cf/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211008194852-3b03d305991f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= @@ -3298,8 +3314,9 @@ golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc= golang.org/x/net v0.9.0/go.mod h1:d48xBJpPfHeWQsugry2m+kC02ZBRGRgulfHnEXEuWns= golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= -golang.org/x/net v0.14.0 h1:BONx9s002vGdD9umnlX1Po8vOZmrgH34qlHcD1MfK14= golang.org/x/net v0.14.0/go.mod h1:PpSgVXXLK0OxS0F31C1/tv6XNguvCrnXIDrFMspZIUI= +golang.org/x/net v0.17.0 h1:pVaXccu2ozPjCXewfr1S7xza/zcXTity9cCdXQYSjIM= +golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20181003184128-c57b0facaced/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20181106182150-f42d05182288/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= @@ -3330,6 +3347,7 @@ golang.org/x/oauth2 v0.0.0-20220822191816-0ebed06d0094/go.mod h1:h4gKUeWbJ4rQPri golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= golang.org/x/oauth2 v0.0.0-20221006150949-b44042a4b9c1/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= golang.org/x/oauth2 v0.0.0-20221014153046-6fdb5e3db783/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= +golang.org/x/oauth2 v0.4.0/go.mod h1:RznEsdpjGAINPTOF0UH/t+xJ75L18YO3Ho6Pyn+uRec= golang.org/x/oauth2 v0.5.0/go.mod h1:9/XBHVqLaWO3/BRHs5jbpYCnOZVjj5V0ndyaAM7KB4I= golang.org/x/oauth2 v0.6.0/go.mod h1:ycmewcwgD4Rpr3eZJLSB4Kyyljb3qDh40vJ8STE5HKw= golang.org/x/oauth2 v0.8.0/go.mod h1:yr7u4HXZRm1R1kBWqr/xKNqewf0plRYoB7sla+BCIXE= @@ -3475,6 +3493,7 @@ golang.org/x/sys v0.0.0-20210616045830-e2b7044e8c71/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210806184541-e5e7981a1069/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210816183151-1e6c022a8912/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210823070655-63515b42dcdf/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210908233432-aa78b53d3365/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210917161153-d61c044b1678/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -3522,8 +3541,8 @@ golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.7.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.12.0 h1:CM0HF96J0hcLAwsHPJZjfdNzs0gftsLfgKt57wWHJ0o= -golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.13.0 h1:Af8nKPmuFypiUBjVoU9V20FiaFXOcuZI21p0ycVYYGE= +golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= @@ -3536,8 +3555,9 @@ golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= golang.org/x/term v0.6.0/go.mod h1:m6U89DPEgQRMq3DNkDClhWw02AUbt2daBVO4cn4Hv9U= golang.org/x/term v0.7.0/go.mod h1:P32HKFT3hSsZrRxla30E9HqToFYAQPCMs/zFMBUFqPY= golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo= -golang.org/x/term v0.11.0 h1:F9tnn/DA/Im8nCwm+fX+1/eBwi4qFjRT++MhtVC4ZX0= golang.org/x/term v0.11.0/go.mod h1:zC9APTIj3jG3FdV/Ons+XE1riIZXG4aZ4GTHiPZJPIU= +golang.org/x/term v0.13.0 h1:bb+I9cTfFazGW51MZqBVmZy7+JEJMouUHTUSKVQLBek= +golang.org/x/term v0.13.0/go.mod h1:LTmsnFJwVN6bCy1rVCoS+qHT1HhALEFxKncY3WNNh4U= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -3554,8 +3574,9 @@ golang.org/x/text v0.6.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= -golang.org/x/text v0.12.0 h1:k+n5B8goJNdU7hSvEtMUz3d1Q6D/XW4COJSJR6fN0mc= golang.org/x/text v0.12.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= +golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k= +golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= @@ -3572,6 +3593,7 @@ golang.org/x/time v0.3.0 h1:rg5rLMjNzMS1RkNLzCG38eapWhnYLFYXDXj2gOlr8j4= golang.org/x/time v0.3.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180525024113-a5b4c53f6e8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20181003024731-2f84ea8ef872/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20181006002542-f60d9635b16a/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= @@ -3596,6 +3618,7 @@ golang.org/x/tools v0.0.0-20181221001348-537d06c36207/go.mod h1:n7NCudcB/nEzxVGm golang.org/x/tools v0.0.0-20190102213336-ca9055ed7d04/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190104182027-498d95493402/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190111214448-fc1d57b08d7b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190118193359-16909d206f00/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190206041539-40960b6deb8e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= @@ -3786,6 +3809,7 @@ google.golang.org/api v0.110.0/go.mod h1:7FC4Vvx1Mooxh8C5HWjzZHcavuS2f6pmJpZx60c google.golang.org/api v0.111.0/go.mod h1:qtFHvU9mhgTJegR31csQ+rwxyUTHOKFqCKWp1J0fdw0= google.golang.org/api v0.126.0 h1:q4GJq+cAdMAC7XP7njvQ4tvohGLiSlytuL4BQxbIZ+o= google.golang.org/api v0.126.0/go.mod h1:mBwVAtz+87bEN6CbA1GtZPDOqY2R5ONPqJeIlvyo4Aw= +google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.2.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.3.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= @@ -3891,6 +3915,7 @@ google.golang.org/genproto v0.0.0-20220222213610-43724f9ea8cf/go.mod h1:kGP+zUP2 google.golang.org/genproto v0.0.0-20220304144024-325a89244dc8/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= google.golang.org/genproto v0.0.0-20220310185008-1973136f34c6/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= google.golang.org/genproto v0.0.0-20220324131243-acbaeb5b85eb/go.mod h1:hAL49I2IFola2sVEjAn7MEwsja0xp51I0tlGAf9hz4E= +google.golang.org/genproto v0.0.0-20220329172620-7be39ac1afc7/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= google.golang.org/genproto v0.0.0-20220401170504-314d38edb7de/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= google.golang.org/genproto v0.0.0-20220407144326-9054f6ed7bac/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= google.golang.org/genproto v0.0.0-20220413183235-5e96e2839df9/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= @@ -3954,8 +3979,57 @@ google.golang.org/genproto/googleapis/api v0.0.0-20230731193218-e0aa005b6bdf h1: google.golang.org/genproto/googleapis/api v0.0.0-20230731193218-e0aa005b6bdf/go.mod h1:5DZzOUPCLYL3mNkQ0ms0F3EuUNZ7py1Bqeq6sxzI7/Q= google.golang.org/genproto/googleapis/rpc v0.0.0-20230731193218-e0aa005b6bdf h1:guOdSPaeFgN+jEJwTo1dQ71hdBm+yKSCCKuTRkJzcVo= google.golang.org/genproto/googleapis/rpc v0.0.0-20230731193218-e0aa005b6bdf/go.mod h1:zBEcrKX2ZOcEkHWxBPAIvYUWOKKMIhYcmNiUIu2ji3I= -google.golang.org/grpc v1.45.0 h1:NEpgUqV3Z+ZjkqMsxMg11IaDrXY4RY6CQukSGK0uI1M= +google.golang.org/grpc v1.8.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= +google.golang.org/grpc v1.12.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= +google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs= +google.golang.org/grpc v1.18.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs= +google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= +google.golang.org/grpc v1.20.0/go.mod h1:chYK+tFQF0nDUGJgXMSgLCQk3phJEuONr2DCgLDdAQM= +google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= +google.golang.org/grpc v1.21.0/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= +google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= +google.golang.org/grpc v1.22.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +google.golang.org/grpc v1.22.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +google.golang.org/grpc v1.23.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= +google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= +google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= +google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.31.1/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.32.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= +google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= +google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8= +google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= +google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= +google.golang.org/grpc v1.36.1/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= +google.golang.org/grpc v1.37.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= +google.golang.org/grpc v1.37.1/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= +google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= +google.golang.org/grpc v1.39.0/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE= +google.golang.org/grpc v1.39.1/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE= +google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= +google.golang.org/grpc v1.40.1/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= +google.golang.org/grpc v1.42.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU= +google.golang.org/grpc v1.44.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU= google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ= +google.golang.org/grpc v1.46.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= +google.golang.org/grpc v1.46.2/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= +google.golang.org/grpc v1.47.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= +google.golang.org/grpc v1.48.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= +google.golang.org/grpc v1.49.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= +google.golang.org/grpc v1.50.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= +google.golang.org/grpc v1.50.1/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= +google.golang.org/grpc v1.51.0/go.mod h1:wgNDFcnuBGmxLKI/qn4T+m5BtEBYXJPvibbUPsAIPww= +google.golang.org/grpc v1.52.0/go.mod h1:pu6fVzoFb+NBYNAvQL08ic+lvB2IojljRYuun5vorUY= +google.golang.org/grpc v1.53.0/go.mod h1:OnIrk0ipVdj4N5d9IUoFUx72/VlD7+jUsHwZgwSMQpw= +google.golang.org/grpc v1.58.2 h1:SXUpjxeVF3FKrTYQI4f4KvbGD5u2xccdYdurwowix5I= +google.golang.org/grpc v1.58.2/go.mod h1:tgX3ZQDlNJGU96V6yHh1T/JeoBQ2TXdr43YbYSsCJk0= google.golang.org/grpc/cmd/protoc-gen-go-grpc v0.0.0-20200910201057-6591123024b3/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= google.golang.org/grpc/examples v0.0.0-20210304020650-930c79186c99/go.mod h1:Ly7ZA/ARzg8fnPU9TyZIxoz33sEUuWX7txiqs8lPTgE= @@ -4052,6 +4126,7 @@ gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81 gotest.tools/v3 v3.0.2/go.mod h1:3SzNCllyD9/Y+b5r9JIKQ474KzkZyqLqEfYqMsX94Bk= gotest.tools/v3 v3.0.3 h1:4AuOwCGf4lLR9u3YOe2awrHygurzhO/HeQ6laiA6Sx0= gotest.tools/v3 v3.0.3/go.mod h1:Z7Lb0S5l+klDB31fvDQX8ss/FlKDxtlFlw3Oa8Ymbl8= +honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= diff --git a/kinds/dashboard/dashboard_kind.cue b/kinds/dashboard/dashboard_kind.cue index 0b32ebff3dad0..1fb8337316605 100644 --- a/kinds/dashboard/dashboard_kind.cue +++ b/kinds/dashboard/dashboard_kind.cue @@ -176,6 +176,9 @@ lineage: schemas: [{ // TODO -- this should not exist here, it is based on the --grafana-- datasource type?: string @grafanamaturity(NeedsExpertReview) + // Set to 1 for the standard annotation query all dashboards have by default. + builtIn?: number | *0 + // unless datasources have migrated to the target+mapping, // they just spread their query into the base object :( ... diff --git a/kinds/playlist/playlist_kind.cue b/kinds/playlist/playlist_kind.cue deleted file mode 100644 index a87e1c01a1e95..0000000000000 --- a/kinds/playlist/playlist_kind.cue +++ /dev/null @@ -1,47 +0,0 @@ -package kind - -name: "Playlist" -maturity: "merged" -description: "A playlist is a series of dashboards that is automatically rotated in the browser, on a configurable interval." - -lineage: schemas: [{ - version: [0, 0] - schema: { - spec: { - // Unique playlist identifier. Generated on creation, either by the - // creator of the playlist of by the application. - uid: string - - // Name of the playlist. - name: string - - // Interval sets the time between switching views in a playlist. - // FIXME: Is this based on a standardized format or what options are available? Can datemath be used? - interval: string | *"5m" - - // The ordered list of items that the playlist will iterate over. - // FIXME! This should not be optional, but changing it makes the godegen awkward - items?: [...#PlaylistItem] - } @cuetsy(kind="interface") - - /////////////////////////////////////// - // Definitions (referenced above) are declared below - - #PlaylistItem: { - // Type of the item. - type: "dashboard_by_uid" | "dashboard_by_id" | "dashboard_by_tag" - // Value depends on type and describes the playlist item. - // - // - dashboard_by_id: The value is an internal numerical identifier set by Grafana. This - // is not portable as the numerical identifier is non-deterministic between different instances. - // Will be replaced by dashboard_by_uid in the future. (deprecated) - // - dashboard_by_tag: The value is a tag which is set on any number of dashboards. All - // dashboards behind the tag will be added to the playlist. - // - dashboard_by_uid: The value is the dashboard UID - value: string - - // Title is an unused property -- it will be removed in the future - title?: string - } @cuetsy(kind="interface") - } -}] diff --git a/lerna.json b/lerna.json index ea142398f5341..c6ce7b48bd92b 100644 --- a/lerna.json +++ b/lerna.json @@ -1,6 +1,8 @@ { "npmClient": "yarn", "useWorkspaces": true, - "packages": ["packages/*"], - "version": "10.2.0-pre" + "packages": [ + "packages/*" + ], + "version": "10.3.0-pre" } diff --git a/package.json b/package.json index 55027d7d34a55..abe2e821b63ca 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "license": "AGPL-3.0-only", "private": true, "name": "grafana", - "version": "10.2.0-pre", + "version": "10.3.0-pre", "repository": "github:grafana/grafana", "scripts": { "build": "yarn i18n:compile && NODE_ENV=production webpack --progress --config scripts/webpack/webpack.prod.js", @@ -25,7 +25,7 @@ "lint:sass": "yarn stylelint '{public/sass,packages}/**/*.scss' --cache", "test:ci": "yarn i18n:compile && mkdir -p reports/junit && JEST_JUNIT_OUTPUT_DIR=reports/junit jest --ci --reporters=default --reporters=jest-junit -w ${TEST_MAX_WORKERS:-100%}", "lint:fix": "yarn lint:ts --fix", - "packages:build": "lerna run build --ignore @grafana-plugins/input-datasource", + "packages:build": "lerna run build --ignore '@grafana-plugins/*'", "packages:clean": "rimraf ./npm-artifacts && lerna run clean --parallel", "packages:prepare": "lerna version --no-push --no-git-tag-version --force-publish --exact", "packages:pack": "mkdir -p ./npm-artifacts && lerna exec --no-private -- yarn pack --out \"../../npm-artifacts/%s-%v.tgz\"", @@ -53,7 +53,11 @@ "betterer": "betterer", "betterer:merge": "betterer merge", "betterer:stats": "ts-node --transpile-only --project ./scripts/cli/tsconfig.json ./scripts/cli/reportBettererStats.ts", - "betterer:issues": "ts-node --transpile-only --project ./scripts/cli/tsconfig.json ./scripts/cli/generateBettererIssues.ts" + "betterer:issues": "ts-node --transpile-only --project ./scripts/cli/tsconfig.json ./scripts/cli/generateBettererIssues.ts", + "generate-icons-bundle-cache-file": "node ./scripts/generate-icon-bundle.js", + "plugin:build": "lerna run build --ignore=\"@grafana/*\"", + "plugin:build:commit": "lerna run build:commit --ignore=\"@grafana/*\"", + "plugin:build:dev": "lerna run dev --ignore=\"@grafana/*\"" }, "grafana": { "whatsNewUrl": "https://grafana.com/docs/grafana/next/whatsnew/whats-new-in-v10-1/", @@ -67,9 +71,9 @@ "@babel/plugin-proposal-optional-chaining": "7.21.0", "@babel/plugin-syntax-dynamic-import": "7.8.3", "@babel/plugin-transform-react-constant-elements": "7.22.5", - "@babel/plugin-transform-runtime": "7.22.9", + "@babel/plugin-transform-runtime": "7.23.2", "@babel/plugin-transform-typescript": "7.22.9", - "@babel/preset-env": "7.22.9", + "@babel/preset-env": "7.23.2", "@babel/preset-react": "7.22.5", "@babel/preset-typescript": "7.23.0", "@babel/runtime": "7.23.1", @@ -102,6 +106,7 @@ "@types/d3-force": "^3.0.0", "@types/d3-scale-chromatic": "3.0.0", "@types/debounce-promise": "3.1.6", + "@types/diff": "^5", "@types/eslint": "8.44.0", "@types/file-saver": "2.0.5", "@types/glob": "^8.0.0", @@ -168,14 +173,14 @@ "esbuild": "0.18.12", "esbuild-loader": "3.0.1", "esbuild-plugin-browserslist": "^0.8.0", - "eslint": "8.44.0", + "eslint": "8.51.0", "eslint-config-prettier": "8.8.0", "eslint-plugin-import": "^2.26.0", - "eslint-plugin-jest": "27.2.3", - "eslint-plugin-jsdoc": "46.4.3", + "eslint-plugin-jest": "27.4.2", + "eslint-plugin-jsdoc": "46.8.2", "eslint-plugin-jsx-a11y": "6.7.1", "eslint-plugin-lodash": "7.4.0", - "eslint-plugin-react": "7.32.2", + "eslint-plugin-react": "7.33.2", "eslint-plugin-react-hooks": "4.6.0", "eslint-webpack-plugin": "4.0.1", "expose-loader": "4.1.0", @@ -194,7 +199,7 @@ "jest-matcher-utils": "29.3.1", "lerna": "5.5.4", "mini-css-extract-plugin": "2.7.6", - "msw": "1.2.2", + "msw": "1.3.2", "mutationobserver-shim": "0.3.7", "ngtemplate-loader": "2.1.0", "node-notifier": "10.0.1", @@ -239,7 +244,8 @@ "@emotion/react": "11.11.1", "@fingerprintjs/fingerprintjs": "^3.4.2", "@glideapps/glide-data-grid": "^5.2.1", - "@grafana/aws-sdk": "0.1.3", + "@grafana-plugins/grafana-testdata-datasource": "workspace:*", + "@grafana/aws-sdk": "0.2.0", "@grafana/data": "workspace:*", "@grafana/e2e-selectors": "workspace:*", "@grafana/experimental": "1.7.0", @@ -247,11 +253,11 @@ "@grafana/faro-web-sdk": "1.2.1", "@grafana/flamegraph": "workspace:*", "@grafana/google-sdk": "0.1.1", - "@grafana/lezer-logql": "0.2.0", + "@grafana/lezer-logql": "0.2.1", "@grafana/lezer-traceql": "0.0.7", "@grafana/monaco-logql": "^0.0.7", "@grafana/runtime": "workspace:*", - "@grafana/scenes": "^1.15.0", + "@grafana/scenes": "^1.18.0", "@grafana/schema": "workspace:*", "@grafana/ui": "workspace:*", "@kusto/monaco-kusto": "^7.4.0", @@ -313,6 +319,7 @@ "dangerously-set-html-content": "1.0.9", "date-fns": "2.30.0", "debounce-promise": "3.1.2", + "diff": "^5.1.0", "emotion": "11.0.0", "eventemitter3": "5.0.1", "fast-deep-equal": "^3.1.3", @@ -354,11 +361,11 @@ "prismjs": "1.29.0", "prop-types": "15.8.1", "pseudoizer": "^0.1.0", - "rc-cascader": "3.12.1", - "rc-drawer": "6.3.0", - "rc-slider": "10.2.1", + "rc-cascader": "3.18.1", + "rc-drawer": "6.5.2", + "rc-slider": "10.3.1", "rc-time-picker": "3.7.3", - "rc-tree": "5.7.9", + "rc-tree": "5.8.0", "re-resizable": "6.9.9", "react": "18.2.0", "react-beautiful-dnd": "13.1.1", @@ -431,7 +438,8 @@ "workspaces": { "packages": [ "packages/*", - "plugins-bundled/internal/*" + "plugins-bundled/internal/*", + "public/app/plugins/*/*" ] }, "engines": { diff --git a/packages/grafana-data/package.json b/packages/grafana-data/package.json index 3315e50bc6edb..3706832ac1eac 100644 --- a/packages/grafana-data/package.json +++ b/packages/grafana-data/package.json @@ -2,7 +2,7 @@ "author": "Grafana Labs", "license": "Apache-2.0", "name": "@grafana/data", - "version": "10.2.0-pre", + "version": "10.3.0-pre", "description": "Grafana Data Library", "keywords": [ "typescript" @@ -36,7 +36,7 @@ }, "dependencies": { "@braintree/sanitize-url": "6.0.2", - "@grafana/schema": "10.2.0-pre", + "@grafana/schema": "10.3.0-pre", "@types/d3-interpolate": "^3.0.0", "@types/string-hash": "1.1.1", "d3-interpolate": "3.0.1", diff --git a/packages/grafana-data/src/dataframe/processDataFrame.ts b/packages/grafana-data/src/dataframe/processDataFrame.ts index 402f4962508f5..a0e95a773b6c8 100644 --- a/packages/grafana-data/src/dataframe/processDataFrame.ts +++ b/packages/grafana-data/src/dataframe/processDataFrame.ts @@ -23,6 +23,7 @@ import { PanelData, LoadingState, GraphSeriesValue, + DataFrameWithValue, } from '../types/index'; import { arrayToDataFrame } from './ArrayDataFrame'; @@ -303,6 +304,9 @@ export const isTableData = (data: unknown): data is DataFrame => Boolean(data && export const isDataFrame = (data: unknown): data is DataFrame => Boolean(data && data.hasOwnProperty('fields')); +export const isDataFrameWithValue = (data: unknown): data is DataFrameWithValue => + Boolean(isDataFrame(data) && data.hasOwnProperty('value')); + /** * Inspect any object and return the results as a DataFrame */ diff --git a/packages/grafana-data/src/datetime/common.ts b/packages/grafana-data/src/datetime/common.ts index fa7fb9454ecdd..9f9b3722f3e99 100644 --- a/packages/grafana-data/src/datetime/common.ts +++ b/packages/grafana-data/src/datetime/common.ts @@ -1,3 +1,5 @@ +import { isEmpty } from 'lodash'; + import { TimeZone, DefaultTimeZone } from '../types/time'; /** @@ -57,5 +59,8 @@ export const setTimeZoneResolver = (resolver: TimeZoneResolver) => { * @public */ export const getTimeZone = (options?: T): TimeZone => { - return options?.timeZone ?? defaultTimeZoneResolver() ?? DefaultTimeZone; + if (options?.timeZone && !isEmpty(options.timeZone)) { + return options.timeZone; + } + return defaultTimeZoneResolver() ?? DefaultTimeZone; }; diff --git a/packages/grafana-data/src/datetime/formatter.test.ts b/packages/grafana-data/src/datetime/formatter.test.ts index 888f3d07c8e1d..18bea1cde7889 100644 --- a/packages/grafana-data/src/datetime/formatter.test.ts +++ b/packages/grafana-data/src/datetime/formatter.test.ts @@ -97,17 +97,9 @@ describe('dateTimeFormat', () => { }); describe('dateTimeFormatTimeAgo', () => { - it('should return the correct format for 3 years ago', () => { + it('should return the correct format for years ago', () => { const options = { timeZone: 'Europe/Stockholm' }; - expect(dateTimeFormatTimeAgo(1587126975779, options)).toBe('3 years ago'); - }); - it('should return the correct format for 2 year ago', () => { - const options = { timeZone: 'Europe/Stockholm' }; - expect(dateTimeFormatTimeAgo(1626154993000, options)).toBe('2 years ago'); - }); - it('should return the correct format for 1 year ago', () => { - const options = { timeZone: 'Europe/Stockholm' }; - expect(dateTimeFormatTimeAgo(1657731795000, options)).toBe('a year ago'); + expect(dateTimeFormatTimeAgo(1587126975779, options)).toContain('years ago'); }); }); describe('dateTimeFormatWithAbbreviation', () => { diff --git a/packages/grafana-data/src/themes/context.tsx b/packages/grafana-data/src/themes/context.tsx new file mode 100644 index 0000000000000..dc87729e9fb76 --- /dev/null +++ b/packages/grafana-data/src/themes/context.tsx @@ -0,0 +1,8 @@ +import React from 'react'; + +import { createTheme } from './createTheme'; + +/** @public */ +export const ThemeContext = React.createContext(createTheme()); + +ThemeContext.displayName = 'ThemeContext'; diff --git a/packages/grafana-data/src/themes/index.ts b/packages/grafana-data/src/themes/index.ts index 80fbed882cdc0..519dc9083d849 100644 --- a/packages/grafana-data/src/themes/index.ts +++ b/packages/grafana-data/src/themes/index.ts @@ -15,3 +15,4 @@ export type { ThemeVisualizationColors, ThemeVizColor, ThemeVizHue } from './cre /** Exporting the module like this to be able to generate docs properly. */ import * as colorManipulator from './colorManipulator'; export { colorManipulator }; +export { ThemeContext } from './context'; diff --git a/packages/grafana-data/src/transformations/fieldReducer.ts b/packages/grafana-data/src/transformations/fieldReducer.ts index 8bd3076701550..8e2eea0f791e9 100644 --- a/packages/grafana-data/src/transformations/fieldReducer.ts +++ b/packages/grafana-data/src/transformations/fieldReducer.ts @@ -30,6 +30,10 @@ export enum ReducerID { uniqueValues = 'uniqueValues', } +export function isReducerID(id: string): id is ReducerID { + return Object.keys(ReducerID).includes(id); +} + // Internal function type FieldReducer = (field: Field, ignoreNulls: boolean, nullAsZero: boolean) => FieldCalcs; diff --git a/packages/grafana-data/src/transformations/transformers.ts b/packages/grafana-data/src/transformations/transformers.ts index a087bd9a467ef..4086a5613fece 100644 --- a/packages/grafana-data/src/transformations/transformers.ts +++ b/packages/grafana-data/src/transformations/transformers.ts @@ -6,6 +6,7 @@ import { filterFieldsTransformer, filterFramesTransformer } from './transformers import { filterFieldsByNameTransformer } from './transformers/filterByName'; import { filterFramesByRefIdTransformer } from './transformers/filterByRefId'; import { filterByValueTransformer } from './transformers/filterByValue'; +import { formatStringTransformer } from './transformers/formatString'; import { formatTimeTransformer } from './transformers/formatTime'; import { groupByTransformer } from './transformers/groupBy'; import { groupingToMatrixTransformer } from './transformers/groupingToMatrix'; @@ -30,6 +31,7 @@ export const standardTransformers = { filterFramesTransformer, filterFramesByRefIdTransformer, filterByValueTransformer, + formatStringTransformer, formatTimeTransformer, orderFieldsTransformer, organizeFieldsTransformer, diff --git a/packages/grafana-data/src/transformations/transformers/convertFieldType.ts b/packages/grafana-data/src/transformations/transformers/convertFieldType.ts index 5225d77d4f0a9..f4ef713c709fa 100644 --- a/packages/grafana-data/src/transformations/transformers/convertFieldType.ts +++ b/packages/grafana-data/src/transformations/transformers/convertFieldType.ts @@ -1,6 +1,8 @@ import { map } from 'rxjs/operators'; -import { dateTimeParse } from '../../datetime'; +import { TimeZone } from '@grafana/schema'; + +import { DateTimeOptionsWhenParsing, dateTimeParse } from '../../datetime'; import { SynchronousDataTransformerInfo } from '../../types'; import { DataFrame, EnumFieldConfig, Field, FieldType } from '../../types/dataFrame'; import { fieldMatchers } from '../matchers'; @@ -25,8 +27,13 @@ export interface ConvertFieldTypeOptions { * Date format to parse a string datetime */ dateFormat?: string; - - /** When converting to an enumeration, this is the target config */ + /** + * When converting a date to a string an option timezone. + */ + timezone?: TimeZone; + /** + * When converting to an enumeration, this is the target config + */ enumConfig?: EnumFieldConfig; } @@ -36,7 +43,7 @@ export const convertFieldTypeTransformer: SynchronousDataTransformerInfo (source) => @@ -96,7 +103,7 @@ export function convertFieldType(field: Field, opts: ConvertFieldTypeOptions): F case FieldType.number: return fieldToNumberField(field); case FieldType.string: - return fieldToStringField(field, opts.dateFormat); + return fieldToStringField(field, opts.dateFormat, { timeZone: opts.timezone }); case FieldType.boolean: return fieldToBooleanField(field); case FieldType.enum: @@ -179,12 +186,19 @@ function fieldToBooleanField(field: Field): Field { }; } -function fieldToStringField(field: Field, dateFormat?: string): Field { +/** + * @internal + */ +export function fieldToStringField( + field: Field, + dateFormat?: string, + parseOptions?: DateTimeOptionsWhenParsing +): Field { let values = field.values; switch (field.type) { case FieldType.time: - values = values.map((v) => dateTimeParse(v).format(dateFormat)); + values = values.map((v) => dateTimeParse(v, parseOptions).format(dateFormat)); break; case FieldType.other: diff --git a/packages/grafana-data/src/transformations/transformers/formatString.test.ts b/packages/grafana-data/src/transformations/transformers/formatString.test.ts new file mode 100644 index 0000000000000..ea0eb1325e569 --- /dev/null +++ b/packages/grafana-data/src/transformations/transformers/formatString.test.ts @@ -0,0 +1,85 @@ +import { toDataFrame } from '../../dataframe/processDataFrame'; +import { FieldType } from '../../types/dataFrame'; +import { mockTransformationsRegistry } from '../../utils/tests/mockTransformationsRegistry'; +import { fieldMatchers } from '../matchers'; +import { FieldMatcherID } from '../matchers/ids'; + +import { + createStringFormatter, + FormatStringOutput, + formatStringTransformer, + getFormatStringFunction, +} from './formatString'; + +const frame = toDataFrame({ + fields: [ + { + name: 'names', + type: FieldType.string, + values: ['alice', 'BOB', ' charliE ', 'david frederick attenborough', 'Emma Fakename', ''], + }, + ], +}); + +const fieldMatches = fieldMatchers.get(FieldMatcherID.byName).get('names'); + +const options = (format: FormatStringOutput, substringStart?: number, substringEnd?: number) => { + return { + stringField: 'names', + substringStart: substringStart ?? 0, + substringEnd: substringEnd ?? 100, + outputFormat: format, + }; +}; + +describe('Format String Transformer', () => { + beforeAll(() => { + mockTransformationsRegistry([formatStringTransformer]); + }); + + it('will convert string to each case', () => { + const formats = [ + FormatStringOutput.UpperCase, + FormatStringOutput.LowerCase, + FormatStringOutput.SentenceCase, + FormatStringOutput.TitleCase, + FormatStringOutput.PascalCase, + FormatStringOutput.CamelCase, + FormatStringOutput.SnakeCase, + FormatStringOutput.KebabCase, + FormatStringOutput.Trim, + ]; + const newValues = []; + + for (let i = 0; i < formats.length; i++) { + const formatter = createStringFormatter(fieldMatches, getFormatStringFunction(options(formats[i]))); + const newFrame = formatter(frame, [frame]); + newValues.push(newFrame[0].values); + } + + const answers = [ + ['ALICE', 'BOB', ' CHARLIE ', 'DAVID FREDERICK ATTENBOROUGH', 'EMMA FAKENAME', ''], // Upper Case + ['alice', 'bob', ' charlie ', 'david frederick attenborough', 'emma fakename', ''], // Lower Case + ['Alice', 'BOB', ' charliE ', 'David frederick attenborough', 'Emma Fakename', ''], // Sentence Case + ['Alice', 'Bob', ' Charlie ', 'David Frederick Attenborough', 'Emma Fakename', ''], // Title Case + ['Alice', 'Bob', 'Charlie', 'DavidFrederickAttenborough', 'EmmaFakename', ''], // Pascal Case + ['alice', 'bob', 'charlie', 'davidFrederickAttenborough', 'emmaFakename', ''], // Camel Case + ['alice', 'bob', '__charlie__', 'david_frederick_attenborough', 'emma_fakename', ''], // Snake Case + ['alice', 'bob', '--charlie--', 'david-frederick-attenborough', 'emma-fakename', ''], // Kebab Case + ['alice', 'BOB', 'charliE', 'david frederick attenborough', 'Emma Fakename', ''], // Trim + ]; + + expect(newValues).toEqual(answers); + }); + + it('will convert string to substring', () => { + const formatter = createStringFormatter( + fieldMatches, + getFormatStringFunction(options(FormatStringOutput.Substring, 2, 5)) + ); + const newFrame = formatter(frame, [frame]); + const newValues = newFrame[0].values; + + expect(newValues).toEqual(['ice', 'B', 'cha', 'vid', 'ma ', '']); + }); +}); diff --git a/packages/grafana-data/src/transformations/transformers/formatString.ts b/packages/grafana-data/src/transformations/transformers/formatString.ts new file mode 100644 index 0000000000000..fb72dd4df0e10 --- /dev/null +++ b/packages/grafana-data/src/transformations/transformers/formatString.ts @@ -0,0 +1,112 @@ +import { map } from 'rxjs/operators'; + +import { DataFrame, Field, FieldType } from '../../types'; +import { DataTransformerInfo, FieldMatcher } from '../../types/transformations'; +import { fieldMatchers } from '../matchers'; +import { FieldMatcherID } from '../matchers/ids'; + +import { DataTransformerID } from './ids'; + +export enum FormatStringOutput { + UpperCase = 'Upper Case', + LowerCase = 'Lower Case', + SentenceCase = 'Sentence Case', + TitleCase = 'Title Case', + PascalCase = 'Pascal Case', + CamelCase = 'Camel Case', + SnakeCase = 'Snake Case', + KebabCase = 'Kebab Case', + Trim = 'Trim', + Substring = 'Substring', +} + +export interface FormatStringTransformerOptions { + stringField: string; + substringStart: number; + substringEnd: number; + outputFormat: FormatStringOutput; +} + +const splitToCapitalWords = (input: string) => { + const arr = input.split(' '); + for (let i = 0; i < arr.length; i++) { + arr[i] = arr[i].charAt(0).toUpperCase() + arr[i].slice(1).toLowerCase(); + } + return arr; +}; + +export const getFormatStringFunction = (options: FormatStringTransformerOptions) => { + return (field: Field) => + field.values.map((value: string) => { + switch (options.outputFormat) { + case FormatStringOutput.UpperCase: + return value.toUpperCase(); + case FormatStringOutput.LowerCase: + return value.toLowerCase(); + case FormatStringOutput.SentenceCase: + return value.charAt(0).toUpperCase() + value.slice(1); + case FormatStringOutput.TitleCase: + return splitToCapitalWords(value).join(' '); + case FormatStringOutput.PascalCase: + return splitToCapitalWords(value).join(''); + case FormatStringOutput.CamelCase: + value = splitToCapitalWords(value).join(''); + return value.charAt(0).toLowerCase() + value.slice(1); + case FormatStringOutput.SnakeCase: + return value.toLowerCase().split(' ').join('_'); + case FormatStringOutput.KebabCase: + return value.toLowerCase().split(' ').join('-'); + case FormatStringOutput.Trim: + return value.trim(); + case FormatStringOutput.Substring: + return value.substring(options.substringStart, options.substringEnd); + } + }); +}; + +export const formatStringTransformer: DataTransformerInfo = { + id: DataTransformerID.formatString, + name: 'Format string', + description: 'Manipulate string fields formatting', + defaultOptions: { stringField: '', outputFormat: FormatStringOutput.UpperCase }, + operator: (options) => (source) => + source.pipe( + map((data) => { + if (data.length === 0) { + return data; + } + + const fieldMatches = fieldMatchers.get(FieldMatcherID.byName).get(options.stringField); + const formatStringFunction = getFormatStringFunction(options); + + const formatter = createStringFormatter(fieldMatches, formatStringFunction); + + return data.map((frame) => ({ + ...frame, + fields: formatter(frame, data), + })); + }) + ), +}; + +/** + * @internal + */ +export const createStringFormatter = + (fieldMatches: FieldMatcher, formatStringFunction: (field: Field) => string[]) => + (frame: DataFrame, allFrames: DataFrame[]) => { + return frame.fields.map((field) => { + // Find the configured field + if (fieldMatches(field, frame, allFrames)) { + const newVals = formatStringFunction(field); + + return { + ...field, + type: FieldType.string, + values: newVals, + }; + } + + return field; + }); + }; diff --git a/packages/grafana-data/src/transformations/transformers/formatTime.test.ts b/packages/grafana-data/src/transformations/transformers/formatTime.test.ts index 5a63b53bfe7f7..bf3700418a39a 100644 --- a/packages/grafana-data/src/transformations/transformers/formatTime.test.ts +++ b/packages/grafana-data/src/transformations/transformers/formatTime.test.ts @@ -13,10 +13,10 @@ describe('Format Time Transformer', () => { const options = { timeField: 'time', outputFormat: 'YYYY-MM', - useTimezone: false, + timezone: 'utc', }; - const formatter = createTimeFormatter(options.timeField, options.outputFormat, options.useTimezone); + const formatter = createTimeFormatter(options.timeField, options.outputFormat, options.timezone); const frame = toDataFrame({ fields: [ { @@ -35,10 +35,10 @@ describe('Format Time Transformer', () => { const options = { timeField: 'time', outputFormat: 'YYYY-MM h:mm:ss a', - useTimezone: false, + timezone: 'utc', }; - const formatter = createTimeFormatter(options.timeField, options.outputFormat, options.useTimezone); + const formatter = createTimeFormatter(options.timeField, options.outputFormat, options.timezone); const frame = toDataFrame({ fields: [ { @@ -51,11 +51,11 @@ describe('Format Time Transformer', () => { const newFrame = formatter(frame.fields); expect(newFrame[0].values).toEqual([ - '2021-02 1:46:40 am', - '2023-07 2:00:00 pm', - '2023-04 3:20:00 pm', - '2023-07 5:34:49 pm', - '2023-08 3:20:00 pm', + '2021-02 6:46:40 am', + '2023-07 8:00:00 pm', + '2023-04 9:20:00 pm', + '2023-07 11:34:49 pm', + '2023-08 9:20:00 pm', ]); }); @@ -63,10 +63,10 @@ describe('Format Time Transformer', () => { const options = { timeField: 'time', outputFormat: 'YYYY-MM h:mm:ss a', - useTimezone: false, + timezone: 'utc', }; - const formatter = createTimeFormatter(options.timeField, options.outputFormat, options.useTimezone); + const formatter = createTimeFormatter(options.timeField, options.outputFormat, options.timezone); const frame = toDataFrame({ fields: [ { @@ -79,10 +79,10 @@ describe('Format Time Transformer', () => { const newFrame = formatter(frame.fields); expect(newFrame[0].values).toEqual([ - '2021-02 1:46:40 am', - '2023-07 2:00:00 pm', - '2023-04 3:20:00 pm', - '2023-07 5:34:49 pm', + '2021-02 6:46:40 am', + '2023-07 8:00:00 pm', + '2023-04 9:20:00 pm', + '2023-07 11:34:49 pm', 'Invalid date', ]); }); diff --git a/packages/grafana-data/src/transformations/transformers/formatTime.ts b/packages/grafana-data/src/transformations/transformers/formatTime.ts index 66406f0ef4863..bd5a496562b32 100644 --- a/packages/grafana-data/src/transformations/transformers/formatTime.ts +++ b/packages/grafana-data/src/transformations/transformers/formatTime.ts @@ -1,29 +1,45 @@ -import moment from 'moment-timezone'; import { map } from 'rxjs/operators'; -import { getTimeZone, getTimeZoneInfo } from '../../datetime'; -import { Field, FieldType } from '../../types'; +import { TimeZone } from '@grafana/schema'; + +import { DataFrame, Field, TransformationApplicabilityLevels } from '../../types'; import { DataTransformerInfo } from '../../types/transformations'; +import { fieldToStringField } from './convertFieldType'; import { DataTransformerID } from './ids'; export interface FormatTimeTransformerOptions { timeField: string; outputFormat: string; - useTimezone: boolean; + timezone: TimeZone; } export const formatTimeTransformer: DataTransformerInfo = { id: DataTransformerID.formatTime, - name: 'Format Time', + name: 'Format time', description: 'Set the output format of a time field', defaultOptions: { timeField: '', outputFormat: '', useTimezone: true }, + isApplicable: (data: DataFrame[]) => { + // Search for a time field + // if there is one then we can use this transformation + for (const frame of data) { + for (const field of frame.fields) { + if (field.type === 'time') { + return TransformationApplicabilityLevels.Applicable; + } + } + } + + return TransformationApplicabilityLevels.NotApplicable; + }, + isApplicableDescription: + 'The Format time transformation requires a time field to work. No time field could be found.', operator: (options) => (source) => source.pipe( map((data) => { // If a field and a format are configured // then format the time output - const formatter = createTimeFormatter(options.timeField, options.outputFormat, options.useTimezone); + const formatter = createTimeFormatter(options.timeField, options.outputFormat, options.timezone); if (!Array.isArray(data) || data.length === 0) { return data; @@ -40,37 +56,21 @@ export const formatTimeTransformer: DataTransformerInfo (fields: Field[]) => { - const tz = getTimeZone(); - - return fields.map((field) => { - // Find the configured field - if (field.name === timeField) { - // Update values to use the configured format - const newVals = field.values.map((value) => { - const date = moment(value); - - // Apply configured timezone if the - // option has been set. Otherwise - // use the date directly - if (useTimezone) { - const info = getTimeZoneInfo(tz, value); - const realTz = info !== undefined ? info.ianaName : 'UTC'; - - return date.tz(realTz).format(outputFormat); - } else { - return date.format(outputFormat); - } - }); - - return { - ...field, - type: FieldType.string, - values: newVals, - }; +export const createTimeFormatter = (timeField: string, outputFormat: string, timezone: string) => (fields: Field[]) => { + return fields.map((field) => { + // Find the configured field + if (field.name === timeField) { + // Update values to use the configured format + let formattedField = null; + if (timezone) { + formattedField = fieldToStringField(field, outputFormat, { timeZone: timezone }); + } else { + formattedField = fieldToStringField(field, outputFormat); } - return field; - }); - }; + return formattedField; + } + + return field; + }); +}; diff --git a/packages/grafana-data/src/transformations/transformers/groupBy.ts b/packages/grafana-data/src/transformations/transformers/groupBy.ts index 61b68a98508d0..e57d15ed9b303 100644 --- a/packages/grafana-data/src/transformations/transformers/groupBy.ts +++ b/packages/grafana-data/src/transformations/transformers/groupBy.ts @@ -2,7 +2,7 @@ import { map } from 'rxjs/operators'; import { guessFieldTypeForField } from '../../dataframe/processDataFrame'; import { getFieldDisplayName } from '../../field/fieldState'; -import { DataFrame, Field, FieldType } from '../../types/dataFrame'; +import { DataFrame, Field, FieldType, TransformationApplicabilityLevels } from '../../types'; import { DataTransformerInfo } from '../../types/transformations'; import { reduceField, ReducerID } from '../fieldReducer'; @@ -29,7 +29,34 @@ export const groupByTransformer: DataTransformerInfo defaultOptions: { fields: {}, }, + isApplicable: (data: DataFrame[]) => { + let maxFields = 0; + + // Group by needs at least two fields + // a field to group on and a field to aggregate + // We make sure that at least one frame has at + // least two fields + for (const frame of data) { + if (frame.fields.length > maxFields) { + maxFields = frame.fields.length; + } + } + + return maxFields >= 2 + ? TransformationApplicabilityLevels.Applicable + : TransformationApplicabilityLevels.NotApplicable; + }, + isApplicableDescription: (data: DataFrame[]) => { + let maxFields = 0; + + for (const frame of data) { + if (frame.fields.length > maxFields) { + maxFields = frame.fields.length; + } + } + return `The Group by transformation requires a series with at least two fields to work. The maximum number of fields found on a series is ${maxFields}`; + }, /** * Return a modified copy of the series. If the transform is not or should not * be applied, just return the input series diff --git a/packages/grafana-data/src/transformations/transformers/groupingToMatrix.ts b/packages/grafana-data/src/transformations/transformers/groupingToMatrix.ts index 741c2a50adf56..f600b5ee7ba10 100644 --- a/packages/grafana-data/src/transformations/transformers/groupingToMatrix.ts +++ b/packages/grafana-data/src/transformations/transformers/groupingToMatrix.ts @@ -1,7 +1,14 @@ import { map } from 'rxjs/operators'; import { getFieldDisplayName } from '../../field/fieldState'; -import { DataFrame, DataTransformerInfo, Field, FieldType, SpecialValue } from '../../types'; +import { + DataFrame, + DataTransformerInfo, + Field, + FieldType, + SpecialValue, + TransformationApplicabilityLevels, +} from '../../types'; import { fieldMatchers } from '../matchers'; import { FieldMatcherID } from '../matchers/ids'; @@ -33,7 +40,29 @@ export const groupingToMatrixTransformer: DataTransformerInfo { + let numFields = 0; + + for (const frame of data) { + numFields += frame.fields.length; + } + + return numFields >= 3 + ? TransformationApplicabilityLevels.Applicable + : TransformationApplicabilityLevels.NotApplicable; + }, + isApplicableDescription: (data: DataFrame[]) => { + let numFields = 0; + for (const frame of data) { + numFields += frame.fields.length; + } + + return `Grouping to matrix requiers at least 3 fields to work. Currently there are ${numFields} fields.`; + }, operator: (options) => (source) => source.pipe( map((data) => { diff --git a/packages/grafana-data/src/transformations/transformers/ids.ts b/packages/grafana-data/src/transformations/transformers/ids.ts index b3cb08dce242a..efcc57804c48e 100644 --- a/packages/grafana-data/src/transformations/transformers/ids.ts +++ b/packages/grafana-data/src/transformations/transformers/ids.ts @@ -38,4 +38,5 @@ export enum DataTransformerID { partitionByValues = 'partitionByValues', timeSeriesTable = 'timeSeriesTable', formatTime = 'formatTime', + formatString = 'formatString', } diff --git a/packages/grafana-data/src/transformations/transformers/merge.ts b/packages/grafana-data/src/transformations/transformers/merge.ts index d1f23459922a8..5abf270b6e5c8 100644 --- a/packages/grafana-data/src/transformations/transformers/merge.ts +++ b/packages/grafana-data/src/transformations/transformers/merge.ts @@ -3,7 +3,7 @@ import { map } from 'rxjs/operators'; import { MutableDataFrame } from '../../dataframe'; import { DataFrame, Field } from '../../types/dataFrame'; -import { DataTransformerInfo } from '../../types/transformations'; +import { DataTransformerInfo, TransformationApplicabilityLevels } from '../../types/transformations'; import { DataTransformerID } from './ids'; @@ -19,6 +19,14 @@ export const mergeTransformer: DataTransformerInfo = { name: 'Merge series/tables', description: 'Merges multiple series/tables into a single serie/table', defaultOptions: {}, + isApplicable: (data: DataFrame[]) => { + return data.length > 1 + ? TransformationApplicabilityLevels.Applicable + : TransformationApplicabilityLevels.NotApplicable; + }, + isApplicableDescription: (data: DataFrame[]) => { + return `The merge transformation requires at least 2 data series to work. There is currently ${data.length} data series.`; + }, operator: (options) => (source) => source.pipe( map((dataFrames) => { diff --git a/packages/grafana-data/src/transformations/transformers/organize.ts b/packages/grafana-data/src/transformations/transformers/organize.ts index f910c600e1802..3eb8b04e709c1 100644 --- a/packages/grafana-data/src/transformations/transformers/organize.ts +++ b/packages/grafana-data/src/transformations/transformers/organize.ts @@ -1,4 +1,4 @@ -import { DataTransformerInfo } from '../../types/transformations'; +import { DataFrame, DataTransformerInfo, TransformationApplicabilityLevels } from '../../types'; import { filterFieldsByNameTransformer } from './filterByName'; import { DataTransformerID } from './ids'; @@ -20,7 +20,11 @@ export const organizeFieldsTransformer: DataTransformerInfo { + return data.length > 1 + ? TransformationApplicabilityLevels.NotPossible + : TransformationApplicabilityLevels.Applicable; + }, /** * Return a modified copy of the series. If the transform is not or should not * be applied, just return the input series diff --git a/packages/grafana-data/src/types/dataFrame.ts b/packages/grafana-data/src/types/dataFrame.ts index 0154d8014c92f..c4712e91ac47d 100644 --- a/packages/grafana-data/src/types/dataFrame.ts +++ b/packages/grafana-data/src/types/dataFrame.ts @@ -247,6 +247,11 @@ export interface DataFrame extends QueryResultBase { length: number; } +// Data frame that include aggregate value, for use by timeSeriesTableTransformer / chart cell type +export interface DataFrameWithValue extends DataFrame { + value: number | null; +} + /** * @public * Like a field, but properties are optional and values may be a simple array diff --git a/packages/grafana-data/src/types/featureToggles.gen.ts b/packages/grafana-data/src/types/featureToggles.gen.ts index 345e9fbd3fde1..e4b4ea317d217 100644 --- a/packages/grafana-data/src/types/featureToggles.gen.ts +++ b/packages/grafana-data/src/types/featureToggles.gen.ts @@ -30,6 +30,7 @@ export interface FeatureToggles { migrationLocking?: boolean; storage?: boolean; correlations?: boolean; + exploreContentOutline?: boolean; datasourceQueryMultiStatus?: boolean; traceToMetrics?: boolean; newDBLibrary?: boolean; @@ -65,7 +66,6 @@ export interface FeatureToggles { individualCookiePreferences?: boolean; gcomOnlyExternalOrgRoleSync?: boolean; prometheusMetricEncyclopedia?: boolean; - timeSeriesTable?: boolean; influxdbBackendMigration?: boolean; clientTokenRotation?: boolean; prometheusDataplane?: boolean; @@ -134,12 +134,17 @@ export interface FeatureToggles { idForwarding?: boolean; cloudWatchWildCardDimensionValues?: boolean; externalServiceAccounts?: boolean; - alertingModifiedExport?: boolean; panelMonitoring?: boolean; enableNativeHTTPHistogram?: boolean; + formatString?: boolean; transformationsVariableSupport?: boolean; kubernetesPlaylists?: boolean; navAdminSubsections?: boolean; recoveryThreshold?: boolean; + teamHttpHeaders?: boolean; awsDatasourcesNewFormStyling?: boolean; + cachingOptimizeSerializationMemoryUsage?: boolean; + panelTitleSearchInV1?: boolean; + pluginsInstrumentationStatusSource?: boolean; + costManagementUi?: boolean; } diff --git a/packages/grafana-data/src/types/transformations.ts b/packages/grafana-data/src/types/transformations.ts index 1f9b3be2c47a8..37501f7d98209 100644 --- a/packages/grafana-data/src/types/transformations.ts +++ b/packages/grafana-data/src/types/transformations.ts @@ -17,6 +17,21 @@ export interface DataTransformContext { interpolate: InterpolateFunction; } +/** + * We score for how applicable a given transformation is. + * Currently : + * 0 is considered as not-applicable + * 1 is considered applicable + * 2 is considered as highly applicable (i.e. should be highlighted) + */ +export type TransformationApplicabilityScore = number; +export enum TransformationApplicabilityLevels { + NotPossible = -1, + NotApplicable = 0, + Applicable = 1, + HighlyApplicable = 2, +} + /** * Function that transform data frames (AKA transformer) * @@ -28,6 +43,18 @@ export interface DataTransformerInfo extends RegistryItemWithOpt * @param options */ operator: (options: TOptions, context: DataTransformContext) => MonoTypeOperatorFunction; + /** + * Function that is present will indicate whether a transformation is applicable + * given the current data. + * @param options + */ + isApplicable?: (data: DataFrame[]) => TransformationApplicabilityScore; + /** + * A description of the applicator. Can either simply be a string + * or function which when given the current dataset returns a string. + * This way descriptions can be tailored relative to the underlying data. + */ + isApplicableDescription?: string | ((data: DataFrame[]) => string); } /** diff --git a/packages/grafana-e2e-selectors/package.json b/packages/grafana-e2e-selectors/package.json index 8f5c597e1d528..a14c3e70282ed 100644 --- a/packages/grafana-e2e-selectors/package.json +++ b/packages/grafana-e2e-selectors/package.json @@ -2,7 +2,7 @@ "author": "Grafana Labs", "license": "Apache-2.0", "name": "@grafana/e2e-selectors", - "version": "10.2.0-pre", + "version": "10.3.0-pre", "description": "Grafana End-to-End Test Selectors Library", "keywords": [ "cli", diff --git a/packages/grafana-e2e/package.json b/packages/grafana-e2e/package.json index 9948eefc6b0b5..8098d0f2de3ab 100644 --- a/packages/grafana-e2e/package.json +++ b/packages/grafana-e2e/package.json @@ -2,7 +2,7 @@ "author": "Grafana Labs", "license": "Apache-2.0", "name": "@grafana/e2e", - "version": "10.2.0-pre", + "version": "10.3.0-pre", "description": "Grafana End-to-End Test Library", "keywords": [ "cli", @@ -61,10 +61,10 @@ }, "dependencies": { "@babel/core": "7.23.0", - "@babel/preset-env": "7.22.9", + "@babel/preset-env": "7.23.2", "@cypress/webpack-preprocessor": "5.17.1", - "@grafana/e2e-selectors": "10.2.0-pre", - "@grafana/schema": "10.2.0-pre", + "@grafana/e2e-selectors": "10.3.0-pre", + "@grafana/schema": "10.3.0-pre", "@grafana/tsconfig": "^1.2.0-rc1", "@mochajs/json-file-reporter": "^1.2.0", "babel-loader": "9.1.3", diff --git a/packages/grafana-eslint-rules/package.json b/packages/grafana-eslint-rules/package.json index 2ccf7d256552b..061e1debae375 100644 --- a/packages/grafana-eslint-rules/package.json +++ b/packages/grafana-eslint-rules/package.json @@ -1,7 +1,7 @@ { "name": "@grafana/eslint-plugin", "description": "ESLint rules for use within the Grafana repo. Not suitable (or supported) for external use.", - "version": "10.2.0-pre", + "version": "10.3.0-pre", "main": "./index.cjs", "author": "Grafana Labs", "license": "Apache-2.0", @@ -15,7 +15,7 @@ }, "devDependencies": { "@typescript-eslint/types": "^5.46.1", - "eslint": "8.44.0", + "eslint": "8.51.0", "tslib": "2.6.0" }, "private": true diff --git a/packages/grafana-flamegraph/package.json b/packages/grafana-flamegraph/package.json index 74da889295b77..105166db5198f 100644 --- a/packages/grafana-flamegraph/package.json +++ b/packages/grafana-flamegraph/package.json @@ -2,7 +2,7 @@ "author": "Grafana Labs", "license": "Apache-2.0", "name": "@grafana/flamegraph", - "version": "10.2.0-pre", + "version": "10.3.0-pre", "description": "Grafana flamegraph visualization component", "keywords": [ "grafana", @@ -44,8 +44,8 @@ ], "dependencies": { "@emotion/css": "11.11.2", - "@grafana/data": "10.2.0-pre", - "@grafana/ui": "10.2.0-pre", + "@grafana/data": "10.3.0-pre", + "@grafana/ui": "10.3.0-pre", "@leeoniya/ufuzzy": "1.0.8", "d3": "^7.8.5", "lodash": "4.17.21", @@ -57,7 +57,7 @@ }, "devDependencies": { "@babel/core": "7.23.0", - "@babel/preset-env": "7.22.9", + "@babel/preset-env": "7.23.2", "@babel/preset-react": "7.22.5", "@grafana/tsconfig": "^1.2.0-rc1", "@rollup/plugin-node-resolve": "15.2.3", diff --git a/packages/grafana-plugin-configs/constants.ts b/packages/grafana-plugin-configs/constants.ts new file mode 100644 index 0000000000000..4ad1a179e18f3 --- /dev/null +++ b/packages/grafana-plugin-configs/constants.ts @@ -0,0 +1 @@ +export const DIST_DIR = 'dist'; diff --git a/packages/grafana-plugin-configs/package.json b/packages/grafana-plugin-configs/package.json new file mode 100644 index 0000000000000..a66637ad320d4 --- /dev/null +++ b/packages/grafana-plugin-configs/package.json @@ -0,0 +1,19 @@ +{ + "name": "@grafana/plugin-configs", + "description": "Shared dependencies and files for core plugins", + "private": true, + "version": "10.3.0-pre", + "dependencies": { + "tslib": "2.6.0" + }, + "devDependencies": { + "@grafana/tsconfig": "^1.2.0-rc1", + "copy-webpack-plugin": "11.0.0", + "eslint-webpack-plugin": "4.0.1", + "fork-ts-checker-webpack-plugin": "8.0.0", + "glob": "10.3.3", + "replace-in-file-webpack-plugin": "1.0.6", + "webpack": "5.88.1" + }, + "packageManager": "yarn@3.6.0" +} diff --git a/packages/grafana-plugin-configs/tsconfig.json b/packages/grafana-plugin-configs/tsconfig.json new file mode 100644 index 0000000000000..5fa5336e958c0 --- /dev/null +++ b/packages/grafana-plugin-configs/tsconfig.json @@ -0,0 +1,19 @@ +{ + "compilerOptions": { + "alwaysStrict": true, + "declaration": false, + "resolveJsonModule": true + }, + "ts-node": { + "compilerOptions": { + "module": "commonjs", + "target": "es5", + "esModuleInterop": true + }, + "transpileOnly": true + }, + "extends": "@grafana/tsconfig", + + "exclude": ["**/*.test.ts", "**/*.test.tsx", "**/*.spec.ts", "**/*.spec.tsx"], + "include": ["./types", "."] +} diff --git a/packages/grafana-plugin-configs/types/custom.d.ts b/packages/grafana-plugin-configs/types/custom.d.ts new file mode 100644 index 0000000000000..64e6eaa6f2391 --- /dev/null +++ b/packages/grafana-plugin-configs/types/custom.d.ts @@ -0,0 +1,37 @@ +// Image declarations +declare module '*.gif' { + const src: string; + export default src; +} + +declare module '*.jpg' { + const src: string; + export default src; +} + +declare module '*.jpeg' { + const src: string; + export default src; +} + +declare module '*.png' { + const src: string; + export default src; +} + +declare module '*.webp' { + const src: string; + export default src; +} + +declare module '*.svg' { + const content: string; + export default content; +} + +// Font declarations +declare module '*.woff'; +declare module '*.woff2'; +declare module '*.eot'; +declare module '*.ttf'; +declare module '*.otf'; diff --git a/packages/grafana-plugin-configs/utils.ts b/packages/grafana-plugin-configs/utils.ts new file mode 100644 index 0000000000000..a02a2d8d16f14 --- /dev/null +++ b/packages/grafana-plugin-configs/utils.ts @@ -0,0 +1,26 @@ +import fs from 'fs'; +import { glob } from 'glob'; +import path from 'path'; +import process from 'process'; + +export function getPackageJson() { + return require(path.resolve(process.cwd(), 'package.json')); +} + +export function getPluginJson() { + return require(path.resolve(process.cwd(), 'plugin.json')); +} + +export async function getEntries(): Promise> { + const pluginModules = await glob(path.resolve(process.cwd(), `module.{ts,tsx}`)); + if (pluginModules.length > 0) { + return { + module: pluginModules[0], + }; + } + throw new Error('Could not find module.ts or module.tsx file'); +} + +export function hasLicense() { + return fs.existsSync(path.resolve(process.cwd(), 'LICENSE')); +} diff --git a/packages/grafana-plugin-configs/webpack.config.ts b/packages/grafana-plugin-configs/webpack.config.ts new file mode 100644 index 0000000000000..243cf76d3087e --- /dev/null +++ b/packages/grafana-plugin-configs/webpack.config.ts @@ -0,0 +1,208 @@ +import CopyWebpackPlugin from 'copy-webpack-plugin'; +import ESLintPlugin from 'eslint-webpack-plugin'; +import ForkTsCheckerWebpackPlugin from 'fork-ts-checker-webpack-plugin'; +import path from 'path'; +import ReplaceInFileWebpackPlugin from 'replace-in-file-webpack-plugin'; +import { Configuration } from 'webpack'; + +import { DIST_DIR } from './constants'; +import { getPackageJson, getPluginJson, getEntries, hasLicense } from './utils'; + +function skipFiles(f: string): boolean { + if (f.includes('/dist/')) { + // avoid copying files already in dist + return false; + } + if (f.includes('/tsconfig.json')) { + // avoid copying tsconfig.json + return false; + } + return true; +} + +const config = async (env: any): Promise => { + const pluginJson = getPluginJson(); + const baseConfig: Configuration = { + cache: { + type: 'filesystem', + buildDependencies: { + config: [__filename], + }, + }, + + context: process.cwd(), + + devtool: env.production ? 'source-map' : 'eval-source-map', + + entry: await getEntries(), + + externals: [ + 'lodash', + 'jquery', + 'moment', + 'slate', + 'emotion', + '@emotion/react', + '@emotion/css', + 'prismjs', + 'slate-plain-serializer', + '@grafana/slate-react', + 'react', + 'react-dom', + 'react-redux', + 'redux', + 'rxjs', + 'react-router', + 'react-router-dom', + 'd3', + 'angular', + '@grafana/ui', + '@grafana/runtime', + '@grafana/data', + + // Mark legacy SDK imports as external if their name starts with the "grafana/" prefix + ({ request }, callback) => { + const prefix = 'grafana/'; + const hasPrefix = (request: any) => request.indexOf(prefix) === 0; + const stripPrefix = (request: any) => request.substr(prefix.length); + + if (hasPrefix(request)) { + return callback(undefined, stripPrefix(request)); + } + + callback(); + }, + ], + + mode: env.production ? 'production' : 'development', + + module: { + rules: [ + { + exclude: /(node_modules)/, + test: /\.[tj]sx?$/, + use: { + loader: 'swc-loader', + options: { + jsc: { + baseUrl: '.', + target: 'es2015', + loose: false, + parser: { + syntax: 'typescript', + tsx: true, + decorators: false, + dynamicImport: true, + }, + }, + }, + }, + }, + { + test: /\.css$/, + use: ['style-loader', 'css-loader'], + }, + { + test: /\.s[ac]ss$/, + use: ['style-loader', 'css-loader', 'sass-loader'], + }, + { + test: /\.(png|jpe?g|gif|svg)$/, + type: 'asset/resource', + generator: { + // Keep publicPath relative for host.com/grafana/ deployments + publicPath: `public/plugins/${pluginJson.id}/img/`, + outputPath: 'img/', + filename: Boolean(env.production) ? '[hash][ext]' : '[name][ext]', + }, + }, + { + test: /\.(woff|woff2|eot|ttf|otf)(\?v=\d+\.\d+\.\d+)?$/, + type: 'asset/resource', + generator: { + // Keep publicPath relative for host.com/grafana/ deployments + publicPath: `public/plugins/${pluginJson.id}/fonts/`, + outputPath: 'fonts/', + filename: Boolean(env.production) ? '[hash][ext]' : '[name][ext]', + }, + }, + ], + }, + + output: { + clean: { + keep: new RegExp(`(.*?_(amd64|arm(64)?)(.exe)?|go_plugin_build_manifest)`), + }, + filename: '[name].js', + library: { + type: 'amd', + }, + path: path.resolve(process.cwd(), DIST_DIR), + publicPath: `public/plugins/${pluginJson.id}/`, + }, + + plugins: [ + new CopyWebpackPlugin({ + patterns: [ + // To `compiler.options.output` + { from: 'README.md', to: '.', force: true }, + { from: 'plugin.json', to: '.' }, + { from: hasLicense() ? 'LICENSE' : '../../../../../LICENSE', to: '.' }, // Point to Grafana License by default + { from: 'CHANGELOG.md', to: '.', force: true }, + { from: '**/*.json', to: '.', filter: skipFiles }, // TODO + { from: '**/*.svg', to: '.', noErrorOnMissing: true, filter: skipFiles }, // Optional + { from: '**/*.png', to: '.', noErrorOnMissing: true, filter: skipFiles }, // Optional + { from: '**/*.html', to: '.', noErrorOnMissing: true, filter: skipFiles }, // Optional + { from: 'img/**/*', to: '.', noErrorOnMissing: true, filter: skipFiles }, // Optional + { from: 'libs/**/*', to: '.', noErrorOnMissing: true, filter: skipFiles }, // Optional + { from: 'static/**/*', to: '.', noErrorOnMissing: true, filter: skipFiles }, // Optional + ], + }), + // Replace certain template-variables in the README and plugin.json + new ReplaceInFileWebpackPlugin([ + { + dir: path.resolve(DIST_DIR), + files: ['plugin.json', 'README.md'], + rules: [ + { + search: /\%VERSION\%/g, + replace: env.commit ? `${getPackageJson().version}-${env.commit}` : getPackageJson().version, + }, + { + search: /\%TODAY\%/g, + replace: new Date().toISOString().substring(0, 10), + }, + { + search: /\%PLUGIN_ID\%/g, + replace: pluginJson.id, + }, + ], + }, + ]), + new ForkTsCheckerWebpackPlugin({ + async: Boolean(env.development), + issue: { + include: [{ file: '**/*.{ts,tsx}' }], + }, + typescript: { configFile: path.join(process.cwd(), 'tsconfig.json') }, + }), + new ESLintPlugin({ + extensions: ['.ts', '.tsx'], + lintDirtyModulesOnly: Boolean(env.development), // don't lint on start, only lint changed files + }), + ], + + resolve: { + extensions: ['.js', '.jsx', '.ts', '.tsx'], + unsafeCache: true, + }, + + watchOptions: { + ignored: ['**/node_modules', '**/dist', '**/.yarn'], + }, + }; + + return baseConfig; +}; + +export default config; diff --git a/packages/grafana-runtime/package.json b/packages/grafana-runtime/package.json index c5284ff0dd6a6..a0ca950c78a88 100644 --- a/packages/grafana-runtime/package.json +++ b/packages/grafana-runtime/package.json @@ -2,7 +2,7 @@ "author": "Grafana Labs", "license": "Apache-2.0", "name": "@grafana/runtime", - "version": "10.2.0-pre", + "version": "10.3.0-pre", "description": "Grafana Runtime Library", "keywords": [ "grafana", @@ -37,10 +37,10 @@ "postpack": "mv package.json.bak package.json" }, "dependencies": { - "@grafana/data": "10.2.0-pre", - "@grafana/e2e-selectors": "10.2.0-pre", + "@grafana/data": "10.3.0-pre", + "@grafana/e2e-selectors": "10.3.0-pre", "@grafana/faro-web-sdk": "1.2.1", - "@grafana/ui": "10.2.0-pre", + "@grafana/ui": "10.3.0-pre", "history": "4.10.1", "lodash": "4.17.21", "rxjs": "7.8.1", diff --git a/packages/grafana-schema/package.json b/packages/grafana-schema/package.json index dcb04f54b5c92..6ec2b9cf88dd6 100644 --- a/packages/grafana-schema/package.json +++ b/packages/grafana-schema/package.json @@ -2,7 +2,7 @@ "author": "Grafana Labs", "license": "Apache-2.0", "name": "@grafana/schema", - "version": "10.2.0-pre", + "version": "10.3.0-pre", "description": "Grafana Schema Library", "keywords": [ "typescript" diff --git a/packages/grafana-schema/src/common/common.gen.ts b/packages/grafana-schema/src/common/common.gen.ts index 1c034f48a77e3..76676b232cc19 100644 --- a/packages/grafana-schema/src/common/common.gen.ts +++ b/packages/grafana-schema/src/common/common.gen.ts @@ -756,6 +756,7 @@ export interface TableBarGaugeCellOptions { * Sparkline cell options */ export interface TableSparklineCellOptions extends GraphFieldConfig { + hideValue?: boolean; type: TableCellDisplayMode.Sparkline; } diff --git a/packages/grafana-schema/src/common/table.cue b/packages/grafana-schema/src/common/table.cue index 8f703604a7317..27026f6d79b13 100644 --- a/packages/grafana-schema/src/common/table.cue +++ b/packages/grafana-schema/src/common/table.cue @@ -59,6 +59,7 @@ TableBarGaugeCellOptions: { TableSparklineCellOptions: { GraphFieldConfig type: TableCellDisplayMode & "sparkline" + hideValue?: bool } @cuetsy(kind="interface") // Colored background cell options diff --git a/packages/grafana-schema/src/index.gen.ts b/packages/grafana-schema/src/index.gen.ts index 7d1d3d050681b..6576c1ce63f92 100644 --- a/packages/grafana-schema/src/index.gen.ts +++ b/packages/grafana-schema/src/index.gen.ts @@ -124,15 +124,6 @@ export type { // TODO generate code such that tsc enforces type compatibility between raw and veneer decls export type { LibraryPanel } from './veneer/librarypanel.types'; -// Raw generated types from Playlist kind. -export type { - Playlist, - PlaylistItem -} from './raw/playlist/x/playlist_types.gen'; - -// Raw generated enums and default consts from playlist kind. -export { defaultPlaylist } from './raw/playlist/x/playlist_types.gen'; - // Raw generated types from Preferences kind. export type { Preferences, diff --git a/packages/grafana-schema/src/raw/composable/alertgroups/panelcfg/x/AlertGroupsPanelCfg_types.gen.ts b/packages/grafana-schema/src/raw/composable/alertgroups/panelcfg/x/AlertGroupsPanelCfg_types.gen.ts index 637ae0fe9430c..a4186f57bc535 100644 --- a/packages/grafana-schema/src/raw/composable/alertgroups/panelcfg/x/AlertGroupsPanelCfg_types.gen.ts +++ b/packages/grafana-schema/src/raw/composable/alertgroups/panelcfg/x/AlertGroupsPanelCfg_types.gen.ts @@ -9,7 +9,7 @@ // // Run 'make gen-cue' from repository root to regenerate. -export const pluginVersion = "10.2.0-pre"; +export const pluginVersion = "10.3.0-pre"; export interface Options { /** diff --git a/packages/grafana-schema/src/raw/composable/annotationslist/panelcfg/x/AnnotationsListPanelCfg_types.gen.ts b/packages/grafana-schema/src/raw/composable/annotationslist/panelcfg/x/AnnotationsListPanelCfg_types.gen.ts index 8f90a5613c257..08803997ade75 100644 --- a/packages/grafana-schema/src/raw/composable/annotationslist/panelcfg/x/AnnotationsListPanelCfg_types.gen.ts +++ b/packages/grafana-schema/src/raw/composable/annotationslist/panelcfg/x/AnnotationsListPanelCfg_types.gen.ts @@ -9,7 +9,7 @@ // // Run 'make gen-cue' from repository root to regenerate. -export const pluginVersion = "10.2.0-pre"; +export const pluginVersion = "10.3.0-pre"; export interface Options { limit: number; diff --git a/packages/grafana-schema/src/raw/composable/barchart/panelcfg/x/BarChartPanelCfg_types.gen.ts b/packages/grafana-schema/src/raw/composable/barchart/panelcfg/x/BarChartPanelCfg_types.gen.ts index 69a5ce4b39733..c86a3d75477aa 100644 --- a/packages/grafana-schema/src/raw/composable/barchart/panelcfg/x/BarChartPanelCfg_types.gen.ts +++ b/packages/grafana-schema/src/raw/composable/barchart/panelcfg/x/BarChartPanelCfg_types.gen.ts @@ -11,7 +11,7 @@ import * as common from '@grafana/schema'; -export const pluginVersion = "10.2.0-pre"; +export const pluginVersion = "10.3.0-pre"; export interface Options extends common.OptionsWithLegend, common.OptionsWithTooltip, common.OptionsWithTextFormatting { /** diff --git a/packages/grafana-schema/src/raw/composable/bargauge/panelcfg/x/BarGaugePanelCfg_types.gen.ts b/packages/grafana-schema/src/raw/composable/bargauge/panelcfg/x/BarGaugePanelCfg_types.gen.ts index ffbcc1e6115d4..c4513a6f2dc2a 100644 --- a/packages/grafana-schema/src/raw/composable/bargauge/panelcfg/x/BarGaugePanelCfg_types.gen.ts +++ b/packages/grafana-schema/src/raw/composable/bargauge/panelcfg/x/BarGaugePanelCfg_types.gen.ts @@ -11,7 +11,7 @@ import * as common from '@grafana/schema'; -export const pluginVersion = "10.2.0-pre"; +export const pluginVersion = "10.3.0-pre"; export interface Options extends common.SingleStatBaseOptions { displayMode: common.BarGaugeDisplayMode; diff --git a/packages/grafana-schema/src/raw/composable/candlestick/panelcfg/x/CandlestickPanelCfg_types.gen.ts b/packages/grafana-schema/src/raw/composable/candlestick/panelcfg/x/CandlestickPanelCfg_types.gen.ts index 60507742e2496..d1550e115a4ac 100644 --- a/packages/grafana-schema/src/raw/composable/candlestick/panelcfg/x/CandlestickPanelCfg_types.gen.ts +++ b/packages/grafana-schema/src/raw/composable/candlestick/panelcfg/x/CandlestickPanelCfg_types.gen.ts @@ -11,7 +11,7 @@ import * as common from '@grafana/schema'; -export const pluginVersion = "10.2.0-pre"; +export const pluginVersion = "10.3.0-pre"; export enum VizDisplayMode { Candles = 'candles', diff --git a/packages/grafana-schema/src/raw/composable/canvas/panelcfg/x/CanvasPanelCfg_types.gen.ts b/packages/grafana-schema/src/raw/composable/canvas/panelcfg/x/CanvasPanelCfg_types.gen.ts index 2f69328fb084b..b5835e56f0d1b 100644 --- a/packages/grafana-schema/src/raw/composable/canvas/panelcfg/x/CanvasPanelCfg_types.gen.ts +++ b/packages/grafana-schema/src/raw/composable/canvas/panelcfg/x/CanvasPanelCfg_types.gen.ts @@ -11,7 +11,7 @@ import * as ui from '@grafana/schema'; -export const pluginVersion = "10.2.0-pre"; +export const pluginVersion = "10.3.0-pre"; export enum HorizontalConstraint { Center = 'center', diff --git a/packages/grafana-schema/src/raw/composable/cloudwatch/dataquery/x/CloudWatchDataQuery_types.gen.ts b/packages/grafana-schema/src/raw/composable/cloudwatch/dataquery/x/CloudWatchDataQuery_types.gen.ts index 627d55686dc44..70dc8cebf2df1 100644 --- a/packages/grafana-schema/src/raw/composable/cloudwatch/dataquery/x/CloudWatchDataQuery_types.gen.ts +++ b/packages/grafana-schema/src/raw/composable/cloudwatch/dataquery/x/CloudWatchDataQuery_types.gen.ts @@ -11,7 +11,7 @@ import * as common from '@grafana/schema'; -export const pluginVersion = "10.2.0-pre"; +export const pluginVersion = "10.3.0-pre"; export interface MetricStat { /** diff --git a/packages/grafana-schema/src/raw/composable/dashboardlist/panelcfg/x/DashboardListPanelCfg_types.gen.ts b/packages/grafana-schema/src/raw/composable/dashboardlist/panelcfg/x/DashboardListPanelCfg_types.gen.ts index 946075837d44f..1fe577db3c610 100644 --- a/packages/grafana-schema/src/raw/composable/dashboardlist/panelcfg/x/DashboardListPanelCfg_types.gen.ts +++ b/packages/grafana-schema/src/raw/composable/dashboardlist/panelcfg/x/DashboardListPanelCfg_types.gen.ts @@ -9,7 +9,7 @@ // // Run 'make gen-cue' from repository root to regenerate. -export const pluginVersion = "10.2.0-pre"; +export const pluginVersion = "10.3.0-pre"; export interface Options { /** diff --git a/packages/grafana-schema/src/raw/composable/datagrid/panelcfg/x/DatagridPanelCfg_types.gen.ts b/packages/grafana-schema/src/raw/composable/datagrid/panelcfg/x/DatagridPanelCfg_types.gen.ts index acbfd5312b23b..3f353f364a835 100644 --- a/packages/grafana-schema/src/raw/composable/datagrid/panelcfg/x/DatagridPanelCfg_types.gen.ts +++ b/packages/grafana-schema/src/raw/composable/datagrid/panelcfg/x/DatagridPanelCfg_types.gen.ts @@ -9,7 +9,7 @@ // // Run 'make gen-cue' from repository root to regenerate. -export const pluginVersion = "10.2.0-pre"; +export const pluginVersion = "10.3.0-pre"; export interface Options { selectedSeries: number; diff --git a/packages/grafana-schema/src/raw/composable/debug/panelcfg/x/DebugPanelCfg_types.gen.ts b/packages/grafana-schema/src/raw/composable/debug/panelcfg/x/DebugPanelCfg_types.gen.ts index 2ee9860577b7d..ff1ca55673819 100644 --- a/packages/grafana-schema/src/raw/composable/debug/panelcfg/x/DebugPanelCfg_types.gen.ts +++ b/packages/grafana-schema/src/raw/composable/debug/panelcfg/x/DebugPanelCfg_types.gen.ts @@ -9,7 +9,7 @@ // // Run 'make gen-cue' from repository root to regenerate. -export const pluginVersion = "10.2.0-pre"; +export const pluginVersion = "10.3.0-pre"; export type UpdateConfig = { render: boolean, diff --git a/packages/grafana-schema/src/raw/composable/elasticsearch/dataquery/x/ElasticsearchDataQuery_types.gen.ts b/packages/grafana-schema/src/raw/composable/elasticsearch/dataquery/x/ElasticsearchDataQuery_types.gen.ts index e23aae27ea297..bd1acb20ba2f6 100644 --- a/packages/grafana-schema/src/raw/composable/elasticsearch/dataquery/x/ElasticsearchDataQuery_types.gen.ts +++ b/packages/grafana-schema/src/raw/composable/elasticsearch/dataquery/x/ElasticsearchDataQuery_types.gen.ts @@ -11,7 +11,7 @@ import * as common from '@grafana/schema'; -export const pluginVersion = "10.2.0-pre"; +export const pluginVersion = "10.3.0-pre"; export type BucketAggregation = (DateHistogram | Histogram | Terms | Filters | GeoHashGrid | Nested); diff --git a/packages/grafana-schema/src/raw/composable/gauge/panelcfg/x/GaugePanelCfg_types.gen.ts b/packages/grafana-schema/src/raw/composable/gauge/panelcfg/x/GaugePanelCfg_types.gen.ts index 2f69f4ac27692..b00ca10dee6b5 100644 --- a/packages/grafana-schema/src/raw/composable/gauge/panelcfg/x/GaugePanelCfg_types.gen.ts +++ b/packages/grafana-schema/src/raw/composable/gauge/panelcfg/x/GaugePanelCfg_types.gen.ts @@ -11,7 +11,7 @@ import * as common from '@grafana/schema'; -export const pluginVersion = "10.2.0-pre"; +export const pluginVersion = "10.3.0-pre"; export interface Options extends common.SingleStatBaseOptions { minVizHeight: number; diff --git a/packages/grafana-schema/src/raw/composable/geomap/panelcfg/x/GeomapPanelCfg_types.gen.ts b/packages/grafana-schema/src/raw/composable/geomap/panelcfg/x/GeomapPanelCfg_types.gen.ts index 86c579785397b..871d8ca1e6a80 100644 --- a/packages/grafana-schema/src/raw/composable/geomap/panelcfg/x/GeomapPanelCfg_types.gen.ts +++ b/packages/grafana-schema/src/raw/composable/geomap/panelcfg/x/GeomapPanelCfg_types.gen.ts @@ -11,7 +11,7 @@ import * as ui from '@grafana/schema'; -export const pluginVersion = "10.2.0-pre"; +export const pluginVersion = "10.3.0-pre"; export interface Options { basemap: ui.MapLayerOptions; diff --git a/packages/grafana-schema/src/raw/composable/grafanapyroscope/dataquery/x/GrafanaPyroscopeDataQuery_types.gen.ts b/packages/grafana-schema/src/raw/composable/grafanapyroscope/dataquery/x/GrafanaPyroscopeDataQuery_types.gen.ts index 2d37e3d2087f2..08d7d682b9398 100644 --- a/packages/grafana-schema/src/raw/composable/grafanapyroscope/dataquery/x/GrafanaPyroscopeDataQuery_types.gen.ts +++ b/packages/grafana-schema/src/raw/composable/grafanapyroscope/dataquery/x/GrafanaPyroscopeDataQuery_types.gen.ts @@ -11,7 +11,7 @@ import * as common from '@grafana/schema'; -export const pluginVersion = "10.2.0-pre"; +export const pluginVersion = "10.3.0-pre"; export type PyroscopeQueryType = ('metrics' | 'profile' | 'both'); diff --git a/packages/grafana-schema/src/raw/composable/heatmap/panelcfg/x/HeatmapPanelCfg_types.gen.ts b/packages/grafana-schema/src/raw/composable/heatmap/panelcfg/x/HeatmapPanelCfg_types.gen.ts index 4879f20dc24c1..f1909d68ff05a 100644 --- a/packages/grafana-schema/src/raw/composable/heatmap/panelcfg/x/HeatmapPanelCfg_types.gen.ts +++ b/packages/grafana-schema/src/raw/composable/heatmap/panelcfg/x/HeatmapPanelCfg_types.gen.ts @@ -11,7 +11,7 @@ import * as ui from '@grafana/schema'; -export const pluginVersion = "10.2.0-pre"; +export const pluginVersion = "10.3.0-pre"; /** * Controls the color mode of the heatmap diff --git a/packages/grafana-schema/src/raw/composable/histogram/panelcfg/x/HistogramPanelCfg_types.gen.ts b/packages/grafana-schema/src/raw/composable/histogram/panelcfg/x/HistogramPanelCfg_types.gen.ts index cab0e48a19309..9f8052b21bf76 100644 --- a/packages/grafana-schema/src/raw/composable/histogram/panelcfg/x/HistogramPanelCfg_types.gen.ts +++ b/packages/grafana-schema/src/raw/composable/histogram/panelcfg/x/HistogramPanelCfg_types.gen.ts @@ -11,7 +11,7 @@ import * as common from '@grafana/schema'; -export const pluginVersion = "10.2.0-pre"; +export const pluginVersion = "10.3.0-pre"; export interface Options extends common.OptionsWithLegend, common.OptionsWithTooltip { /** diff --git a/packages/grafana-schema/src/raw/composable/logs/panelcfg/x/LogsPanelCfg_types.gen.ts b/packages/grafana-schema/src/raw/composable/logs/panelcfg/x/LogsPanelCfg_types.gen.ts index 0b68effc85ecf..8ff4bf643a74b 100644 --- a/packages/grafana-schema/src/raw/composable/logs/panelcfg/x/LogsPanelCfg_types.gen.ts +++ b/packages/grafana-schema/src/raw/composable/logs/panelcfg/x/LogsPanelCfg_types.gen.ts @@ -11,7 +11,7 @@ import * as common from '@grafana/schema'; -export const pluginVersion = "10.2.0-pre"; +export const pluginVersion = "10.3.0-pre"; export interface Options { dedupStrategy: common.LogsDedupStrategy; diff --git a/packages/grafana-schema/src/raw/composable/loki/dataquery/x/LokiDataQuery_types.gen.ts b/packages/grafana-schema/src/raw/composable/loki/dataquery/x/LokiDataQuery_types.gen.ts index 5b8c5c60772bb..c1ed7748d119b 100644 --- a/packages/grafana-schema/src/raw/composable/loki/dataquery/x/LokiDataQuery_types.gen.ts +++ b/packages/grafana-schema/src/raw/composable/loki/dataquery/x/LokiDataQuery_types.gen.ts @@ -11,7 +11,7 @@ import * as common from '@grafana/schema'; -export const pluginVersion = "10.2.0-pre"; +export const pluginVersion = "10.3.0-pre"; export enum QueryEditorMode { Builder = 'builder', diff --git a/packages/grafana-schema/src/raw/composable/news/panelcfg/x/NewsPanelCfg_types.gen.ts b/packages/grafana-schema/src/raw/composable/news/panelcfg/x/NewsPanelCfg_types.gen.ts index 5386a44ad5976..b0c436d796604 100644 --- a/packages/grafana-schema/src/raw/composable/news/panelcfg/x/NewsPanelCfg_types.gen.ts +++ b/packages/grafana-schema/src/raw/composable/news/panelcfg/x/NewsPanelCfg_types.gen.ts @@ -9,7 +9,7 @@ // // Run 'make gen-cue' from repository root to regenerate. -export const pluginVersion = "10.2.0-pre"; +export const pluginVersion = "10.3.0-pre"; export interface Options { /** diff --git a/packages/grafana-schema/src/raw/composable/nodegraph/panelcfg/x/NodeGraphPanelCfg_types.gen.ts b/packages/grafana-schema/src/raw/composable/nodegraph/panelcfg/x/NodeGraphPanelCfg_types.gen.ts index 897977ea96e64..bbc7bf9a6ad19 100644 --- a/packages/grafana-schema/src/raw/composable/nodegraph/panelcfg/x/NodeGraphPanelCfg_types.gen.ts +++ b/packages/grafana-schema/src/raw/composable/nodegraph/panelcfg/x/NodeGraphPanelCfg_types.gen.ts @@ -9,7 +9,7 @@ // // Run 'make gen-cue' from repository root to regenerate. -export const pluginVersion = "10.2.0-pre"; +export const pluginVersion = "10.3.0-pre"; export interface ArcOption { /** diff --git a/packages/grafana-schema/src/raw/composable/parca/dataquery/x/ParcaDataQuery_types.gen.ts b/packages/grafana-schema/src/raw/composable/parca/dataquery/x/ParcaDataQuery_types.gen.ts index e02d1b3e8aae8..725eae429b40c 100644 --- a/packages/grafana-schema/src/raw/composable/parca/dataquery/x/ParcaDataQuery_types.gen.ts +++ b/packages/grafana-schema/src/raw/composable/parca/dataquery/x/ParcaDataQuery_types.gen.ts @@ -11,7 +11,7 @@ import * as common from '@grafana/schema'; -export const pluginVersion = "10.2.0-pre"; +export const pluginVersion = "10.3.0-pre"; export type ParcaQueryType = ('metrics' | 'profile' | 'both'); diff --git a/packages/grafana-schema/src/raw/composable/piechart/panelcfg/x/PieChartPanelCfg_types.gen.ts b/packages/grafana-schema/src/raw/composable/piechart/panelcfg/x/PieChartPanelCfg_types.gen.ts index 61ff9f688baaa..ec27259305fb7 100644 --- a/packages/grafana-schema/src/raw/composable/piechart/panelcfg/x/PieChartPanelCfg_types.gen.ts +++ b/packages/grafana-schema/src/raw/composable/piechart/panelcfg/x/PieChartPanelCfg_types.gen.ts @@ -11,7 +11,7 @@ import * as common from '@grafana/schema'; -export const pluginVersion = "10.2.0-pre"; +export const pluginVersion = "10.3.0-pre"; /** * Select the pie chart display style. diff --git a/packages/grafana-schema/src/raw/composable/prometheus/dataquery/x/PrometheusDataQuery_types.gen.ts b/packages/grafana-schema/src/raw/composable/prometheus/dataquery/x/PrometheusDataQuery_types.gen.ts index 71d33de6a0ff9..4b0ccc7fa7c61 100644 --- a/packages/grafana-schema/src/raw/composable/prometheus/dataquery/x/PrometheusDataQuery_types.gen.ts +++ b/packages/grafana-schema/src/raw/composable/prometheus/dataquery/x/PrometheusDataQuery_types.gen.ts @@ -11,7 +11,7 @@ import * as common from '@grafana/schema'; -export const pluginVersion = "10.2.0-pre"; +export const pluginVersion = "10.3.0-pre"; export enum QueryEditorMode { Builder = 'builder', diff --git a/packages/grafana-schema/src/raw/composable/stat/panelcfg/x/StatPanelCfg_types.gen.ts b/packages/grafana-schema/src/raw/composable/stat/panelcfg/x/StatPanelCfg_types.gen.ts index 15d0cc419a81a..842651d79f4e9 100644 --- a/packages/grafana-schema/src/raw/composable/stat/panelcfg/x/StatPanelCfg_types.gen.ts +++ b/packages/grafana-schema/src/raw/composable/stat/panelcfg/x/StatPanelCfg_types.gen.ts @@ -11,7 +11,7 @@ import * as common from '@grafana/schema'; -export const pluginVersion = "10.2.0-pre"; +export const pluginVersion = "10.3.0-pre"; export interface Options extends common.SingleStatBaseOptions { colorMode: common.BigValueColorMode; diff --git a/packages/grafana-schema/src/raw/composable/statetimeline/panelcfg/x/StateTimelinePanelCfg_types.gen.ts b/packages/grafana-schema/src/raw/composable/statetimeline/panelcfg/x/StateTimelinePanelCfg_types.gen.ts index 5b538683870f5..e4493d028493a 100644 --- a/packages/grafana-schema/src/raw/composable/statetimeline/panelcfg/x/StateTimelinePanelCfg_types.gen.ts +++ b/packages/grafana-schema/src/raw/composable/statetimeline/panelcfg/x/StateTimelinePanelCfg_types.gen.ts @@ -11,7 +11,7 @@ import * as ui from '@grafana/schema'; -export const pluginVersion = "10.2.0-pre"; +export const pluginVersion = "10.3.0-pre"; export interface Options extends ui.OptionsWithLegend, ui.OptionsWithTooltip, ui.OptionsWithTimezones { /** diff --git a/packages/grafana-schema/src/raw/composable/statushistory/panelcfg/x/StatusHistoryPanelCfg_types.gen.ts b/packages/grafana-schema/src/raw/composable/statushistory/panelcfg/x/StatusHistoryPanelCfg_types.gen.ts index 86a56a27ab103..0dc31c87435c8 100644 --- a/packages/grafana-schema/src/raw/composable/statushistory/panelcfg/x/StatusHistoryPanelCfg_types.gen.ts +++ b/packages/grafana-schema/src/raw/composable/statushistory/panelcfg/x/StatusHistoryPanelCfg_types.gen.ts @@ -11,7 +11,7 @@ import * as ui from '@grafana/schema'; -export const pluginVersion = "10.2.0-pre"; +export const pluginVersion = "10.3.0-pre"; export interface Options extends ui.OptionsWithLegend, ui.OptionsWithTooltip, ui.OptionsWithTimezones { /** diff --git a/packages/grafana-schema/src/raw/composable/table/panelcfg/x/TablePanelCfg_types.gen.ts b/packages/grafana-schema/src/raw/composable/table/panelcfg/x/TablePanelCfg_types.gen.ts index 37ce8b9cd107e..c891a59b1a485 100644 --- a/packages/grafana-schema/src/raw/composable/table/panelcfg/x/TablePanelCfg_types.gen.ts +++ b/packages/grafana-schema/src/raw/composable/table/panelcfg/x/TablePanelCfg_types.gen.ts @@ -11,7 +11,7 @@ import * as ui from '@grafana/schema'; -export const pluginVersion = "10.2.0-pre"; +export const pluginVersion = "10.3.0-pre"; export interface Options { /** diff --git a/packages/grafana-schema/src/raw/composable/tempo/dataquery/x/TempoDataQuery_types.gen.ts b/packages/grafana-schema/src/raw/composable/tempo/dataquery/x/TempoDataQuery_types.gen.ts index 91f136e78f6d4..539dc05c02259 100644 --- a/packages/grafana-schema/src/raw/composable/tempo/dataquery/x/TempoDataQuery_types.gen.ts +++ b/packages/grafana-schema/src/raw/composable/tempo/dataquery/x/TempoDataQuery_types.gen.ts @@ -11,7 +11,7 @@ import * as common from '@grafana/schema'; -export const pluginVersion = "10.2.0-pre"; +export const pluginVersion = "10.3.0-pre"; export interface TempoQuery extends common.DataQuery { filters: Array; diff --git a/packages/grafana-schema/src/raw/composable/testdata/dataquery/x/TestDataDataQuery_types.gen.ts b/packages/grafana-schema/src/raw/composable/testdata/dataquery/x/TestDataDataQuery_types.gen.ts index c8fb0c9fcd543..de0ca9740f027 100644 --- a/packages/grafana-schema/src/raw/composable/testdata/dataquery/x/TestDataDataQuery_types.gen.ts +++ b/packages/grafana-schema/src/raw/composable/testdata/dataquery/x/TestDataDataQuery_types.gen.ts @@ -11,7 +11,7 @@ import * as common from '@grafana/schema'; -export const pluginVersion = "10.2.0-pre"; +export const pluginVersion = "%VERSION%"; export enum TestDataQueryType { Annotations = 'annotations', diff --git a/packages/grafana-schema/src/raw/composable/text/panelcfg/x/TextPanelCfg_types.gen.ts b/packages/grafana-schema/src/raw/composable/text/panelcfg/x/TextPanelCfg_types.gen.ts index 1d0b5bede3d46..10a6554136953 100644 --- a/packages/grafana-schema/src/raw/composable/text/panelcfg/x/TextPanelCfg_types.gen.ts +++ b/packages/grafana-schema/src/raw/composable/text/panelcfg/x/TextPanelCfg_types.gen.ts @@ -9,7 +9,7 @@ // // Run 'make gen-cue' from repository root to regenerate. -export const pluginVersion = "10.2.0-pre"; +export const pluginVersion = "10.3.0-pre"; export enum TextMode { Code = 'code', diff --git a/packages/grafana-schema/src/raw/composable/timeseries/panelcfg/x/TimeSeriesPanelCfg_types.gen.ts b/packages/grafana-schema/src/raw/composable/timeseries/panelcfg/x/TimeSeriesPanelCfg_types.gen.ts index 8f7ffde9faa02..98cc40cd5eeea 100644 --- a/packages/grafana-schema/src/raw/composable/timeseries/panelcfg/x/TimeSeriesPanelCfg_types.gen.ts +++ b/packages/grafana-schema/src/raw/composable/timeseries/panelcfg/x/TimeSeriesPanelCfg_types.gen.ts @@ -11,7 +11,7 @@ import * as common from '@grafana/schema'; -export const pluginVersion = "10.2.0-pre"; +export const pluginVersion = "10.3.0-pre"; export interface Options extends common.OptionsWithTimezones { legend: common.VizLegendOptions; diff --git a/packages/grafana-schema/src/raw/composable/trend/panelcfg/x/TrendPanelCfg_types.gen.ts b/packages/grafana-schema/src/raw/composable/trend/panelcfg/x/TrendPanelCfg_types.gen.ts index a695474024522..7d981861db206 100644 --- a/packages/grafana-schema/src/raw/composable/trend/panelcfg/x/TrendPanelCfg_types.gen.ts +++ b/packages/grafana-schema/src/raw/composable/trend/panelcfg/x/TrendPanelCfg_types.gen.ts @@ -11,7 +11,7 @@ import * as common from '@grafana/schema'; -export const pluginVersion = "10.2.0-pre"; +export const pluginVersion = "10.3.0-pre"; /** * Identical to timeseries... except it does not have timezone settings diff --git a/packages/grafana-schema/src/raw/composable/xychart/panelcfg/x/XYChartPanelCfg_types.gen.ts b/packages/grafana-schema/src/raw/composable/xychart/panelcfg/x/XYChartPanelCfg_types.gen.ts index a070d6c1d39c8..32dda0292b416 100644 --- a/packages/grafana-schema/src/raw/composable/xychart/panelcfg/x/XYChartPanelCfg_types.gen.ts +++ b/packages/grafana-schema/src/raw/composable/xychart/panelcfg/x/XYChartPanelCfg_types.gen.ts @@ -11,7 +11,7 @@ import * as common from '@grafana/schema'; -export const pluginVersion = "10.2.0-pre"; +export const pluginVersion = "10.3.0-pre"; export enum SeriesMapping { Auto = 'auto', diff --git a/packages/grafana-schema/src/raw/dashboard/x/dashboard_types.gen.ts b/packages/grafana-schema/src/raw/dashboard/x/dashboard_types.gen.ts index 99c9b16090d5c..d16491351f700 100644 --- a/packages/grafana-schema/src/raw/dashboard/x/dashboard_types.gen.ts +++ b/packages/grafana-schema/src/raw/dashboard/x/dashboard_types.gen.ts @@ -77,6 +77,10 @@ export const defaultAnnotationContainer: Partial = { * FROM: AnnotationQuery in grafana-data/src/types/annotations.ts */ export interface AnnotationQuery { + /** + * Set to 1 for the standard annotation query all dashboards have by default. + */ + builtIn?: number; /** * Datasource where the annotations data is */ @@ -113,6 +117,7 @@ export interface AnnotationQuery { } export const defaultAnnotationQuery: Partial = { + builtIn: 0, enable: true, hide: false, }; diff --git a/packages/grafana-schema/src/raw/playlist/x/playlist_types.gen.ts b/packages/grafana-schema/src/raw/playlist/x/playlist_types.gen.ts deleted file mode 100644 index 4f98abe19bfb0..0000000000000 --- a/packages/grafana-schema/src/raw/playlist/x/playlist_types.gen.ts +++ /dev/null @@ -1,58 +0,0 @@ -// Code generated - EDITING IS FUTILE. DO NOT EDIT. -// -// Generated by: -// kinds/gen.go -// Using jennies: -// TSResourceJenny -// LatestMajorsOrXJenny -// -// Run 'make gen-cue' from repository root to regenerate. - -export interface PlaylistItem { - /** - * Title is an unused property -- it will be removed in the future - */ - title?: string; - /** - * Type of the item. - */ - type: ('dashboard_by_uid' | 'dashboard_by_id' | 'dashboard_by_tag'); - /** - * Value depends on type and describes the playlist item. - * - * - dashboard_by_id: The value is an internal numerical identifier set by Grafana. This - * is not portable as the numerical identifier is non-deterministic between different instances. - * Will be replaced by dashboard_by_uid in the future. (deprecated) - * - dashboard_by_tag: The value is a tag which is set on any number of dashboards. All - * dashboards behind the tag will be added to the playlist. - * - dashboard_by_uid: The value is the dashboard UID - */ - value: string; -} - -export interface Playlist { - /** - * Interval sets the time between switching views in a playlist. - * FIXME: Is this based on a standardized format or what options are available? Can datemath be used? - */ - interval: string; - /** - * The ordered list of items that the playlist will iterate over. - * FIXME! This should not be optional, but changing it makes the godegen awkward - */ - items?: Array; - /** - * Name of the playlist. - */ - name: string; - /** - * Unique playlist identifier. Generated on creation, either by the - * creator of the playlist of by the application. - */ - uid: string; -} - -export const defaultPlaylist: Partial = { - interval: '5m', - items: [], -}; diff --git a/packages/grafana-ui/.storybook/storybookTheme.ts b/packages/grafana-ui/.storybook/storybookTheme.ts index 3a2123c2a0094..debe4713bf7ee 100644 --- a/packages/grafana-ui/.storybook/storybookTheme.ts +++ b/packages/grafana-ui/.storybook/storybookTheme.ts @@ -1,7 +1,7 @@ import { GrafanaTheme2, createTheme } from '@grafana/data'; //@ts-ignore import { create } from '@storybook/theming'; -import '../src/components/Icon/iconBundle'; +import '../../../public/app/core/icons/iconBundle'; const createStorybookTheme = (theme: GrafanaTheme2) => { return create({ diff --git a/packages/grafana-ui/package.json b/packages/grafana-ui/package.json index 49f17edc3777a..d6444345e3440 100644 --- a/packages/grafana-ui/package.json +++ b/packages/grafana-ui/package.json @@ -2,7 +2,7 @@ "author": "Grafana Labs", "license": "Apache-2.0", "name": "@grafana/ui", - "version": "10.2.0-pre", + "version": "10.3.0-pre", "description": "Grafana Components Library", "keywords": [ "grafana", @@ -49,10 +49,10 @@ "dependencies": { "@emotion/css": "11.11.2", "@emotion/react": "11.11.1", - "@grafana/data": "10.2.0-pre", - "@grafana/e2e-selectors": "10.2.0-pre", + "@grafana/data": "10.3.0-pre", + "@grafana/e2e-selectors": "10.3.0-pre", "@grafana/faro-web-sdk": "1.2.1", - "@grafana/schema": "10.2.0-pre", + "@grafana/schema": "10.3.0-pre", "@leeoniya/ufuzzy": "1.0.8", "@monaco-editor/react": "4.6.0", "@popperjs/core": "2.11.8", @@ -81,13 +81,13 @@ "monaco-editor": "0.34.0", "ol": "7.4.0", "prismjs": "1.29.0", - "rc-cascader": "3.12.1", - "rc-drawer": "6.3.0", - "rc-slider": "10.2.1", + "rc-cascader": "3.18.1", + "rc-drawer": "6.5.2", + "rc-slider": "10.3.1", "rc-time-picker": "^3.7.3", - "rc-tooltip": "6.0.1", + "rc-tooltip": "6.1.1", "react-beautiful-dnd": "13.1.1", - "react-calendar": "4.3.0", + "react-calendar": "4.6.0", "react-colorful": "5.6.1", "react-custom-scrollbars-2": "4.5.0", "react-dropzone": "14.2.3", @@ -177,10 +177,10 @@ "react-test-renderer": "18.2.0", "rimraf": "5.0.1", "rollup": "2.79.1", + "rollup-plugin-copy": "3.5.0", "rollup-plugin-dts": "^5.0.0", "rollup-plugin-esbuild": "5.0.0", "rollup-plugin-node-externals": "^5.0.0", - "rollup-plugin-svg-import": "^1.6.0", "sass-loader": "13.3.2", "storybook": "7.4.5", "storybook-addon-turbo-build": "2.0.1", diff --git a/packages/grafana-ui/rollup.config.ts b/packages/grafana-ui/rollup.config.ts index 0e80f43744914..3659a42c58bee 100644 --- a/packages/grafana-ui/rollup.config.ts +++ b/packages/grafana-ui/rollup.config.ts @@ -1,16 +1,30 @@ import resolve from '@rollup/plugin-node-resolve'; import path from 'path'; +import copy from 'rollup-plugin-copy'; import dts from 'rollup-plugin-dts'; import esbuild from 'rollup-plugin-esbuild'; import { externals } from 'rollup-plugin-node-externals'; -import svg from 'rollup-plugin-svg-import'; + +const icons = require('../../public/app/core/icons/cached.json'); const pkg = require('./package.json'); +const iconSrcPaths = icons.map((iconSubPath) => { + return `../../public/img/icons/${iconSubPath}.svg`; +}); + export default [ { input: 'src/index.ts', - plugins: [externals({ deps: true, packagePath: './package.json' }), resolve(), svg({ stringify: true }), esbuild()], + plugins: [ + externals({ deps: true, packagePath: './package.json' }), + resolve(), + copy({ + targets: [{ src: iconSrcPaths, dest: './dist/public/' }], + flatten: false, + }), + esbuild(), + ], output: [ { format: 'cjs', diff --git a/packages/grafana-ui/src/components/Forms/Legacy/Select/Select.tsx b/packages/grafana-ui/src/components/Forms/Legacy/Select/Select.tsx index b8ee928a1ae9a..76f65a3b726cd 100644 --- a/packages/grafana-ui/src/components/Forms/Legacy/Select/Select.tsx +++ b/packages/grafana-ui/src/components/Forms/Legacy/Select/Select.tsx @@ -6,9 +6,8 @@ import { default as ReactAsyncSelect } from 'react-select/async'; import Creatable from 'react-select/creatable'; // Components -import { SelectableValue } from '@grafana/data'; +import { SelectableValue, ThemeContext } from '@grafana/data'; -import { ThemeContext } from '../../../../themes'; import { CustomScrollbar } from '../../../CustomScrollbar/CustomScrollbar'; import { SelectOptionGroup } from '../../../Select/SelectOptionGroup'; import { SingleValue } from '../../../Select/SingleValue'; diff --git a/packages/grafana-ui/src/components/Icon/Icon.tsx b/packages/grafana-ui/src/components/Icon/Icon.tsx index 48f75cbb11a8f..ab1feb1c055ef 100644 --- a/packages/grafana-ui/src/components/Icon/Icon.tsx +++ b/packages/grafana-ui/src/components/Icon/Icon.tsx @@ -7,8 +7,7 @@ import { GrafanaTheme2, isIconName } from '@grafana/data'; import { useStyles2 } from '../../themes/ThemeContext'; import { IconName, IconType, IconSize } from '../../types/icon'; -import { cacheInitialized, initIconCache, iconRoot } from './iconBundle'; -import { getIconSubDir, getSvgSize } from './utils'; +import { getIconRoot, getIconSubDir, getSvgSize } from './utils'; export interface IconProps extends React.HTMLAttributes { name: IconName; @@ -45,10 +44,6 @@ export const Icon = React.forwardRef( return ; } - if (!cacheInitialized) { - initIconCache(); - } - if (!isIconName(name)) { console.warn('Icon component passed an invalid icon name', name); } @@ -57,6 +52,7 @@ export const Icon = React.forwardRef( return
invalid icon name
; } + const iconRoot = getIconRoot(); const svgSize = getSvgSize(size); const svgHgt = svgSize; const svgWid = name.startsWith('gf-bar-align') ? 16 : name.startsWith('gf-interp') ? 30 : svgSize; diff --git a/packages/grafana-ui/src/components/Icon/iconBundle.ts b/packages/grafana-ui/src/components/Icon/iconBundle.ts deleted file mode 100644 index 18c6499f9c90c..0000000000000 --- a/packages/grafana-ui/src/components/Icon/iconBundle.ts +++ /dev/null @@ -1,378 +0,0 @@ -/* eslint-disable import/order */ -// DO NOT EDIT THIS FILE -// This file is automatically generated (do not edit it here) -// see @grafana/ui/scripts/generate-icon-bundle.js - -import { cacheStore } from 'react-inlinesvg'; - -// do not edit this list directly -// the list of icons live here: @grafana/ui/components/Icon/cached.json -import u1000 from '../../../../../public/img/icons/unicons/at.svg'; -import u1001 from '../../../../../public/img/icons/unicons/adjust-circle.svg'; -import u1002 from '../../../../../public/img/icons/unicons/align-left.svg'; -import u1003 from '../../../../../public/img/icons/unicons/align-right.svg'; -import u1004 from '../../../../../public/img/icons/unicons/angle-double-down.svg'; -import u1005 from '../../../../../public/img/icons/unicons/angle-double-right.svg'; -import u1006 from '../../../../../public/img/icons/unicons/angle-down.svg'; -import u1007 from '../../../../../public/img/icons/unicons/angle-left.svg'; -import u1008 from '../../../../../public/img/icons/unicons/angle-right.svg'; -import u1009 from '../../../../../public/img/icons/unicons/angle-up.svg'; -import u1010 from '../../../../../public/img/icons/unicons/apps.svg'; -import u1011 from '../../../../../public/img/icons/unicons/arrow.svg'; -import u1012 from '../../../../../public/img/icons/unicons/arrow-down.svg'; -import u1013 from '../../../../../public/img/icons/unicons/arrow-from-right.svg'; -import u1014 from '../../../../../public/img/icons/unicons/arrow-left.svg'; -import u1015 from '../../../../../public/img/icons/unicons/arrow-random.svg'; -import u1016 from '../../../../../public/img/icons/unicons/arrow-right.svg'; -import u1017 from '../../../../../public/img/icons/unicons/arrow-to-right.svg'; -import u1018 from '../../../../../public/img/icons/unicons/arrow-up.svg'; -import u1019 from '../../../../../public/img/icons/unicons/arrows-h.svg'; -import u1020 from '../../../../../public/img/icons/unicons/backward.svg'; -import u1021 from '../../../../../public/img/icons/unicons/bars.svg'; -import u1022 from '../../../../../public/img/icons/unicons/bell.svg'; -import u1023 from '../../../../../public/img/icons/unicons/bell-slash.svg'; -import u1024 from '../../../../../public/img/icons/unicons/bolt.svg'; -import u1025 from '../../../../../public/img/icons/unicons/book.svg'; -import u1026 from '../../../../../public/img/icons/unicons/book-open.svg'; -import u1027 from '../../../../../public/img/icons/unicons/brackets-curly.svg'; -import u1028 from '../../../../../public/img/icons/unicons/bug.svg'; -import u1029 from '../../../../../public/img/icons/unicons/building.svg'; -import u1030 from '../../../../../public/img/icons/unicons/calculator-alt.svg'; -import u1031 from '../../../../../public/img/icons/unicons/calendar-alt.svg'; -import u1032 from '../../../../../public/img/icons/unicons/calendar-slash.svg'; -import u1033 from '../../../../../public/img/icons/unicons/camera.svg'; -import u1034 from '../../../../../public/img/icons/unicons/channel-add.svg'; -import u1035 from '../../../../../public/img/icons/unicons/chart-line.svg'; -import u1036 from '../../../../../public/img/icons/unicons/check.svg'; -import u1037 from '../../../../../public/img/icons/unicons/check-circle.svg'; -import u1038 from '../../../../../public/img/icons/unicons/circle.svg'; -import u1039 from '../../../../../public/img/icons/unicons/clipboard-alt.svg'; -import u1040 from '../../../../../public/img/icons/unicons/clock-nine.svg'; -import u1041 from '../../../../../public/img/icons/unicons/cloud.svg'; -import u1042 from '../../../../../public/img/icons/unicons/cloud-download.svg'; -import u1043 from '../../../../../public/img/icons/unicons/code-branch.svg'; -import u1044 from '../../../../../public/img/icons/unicons/cog.svg'; -import u1045 from '../../../../../public/img/icons/unicons/columns.svg'; -import u1046 from '../../../../../public/img/icons/unicons/comment-alt.svg'; -import u1047 from '../../../../../public/img/icons/unicons/comment-alt-share.svg'; -import u1048 from '../../../../../public/img/icons/unicons/comments-alt.svg'; -import u1049 from '../../../../../public/img/icons/unicons/compass.svg'; -import u1050 from '../../../../../public/img/icons/unicons/copy.svg'; -import u1051 from '../../../../../public/img/icons/unicons/corner-down-right-alt.svg'; -import u1052 from '../../../../../public/img/icons/unicons/cube.svg'; -import u1053 from '../../../../../public/img/icons/unicons/dashboard.svg'; -import u1054 from '../../../../../public/img/icons/unicons/database.svg'; -import u1055 from '../../../../../public/img/icons/unicons/document-info.svg'; -import u1056 from '../../../../../public/img/icons/unicons/download-alt.svg'; -import u1057 from '../../../../../public/img/icons/unicons/draggabledots.svg'; -import u1058 from '../../../../../public/img/icons/unicons/edit.svg'; -import u1059 from '../../../../../public/img/icons/unicons/ellipsis-v.svg'; -import u1060 from '../../../../../public/img/icons/unicons/ellipsis-h.svg'; -import u1061 from '../../../../../public/img/icons/unicons/envelope.svg'; -import u1062 from '../../../../../public/img/icons/unicons/exchange-alt.svg'; -import u1063 from '../../../../../public/img/icons/unicons/exclamation-circle.svg'; -import u1064 from '../../../../../public/img/icons/unicons/exclamation-triangle.svg'; -import u1065 from '../../../../../public/img/icons/unicons/external-link-alt.svg'; -import u1066 from '../../../../../public/img/icons/unicons/eye.svg'; -import u1067 from '../../../../../public/img/icons/unicons/eye-slash.svg'; -import u1068 from '../../../../../public/img/icons/unicons/file-alt.svg'; -import u1069 from '../../../../../public/img/icons/unicons/file-blank.svg'; -import u1070 from '../../../../../public/img/icons/unicons/filter.svg'; -import u1071 from '../../../../../public/img/icons/unicons/folder.svg'; -import u1072 from '../../../../../public/img/icons/unicons/folder-open.svg'; -import u1073 from '../../../../../public/img/icons/unicons/folder-plus.svg'; -import u1074 from '../../../../../public/img/icons/unicons/folder-upload.svg'; -import u1075 from '../../../../../public/img/icons/unicons/forward.svg'; -import u1076 from '../../../../../public/img/icons/unicons/graph-bar.svg'; -import u1077 from '../../../../../public/img/icons/unicons/history.svg'; -import u1078 from '../../../../../public/img/icons/unicons/history-alt.svg'; -import u1079 from '../../../../../public/img/icons/unicons/home-alt.svg'; -import u1080 from '../../../../../public/img/icons/unicons/import.svg'; -import u1081 from '../../../../../public/img/icons/unicons/info.svg'; -import u1082 from '../../../../../public/img/icons/unicons/info-circle.svg'; -import u1083 from '../../../../../public/img/icons/unicons/k6.svg'; -import u1084 from '../../../../../public/img/icons/unicons/key-skeleton-alt.svg'; -import u1085 from '../../../../../public/img/icons/unicons/keyboard.svg'; -import u1086 from '../../../../../public/img/icons/unicons/link.svg'; -import u1087 from '../../../../../public/img/icons/unicons/list-ul.svg'; -import u1088 from '../../../../../public/img/icons/unicons/lock.svg'; -import u1089 from '../../../../../public/img/icons/unicons/minus.svg'; -import u1090 from '../../../../../public/img/icons/unicons/minus-circle.svg'; -import u1091 from '../../../../../public/img/icons/unicons/mobile-android.svg'; -import u1092 from '../../../../../public/img/icons/unicons/monitor.svg'; -import u1093 from '../../../../../public/img/icons/unicons/pause.svg'; -import u1094 from '../../../../../public/img/icons/unicons/pen.svg'; -import u1095 from '../../../../../public/img/icons/unicons/play.svg'; -import u1096 from '../../../../../public/img/icons/unicons/plug.svg'; -import u1097 from '../../../../../public/img/icons/unicons/plus.svg'; -import u1098 from '../../../../../public/img/icons/unicons/plus-circle.svg'; -import u1099 from '../../../../../public/img/icons/unicons/power.svg'; -import u1100 from '../../../../../public/img/icons/unicons/presentation-play.svg'; -import u1101 from '../../../../../public/img/icons/unicons/process.svg'; -import u1102 from '../../../../../public/img/icons/unicons/question-circle.svg'; -import u1103 from '../../../../../public/img/icons/unicons/repeat.svg'; -import u1104 from '../../../../../public/img/icons/unicons/rocket.svg'; -import u1105 from '../../../../../public/img/icons/unicons/rss.svg'; -import u1106 from '../../../../../public/img/icons/unicons/save.svg'; -import u1107 from '../../../../../public/img/icons/unicons/search.svg'; -import u1108 from '../../../../../public/img/icons/unicons/search-minus.svg'; -import u1109 from '../../../../../public/img/icons/unicons/search-plus.svg'; -import u1110 from '../../../../../public/img/icons/unicons/share-alt.svg'; -import u1111 from '../../../../../public/img/icons/unicons/shield.svg'; -import u1112 from '../../../../../public/img/icons/unicons/signal.svg'; -import u1113 from '../../../../../public/img/icons/unicons/signin.svg'; -import u1114 from '../../../../../public/img/icons/unicons/signout.svg'; -import u1115 from '../../../../../public/img/icons/unicons/sitemap.svg'; -import u1116 from '../../../../../public/img/icons/unicons/slack.svg'; -import u1117 from '../../../../../public/img/icons/unicons/sliders-v-alt.svg'; -import u1118 from '../../../../../public/img/icons/unicons/sort-amount-down.svg'; -import u1119 from '../../../../../public/img/icons/unicons/sort-amount-up.svg'; -import u1120 from '../../../../../public/img/icons/unicons/square-shape.svg'; -import u1121 from '../../../../../public/img/icons/unicons/star.svg'; -import u1122 from '../../../../../public/img/icons/unicons/step-backward.svg'; -import u1123 from '../../../../../public/img/icons/unicons/sync.svg'; -import u1124 from '../../../../../public/img/icons/unicons/stopwatch.svg'; -import u1125 from '../../../../../public/img/icons/unicons/table.svg'; -import u1126 from '../../../../../public/img/icons/unicons/tag-alt.svg'; -import u1127 from '../../../../../public/img/icons/unicons/times.svg'; -import u1128 from '../../../../../public/img/icons/unicons/trash-alt.svg'; -import u1129 from '../../../../../public/img/icons/unicons/unlock.svg'; -import u1130 from '../../../../../public/img/icons/unicons/upload.svg'; -import u1131 from '../../../../../public/img/icons/unicons/user.svg'; -import u1132 from '../../../../../public/img/icons/unicons/users-alt.svg'; -import u1133 from '../../../../../public/img/icons/unicons/wrap-text.svg'; -import u1134 from '../../../../../public/img/icons/unicons/cloud-upload.svg'; -import u1135 from '../../../../../public/img/icons/unicons/credit-card.svg'; -import u1136 from '../../../../../public/img/icons/unicons/file-copy-alt.svg'; -import u1137 from '../../../../../public/img/icons/unicons/fire.svg'; -import u1138 from '../../../../../public/img/icons/unicons/hourglass.svg'; -import u1139 from '../../../../../public/img/icons/unicons/layer-group.svg'; -import u1140 from '../../../../../public/img/icons/unicons/layers-alt.svg'; -import u1141 from '../../../../../public/img/icons/unicons/line-alt.svg'; -import u1142 from '../../../../../public/img/icons/unicons/list-ui-alt.svg'; -import u1143 from '../../../../../public/img/icons/unicons/message.svg'; -import u1144 from '../../../../../public/img/icons/unicons/palette.svg'; -import u1145 from '../../../../../public/img/icons/unicons/percentage.svg'; -import u1146 from '../../../../../public/img/icons/unicons/shield-exclamation.svg'; -import u1147 from '../../../../../public/img/icons/unicons/plus-square.svg'; -import u1148 from '../../../../../public/img/icons/unicons/x.svg'; -import u1149 from '../../../../../public/img/icons/unicons/capture.svg'; -import u1150 from '../../../../../public/img/icons/custom/gf-grid.svg'; -import u1151 from '../../../../../public/img/icons/custom/gf-landscape.svg'; -import u1152 from '../../../../../public/img/icons/custom/gf-layout-simple.svg'; -import u1153 from '../../../../../public/img/icons/custom/gf-portrait.svg'; -import u1154 from '../../../../../public/img/icons/custom/gf-show-context.svg'; -import u1155 from '../../../../../public/img/icons/custom/gf-bar-alignment-after.svg'; -import u1156 from '../../../../../public/img/icons/custom/gf-bar-alignment-before.svg'; -import u1157 from '../../../../../public/img/icons/custom/gf-bar-alignment-center.svg'; -import u1158 from '../../../../../public/img/icons/custom/gf-interpolation-linear.svg'; -import u1159 from '../../../../../public/img/icons/custom/gf-interpolation-smooth.svg'; -import u1160 from '../../../../../public/img/icons/custom/gf-interpolation-step-after.svg'; -import u1161 from '../../../../../public/img/icons/custom/gf-interpolation-step-before.svg'; -import u1162 from '../../../../../public/img/icons/custom/gf-logs.svg'; -import u1163 from '../../../../../public/img/icons/custom/gf-movepane-left.svg'; -import u1164 from '../../../../../public/img/icons/custom/gf-movepane-right.svg'; -import u1165 from '../../../../../public/img/icons/mono/favorite.svg'; -import u1166 from '../../../../../public/img/icons/mono/grafana.svg'; -import u1167 from '../../../../../public/img/icons/mono/heart.svg'; -import u1168 from '../../../../../public/img/icons/mono/heart-break.svg'; -import u1169 from '../../../../../public/img/icons/mono/panel-add.svg'; -import u1170 from '../../../../../public/img/icons/mono/library-panel.svg'; -import u1171 from '../../../../../public/img/icons/unicons/record-audio.svg'; -// do not edit this list directly -// the list of icons live here: @grafana/ui/components/Icon/cached.json - -export let cacheInitialized = false; -export let iconRoot = 'public/img/icons/'; - -export function cacheItem(content: string, path: string) { - cacheStore[iconRoot + path] = { content, status: 'loaded' }; -} - -export function initIconCache() { - cacheInitialized = true; - - // This function needs to be called after index.js loads to give the - // application time to modify __webpack_public_path__ with a CDN path - const grafanaPublicPath = typeof window !== 'undefined' && window.__grafana_public_path__; - if (grafanaPublicPath) { - iconRoot = grafanaPublicPath + 'img/icons/'; - } - - // do not edit this list directly - // the list of icons live here: @grafana/ui/components/Icon/cached.json - cacheItem(u1000, 'unicons/at.svg'); - cacheItem(u1001, 'unicons/adjust-circle.svg'); - cacheItem(u1002, 'unicons/align-left.svg'); - cacheItem(u1003, 'unicons/align-right.svg'); - cacheItem(u1004, 'unicons/angle-double-down.svg'); - cacheItem(u1005, 'unicons/angle-double-right.svg'); - cacheItem(u1006, 'unicons/angle-down.svg'); - cacheItem(u1007, 'unicons/angle-left.svg'); - cacheItem(u1008, 'unicons/angle-right.svg'); - cacheItem(u1009, 'unicons/angle-up.svg'); - cacheItem(u1010, 'unicons/apps.svg'); - cacheItem(u1011, 'unicons/arrow.svg'); - cacheItem(u1012, 'unicons/arrow-down.svg'); - cacheItem(u1013, 'unicons/arrow-from-right.svg'); - cacheItem(u1014, 'unicons/arrow-left.svg'); - cacheItem(u1015, 'unicons/arrow-random.svg'); - cacheItem(u1016, 'unicons/arrow-right.svg'); - cacheItem(u1017, 'unicons/arrow-to-right.svg'); - cacheItem(u1018, 'unicons/arrow-up.svg'); - cacheItem(u1019, 'unicons/arrows-h.svg'); - cacheItem(u1020, 'unicons/backward.svg'); - cacheItem(u1021, 'unicons/bars.svg'); - cacheItem(u1022, 'unicons/bell.svg'); - cacheItem(u1023, 'unicons/bell-slash.svg'); - cacheItem(u1024, 'unicons/bolt.svg'); - cacheItem(u1025, 'unicons/book.svg'); - cacheItem(u1026, 'unicons/book-open.svg'); - cacheItem(u1027, 'unicons/brackets-curly.svg'); - cacheItem(u1028, 'unicons/bug.svg'); - cacheItem(u1029, 'unicons/building.svg'); - cacheItem(u1030, 'unicons/calculator-alt.svg'); - cacheItem(u1031, 'unicons/calendar-alt.svg'); - cacheItem(u1032, 'unicons/calendar-slash.svg'); - cacheItem(u1033, 'unicons/camera.svg'); - cacheItem(u1034, 'unicons/channel-add.svg'); - cacheItem(u1035, 'unicons/chart-line.svg'); - cacheItem(u1036, 'unicons/check.svg'); - cacheItem(u1037, 'unicons/check-circle.svg'); - cacheItem(u1038, 'unicons/circle.svg'); - cacheItem(u1039, 'unicons/clipboard-alt.svg'); - cacheItem(u1040, 'unicons/clock-nine.svg'); - cacheItem(u1041, 'unicons/cloud.svg'); - cacheItem(u1042, 'unicons/cloud-download.svg'); - cacheItem(u1043, 'unicons/code-branch.svg'); - cacheItem(u1044, 'unicons/cog.svg'); - cacheItem(u1045, 'unicons/columns.svg'); - cacheItem(u1046, 'unicons/comment-alt.svg'); - cacheItem(u1047, 'unicons/comment-alt-share.svg'); - cacheItem(u1048, 'unicons/comments-alt.svg'); - cacheItem(u1049, 'unicons/compass.svg'); - cacheItem(u1050, 'unicons/copy.svg'); - cacheItem(u1051, 'unicons/corner-down-right-alt.svg'); - cacheItem(u1052, 'unicons/cube.svg'); - cacheItem(u1053, 'unicons/dashboard.svg'); - cacheItem(u1054, 'unicons/database.svg'); - cacheItem(u1055, 'unicons/document-info.svg'); - cacheItem(u1056, 'unicons/download-alt.svg'); - cacheItem(u1057, 'unicons/draggabledots.svg'); - cacheItem(u1058, 'unicons/edit.svg'); - cacheItem(u1059, 'unicons/ellipsis-v.svg'); - cacheItem(u1060, 'unicons/ellipsis-h.svg'); - cacheItem(u1061, 'unicons/envelope.svg'); - cacheItem(u1062, 'unicons/exchange-alt.svg'); - cacheItem(u1063, 'unicons/exclamation-circle.svg'); - cacheItem(u1064, 'unicons/exclamation-triangle.svg'); - cacheItem(u1065, 'unicons/external-link-alt.svg'); - cacheItem(u1066, 'unicons/eye.svg'); - cacheItem(u1067, 'unicons/eye-slash.svg'); - cacheItem(u1068, 'unicons/file-alt.svg'); - cacheItem(u1069, 'unicons/file-blank.svg'); - cacheItem(u1070, 'unicons/filter.svg'); - cacheItem(u1071, 'unicons/folder.svg'); - cacheItem(u1072, 'unicons/folder-open.svg'); - cacheItem(u1073, 'unicons/folder-plus.svg'); - cacheItem(u1074, 'unicons/folder-upload.svg'); - cacheItem(u1075, 'unicons/forward.svg'); - cacheItem(u1076, 'unicons/graph-bar.svg'); - cacheItem(u1077, 'unicons/history.svg'); - cacheItem(u1078, 'unicons/history-alt.svg'); - cacheItem(u1079, 'unicons/home-alt.svg'); - cacheItem(u1080, 'unicons/import.svg'); - cacheItem(u1081, 'unicons/info.svg'); - cacheItem(u1082, 'unicons/info-circle.svg'); - cacheItem(u1083, 'unicons/k6.svg'); - cacheItem(u1084, 'unicons/key-skeleton-alt.svg'); - cacheItem(u1085, 'unicons/keyboard.svg'); - cacheItem(u1086, 'unicons/link.svg'); - cacheItem(u1087, 'unicons/list-ul.svg'); - cacheItem(u1088, 'unicons/lock.svg'); - cacheItem(u1089, 'unicons/minus.svg'); - cacheItem(u1090, 'unicons/minus-circle.svg'); - cacheItem(u1091, 'unicons/mobile-android.svg'); - cacheItem(u1092, 'unicons/monitor.svg'); - cacheItem(u1093, 'unicons/pause.svg'); - cacheItem(u1094, 'unicons/pen.svg'); - cacheItem(u1095, 'unicons/play.svg'); - cacheItem(u1096, 'unicons/plug.svg'); - cacheItem(u1097, 'unicons/plus.svg'); - cacheItem(u1098, 'unicons/plus-circle.svg'); - cacheItem(u1099, 'unicons/power.svg'); - cacheItem(u1100, 'unicons/presentation-play.svg'); - cacheItem(u1101, 'unicons/process.svg'); - cacheItem(u1102, 'unicons/question-circle.svg'); - cacheItem(u1103, 'unicons/repeat.svg'); - cacheItem(u1104, 'unicons/rocket.svg'); - cacheItem(u1105, 'unicons/rss.svg'); - cacheItem(u1106, 'unicons/save.svg'); - cacheItem(u1107, 'unicons/search.svg'); - cacheItem(u1108, 'unicons/search-minus.svg'); - cacheItem(u1109, 'unicons/search-plus.svg'); - cacheItem(u1110, 'unicons/share-alt.svg'); - cacheItem(u1111, 'unicons/shield.svg'); - cacheItem(u1112, 'unicons/signal.svg'); - cacheItem(u1113, 'unicons/signin.svg'); - cacheItem(u1114, 'unicons/signout.svg'); - cacheItem(u1115, 'unicons/sitemap.svg'); - cacheItem(u1116, 'unicons/slack.svg'); - cacheItem(u1117, 'unicons/sliders-v-alt.svg'); - cacheItem(u1118, 'unicons/sort-amount-down.svg'); - cacheItem(u1119, 'unicons/sort-amount-up.svg'); - cacheItem(u1120, 'unicons/square-shape.svg'); - cacheItem(u1121, 'unicons/star.svg'); - cacheItem(u1122, 'unicons/step-backward.svg'); - cacheItem(u1123, 'unicons/sync.svg'); - cacheItem(u1124, 'unicons/stopwatch.svg'); - cacheItem(u1125, 'unicons/table.svg'); - cacheItem(u1126, 'unicons/tag-alt.svg'); - cacheItem(u1127, 'unicons/times.svg'); - cacheItem(u1128, 'unicons/trash-alt.svg'); - cacheItem(u1129, 'unicons/unlock.svg'); - cacheItem(u1130, 'unicons/upload.svg'); - cacheItem(u1131, 'unicons/user.svg'); - cacheItem(u1132, 'unicons/users-alt.svg'); - cacheItem(u1133, 'unicons/wrap-text.svg'); - cacheItem(u1134, 'unicons/cloud-upload.svg'); - cacheItem(u1135, 'unicons/credit-card.svg'); - cacheItem(u1136, 'unicons/file-copy-alt.svg'); - cacheItem(u1137, 'unicons/fire.svg'); - cacheItem(u1138, 'unicons/hourglass.svg'); - cacheItem(u1139, 'unicons/layer-group.svg'); - cacheItem(u1140, 'unicons/layers-alt.svg'); - cacheItem(u1141, 'unicons/line-alt.svg'); - cacheItem(u1142, 'unicons/list-ui-alt.svg'); - cacheItem(u1143, 'unicons/message.svg'); - cacheItem(u1144, 'unicons/palette.svg'); - cacheItem(u1145, 'unicons/percentage.svg'); - cacheItem(u1146, 'unicons/shield-exclamation.svg'); - cacheItem(u1147, 'unicons/plus-square.svg'); - cacheItem(u1148, 'unicons/x.svg'); - cacheItem(u1149, 'unicons/capture.svg'); - cacheItem(u1150, 'custom/gf-grid.svg'); - cacheItem(u1151, 'custom/gf-landscape.svg'); - cacheItem(u1152, 'custom/gf-layout-simple.svg'); - cacheItem(u1153, 'custom/gf-portrait.svg'); - cacheItem(u1154, 'custom/gf-show-context.svg'); - cacheItem(u1155, 'custom/gf-bar-alignment-after.svg'); - cacheItem(u1156, 'custom/gf-bar-alignment-before.svg'); - cacheItem(u1157, 'custom/gf-bar-alignment-center.svg'); - cacheItem(u1158, 'custom/gf-interpolation-linear.svg'); - cacheItem(u1159, 'custom/gf-interpolation-smooth.svg'); - cacheItem(u1160, 'custom/gf-interpolation-step-after.svg'); - cacheItem(u1161, 'custom/gf-interpolation-step-before.svg'); - cacheItem(u1162, 'custom/gf-logs.svg'); - cacheItem(u1163, 'custom/gf-movepane-left.svg'); - cacheItem(u1164, 'custom/gf-movepane-right.svg'); - cacheItem(u1165, 'mono/favorite.svg'); - cacheItem(u1166, 'mono/grafana.svg'); - cacheItem(u1167, 'mono/heart.svg'); - cacheItem(u1168, 'mono/heart-break.svg'); - cacheItem(u1169, 'mono/panel-add.svg'); - cacheItem(u1170, 'mono/library-panel.svg'); - cacheItem(u1171, 'unicons/record-audio.svg'); - // do not edit this list directly - // the list of icons live here: @grafana/ui/components/Icon/cached.json -} diff --git a/packages/grafana-ui/src/components/Icon/utils.test.ts b/packages/grafana-ui/src/components/Icon/utils.test.ts index 493cf1505bdeb..2898856086e8c 100644 --- a/packages/grafana-ui/src/components/Icon/utils.test.ts +++ b/packages/grafana-ui/src/components/Icon/utils.test.ts @@ -15,4 +15,35 @@ describe('Icon utils', () => { expect(iconSubDir).toEqual(expected); }); }); + + describe('getIconRoot', () => { + beforeEach(() => { + // will reset the iconRoot cached value + jest.resetModules(); + }); + + describe('when public path is configured', () => { + beforeAll(() => { + //@ts-ignore + window.__grafana_public_path__ = 'somepath/public/'; + }); + + it('should return icon root based on __grafana_public_path__', () => { + const { getIconRoot } = require('./utils'); + expect(getIconRoot()).toEqual('somepath/public/img/icons/'); + }); + }); + + describe('when public path is not configured', () => { + beforeAll(() => { + //@ts-ignore + window.__grafana_public_path__ = undefined; + }); + + it('should return default icon root', () => { + const { getIconRoot } = require('./utils'); + expect(getIconRoot()).toEqual('public/img/icons/'); + }); + }); + }); }); diff --git a/packages/grafana-ui/src/components/Icon/utils.ts b/packages/grafana-ui/src/components/Icon/utils.ts index d31311a54d59f..0d379f36c7a25 100644 --- a/packages/grafana-ui/src/components/Icon/utils.ts +++ b/packages/grafana-ui/src/components/Icon/utils.ts @@ -43,3 +43,20 @@ export function getSvgSize(size: IconSize) { return 48; } } + +let iconRoot: string | undefined; + +export function getIconRoot(): string { + if (iconRoot) { + return iconRoot; + } + + const grafanaPublicPath = typeof window !== 'undefined' && window.__grafana_public_path__; + if (grafanaPublicPath) { + iconRoot = grafanaPublicPath + 'img/icons/'; + } else { + iconRoot = 'public/img/icons/'; + } + + return iconRoot; +} diff --git a/packages/grafana-ui/src/components/Layout/Box/Box.tsx b/packages/grafana-ui/src/components/Layout/Box/Box.tsx index 51527ca877ed8..97a9f54abdabf 100644 --- a/packages/grafana-ui/src/components/Layout/Box/Box.tsx +++ b/packages/grafana-ui/src/components/Layout/Box/Box.tsx @@ -1,5 +1,5 @@ import { css } from '@emotion/css'; -import React, { ElementType } from 'react'; +import React, { ElementType, forwardRef, PropsWithChildren } from 'react'; import { GrafanaTheme2, ThemeSpacingTokens, ThemeShape, ThemeShadows } from '@grafana/data'; @@ -14,7 +14,7 @@ export type BorderColor = keyof GrafanaTheme2['colors']['border'] | 'error' | 's export type BorderRadius = keyof ThemeShape['radius']; export type BoxShadow = keyof ThemeShadows; -interface BoxProps { +interface BoxProps extends Omit, 'className' | 'style'> { // Margin props /** Sets the property `margin` */ margin?: ResponsiveProp; @@ -68,34 +68,36 @@ interface BoxProps { element?: ElementType; } -export const Box = ({ - children, - margin, - marginX, - marginY, - marginTop, - marginBottom, - marginLeft, - marginRight, - padding, - paddingX, - paddingY, - paddingTop, - paddingBottom, - paddingLeft, - paddingRight, - display, - backgroundColor, - grow, - shrink, - borderColor, - borderStyle, - borderRadius, - justifyContent, - alignItems, - boxShadow, - element, -}: React.PropsWithChildren) => { +export const Box = forwardRef>((props, ref) => { + const { + children, + margin, + marginX, + marginY, + marginTop, + marginBottom, + marginLeft, + marginRight, + padding, + paddingX, + paddingY, + paddingTop, + paddingBottom, + paddingLeft, + paddingRight, + display, + backgroundColor, + grow, + shrink, + borderColor, + borderStyle, + borderRadius, + justifyContent, + alignItems, + boxShadow, + element, + ...rest + } = props; const styles = useStyles2( getStyles, margin, @@ -125,8 +127,12 @@ export const Box = ({ ); const Element = element ?? 'div'; - return {children}; -}; + return ( + + {children} + + ); +}); Box.displayName = 'Box'; diff --git a/packages/grafana-ui/src/components/Layout/Flex/Flex.tsx b/packages/grafana-ui/src/components/Layout/Flex/Flex.tsx index 11cf92082052b..b54bce575b48a 100644 --- a/packages/grafana-ui/src/components/Layout/Flex/Flex.tsx +++ b/packages/grafana-ui/src/components/Layout/Flex/Flex.tsx @@ -33,7 +33,7 @@ export type Direction = 'row' | 'row-reverse' | 'column' | 'column-reverse'; export type Wrap = 'nowrap' | 'wrap' | 'wrap-reverse'; -interface FlexProps { +interface FlexProps extends Omit, 'className' | 'style'> { gap?: ResponsiveProp; alignItems?: ResponsiveProp; justifyContent?: ResponsiveProp; @@ -43,11 +43,11 @@ interface FlexProps { } export const Flex = React.forwardRef( - ({ gap = 1, alignItems, justifyContent, direction, wrap, children }, ref) => { + ({ gap = 1, alignItems, justifyContent, direction, wrap, children, ...rest }, ref) => { const styles = useStyles2(getStyles, gap, alignItems, justifyContent, direction, wrap); return ( -
+
{children}
); diff --git a/packages/grafana-ui/src/components/Layout/Grid/Grid.tsx b/packages/grafana-ui/src/components/Layout/Grid/Grid.tsx index 00be87bda87b6..2ed66247af605 100644 --- a/packages/grafana-ui/src/components/Layout/Grid/Grid.tsx +++ b/packages/grafana-ui/src/components/Layout/Grid/Grid.tsx @@ -5,7 +5,7 @@ import { GrafanaTheme2, ThemeSpacingTokens } from '@grafana/data'; import { useStyles2 } from '../../../themes'; -interface GridProps extends Omit, 'className'> { +interface GridProps extends Omit, 'className' | 'style'> { children: NonNullable; /** Specifies the gutters between columns and rows. It is overwritten when a column or row gap has a value */ diff --git a/packages/grafana-ui/src/components/Layout/Stack/HorizontalStack.tsx b/packages/grafana-ui/src/components/Layout/Stack/HorizontalStack.tsx index cfeb9cb729da7..57944ad2946c0 100644 --- a/packages/grafana-ui/src/components/Layout/Stack/HorizontalStack.tsx +++ b/packages/grafana-ui/src/components/Layout/Stack/HorizontalStack.tsx @@ -6,12 +6,15 @@ import { ResponsiveProp } from '../utils/responsiveness'; import { Stack } from './Stack'; -export const HorizontalStack = React.forwardRef< - HTMLDivElement, - React.PropsWithChildren<{ gap?: ResponsiveProp }> ->(({ children, gap = 1 }, ref) => ( - - {children} - -)); +interface HorizontalStackProps extends Omit, 'className' | 'style'> { + gap?: ResponsiveProp; +} + +export const HorizontalStack = React.forwardRef>( + ({ children, gap = 1, ...rest }, ref) => ( + + {children} + + ) +); HorizontalStack.displayName = 'HorizontalStack'; diff --git a/packages/grafana-ui/src/components/Layout/Stack/Stack.tsx b/packages/grafana-ui/src/components/Layout/Stack/Stack.tsx index 2395610b3a128..2e24f2332f9d3 100644 --- a/packages/grafana-ui/src/components/Layout/Stack/Stack.tsx +++ b/packages/grafana-ui/src/components/Layout/Stack/Stack.tsx @@ -4,18 +4,20 @@ import { ThemeSpacingTokens } from '@grafana/data'; import { Flex } from '../Flex/Flex'; import { ResponsiveProp } from '../utils/responsiveness'; -interface StackProps { +interface StackProps extends Omit, 'className' | 'style'> { direction?: ResponsiveProp<'column' | 'row'>; gap?: ResponsiveProp; } export const Stack = React.forwardRef>( - ({ gap = 1, direction = 'column', children }, ref) => { + ({ gap = 1, direction = 'column', children, ...rest }, ref) => { return ( - - {React.Children.map(children, (child) => ( -
{child}
- ))} + + {React.Children.toArray(children) + .filter(Boolean) + .map((child, index) => ( +
{child}
+ ))}
); } diff --git a/packages/grafana-ui/src/components/Monaco/ReactMonacoEditor.tsx b/packages/grafana-ui/src/components/Monaco/ReactMonacoEditor.tsx index 5e38bd3c26e9d..a6db1ce5fc346 100644 --- a/packages/grafana-ui/src/components/Monaco/ReactMonacoEditor.tsx +++ b/packages/grafana-ui/src/components/Monaco/ReactMonacoEditor.tsx @@ -1,47 +1,34 @@ -import MonacoEditor, { loader as monacoEditorLoader, useMonaco } from '@monaco-editor/react'; -import React, { useEffect } from 'react'; +import MonacoEditor, { loader as monacoEditorLoader, Monaco } from '@monaco-editor/react'; +import React, { useCallback } from 'react'; import { useTheme2 } from '../../themes'; import defineThemes from './theme'; import type { ReactMonacoEditorProps } from './types'; -let initalized = false; -function initMonaco() { - if (initalized) { - return; - } - - monacoEditorLoader.config({ - paths: { - vs: (window.__grafana_public_path__ ?? 'public/') + 'lib/monaco/min/vs', - }, - }); - initalized = true; - monacoEditorLoader.init().then((monaco) => { - // this call makes sure the themes exist. - // they will not have the correct colors, - // but we need them to exist since the beginning, - // because if we start a monaco instance with - // a theme that does not exist, it will not work well. - defineThemes(monaco); - }); -} +monacoEditorLoader.config({ + paths: { + vs: (window.__grafana_public_path__ ?? 'public/') + 'lib/monaco/min/vs', + }, +}); export const ReactMonacoEditor = (props: ReactMonacoEditorProps) => { - const theme = useTheme2(); - const monaco = useMonaco(); + const { beforeMount } = props; - useEffect(() => { - // monaco can be null or undefined at the beginning, because it is loaded in asynchronously - if (monaco != null) { + const theme = useTheme2(); + const onMonacoBeforeMount = useCallback( + (monaco: Monaco) => { defineThemes(monaco, theme); - } - }, [monaco, theme]); - - initMonaco(); - - const monacoTheme = theme.isDark ? 'grafana-dark' : 'grafana-light'; - - return ; + beforeMount?.(monaco); + }, + [beforeMount, theme] + ); + + return ( + + ); }; diff --git a/packages/grafana-ui/src/components/StatsPicker/StatsPicker.tsx b/packages/grafana-ui/src/components/StatsPicker/StatsPicker.tsx index 47797c619f660..895f849104f78 100644 --- a/packages/grafana-ui/src/components/StatsPicker/StatsPicker.tsx +++ b/packages/grafana-ui/src/components/StatsPicker/StatsPicker.tsx @@ -1,7 +1,7 @@ import { difference } from 'lodash'; import React, { PureComponent } from 'react'; -import { fieldReducers, SelectableValue } from '@grafana/data'; +import { fieldReducers, SelectableValue, FieldReducerInfo } from '@grafana/data'; import { Select } from '../Select/Select'; @@ -15,6 +15,7 @@ export interface Props { width?: number; menuPlacement?: 'auto' | 'bottom' | 'top'; inputId?: string; + filterOptions?: (ext: FieldReducerInfo) => boolean; } export class StatsPicker extends PureComponent { @@ -63,9 +64,10 @@ export class StatsPicker extends PureComponent { }; render() { - const { stats, allowMultiple, defaultStat, placeholder, className, menuPlacement, width, inputId } = this.props; + const { stats, allowMultiple, defaultStat, placeholder, className, menuPlacement, width, inputId, filterOptions } = + this.props; - const select = fieldReducers.selectOptions(stats); + const select = fieldReducers.selectOptions(stats, filterOptions); return (