Compare commits
101 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
cf0a135595 | ||
|
|
285824f717 | ||
|
|
2386d78193 | ||
|
|
fac483c393 | ||
|
|
fd67ab151d | ||
|
|
27a6d700f8 | ||
|
|
fcd658359c | ||
|
|
3d99babd0f | ||
|
|
1ffc7860e6 | ||
|
|
955b931756 | ||
|
|
afb449e8a1 | ||
|
|
3bf22fcb21 | ||
|
|
8ad6df8266 | ||
|
|
a6370342b0 | ||
|
|
6895e75f70 | ||
|
|
4f826bc76c | ||
|
|
efaf4f5e09 | ||
|
|
907381ed5c | ||
|
|
8c9cb8e839 | ||
|
|
028cc7e72b | ||
|
|
00555606d5 | ||
|
|
9cf5b4eb9e | ||
|
|
8637518540 | ||
|
|
0c27df8b8c | ||
|
|
8fd1547edb | ||
|
|
21f204d35a | ||
|
|
84da688400 | ||
|
|
b742567ade | ||
|
|
385b15bf69 | ||
|
|
94ec932d29 | ||
|
|
2525b30803 | ||
|
|
324964b86b | ||
|
|
d31f932800 | ||
|
|
363171b182 | ||
|
|
32e3cd7cbc | ||
|
|
2a223cbea2 | ||
|
|
c7a182e9d5 | ||
|
|
d8f757cb8c | ||
|
|
bfe6b520d7 | ||
|
|
190c3aad58 | ||
|
|
022abcb47d | ||
|
|
5b305cb696 | ||
|
|
a03069fb08 | ||
|
|
0413fea8d2 | ||
|
|
30081ca04b | ||
|
|
53a1e5b7e6 | ||
|
|
29cc5f9c62 | ||
|
|
b485d1cde9 | ||
|
|
045c2d4e59 | ||
|
|
654af9a48d | ||
|
|
5bb58c5172 | ||
|
|
42b9c898bf | ||
|
|
795c86b045 | ||
|
|
5d5e7f97e9 | ||
|
|
c8cf18d8f6 | ||
|
|
70e4499f83 | ||
|
|
2e251a2b20 | ||
|
|
cdec4eb6ab | ||
|
|
71a18da270 | ||
|
|
40354c6b40 | ||
|
|
68fb4da24a | ||
|
|
89f9081658 | ||
|
|
84d2814f7c | ||
|
|
193b671246 | ||
|
|
2bb672a7de | ||
|
|
c156621981 | ||
|
|
9a8983e8e9 | ||
|
|
4bdfc2d926 | ||
|
|
bd9707e8f3 | ||
|
|
3023a43d4f | ||
|
|
41b0393140 | ||
|
|
90a4c84bc2 | ||
|
|
6749e8667d | ||
|
|
9727346e63 | ||
|
|
3683b7a5ff | ||
|
|
f9ca726290 | ||
|
|
15ec06b593 | ||
|
|
953d9db30d | ||
|
|
a7b9dcdce8 | ||
|
|
76f3ed3c3f | ||
|
|
2ad87ce213 | ||
|
|
cc5b3c11c4 | ||
|
|
20731672ed | ||
|
|
f9ec04bbb7 | ||
|
|
0e6d038934 | ||
|
|
b8c6ff611d | ||
|
|
ecfd92ed30 | ||
|
|
8eb9971797 | ||
|
|
c567e690ad | ||
|
|
acf1b1285b | ||
|
|
3d65500a4f | ||
|
|
589284778a | ||
|
|
b9e989cbf2 | ||
|
|
f39c46a1b5 | ||
|
|
48bd8ebe92 | ||
|
|
34524d6dfa | ||
|
|
6e861b19fa | ||
|
|
26f7b8ee65 | ||
|
|
04dd4e7f7c | ||
|
|
992e5d72ff | ||
|
|
1b0f5f0a81 |
2216
.betterer.results
2216
.betterer.results
File diff suppressed because it is too large
Load Diff
41
.betterer.ts
41
.betterer.ts
@@ -1,32 +1,35 @@
|
||||
import { BettererFileTest } from '@betterer/betterer';
|
||||
import { promises as fs } from 'fs';
|
||||
import { ESLint, Linter } from 'eslint';
|
||||
import { existsSync } from 'fs';
|
||||
import path from 'path';
|
||||
import glob from 'glob';
|
||||
|
||||
export default {
|
||||
'better eslint': () =>
|
||||
countEslintErrors()
|
||||
.include('**/*.{ts,tsx}')
|
||||
.exclude(/public\/app\/angular/),
|
||||
'better eslint': () => countEslintErrors().include('**/*.{ts,tsx}'),
|
||||
'no undocumented stories': () => countUndocumentedStories().include('**/*.story.tsx'),
|
||||
};
|
||||
|
||||
function countUndocumentedStories() {
|
||||
return new BettererFileTest(async (filePaths, fileTestResult) => {
|
||||
await Promise.all(
|
||||
filePaths.map(async (filePath) => {
|
||||
// look for .mdx import in the story file
|
||||
const regex = new RegExp("^import.*.mdx';$", 'gm');
|
||||
const fileText = await fs.readFile(filePath, 'utf8');
|
||||
if (!regex.test(fileText)) {
|
||||
// In this case the file contents don't matter:
|
||||
const file = fileTestResult.addFile(filePath, '');
|
||||
// Add the issue to the first character of the file:
|
||||
file.addIssue(0, 0, 'No undocumented stories are allowed, please add an .mdx file with some documentation');
|
||||
}
|
||||
})
|
||||
);
|
||||
filePaths.forEach((filePath) => {
|
||||
if (!existsSync(filePath.replace(/\.story.tsx$/, '.mdx'))) {
|
||||
// In this case the file contents don't matter:
|
||||
const file = fileTestResult.addFile(filePath, '');
|
||||
// Add the issue to the first character of the file:
|
||||
file.addIssue(0, 0, 'No undocumented stories are allowed, please add an .mdx file with some documentation');
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
async function findEslintConfigFiles(): Promise<string[]> {
|
||||
return new Promise((resolve, reject) => {
|
||||
glob('**/.eslintrc', (err, files) => {
|
||||
if (err) {
|
||||
reject(err);
|
||||
}
|
||||
resolve(files);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
@@ -35,7 +38,7 @@ function countEslintErrors() {
|
||||
const { baseDirectory } = resolver;
|
||||
const cli = new ESLint({ cwd: baseDirectory });
|
||||
|
||||
const eslintConfigFiles = await glob('**/.eslintrc');
|
||||
const eslintConfigFiles = await findEslintConfigFiles();
|
||||
const eslintConfigMainPaths = eslintConfigFiles.map((file) => path.resolve(path.dirname(file)));
|
||||
|
||||
const baseRules: Partial<Linter.RulesRecord> = {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Auto generated binary variables helper managed by https://github.com/bwplotka/bingo v0.8. DO NOT EDIT.
|
||||
# Auto generated binary variables helper managed by https://github.com/bwplotka/bingo v0.7. DO NOT EDIT.
|
||||
# All tools are designed to be build inside $GOBIN.
|
||||
BINGO_DIR := $(dir $(lastword $(MAKEFILE_LIST)))
|
||||
GOPATH ?= $(shell go env GOPATH)
|
||||
@@ -35,11 +35,11 @@ $(DRONE): $(BINGO_DIR)/drone.mod
|
||||
@echo "(re)installing $(GOBIN)/drone-v1.5.0"
|
||||
@cd $(BINGO_DIR) && GOWORK=off $(GO) build -mod=mod -modfile=drone.mod -o=$(GOBIN)/drone-v1.5.0 "github.com/drone/drone-cli/drone"
|
||||
|
||||
GOLANGCI_LINT := $(GOBIN)/golangci-lint-v1.51.2
|
||||
GOLANGCI_LINT := $(GOBIN)/golangci-lint-v1.50.1
|
||||
$(GOLANGCI_LINT): $(BINGO_DIR)/golangci-lint.mod
|
||||
@# Install binary/ries using Go 1.14+ build command. This is using bwplotka/bingo-controlled, separate go module with pinned dependencies.
|
||||
@echo "(re)installing $(GOBIN)/golangci-lint-v1.51.2"
|
||||
@cd $(BINGO_DIR) && GOWORK=off $(GO) build -mod=mod -modfile=golangci-lint.mod -o=$(GOBIN)/golangci-lint-v1.51.2 "github.com/golangci/golangci-lint/cmd/golangci-lint"
|
||||
@echo "(re)installing $(GOBIN)/golangci-lint-v1.50.1"
|
||||
@cd $(BINGO_DIR) && GOWORK=off $(GO) build -mod=mod -modfile=golangci-lint.mod -o=$(GOBIN)/golangci-lint-v1.50.1 "github.com/golangci/golangci-lint/cmd/golangci-lint"
|
||||
|
||||
JB := $(GOBIN)/jb-v0.5.1
|
||||
$(JB): $(BINGO_DIR)/jb.mod
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
module _ // Auto generated by https://github.com/bwplotka/bingo. DO NOT EDIT
|
||||
|
||||
go 1.20
|
||||
go 1.19
|
||||
|
||||
require github.com/golangci/golangci-lint v1.51.2 // cmd/golangci-lint
|
||||
require github.com/golangci/golangci-lint v1.50.1 // cmd/golangci-lint
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,4 +1,4 @@
|
||||
# Auto generated binary variables helper managed by https://github.com/bwplotka/bingo v0.8. DO NOT EDIT.
|
||||
# Auto generated binary variables helper managed by https://github.com/bwplotka/bingo v0.7. DO NOT EDIT.
|
||||
# All tools are designed to be build inside $GOBIN.
|
||||
# Those variables will work only until 'bingo get' was invoked, or if tools were installed via Makefile's Variables.mk.
|
||||
GOBIN=${GOBIN:=$(go env GOBIN)}
|
||||
@@ -14,7 +14,7 @@ CUE="${GOBIN}/cue-v0.5.0-beta.2"
|
||||
|
||||
DRONE="${GOBIN}/drone-v1.5.0"
|
||||
|
||||
GOLANGCI_LINT="${GOBIN}/golangci-lint-v1.51.2"
|
||||
GOLANGCI_LINT="${GOBIN}/golangci-lint-v1.50.1"
|
||||
|
||||
JB="${GOBIN}/jb-v0.5.1"
|
||||
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
[run]
|
||||
init_cmds = [
|
||||
["GO_BUILD_DEV=1", "make", "build-go"],
|
||||
["make", "gen-go"],
|
||||
["make", "gen-jsonnet"],
|
||||
["GO_BUILD_DEV=1", "make", "build-go"],
|
||||
["./bin/grafana", "server", "-packaging=dev", "cfg:app_mode=development"]
|
||||
]
|
||||
watch_all = true
|
||||
@@ -16,7 +17,8 @@ watch_exts = [".go", ".ini", ".toml", ".template.html"]
|
||||
ignore_files = [".*_gen.go"]
|
||||
build_delay = 1500
|
||||
cmds = [
|
||||
["GO_BUILD_DEV=1", "make", "build-go"],
|
||||
["make", "gen-go"],
|
||||
["make", "gen-jsonnet"],
|
||||
["GO_BUILD_DEV=1", "make", "build-go"],
|
||||
["./bin/grafana", "server", "-packaging=dev", "cfg:app_mode=development"]
|
||||
]
|
||||
|
||||
@@ -14,7 +14,6 @@ load(
|
||||
"artifacts_page_pipeline",
|
||||
"enterprise2_pipelines",
|
||||
"enterprise_pipelines",
|
||||
"integration_test_pipelines",
|
||||
"oss_pipelines",
|
||||
"publish_artifacts_pipelines",
|
||||
"publish_npm_pipelines",
|
||||
@@ -53,7 +52,6 @@ def main(_ctx):
|
||||
publish_packages_pipeline() +
|
||||
artifacts_page_pipeline() +
|
||||
version_branch_pipelines() +
|
||||
integration_test_pipelines() +
|
||||
cronjobs() +
|
||||
secrets()
|
||||
)
|
||||
|
||||
1567
.drone.yml
1567
.drone.yml
File diff suppressed because it is too large
Load Diff
340
.github/CODEOWNERS
vendored
340
.github/CODEOWNERS
vendored
@@ -12,45 +12,41 @@
|
||||
# This should make it easy to add new rules without breaking existing ones.
|
||||
|
||||
# Documentation
|
||||
/.changelog-archive @grafana/docs-grafana
|
||||
/CHANGELOG.md @grafana/docs-grafana
|
||||
/CODE_OF_CONDUCT.md @grafana/docs-grafana
|
||||
/CONTRIBUTING.md @grafana/docs-grafana
|
||||
/GOVERNANCE.md @RichiH
|
||||
/HALL_OF_FAME.md @grafana/docs-grafana
|
||||
/ISSUE_TRIAGE.md @grafana/grafana-community-support
|
||||
/LICENSE @torkelo
|
||||
/LICENSING.md @torkelo
|
||||
/MAINTAINERS.md @RichiH
|
||||
/NOTICE.md @torkelo
|
||||
/README.md @grafana/docs-grafana
|
||||
/ROADMAP.md @torkelo
|
||||
/SECURITY.md @grafana/security-team
|
||||
/SUPPORT.md @torkelo
|
||||
/UPGRADING_DEPENDENCIES.md @grafana/docs-grafana
|
||||
/WORKFLOW.md @torkelo
|
||||
/docs/ @grafana/docs-grafana
|
||||
/contribute/ @grafana/docs-grafana
|
||||
/devenv/README.md @grafana/docs-grafana
|
||||
/docs/sources/developers/plugins/ @grafana/docs-grafana @grafana/plugins-platform-frontend @grafana/plugins-platform-backend
|
||||
/docs/sources/developers/plugins/backend/ @grafana/docs-grafana @grafana/plugins-platform-backend
|
||||
/.changelog-archive @grafana/docs-grafana
|
||||
CHANGELOG.md @grafana/docs-grafana
|
||||
CODE_OF_CONDUCT.md @grafana/docs-grafana
|
||||
CONTRIBUTING.md @grafana/docs-grafana
|
||||
GOVERNANCE.md @RichiH
|
||||
HALL_OF_FAME.md @grafana/docs-grafana
|
||||
ISSUE_TRIAGE.md @grafana/grafana-community-support
|
||||
LICENSE @torkelo
|
||||
LICENSING.md @torkelo
|
||||
MAINTAINERS.md @RichiH
|
||||
NOTICE.md @torkelo
|
||||
README.md @grafana/docs-grafana
|
||||
ROADMAP.md @torkelo
|
||||
SECURITY.md @grafana/security-team
|
||||
SUPPORT.md @torkelo
|
||||
UPGRADING_DEPENDENCIES.md @grafana/docs-grafana
|
||||
WORKFLOW.md @torkelo
|
||||
|
||||
# Technical documentation
|
||||
/docs/ @Eve832 @jdbaldry
|
||||
/docs/sources/ @Eve832
|
||||
/docs/sources/administration/ @Eve832 @GrafanaWriter
|
||||
/docs/sources/alerting/ @brendamuir
|
||||
/docs/sources/dashboards/ @imatwawana
|
||||
/docs/sources/datasources/ @Eve832 @GrafanaWriter
|
||||
/docs/sources/explore/ @Eve832 @GrafanaWriter
|
||||
/docs/sources/fundamentals @chri2547
|
||||
/docs/sources/getting-started/ @chri2547
|
||||
/docs/sources/introduction/ @chri2547
|
||||
/docs/sources/old-alerting/ @brendamuir
|
||||
/docs/sources/panels-visualizations/ @imatwawana
|
||||
/docs/sources/release-notes/ @Eve832 @GrafanaWriter
|
||||
/docs/sources/setup-grafana/ @chri2547
|
||||
/docs/sources/upgrade-guide/ @chri2547 @imatwawana
|
||||
/docs/sources/whatsnew/ @chri2547 @imatwawana
|
||||
/docs/sources/developers/plugins/ @Eve832 @josmperez @grafana/plugins-platform-frontend @grafana/plugins-platform-backend
|
||||
/docs/sources/developers/plugins/backend/ @Eve832 @grafana/plugins-platform-backend
|
||||
|
||||
# Set up, dashboards/visualization, best practices: Chris Moyer
|
||||
# Alerting: Brenda Muir
|
||||
/docs/sources/administration/ @Eve832 @GrafanaWriter
|
||||
/docs/sources/alerting/ @brendamuir
|
||||
/docs/sources/dashboards/ @chri2547
|
||||
/docs/sources/datasources/ @Eve832 @GrafanaWriter
|
||||
/docs/sources/explore/ @Eve832 @GrafanaWriter
|
||||
/docs/sources/getting-started/ @chri2547
|
||||
/docs/sources/old-alerting/ @brendamuir
|
||||
/docs/sources/release-notes/ @Eve832 @GrafanaWriter
|
||||
/docs/sources/setup-grafana/ @chri2547
|
||||
/docs/sources/whatsnew/ @Eve832 @GrafanaWriter
|
||||
|
||||
# Backend code
|
||||
/go.mod @grafana/backend-platform
|
||||
@@ -66,7 +62,7 @@
|
||||
/pkg/bus/ @grafana/backend-platform
|
||||
/pkg/cmd/ @grafana/backend-platform
|
||||
/pkg/components/apikeygen/ @grafana/grafana-authnz-team
|
||||
/pkg/components/satokengen/ @grafana/grafana-authnz-team
|
||||
/pkg/components/apikeygenprefixed/ @grafana/grafana-authnz-team
|
||||
/pkg/components/dashdiffs/ @grafana/backend-platform
|
||||
/pkg/components/imguploader/ @grafana/backend-platform
|
||||
/pkg/components/loki/ @grafana/backend-platform
|
||||
@@ -83,7 +79,6 @@
|
||||
/pkg/infra/metrics/ @grafana/backend-platform
|
||||
/pkg/infra/network/ @grafana/backend-platform
|
||||
/pkg/infra/process/ @grafana/backend-platform
|
||||
/pkg/infra/proxy/ @grafana/hosted-grafana-team
|
||||
/pkg/infra/remotecache/ @grafana/backend-platform
|
||||
/pkg/infra/serverlock/ @grafana/backend-platform
|
||||
/pkg/infra/slugify/ @grafana/backend-platform
|
||||
@@ -96,6 +91,7 @@
|
||||
/pkg/services/annotations/ @grafana/backend-platform
|
||||
/pkg/services/apikey/ @grafana/backend-platform
|
||||
/pkg/services/cleanup/ @grafana/backend-platform
|
||||
/pkg/services/comments/ @grafana/backend-platform
|
||||
/pkg/services/contexthandler/ @grafana/backend-platform
|
||||
/pkg/services/correlations/ @grafana/backend-platform
|
||||
/pkg/services/dashboardimport/ @grafana/backend-platform
|
||||
@@ -113,6 +109,7 @@
|
||||
/pkg/services/org/ @grafana/backend-platform
|
||||
/pkg/services/playlist/ @grafana/backend-platform
|
||||
/pkg/services/plugindashboards/ @grafana/backend-platform
|
||||
/pkg/services/pluginsettings/ @grafana/backend-platform
|
||||
/pkg/services/preference/ @grafana/backend-platform
|
||||
/pkg/services/provisioning/ @grafana/backend-platform
|
||||
/pkg/services/publicdashboards/ @grafana/dashboards-squad
|
||||
@@ -136,7 +133,6 @@
|
||||
/pkg/services/validations/ @grafana/backend-platform
|
||||
/pkg/setting/ @grafana/backend-platform
|
||||
/pkg/tests/ @grafana/backend-platform
|
||||
/pkg/tests/api/correlations/ @grafana/explore-squad
|
||||
/pkg/tsdb/grafanads/ @grafana/backend-platform
|
||||
/pkg/tsdb/intervalv2/ @grafana/backend-platform
|
||||
/pkg/tsdb/legacydata/ @grafana/backend-platform
|
||||
@@ -159,6 +155,9 @@
|
||||
/devenv/docker/blocks/loki* @grafana/observability-logs
|
||||
/devenv/docker/blocks/elastic* @grafana/observability-logs
|
||||
|
||||
# Performance tests
|
||||
/devenv/docker/loadtest-ts/ @grafana/multitenancy-squad
|
||||
|
||||
/devenv/bulk-dashboards/ @grafana/dashboards-squad
|
||||
/devenv/bulk_alerting_dashboards/ @grafana/alerting-squad-backend
|
||||
/devenv/create_docker_compose.sh @grafana/backend-platform
|
||||
@@ -207,7 +206,7 @@
|
||||
/devenv/docker/ha_test/ @grafana/backend-platform
|
||||
/devenv/docker/loadtest/ @grafana/backend-platform
|
||||
/devenv/docker/rpmtest/ @grafana/backend-platform
|
||||
/devenv/jsonnet/ @grafana/dataviz-squad
|
||||
/devenv/jsonnet/ @grafana/grafana-edge-squad
|
||||
/devenv/local-npm/ @grafana/frontend-ops
|
||||
/devenv/vscode/ @grafana/frontend-ops
|
||||
/devenv/setup.sh @grafana/backend-platform
|
||||
@@ -220,17 +219,17 @@
|
||||
|
||||
|
||||
# Continuous Integration
|
||||
.drone.yml @grafana/grafana-delivery
|
||||
.drone.star @grafana/grafana-delivery
|
||||
/scripts/drone/ @grafana/grafana-delivery
|
||||
/pkg/build/ @grafana/grafana-delivery
|
||||
/.dockerignore @grafana/grafana-delivery
|
||||
/Dockerfile @grafana/grafana-delivery
|
||||
/Makefile @grafana/grafana-delivery
|
||||
/scripts/build/ @grafana/grafana-delivery
|
||||
.drone.yml @grafana/grafana-release-eng
|
||||
.drone.star @grafana/grafana-release-eng
|
||||
/scripts/drone/ @grafana/grafana-release-eng
|
||||
/pkg/build/ @grafana/grafana-release-eng
|
||||
/.dockerignore @grafana/grafana-release-eng
|
||||
/Dockerfile @grafana/grafana-release-eng
|
||||
/Makefile @grafana/grafana-release-eng
|
||||
/scripts/build/ @grafana/grafana-release-eng
|
||||
|
||||
# OSS Plugin Partnerships backend code
|
||||
/pkg/tsdb/cloudwatch/ @grafana/aws-datasources
|
||||
/pkg/tsdb/cloudwatch/ @grafana/aws-plugins
|
||||
/pkg/tsdb/azuremonitor/ @grafana/partner-plugins
|
||||
/pkg/tsdb/cloudmonitoring/ @grafana/partner-plugins
|
||||
|
||||
@@ -253,14 +252,14 @@
|
||||
/pkg/services/sqlstore/migrations/ @grafana/backend-platform @grafana/hosted-grafana-team
|
||||
*_mig.go @grafana/backend-platform @grafana/hosted-grafana-team
|
||||
|
||||
# Grafana app platform
|
||||
/pkg/services/live/ @grafana/grafana-app-platform-squad
|
||||
/pkg/services/searchV2/ @grafana/grafana-app-platform-squad
|
||||
/pkg/services/store/ @grafana/grafana-app-platform-squad
|
||||
/pkg/infra/filestorage/ @grafana/grafana-app-platform-squad
|
||||
/pkg/util/converter/ @grafana/grafana-app-platform-squad
|
||||
/pkg/modules/ @grafana/grafana-app-platform-squad
|
||||
/pkg/kindsysreport/ @grafana/grafana-app-platform-squad
|
||||
# Grafana multitenancy
|
||||
/pkg/services/live/ @grafana/multitenancy-squad
|
||||
/pkg/services/searchV2/ @grafana/multitenancy-squad
|
||||
/pkg/services/store/ @grafana/multitenancy-squad
|
||||
/pkg/services/querylibrary/ @grafana/multitenancy-squad
|
||||
/pkg/services/export/ @grafana/multitenancy-squad
|
||||
/pkg/infra/filestorage/ @grafana/multitenancy-squad
|
||||
/pkg/util/converter/ @grafana/multitenancy-squad
|
||||
|
||||
# Alerting
|
||||
/pkg/services/ngalert/ @grafana/alerting-squad-backend
|
||||
@@ -270,8 +269,8 @@
|
||||
/public/app/features/alerting/ @grafana/alerting-squad-frontend
|
||||
|
||||
# Library Services
|
||||
/pkg/services/libraryelements/ @grafana/grafana-frontend-platform
|
||||
/pkg/services/librarypanels/ @grafana/grafana-frontend-platform
|
||||
/pkg/services/libraryelements/ @grafana/user-essentials
|
||||
/pkg/services/librarypanels/ @grafana/user-essentials
|
||||
|
||||
# Plugins
|
||||
/pkg/api/pluginproxy/ @grafana/plugins-platform-backend
|
||||
@@ -282,32 +281,30 @@
|
||||
/pkg/services/pluginsintegration/ @grafana/plugins-platform-backend
|
||||
/pkg/plugins/pfs/ @grafana/plugins-platform-backend @grafana/grafana-as-code
|
||||
/pkg/tsdb/testdatasource/ @grafana/plugins-platform-backend
|
||||
/pkg/services/pluginsintegration/pluginsettings/ @grafana/plugins-platform-backend
|
||||
|
||||
# Dashboard previews / crawler (behind feature flag)
|
||||
/pkg/services/thumbs/ @grafana/grafana-app-platform-squad
|
||||
/pkg/services/thumbs/ @grafana/multitenancy-squad
|
||||
|
||||
# Backend code docs
|
||||
/contribute/backend/ @grafana/backend-platform
|
||||
|
||||
|
||||
/crowdin.yml @grafana/grafana-frontend-platform
|
||||
/public/locales/ @grafana/grafana-frontend-platform
|
||||
/public/app/core/internationalization/ @grafana/grafana-frontend-platform
|
||||
/e2e/ @grafana/grafana-frontend-platform
|
||||
/crowdin.yml @grafana/user-essentials
|
||||
/public/locales/ @grafana/user-essentials
|
||||
/public/app/core/internationalization/ @grafana/user-essentials
|
||||
/e2e/ @grafana/user-essentials
|
||||
/e2e/cloud-plugins-suite/ @grafana/partner-plugins
|
||||
/packages/ @grafana/grafana-frontend-platform @grafana/plugins-platform-frontend @grafana/dataviz-squad
|
||||
/packages/grafana-e2e-selectors/ @grafana/grafana-frontend-platform
|
||||
/packages/grafana-e2e/ @grafana/grafana-frontend-platform
|
||||
/packages/ @grafana/user-essentials @grafana/plugins-platform-frontend @grafana/grafana-bi-squad
|
||||
/packages/grafana-e2e-selectors/ @grafana/user-essentials
|
||||
/packages/grafana-e2e/ @grafana/user-essentials
|
||||
/packages/grafana-toolkit/ @grafana/plugins-platform-frontend
|
||||
/packages/grafana-ui/.storybook/ @grafana/plugins-platform-frontend
|
||||
/packages/grafana-ui/src/components/ @grafana/grafana-frontend-platform
|
||||
/packages/grafana-ui/src/components/DateTimePickers/ @grafana/grafana-frontend-platform
|
||||
/packages/grafana-ui/src/components/GraphNG/ @grafana/dataviz-squad
|
||||
/packages/grafana-ui/src/components/DateTimePickers/ @grafana/user-essentials
|
||||
/packages/grafana-ui/src/components/GraphNG/ @grafana/grafana-bi-squad
|
||||
/packages/grafana-ui/src/components/Logs/ @grafana/observability-logs
|
||||
/packages/grafana-ui/src/components/Table/ @grafana/grafana-bi-squad
|
||||
/packages/grafana-ui/src/components/TimeSeries/ @grafana/dataviz-squad
|
||||
/packages/grafana-ui/src/components/uPlot/ @grafana/dataviz-squad
|
||||
/packages/grafana-ui/src/components/TimeSeries/ @grafana/grafana-bi-squad
|
||||
/packages/grafana-ui/src/components/uPlot/ @grafana/grafana-bi-squad
|
||||
/packages/grafana-ui/src/utils/storybook/ @grafana/plugins-platform-frontend
|
||||
/packages/grafana-data/src/**/*logs* @grafana/observability-logs
|
||||
/plugins-bundled/ @grafana/plugins-platform-frontend
|
||||
@@ -327,7 +324,7 @@ tsconfig.json @grafana/frontend-ops
|
||||
/.yarn @grafana/frontend-ops
|
||||
/.yarnrc.yml @grafana/frontend-ops
|
||||
/yarn.lock @grafana/frontend-ops
|
||||
/.linguirc @grafana/grafana-frontend-platform
|
||||
/.linguirc @grafana/user-essentials
|
||||
/babel.config.json @grafana/frontend-ops
|
||||
lerna.json @grafana/frontend-ops
|
||||
/.prettierrc.js @grafana/frontend-ops
|
||||
@@ -341,99 +338,99 @@ lerna.json @grafana/frontend-ops
|
||||
|
||||
|
||||
# public folder
|
||||
/public/app/core/ @grafana/grafana-frontend-platform
|
||||
/public/app/core/components/TimePicker/ @grafana/grafana-frontend-platform
|
||||
/public/app/core/components/Layers/ @grafana/dataviz-squad
|
||||
/public/app/features/all.ts @grafana/grafana-frontend-platform
|
||||
/public/app/core/ @grafana/user-essentials
|
||||
/public/app/core/components/TimePicker/ @grafana/user-essentials
|
||||
/public/app/core/components/Layers/ @grafana/grafana-edge-squad
|
||||
/public/app/features/all.ts @grafana/user-essentials
|
||||
/public/app/features/admin/ @grafana/grafana-authnz-team
|
||||
/public/app/features/annotations/ @grafana/grafana-frontend-platform
|
||||
/public/app/features/api-keys/ @grafana/grafana-frontend-platform
|
||||
/public/app/features/canvas/ @grafana/dataviz-squad
|
||||
/public/app/features/commandPalette/ @grafana/grafana-frontend-platform
|
||||
/public/app/features/annotations/ @grafana/user-essentials
|
||||
/public/app/features/api-keys/ @grafana/user-essentials
|
||||
/public/app/features/canvas/ @grafana/grafana-edge-squad
|
||||
/public/app/features/commandPalette/ @grafana/user-essentials
|
||||
/public/app/features/comments/ @grafana/grafana-edge-squad
|
||||
/public/app/features/connections/ @grafana/plugins-platform-frontend
|
||||
/public/app/features/correlations/ @grafana/explore-squad
|
||||
/public/app/features/dashboard/ @grafana/dashboards-squad
|
||||
/public/app/features/datasources/ @grafana/plugins-platform-frontend
|
||||
/public/app/features/dimensions/ @grafana/dataviz-squad
|
||||
/public/app/features/dataframe-import/ @grafana/grafana-bi-squad
|
||||
/public/app/features/datasource-drawer/ @grafana/grafana-bi-squad
|
||||
/public/app/features/datasources/ @grafana/user-essentials
|
||||
/public/app/features/dimensions/ @grafana/grafana-edge-squad
|
||||
/public/app/features/explore/ @grafana/explore-squad
|
||||
/public/app/features/expressions/ @grafana/observability-metrics
|
||||
/public/app/features/folders/ @grafana/grafana-frontend-platform
|
||||
/public/app/features/inspector/ @grafana/grafana-frontend-platform
|
||||
/public/app/features/invites/ @grafana/grafana-frontend-platform
|
||||
/public/app/features/geo/ @grafana/dataviz-squad
|
||||
/public/app/features/library-panels/ @grafana/grafana-frontend-platform
|
||||
/public/app/features/folders/ @grafana/user-essentials
|
||||
/public/app/features/inspector/ @grafana/user-essentials
|
||||
/public/app/features/invites/ @grafana/user-essentials
|
||||
/public/app/features/geo/ @grafana/grafana-edge-squad
|
||||
/public/app/features/library-panels/ @grafana/user-essentials
|
||||
/public/app/features/logs/ @grafana/observability-logs
|
||||
/public/app/features/live/ @grafana/grafana-app-platform-squad
|
||||
/public/app/features/live/ @grafana/multitenancy-squad
|
||||
/public/app/features/manage-dashboards/ @grafana/dashboards-squad
|
||||
/public/app/features/notifications/ @grafana/grafana-frontend-platform
|
||||
/public/app/features/org/ @grafana/grafana-frontend-platform
|
||||
/public/app/features/panel/ @grafana/grafana-frontend-platform
|
||||
/public/app/features/notifications/ @grafana/user-essentials
|
||||
/public/app/features/org/ @grafana/user-essentials
|
||||
/public/app/features/panel/ @grafana/user-essentials
|
||||
/public/app/features/playlist/ @grafana/dashboards-squad
|
||||
/public/app/features/plugins/ @grafana/plugins-platform-frontend
|
||||
/public/app/features/profile/ @grafana/grafana-frontend-platform
|
||||
/public/app/features/profile/ @grafana/user-essentials
|
||||
/public/app/features/runtime/ @ryantxu
|
||||
/public/app/features/query/ @grafana/dashboards-squad
|
||||
/public/app/features/sandbox/ @grafana/grafana-frontend-platform
|
||||
/public/app/features/query-library/ @grafana/grafana-edge-squad
|
||||
/public/app/features/sandbox/ @grafana/user-essentials
|
||||
/public/app/features/scenes/ @grafana/dashboards-squad
|
||||
/public/app/features/search/ @grafana/grafana-frontend-platform
|
||||
/public/app/features/search/ @grafana/user-essentials
|
||||
/public/app/features/serviceaccounts/ @grafana/grafana-authnz-team
|
||||
/public/app/features/storage/ @grafana/grafana-app-platform-squad
|
||||
/public/app/features/storage/ @grafana/multitenancy-squad
|
||||
/public/app/features/teams/ @grafana/grafana-authnz-team
|
||||
/public/app/features/templating/ @grafana/dashboards-squad
|
||||
/public/app/features/transformers/ @grafana/dataviz-squad
|
||||
/public/app/features/transformers/ @grafana/grafana-edge-squad
|
||||
/public/app/features/users/ @grafana/grafana-authnz-team
|
||||
/public/app/features/variables/ @grafana/dashboards-squad
|
||||
/public/app/plugins/panel/alertGroups/ @grafana/alerting-squad-frontend
|
||||
/public/app/plugins/panel/alertlist/ @grafana/alerting-squad-frontend
|
||||
/public/app/plugins/panel/annolist/ @grafana/grafana-frontend-platform
|
||||
/public/app/plugins/panel/barchart/ @grafana/dataviz-squad
|
||||
/public/app/plugins/panel/bargauge/ @grafana/grafana-bi-squad
|
||||
/public/app/plugins/panel/dashlist/ @grafana/grafana-frontend-platform
|
||||
/public/app/plugins/panel/annolist/ @grafana/user-essentials
|
||||
/public/app/plugins/panel/barchart/ @grafana/grafana-bi-squad
|
||||
/public/app/plugins/panel/bargauge/ @grafana/user-essentials
|
||||
/public/app/plugins/panel/dashlist/ @grafana/user-essentials
|
||||
/public/app/plugins/panel/debug/ @ryantxu
|
||||
/public/app/plugins/panel/gauge/ @grafana/grafana-bi-squad
|
||||
/public/app/plugins/panel/gettingstarted/ @grafana/grafana-frontend-platform
|
||||
/public/app/plugins/panel/graph/ @grafana/dataviz-squad
|
||||
/public/app/plugins/panel/heatmap/ @grafana/dataviz-squad
|
||||
/public/app/plugins/panel/histogram/ @grafana/dataviz-squad
|
||||
/public/app/plugins/panel/gauge/ @grafana/user-essentials
|
||||
/public/app/plugins/panel/gettingstarted/ @grafana/user-essentials
|
||||
/public/app/plugins/panel/graph/ @grafana/user-essentials
|
||||
/public/app/plugins/panel/heatmap/ @grafana/grafana-bi-squad
|
||||
/public/app/plugins/panel/histogram/ @grafana/grafana-bi-squad
|
||||
/public/app/plugins/panel/logs/ @grafana/observability-logs
|
||||
/public/app/plugins/panel/nodeGraph/ @grafana/observability-traces-and-profiling
|
||||
/public/app/plugins/panel/traces/ @grafana/observability-traces-and-profiling
|
||||
/public/app/plugins/panel/flamegraph/ @grafana/observability-traces-and-profiling
|
||||
/public/app/plugins/panel/piechart/ @grafana/grafana-bi-squad
|
||||
/public/app/plugins/panel/state-timeline/ @grafana/dataviz-squad
|
||||
/public/app/plugins/panel/status-history/ @grafana/dataviz-squad
|
||||
/public/app/plugins/panel/state-timeline/ @grafana/grafana-bi-squad
|
||||
/public/app/plugins/panel/status-history/ @grafana/grafana-bi-squad
|
||||
/public/app/plugins/panel/table/ @grafana/grafana-bi-squad
|
||||
/public/app/plugins/panel/table-old/ @grafana/grafana-bi-squad
|
||||
/public/app/plugins/panel/timeseries/ @grafana/dataviz-squad
|
||||
/public/app/plugins/panel/geomap/ @grafana/dataviz-squad
|
||||
/public/app/plugins/panel/canvas/ @grafana/dataviz-squad
|
||||
/public/app/plugins/panel/candlestick/ @grafana/dataviz-squad
|
||||
/public/app/plugins/panel/icon/ @grafana/dataviz-squad
|
||||
/public/app/plugins/panel/live/ @grafana/grafana-app-platform-squad
|
||||
/public/app/plugins/panel/news/ @grafana/grafana-frontend-platform
|
||||
/public/app/plugins/panel/stat/ @grafana/grafana-bi-squad
|
||||
/public/app/plugins/panel/text/ @grafana/grafana-frontend-platform
|
||||
/public/app/plugins/panel/welcome/ @grafana/grafana-frontend-platform
|
||||
/public/app/plugins/panel/xychart/ @grafana/dataviz-squad
|
||||
/public/app/plugins/panel/timeseries/ @grafana/grafana-bi-squad
|
||||
/public/app/plugins/panel/geomap/ @grafana/grafana-edge-squad
|
||||
/public/app/plugins/panel/canvas/ @grafana/grafana-edge-squad
|
||||
/public/app/plugins/panel/candlestick/ @grafana/grafana-edge-squad
|
||||
/public/app/plugins/panel/icon/ @grafana/grafana-edge-squad
|
||||
/public/app/plugins/panel/live/ @grafana/multitenancy-squad
|
||||
/public/app/plugins/panel/news/ @grafana/user-essentials
|
||||
/public/app/plugins/panel/stat/ @grafana/user-essentials
|
||||
/public/app/plugins/panel/text/ @grafana/user-essentials
|
||||
/public/app/plugins/panel/welcome/ @grafana/user-essentials
|
||||
/public/app/plugins/panel/xychart/ @grafana/grafana-bi-squad
|
||||
/public/app/plugins/sdk.ts @grafana/plugins-platform-frontend
|
||||
/public/app/polyfills/old-mediaquerylist.ts @grafana/grafana-frontend-platform
|
||||
/public/app/routes/ @grafana/grafana-frontend-platform
|
||||
/public/app/store/ @grafana/grafana-frontend-platform
|
||||
/public/app/types/ @grafana/grafana-frontend-platform
|
||||
/public/app/polyfills/old-mediaquerylist.ts @grafana/user-essentials
|
||||
/public/app/routes/ @grafana/user-essentials
|
||||
/public/app/store/ @grafana/user-essentials
|
||||
/public/app/types/ @grafana/user-essentials
|
||||
/public/dashboards/ @grafana/dashboards-squad
|
||||
/public/fonts/ @grafana/alerting-squad-frontend
|
||||
/public/emails/ @grafana/grafana-frontend-platform
|
||||
/public/emails/ @grafana/user-essentials
|
||||
/public/gazetteer/ @ryantxu
|
||||
/public/img/ @grafana/grafana-frontend-platform
|
||||
/public/lib/ @grafana/grafana-frontend-platform
|
||||
/public/img/ @grafana/user-essentials
|
||||
/public/lib/ @grafana/user-essentials
|
||||
/public/maps/ @ryantxu
|
||||
/public/robots.txt @grafana/frontend-ops
|
||||
/public/sass/ @grafana/grafana-frontend-platform
|
||||
/public/test/ @grafana/grafana-frontend-platform
|
||||
/public/testdata/ @grafana/grafana-frontend-platform
|
||||
/public/views/ @grafana/grafana-frontend-platform
|
||||
/public/sass/ @grafana/user-essentials
|
||||
/public/test/ @grafana/user-essentials
|
||||
/public/testdata/ @grafana/user-essentials
|
||||
/public/views/ @grafana/user-essentials
|
||||
|
||||
/public/app/features/explore/Logs.tsx @grafana/observability-logs
|
||||
/public/app/features/explore/LogsContainer.tsx @grafana/observability-logs
|
||||
@@ -441,43 +438,44 @@ lerna.json @grafana/frontend-ops
|
||||
/public/app/features/explore/TraceView/ @grafana/observability-traces-and-profiling
|
||||
|
||||
/public/api-merged.json @grafana/backend-platform
|
||||
/public/api-spec.json @grafana/backend-platform
|
||||
/public/openapi3.json @grafana/backend-platform
|
||||
/public/app/angular/ @torkelo
|
||||
/public/app/app.ts @grafana/frontend-ops
|
||||
/public/app/dev.ts @grafana/frontend-ops
|
||||
/public/app/index.ts @grafana/frontend-ops
|
||||
/public/app/AppWrapper.tsx @grafana/frontend-ops
|
||||
/public/app/partials/ @grafana/grafana-frontend-platform
|
||||
/public/app/partials/ @grafana/user-essentials
|
||||
|
||||
|
||||
|
||||
|
||||
/scripts/benchmark-access-control.sh @grafana/grafana-authnz-team
|
||||
/scripts/check-breaking-changes.sh @grafana/plugins-platform-frontend
|
||||
/scripts/ci-* @grafana/grafana-delivery
|
||||
/scripts/circle-* @grafana/grafana-delivery
|
||||
/scripts/ci-frontend-metrics.sh @grafana/grafana-frontend-platform @grafana/plugins-platform-frontend @grafana/grafana-bi-squad
|
||||
/scripts/cli/ @grafana/grafana-frontend-platform
|
||||
/scripts/ci-* @grafana/grafana-release-eng
|
||||
/scripts/circle-* @grafana/grafana-release-eng
|
||||
/scripts/ci-frontend-metrics.sh @grafana/user-essentials @grafana/plugins-platform-frontend @grafana/grafana-bi-squad
|
||||
/scripts/cli/ @grafana/user-essentials
|
||||
/scripts/clean-git-or-error.sh @grafana/grafana-as-code
|
||||
/scripts/grafana-server/ @grafana/grafana-frontend-platform
|
||||
/scripts/helpers/ @grafana/grafana-delivery
|
||||
/scripts/grafana-server/ @grafana/user-essentials
|
||||
/scripts/helpers/ @grafana/grafana-release-eng
|
||||
/scripts/import_many_dashboards.sh @torkelo
|
||||
/scripts/mixin-check.sh @bergquist
|
||||
/scripts/openapi3/ @grafana/grafana-operator-experience-squad
|
||||
/scripts/openapi3/ @grafana/grafana-partnerships-team
|
||||
/scripts/prepare-packagejson.js @grafana/frontend-ops
|
||||
/scripts/protobuf-check.sh @grafana/plugins-platform-backend
|
||||
/scripts/stripnulls.sh @grafana/grafana-as-code
|
||||
/scripts/tag_release.sh @grafana/grafana-delivery
|
||||
/scripts/trigger_docker_build.sh @grafana/grafana-delivery
|
||||
/scripts/trigger_grafana_packer.sh @grafana/grafana-delivery
|
||||
/scripts/trigger_windows_build.sh @grafana/grafana-delivery
|
||||
/scripts/validate-devenv-dashboards.sh @grafana/grafana-delivery
|
||||
/scripts/verify-repo-update/ @grafana/grafana-delivery
|
||||
/scripts/tag_release.sh @grafana/grafana-release-eng
|
||||
/scripts/trigger_docker_build.sh @grafana/grafana-release-eng
|
||||
/scripts/trigger_grafana_packer.sh @grafana/grafana-release-eng
|
||||
/scripts/trigger_windows_build.sh @grafana/grafana-release-eng
|
||||
/scripts/validate-devenv-dashboards.sh @grafana/grafana-release-eng
|
||||
/scripts/verify-repo-update/ @grafana/grafana-release-eng
|
||||
|
||||
/scripts/webpack/ @grafana/frontend-ops
|
||||
/scripts/generate-a11y-report.sh @grafana/grafana-frontend-platform
|
||||
.pa11yci.conf.js @grafana/grafana-frontend-platform
|
||||
.pa11yci-pr.conf.js @grafana/grafana-frontend-platform
|
||||
/scripts/generate-a11y-report.sh @grafana/user-essentials
|
||||
.pa11yci.conf.js @grafana/user-essentials
|
||||
.pa11yci-pr.conf.js @grafana/user-essentials
|
||||
.betterer.results @joshhunt
|
||||
.betterer.ts @joshhunt
|
||||
|
||||
@@ -489,11 +487,11 @@ lerna.json @grafana/frontend-ops
|
||||
|
||||
# Core datasources
|
||||
/public/app/plugins/datasource/dashboard/ @grafana/dashboards-squad
|
||||
/public/app/plugins/datasource/cloudwatch/ @grafana/aws-datasources
|
||||
/public/app/plugins/datasource/cloudwatch/ @grafana/aws-plugins
|
||||
/public/app/plugins/datasource/elasticsearch/ @grafana/observability-logs
|
||||
/public/app/plugins/datasource/grafana/ @grafana/grafana-frontend-platform
|
||||
/public/app/plugins/datasource/grafana/ @grafana/user-essentials
|
||||
/public/app/plugins/datasource/testdata/ @grafana/plugins-platform-frontend
|
||||
/public/app/plugins/datasource/azuremonitor/ @grafana/partner-plugins
|
||||
/public/app/plugins/datasource/grafana-azure-monitor-datasource/ @grafana/partner-plugins
|
||||
/public/app/plugins/datasource/graphite/ @grafana/observability-metrics
|
||||
/public/app/plugins/datasource/influxdb/ @grafana/observability-metrics
|
||||
/public/app/plugins/datasource/jaeger/ @grafana/observability-traces-and-profiling
|
||||
@@ -520,26 +518,26 @@ lerna.json @grafana/frontend-ops
|
||||
# Grafana authentication and authorization
|
||||
/pkg/login/ @grafana/grafana-authnz-team
|
||||
/pkg/services/accesscontrol/ @grafana/grafana-authnz-team
|
||||
/pkg/services/anonymous/ @grafana/grafana-authnz-team
|
||||
/pkg/services/auth/ @grafana/grafana-authnz-team
|
||||
/pkg/services/authn/ @grafana/grafana-authnz-team
|
||||
/pkg/services/dashboards/accesscontrol.go @grafana/grafana-authnz-team
|
||||
/pkg/services/datasources/permissions/ @grafana/grafana-authnz-team
|
||||
/pkg/services/guardian/ @grafana/grafana-authnz-team
|
||||
/pkg/services/ldap/ @grafana/grafana-authnz-team
|
||||
/pkg/services/login/ @grafana/grafana-authnz-team
|
||||
/pkg/services/loginattempt/ @grafana/grafana-authnz-team
|
||||
/pkg/services/multildap/ @grafana/grafana-authnz-team
|
||||
/pkg/services/oauthtoken/ @grafana/grafana-authnz-team
|
||||
/pkg/services/serviceaccounts/ @grafana/grafana-authnz-team
|
||||
/pkg/services/teamguardian/ @grafana/grafana-authnz-team
|
||||
/pkg/services/serviceaccounts/ @grafana/grafana-authnz-team
|
||||
/pkg/services/loginattempt/ @grafana/grafana-authnz-team
|
||||
/pkg/services/authn/ @grafana/grafana-authnz-team
|
||||
|
||||
# Support bundles
|
||||
/public/app/features/support-bundles/ @grafana/grafana-authnz-team
|
||||
/pkg/services/supportbundles/ @grafana/grafana-authnz-team
|
||||
|
||||
# Grafana Operator Experience Team
|
||||
/pkg/infra/httpclient/httpclientprovider/sigv4_middleware.go @grafana/grafana-operator-experience-squad
|
||||
/pkg/infra/httpclient/httpclientprovider/sigv4_middleware_test.go @grafana/grafana-operator-experience-squad
|
||||
# Grafana Partnerships Team
|
||||
/pkg/infra/httpclient/httpclientprovider/sigv4_middleware.go @grafana/grafana-partnerships-team
|
||||
/pkg/infra/httpclient/httpclientprovider/sigv4_middleware_test.go @grafana/grafana-partnerships-team
|
||||
|
||||
# Kind definitions
|
||||
/kinds/dashboard @grafana/dashboards-squad
|
||||
@@ -551,6 +549,8 @@ embed.go @grafana/grafana-as-code
|
||||
/pkg/cuectx/ @grafana/grafana-as-code
|
||||
/pkg/registry/ @grafana/grafana-as-code
|
||||
/pkg/codegen/ @grafana/grafana-as-code
|
||||
/pkg/kindsys/ @grafana/grafana-as-code
|
||||
/pkg/kindsys/kindcat_custom.cue @grafana/apps-platform-core
|
||||
/pkg/kinds/*/*_gen.go @grafana/grafana-as-code
|
||||
/pkg/registry/corekind/ @grafana/grafana-as-code
|
||||
/public/app/plugins/*gen.go @grafana/grafana-as-code
|
||||
@@ -563,25 +563,24 @@ embed.go @grafana/grafana-as-code
|
||||
/.github/bot.md @torkelo
|
||||
/.github/commands.json @torkelo
|
||||
/.github/dependabot.yml @grafana/frontend-ops
|
||||
/.github/issue-opened.json @grafana/grafana-community-support
|
||||
/.github/metrics-collector.json @torkelo
|
||||
/.github/pr-checks.json @marefr
|
||||
/.github/pr-commands.json @marefr
|
||||
/.github/renovate.json5 @grafana/frontend-ops
|
||||
/.github/teams.yml @armandgrillet
|
||||
/.github/workflows/backport.yml @grafana/grafana-delivery
|
||||
/.github/workflows/bump-version.yml @grafana/grafana-delivery
|
||||
/.github/workflows/close-milestone.yml @grafana/grafana-delivery
|
||||
/.github/workflows/cloud-data-sources-code-coverage.yml @grafana/partner-plugins @grafana/aws-datasources
|
||||
/.github/workflows/backport.yml @grafana/grafana-release-eng
|
||||
/.github/workflows/bump-version.yml @grafana/grafana-release-eng
|
||||
/.github/workflows/close-milestone.yml @grafana/grafana-release-eng
|
||||
/.github/workflows/cloud-data-sources-code-coverage.yml @grafana/partner-plugins @grafana/aws-plugins
|
||||
/.github/workflows/codeowners-validator.yml @tolzhabayev
|
||||
/.github/workflows/codeql-analysis.yml @DanCech
|
||||
/.github/workflows/commands.yml @torkelo
|
||||
/.github/workflows/detect-breaking-changes-* @grafana/plugins-platform-frontend
|
||||
/.github/workflows/doc-validator.yml @grafana/docs-grafana
|
||||
/.github/workflows/enterprise-pr-check.yml @grafana/grafana-release-eng
|
||||
/.github/workflows/epic-add-to-platform-ux-parent-project.yml @meanmina
|
||||
/.github/workflows/github-release.yml @torkelo
|
||||
/.github/workflows/issue-labeled.yml @armandgrillet
|
||||
/.github/workflows/issue-opened.yml @grafana/grafana-community-support
|
||||
/.github/workflows/metrics-collector.yml @torkelo
|
||||
/.github/workflows/milestone.yml @marefr
|
||||
/.github/workflows/ox-code-coverage.yml @grafana/explore-squad
|
||||
@@ -593,13 +592,12 @@ embed.go @grafana/grafana-as-code
|
||||
/.github/workflows/pr-commands.yml @marefr
|
||||
/.github/workflows/publish-technical-documentation-next.yml @grafana/docs-grafana
|
||||
/.github/workflows/publish-technical-documentation-release.yml @grafana/docs-grafana
|
||||
/.github/workflows/remove-milestone.yml @grafana/grafana-frontend-platform
|
||||
/.github/workflows/remove-milestone.yml @grafana/user-essentials
|
||||
/.github/workflows/sbom-report.yml @grafana/security-team
|
||||
/.github/workflows/scripts/json-file-to-job-output.js @grafana/plugins-platform-frontend
|
||||
/.github/workflows/scripts/pr-get-job-link.js @grafana/plugins-platform-frontend
|
||||
/.github/workflows/stale.yml @grafana/grafana-frontend-platform
|
||||
/.github/workflows/update-changelog.yml @grafana/grafana-delivery
|
||||
/.github/workflows/snyk.yml @grafana/security-team
|
||||
/.github/workflows/stale.yml @grafana/user-essentials
|
||||
/.github/workflows/update-changelog.yml @grafana/grafana-release-eng
|
||||
|
||||
|
||||
# Conf
|
||||
|
||||
17
.github/ISSUE_TEMPLATE/5-chore.md
vendored
17
.github/ISSUE_TEMPLATE/5-chore.md
vendored
@@ -1,17 +0,0 @@
|
||||
---
|
||||
name: Chore
|
||||
about: Create an issue for a chore needing completion
|
||||
labels: 'type: chore'
|
||||
---
|
||||
|
||||
<!--
|
||||
Please use this template to create your chore issue. You can use this template if you spot an out-of-date README, discover a misspelling, or happen upon a deeply nested 7-layer for-loop that could be better handled another way. Please use this template for your non-bug related fixes/updates/refactors.
|
||||
|
||||
- Questions should be posted to: https://community.grafana.com
|
||||
- Use query inspector to troubleshoot issues: https://bit.ly/2XNF6YS
|
||||
- How to record and attach gif: https://bit.ly/2Mi8T6K
|
||||
-->
|
||||
|
||||
**What is the chore?**:
|
||||
|
||||
**Is there anything else we need to know?**:
|
||||
2
.github/ISSUE_TEMPLATE/config.yml
vendored
2
.github/ISSUE_TEMPLATE/config.yml
vendored
@@ -2,7 +2,7 @@ blank_issues_enabled: false
|
||||
contact_links:
|
||||
- name: Feature Request
|
||||
url: https://github.com/grafana/grafana/discussions/new
|
||||
about: Discuss ideas for new features or enhancements
|
||||
about: Discuss ideas for new features of changes
|
||||
- name: Questions & Help
|
||||
url: https://community.grafana.com
|
||||
about: Please ask and answer questions here.
|
||||
|
||||
6
.github/PULL_REQUEST_TEMPLATE.md
vendored
6
.github/PULL_REQUEST_TEMPLATE.md
vendored
@@ -42,9 +42,5 @@ Usage: "Fixes #<issue number>", or "Fixes (paste link of issue)"
|
||||
|
||||
Fixes #
|
||||
|
||||
**Special notes for your reviewer:**
|
||||
**Special notes for your reviewer**:
|
||||
|
||||
Please check that:
|
||||
- [ ] It works as expected from a user's perspective.
|
||||
- [ ] If this is a pre-GA feature, it is behind a feature toggle.
|
||||
- [ ] The docs are updated, and if this is a [notable improvement](https://grafana.com/docs/writers-toolkit/writing-guide/contribute-release-notes/#how-to-determine-if-content-belongs-in-a-whats-new-document), it's added to our [What's New](https://grafana.com/docs/writers-toolkit/writing-guide/contribute-release-notes/) doc.
|
||||
|
||||
6
.github/commands.json
vendored
6
.github/commands.json
vendored
@@ -11,7 +11,7 @@
|
||||
"type":"comment",
|
||||
"name":"duplicate",
|
||||
"allowUsers":[],
|
||||
"action":"close",
|
||||
"action":"updateLabels",
|
||||
"addLabel":"type/duplicate"
|
||||
},
|
||||
{
|
||||
@@ -221,10 +221,10 @@
|
||||
},
|
||||
{
|
||||
"type": "label",
|
||||
"name": "team/operator-experience",
|
||||
"name": "team/grafana-partners",
|
||||
"action": "addToProject",
|
||||
"addToProject": {
|
||||
"url": "https://github.com/orgs/grafana/projects/336"
|
||||
"url": "https://github.com/orgs/grafana/projects/87"
|
||||
}
|
||||
},
|
||||
{
|
||||
|
||||
9
.github/issue-opened.json
vendored
9
.github/issue-opened.json
vendored
@@ -1,9 +0,0 @@
|
||||
[
|
||||
{
|
||||
"type": "author",
|
||||
"memberOf": { "org": "grafana" },
|
||||
"noLabels": true,
|
||||
"addLabel": "internal",
|
||||
"comment": " please add one or more appropriate labels. Here are some tips:\r\n\r\n- if you are making an issue, TODO, or reminder for yourself or your team, please add one label that best describes the product or feature area. Please also add the issue to your project board. :rocket:\r\n\r\n- if you are making an issue for any other reason (docs typo, you found a bug, etc), please add at least one label that best describes the product or feature that you are discussing (e.g. `area/alerting`, `datasource/loki`, `type/docs`, `type/bug`, etc). [Our issue triage](https://github.com/grafana/grafana/blob/main/ISSUE_TRIAGE.md#3-categorizing-an-issue) doc also provides additional guidance on labeling. :rocket:\r\n\r\n Thank you! :heart:"
|
||||
}
|
||||
]
|
||||
12
.github/metrics-collector.json
vendored
12
.github/metrics-collector.json
vendored
@@ -2,23 +2,23 @@
|
||||
"queries": [
|
||||
{
|
||||
"name": "type_bug",
|
||||
"query": "label:\"type/bug\" is:issue is:open"
|
||||
"query": "label:\"type/bug\" is:open"
|
||||
},
|
||||
{
|
||||
"name": "type_docs",
|
||||
"query": "label:\"type/docs\" is:issue is:open"
|
||||
"query": "label:\"type/docs\" is:open"
|
||||
},
|
||||
{
|
||||
"name": "needs_investigation",
|
||||
"query": "label:\"needs investigation\" is:issue is:open"
|
||||
"query": "label:\"needs investigation\" is:open"
|
||||
},
|
||||
{
|
||||
"name": "needs_more_info",
|
||||
"query": "label:\"needs more info\" is:issue is:open"
|
||||
"query": "label:\"needs more info\" is:open"
|
||||
},
|
||||
{
|
||||
"name": "triage_needs_confirmation",
|
||||
"query": "label:\"triage/needs-confirmation\" is:issue is:open"
|
||||
"query": "label:\"triage/needs-confirmation\" is:open"
|
||||
},
|
||||
{
|
||||
"name": "unlabeled",
|
||||
@@ -26,7 +26,7 @@
|
||||
},
|
||||
{
|
||||
"name": "open_prs",
|
||||
"query": "is:open is:pull-request"
|
||||
"query": "is:open is:pr"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
10
.github/pr-commands.json
vendored
10
.github/pr-commands.json
vendored
@@ -83,7 +83,7 @@
|
||||
},
|
||||
{
|
||||
"type": "changedfiles",
|
||||
"matches": [ "public/app/plugins/datasource/azuremonitor/**/*", "pkg/tsdb/azuremonitor/**/*"],
|
||||
"matches": [ "public/app/plugins/datasource/grafana-azure-monitor-datasource/**/*", "pkg/tsdb/azuremonitor/**/*"],
|
||||
"action": "updateLabel",
|
||||
"addLabel": "datasource/Azure"
|
||||
},
|
||||
@@ -190,13 +190,5 @@
|
||||
"ignoreList": ["renovate[bot]","dependabot[bot]"],
|
||||
"action": "updateLabel",
|
||||
"addLabel": "pr/external"
|
||||
},
|
||||
{
|
||||
"type":"label",
|
||||
"name":"type/docs",
|
||||
"action":"addToProject",
|
||||
"addToProject":{
|
||||
"url":"https://github.com/orgs/grafana/projects/69"
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
13
.github/renovate.json5
vendored
13
.github/renovate.json5
vendored
@@ -10,10 +10,12 @@
|
||||
"history", // we should bump this together with react-router-dom
|
||||
"@mdx-js/react", // storybook peer-depends on its 1.x version, we should upgrade this when we upgrade storybook
|
||||
"monaco-editor", // due to us exposing this via @grafana/ui/CodeEditor's props bumping can break plugins
|
||||
"node-fetch", // we should bump this once we move to esm modules
|
||||
"react-hook-form", // due to us exposing these hooks via @grafana/ui form components bumping can break plugins
|
||||
"react-redux", // react-beautiful-dnd depends on react-redux 7.x, we need to update that one first
|
||||
"react-router-dom", // we should bump this together with history
|
||||
"systemjs",
|
||||
"copy-webpack-plugin", // try to upgrade with newer yarn release. Not working with 3.1.1
|
||||
"ts-loader", // we should remove ts-loader and use babel-loader instead
|
||||
"ora", // we should bump this once we move to esm modules
|
||||
|
||||
@@ -24,7 +26,6 @@
|
||||
"@sentry/utils",
|
||||
|
||||
// dep updates blocked by React 18
|
||||
"@testing-library/dom",
|
||||
"@testing-library/react",
|
||||
"@types/react",
|
||||
"@types/react-dom",
|
||||
@@ -83,15 +84,7 @@
|
||||
"matchPackagePrefixes": [
|
||||
"@visx/"
|
||||
]
|
||||
},
|
||||
{
|
||||
"groupName": "uLibraries",
|
||||
"matchPackageNames": [
|
||||
"@leeoniya/ufuzzy",
|
||||
"uplot"
|
||||
],
|
||||
"reviewers": ["leeoniya"],
|
||||
},
|
||||
}
|
||||
],
|
||||
"pin": {
|
||||
"enabled": false
|
||||
|
||||
@@ -5,7 +5,7 @@ on:
|
||||
- 'pkg/tsdb/azuremonitor/**'
|
||||
- 'pkg/tsdb/cloudwatch/**'
|
||||
- 'pkg/tsdb/cloudmonitoring/**'
|
||||
- 'public/app/plugins/datasource/azuremonitor/**'
|
||||
- 'public/app/plugins/datasource/grafana-azure-monitor-datasource/**'
|
||||
- 'public/app/plugins/datasource/cloudwatch/**'
|
||||
- 'public/app/plugins/datasource/cloud-monitoring/**'
|
||||
branches-ignore:
|
||||
@@ -14,7 +14,7 @@ on:
|
||||
|
||||
jobs:
|
||||
workflow-call:
|
||||
uses: grafana/code-coverage/.github/workflows/code-coverage.yml@v0.1.18
|
||||
uses: grafana/code-coverage/.github/workflows/code-coverage.yml@v0.1.17
|
||||
with:
|
||||
frontend-path-regexp: public\/app\/plugins\/datasource\/(azuremonitor|cloud-monitoring|cloudwatch)
|
||||
frontend-path-regexp: public\/app\/plugins\/datasource\/(grafana-azure-monitor-datasource|cloud-monitoring|cloudwatch)
|
||||
backend-path-regexp: pkg\/tsdb\/(azuremonitor|cloudmonitoring|cloudwatch)
|
||||
|
||||
2
.github/workflows/commands.yml
vendored
2
.github/workflows/commands.yml
vendored
@@ -22,5 +22,5 @@ jobs:
|
||||
uses: ./actions/commands
|
||||
with:
|
||||
metricsWriteAPIKey: ${{secrets.GRAFANA_MISC_STATS_API_KEY}}
|
||||
token: ${{secrets.ISSUE_COMMANDS_TOKEN}}
|
||||
token: ${{secrets.GH_BOT_ACCESS_TOKEN}}
|
||||
configPath: commands
|
||||
|
||||
@@ -31,7 +31,7 @@ jobs:
|
||||
run: echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Restore yarn cache
|
||||
uses: actions/cache@v3.3.1
|
||||
uses: actions/cache@v3.0.11
|
||||
id: yarn-cache
|
||||
with:
|
||||
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
|
||||
@@ -79,7 +79,7 @@ jobs:
|
||||
run: echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Restore yarn cache
|
||||
uses: actions/cache@v3.3.1
|
||||
uses: actions/cache@v3.0.11
|
||||
id: yarn-cache
|
||||
with:
|
||||
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
|
||||
|
||||
26
.github/workflows/enterprise-pr-check.yml
vendored
Normal file
26
.github/workflows/enterprise-pr-check.yml
vendored
Normal file
@@ -0,0 +1,26 @@
|
||||
name: Enterprise PR check
|
||||
on:
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
- 'v[0-9]+.[0-9]+.x'
|
||||
jobs:
|
||||
dispatch:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout Actions
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
repository: "grafana/grafana-github-actions"
|
||||
path: ./actions
|
||||
ref: main
|
||||
- name: Install Actions
|
||||
run: npm install --production --prefix ./actions
|
||||
- name: Repository Dispatch
|
||||
uses: ./actions/repository-dispatch
|
||||
with:
|
||||
token: ${{ secrets.GH_BOT_ACCESS_TOKEN }}
|
||||
repository: grafana/grafana-enterprise
|
||||
event_type: oss-pull-request
|
||||
client_payload:
|
||||
'{"source_sha": "${{ github.event.pull_request.head.sha }}", "source_branch": "${{ github.head_ref }}", "target_branch": "${{ github.base_ref }}", "pr_number": "${{ github.event.number }}"}'
|
||||
@@ -19,7 +19,6 @@ concurrency:
|
||||
group: issue-add-to-parent-project-${{ github.event.number }}
|
||||
jobs:
|
||||
main:
|
||||
if: contains(github.event.issue.labels.*.name, 'type/epic')
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Check if issue is in child or parent projects
|
||||
|
||||
2
.github/workflows/issue-labeled.yml
vendored
2
.github/workflows/issue-labeled.yml
vendored
@@ -39,7 +39,7 @@ jobs:
|
||||
|
||||
- name: "Add to GitHub board"
|
||||
if: ${{ env.BOARD != 'null' }}
|
||||
uses: leonsteinhaeuser/project-beta-automations@v2.1.0
|
||||
uses: leonsteinhaeuser/project-beta-automations@v1.3.0
|
||||
with:
|
||||
project_id: ${{ env.BOARD }}
|
||||
organization: grafana
|
||||
|
||||
28
.github/workflows/issue-opened.yml
vendored
28
.github/workflows/issue-opened.yml
vendored
@@ -1,28 +0,0 @@
|
||||
name: Run commands when issues are opened
|
||||
on:
|
||||
issues:
|
||||
types: [opened]
|
||||
concurrency:
|
||||
group: issue-opened-${{ github.event.issue.number }}
|
||||
jobs:
|
||||
main:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout Actions
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
repository: "grafana/grafana-github-actions"
|
||||
path: ./actions
|
||||
ref: main
|
||||
- name: Install Actions
|
||||
run: npm install --production --prefix ./actions
|
||||
# give issue-openers a chance to add labels after submit
|
||||
- name: Sleep for 2 minutes
|
||||
run: sleep 2m
|
||||
shell: bash
|
||||
- name: Run Commands
|
||||
uses: ./actions/commands
|
||||
with:
|
||||
metricsWriteAPIKey: ${{secrets.GRAFANA_MISC_STATS_API_KEY}}
|
||||
token: ${{secrets.ISSUE_COMMANDS_TOKEN}}
|
||||
configPath: "issue-opened"
|
||||
2
.github/workflows/ox-code-coverage.yml
vendored
2
.github/workflows/ox-code-coverage.yml
vendored
@@ -15,7 +15,7 @@ on:
|
||||
|
||||
jobs:
|
||||
workflow-call:
|
||||
uses: grafana/code-coverage/.github/workflows/code-coverage.yml@v0.1.18
|
||||
uses: grafana/code-coverage/.github/workflows/code-coverage.yml@v0.1.17
|
||||
with:
|
||||
frontend-path-regexp: public\/app\/features\/(explore|correlations)|public\/app\/plugins\/datasource\/(loki|elasticsearch)
|
||||
backend-path-regexp: pkg\/services\/(queryhistory)|pkg\/tsdb\/(loki|elasticsearch)
|
||||
|
||||
1
.github/workflows/pr-commands.yml
vendored
1
.github/workflows/pr-commands.yml
vendored
@@ -2,7 +2,6 @@ name: PR automation
|
||||
on:
|
||||
pull_request_target:
|
||||
types:
|
||||
- labeled
|
||||
- opened
|
||||
- synchronize
|
||||
concurrency:
|
||||
|
||||
@@ -16,11 +16,9 @@ jobs:
|
||||
uses: "actions/checkout@v3"
|
||||
|
||||
- name: "Clone website-sync Action"
|
||||
# WEBSITE_SYNC_TOKEN is a fine-grained GitHub Personal Access Token that expires.
|
||||
# It must be regenerated in the grafanabot GitHub account and requires a Grafana organization
|
||||
# GitHub administrator to update the organization secret.
|
||||
# The IT helpdesk can update the organization secret.
|
||||
run: "git clone --single-branch --no-tags --depth 1 -b master https://grafanabot:${{ secrets.WEBSITE_SYNC_TOKEN }}@github.com/grafana/website-sync ./.github/actions/website-sync"
|
||||
# WEBSITE_SYNC_GRAFANA is a fine-grained GitHub Personal Access Token that expires.
|
||||
# It must be updated in the grafanabot GitHub account.
|
||||
run: "git clone --single-branch --no-tags --depth 1 -b master https://grafanabot:${{ secrets.WEBSITE_SYNC_GRAFANA }}@github.com/grafana/website-sync ./.github/actions/website-sync"
|
||||
|
||||
- name: "Publish to website repository (next)"
|
||||
uses: "./.github/actions/website-sync"
|
||||
@@ -29,10 +27,8 @@ jobs:
|
||||
repository: "grafana/website"
|
||||
branch: "master"
|
||||
host: "github.com"
|
||||
# PUBLISH_TO_WEBSITE_TOKEN is a fine-grained GitHub Personal Access Token that expires.
|
||||
# It must be regenerated in the grafanabot GitHub account and requires a Grafana organization
|
||||
# GitHub administrator to update the organization secret.
|
||||
# The IT helpdesk can update the organization secret.
|
||||
github_pat: "grafanabot:${{ secrets.PUBLISH_TO_WEBSITE_TOKEN }}"
|
||||
# PUBLISH_TO_WEBSITE_GRAFANA is a fine-grained GitHub Personal Access Token that expires.
|
||||
# It must be updated in the grafanabot GitHub account.
|
||||
github_pat: "grafanabot:${{ secrets.PUBLISH_TO_WEBSITE_GRAFANA }}"
|
||||
source_folder: "docs/sources"
|
||||
target_folder: "content/docs/grafana/next"
|
||||
|
||||
@@ -45,11 +45,9 @@ jobs:
|
||||
|
||||
- name: "Clone website-sync Action"
|
||||
if: "steps.has-matching-release-tag.outputs.bool == 'true'"
|
||||
# WEBSITE_SYNC_TOKEN is a fine-grained GitHub Personal Access Token that expires.
|
||||
# It must be regenerated in the grafanabot GitHub account and requires a Grafana organization
|
||||
# GitHub administrator to update the organization secret.
|
||||
# The IT helpdesk can update the organization secret.
|
||||
run: "git clone --single-branch --no-tags --depth 1 -b master https://grafanabot:${{ secrets.WEBSITE_SYNC_TOKEN }}@github.com/grafana/website-sync ./.github/actions/website-sync"
|
||||
# WEBSITE_SYNC_GRAFANA is a fine-grained GitHub Personal Access Token that expires.
|
||||
# It must be updated in the grafanabot GitHub account.
|
||||
run: "git clone --single-branch --no-tags --depth 1 -b master https://grafanabot:${{ secrets.WEBSITE_SYNC_GRAFANA }}@github.com/grafana/website-sync ./.github/actions/website-sync"
|
||||
|
||||
- name: "Publish to website repository (release)"
|
||||
if: "steps.has-matching-release-tag.outputs.bool == 'true'"
|
||||
@@ -59,10 +57,8 @@ jobs:
|
||||
repository: "grafana/website"
|
||||
branch: "master"
|
||||
host: "github.com"
|
||||
# PUBLISH_TO_WEBSITE_TOKEN is a fine-grained GitHub Personal Access Token that expires.
|
||||
# It must be regenerated in the grafanabot GitHub account and requires a Grafana organization
|
||||
# GitHub administrator to update the organization secret.
|
||||
# The IT helpdesk can update the organization secret.
|
||||
github_pat: "grafanabot:${{ secrets.PUBLISH_TO_WEBSITE_TOKEN }}"
|
||||
# PUBLISH_TO_WEBSITE_GRAFANA is a fine-grained GitHub Personal Access Token that expires.
|
||||
# It must be updated in the grafanabot GitHub account.
|
||||
github_pat: "grafanabot:${{ secrets.PUBLISH_TO_WEBSITE_GRAFANA }}"
|
||||
source_folder: "docs/sources"
|
||||
target_folder: "content/docs/grafana/${{ steps.target.outputs.target }}"
|
||||
|
||||
14
.github/workflows/snyk.yml
vendored
14
.github/workflows/snyk.yml
vendored
@@ -1,14 +0,0 @@
|
||||
name: Snyk Monitor Scanning
|
||||
on:
|
||||
release:
|
||||
types: [published]
|
||||
push:
|
||||
branches:
|
||||
- 'main'
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
snyk-scan-ci:
|
||||
uses: 'grafana/security-github-actions/.github/workflows/snyk_monitor.yml@main'
|
||||
secrets:
|
||||
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
|
||||
1
.github/workflows/update-changelog.yml
vendored
1
.github/workflows/update-changelog.yml
vendored
@@ -22,4 +22,3 @@ jobs:
|
||||
with:
|
||||
token: ${{ secrets.GH_BOT_ACCESS_TOKEN }}
|
||||
metricsWriteAPIKey: ${{ secrets.GRAFANA_MISC_STATS_API_KEY }}
|
||||
grafanabotForumKey: ${{ secrets.GRAFANABOT_FORUM_KEY }}
|
||||
|
||||
7
.gitignore
vendored
7
.gitignore
vendored
@@ -79,8 +79,6 @@ public/css/*.min.css
|
||||
/devenv/docker-compose.override.yaml
|
||||
/devenv/.env
|
||||
/devenv/docker/blocks/tempo/tempo-data/
|
||||
/devenv/docker/ha-test-unified-alerting/logs/webhook/dumps/
|
||||
/devenv/docker/ha-test-unified-alerting/logs/webhook/webhook-listener.log
|
||||
|
||||
conf/custom.ini
|
||||
/conf/provisioning/**/custom.yaml
|
||||
@@ -96,8 +94,6 @@ profile.cov
|
||||
/pkg/cmd/grafana-server/grafana-server
|
||||
/pkg/cmd/grafana-server/debug
|
||||
/pkg/extensions/*
|
||||
/pkg/build/cmd/artifactspage.go
|
||||
/pkg/build/cmd/artifactspage.tmpl.html
|
||||
/pkg/server/wireexts_enterprise.go
|
||||
/pkg/cmd/grafana-cli/runner/wireexts_enterprise.go
|
||||
!/pkg/extensions/main.go
|
||||
@@ -185,9 +181,6 @@ public/locales/_build/
|
||||
public/locales/*/*.js
|
||||
public/locales/*/grafana_old.json
|
||||
|
||||
# Auto-generated swagger intermediate file
|
||||
public/api-spec.json
|
||||
|
||||
deployment_tools_config.json
|
||||
|
||||
.betterer.cache
|
||||
|
||||
@@ -20,9 +20,6 @@ packages = ["io/ioutil"]
|
||||
[[linters-settings.depguard.packages-with-error-message]]
|
||||
"io/ioutil" = "Deprecated: As of Go 1.16, the same functionality is now provided by package io or package os, and those implementations should be preferred in new code. See the specific function documentation for details."
|
||||
"gopkg.in/yaml.v2" = "Grafana packages are not allowed to depend on gopkg.in/yaml.v2 as gopkg.in/yaml.v3 is now available"
|
||||
"github.com/pkg/errors" = "Deprecated: Go 1.13 supports the functionality provided by pkg/errors in the standard library."
|
||||
"github.com/xorcare/pointer" = "Use pkg/util.Pointer instead, which is a generic one-liner alternative"
|
||||
"github.com/gofrs/uuid" = "Use github.com/google/uuid instead, which we already depend on."
|
||||
|
||||
[linters-settings.gocritic]
|
||||
enabled-checks = ["ruleguard"]
|
||||
@@ -60,6 +57,7 @@ enable = [
|
||||
"typecheck",
|
||||
"asciicheck",
|
||||
"errorlint",
|
||||
"sqlclosecheck",
|
||||
"revive",
|
||||
]
|
||||
|
||||
|
||||
@@ -107,7 +107,7 @@ var config = {
|
||||
url: '${HOST}/datasources',
|
||||
wait: 500,
|
||||
rootElement: '.main-view',
|
||||
threshold: 3,
|
||||
threshold: 1,
|
||||
},
|
||||
{
|
||||
url: '${HOST}/org/users',
|
||||
@@ -125,7 +125,7 @@ var config = {
|
||||
url: '${HOST}/plugins',
|
||||
wait: 500,
|
||||
rootElement: '.main-view',
|
||||
threshold: 3,
|
||||
threshold: 1,
|
||||
},
|
||||
{
|
||||
url: '${HOST}/org',
|
||||
|
||||
@@ -27,6 +27,7 @@ theme.light.generated.json
|
||||
theme.dark.generated.json
|
||||
|
||||
# Generated Swagger API specs
|
||||
public/api-spec.json
|
||||
public/api-merged.json
|
||||
public/openapi3.json
|
||||
|
||||
|
||||
BIN
.yarn/cache/rst2html-https-e87da7ea2f-63d5ff3068.zip
vendored
Normal file
BIN
.yarn/cache/rst2html-https-e87da7ea2f-63d5ff3068.zip
vendored
Normal file
Binary file not shown.
807
.yarn/releases/yarn-3.3.0.cjs
vendored
Executable file
807
.yarn/releases/yarn-3.3.0.cjs
vendored
Executable file
File diff suppressed because one or more lines are too long
873
.yarn/releases/yarn-3.4.1.cjs
vendored
873
.yarn/releases/yarn-3.4.1.cjs
vendored
File diff suppressed because one or more lines are too long
2
.yarn/sdks/eslint/package.json
vendored
2
.yarn/sdks/eslint/package.json
vendored
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "eslint",
|
||||
"version": "8.34.0-sdk",
|
||||
"version": "8.32.0-sdk",
|
||||
"main": "./lib/api.js",
|
||||
"type": "commonjs"
|
||||
}
|
||||
|
||||
2
.yarn/sdks/integrations.yml
vendored
2
.yarn/sdks/integrations.yml
vendored
@@ -2,5 +2,5 @@
|
||||
# Manual changes might be lost!
|
||||
|
||||
integrations:
|
||||
- vscode
|
||||
- vim
|
||||
- vscode
|
||||
|
||||
28
.yarnrc.yml
28
.yarnrc.yml
@@ -3,33 +3,33 @@ enableTelemetry: false
|
||||
nodeLinker: pnp
|
||||
|
||||
packageExtensions:
|
||||
'@storybook/addon-docs@6.5.16':
|
||||
'@storybook/addon-docs@6.5.12':
|
||||
peerDependencies:
|
||||
'@babel/core': ^7.0.0
|
||||
'@storybook/manager-webpack5': 6.5.16
|
||||
'@storybook/manager-webpack5': 6.5.12
|
||||
'webpack': 5.74.0
|
||||
'@storybook/addon-essentials@6.5.16':
|
||||
'@storybook/addon-essentials@6.5.12':
|
||||
peerDependencies:
|
||||
'@storybook/components': 6.5.16
|
||||
'@storybook/core-events': 6.5.16
|
||||
'@storybook/manager-webpack5': 6.5.16
|
||||
'@storybook/theming': 6.5.16
|
||||
'@storybook/core-server@6.5.16':
|
||||
'@storybook/components': 6.5.12
|
||||
'@storybook/core-events': 6.5.12
|
||||
'@storybook/manager-webpack5': 6.5.12
|
||||
'@storybook/theming': 6.5.12
|
||||
'@storybook/core-server@6.5.12':
|
||||
peerDependencies:
|
||||
'@babel/core': ^7.0.0
|
||||
'@storybook/core@6.5.16':
|
||||
'@storybook/core@6.5.12':
|
||||
peerDependencies:
|
||||
'@babel/core': ^7.0.0
|
||||
'@storybook/manager-webpack5': 6.5.16
|
||||
'@storybook/csf-tools@6.5.16':
|
||||
'@storybook/manager-webpack5': 6.5.12
|
||||
'@storybook/csf-tools@6.5.12':
|
||||
peerDependencies:
|
||||
'@babel/core': ^7.0.0
|
||||
'@storybook/mdx2-csf@0.0.3':
|
||||
dependencies:
|
||||
'@babel/types': ^7.14.8
|
||||
'@storybook/react@6.5.16':
|
||||
'@storybook/react@6.5.12':
|
||||
peerDependencies:
|
||||
'@storybook/manager-webpack5': 6.5.16
|
||||
'@storybook/manager-webpack5': 6.5.12
|
||||
doctrine@3.0.0:
|
||||
dependencies:
|
||||
assert: 2.0.0
|
||||
@@ -59,7 +59,7 @@ plugins:
|
||||
- path: .yarn/plugins/@yarnpkg/plugin-outdated.cjs
|
||||
spec: 'https://mskelton.dev/yarn-outdated/v2'
|
||||
|
||||
yarnPath: .yarn/releases/yarn-3.4.1.cjs
|
||||
yarnPath: .yarn/releases/yarn-3.3.0.cjs
|
||||
# Uncomment the following lines if you want to use Verdaccio local npm registry. Read more at packages/README.md
|
||||
# npmScopes:
|
||||
# grafana:
|
||||
|
||||
420
CHANGELOG.md
420
CHANGELOG.md
@@ -1,401 +1,3 @@
|
||||
<!-- 9.4.7 START -->
|
||||
|
||||
# 9.4.7 (2023-03-16)
|
||||
|
||||
### Bug fixes
|
||||
|
||||
- **Alerting:** Update scheduler to receive rule updates only from database. [#64780](https://github.com/grafana/grafana/pull/64780), [@yuri-tceretian](https://github.com/yuri-tceretian)
|
||||
- **Influxdb:** Re-introduce backend migration feature toggle. [#64842](https://github.com/grafana/grafana/pull/64842), [@itsmylife](https://github.com/itsmylife)
|
||||
- **Security:** Fixes for CVE-2023-1410. [#65278](https://github.com/grafana/grafana/pull/65278), [@itsmylife](https://github.com/itsmylife)
|
||||
|
||||
### Breaking changes
|
||||
|
||||
The InfluxDB backend migration feature toggle (influxdbBackendMigration) has been reintroduced in this version as issues were discovered with backend processing of InfluxDB data. Unless this feature toggle is enabled, all InfluxDB data will be parsed in the frontend. This frontend processing is the default behavior.
|
||||
In Grafana 9.4.4, InfluxDB data parsing started to be handled in the backend. If you have upgraded to 9.4.4 and then added new transformations on InfluxDB data, those panels will fail to render. To resolve this either:
|
||||
|
||||
- Remove the affected panel and re-create it
|
||||
- Edit the `time` field as `Time` in `panel.json` or `dashboard.json` Issue [#64842](https://github.com/grafana/grafana/issues/64842)
|
||||
|
||||
<!-- 9.4.7 END -->
|
||||
<!-- 9.4.3 START -->
|
||||
|
||||
# 9.4.3 (2023-03-02)
|
||||
|
||||
### Bug fixes
|
||||
|
||||
- **Alerting:** Use background context for maintenance function. [#64065](https://github.com/grafana/grafana/pull/64065), [@yuri-tceretian](https://github.com/yuri-tceretian)
|
||||
- **Report Settings:** Fix URL validation. (Enterprise)
|
||||
|
||||
<!-- 9.4.3 END -->
|
||||
<!-- 9.4.2 START -->
|
||||
|
||||
# 9.4.2 (2023-03-02)
|
||||
|
||||
### Bug fixes
|
||||
|
||||
- **Alerting:** Fix boolean default in migration from false to 0. [#63952](https://github.com/grafana/grafana/pull/63952), [@alexmobo](https://github.com/alexmobo)
|
||||
|
||||
<!-- 9.4.2 END -->
|
||||
<!-- 9.4.1 START -->
|
||||
|
||||
# 9.4.1 (2023-02-28)
|
||||
|
||||
<!-- 9.4.1 END -->
|
||||
<!-- 9.4.0 START -->
|
||||
|
||||
# 9.4.0 (2023-02-28)
|
||||
|
||||
### Features and enhancements
|
||||
|
||||
- **Alerting:** Add endpoint for querying state history. [#62166](https://github.com/grafana/grafana/pull/62166), [@alexweav](https://github.com/alexweav)
|
||||
- **Alerting:** Add label query parameters to state history endpoint. [#62831](https://github.com/grafana/grafana/pull/62831), [@alexweav](https://github.com/alexweav)
|
||||
- **Alerting:** Add static label to all state history entries. [#62817](https://github.com/grafana/grafana/pull/62817), [@alexweav](https://github.com/alexweav)
|
||||
- **Alerting:** Mark AM configuration as applied. [#61330](https://github.com/grafana/grafana/pull/61330), [@santihernandezc](https://github.com/santihernandezc)
|
||||
- **Azure Monitor:** Enable multiple resource queries. [#62467](https://github.com/grafana/grafana/pull/62467), [@andresmgot](https://github.com/andresmgot)
|
||||
- **InfluxDB:** Move database information into jsondata. [#62308](https://github.com/grafana/grafana/pull/62308), [@itsmylife](https://github.com/itsmylife)
|
||||
- **Query Caching:** Add per-panel query caching TTL. [#61968](https://github.com/grafana/grafana/pull/61968), [@mmandrus](https://github.com/mmandrus)
|
||||
- **Table:** Add row number column option. [#62256](https://github.com/grafana/grafana/pull/62256), [@baldm0mma](https://github.com/baldm0mma)
|
||||
- **Tempo:** Remove tempoApmTable feature flag. [#62499](https://github.com/grafana/grafana/pull/62499), [@adrapereira](https://github.com/adrapereira)
|
||||
- **Transformations:** Selectively apply transformation to queries. [#61735](https://github.com/grafana/grafana/pull/61735), [@ryantxu](https://github.com/ryantxu)
|
||||
|
||||
### Bug fixes
|
||||
|
||||
- **AccessControl:** Clear user permission cache for update org user role. [#62745](https://github.com/grafana/grafana/pull/62745), [@Jguer](https://github.com/Jguer)
|
||||
- **Alerting:** Fix handling of special floating-point cases when writing observed values to annotations. [#61074](https://github.com/grafana/grafana/pull/61074), [@alexweav](https://github.com/alexweav)
|
||||
- **Auth:** Rotate token patch. [#62676](https://github.com/grafana/grafana/pull/62676), [@mgyongyosi](https://github.com/mgyongyosi)
|
||||
- **ContextMenu:** Consider y coord when determining bottom collision. [#62403](https://github.com/grafana/grafana/pull/62403), [@gelicia](https://github.com/gelicia)
|
||||
- **Elasticsearch:** Fix consistent label order in alerting. [#62497](https://github.com/grafana/grafana/pull/62497), [@gabor](https://github.com/gabor)
|
||||
- **Explore:** Fix graph not updating when changing config. [#62473](https://github.com/grafana/grafana/pull/62473), [@Elfo404](https://github.com/Elfo404)
|
||||
- **Heatmap:** Support heatmap rows with non-timeseries X axis. [#60929](https://github.com/grafana/grafana/pull/60929), [@ryantxu](https://github.com/ryantxu)
|
||||
- **Login:** Fix panic when a user is upserted by a background process. [#62539](https://github.com/grafana/grafana/pull/62539), [@sakjur](https://github.com/sakjur)
|
||||
- **MSSQL:** Add support for macro function calls. [#62742](https://github.com/grafana/grafana/pull/62742), [@mdvictor](https://github.com/mdvictor)
|
||||
- **MySQL:** Quote identifiers that include special characters. [#61135](https://github.com/grafana/grafana/pull/61135), [@zoltanbedi](https://github.com/zoltanbedi)
|
||||
- **Navigation:** Sign in button now works correctly when served under a sub path. [#62504](https://github.com/grafana/grafana/pull/62504), [@ashharrison90](https://github.com/ashharrison90)
|
||||
- **Nested Folder:** Fix for SQLite not to overwrite the parent on restarts. [#62709](https://github.com/grafana/grafana/pull/62709), [@papagian](https://github.com/papagian)
|
||||
- **PanelChrome:** Adds display mode to support transparent option. [#62647](https://github.com/grafana/grafana/pull/62647), [@torkelo](https://github.com/torkelo)
|
||||
- **Plugins:** Case-sensitive routes for standalone pages. [#62779](https://github.com/grafana/grafana/pull/62779), [@leventebalogh](https://github.com/leventebalogh)
|
||||
- **Plugins:** Prefer to use the data source UID when querying. [#62776](https://github.com/grafana/grafana/pull/62776), [@andresmgot](https://github.com/andresmgot)
|
||||
- **SQLStore:** Fix folder migration for MySQL < 5.7. [#62521](https://github.com/grafana/grafana/pull/62521), [@papagian](https://github.com/papagian)
|
||||
- **Search:** Fix not being able to clear sort value. [#62557](https://github.com/grafana/grafana/pull/62557), [@joshhunt](https://github.com/joshhunt)
|
||||
- **Tempo:** Fix span name being dropped from the query. [#62257](https://github.com/grafana/grafana/pull/62257), [@CrypticSignal](https://github.com/CrypticSignal)
|
||||
|
||||
### Plugin development fixes & changes
|
||||
|
||||
- **PanelChrome:** Implement hover header. [#61774](https://github.com/grafana/grafana/pull/61774), [@kaydelaney](https://github.com/kaydelaney)
|
||||
|
||||
<!-- 9.4.0 END -->
|
||||
<!-- 9.4.0-beta1 START -->
|
||||
|
||||
# 9.4.0-beta1 (2023-01-30)
|
||||
|
||||
### Features and enhancements
|
||||
|
||||
- **API:** Change how Cache-Control and related headers are set. [#62021](https://github.com/grafana/grafana/pull/62021), [@kylebrandt](https://github.com/kylebrandt)
|
||||
- **AccessControl:** Add high availability support to access control seeder. (Enterprise)
|
||||
- **Accessibility:** Make QueryEditorHelp examples keyboard interactive. [#59355](https://github.com/grafana/grafana/pull/59355), [@idastambuk](https://github.com/idastambuk)
|
||||
- **Admin:** Combine org and admin user pages. [#59365](https://github.com/grafana/grafana/pull/59365), [@Clarity-89](https://github.com/Clarity-89)
|
||||
- **Admin:** Remove navigation subheaders. [#61344](https://github.com/grafana/grafana/pull/61344), [@Clarity-89](https://github.com/Clarity-89)
|
||||
- **AlertGroups:** Generate models.gen.ts from models.cue. [#61227](https://github.com/grafana/grafana/pull/61227), [@Clarity-89](https://github.com/Clarity-89)
|
||||
- **Alerting:** Access query details of provisioned alerts. [#59626](https://github.com/grafana/grafana/pull/59626), [@konrad147](https://github.com/konrad147)
|
||||
- **Alerting:** Add alert rule cloning action. [#59200](https://github.com/grafana/grafana/pull/59200), [@konrad147](https://github.com/konrad147)
|
||||
- **Alerting:** Add dashboard and panel picker to the rule form. [#58304](https://github.com/grafana/grafana/pull/58304), [@konrad147](https://github.com/konrad147)
|
||||
- **Alerting:** Add discord as a possible receiver in cloud rules. [#59366](https://github.com/grafana/grafana/pull/59366), [@soniaAguilarPeiron](https://github.com/soniaAguilarPeiron)
|
||||
- **Alerting:** Add export button for exporting all alert rules in alert list view. [#62416](https://github.com/grafana/grafana/pull/62416), [@soniaAguilarPeiron](https://github.com/soniaAguilarPeiron)
|
||||
- **Alerting:** Add header X-Grafana-Org-Id to evaluation requests. [#58972](https://github.com/grafana/grafana/pull/58972), [@yuri-tceretian](https://github.com/yuri-tceretian)
|
||||
- **Alerting:** Add landing page. [#59050](https://github.com/grafana/grafana/pull/59050), [@konrad147](https://github.com/konrad147)
|
||||
- **Alerting:** Add maxdatapoints in alert rule form. [#61904](https://github.com/grafana/grafana/pull/61904), [@soniaAguilarPeiron](https://github.com/soniaAguilarPeiron)
|
||||
- **Alerting:** Add provisioning endpoint to fetch all rules. [#59989](https://github.com/grafana/grafana/pull/59989), [@alexweav](https://github.com/alexweav)
|
||||
- **Alerting:** Add support for settings parse_mode and disable_notifications to Telegram receiver. [#60198](https://github.com/grafana/grafana/pull/60198), [@yuri-tceretian](https://github.com/yuri-tceretian)
|
||||
- **Alerting:** Add support for tracing to alerting scheduler. [#61057](https://github.com/grafana/grafana/pull/61057), [@yuri-tceretian](https://github.com/yuri-tceretian)
|
||||
- **Alerting:** Adds evaluation interval to group view. [#59974](https://github.com/grafana/grafana/pull/59974), [@gillesdemey](https://github.com/gillesdemey)
|
||||
- **Alerting:** Alert rules search improvements. [#61398](https://github.com/grafana/grafana/pull/61398), [@konrad147](https://github.com/konrad147)
|
||||
- **Alerting:** Allow state history to be disabled through configuration. [#61006](https://github.com/grafana/grafana/pull/61006), [@alexweav](https://github.com/alexweav)
|
||||
- **Alerting:** Bump Prometheus Alertmanager to v0.25. [#60764](https://github.com/grafana/grafana/pull/60764), [@santihernandezc](https://github.com/santihernandezc)
|
||||
- **Alerting:** Choose a previous valid AM configuration in case of error. [#58472](https://github.com/grafana/grafana/pull/58472), [@santihernandezc](https://github.com/santihernandezc)
|
||||
- **Alerting:** Create endpoints for exporting in provisioning file format. [#58623](https://github.com/grafana/grafana/pull/58623), [@JacobsonMT](https://github.com/JacobsonMT)
|
||||
- **Alerting:** Declare incident from a firing alert. [#61178](https://github.com/grafana/grafana/pull/61178), [@gillesdemey](https://github.com/gillesdemey)
|
||||
- **Alerting:** Do not maintain Normal state. [#56336](https://github.com/grafana/grafana/pull/56336), [@yuri-tceretian](https://github.com/yuri-tceretian)
|
||||
- **Alerting:** Improve UI for making more clear that evaluation interval belongs to the group. [#56397](https://github.com/grafana/grafana/pull/56397), [@soniaAguilarPeiron](https://github.com/soniaAguilarPeiron)
|
||||
- **Alerting:** Improve legacy migration to include send reminder & frequency. [#60275](https://github.com/grafana/grafana/pull/60275), [@JacobsonMT](https://github.com/JacobsonMT)
|
||||
- **Alerting:** PagerDuty receiver to let user configure fields Source, Client and Client URL. [#59895](https://github.com/grafana/grafana/pull/59895), [@yuri-tceretian](https://github.com/yuri-tceretian)
|
||||
- **Alerting:** Recognise & change UI for OnCall notification policy + contact point. [#60259](https://github.com/grafana/grafana/pull/60259), [@soniaAguilarPeiron](https://github.com/soniaAguilarPeiron)
|
||||
- **Alerting:** Rename contact point type to receiver in the user interface. [#59589](https://github.com/grafana/grafana/pull/59589), [@grobinson-grafana](https://github.com/grobinson-grafana)
|
||||
- **Alerting:** Rule evaluator to get cached data source info. [#61305](https://github.com/grafana/grafana/pull/61305), [@yuri-tceretian](https://github.com/yuri-tceretian)
|
||||
- **Alerting:** Support customizable timeout for screenshots. [#60981](https://github.com/grafana/grafana/pull/60981), [@grobinson-grafana](https://github.com/grobinson-grafana)
|
||||
- **Alerting:** UI changes required to support v3 and Auth in Kafka Contact Point. [#61123](https://github.com/grafana/grafana/pull/61123), [@MohammadGhazanfar](https://github.com/MohammadGhazanfar)
|
||||
- **Alerting:** Update Alerting and Alertmanager to v0.25.1. [#61233](https://github.com/grafana/grafana/pull/61233), [@grobinson-grafana](https://github.com/grobinson-grafana)
|
||||
- **Alerting:** Upload images to Slack via files.upload. [#59163](https://github.com/grafana/grafana/pull/59163), [@grobinson-grafana](https://github.com/grobinson-grafana)
|
||||
- **Auditing/Usage Insights:** Loki support for multi-tenancy. (Enterprise)
|
||||
- **Auth forwarding:** Pass tokens without refresh. [#61634](https://github.com/grafana/grafana/pull/61634), [@Jguer](https://github.com/Jguer)
|
||||
- **Auth:** Add expiry date for service accounts access tokens. [#58885](https://github.com/grafana/grafana/pull/58885), [@linoman](https://github.com/linoman)
|
||||
- **Auth:** Add plugin roles to RolePicker. [#59667](https://github.com/grafana/grafana/pull/59667), [@linoman](https://github.com/linoman)
|
||||
- **Auth:** Add skip_org_role_sync for AzureAD OAuth. [#60322](https://github.com/grafana/grafana/pull/60322), [@eleijonmarck](https://github.com/eleijonmarck)
|
||||
- **Auth:** Add skip_org_role_sync for Okta. [#62106](https://github.com/grafana/grafana/pull/62106), [@eleijonmarck](https://github.com/eleijonmarck)
|
||||
- **Auth:** Add skip_org_role_sync setting for GrafanaCom. [#60553](https://github.com/grafana/grafana/pull/60553), [@eleijonmarck](https://github.com/eleijonmarck)
|
||||
- **Auth:** Add skip_org_role_sync setting for github. [#61673](https://github.com/grafana/grafana/pull/61673), [@eleijonmarck](https://github.com/eleijonmarck)
|
||||
- **Auth:** Add skip_org_role_sync setting to OAuth integration Google. [#61572](https://github.com/grafana/grafana/pull/61572), [@eleijonmarck](https://github.com/eleijonmarck)
|
||||
- **Auth:** Add skip_org_role_sync to GitLab OAuth. [#62055](https://github.com/grafana/grafana/pull/62055), [@eleijonmarck](https://github.com/eleijonmarck)
|
||||
- **Auth:** Add sub claim check to JWT Auth pre-checks. [#61417](https://github.com/grafana/grafana/pull/61417), [@mgyongyosi](https://github.com/mgyongyosi)
|
||||
- **Auth:** Disable team sync for JWT Authentication. [#62191](https://github.com/grafana/grafana/pull/62191), [@eleijonmarck](https://github.com/eleijonmarck)
|
||||
- **Auth:** Display id Provider label in orgs/users view. [#58033](https://github.com/grafana/grafana/pull/58033), [@linoman](https://github.com/linoman)
|
||||
- **Auth:** Implement skip org role sync for jwt. [#61647](https://github.com/grafana/grafana/pull/61647), [@linoman](https://github.com/linoman)
|
||||
- **Auth:** Log a more useful msg if no OAuth provider configured. [#56722](https://github.com/grafana/grafana/pull/56722), [@someone-stole-my-name](https://github.com/someone-stole-my-name)
|
||||
- **Auth:** Set service account access token limit on expiry dates. [#56467](https://github.com/grafana/grafana/pull/56467), [@linoman](https://github.com/linoman)
|
||||
- **Azure Monitor:** Add variable function to list regions. [#62297](https://github.com/grafana/grafana/pull/62297), [@andresmgot](https://github.com/andresmgot)
|
||||
- **Backend:** Consistently use context RemoteAddr function to determine remote address. [#60201](https://github.com/grafana/grafana/pull/60201), [@DanCech](https://github.com/DanCech)
|
||||
- **BarChart:** Highlight bars option for easier interaction. [#60530](https://github.com/grafana/grafana/pull/60530), [@mdvictor](https://github.com/mdvictor)
|
||||
- **BarChartPanel:** Custom tooltips. [#60148](https://github.com/grafana/grafana/pull/60148), [@mdvictor](https://github.com/mdvictor)
|
||||
- **Canvas:** Add server element. [#61104](https://github.com/grafana/grafana/pull/61104), [@drew08t](https://github.com/drew08t)
|
||||
- **Canvas:** Add support for basic arrows. [#57561](https://github.com/grafana/grafana/pull/57561), [@nmarrs](https://github.com/nmarrs)
|
||||
- **Canvas:** Add tooltip for data links. [#61648](https://github.com/grafana/grafana/pull/61648), [@adela-almasan](https://github.com/adela-almasan)
|
||||
- **Canvas:** Improve placement when adding an element via context menu. [#61071](https://github.com/grafana/grafana/pull/61071), [@adela-almasan](https://github.com/adela-almasan)
|
||||
- **Canvas:** Update context menu actions for multiple elements selected. [#61108](https://github.com/grafana/grafana/pull/61108), [@adela-almasan](https://github.com/adela-almasan)
|
||||
- **Canvas:** Update element(s) selection after action. [#61204](https://github.com/grafana/grafana/pull/61204), [@adela-almasan](https://github.com/adela-almasan)
|
||||
- **Chore:** Add deprecation warnings for Sentry. [#60165](https://github.com/grafana/grafana/pull/60165), [@domasx2](https://github.com/domasx2)
|
||||
- **CloudMonitor:** Improve detail of MQL series labels. [#59747](https://github.com/grafana/grafana/pull/59747), [@aangelisc](https://github.com/aangelisc)
|
||||
- **CloudWatch Logs:** Set default logs query and disable button when empty. [#61956](https://github.com/grafana/grafana/pull/61956), [@iwysiu](https://github.com/iwysiu)
|
||||
- **CloudWatch:** Add CloudWatchSynthetics dimension. [#60832](https://github.com/grafana/grafana/pull/60832), [@jangaraj](https://github.com/jangaraj)
|
||||
- **CloudWatch:** Add MaxProvisionedTableReadCapacityUtilization AWS/DynamoDB metric name. [#60829](https://github.com/grafana/grafana/pull/60829), [@jangaraj](https://github.com/jangaraj)
|
||||
- **CloudWatch:** Add RDS dimension. [#61027](https://github.com/grafana/grafana/pull/61027), [@jangaraj](https://github.com/jangaraj)
|
||||
- **CloudWatch:** Add macro for resolving period in SEARCH expressions. [#60435](https://github.com/grafana/grafana/pull/60435), [@sunker](https://github.com/sunker)
|
||||
- **Cloudwatch:** Add feedback labels to log groups selector. [#60619](https://github.com/grafana/grafana/pull/60619), [@sunker](https://github.com/sunker)
|
||||
- **Cloudwatch:** Add run query button. [#60089](https://github.com/grafana/grafana/pull/60089), [@sunker](https://github.com/sunker)
|
||||
- **Cloudwatch:** Add support for template variables in new log group picker. [#61243](https://github.com/grafana/grafana/pull/61243), [@sunker](https://github.com/sunker)
|
||||
- **Cloudwatch:** Define and use getDefaultquery instead of calling onChange on mount. [#60221](https://github.com/grafana/grafana/pull/60221), [@idastambuk](https://github.com/idastambuk)
|
||||
- **Cloudwatch:** Refactor log group model. [#60873](https://github.com/grafana/grafana/pull/60873), [@sunker](https://github.com/sunker)
|
||||
- **Cloudwatch:** Set CloudwatchCrossAccountQuery feature to stable. [#62348](https://github.com/grafana/grafana/pull/62348), [@sarahzinger](https://github.com/sarahzinger)
|
||||
- **Cloudwatch:** Use new log group picker also for non cross-account queries. [#60913](https://github.com/grafana/grafana/pull/60913), [@sunker](https://github.com/sunker)
|
||||
- **CommandPalette:** Improve section header styling. [#61584](https://github.com/grafana/grafana/pull/61584), [@joshhunt](https://github.com/joshhunt)
|
||||
- **CommandPalette:** Minor usability improvements. [#61567](https://github.com/grafana/grafana/pull/61567), [@joshhunt](https://github.com/joshhunt)
|
||||
- **CommandPalette:** Search for dashboards using API. [#61090](https://github.com/grafana/grafana/pull/61090), [@joshhunt](https://github.com/joshhunt)
|
||||
- **Config:** Support JSON list syntax. [#61288](https://github.com/grafana/grafana/pull/61288), [@alexanderzobnin](https://github.com/alexanderzobnin)
|
||||
- **DataLinks:** Allow providing a dynamic data link builder. [#60452](https://github.com/grafana/grafana/pull/60452), [@dprokop](https://github.com/dprokop)
|
||||
- **DataProxy:** Populate X-Grafana-Referer header. [#60040](https://github.com/grafana/grafana/pull/60040), [@neilfordyce](https://github.com/neilfordyce)
|
||||
- **Database:** Adds support for enable/disable SQLite Write-Ahead Logging (WAL) via configuration. [#58268](https://github.com/grafana/grafana/pull/58268), [@marefr](https://github.com/marefr)
|
||||
- **Dataplane:** Deprecate timeseries-many in favor of timeseries-multi. [#59070](https://github.com/grafana/grafana/pull/59070), [@bohandley](https://github.com/bohandley)
|
||||
- **Datasource settings:** Add deprecation notice for database field. [#58647](https://github.com/grafana/grafana/pull/58647), [@zoltanbedi](https://github.com/zoltanbedi)
|
||||
- **Datasources:** Add support for getDetDefaultQuery in variable editor. [#62026](https://github.com/grafana/grafana/pull/62026), [@idastambuk](https://github.com/idastambuk)
|
||||
- **Devenv:** OpenLDAP-Mac improvements. [#60229](https://github.com/grafana/grafana/pull/60229), [@mgyongyosi](https://github.com/mgyongyosi)
|
||||
- **Docs:** Rename Message templates to Notification templates. [#59477](https://github.com/grafana/grafana/pull/59477), [@grobinson-grafana](https://github.com/grobinson-grafana)
|
||||
- **Docs:** Unified Alerting is now compatible with AWS Aurora. [#61001](https://github.com/grafana/grafana/pull/61001), [@alexweav](https://github.com/alexweav)
|
||||
- **Elastic:** Remove experimental tag from v8.0+. [#61359](https://github.com/grafana/grafana/pull/61359), [@gwdawson](https://github.com/gwdawson)
|
||||
- **Elasticsearch:** Deprecate raw document mode. [#62236](https://github.com/grafana/grafana/pull/62236), [@gabor](https://github.com/gabor)
|
||||
- **Elasticsearch:** Support nested aggregation. [#62301](https://github.com/grafana/grafana/pull/62301), [@gabor](https://github.com/gabor)
|
||||
- **Email:** Use MJML email template. (Enterprise)
|
||||
- **Email:** Use MJML email templates. [#57751](https://github.com/grafana/grafana/pull/57751), [@gillesdemey](https://github.com/gillesdemey)
|
||||
- **Explore:** Add feature to open log sample in split view. [#62097](https://github.com/grafana/grafana/pull/62097), [@ivanahuckova](https://github.com/ivanahuckova)
|
||||
- **Explore:** Enable resize of split pane. [#58683](https://github.com/grafana/grafana/pull/58683), [@gelicia](https://github.com/gelicia)
|
||||
- **Explore:** Implement logs sample in Explore. [#61864](https://github.com/grafana/grafana/pull/61864), [@ivanahuckova](https://github.com/ivanahuckova)
|
||||
- **Explore:** Keyboard shortcut to go to explore. [#61837](https://github.com/grafana/grafana/pull/61837), [@torkelo](https://github.com/torkelo)
|
||||
- **Explore:** Notify when compact URL is used. [#58684](https://github.com/grafana/grafana/pull/58684), [@gelicia](https://github.com/gelicia)
|
||||
- **Explore:** Use Datasource Onboarding page when visiting without any datasource set up. [#60399](https://github.com/grafana/grafana/pull/60399), [@Elfo404](https://github.com/Elfo404)
|
||||
- **FileDropzone:** Format the file size limit in the error message when the max file size is exceeded (1000 => 1 kB). [#62290](https://github.com/grafana/grafana/pull/62290), [@oscarkilhed](https://github.com/oscarkilhed)
|
||||
- **Flame graph:** Search with uFuzzy. [#61748](https://github.com/grafana/grafana/pull/61748), [@joey-grafana](https://github.com/joey-grafana)
|
||||
- **GRPC Server:** Add query service. [#55781](https://github.com/grafana/grafana/pull/55781), [@toddtreece](https://github.com/toddtreece)
|
||||
- **Geomap panel:** Generate types. [#61636](https://github.com/grafana/grafana/pull/61636), [@Clarity-89](https://github.com/Clarity-89)
|
||||
- **Geomap:** Add color gradients to route layer. [#59062](https://github.com/grafana/grafana/pull/59062), [@drew08t](https://github.com/drew08t)
|
||||
- **Glue:** Validate target query in correlations page. [#57245](https://github.com/grafana/grafana/pull/57245), [@L-M-K-B](https://github.com/L-M-K-B)
|
||||
- **Heatmap:** Remove legacy angular based implementation. [#59249](https://github.com/grafana/grafana/pull/59249), [@ryantxu](https://github.com/ryantxu)
|
||||
- **InfluxDB:** Send retention policy with InfluxQL queries if its been specified. [#62149](https://github.com/grafana/grafana/pull/62149), [@brettbuddin](https://github.com/brettbuddin)
|
||||
- **Influxdb:** Remove backend migration feature toggle. [#61308](https://github.com/grafana/grafana/pull/61308), [@itsmylife](https://github.com/itsmylife)
|
||||
- **Internationalization:** Translate page headers and Search dashboard actions. [#60727](https://github.com/grafana/grafana/pull/60727), [@TaitChan](https://github.com/TaitChan)
|
||||
- **LDAP:** Make LDAP attribute mapping case-insensitive. [#58992](https://github.com/grafana/grafana/pull/58992), [@markkrj](https://github.com/markkrj)
|
||||
- **LoginAttempts:** Reset attempts on successfull password reset. [#59215](https://github.com/grafana/grafana/pull/59215), [@kalleep](https://github.com/kalleep)
|
||||
- **Logs Panel:** Add support for keyboard interactions with log lines. [#60561](https://github.com/grafana/grafana/pull/60561), [@matyax](https://github.com/matyax)
|
||||
- **Logs:** Add possibility to download logs in JSON format. [#61394](https://github.com/grafana/grafana/pull/61394), [@svennergr](https://github.com/svennergr)
|
||||
- **Logs:** Make `no logs found` text more visible in Explore. [#61651](https://github.com/grafana/grafana/pull/61651), [@svennergr](https://github.com/svennergr)
|
||||
- **Logs:** Unify detected fields and labels in Log Details. [#60448](https://github.com/grafana/grafana/pull/60448), [@svennergr](https://github.com/svennergr)
|
||||
- **Loki Autocomplete:** Suggest only possible labels for unwrap. [#61411](https://github.com/grafana/grafana/pull/61411), [@matyax](https://github.com/matyax)
|
||||
- **Loki Editor Autocomplete:** Suggest unique history items. [#60262](https://github.com/grafana/grafana/pull/60262), [@matyax](https://github.com/matyax)
|
||||
- **Loki Query Editor:** Add support to display query parsing errors to users. [#59427](https://github.com/grafana/grafana/pull/59427), [@matyax](https://github.com/matyax)
|
||||
- **Loki Query Editor:** Autocompletion and suggestions improvements (unwrap, parser, extracted labels). [#59103](https://github.com/grafana/grafana/pull/59103), [@matyax](https://github.com/matyax)
|
||||
- **Loki Query Editor:** Update history items with successive queries. [#60327](https://github.com/grafana/grafana/pull/60327), [@matyax](https://github.com/matyax)
|
||||
- **Loki:** Add format explanation to regex operations. [#60518](https://github.com/grafana/grafana/pull/60518), [@gwdawson](https://github.com/gwdawson)
|
||||
- **Loki:** Add hints for query filters. [#60293](https://github.com/grafana/grafana/pull/60293), [@gwdawson](https://github.com/gwdawson)
|
||||
- **Loki:** Add improvements to loki label browser. [#59387](https://github.com/grafana/grafana/pull/59387), [@gwdawson](https://github.com/gwdawson)
|
||||
- **Loki:** Change format of query builder hints. [#60228](https://github.com/grafana/grafana/pull/60228), [@gwdawson](https://github.com/gwdawson)
|
||||
- **Loki:** Make label browser accessible in query builder. [#58525](https://github.com/grafana/grafana/pull/58525), [@gwdawson](https://github.com/gwdawson)
|
||||
- **Loki:** Push support for multi-tenancy mode. [#60866](https://github.com/grafana/grafana/pull/60866), [@joanlopez](https://github.com/joanlopez)
|
||||
- **Loki:** Remove raw query toggle. [#59125](https://github.com/grafana/grafana/pull/59125), [@gwdawson](https://github.com/gwdawson)
|
||||
- **Loki:** Rename "explain" toggle to "explain query". [#61150](https://github.com/grafana/grafana/pull/61150), [@gwdawson](https://github.com/gwdawson)
|
||||
- **Loki:** Set custom width for modals in the loki query editor. [#59714](https://github.com/grafana/grafana/pull/59714), [@gwdawson](https://github.com/gwdawson)
|
||||
- **Loki:** Show configured log line limit. [#61291](https://github.com/grafana/grafana/pull/61291), [@gwdawson](https://github.com/gwdawson)
|
||||
- **Loki:** Show query size approximation. [#62109](https://github.com/grafana/grafana/pull/62109), [@gwdawson](https://github.com/gwdawson)
|
||||
- **Middleware:** Add Custom Headers to HTTP responses. [#59018](https://github.com/grafana/grafana/pull/59018), [@jcalisto](https://github.com/jcalisto)
|
||||
- **Navigation:** Open command palette from search box. [#61667](https://github.com/grafana/grafana/pull/61667), [@joshhunt](https://github.com/joshhunt)
|
||||
- **NodeGraph:** Allow usage with single dataframe. [#58448](https://github.com/grafana/grafana/pull/58448), [@aocenas](https://github.com/aocenas)
|
||||
- **OAuth:** Support pagination for GitHub orgs. [#58648](https://github.com/grafana/grafana/pull/58648), [@sdague](https://github.com/sdague)
|
||||
- **PanelChrome:** Allow panel to be dragged if set as draggable from the outside. [#61698](https://github.com/grafana/grafana/pull/61698), [@axelavargas](https://github.com/axelavargas)
|
||||
- **PanelChrome:** Refactor and refine items next to title. [#60514](https://github.com/grafana/grafana/pull/60514), [@axelavargas](https://github.com/axelavargas)
|
||||
- **PanelRenderer:** Interpolate variables in applyFieldOverrides. [#59844](https://github.com/grafana/grafana/pull/59844), [@connorlindsey](https://github.com/connorlindsey)
|
||||
- **Performance:** Preallocate slices. [#61580](https://github.com/grafana/grafana/pull/61580), [@peakle](https://github.com/peakle)
|
||||
- **Phlare:** Reset flame graph after query is run. [#59609](https://github.com/grafana/grafana/pull/59609), [@joey-grafana](https://github.com/joey-grafana)
|
||||
- **Phlare:** Transition from LogQL/PromQL to Phlare should keep the query. [#60217](https://github.com/grafana/grafana/pull/60217), [@joey-grafana](https://github.com/joey-grafana)
|
||||
- **Plugins:** Add file permission error check when attempting to verify plugin signature. [#61860](https://github.com/grafana/grafana/pull/61860), [@wbrowne](https://github.com/wbrowne)
|
||||
- **Plugins:** Automatically forward plugin request HTTP headers in outgoing HTTP requests. [#60417](https://github.com/grafana/grafana/pull/60417), [@marefr](https://github.com/marefr)
|
||||
- **Plugins:** Forward user header (X-Grafana-User) in backend plugin requests. [#58646](https://github.com/grafana/grafana/pull/58646), [@marefr](https://github.com/marefr)
|
||||
- **Plugins:** Pass through dashboard/contextual HTTP headers to plugins/datasources. [#60301](https://github.com/grafana/grafana/pull/60301), [@GiedriusS](https://github.com/GiedriusS)
|
||||
- **Plugins:** Refactor forward of cookies, OAuth token and header modifications by introducing client middlewares. [#58132](https://github.com/grafana/grafana/pull/58132), [@marefr](https://github.com/marefr)
|
||||
- **Plugins:** Remove connection/hop-by-hop request/response headers for call resource. [#60077](https://github.com/grafana/grafana/pull/60077), [@marefr](https://github.com/marefr)
|
||||
- **Plugins:** Unsigned chromium file should not invalidate signature for Renderer plugin. [#59104](https://github.com/grafana/grafana/pull/59104), [@wbrowne](https://github.com/wbrowne)
|
||||
- **Preferences:** Add pagination to org configuration page. [#60896](https://github.com/grafana/grafana/pull/60896), [@alexanderzobnin](https://github.com/alexanderzobnin)
|
||||
- **Preferences:** Add theme preference to match system theme. [#61986](https://github.com/grafana/grafana/pull/61986), [@joshhunt](https://github.com/joshhunt)
|
||||
- **Prometheus:** Kickstart your query, formerly query patterns. [#60718](https://github.com/grafana/grafana/pull/60718), [@bohandley](https://github.com/bohandley)
|
||||
- **Prometheus:** New instant query results view in Explore. [#60479](https://github.com/grafana/grafana/pull/60479), [@gtk-grafana](https://github.com/gtk-grafana)
|
||||
- **Prometheus:** Remove buffered client and feature toggle related to it. [#59898](https://github.com/grafana/grafana/pull/59898), [@itsmylife](https://github.com/itsmylife)
|
||||
- **Public Dashboards:** Time range for public dashboard in NavToolbar. [#60689](https://github.com/grafana/grafana/pull/60689), [@juanicabanas](https://github.com/juanicabanas)
|
||||
- **PublicDashboards:** A unique page for public dashboards. [#60744](https://github.com/grafana/grafana/pull/60744), [@juanicabanas](https://github.com/juanicabanas)
|
||||
- **PublicDashboards:** Add react-hook-form for Public Dashboard modal. [#60249](https://github.com/grafana/grafana/pull/60249), [@juanicabanas](https://github.com/juanicabanas)
|
||||
- **PublicDashboards:** Add share column to public dashboards table. [#61102](https://github.com/grafana/grafana/pull/61102), [@owensmallwood](https://github.com/owensmallwood)
|
||||
- **PublicDashboards:** Adds middleware for email sharing. (Enterprise)
|
||||
- **PublicDashboards:** Adds tables and models for email sharing. (Enterprise)
|
||||
- **PublicDashboards:** Checkboxes list refactor. [#61947](https://github.com/grafana/grafana/pull/61947), [@juanicabanas](https://github.com/juanicabanas)
|
||||
- **PublicDashboards:** Create API for sharing by email. (Enterprise)
|
||||
- **PublicDashboards:** Enterprise service skeleton for public dashboards with feature flag. (Enterprise)
|
||||
- **PublicDashboards:** Modal warns when using unsupported datasources. [#58926](https://github.com/grafana/grafana/pull/58926), [@owensmallwood](https://github.com/owensmallwood)
|
||||
- **PublicDashboards:** Page to request access to protected pubdash. (Enterprise)
|
||||
- **PublicDashboards:** Remove unnecessary css style in Audit Table. [#60546](https://github.com/grafana/grafana/pull/60546), [@juanicabanas](https://github.com/juanicabanas)
|
||||
- **PublicDashboards:** Revert Time range setting added. [#60698](https://github.com/grafana/grafana/pull/60698), [@juanicabanas](https://github.com/juanicabanas)
|
||||
- **PublicDashboards:** Time range conditionally shown. [#60425](https://github.com/grafana/grafana/pull/60425), [@juanicabanas](https://github.com/juanicabanas)
|
||||
- **PublicDashboards:** Time range setting added. [#60487](https://github.com/grafana/grafana/pull/60487), [@juanicabanas](https://github.com/juanicabanas)
|
||||
- **PublicDashboards:** Time range settings. [#61585](https://github.com/grafana/grafana/pull/61585), [@juanicabanas](https://github.com/juanicabanas)
|
||||
- **PublicDashboards:** Time range switch added. [#60257](https://github.com/grafana/grafana/pull/60257), [@juanicabanas](https://github.com/juanicabanas)
|
||||
- **PublicDashboards:** Time range wording changed. [#60473](https://github.com/grafana/grafana/pull/60473), [@juanicabanas](https://github.com/juanicabanas)
|
||||
- **RBAC:** Add an endpoint to search through assignments. (Enterprise)
|
||||
- **RBAC:** Add config option to reset basic roles on start up. [#59598](https://github.com/grafana/grafana/pull/59598), [@gamab](https://github.com/gamab)
|
||||
- **RBAC:** Add config option to reset basic roles on start up. (Enterprise)
|
||||
- **RBAC:** Add permission to get usage report preview. [#61570](https://github.com/grafana/grafana/pull/61570), [@alexanderzobnin](https://github.com/alexanderzobnin)
|
||||
- **RBAC:** Permission check performance improvements for the new search. [#60729](https://github.com/grafana/grafana/pull/60729), [@IevaVasiljeva](https://github.com/IevaVasiljeva)
|
||||
- **RBAC:** Register plugin permissions's action and its accepted scopes. (Enterprise)
|
||||
- **RBAC:** Runtime plugin role registration and update. (Enterprise)
|
||||
- **Report Settings:** Add UI to upload logo files. (Enterprise)
|
||||
- **Reporting:** Allow to upload report branding images. (Enterprise)
|
||||
- **RolePicker:** Align groupHeader to the list items horizontally. [#61060](https://github.com/grafana/grafana/pull/61060), [@mgyongyosi](https://github.com/mgyongyosi)
|
||||
- **SAML:** Support auto login. [#61685](https://github.com/grafana/grafana/pull/61685), [@alexanderzobnin](https://github.com/alexanderzobnin)
|
||||
- **SMTP:** Update SMTP TemplatesPatterns to do an 'or' filter instead of 'and'. [#61421](https://github.com/grafana/grafana/pull/61421), [@mmandrus](https://github.com/mmandrus)
|
||||
- **SQL Datasources:** Move database setting to jsonData. [#58649](https://github.com/grafana/grafana/pull/58649), [@zoltanbedi](https://github.com/zoltanbedi)
|
||||
- **SQL Datasources:** Use health check for config test. [#59867](https://github.com/grafana/grafana/pull/59867), [@zoltanbedi](https://github.com/zoltanbedi)
|
||||
- **SQL:** Return no data response when no rows returned. [#59121](https://github.com/grafana/grafana/pull/59121), [@zoltanbedi](https://github.com/zoltanbedi)
|
||||
- **Search:** Remember sorting preference between visits. [#62248](https://github.com/grafana/grafana/pull/62248), [@joshhunt](https://github.com/joshhunt)
|
||||
- **Segment:** Individual segments are now keyboard accessible. [#60555](https://github.com/grafana/grafana/pull/60555), [@ashharrison90](https://github.com/ashharrison90)
|
||||
- **Server:** Switch from separate server & cli to a unified grafana binary. [#58286](https://github.com/grafana/grafana/pull/58286), [@DanCech](https://github.com/DanCech)
|
||||
- **SharePDF:** Add zoom select. (Enterprise)
|
||||
- **Slugify:** Replace gosimple/slug with a simple function. [#59517](https://github.com/grafana/grafana/pull/59517), [@ryantxu](https://github.com/ryantxu)
|
||||
- **Snapshots:** Add snapshot enable config. [#61587](https://github.com/grafana/grafana/pull/61587), [@leandro-deveikis](https://github.com/leandro-deveikis)
|
||||
- **Table Panel:** Refactor Cell Options to Allow for Options per Cell Type. [#59363](https://github.com/grafana/grafana/pull/59363), [@codeincarnate](https://github.com/codeincarnate)
|
||||
- **Table panel:** Use link elements instead of div elements with on click events to aid with keyboard accessibility. [#59393](https://github.com/grafana/grafana/pull/59393), [@oscarkilhed](https://github.com/oscarkilhed)
|
||||
- **TablePanel:** Improve and align table styles with the rest of Grafana. [#60365](https://github.com/grafana/grafana/pull/60365), [@torkelo](https://github.com/torkelo)
|
||||
- **Teams:** Support paginating and filtering more then 1000 teams. [#58761](https://github.com/grafana/grafana/pull/58761), [@kalleep](https://github.com/kalleep)
|
||||
- **Teams:** Use generated TS types. [#60618](https://github.com/grafana/grafana/pull/60618), [@Clarity-89](https://github.com/Clarity-89)
|
||||
- **Tempo:** Trace to logs custom query with interpolation. [#61702](https://github.com/grafana/grafana/pull/61702), [@aocenas](https://github.com/aocenas)
|
||||
- **Tempo:** Update column width for Loki search. [#61924](https://github.com/grafana/grafana/pull/61924), [@joey-grafana](https://github.com/joey-grafana)
|
||||
- **Tempo:** Update docs and default Tempo metrics query. [#62185](https://github.com/grafana/grafana/pull/62185), [@joey-grafana](https://github.com/joey-grafana)
|
||||
- **TestDatasource:** Add scenario for generating trace data. [#59299](https://github.com/grafana/grafana/pull/59299), [@aocenas](https://github.com/aocenas)
|
||||
- **TextPanel:** Refactor to functional component. [#60885](https://github.com/grafana/grafana/pull/60885), [@ryantxu](https://github.com/ryantxu)
|
||||
- **Theme:** Use `Inter` font by default. [#59544](https://github.com/grafana/grafana/pull/59544), [@ashharrison90](https://github.com/ashharrison90)
|
||||
- **Trace View:** Disallow a span colour that is the same or looks similar to previous colour. [#58146](https://github.com/grafana/grafana/pull/58146), [@joey-grafana](https://github.com/joey-grafana)
|
||||
- **Tracing:** Add keyboard accessibility to SpanDetailRow. [#59412](https://github.com/grafana/grafana/pull/59412), [@joey-grafana](https://github.com/joey-grafana)
|
||||
- **Transformations:** Add context parameter to transformDataFrame and operators. [#60694](https://github.com/grafana/grafana/pull/60694), [@torkelo](https://github.com/torkelo)
|
||||
- **Transformations:** Extract JSON Paths. [#59400](https://github.com/grafana/grafana/pull/59400), [@NiklasCi](https://github.com/NiklasCi)
|
||||
- **Transformations:** Grouping to matrix empty value option. [#55591](https://github.com/grafana/grafana/pull/55591), [@hugo082](https://github.com/hugo082)
|
||||
- **UsageInsights:** Record events for Explore queries. [#59931](https://github.com/grafana/grafana/pull/59931), [@daniellee](https://github.com/daniellee)
|
||||
- **Variables:** Support for colons in time variables custom format. [#61404](https://github.com/grafana/grafana/pull/61404), [@yesoreyeram](https://github.com/yesoreyeram)
|
||||
|
||||
### Bug fixes
|
||||
|
||||
- **Alerting:** Fix ConditionsCmd No Data for "has no value". [#58634](https://github.com/grafana/grafana/pull/58634), [@grobinson-grafana](https://github.com/grobinson-grafana)
|
||||
- **Alerting:** Fix evaluation timeout. [#61303](https://github.com/grafana/grafana/pull/61303), [@yuri-tceretian](https://github.com/yuri-tceretian)
|
||||
- **Alerting:** Redo refactoring from reverted fix in #56812. [#61051](https://github.com/grafana/grafana/pull/61051), [@grobinson-grafana](https://github.com/grobinson-grafana)
|
||||
- **Alerting:** Set Dashboard and Panel IDs on rule group replacement. [#60374](https://github.com/grafana/grafana/pull/60374), [@alexmobo](https://github.com/alexmobo)
|
||||
- **Alerting:** Store alertmanager configuration history in a separate table in the database. [#60197](https://github.com/grafana/grafana/pull/60197), [@alexweav](https://github.com/alexweav)
|
||||
- **Azure Monitor:** Fix health check for empty default subscription. [#60569](https://github.com/grafana/grafana/pull/60569), [@andresmgot](https://github.com/andresmgot)
|
||||
- **Barchart:** Fix erroneous tooltip value. [#61455](https://github.com/grafana/grafana/pull/61455), [@mdvictor](https://github.com/mdvictor)
|
||||
- **Candlestick:** Fix showing hidden legend values. [#60971](https://github.com/grafana/grafana/pull/60971), [@zoltanbedi](https://github.com/zoltanbedi)
|
||||
- **CloudWatch:** Fix logs insights deeplink. [#59906](https://github.com/grafana/grafana/pull/59906), [@fridgepoet](https://github.com/fridgepoet)
|
||||
- **Cloudmonitor:** Refactor query builder. [#61410](https://github.com/grafana/grafana/pull/61410), [@aangelisc](https://github.com/aangelisc)
|
||||
- **Command Palette:** Links now work when grafana is served under a subpath. [#60033](https://github.com/grafana/grafana/pull/60033), [@ashharrison90](https://github.com/ashharrison90)
|
||||
- **CommandPalette:** Fix long dashboard names freezing the browser. [#61278](https://github.com/grafana/grafana/pull/61278), [@joshhunt](https://github.com/joshhunt)
|
||||
- **DataFrame:** Add explicit histogram frame type. [#61195](https://github.com/grafana/grafana/pull/61195), [@leeoniya](https://github.com/leeoniya)
|
||||
- **Dropdown:** Make escape close a dropdown. [#62098](https://github.com/grafana/grafana/pull/62098), [@ashharrison90](https://github.com/ashharrison90)
|
||||
- **Explore:** Fix a11y issue with show all series button in Graph. [#58943](https://github.com/grafana/grafana/pull/58943), [@Elfo404](https://github.com/Elfo404)
|
||||
- **Explore:** Fixes explore page height and margin issues. [#59865](https://github.com/grafana/grafana/pull/59865), [@torkelo](https://github.com/torkelo)
|
||||
- **Explore:** Re-initialize graph when number of series to show changes. [#60499](https://github.com/grafana/grafana/pull/60499), [@Elfo404](https://github.com/Elfo404)
|
||||
- **Fix:** Unlocking the UI for AuthProxy users. [#59507](https://github.com/grafana/grafana/pull/59507), [@gamab](https://github.com/gamab)
|
||||
- **GrafanaUI:** Checkbox description fix. [#61929](https://github.com/grafana/grafana/pull/61929), [@juanicabanas](https://github.com/juanicabanas)
|
||||
- **LDAP:** Disable user in case it has been removed from LDAP directory. [#60231](https://github.com/grafana/grafana/pull/60231), [@mgyongyosi](https://github.com/mgyongyosi)
|
||||
- **LibraryPanels:** Fix issue where viewer with folder edit permissions could not update library panel. [#58420](https://github.com/grafana/grafana/pull/58420), [@kaydelaney](https://github.com/kaydelaney)
|
||||
- **Loki Query Builder:** Fix bug parsing range params. [#61678](https://github.com/grafana/grafana/pull/61678), [@matyax](https://github.com/matyax)
|
||||
- **MultiSelect:** Fix `actionMeta` not available in `onChange` callback. [#62339](https://github.com/grafana/grafana/pull/62339), [@svennergr](https://github.com/svennergr)
|
||||
- **Navigation:** Fix finding the active nav item for plugins. [#62123](https://github.com/grafana/grafana/pull/62123), [@leventebalogh](https://github.com/leventebalogh)
|
||||
- **PanelChrome:** Allow hovering on description when status error is visible. [#61757](https://github.com/grafana/grafana/pull/61757), [@ivanortegaalba](https://github.com/ivanortegaalba)
|
||||
- **PanelEditor:** Fixes issue where panel edit would show the panel plugin options of the previous edit panel. [#59861](https://github.com/grafana/grafana/pull/59861), [@torkelo](https://github.com/torkelo)
|
||||
- **PublicDashboards:** Footer alignment fix for Firefox browser. [#62108](https://github.com/grafana/grafana/pull/62108), [@juanicabanas](https://github.com/juanicabanas)
|
||||
- **PublicDashboards:** Footer position fix. [#61954](https://github.com/grafana/grafana/pull/61954), [@juanicabanas](https://github.com/juanicabanas)
|
||||
- **RBAC:** Fix DeleteUserPermissions not being called on Upsert org sync. [#60531](https://github.com/grafana/grafana/pull/60531), [@Jguer](https://github.com/Jguer)
|
||||
- **RBAC:** Handle edge case where there is duplicated acl entries for a role on a single dashboard. [#58079](https://github.com/grafana/grafana/pull/58079), [@kalleep](https://github.com/kalleep)
|
||||
- **Resource Query Cache:** Do not store 207 status codes. (Enterprise)
|
||||
- **SAML:** Do not register SAML support bundle collector when SAML is disabled. (Enterprise)
|
||||
- **SSE:** Fix math expression to support NoData results. [#61721](https://github.com/grafana/grafana/pull/61721), [@yuri-tceretian](https://github.com/yuri-tceretian)
|
||||
- **Security:** Fix XSS in runbook URL. [#59540](https://github.com/grafana/grafana/pull/59540), [@dsotirakis](https://github.com/dsotirakis)
|
||||
- **TimeSeries:** Better y-axis ticks for IEC units. [#59984](https://github.com/grafana/grafana/pull/59984), [@leeoniya](https://github.com/leeoniya)
|
||||
- **TimeSeries:** Fix rendering when zooming to time ranges between datapoints. [#59444](https://github.com/grafana/grafana/pull/59444), [@leeoniya](https://github.com/leeoniya)
|
||||
- **TimeSeries:** Fix y-axis Yes/No and On/Off boolean units. [#61207](https://github.com/grafana/grafana/pull/61207), [@leeoniya](https://github.com/leeoniya)
|
||||
- **Traces:** Fix for multiple $\_\_tags in trace to metrics. [#59641](https://github.com/grafana/grafana/pull/59641), [@joey-grafana](https://github.com/joey-grafana)
|
||||
- **Variables:** Allow user to filter values in dropdown using white space. [#60622](https://github.com/grafana/grafana/pull/60622), [@yusuf-multhan](https://github.com/yusuf-multhan)
|
||||
|
||||
### Breaking changes
|
||||
|
||||
Removes the non-functional feature toggle `influxdbBackendMigration`. InfluxDB is working %100 with server access mode. You can keep using your dashboards, and data sources as you have been using. This won't affect them. If you are upgrading from older versions of Grafana please be sure to check your dashboard config and check for warnings. Issue [#61308](https://github.com/grafana/grafana/issues/61308)
|
||||
|
||||
Removes support for "detected fields" in the details of a log line, however all supported interactions (filter, statistics, visibility) are now supported for all fields. If you are using Loki you can get those fields back by using a parser operation like `logfmt` or `json`.
|
||||
Issue [#60448](https://github.com/grafana/grafana/issues/60448)
|
||||
|
||||
### Deprecations
|
||||
|
||||
In the elasticsearch data source, the "Raw document" display mode is deprecated. We recommend using the "Raw Data" mode instead. Issue [#62236](https://github.com/grafana/grafana/issues/62236)
|
||||
|
||||
Sentry frontend logging provider will be removed with next major version. Issue [#60165](https://github.com/grafana/grafana/issues/60165)
|
||||
|
||||
### Plugin development fixes & changes
|
||||
|
||||
- **FileDropzone:** Display max file size. [#62334](https://github.com/grafana/grafana/pull/62334), [@oscarkilhed](https://github.com/oscarkilhed)
|
||||
- **Chore:** Bump d3-color to 3.1.0. [#61609](https://github.com/grafana/grafana/pull/61609), [@jackw](https://github.com/jackw)
|
||||
- **UI/Alert:** Infer the `role` property based on the `severity`. [#61242](https://github.com/grafana/grafana/pull/61242), [@leventebalogh](https://github.com/leventebalogh)
|
||||
- **PanelChrome:** Menu is wrapped in a render prop for full outside control. [#60537](https://github.com/grafana/grafana/pull/60537), [@polibb](https://github.com/polibb)
|
||||
- **Toolkit:** Deprecate all plugin related commands. [#60290](https://github.com/grafana/grafana/pull/60290), [@academo](https://github.com/academo)
|
||||
- **Grafana UI:** Add experimental InteractiveTable component. [#58223](https://github.com/grafana/grafana/pull/58223), [@Elfo404](https://github.com/Elfo404)
|
||||
|
||||
<!-- 9.3.11 START -->
|
||||
|
||||
# 9.3.11 (2023-03-22)
|
||||
|
||||
### Bug fixes
|
||||
|
||||
- **Alerting:** Update scheduler to receive rule updates only from database. [#64662](https://github.com/grafana/grafana/pull/64662), [@yuri-tceretian](https://github.com/yuri-tceretian)
|
||||
- **Chore:** Update Grafana to use Alertmanager v0.25.1-0.20230308154952-78fedf89728b. [#64784](https://github.com/grafana/grafana/pull/64784), [@yuri-tceretian](https://github.com/yuri-tceretian)
|
||||
|
||||
<!-- 9.3.11 END -->
|
||||
|
||||
<!-- 9.3.8 START -->
|
||||
|
||||
# 9.3.8 (2023-02-28)
|
||||
|
||||
<!-- 9.3.8 END -->
|
||||
|
||||
<!-- 9.3.7 START -->
|
||||
|
||||
# 9.3.7 (2023-02-28)
|
||||
|
||||
### Bug fixes
|
||||
|
||||
- **Alerting:** Validate that tags are 100 characters or less. [#62335](https://github.com/grafana/grafana/pull/62335), [@grobinson-grafana](https://github.com/grobinson-grafana)
|
||||
- **Expressions:** Fixes the issue showing expressions editor. [#62510](https://github.com/grafana/grafana/pull/62510), [@itsmylife](https://github.com/itsmylife)
|
||||
- **Logs:** Fix stats not being updated when log results change. [#62317](https://github.com/grafana/grafana/pull/62317), [@svennergr](https://github.com/svennergr)
|
||||
- **Plugins:** Fix circular reference in customOptions leading to MarshalJSON errors. [#62328](https://github.com/grafana/grafana/pull/62328), [@yoziru](https://github.com/yoziru)
|
||||
- **Time Series Panel:** Fix legend text selection in Firefox. [#60809](https://github.com/grafana/grafana/pull/60809), [@codeincarnate](https://github.com/codeincarnate)
|
||||
|
||||
<!-- 9.3.7 END -->
|
||||
<!-- 9.4.0-beta1 END -->
|
||||
<!-- 9.3.6 START -->
|
||||
|
||||
# 9.3.6 (2023-01-26)
|
||||
@@ -722,16 +324,6 @@ The following functions and classes related to logs are deprecated in the `grafa
|
||||
- **Toolkit:** Deprecate `component:create` command. [#56086](https://github.com/grafana/grafana/pull/56086), [@academo](https://github.com/academo)
|
||||
- **Toolkit:** Remove changelog command. [#56073](https://github.com/grafana/grafana/pull/56073), [@gitstart](https://github.com/gitstart)
|
||||
|
||||
<!-- 9.2.15 START -->
|
||||
|
||||
# 9.2.15 (2023-03-22)
|
||||
|
||||
<!-- 9.2.15 END -->
|
||||
|
||||
<!-- 9.2.13 START -->
|
||||
|
||||
<!-- 9.2.13 END -->
|
||||
|
||||
<!-- 9.2.10 START -->
|
||||
|
||||
# 9.2.10 (2023-01-24)
|
||||
@@ -2414,18 +2006,6 @@ In the Loki data source, for consistency and performance reasons, we changed how
|
||||
|
||||
The dependency to [grafana/aws-sdk](https://github.com/grafana/grafana-aws-sdk-react) is moved from [grafana/ui](https://github.com/grafana/grafana/blob/main/packages/grafana-ui/package.json) to the plugin. This means that any plugin that use SIGV4 auth need to pass a SIGV4 editor component as a prop to the `DataSourceHttpSettings` component. Issue [#43559](https://github.com/grafana/grafana/issues/43559)
|
||||
|
||||
<!-- 8.5.22 START -->
|
||||
|
||||
# 8.5.22 (2023-03-22)
|
||||
|
||||
<!-- 8.5.22 END -->
|
||||
|
||||
<!-- 8.5.21 START -->
|
||||
|
||||
# 8.5.21 (2023-02-28)
|
||||
|
||||
<!-- 8.5.21 END -->
|
||||
|
||||
<!-- 8.5.20 START -->
|
||||
|
||||
# 8.5.20 (2023-01-25)
|
||||
|
||||
40
Dockerfile
40
Dockerfile
@@ -1,14 +1,13 @@
|
||||
# syntax=docker/dockerfile:1
|
||||
|
||||
ARG BASE_IMAGE=alpine:3.17
|
||||
ARG JS_IMAGE=node:18-alpine3.17
|
||||
ARG JS_PLATFORM=linux/amd64
|
||||
ARG GO_IMAGE=golang:1.20.3-alpine3.17
|
||||
ARG BASE_IMAGE=alpine:3.15
|
||||
ARG JS_IMAGE=node:18-alpine3.15
|
||||
ARG GO_IMAGE=golang:1.19.4-alpine3.17
|
||||
|
||||
ARG GO_SRC=go-builder
|
||||
ARG JS_SRC=js-builder
|
||||
|
||||
FROM --platform=${JS_PLATFORM} ${JS_IMAGE} as js-builder
|
||||
FROM ${JS_IMAGE} as js-builder
|
||||
|
||||
ENV NODE_OPTIONS=--max_old_space_size=8000
|
||||
|
||||
@@ -19,7 +18,7 @@ COPY .yarn .yarn
|
||||
COPY packages packages
|
||||
COPY plugins-bundled plugins-bundled
|
||||
|
||||
RUN yarn install --immutable
|
||||
RUN yarn install
|
||||
|
||||
COPY tsconfig.json .eslintrc .editorconfig .browserslistrc .prettierrc.js babel.config.json .linguirc ./
|
||||
COPY public public
|
||||
@@ -31,15 +30,9 @@ RUN yarn build
|
||||
|
||||
FROM ${GO_IMAGE} as go-builder
|
||||
|
||||
ARG COMMIT_SHA=""
|
||||
ARG BUILD_BRANCH=""
|
||||
ARG GO_BUILD_TAGS="oss"
|
||||
ARG WIRE_TAGS="oss"
|
||||
ARG BINGO="true"
|
||||
|
||||
# Install build dependencies
|
||||
RUN if grep -i -q alpine /etc/issue; then \
|
||||
apk add --no-cache gcc g++ make git; \
|
||||
apk add --no-cache gcc g++ make; \
|
||||
fi
|
||||
|
||||
WORKDIR /tmp/grafana
|
||||
@@ -47,28 +40,22 @@ WORKDIR /tmp/grafana
|
||||
COPY go.* ./
|
||||
COPY .bingo .bingo
|
||||
|
||||
RUN go mod download
|
||||
RUN if [[ "$BINGO" = "true" ]]; then \
|
||||
go install github.com/bwplotka/bingo@latest && \
|
||||
bingo get -v; \
|
||||
fi
|
||||
RUN go mod download && \
|
||||
go install github.com/bwplotka/bingo@latest && \
|
||||
bingo get
|
||||
|
||||
COPY embed.go Makefile build.go package.json ./
|
||||
COPY cue.mod cue.mod
|
||||
COPY kinds kinds
|
||||
COPY local local
|
||||
COPY packages/grafana-schema packages/grafana-schema
|
||||
COPY public/app/plugins public/app/plugins
|
||||
COPY public/api-merged.json public/api-merged.json
|
||||
COPY public/api-spec.json public/api-spec.json
|
||||
COPY pkg pkg
|
||||
COPY scripts scripts
|
||||
COPY conf conf
|
||||
COPY .github .github
|
||||
|
||||
ENV COMMIT_SHA=${COMMIT_SHA}
|
||||
ENV BUILD_BRANCH=${BUILD_BRANCH}
|
||||
|
||||
RUN make build-go GO_BUILD_TAGS=${GO_BUILD_TAGS} WIRE_TAGS=${WIRE_TAGS}
|
||||
RUN make build-go
|
||||
|
||||
FROM ${BASE_IMAGE} as tgz-builder
|
||||
|
||||
@@ -105,7 +92,7 @@ WORKDIR $GF_PATHS_HOME
|
||||
|
||||
# Install dependencies
|
||||
RUN if grep -i -q alpine /etc/issue; then \
|
||||
apk add --no-cache ca-certificates bash curl tzdata musl-utils && \
|
||||
apk add --no-cache ca-certificates bash tzdata musl-utils && \
|
||||
apk info -vv | sort; \
|
||||
elif grep -i -q ubuntu /etc/issue; then \
|
||||
DEBIAN_FRONTEND=noninteractive && \
|
||||
@@ -119,12 +106,11 @@ RUN if grep -i -q alpine /etc/issue; then \
|
||||
|
||||
# glibc support for alpine x86_64 only
|
||||
RUN if grep -i -q alpine /etc/issue && [ `arch` = "x86_64" ]; then \
|
||||
wget -q -O /etc/apk/keys/sgerrand.rsa.pub https://alpine-pkgs.sgerrand.com/sgerrand.rsa.pub && \
|
||||
wget https://github.com/sgerrand/alpine-pkg-glibc/releases/download/2.35-r0/glibc-2.35-r0.apk \
|
||||
-O /tmp/glibc-2.35-r0.apk && \
|
||||
wget https://github.com/sgerrand/alpine-pkg-glibc/releases/download/2.35-r0/glibc-bin-2.35-r0.apk \
|
||||
-O /tmp/glibc-bin-2.35-r0.apk && \
|
||||
apk add --force-overwrite --no-cache /tmp/glibc-2.35-r0.apk /tmp/glibc-bin-2.35-r0.apk && \
|
||||
apk add --no-cache --allow-untrusted /tmp/glibc-2.35-r0.apk /tmp/glibc-bin-2.35-r0.apk && \
|
||||
rm -f /lib64/ld-linux-x86-64.so.2 && \
|
||||
ln -s /usr/glibc-compat/lib64/ld-linux-x86-64.so.2 /lib64/ld-linux-x86-64.so.2 && \
|
||||
rm -f /tmp/glibc-2.35-r0.apk && \
|
||||
|
||||
@@ -99,7 +99,7 @@ The current team members are:
|
||||
- Ryan McKinley ([Grafana Labs](https://grafana.com/))
|
||||
- Sofia Papagiannaki ([Grafana Labs](https://grafana.com/))
|
||||
- Stephanie Closson ([Grafana Labs](https://grafana.com/))
|
||||
- Tobias Skarhed ([Grafana Labs](https://grafana.com/))
|
||||
- Tobias Skarhed ([CERN](https://home.web.cern.ch/))
|
||||
- Torkel Ödegaard ([Grafana Labs](https://grafana.com/))
|
||||
- Utkarsh Bhatnagar ([Tinder](https://www.tinder.com/))
|
||||
- Will Browne ([Grafana Labs](https://grafana.com/))
|
||||
|
||||
42
Makefile
42
Makefile
@@ -16,8 +16,6 @@ GO_BUILD_FLAGS += $(if $(GO_BUILD_DEV),-dev)
|
||||
GO_BUILD_FLAGS += $(if $(GO_BUILD_DEV),-dev)
|
||||
GO_BUILD_FLAGS += $(if $(GO_BUILD_TAGS),-build-tags=$(GO_BUILD_TAGS))
|
||||
|
||||
targets := $(shell echo '$(sources)' | tr "," " ")
|
||||
|
||||
all: deps build
|
||||
|
||||
##@ Dependencies
|
||||
@@ -51,7 +49,6 @@ $(SPEC_TARGET): $(SWAGGER) ## Generate API Swagger specification
|
||||
-x "github.com/prometheus/alertmanager" \
|
||||
-i pkg/api/swagger_tags.json \
|
||||
--exclude-tag=alpha
|
||||
go run pkg/services/ngalert/api/tooling/cmd/clean-swagger/main.go -if $@ -of $@
|
||||
|
||||
swagger-api-spec: gen-go $(SPEC_TARGET) $(MERGED_SPEC_TARGET) validate-api-spec
|
||||
|
||||
@@ -59,7 +56,7 @@ validate-api-spec: $(MERGED_SPEC_TARGET) $(SWAGGER) ## Validate API spec
|
||||
$(SWAGGER) validate $(<)
|
||||
|
||||
clean-api-spec:
|
||||
rm -f $(SPEC_TARGET) $(MERGED_SPEC_TARGET) $(OAPI_SPEC_TARGET)
|
||||
rm $(SPEC_TARGET) $(MERGED_SPEC_TARGET) $(OAPI_SPEC_TARGET)
|
||||
|
||||
##@ OpenAPI 3
|
||||
OAPI_SPEC_TARGET = public/openapi3.json
|
||||
@@ -77,7 +74,7 @@ gen-cue: ## Do all CUE/Thema code generation
|
||||
|
||||
gen-go: $(WIRE) gen-cue
|
||||
@echo "generate go files"
|
||||
$(WIRE) gen -tags $(WIRE_TAGS) ./pkg/server
|
||||
$(WIRE) gen -tags $(WIRE_TAGS) ./pkg/server ./pkg/cmd/grafana-cli/runner
|
||||
|
||||
fix-cue: $(CUE)
|
||||
@echo "formatting cue files"
|
||||
@@ -87,7 +84,7 @@ fix-cue: $(CUE)
|
||||
gen-jsonnet:
|
||||
go generate ./devenv/jsonnet
|
||||
|
||||
build-go: gen-go ## Build all Go binaries.
|
||||
build-go: $(MERGED_SPEC_TARGET) gen-go ## Build all Go binaries.
|
||||
@echo "build go files"
|
||||
$(GO) run build.go $(GO_BUILD_FLAGS) build
|
||||
|
||||
@@ -165,36 +162,19 @@ shellcheck: $(SH_FILES) ## Run checks for shell scripts.
|
||||
|
||||
##@ Docker
|
||||
|
||||
TAG_SUFFIX=$(if $(WIRE_TAGS)!=oss,-$(WIRE_TAGS))
|
||||
PLATFORM=linux/amd64
|
||||
|
||||
build-docker-full: ## Build Docker image for development.
|
||||
@echo "build docker container"
|
||||
tar -ch . | \
|
||||
docker buildx build - \
|
||||
--platform $(PLATFORM) \
|
||||
--build-arg BINGO=false \
|
||||
--build-arg GO_BUILD_TAGS=$(GO_BUILD_TAGS) \
|
||||
--build-arg WIRE_TAGS=$(WIRE_TAGS) \
|
||||
--build-arg COMMIT_SHA=$$(git rev-parse --short HEAD) \
|
||||
--build-arg BUILD_BRANCH=$$(git rev-parse --abbrev-ref HEAD) \
|
||||
--tag grafana/grafana$(TAG_SUFFIX):dev \
|
||||
$(DOCKER_BUILD_ARGS)
|
||||
DOCKER_BUILDKIT=1 \
|
||||
docker build \
|
||||
--tag grafana/grafana:dev .
|
||||
|
||||
build-docker-full-ubuntu: ## Build Docker image based on Ubuntu for development.
|
||||
@echo "build docker container"
|
||||
tar -ch . | \
|
||||
docker buildx build - \
|
||||
--platform $(PLATFORM) \
|
||||
--build-arg BINGO=false \
|
||||
--build-arg GO_BUILD_TAGS=$(GO_BUILD_TAGS) \
|
||||
--build-arg WIRE_TAGS=$(WIRE_TAGS) \
|
||||
--build-arg COMMIT_SHA=$$(git rev-parse --short HEAD) \
|
||||
--build-arg BUILD_BRANCH=$$(git rev-parse --abbrev-ref HEAD) \
|
||||
DOCKER_BUILDKIT=1 \
|
||||
docker build \
|
||||
--build-arg BASE_IMAGE=ubuntu:20.04 \
|
||||
--build-arg GO_IMAGE=golang:1.20.3 \
|
||||
--tag grafana/grafana$(TAG_SUFFIX):dev-ubuntu \
|
||||
$(DOCKER_BUILD_ARGS)
|
||||
--build-arg GO_IMAGE=golang:1.19.4 \
|
||||
--tag grafana/grafana:dev-ubuntu .
|
||||
|
||||
##@ Services
|
||||
|
||||
@@ -205,6 +185,8 @@ devenv:
|
||||
@printf 'You have to define sources for this command \nexample: make devenv sources=postgres,openldap\n'
|
||||
else
|
||||
devenv: devenv-down ## Start optional services, e.g. postgres, prometheus, and elasticsearch.
|
||||
$(eval targets := $(shell echo '$(sources)' | tr "," " "))
|
||||
|
||||
@cd devenv; \
|
||||
./create_docker_compose.sh $(targets) || \
|
||||
(rm -rf {docker-compose.yaml,conf.tmp,.env}; exit 1)
|
||||
|
||||
@@ -90,14 +90,6 @@ read_timeout = 0
|
||||
#exampleHeader1 = exampleValue1
|
||||
#exampleHeader2 = exampleValue2
|
||||
|
||||
#################################### GRPC Server #########################
|
||||
[grpc_server]
|
||||
network = "tcp"
|
||||
address = "127.0.0.1:10000"
|
||||
use_tls = false
|
||||
cert_file =
|
||||
key_file =
|
||||
|
||||
#################################### Database ############################
|
||||
[database]
|
||||
# You can configure the database connection by specifying type, host, name, user and password
|
||||
@@ -221,9 +213,6 @@ response_limit = 0
|
||||
# Limits the number of rows that Grafana will process from SQL data sources.
|
||||
row_limit = 1000000
|
||||
|
||||
# Sets a custom value for the `User-Agent` header for outgoing data proxy requests. If empty, the default value is `Grafana/<BuildVersion>` (for example `Grafana/9.0.0`).
|
||||
user_agent =
|
||||
|
||||
#################################### Analytics ###########################
|
||||
[analytics]
|
||||
# Server reporting, sends usage counters to stats.grafana.org every 24 hours.
|
||||
@@ -273,9 +262,6 @@ rudderstack_sdk_url =
|
||||
# Rudderstack Config url, optional, used by Rudderstack SDK to fetch source config
|
||||
rudderstack_config_url =
|
||||
|
||||
# Intercom secret, optional, used to hash user_id before passing to Intercom via Rudderstack
|
||||
intercom_secret =
|
||||
|
||||
# Application Insights connection string. Specify an URL string to enable this feature.
|
||||
application_insights_connection_string =
|
||||
|
||||
@@ -413,21 +399,6 @@ default_home_dashboard_path =
|
||||
# Upper limit of data sources that Grafana will return. This limit is a temporary configuration and it will be deprecated when pagination will be introduced on the list data sources API.
|
||||
datasource_limit = 5000
|
||||
|
||||
|
||||
################################### SQL Data Sources #####################
|
||||
[sql_datasources]
|
||||
# Default maximum number of open connections maintained in the connection pool
|
||||
# when connecting to SQL based data sources
|
||||
max_open_conns_default = 100
|
||||
|
||||
# Default maximum number of idle connections maintained in the connection pool
|
||||
# when connecting to SQL based data sources
|
||||
max_idle_conns_default = 100
|
||||
|
||||
# Default maximum connection lifetime used when connecting
|
||||
# to SQL based data sources.
|
||||
max_conn_lifetime_default = 14400
|
||||
|
||||
#################################### Users ###############################
|
||||
[users]
|
||||
# disable user signup / registration
|
||||
@@ -516,7 +487,6 @@ oauth_auto_login = false
|
||||
oauth_state_cookie_max_age = 600
|
||||
|
||||
# Skip forced assignment of OrgID 1 or 'auto_assign_org_id' for social logins
|
||||
# Deprecated, use skip_org_role_sync option for specific provider instead.
|
||||
oauth_skip_org_role_update_sync = false
|
||||
|
||||
# limit of api_key seconds to live before expiration
|
||||
@@ -547,8 +517,6 @@ hide_version = false
|
||||
|
||||
#################################### GitHub Auth #########################
|
||||
[auth.github]
|
||||
name = GitHub
|
||||
icon = github
|
||||
enabled = false
|
||||
allow_sign_up = true
|
||||
auto_login = false
|
||||
@@ -564,12 +532,9 @@ allowed_organizations =
|
||||
role_attribute_path =
|
||||
role_attribute_strict = false
|
||||
allow_assign_grafana_admin = false
|
||||
tls_skip_verify_insecure = false
|
||||
|
||||
#################################### GitLab Auth #########################
|
||||
[auth.gitlab]
|
||||
name = GitLab
|
||||
icon = gitlab
|
||||
enabled = false
|
||||
allow_sign_up = true
|
||||
auto_login = false
|
||||
@@ -585,12 +550,9 @@ role_attribute_path =
|
||||
role_attribute_strict = false
|
||||
allow_assign_grafana_admin = false
|
||||
skip_org_role_sync = false
|
||||
tls_skip_verify_insecure = false
|
||||
|
||||
#################################### Google Auth #########################
|
||||
[auth.google]
|
||||
name = Google
|
||||
icon = google
|
||||
enabled = false
|
||||
allow_sign_up = true
|
||||
auto_login = false
|
||||
@@ -603,7 +565,6 @@ api_url = https://www.googleapis.com/oauth2/v1/userinfo
|
||||
allowed_domains =
|
||||
hosted_domain =
|
||||
skip_org_role_sync = false
|
||||
tls_skip_verify_insecure = false
|
||||
|
||||
#################################### Grafana.com Auth ####################
|
||||
# legacy key names (so they work in env variables)
|
||||
@@ -616,8 +577,6 @@ scopes = user:email
|
||||
allowed_organizations =
|
||||
|
||||
[auth.grafana_com]
|
||||
name = Grafana.com
|
||||
icon = grafana
|
||||
enabled = false
|
||||
allow_sign_up = true
|
||||
auto_login = false
|
||||
@@ -629,8 +588,7 @@ skip_org_role_sync = false
|
||||
|
||||
#################################### Azure AD OAuth #######################
|
||||
[auth.azuread]
|
||||
name = Microsoft
|
||||
icon = microsoft
|
||||
name = Azure AD
|
||||
enabled = false
|
||||
allow_sign_up = true
|
||||
auto_login = false
|
||||
@@ -644,7 +602,6 @@ allowed_groups =
|
||||
role_attribute_strict = false
|
||||
allow_assign_grafana_admin = false
|
||||
force_use_graph_api = false
|
||||
tls_skip_verify_insecure = false
|
||||
|
||||
#################################### Okta OAuth #######################
|
||||
[auth.okta]
|
||||
@@ -665,7 +622,6 @@ role_attribute_path =
|
||||
role_attribute_strict = false
|
||||
allow_assign_grafana_admin = false
|
||||
skip_org_role_sync = false
|
||||
tls_skip_verify_insecure = false
|
||||
|
||||
#################################### Generic OAuth #######################
|
||||
[auth.generic_oauth]
|
||||
@@ -701,7 +657,6 @@ tls_client_ca =
|
||||
use_pkce = false
|
||||
auth_style =
|
||||
allow_assign_grafana_admin = false
|
||||
skip_org_role_sync = false
|
||||
|
||||
#################################### Basic Auth ##########################
|
||||
[auth.basic]
|
||||
@@ -943,9 +898,6 @@ global_alert_rule = -1
|
||||
# global limit of files uploaded to the SQL DB
|
||||
global_file = 1000
|
||||
|
||||
# global limit of correlations
|
||||
global_correlations = -1
|
||||
|
||||
#################################### Unified Alerting ####################
|
||||
[unified_alerting]
|
||||
# Enable the Unified Alerting sub-system and interface. When enabled we'll migrate all of your alert rules and notification channels to the new system. New alert rules will be created and your notification channels will be converted into an Alertmanager configuration. Previous data is preserved to enable backwards compatibility but new data is removed when switching. When this configuration section and flag are not defined, the state is defined at runtime. See the documentation for more details.
|
||||
@@ -1002,8 +954,7 @@ max_attempts = 3
|
||||
min_interval = 10s
|
||||
|
||||
[unified_alerting.screenshots]
|
||||
# Enable screenshots in notifications. You must have either installed the Grafana image rendering
|
||||
# plugin, or set up Grafana to use a remote rendering service.
|
||||
# Enable screenshots in notifications. This option requires the Grafana Image Renderer plugin.
|
||||
# For more information on configuration options, refer to [rendering].
|
||||
capture = false
|
||||
|
||||
@@ -1266,8 +1217,6 @@ plugin_admin_external_manage_enabled = false
|
||||
plugin_catalog_url = https://grafana.com/grafana/plugins/
|
||||
# Enter a comma-separated list of plugin identifiers to hide in the plugin catalog.
|
||||
plugin_catalog_hidden_plugins =
|
||||
# Log all backend requests for core and external plugins.
|
||||
log_backend_requests = false
|
||||
|
||||
#################################### Grafana Live ##########################################
|
||||
[live]
|
||||
@@ -1423,14 +1372,6 @@ max_crawl_duration =
|
||||
# This setting should be expressed as a duration. Examples: 10s (seconds), 1m (minutes).
|
||||
scheduler_interval =
|
||||
|
||||
#################################### Support Bundles #####################################
|
||||
[support_bundles]
|
||||
# Enable support bundle creation (default: true)
|
||||
enabled = true
|
||||
# Only server admins can generate and view support bundles (default: true)
|
||||
server_admin_only = true
|
||||
# If set, bundles will be encrypted with the provided public keys separated by whitespace
|
||||
public_keys = ""
|
||||
|
||||
#################################### Storage ################################################
|
||||
|
||||
|
||||
@@ -11,11 +11,6 @@ port = 389
|
||||
use_ssl = false
|
||||
# If set to true, use LDAP with STARTTLS instead of LDAPS
|
||||
start_tls = false
|
||||
# The value of an accepted TLS cipher. By default, this value is empty. Example value: ["TLS_AES_256_GCM_SHA384"])
|
||||
# For a complete list of supported ciphers and TLS versions, refer to: https://go.dev/src/crypto/tls/cipher_suites.go
|
||||
tls_ciphers = []
|
||||
# This is the minimum TLS version allowed. By default, this value is empty. Accepted values are: TLS1.1, TLS1.2, TLS1.3.
|
||||
min_tls_version = ""
|
||||
# set to true if you want to skip ssl cert validation
|
||||
ssl_skip_verify = false
|
||||
# set to the path to your root CA certificate or leave unset to use system defaults
|
||||
|
||||
@@ -91,14 +91,6 @@
|
||||
#exampleHeader1 = exampleValue1
|
||||
#exampleHeader2 = exampleValue2
|
||||
|
||||
#################################### GRPC Server #########################
|
||||
;[grpc_server]
|
||||
;network = "tcp"
|
||||
;address = "127.0.0.1:10000"
|
||||
;use_tls = false
|
||||
;cert_file =
|
||||
;key_file =
|
||||
|
||||
#################################### Database ####################################
|
||||
[database]
|
||||
# You can configure the database connection by specifying type, host, name, user and password
|
||||
@@ -228,9 +220,6 @@
|
||||
# Limits the number of rows that Grafana will process from SQL data sources.
|
||||
;row_limit = 1000000
|
||||
|
||||
# Sets a custom value for the `User-Agent` header for outgoing data proxy requests. If empty, the default value is `Grafana/<BuildVersion>` (for example `Grafana/9.0.0`).
|
||||
;user_agent =
|
||||
|
||||
#################################### Analytics ####################################
|
||||
[analytics]
|
||||
# Server reporting, sends usage counters to stats.grafana.org every 24 hours.
|
||||
@@ -280,9 +269,6 @@
|
||||
# Rudderstack Config url, optional, used by Rudderstack SDK to fetch source config
|
||||
;rudderstack_config_url =
|
||||
|
||||
# Intercom secret, optional, used to hash user_id before passing to Intercom via Rudderstack
|
||||
;intercom_secret =
|
||||
|
||||
# Controls if the UI contains any links to user feedback forms
|
||||
;feedback_links_enabled = true
|
||||
|
||||
@@ -427,7 +413,7 @@
|
||||
# Set this value to automatically add new users to the provided organization (if auto_assign_org above is set to true)
|
||||
;auto_assign_org_id = 1
|
||||
|
||||
# Default role new users will be automatically assigned (if auto_assign_org above is set to true)
|
||||
# Default role new users will be automatically assigned (if disabled above is set to true)
|
||||
;auto_assign_org_role = Viewer
|
||||
|
||||
# Require email validation before sign up completes
|
||||
@@ -502,7 +488,6 @@
|
||||
;oauth_state_cookie_max_age = 600
|
||||
|
||||
# Skip forced assignment of OrgID 1 or 'auto_assign_org_id' for social logins
|
||||
# Deprecated, use skip_org_role_sync option for specific provider instead.
|
||||
;oauth_skip_org_role_update_sync = false
|
||||
|
||||
# limit of api_key seconds to live before expiration
|
||||
@@ -536,8 +521,6 @@
|
||||
|
||||
#################################### GitHub Auth ##########################
|
||||
[auth.github]
|
||||
;name = GitHub
|
||||
;icon = github
|
||||
;enabled = false
|
||||
;allow_sign_up = true
|
||||
;auto_login = false
|
||||
@@ -556,8 +539,6 @@
|
||||
|
||||
#################################### GitLab Auth #########################
|
||||
[auth.gitlab]
|
||||
;name = GitLab
|
||||
;icon = gitlab
|
||||
;enabled = false
|
||||
;allow_sign_up = true
|
||||
;auto_login = false
|
||||
@@ -576,8 +557,6 @@
|
||||
|
||||
#################################### Google Auth ##########################
|
||||
[auth.google]
|
||||
;name = Google
|
||||
;icon = google
|
||||
;enabled = false
|
||||
;allow_sign_up = true
|
||||
;auto_login = false
|
||||
@@ -593,8 +572,6 @@
|
||||
|
||||
#################################### Grafana.com Auth ####################
|
||||
[auth.grafana_com]
|
||||
;name = Grafana.com
|
||||
;icon = grafana
|
||||
;enabled = false
|
||||
;allow_sign_up = true
|
||||
;auto_login = false
|
||||
@@ -606,8 +583,7 @@
|
||||
|
||||
#################################### Azure AD OAuth #######################
|
||||
[auth.azuread]
|
||||
;name = Microsoft
|
||||
;icon = microsoft
|
||||
;name = Azure AD
|
||||
;enabled = false
|
||||
;allow_sign_up = true
|
||||
;auto_login = false
|
||||
@@ -912,9 +888,6 @@
|
||||
# global limit of alerts
|
||||
;global_alert_rule = -1
|
||||
|
||||
# global limit of correlations
|
||||
; global_correlations = -1
|
||||
|
||||
#################################### Unified Alerting ####################
|
||||
[unified_alerting]
|
||||
#Enable the Unified Alerting sub-system and interface. When enabled we'll migrate all of your alert rules and notification channels to the new system. New alert rules will be created and your notification channels will be converted into an Alertmanager configuration. Previous data is preserved to enable backwards compatibility but new data is removed.```
|
||||
@@ -1203,8 +1176,6 @@
|
||||
;plugin_catalog_url = https://grafana.com/grafana/plugins/
|
||||
# Enter a comma-separated list of plugin identifiers to hide in the plugin catalog.
|
||||
;plugin_catalog_hidden_plugins =
|
||||
# Log all backend requests for core and external plugins.
|
||||
;log_backend_requests = false
|
||||
|
||||
#################################### Grafana Live ##########################################
|
||||
[live]
|
||||
@@ -1289,14 +1260,6 @@
|
||||
;grpc_host =
|
||||
;grpc_port =
|
||||
|
||||
[support_bundles]
|
||||
# Enable support bundle creation (default: true)
|
||||
#enabled = true
|
||||
# Only server admins can generate and view support bundles (default: true)
|
||||
#server_admin_only = true
|
||||
# If set, bundles will be encrypted with the provided public keys separated by whitespace
|
||||
#public_keys = ""
|
||||
|
||||
[enterprise]
|
||||
# Path to a valid Grafana Enterprise license.jwt file
|
||||
;license_path =
|
||||
|
||||
@@ -1,24 +1,98 @@
|
||||
# Backend
|
||||
|
||||
First read the [backend style guide](/contribute/backend/style-guide.md)
|
||||
to get a sense for how we work to ensure that the Grafana codebase is
|
||||
consistent and accessible. The rest of the backend contributor
|
||||
documentation is more relevant to reviewers and contributors looking to
|
||||
make larger changes.
|
||||
This document gives an overview of the directory structure, and ongoing refactorings.
|
||||
|
||||
For anyone reviewing code for Grafana's backend, a basic understanding
|
||||
of content of the following files is expected:
|
||||
For more information on developing for the backend:
|
||||
|
||||
- [Currently recommended practices](/contribute/backend/recommended-practices.md)
|
||||
- [Services](/contribute/backend/services.md)
|
||||
- [Communication](/contribute/backend/communication.md)
|
||||
- [Database](/contribute/backend/database.md)
|
||||
- [HTTP API](/pkg/api/README.md)
|
||||
- [Backend style guide](/contribute/backend/style-guide.md)
|
||||
- [Architecture](/contribute/architecture)
|
||||
|
||||
Reviewers who review large changes should additionally make a habit out
|
||||
of familiarizing themselves with the content of
|
||||
[/contribute/backend](/contribute/backend) from time to time.
|
||||
## Central folders of Grafana's backend
|
||||
|
||||
| folder | description |
|
||||
| --------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| /pkg/api | HTTP handlers and routing. Almost all handler funcs are global which is something we would like to improve in the future. Handlers should be associated with a struct that refers to all dependencies. |
|
||||
| /pkg/cmd | The binaries that we build: grafana-server and grafana-cli. |
|
||||
| /pkg/components | A mix of third-party packages and packages we have implemented ourselves. Includes our packages that have out-grown the util package and don't naturally belong somewhere else. |
|
||||
| /pkg/infra | Packages in infra should be packages that are used in multiple places in Grafana without knowing anything about the Grafana domain. |
|
||||
| /pkg/services | Packages in services are responsible for persisting domain objects and manage the relationship between domain objects. Services should communicate with each other using DI when possible. Most of Grafana's codebase still relies on global state for this. Any new features going forward should use DI. |
|
||||
| /pkg/tsdb | All backend implementations of the data sources in Grafana. Used by both Grafana's frontend and alerting. |
|
||||
| /pkg/util | Small helper functions that are used in multiple parts of the codebase. Many functions are placed directly in the util folders which is something we want to avoid. Its better to give the util function a more descriptive package name. Ex `errutil`. |
|
||||
|
||||
## Central components of Grafana's backend
|
||||
|
||||
| package | description |
|
||||
| ---------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| /pkg/bus | The bus is described in more details under [Communication](/contribute/backend/communication.md) |
|
||||
| /pkg/models | This is where we keep our domain model. This package should not depend on any package outside standard library. It does contain some references within Grafana but that is something we should avoid going forward. |
|
||||
| /pkg/registry | Package for managing services. |
|
||||
| /pkg/services/alerting | Grafana's alerting services. The alerting engine runs in a separate goroutine and shouldn't depend on anything else within Grafana. |
|
||||
| /pkg/services/sqlstore | Currently where the database logic resides. |
|
||||
| /pkg/setting | Anything related to Grafana global configuration should be dealt with in this package. |
|
||||
|
||||
## Dependency management
|
||||
|
||||
Refer to [UPGRADING_DEPENDENCIES.md](https://github.com/grafana/grafana/blob/main/UPGRADING_DEPENDENCIES.md).
|
||||
|
||||
## Ongoing refactoring
|
||||
|
||||
These issues are not something we want to address all at once but something we will improve incrementally. Since Grafana is released at a regular schedule the preferred approach is to do this in batches. Not only is it easier to review, but it also reduces the risk of conflicts when cherry-picking fixes from main to release branches. Please try to submit changes that span multiple locations at the end of the release cycle. We prefer to wait until the end because we make fewer patch releases at the end of the release cycle, so there are fewer opportunities for complications.
|
||||
|
||||
### Global state
|
||||
|
||||
Global state makes testing and debugging software harder and it's something we want to avoid when possible. Unfortunately, there is quite a lot of global state in Grafana.
|
||||
|
||||
We want to migrate away from this by using the `inject` package to wire up all dependencies either in `pkg/cmd/grafana-server/main.go` or self-registering using `registry.RegisterService` ex https://github.com/grafana/grafana/blob/main/pkg/services/cleanup/cleanup.go#L25.
|
||||
|
||||
### Limit the use of the init() function
|
||||
|
||||
Only use the init() function to register services/implementations.
|
||||
|
||||
### Settings refactoring
|
||||
|
||||
The plan is to move all settings to from package level vars in settings package to the [setting.Cfg](https://github.com/grafana/grafana/blob/df917663e6f358a076ed3daa9b199412e95c11f4/pkg/setting/setting.go#L210) struct. To access the settings, services and components can inject this setting.Cfg struct:
|
||||
|
||||
[Cfg struct](https://github.com/grafana/grafana/blob/df917663e6f358a076ed3daa9b199412e95c11f4/pkg/setting/setting.go#L210)
|
||||
[Injection example](https://github.com/grafana/grafana/blob/df917663e6f358a076ed3daa9b199412e95c11f4/pkg/services/cleanup/cleanup.go#L20)
|
||||
|
||||
### Reduce the use of GoConvey
|
||||
|
||||
We want to migrate away from using GoConvey. Instead, we want to use stdlib testing, because it's the most common approach in the Go community and we think it will be easier for new contributors. Read more about how we want to write tests in the [style guide](/contribute/backend/style-guide.md).
|
||||
|
||||
### Refactor SqlStore
|
||||
|
||||
The `sqlstore` handlers all use a global xorm engine variable. Refactor them to use the `SqlStore` instance.
|
||||
|
||||
### Avoid global HTTP handler functions
|
||||
|
||||
Refactor HTTP handlers so that the handler methods are on the HttpServer instance or a more detailed handler struct. E.g (AuthHandler). This ensures they get access to HttpServer service dependencies (and Cfg object) and can avoid global state.
|
||||
|
||||
### Date comparison
|
||||
|
||||
Store newly introduced date columns in the database as epochs if they require date comparison. This permits a unified approach for comparing dates against all the supported databases instead of handling dates differently for each database. Also, by comparing epochs, we no longer need error pruning transformations to and from other time zones.
|
||||
|
||||
### Avoid use of the simplejson package
|
||||
|
||||
Use of the `simplejson` package (`pkg/components/simplejson`) in place of types (Go structs) results in code that is difficult to maintain. Instead, create types for objects and use the Go standard library's [`encoding/json`](https://golang.org/pkg/encoding/json/) package.
|
||||
|
||||
### Provisionable\*
|
||||
|
||||
All new features that require state should be possible to configure using config files. For example:
|
||||
|
||||
- [Data sources](https://github.com/grafana/grafana/tree/main/pkg/services/provisioning/datasources)
|
||||
- [Alert notifiers](https://github.com/grafana/grafana/tree/main/pkg/services/provisioning/notifiers)
|
||||
- [Dashboards](https://github.com/grafana/grafana/tree/main/pkg/services/provisioning/dashboards)
|
||||
|
||||
Today its only possible to provision data sources and dashboards but this is something we want to support all over Grafana.
|
||||
|
||||
### Use context.Context "everywhere"
|
||||
|
||||
The package [context](https://golang.org/pkg/context/) should be used and propagated through all the layers of the code. For example the `context.Context` of an incoming API request should be propagated to any other layers being used such as the bus, service and database layers. Utility functions/methods normally doesn't need `context.Context` To follow best practices, any function/method that receives a context.Context argument should receive it as its first argument.
|
||||
|
||||
To be able to solve certain problems and/or implement and support certain features making sure that `context.Context` is passed down through all layers of the code is vital. Being able to provide contextual information for the full life-cycle of an API request allows us to use contextual logging, provide contextual information about the authenticated user, create multiple spans for a distributed trace of service calls and database queries etc.
|
||||
|
||||
Code should use `context.TODO` when it's unclear which Context to use or it is not yet available (because the surrounding function has not yet been extended to accept a `context.Context` argument).
|
||||
|
||||
More details in [Services](/contribute/backend/services.md), [Communication](/contribute/backend/communication.md) and [Database](/contribute/backend/database.md).
|
||||
|
||||
[Original design doc](https://docs.google.com/document/d/1ebUhUVXU8FlShezsN-C64T0dOoo-DaC9_r-c8gB2XEU/edit#).
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
# Communication
|
||||
|
||||
Grafana use dependency injection and method calls on Go interfaces to
|
||||
communicate between different parts of the backend.
|
||||
Grafana uses a _bus_ to pass messages between different parts of the application. All communication over the bus happens synchronously.
|
||||
|
||||
## Commands and queries
|
||||
|
||||
|
||||
@@ -1,169 +0,0 @@
|
||||
# Currently recommended practices
|
||||
|
||||
We occasionally identify patterns that are either useful or harmful that
|
||||
we'll want to introduce or remove from the codebase. When the complexity
|
||||
or importance of introducing or removing such a pattern is sufficiently
|
||||
high, we'll document it here to provide an addressable local
|
||||
'currently recommended practice'. By collecting these practices in a
|
||||
single place, we're able to reference them and make it easier to have a
|
||||
shared understanding of how to write idiomatic code for the Grafana
|
||||
backend.
|
||||
|
||||
Large-scale refactoring based on a new recommended practice is a
|
||||
delicate matter, and most of the time it's better to introduce the new
|
||||
way incrementally over multiple releases and over time to balance the
|
||||
want to introduce new useful patterns and the need to keep Grafana
|
||||
stable. It's also easier to review and revert smaller chunks of changes,
|
||||
reducing the risk of complications.
|
||||
|
||||
| State | Description |
|
||||
| ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| Proposed | The practice has been proposed and been positively received by the Grafana team. Following the proposal is a discretionary choice for developers. |
|
||||
| Ongoing, active | The practice is actively being worked on. New code should adhere to the practice where at all possible. |
|
||||
| Ongoing, passive | There is no immediate active work on refactoring old code. New code should adhere to the practice where at all possible. |
|
||||
| Completed | The work has been done and there is no, or negligible, legacy code left that need refactoring. New code must adhere to the practice. |
|
||||
| Abandoned | The practice has no longer any active ongoing work and new code don't need to comply with the practice described. |
|
||||
|
||||
## 1 - Idiomatic Grafana code should be idiomatic Go code
|
||||
|
||||
**Status:** Ongoing, passive.
|
||||
|
||||
It'll be easier for contributors to start contributing to Grafana if our
|
||||
code is easily understandable. When there isn't a more specific Grafana
|
||||
recommended practice, we recommend following the practices as put forth
|
||||
by the Go project for development of Go code or the Go compiler itself
|
||||
when applicable.
|
||||
|
||||
The first resource we recommend everyone developing Grafana's backend to
|
||||
skim is "[Effective Go](https://golang.org/doc/effective_go.html)",
|
||||
which isn't updated to reflect more recent changes since Go was
|
||||
initially released but remain a good source for understanding the
|
||||
general differences between Go and other languages.
|
||||
|
||||
Secondly, the guidelines for [Code Review Comments](https://github.com/golang/go/wiki/CodeReviewComments)
|
||||
for the Go compiler can mostly be applied directly to the Grafana
|
||||
codebase. There are idiosyncrasies in Grafana such as interfaces living
|
||||
closer to its declaration than to its users for services and don't
|
||||
enforce documentation of public declarations (prioritize high coverage
|
||||
of documentation aimed at end-users over documenting internals in the
|
||||
backend).
|
||||
|
||||
- [Effective Go](https://golang.org/doc/effective_go.html)
|
||||
- [Code Review Comments](https://github.com/golang/go/wiki/CodeReviewComments)
|
||||
|
||||
## 100 - Global state
|
||||
|
||||
**State:** Ongoing, passive.
|
||||
|
||||
Global state makes testing and debugging software harder, and it's something we want to avoid when possible. Unfortunately, there is quite a lot of global state in Grafana.
|
||||
|
||||
We want to migrate away from this by using
|
||||
[Wire](https://github.com/google/wire) and dependency injection to pack
|
||||
|
||||
## 101 - Limit the use of the init() function
|
||||
|
||||
**State:** Ongoing, passive.
|
||||
|
||||
Only use the init() function to register services/implementations.
|
||||
|
||||
## 102 - Settings refactoring
|
||||
|
||||
**State:** Ongoing, passive.
|
||||
|
||||
The plan is to move all settings to from package level vars in settings package to the [setting.Cfg](https://github.com/grafana/grafana/blob/df917663e6f358a076ed3daa9b199412e95c11f4/pkg/setting/setting.go#L210) struct. To access the settings, services and components can inject this setting.Cfg struct:
|
||||
|
||||
- [Cfg struct](https://github.com/grafana/grafana/blob/df917663e6f358a076ed3daa9b199412e95c11f4/pkg/setting/setting.go#L210)
|
||||
- [Injection example](https://github.com/grafana/grafana/blob/c9773e55b234b7637ea97b671161cd856a1d3d69/pkg/services/cleanup/cleanup.go#L34)
|
||||
|
||||
## 103 - Reduce the use of GoConvey
|
||||
|
||||
**State:** Completed.
|
||||
|
||||
We want to migrate away from using GoConvey. Instead, we want to use
|
||||
stdlib testing with [testify](https://github.com/stretchr/testify),
|
||||
because it's the most common approach in the Go community, and we think
|
||||
it will be easier for new contributors. Read more about how we want to
|
||||
write tests in the [style guide](/contribute/backend/style-guide.md).
|
||||
|
||||
## 104 - Refactor SqlStore
|
||||
|
||||
**State:** Completed.
|
||||
|
||||
The `sqlstore` handlers all use a global xorm engine variable. Refactor them to use the `SqlStore` instance.
|
||||
|
||||
## 105 - Avoid global HTTP handler functions
|
||||
|
||||
**State:** Ongoing, passive.
|
||||
|
||||
Refactor HTTP handlers so that the handler methods are on the HttpServer instance or a more detailed handler struct. E.g (AuthHandler). This ensures they get access to HttpServer service dependencies (and Cfg object) and can avoid global state.
|
||||
|
||||
## 106 - Date comparison
|
||||
|
||||
**State:** Ongoing, passive.
|
||||
|
||||
Store newly introduced date columns in the database as epoch based
|
||||
integers (i.e. unix timestamps) if they require date comparison. This
|
||||
permits a unified approach for comparing dates against all the supported
|
||||
databases instead of handling dates differently for each database. Also,
|
||||
by comparing epoch based integers, we no longer need error pruning
|
||||
transformations to and from other time zones.
|
||||
|
||||
## 107 - Avoid use of the simplejson package
|
||||
|
||||
**State:** Ongoing, passive
|
||||
|
||||
Use of the `simplejson` package (`pkg/components/simplejson`) in place
|
||||
of types (Go structs) results in code that is difficult to maintain.
|
||||
Instead, create types for objects and use the Go standard library's
|
||||
[`encoding/json`](https://golang.org/pkg/encoding/json/) package.
|
||||
|
||||
## 108 - Provisionable\*
|
||||
|
||||
**State:** Abandoned: Grafana's file based refactoring is limited to work natively only on on-premise installations of Grafana. We're looking at enhancing the use of the API to enable provisioning for all Grafana instances.
|
||||
|
||||
All new features that require state should be possible to configure using config files. For example:
|
||||
|
||||
- [Data sources](https://github.com/grafana/grafana/tree/main/pkg/services/provisioning/datasources)
|
||||
- [Alert notifiers](https://github.com/grafana/grafana/tree/main/pkg/services/provisioning/notifiers)
|
||||
- [Dashboards](https://github.com/grafana/grafana/tree/main/pkg/services/provisioning/dashboards)
|
||||
|
||||
Today it's only possible to provision data sources and dashboards but this is something we want to support all over Grafana.
|
||||
|
||||
### 109 - Use context.Context "everywhere"
|
||||
|
||||
**State:** Completed.
|
||||
|
||||
The package [context](https://golang.org/pkg/context/) should be used
|
||||
and propagated through all the layers of the code. For example the
|
||||
`context.Context` of an incoming API request should be propagated to any
|
||||
other layers being used such as the bus, service and database layers.
|
||||
Utility functions/methods normally doesn't need `context.Context`.
|
||||
To follow Go best practices, any function/method that receives a
|
||||
[`context.Context` argument should receive it as its first parameter](https://github.com/golang/go/wiki/CodeReviewComments#contexts).
|
||||
|
||||
To be able to solve certain problems and/or implement and support
|
||||
certain features making sure that `context.Context` is passed down
|
||||
through all layers of the code is vital. Being able to provide
|
||||
contextual information for the full life-cycle of an API request allows
|
||||
us to use contextual logging, provide contextual information about the
|
||||
authenticated user, create multiple spans for a distributed trace of
|
||||
service calls and database queries etc.
|
||||
|
||||
Code should use `context.TODO` when it's unclear which Context to use,
|
||||
or it is not yet available (because the surrounding function has not yet
|
||||
been extended to accept a `context.Context` argument).
|
||||
|
||||
More details in [Services](/contribute/backend/services.md), [Communication](/contribute/backend/communication.md) and [Database](/contribute/backend/database.md).
|
||||
|
||||
[Original design doc](https://docs.google.com/document/d/1ebUhUVXU8FlShezsN-C64T0dOoo-DaC9_r-c8gB2XEU/edit#).
|
||||
|
||||
## 110 - Move API error handling to service layer
|
||||
|
||||
**State:** Ongoing, passive.
|
||||
|
||||
All errors returned from Grafana's services should carry a status and
|
||||
the information necessary to provide a structured end-user facing
|
||||
message that the frontend can display and internationalize for
|
||||
end-users.
|
||||
|
||||
More details in [Errors](/contribute/backend/errors.md).
|
||||
@@ -10,12 +10,19 @@ Unless stated otherwise, use the guidelines listed in the following articles:
|
||||
|
||||
## Linting and formatting
|
||||
|
||||
To ensure consistency across the Go codebase, we require all code to
|
||||
pass a number of linter checks.
|
||||
To ensure consistency across the Go codebase, we require all code to pass a number of linter checks.
|
||||
|
||||
We use [GolangCI-Lint](https://github.com/golangci/golangci-lint) with a
|
||||
custom configuration [.golangci.toml](/.golangci.toml) to run these
|
||||
checks.
|
||||
We use the standard following linters:
|
||||
|
||||
- [gofmt](https://golang.org/cmd/gofmt/)
|
||||
- [golint](https://github.com/golang/lint)
|
||||
- [go vet](https://golang.org/cmd/vet/)
|
||||
|
||||
In addition to the standard linters, we also use:
|
||||
|
||||
- [revive](https://revive.run/) with a [custom config](https://github.com/grafana/grafana/blob/main/conf/revive.toml)
|
||||
- [GolangCI-Lint](https://github.com/golangci/golangci-lint)
|
||||
- [gosec](https://github.com/securego/gosec)
|
||||
|
||||
To run all linters, use the `lint-go` Makefile target:
|
||||
|
||||
@@ -29,6 +36,10 @@ We value clean and readable code, that is loosely coupled and covered by unit te
|
||||
|
||||
Tests must use the standard library, `testing`. For assertions, prefer using [testify](https://github.com/stretchr/testify).
|
||||
|
||||
The majority of our tests uses [GoConvey](http://goconvey.co/) but that's something we want to avoid going forward.
|
||||
|
||||
In the `sqlstore` package we do database operations in tests and while some might say that's not suited for unit tests. We think they are fast enough and provide a lot of value.
|
||||
|
||||
### Integration Tests
|
||||
|
||||
We run unit and integration tests separately, to help keep our CI pipeline running smoothly and provide a better developer experience.
|
||||
@@ -44,8 +55,7 @@ func TestIntegrationFoo(t *testing.T) {
|
||||
}
|
||||
```
|
||||
|
||||
> Warning
|
||||
> If you do not follow this convention, your integration test may be run twice or not run at all.
|
||||
If you do not follow this convention, your integration test may be run twice or not run at all.
|
||||
|
||||
### Assertions
|
||||
|
||||
@@ -62,7 +72,8 @@ code, plus lets you run each test case in isolation when debugging. Don't use `t
|
||||
|
||||
### Cleanup
|
||||
|
||||
Use [`t.Cleanup`](https://golang.org/pkg/testing/#T.Cleanup) to clean up resources in tests. It's a preferable to `defer`, as it can be called from helper functions. It will always execute after the test is over in reverse call order (last `t.Cleanup` first, same as `defer`).
|
||||
Use [`t.Cleanup`](https://golang.org/pkg/testing/#T.Cleanup) to clean up resources in tests. It's a less fragile choice than `defer`, since it's independent of which
|
||||
function you call it in. It will always execute after the test is over in reverse call order (last `t.Cleanup` first, same as `defer`).
|
||||
|
||||
### Mock
|
||||
|
||||
@@ -190,14 +201,11 @@ for context.
|
||||
|
||||
If a column, or column combination, should be unique, add a corresponding uniqueness constraint through a migration.
|
||||
|
||||
### Usage of XORM Session.Insert() and Session.InsertOne()
|
||||
|
||||
The [Session.Insert()](https://pkg.go.dev/github.com/go-xorm/xorm#Session.Insert) and [Session.InsertOne()](https://pkg.go.dev/github.com/go-xorm/xorm#Session.InsertOne) are poorly documented and return the number of affected rows contrary to a common mistake that they return the newly introduced primary key. Therefore, contributors should be extra cautious when using them.
|
||||
|
||||
The same applies for the respective [Engine.Insert()](https://pkg.go.dev/github.com/go-xorm/xorm#Engine.Insert) and [Engine.InsertOne()](https://pkg.go.dev/github.com/go-xorm/xorm#Engine.InsertOne)
|
||||
|
||||
## JSON
|
||||
|
||||
The simplejson package is used a lot throughout the backend codebase,
|
||||
but it's legacy, so if at all possible avoid using it in new code.
|
||||
Use [encoding/json](https://golang.org/pkg/encoding/json/) instead.
|
||||
The simplejson package is used a lot throughout the backend codebase, but it's legacy, so if at all possible
|
||||
avoid using it in new code. Use [json-iterator](https://github.com/json-iterator/go) instead, which is a more performant
|
||||
drop-in alternative to the standard [encoding/json](https://golang.org/pkg/encoding/json/) package. While encoding/json
|
||||
is a fine choice, profiling shows that json-iterator may be 3-4 times more efficient for encoding. We haven't profiled
|
||||
its parsing performance yet, but according to json-iterator's own benchmarks, it appears even more superior in this
|
||||
department.
|
||||
|
||||
@@ -1,82 +0,0 @@
|
||||
# Support bundles
|
||||
|
||||
Support bundles are a way to collect all the information needed to debug a problem.
|
||||
They are generated from the support bundle menu in the UI under the Help section.
|
||||
|
||||
The support bundle is an archive that contains one file per collector selected by
|
||||
the user.
|
||||
|
||||
Collectors are functions in the backend that collect information about the service they are running in.
|
||||
Services can register collectors during their initialization.
|
||||
|
||||
## Adding a new support bundle collector
|
||||
|
||||
To add a new support bundle collector, you need to follow these steps,
|
||||
we'll use the usage stats service as an example:
|
||||
|
||||
1. Import the support bundles registry in the service's `ProvideService` function:
|
||||
|
||||
```go
|
||||
type UsageStats struct {
|
||||
...
|
||||
}
|
||||
|
||||
func ProvideService(
|
||||
...
|
||||
bundleRegistry supportbundles.Service, // Bundle registry
|
||||
) (*UsageStats, error)
|
||||
```
|
||||
|
||||
2. `make gen-go` will then be able to wire the registry to the service.
|
||||
|
||||
3. Implement the collector
|
||||
|
||||
```go
|
||||
func (uss *UsageStats) supportBundleCollector() supportbundles.Collector {
|
||||
return supportbundles.Collector{
|
||||
UID: "usage-stats", // unique ID for the collector
|
||||
DisplayName: "Usage statistics", // display name for the collector in the UI
|
||||
Description: "Usage statistics of the Grafana instance", // description for the collector in the UI
|
||||
IncludedByDefault: false, // whether the collector is included by default in the support bundle and can't be deselected. Most times you want this to be false.
|
||||
Default: false, // whether the collector is selected by default in the support bundle. User can still deselect it.
|
||||
// Function that will actually collect the file during the support bundle generation.
|
||||
Fn: func(ctx context.Context) (*supportbundles.SupportItem, error) {
|
||||
// Add your service's logic to collect the information you need
|
||||
// In this example we are collecting the usage stats and marshalling them to JSON
|
||||
// This helps us get information about the usage of the Grafana instance
|
||||
report, err := uss.GetUsageReport(context.Background())
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
data, err := json.Marshal(report)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return &supportbundles.SupportItem{
|
||||
// filename of the file in the archive
|
||||
// can be any extension. (most common is .json and .md)
|
||||
Filename: "usage-stats.json",
|
||||
FileBytes: data, // []byte of the file
|
||||
}, nil
|
||||
},
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
4. Register the collector in the service's `ProvideService` function:
|
||||
|
||||
```go
|
||||
func ProvideService(
|
||||
...
|
||||
) (*UsageStats, error) {
|
||||
s := &UsageStats{
|
||||
// ...
|
||||
}
|
||||
|
||||
bundleRegistry.RegisterSupportItemCollector(s.supportBundleCollector())
|
||||
|
||||
return s, nil
|
||||
}
|
||||
```
|
||||
@@ -4,7 +4,7 @@ Grafana uses the [i18next](https://www.i18next.com/) framework for managing tran
|
||||
|
||||
## tl;dr
|
||||
|
||||
**Please note:** We do not currently accept contributions for translations. Please do not submit pull requests translating grafana.json files - they will be rejected. We do accept contributions to mark up phrases for translation.
|
||||
**Please note:** We do not currently accept contributions for translations. Please do not submit pull requests for grafana.json files - they will be rejected.
|
||||
|
||||
- Use `<Trans i18nKey="search-results.panel-link">Go to {{ pageTitle }}</Trans>` in code to add a translatable phrase
|
||||
- Translations are stored in JSON files in `public/locales/{locale}/grafana.json`
|
||||
|
||||
@@ -353,26 +353,12 @@ static defaultProps: Partial<Props> = { ... }
|
||||
|
||||
### How to declare functional components
|
||||
|
||||
We prefer using function declarations over function expressions when creating a new react functional component.
|
||||
We recommend using named regular functions when creating a new react functional component.
|
||||
|
||||
```typescript
|
||||
// bad
|
||||
export const Component = (props: Props) => { ... }
|
||||
|
||||
// bad
|
||||
export const Component: React.FC<Props> = (props) => { ... }
|
||||
|
||||
// good
|
||||
export function Component(props: Props) { ... }
|
||||
```
|
||||
|
||||
Some interesting readings on the topic:
|
||||
|
||||
- [Create React App: Remove React.FC from typescript template](https://github.com/facebook/create-react-app/pull/8177)
|
||||
- [Kent C. Dodds: How to write a React Component in Typescript](https://kentcdodds.com/blog/how-to-write-a-react-component-in-typescript)
|
||||
- [Kent C. Dodds: Function forms](https://kentcdodds.com/blog/function-forms)
|
||||
- [Sam Hendrickx: Why you probably shouldn't use React.FC?](https://medium.com/raccoons-group/why-you-probably-shouldnt-use-react-fc-to-type-your-react-components-37ca1243dd13)
|
||||
|
||||
## State management
|
||||
|
||||
- Don't mutate state in reducers or thunks.
|
||||
|
||||
@@ -13,12 +13,12 @@ To access the theme in your styles, use the `useStyles` hook. It provides basic
|
||||
> Please remember to put `getStyles` function at the end of the file!
|
||||
|
||||
```tsx
|
||||
import React from 'react';
|
||||
import React, { FC } from 'react';
|
||||
import { GrafanaTheme2 } from '@grafana/data';
|
||||
import { useStyles2 } from '@grafana/ui';
|
||||
import { css } from '@emotion/css';
|
||||
|
||||
const Foo = (props: FooProps) => {
|
||||
const Foo: FC<FooProps> = () => {
|
||||
const styles = useStyles2(getStyles);
|
||||
|
||||
// Use styles with classNames
|
||||
@@ -48,7 +48,7 @@ interface ComponentAProps {
|
||||
isActive: boolean;
|
||||
}
|
||||
|
||||
const ComponentA = ({ isActive }: ComponentAProps) => {
|
||||
const ComponentA: React.FC<ComponentAProps> = ({ isActive }) => {
|
||||
const theme = useTheme();
|
||||
const styles = useStyles2(theme);
|
||||
|
||||
|
||||
@@ -29,13 +29,12 @@ function Foo(props: FooProps) {
|
||||
const styles = useStyles2(getStyles);
|
||||
// Use styles with className
|
||||
}
|
||||
|
||||
const getStyles = (theme: GrafanaTheme2) =>
|
||||
css({
|
||||
padding: theme.spacing(1, 2),
|
||||
});
|
||||
```
|
||||
|
||||
const getStyles = (theme: GrafanaTheme2) => css({
|
||||
padding: theme.spacing(1,2)
|
||||
});
|
||||
|
||||
#### Get the theme object
|
||||
|
||||
```tsx
|
||||
|
||||
@@ -76,12 +76,11 @@ datasources:
|
||||
- name: gdev-influxdb1-influxql
|
||||
type: influxdb
|
||||
access: proxy
|
||||
database: site
|
||||
user: grafana
|
||||
url: http://localhost:8087
|
||||
secureJsonData:
|
||||
password: grafana
|
||||
jsonData:
|
||||
dbName: site
|
||||
|
||||
- name: gdev-influxdb-flux
|
||||
type: influxdb
|
||||
@@ -99,9 +98,9 @@ datasources:
|
||||
- name: gdev-influxdb-influxql
|
||||
type: influxdb
|
||||
access: proxy
|
||||
database: mybucket
|
||||
url: http://localhost:8086
|
||||
jsonData:
|
||||
dbName: mybucket
|
||||
httpHeaderName1: "Authorization"
|
||||
secureJsonData:
|
||||
httpHeaderValue1: "Token mytoken"
|
||||
@@ -132,6 +131,7 @@ datasources:
|
||||
timeField: "@timestamp"
|
||||
logLevelField: level
|
||||
logMessageField: line
|
||||
esVersion: 8.1.4
|
||||
|
||||
- name: gdev-elasticsearch-filebeat
|
||||
type: elasticsearch
|
||||
@@ -141,6 +141,7 @@ datasources:
|
||||
jsonData:
|
||||
interval: Daily
|
||||
timeField: "@timestamp"
|
||||
esVersion: 8.1.4
|
||||
timeInterval: "10s"
|
||||
logMessageField: message
|
||||
logLevelField: fields.level
|
||||
@@ -153,6 +154,7 @@ datasources:
|
||||
jsonData:
|
||||
interval: Daily
|
||||
timeField: "@timestamp"
|
||||
esVersion: 8.1.4
|
||||
timeInterval: "10s"
|
||||
|
||||
- name: gdev-mysql
|
||||
|
||||
@@ -32,12 +32,11 @@ datasources:
|
||||
- name: gdev-influxdb1-influxql
|
||||
type: influxdb
|
||||
access: proxy
|
||||
database: site
|
||||
user: grafana
|
||||
url: http://influxdb1:8086
|
||||
secureJsonData:
|
||||
password: grafana
|
||||
jsonData:
|
||||
dbName: site
|
||||
|
||||
- name: gdev-influxdb-flux
|
||||
type: influxdb
|
||||
@@ -53,9 +52,9 @@ datasources:
|
||||
- name: gdev-influxdb-influxql
|
||||
type: influxdb
|
||||
access: proxy
|
||||
database: mybucket
|
||||
url: http://influxdb:8086
|
||||
jsonData:
|
||||
dbName: mybucket
|
||||
httpHeaderName1: "Authorization"
|
||||
secureJsonData:
|
||||
httpHeaderValue1: "Token mytoken"
|
||||
@@ -76,6 +75,7 @@ datasources:
|
||||
jsonData:
|
||||
interval: Daily
|
||||
timeField: "@timestamp"
|
||||
esVersion: 8.1.4
|
||||
|
||||
- name: gdev-elasticsearch-filebeat
|
||||
type: elasticsearch
|
||||
@@ -85,6 +85,7 @@ datasources:
|
||||
jsonData:
|
||||
interval: Daily
|
||||
timeField: "@timestamp"
|
||||
esVersion: 8.1.4
|
||||
timeInterval: "10s"
|
||||
logMessageField: message
|
||||
logLevelField: fields.level
|
||||
@@ -97,6 +98,7 @@ datasources:
|
||||
jsonData:
|
||||
interval: Daily
|
||||
timeField: "@timestamp"
|
||||
esVersion: 8.1.4
|
||||
timeInterval: "10s"
|
||||
|
||||
- name: gdev-mysql
|
||||
|
||||
@@ -1629,6 +1629,7 @@
|
||||
}
|
||||
],
|
||||
"refresh": false,
|
||||
"revision": 8,
|
||||
"schemaVersion": 16,
|
||||
"style": "dark",
|
||||
"tags": ["gdev", "panel-tests"],
|
||||
|
||||
@@ -1775,10 +1775,6 @@
|
||||
"text": "ops/min (opm)",
|
||||
"value": "opm"
|
||||
},
|
||||
{
|
||||
"text": "requests/min (rpm)",
|
||||
"value": "reqpm"
|
||||
},
|
||||
{
|
||||
"text": "reads/min (rpm)",
|
||||
"value": "rpm"
|
||||
|
||||
@@ -1,871 +0,0 @@
|
||||
{
|
||||
"annotations": {
|
||||
"list": [
|
||||
{
|
||||
"builtIn": 1,
|
||||
"datasource": {
|
||||
"type": "grafana",
|
||||
"uid": "-- Grafana --"
|
||||
},
|
||||
"enable": true,
|
||||
"hide": true,
|
||||
"iconColor": "rgba(0, 211, 255, 1)",
|
||||
"name": "Annotations & Alerts",
|
||||
"type": "dashboard"
|
||||
}
|
||||
]
|
||||
},
|
||||
"editable": true,
|
||||
"fiscalYearStartMonth": 0,
|
||||
"graphTooltip": 0,
|
||||
"id": 1267,
|
||||
"links": [],
|
||||
"liveNow": false,
|
||||
"panels": [
|
||||
{
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 3,
|
||||
"w": 24,
|
||||
"x": 0,
|
||||
"y": 0
|
||||
},
|
||||
"id": 8,
|
||||
"options": {
|
||||
"code": {
|
||||
"language": "plaintext",
|
||||
"showLineNumbers": false,
|
||||
"showMiniMap": false
|
||||
},
|
||||
"content": "* `__all_variables`=${__all_variables}\n* `__url_time_range`=${__url_time_range}",
|
||||
"mode": "markdown"
|
||||
},
|
||||
"pluginVersion": "9.5.0-pre",
|
||||
"title": "Panel Title",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
"mode": "thresholds"
|
||||
},
|
||||
"custom": {
|
||||
"align": "auto",
|
||||
"cellOptions": {
|
||||
"type": "auto"
|
||||
},
|
||||
"inspect": false
|
||||
},
|
||||
"links": [
|
||||
{
|
||||
"targetBlank": true,
|
||||
"title": "value=${__value.raw}&time=${__value.time}&__value:percentencode=${__value:percentencode}&text=${__value.text}",
|
||||
"url": "value=${__value.raw}&time=${__value.time}justvalue=${__value:percentencode}&text=${__value.text}"
|
||||
}
|
||||
],
|
||||
"mappings": [],
|
||||
"thresholds": {
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "green"
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
"value": 80
|
||||
}
|
||||
]
|
||||
},
|
||||
"unit": "percent"
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 7,
|
||||
"w": 12,
|
||||
"x": 0,
|
||||
"y": 3
|
||||
},
|
||||
"id": 2,
|
||||
"options": {
|
||||
"cellHeight": "sm",
|
||||
"footer": {
|
||||
"countRows": false,
|
||||
"fields": "",
|
||||
"reducer": [
|
||||
"sum"
|
||||
],
|
||||
"show": false
|
||||
},
|
||||
"showHeader": true,
|
||||
"showRowNums": false
|
||||
},
|
||||
"pluginVersion": "9.5.0-pre",
|
||||
"title": "DataLink: with __value.raw=&__value.time=&__value:percentencode=",
|
||||
"type": "table"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
"mode": "thresholds"
|
||||
},
|
||||
"links": [
|
||||
{
|
||||
"targetBlank": true,
|
||||
"title": "Value link",
|
||||
"url": "value=${__value.raw}"
|
||||
}
|
||||
],
|
||||
"mappings": [],
|
||||
"thresholds": {
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "green"
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
"value": 80
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 7,
|
||||
"w": 12,
|
||||
"x": 12,
|
||||
"y": 3
|
||||
},
|
||||
"id": 3,
|
||||
"options": {
|
||||
"colorMode": "value",
|
||||
"graphMode": "area",
|
||||
"justifyMode": "auto",
|
||||
"orientation": "auto",
|
||||
"reduceOptions": {
|
||||
"calcs": [
|
||||
"lastNotNull"
|
||||
],
|
||||
"fields": "",
|
||||
"values": false
|
||||
},
|
||||
"textMode": "auto"
|
||||
},
|
||||
"pluginVersion": "9.5.0-pre",
|
||||
"targets": [
|
||||
{
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"refId": "A",
|
||||
"scenarioId": "random_walk",
|
||||
"seriesCount": 5
|
||||
}
|
||||
],
|
||||
"title": "Stat panel with __value.raw ",
|
||||
"type": "stat"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
"mode": "continuous-GrYlRd"
|
||||
},
|
||||
"links": [
|
||||
{
|
||||
"title": "${__value.raw}",
|
||||
"url": "${__value.raw}"
|
||||
}
|
||||
],
|
||||
"mappings": [],
|
||||
"thresholds": {
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "green"
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
"value": 80
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 7,
|
||||
"w": 12,
|
||||
"x": 0,
|
||||
"y": 10
|
||||
},
|
||||
"id": 6,
|
||||
"options": {
|
||||
"displayMode": "basic",
|
||||
"minVizHeight": 10,
|
||||
"minVizWidth": 0,
|
||||
"orientation": "horizontal",
|
||||
"reduceOptions": {
|
||||
"calcs": [],
|
||||
"fields": "",
|
||||
"values": true
|
||||
},
|
||||
"showUnfilled": true,
|
||||
"valueMode": "color"
|
||||
},
|
||||
"pluginVersion": "9.5.0-pre",
|
||||
"targets": [
|
||||
{
|
||||
"csvFileName": "browser_marketshare.csv",
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"refId": "A",
|
||||
"scenarioId": "csv_file"
|
||||
}
|
||||
],
|
||||
"title": "data link __value.raw",
|
||||
"transformations": [
|
||||
{
|
||||
"id": "limit",
|
||||
"options": {
|
||||
"limitField": 5
|
||||
}
|
||||
}
|
||||
],
|
||||
"type": "bargauge"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"description": "Since this is using getFrameDisplayName it works kind badly (especially with testdata) and only returns the `Series (refId)`. \n\nSo this should show:\n* Series (Query1)\n* Series (Query2)",
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
"mode": "thresholds"
|
||||
},
|
||||
"displayName": "${__series.name}",
|
||||
"links": [
|
||||
{
|
||||
"targetBlank": true,
|
||||
"title": "Value link",
|
||||
"url": "value=${__calc}"
|
||||
}
|
||||
],
|
||||
"mappings": [],
|
||||
"thresholds": {
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "green"
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
"value": 80
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 7,
|
||||
"w": 12,
|
||||
"x": 12,
|
||||
"y": 10
|
||||
},
|
||||
"id": 12,
|
||||
"options": {
|
||||
"colorMode": "value",
|
||||
"graphMode": "area",
|
||||
"justifyMode": "auto",
|
||||
"orientation": "auto",
|
||||
"reduceOptions": {
|
||||
"calcs": [
|
||||
"lastNotNull"
|
||||
],
|
||||
"fields": "",
|
||||
"values": false
|
||||
},
|
||||
"textMode": "auto"
|
||||
},
|
||||
"pluginVersion": "9.5.0-pre",
|
||||
"targets": [
|
||||
{
|
||||
"alias": "",
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"refId": "Query1",
|
||||
"scenarioId": "random_walk",
|
||||
"seriesCount": 1
|
||||
},
|
||||
{
|
||||
"alias": "",
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"hide": false,
|
||||
"refId": "Query2",
|
||||
"scenarioId": "random_walk",
|
||||
"seriesCount": 1
|
||||
}
|
||||
],
|
||||
"title": "${series.name} in display name",
|
||||
"type": "stat"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
"mode": "thresholds"
|
||||
},
|
||||
"custom": {
|
||||
"align": "auto",
|
||||
"cellOptions": {
|
||||
"type": "auto"
|
||||
},
|
||||
"inspect": false
|
||||
},
|
||||
"links": [
|
||||
{
|
||||
"title": "__data.refId=${__data.refId}&__data.fields[0]=${__data.fields[0]}&cluster=${__field.labels.cluster}",
|
||||
"url": "refId=${__data.refId}&__data.fields[0]=${__data.fields[0]}&cluster=${__field.labels.cluster}"
|
||||
}
|
||||
],
|
||||
"mappings": [],
|
||||
"thresholds": {
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "green"
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
"value": 80
|
||||
}
|
||||
]
|
||||
},
|
||||
"unit": "percent"
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 7,
|
||||
"w": 12,
|
||||
"x": 0,
|
||||
"y": 17
|
||||
},
|
||||
"id": 11,
|
||||
"options": {
|
||||
"cellHeight": "sm",
|
||||
"footer": {
|
||||
"countRows": false,
|
||||
"fields": "",
|
||||
"reducer": [
|
||||
"sum"
|
||||
],
|
||||
"show": false
|
||||
},
|
||||
"showHeader": true,
|
||||
"showRowNums": false
|
||||
},
|
||||
"pluginVersion": "9.5.0-pre",
|
||||
"targets": [
|
||||
{
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"labels": "cluster=US",
|
||||
"refId": "A",
|
||||
"scenarioId": "random_walk"
|
||||
}
|
||||
],
|
||||
"title": "DataLink: refId=${__data.refId}&__data.fields[0]=${__data.fields[0]}&cluster=${__field.labels.cluster}",
|
||||
"type": "table"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
"mode": "palette-classic"
|
||||
},
|
||||
"custom": {
|
||||
"axisCenteredZero": false,
|
||||
"axisColorMode": "text",
|
||||
"axisLabel": "",
|
||||
"axisPlacement": "auto",
|
||||
"barAlignment": 0,
|
||||
"drawStyle": "line",
|
||||
"fillOpacity": 0,
|
||||
"gradientMode": "none",
|
||||
"hideFrom": {
|
||||
"legend": false,
|
||||
"tooltip": false,
|
||||
"viz": false
|
||||
},
|
||||
"lineInterpolation": "linear",
|
||||
"lineWidth": 1,
|
||||
"pointSize": 5,
|
||||
"scaleDistribution": {
|
||||
"type": "linear"
|
||||
},
|
||||
"showPoints": "auto",
|
||||
"spanNulls": false,
|
||||
"stacking": {
|
||||
"group": "A",
|
||||
"mode": "none"
|
||||
},
|
||||
"thresholdsStyle": {
|
||||
"mode": "off"
|
||||
}
|
||||
},
|
||||
"links": [
|
||||
{
|
||||
"title": "${__value.raw}",
|
||||
"url": "${__value.raw}"
|
||||
}
|
||||
],
|
||||
"mappings": [],
|
||||
"thresholds": {
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "green"
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
"value": 80
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 7,
|
||||
"w": 12,
|
||||
"x": 12,
|
||||
"y": 17
|
||||
},
|
||||
"id": 10,
|
||||
"options": {
|
||||
"legend": {
|
||||
"calcs": [],
|
||||
"displayMode": "list",
|
||||
"placement": "bottom",
|
||||
"showLegend": true
|
||||
},
|
||||
"tooltip": {
|
||||
"mode": "single",
|
||||
"sort": "none"
|
||||
}
|
||||
},
|
||||
"targets": [
|
||||
{
|
||||
"alias": "10,20,30,40",
|
||||
"csvContent": "Time, value, test\n\"2023-03-24T17:12:12.347Z\", 10,hello\n\"2023-03-24T17:22:12.347Z\", 20,asd\n\"2023-03-24T17:32:12.347Z\", 30,asd2\n\"2023-03-24T17:42:12.347Z\", 40,as34\n",
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"refId": "A",
|
||||
"scenarioId": "csv_content"
|
||||
},
|
||||
{
|
||||
"alias": "5,6,7",
|
||||
"csvContent": "Time, value, test\n\"2023-03-24T17:12:12.347Z\", 5,hello\n\"2023-03-24T17:22:12.347Z\", 6,asd\n\"2023-03-24T17:42:12.347Z\", 7,as34\n",
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"refId": "B",
|
||||
"scenarioId": "csv_content"
|
||||
}
|
||||
],
|
||||
"title": "Data links with ${__value.raw}",
|
||||
"transformations": [
|
||||
{
|
||||
"id": "joinByField",
|
||||
"options": {}
|
||||
}
|
||||
],
|
||||
"type": "timeseries"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
"mode": "thresholds"
|
||||
},
|
||||
"custom": {
|
||||
"align": "auto",
|
||||
"cellOptions": {
|
||||
"type": "auto"
|
||||
},
|
||||
"inspect": false
|
||||
},
|
||||
"links": [
|
||||
{
|
||||
"title": "__field.name=${__field.name}&__field.labels.cluster=${__field.labels.cluster}",
|
||||
"url": "__field.name=${__field.name}&__field.labels.cluster=${__field.labels.cluster}"
|
||||
}
|
||||
],
|
||||
"mappings": [],
|
||||
"thresholds": {
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "green"
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
"value": 80
|
||||
}
|
||||
]
|
||||
},
|
||||
"unit": "percent"
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 7,
|
||||
"w": 12,
|
||||
"x": 0,
|
||||
"y": 24
|
||||
},
|
||||
"id": 13,
|
||||
"options": {
|
||||
"cellHeight": "sm",
|
||||
"footer": {
|
||||
"countRows": false,
|
||||
"fields": "",
|
||||
"reducer": [
|
||||
"sum"
|
||||
],
|
||||
"show": false
|
||||
},
|
||||
"showHeader": true,
|
||||
"showRowNums": false
|
||||
},
|
||||
"pluginVersion": "9.5.0-pre",
|
||||
"targets": [
|
||||
{
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"labels": "cluster=US",
|
||||
"refId": "A",
|
||||
"scenarioId": "random_walk"
|
||||
}
|
||||
],
|
||||
"title": "DataLink: __field.name=&__field.labels.cluster",
|
||||
"type": "table"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"description": "The stat display names should be \n* Stockholm = Bad\n* New York = Good \n",
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
"mode": "thresholds"
|
||||
},
|
||||
"displayName": "$__cell_0 = $__cell_2",
|
||||
"links": [],
|
||||
"mappings": [],
|
||||
"thresholds": {
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "green"
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
"value": 80
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 7,
|
||||
"w": 12,
|
||||
"x": 12,
|
||||
"y": 24
|
||||
},
|
||||
"id": 14,
|
||||
"options": {
|
||||
"colorMode": "value",
|
||||
"graphMode": "area",
|
||||
"justifyMode": "auto",
|
||||
"orientation": "auto",
|
||||
"reduceOptions": {
|
||||
"calcs": [
|
||||
"lastNotNull"
|
||||
],
|
||||
"fields": "",
|
||||
"values": true
|
||||
},
|
||||
"textMode": "auto"
|
||||
},
|
||||
"pluginVersion": "9.5.0-pre",
|
||||
"targets": [
|
||||
{
|
||||
"alias": "",
|
||||
"csvContent": "name, value, name2\nStockholm, 10, Good\nNew York, 15, Bad",
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"refId": "A",
|
||||
"scenarioId": "csv_content"
|
||||
}
|
||||
],
|
||||
"title": "DisplayName with __cell_0 = __cell_2",
|
||||
"type": "stat"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"description": "The stat display names should be \n* Stockholm = Bad\n* New York = Good \n",
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
"mode": "thresholds"
|
||||
},
|
||||
"custom": {
|
||||
"align": "auto",
|
||||
"cellOptions": {
|
||||
"type": "auto"
|
||||
},
|
||||
"inspect": false
|
||||
},
|
||||
"displayName": "${__field.name}",
|
||||
"links": [
|
||||
{
|
||||
"targetBlank": true,
|
||||
"title": "Value link",
|
||||
"url": "value=${__calc}"
|
||||
}
|
||||
],
|
||||
"mappings": [],
|
||||
"thresholds": {
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "green"
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
"value": 80
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 7,
|
||||
"w": 12,
|
||||
"x": 0,
|
||||
"y": 31
|
||||
},
|
||||
"id": 15,
|
||||
"options": {
|
||||
"cellHeight": "sm",
|
||||
"footer": {
|
||||
"countRows": false,
|
||||
"fields": "",
|
||||
"reducer": [
|
||||
"sum"
|
||||
],
|
||||
"show": false
|
||||
},
|
||||
"showHeader": true,
|
||||
"showRowNums": false
|
||||
},
|
||||
"pluginVersion": "9.5.0-pre",
|
||||
"targets": [
|
||||
{
|
||||
"alias": "",
|
||||
"csvContent": "name, value, name2\nStockholm, 10, Good\nNew York, 15, Bad",
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"refId": "A",
|
||||
"scenarioId": "csv_content"
|
||||
}
|
||||
],
|
||||
"title": "DisplayName: __field.name",
|
||||
"type": "table"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"description": "The stat display names should be \n* Stockholm = Bad\n* New York = Good \n",
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
"mode": "thresholds"
|
||||
},
|
||||
"displayName": "${__data.fields[0]} = ${__data.fields[2]}",
|
||||
"links": [
|
||||
{
|
||||
"targetBlank": true,
|
||||
"title": "__data.fields[0] = ${__data.fields[0]} = __value.raw = ${__value.raw}",
|
||||
"url": "__data.fields[0] = ${__data.fields[0]} = __value.raw = ${__value.raw}"
|
||||
}
|
||||
],
|
||||
"mappings": [],
|
||||
"thresholds": {
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "green"
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
"value": 80
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 7,
|
||||
"w": 12,
|
||||
"x": 12,
|
||||
"y": 31
|
||||
},
|
||||
"id": 16,
|
||||
"options": {
|
||||
"colorMode": "value",
|
||||
"graphMode": "area",
|
||||
"justifyMode": "auto",
|
||||
"orientation": "auto",
|
||||
"reduceOptions": {
|
||||
"calcs": [
|
||||
"lastNotNull"
|
||||
],
|
||||
"fields": "",
|
||||
"values": true
|
||||
},
|
||||
"textMode": "auto"
|
||||
},
|
||||
"pluginVersion": "9.5.0-pre",
|
||||
"targets": [
|
||||
{
|
||||
"alias": "",
|
||||
"csvContent": "name, value, name2\nStockholm, 10, Good\nNew York, 15, Bad",
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"refId": "A",
|
||||
"scenarioId": "csv_content"
|
||||
}
|
||||
],
|
||||
"title": "$__data.fields[0] = $__data.fields[2] with datalinks",
|
||||
"type": "stat"
|
||||
}
|
||||
],
|
||||
"refresh": "",
|
||||
"schemaVersion": 38,
|
||||
"style": "dark",
|
||||
"tags": ["gdev", "templating"],
|
||||
"templating": {
|
||||
"list": [
|
||||
{
|
||||
"current": {
|
||||
"selected": false,
|
||||
"text": "A",
|
||||
"value": "A"
|
||||
},
|
||||
"hide": 0,
|
||||
"includeAll": false,
|
||||
"multi": false,
|
||||
"name": "customVar",
|
||||
"options": [
|
||||
{
|
||||
"selected": true,
|
||||
"text": "A",
|
||||
"value": "A"
|
||||
},
|
||||
{
|
||||
"selected": false,
|
||||
"text": "B",
|
||||
"value": "B"
|
||||
},
|
||||
{
|
||||
"selected": false,
|
||||
"text": "C",
|
||||
"value": "C"
|
||||
}
|
||||
],
|
||||
"query": "A,B,C",
|
||||
"queryValue": "",
|
||||
"skipUrlSync": false,
|
||||
"type": "custom"
|
||||
}
|
||||
]
|
||||
},
|
||||
"time": {
|
||||
"from": "2023-03-24T17:12:12.347Z",
|
||||
"to": "2023-03-24T17:42:12.347Z"
|
||||
},
|
||||
"timepicker": {},
|
||||
"timezone": "",
|
||||
"title": "Templating - Macros",
|
||||
"uid": "e7c29343-6d1e-4167-9c13-803fe5be8c46",
|
||||
"version": 48,
|
||||
"weekStart": ""
|
||||
}
|
||||
@@ -1,585 +0,0 @@
|
||||
{
|
||||
"annotations": {
|
||||
"list": [
|
||||
{
|
||||
"builtIn": 1,
|
||||
"datasource": {
|
||||
"type": "grafana",
|
||||
"uid": "-- Grafana --"
|
||||
},
|
||||
"enable": true,
|
||||
"hide": true,
|
||||
"iconColor": "rgba(0, 211, 255, 1)",
|
||||
"name": "Annotations & Alerts",
|
||||
"type": "dashboard"
|
||||
}
|
||||
]
|
||||
},
|
||||
"editable": true,
|
||||
"fiscalYearStartMonth": 0,
|
||||
"graphTooltip": 0,
|
||||
"links": [
|
||||
{
|
||||
"asDropdown": false,
|
||||
"icon": "dashboard",
|
||||
"includeVars": false,
|
||||
"keepTime": false,
|
||||
"tags": [],
|
||||
"targetBlank": true,
|
||||
"title": "Auto migrate (TRUE)",
|
||||
"tooltip": "",
|
||||
"type": "link",
|
||||
"url": "/d/cdd412c4/?__feature.autoMigrateOldPanels=true"
|
||||
},
|
||||
{
|
||||
"asDropdown": false,
|
||||
"icon": "external link",
|
||||
"includeVars": false,
|
||||
"keepTime": false,
|
||||
"tags": [],
|
||||
"targetBlank": true,
|
||||
"title": "Auto migrate (FALSE)",
|
||||
"tooltip": "",
|
||||
"type": "link",
|
||||
"url": "/d/cdd412c4/?__feature.autoMigrateOldPanels=false"
|
||||
},
|
||||
{
|
||||
"asDropdown": false,
|
||||
"icon": "dashboard",
|
||||
"includeVars": false,
|
||||
"keepTime": false,
|
||||
"tags": [],
|
||||
"targetBlank": true,
|
||||
"title": "Disable angular (TRUE)",
|
||||
"tooltip": "",
|
||||
"type": "link",
|
||||
"url": "/d/cdd412c4/?__feature.disableAngular=true"
|
||||
},
|
||||
{
|
||||
"asDropdown": false,
|
||||
"icon": "external link",
|
||||
"includeVars": false,
|
||||
"keepTime": false,
|
||||
"tags": [],
|
||||
"targetBlank": true,
|
||||
"title": "Disable angular (FALSE)",
|
||||
"tooltip": "",
|
||||
"type": "link",
|
||||
"url": "/d/cdd412c4/?__feature.disableAngular=false"
|
||||
}
|
||||
],
|
||||
"liveNow": false,
|
||||
"panels": [
|
||||
{
|
||||
"aliasColors": {},
|
||||
"bars": false,
|
||||
"dashLength": 10,
|
||||
"dashes": false,
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
"mode": "palette-classic"
|
||||
},
|
||||
"custom": {
|
||||
"axisCenteredZero": false,
|
||||
"axisColorMode": "text",
|
||||
"axisLabel": "",
|
||||
"axisPlacement": "auto",
|
||||
"barAlignment": 0,
|
||||
"drawStyle": "line",
|
||||
"fillOpacity": 10,
|
||||
"gradientMode": "none",
|
||||
"hideFrom": {
|
||||
"legend": false,
|
||||
"tooltip": false,
|
||||
"viz": false
|
||||
},
|
||||
"lineInterpolation": "linear",
|
||||
"lineWidth": 1,
|
||||
"pointSize": 5,
|
||||
"scaleDistribution": {
|
||||
"type": "linear"
|
||||
},
|
||||
"showPoints": "never",
|
||||
"spanNulls": false,
|
||||
"stacking": {
|
||||
"group": "A",
|
||||
"mode": "none"
|
||||
},
|
||||
"thresholdsStyle": {
|
||||
"mode": "off"
|
||||
}
|
||||
},
|
||||
"mappings": [],
|
||||
"thresholds": {
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "green",
|
||||
"value": null
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
"value": 80
|
||||
}
|
||||
]
|
||||
},
|
||||
"unit": "short"
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"fill": 1,
|
||||
"fillGradient": 0,
|
||||
"gridPos": {
|
||||
"h": 11,
|
||||
"w": 16,
|
||||
"x": 0,
|
||||
"y": 0
|
||||
},
|
||||
"hiddenSeries": false,
|
||||
"id": 4,
|
||||
"legend": {
|
||||
"avg": false,
|
||||
"current": false,
|
||||
"max": false,
|
||||
"min": false,
|
||||
"show": true,
|
||||
"total": false,
|
||||
"values": false
|
||||
},
|
||||
"lines": true,
|
||||
"linewidth": 1,
|
||||
"nullPointMode": "null",
|
||||
"options": {
|
||||
"alertThreshold": true,
|
||||
"legend": {
|
||||
"calcs": [],
|
||||
"displayMode": "list",
|
||||
"placement": "bottom",
|
||||
"showLegend": true
|
||||
},
|
||||
"tooltip": {
|
||||
"mode": "multi",
|
||||
"sort": "none"
|
||||
}
|
||||
},
|
||||
"percentage": false,
|
||||
"pluginVersion": "9.5.0-pre",
|
||||
"pointradius": 2,
|
||||
"points": false,
|
||||
"renderer": "flot",
|
||||
"seriesOverrides": [],
|
||||
"spaceLength": 10,
|
||||
"stack": false,
|
||||
"steppedLine": false,
|
||||
"targets": [
|
||||
{
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"refId": "A",
|
||||
"scenarioId": "random_walk",
|
||||
"seriesCount": 3
|
||||
}
|
||||
],
|
||||
"thresholds": [],
|
||||
"timeRegions": [],
|
||||
"title": "Flot graph",
|
||||
"tooltip": {
|
||||
"shared": true,
|
||||
"sort": 0,
|
||||
"value_type": "individual"
|
||||
},
|
||||
"type": "timeseries",
|
||||
"xaxis": {
|
||||
"mode": "time",
|
||||
"show": true,
|
||||
"values": []
|
||||
},
|
||||
"yaxes": [
|
||||
{
|
||||
"format": "short",
|
||||
"logBase": 1,
|
||||
"show": true
|
||||
},
|
||||
{
|
||||
"format": "short",
|
||||
"logBase": 1,
|
||||
"show": true
|
||||
}
|
||||
],
|
||||
"yaxis": {
|
||||
"align": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 11,
|
||||
"w": 8,
|
||||
"x": 16,
|
||||
"y": 0
|
||||
},
|
||||
"id": 6,
|
||||
"options": {
|
||||
"code": {
|
||||
"language": "plaintext",
|
||||
"showLineNumbers": false,
|
||||
"showMiniMap": false
|
||||
},
|
||||
"content": "# Graph panel >> Timeseries panel\n\nKnown issues:\n* hiding null/empty series\n* time regions",
|
||||
"mode": "markdown"
|
||||
},
|
||||
"pluginVersion": "9.5.0-pre",
|
||||
"targets": [
|
||||
{
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"refId": "A"
|
||||
}
|
||||
],
|
||||
"title": "Status + Notes",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"columns": [],
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"fontSize": "100%",
|
||||
"gridPos": {
|
||||
"h": 10,
|
||||
"w": 16,
|
||||
"x": 0,
|
||||
"y": 11
|
||||
},
|
||||
"id": 2,
|
||||
"options": {
|
||||
"cellHeight": "sm",
|
||||
"footer": {
|
||||
"countRows": false,
|
||||
"fields": "",
|
||||
"reducer": [
|
||||
"sum"
|
||||
],
|
||||
"show": false
|
||||
},
|
||||
"showHeader": true,
|
||||
"showRowNums": false
|
||||
},
|
||||
"pluginVersion": "9.5.0-pre",
|
||||
"showHeader": true,
|
||||
"sort": {
|
||||
"col": 0,
|
||||
"desc": true
|
||||
},
|
||||
"styles": [
|
||||
{
|
||||
"alias": "Time",
|
||||
"align": "auto",
|
||||
"dateFormat": "YYYY-MM-DD HH:mm:ss",
|
||||
"pattern": "Time",
|
||||
"type": "date"
|
||||
},
|
||||
{
|
||||
"alias": "",
|
||||
"align": "right",
|
||||
"colors": [
|
||||
"rgba(245, 54, 54, 0.9)",
|
||||
"rgba(237, 129, 40, 0.89)",
|
||||
"rgba(50, 172, 45, 0.97)"
|
||||
],
|
||||
"decimals": 2,
|
||||
"pattern": "/.*/",
|
||||
"thresholds": [],
|
||||
"type": "number",
|
||||
"unit": "short"
|
||||
}
|
||||
],
|
||||
"targets": [
|
||||
{
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"refId": "A",
|
||||
"scenarioId": "random_walk_table"
|
||||
}
|
||||
],
|
||||
"title": "Table (old)",
|
||||
"transform": "table",
|
||||
"transformations": [
|
||||
{
|
||||
"id": "merge",
|
||||
"options": {
|
||||
"reducers": []
|
||||
}
|
||||
}
|
||||
],
|
||||
"type": "table-old"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 10,
|
||||
"w": 8,
|
||||
"x": 16,
|
||||
"y": 11
|
||||
},
|
||||
"id": 7,
|
||||
"options": {
|
||||
"code": {
|
||||
"language": "plaintext",
|
||||
"showLineNumbers": false,
|
||||
"showMiniMap": false
|
||||
},
|
||||
"content": "# Table (old) >> Table\n\nKnown issues:\n* wrapping text\n* style changes",
|
||||
"mode": "markdown"
|
||||
},
|
||||
"pluginVersion": "9.5.0-pre",
|
||||
"targets": [
|
||||
{
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"refId": "A"
|
||||
}
|
||||
],
|
||||
"title": "Status + Notes",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"colorBackground": false,
|
||||
"colorValue": true,
|
||||
"colors": [
|
||||
"#299c46",
|
||||
"rgba(237, 129, 40, 0.89)",
|
||||
"#d44a3a"
|
||||
],
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"format": "areaF2",
|
||||
"gauge": {
|
||||
"maxValue": 100,
|
||||
"minValue": 0,
|
||||
"show": false,
|
||||
"thresholdLabels": false,
|
||||
"thresholdMarkers": true
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 8,
|
||||
"w": 8,
|
||||
"x": 0,
|
||||
"y": 21
|
||||
},
|
||||
"id": 9,
|
||||
"links": [],
|
||||
"mappingType": 1,
|
||||
"mappingTypes": [
|
||||
{
|
||||
"name": "value to text",
|
||||
"value": 1
|
||||
},
|
||||
{
|
||||
"name": "range to text",
|
||||
"value": 2
|
||||
}
|
||||
],
|
||||
"maxDataPoints": 100,
|
||||
"nullPointMode": "connected",
|
||||
"postfix": "b",
|
||||
"postfixFontSize": "50%",
|
||||
"prefix": "a",
|
||||
"prefixFontSize": "50%",
|
||||
"rangeMaps": [
|
||||
{
|
||||
"from": "null",
|
||||
"text": "N/A",
|
||||
"to": "null"
|
||||
}
|
||||
],
|
||||
"sparkline": {
|
||||
"fillColor": "rgba(31, 118, 189, 0.18)",
|
||||
"full": false,
|
||||
"lineColor": "rgb(31, 120, 193)",
|
||||
"show": true
|
||||
},
|
||||
"tableColumn": "",
|
||||
"targets": [
|
||||
{
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"refId": "A"
|
||||
}
|
||||
],
|
||||
"thresholds": "",
|
||||
"title": "grafana-singlestat-panel",
|
||||
"type": "grafana-singlestat-panel",
|
||||
"valueFontSize": "80%",
|
||||
"valueMaps": [
|
||||
{
|
||||
"op": "=",
|
||||
"text": "N/A",
|
||||
"value": "null"
|
||||
}
|
||||
],
|
||||
"valueName": "avg"
|
||||
},
|
||||
{
|
||||
"colorBackground": false,
|
||||
"colorValue": true,
|
||||
"colors": [
|
||||
"#299c46",
|
||||
"#73BF69",
|
||||
"#d44a3a"
|
||||
],
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"format": "ms",
|
||||
"gauge": {
|
||||
"maxValue": 100,
|
||||
"minValue": 0,
|
||||
"show": false,
|
||||
"thresholdLabels": false,
|
||||
"thresholdMarkers": true
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 8,
|
||||
"w": 8,
|
||||
"x": 8,
|
||||
"y": 21
|
||||
},
|
||||
"id": 23,
|
||||
"links": [],
|
||||
"mappingType": 1,
|
||||
"mappingTypes": [
|
||||
{
|
||||
"name": "value to text",
|
||||
"value": 1
|
||||
},
|
||||
{
|
||||
"name": "range to text",
|
||||
"value": 2
|
||||
}
|
||||
],
|
||||
"maxDataPoints": 100,
|
||||
"nullPointMode": "connected",
|
||||
"pluginVersion": "6.2.0-pre",
|
||||
"postfix": "",
|
||||
"postfixFontSize": "50%",
|
||||
"prefix": "p95",
|
||||
"prefixFontSize": "80%",
|
||||
"rangeMaps": [
|
||||
{
|
||||
"from": "null",
|
||||
"text": "N/A",
|
||||
"to": "null"
|
||||
}
|
||||
],
|
||||
"sparkline": {
|
||||
"fillColor": "rgba(31, 118, 189, 0.18)",
|
||||
"full": false,
|
||||
"lineColor": "rgb(31, 120, 193)",
|
||||
"show": true
|
||||
},
|
||||
"tableColumn": "",
|
||||
"targets": [
|
||||
{
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"refId": "A"
|
||||
}
|
||||
],
|
||||
"thresholds": "",
|
||||
"title": "singlestat (old, internal. Migrated if schema < 28)",
|
||||
"type": "singlestat",
|
||||
"valueFontSize": "120%",
|
||||
"valueMaps": [
|
||||
{
|
||||
"op": "=",
|
||||
"text": "N/A",
|
||||
"value": "null"
|
||||
}
|
||||
],
|
||||
"valueName": "avg"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 8,
|
||||
"w": 8,
|
||||
"x": 16,
|
||||
"y": 21
|
||||
},
|
||||
"id": 10,
|
||||
"options": {
|
||||
"code": {
|
||||
"language": "plaintext",
|
||||
"showLineNumbers": false,
|
||||
"showMiniMap": false
|
||||
},
|
||||
"content": "# Singlestat >> Stat\n\nKnown issues:\n* limited options",
|
||||
"mode": "markdown"
|
||||
},
|
||||
"pluginVersion": "9.5.0-pre",
|
||||
"targets": [
|
||||
{
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"refId": "A"
|
||||
}
|
||||
],
|
||||
"title": "Status + Notes",
|
||||
"type": "text"
|
||||
}
|
||||
],
|
||||
"refresh": "",
|
||||
"schemaVersion": 34,
|
||||
"style": "dark",
|
||||
"tags": [
|
||||
"gdev",
|
||||
"migrations",
|
||||
"angular"
|
||||
],
|
||||
"templating": {
|
||||
"list": []
|
||||
},
|
||||
"time": {
|
||||
"from": "now-6h",
|
||||
"to": "now"
|
||||
},
|
||||
"timepicker": {},
|
||||
"timezone": "",
|
||||
"title": "Devenv - Panel migrations",
|
||||
"uid": "cdd412c4",
|
||||
"version": 6,
|
||||
"weekStart": ""
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -108,7 +108,7 @@
|
||||
"fixed": "transparent"
|
||||
},
|
||||
"image": {
|
||||
"fixed": "https://dl.grafana.com/files/temp/ryan/landscape_2x.jpg"
|
||||
"fixed": "https://grafana-plugin-resources.s3.us-west-2.amazonaws.com/ryan/landscape_2x.jpg"
|
||||
},
|
||||
"size": "original"
|
||||
},
|
||||
|
||||
@@ -1629,6 +1629,7 @@
|
||||
}
|
||||
],
|
||||
"refresh": false,
|
||||
"revision": 8,
|
||||
"schemaVersion": 16,
|
||||
"style": "dark",
|
||||
"tags": ["gdev", "panel-tests", "graph"],
|
||||
|
||||
@@ -305,6 +305,7 @@
|
||||
"type": "heatmap"
|
||||
}
|
||||
],
|
||||
"revision": 1,
|
||||
"schemaVersion": 37,
|
||||
"style": "dark",
|
||||
"tags": [],
|
||||
|
||||
@@ -748,6 +748,7 @@
|
||||
"type": "histogram"
|
||||
}
|
||||
],
|
||||
"revision": 1,
|
||||
"schemaVersion": 37,
|
||||
"style": "dark",
|
||||
"tags": [
|
||||
|
||||
@@ -2866,10 +2866,6 @@
|
||||
"text": "ops/min (opm)",
|
||||
"value": "opm"
|
||||
},
|
||||
{
|
||||
"text": "requests/min (rpm)",
|
||||
"value": "reqpm"
|
||||
},
|
||||
{
|
||||
"text": "reads/min (rpm)",
|
||||
"value": "rpm"
|
||||
|
||||
@@ -430,6 +430,7 @@
|
||||
}
|
||||
],
|
||||
"refresh": false,
|
||||
"revision": 8,
|
||||
"schemaVersion": 16,
|
||||
"style": "dark",
|
||||
"tags": ["gdev", "panel-tests"],
|
||||
|
||||
@@ -3,10 +3,7 @@
|
||||
"list": [
|
||||
{
|
||||
"builtIn": 1,
|
||||
"datasource": {
|
||||
"type": "datasource",
|
||||
"uid": "grafana"
|
||||
},
|
||||
"datasource": "-- Grafana --",
|
||||
"enable": true,
|
||||
"hide": true,
|
||||
"iconColor": "rgba(0, 211, 255, 1)",
|
||||
@@ -16,16 +13,12 @@
|
||||
]
|
||||
},
|
||||
"editable": true,
|
||||
"fiscalYearStartMonth": 0,
|
||||
"gnetId": null,
|
||||
"graphTooltip": 0,
|
||||
"links": [],
|
||||
"liveNow": false,
|
||||
"panels": [
|
||||
{
|
||||
"datasource": {
|
||||
"type": "datasource",
|
||||
"uid": "grafana"
|
||||
},
|
||||
"datasource": null,
|
||||
"gridPos": {
|
||||
"h": 1,
|
||||
"w": 24,
|
||||
@@ -33,23 +26,11 @@
|
||||
"y": 0
|
||||
},
|
||||
"id": 7,
|
||||
"targets": [
|
||||
{
|
||||
"datasource": {
|
||||
"type": "datasource",
|
||||
"uid": "grafana"
|
||||
},
|
||||
"refId": "A"
|
||||
}
|
||||
],
|
||||
"title": "Cell styles",
|
||||
"type": "row"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "gdev-testdata"
|
||||
},
|
||||
"datasource": "gdev-testdata",
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
@@ -57,19 +38,16 @@
|
||||
},
|
||||
"custom": {
|
||||
"align": "center",
|
||||
"cellOptions": {
|
||||
"mode": "gradient",
|
||||
"type": "color-background"
|
||||
},
|
||||
"filterable": false,
|
||||
"inspect": false
|
||||
"displayMode": "color-background",
|
||||
"filterable": false
|
||||
},
|
||||
"mappings": [],
|
||||
"thresholds": {
|
||||
"mode": "percentage",
|
||||
"steps": [
|
||||
{
|
||||
"color": "green"
|
||||
"color": "green",
|
||||
"value": null
|
||||
},
|
||||
{
|
||||
"color": "blue",
|
||||
@@ -146,17 +124,7 @@
|
||||
},
|
||||
"id": 4,
|
||||
"options": {
|
||||
"cellHeight": "md",
|
||||
"footer": {
|
||||
"countRows": false,
|
||||
"fields": "",
|
||||
"reducer": [
|
||||
"sum"
|
||||
],
|
||||
"show": false
|
||||
},
|
||||
"showHeader": true,
|
||||
"showRowNums": false,
|
||||
"sortBy": [
|
||||
{
|
||||
"desc": true,
|
||||
@@ -164,19 +132,17 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
"pluginVersion": "9.5.0-pre",
|
||||
"pluginVersion": "",
|
||||
"targets": [
|
||||
{
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "gdev-testdata"
|
||||
},
|
||||
"refId": "A",
|
||||
"scenarioId": "random_walk",
|
||||
"seriesCount": 15,
|
||||
"stringInput": ""
|
||||
}
|
||||
],
|
||||
"timeFrom": null,
|
||||
"timeShift": null,
|
||||
"title": "Colored background",
|
||||
"transformations": [
|
||||
{
|
||||
@@ -193,29 +159,23 @@
|
||||
"type": "table"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"datasource": "gdev-testdata",
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
"mode": "thresholds"
|
||||
},
|
||||
"custom": {
|
||||
"align": "center",
|
||||
"cellOptions": {
|
||||
"type": "auto"
|
||||
},
|
||||
"filterable": false,
|
||||
"inspect": false
|
||||
"align": null,
|
||||
"filterable": false
|
||||
},
|
||||
"mappings": [],
|
||||
"thresholds": {
|
||||
"mode": "percentage",
|
||||
"steps": [
|
||||
{
|
||||
"color": "orange"
|
||||
"color": "orange",
|
||||
"value": null
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
@@ -228,51 +188,60 @@
|
||||
{
|
||||
"matcher": {
|
||||
"id": "byName",
|
||||
"options": "Basic "
|
||||
"options": "A"
|
||||
},
|
||||
"properties": [
|
||||
{
|
||||
"id": "custom.cellOptions",
|
||||
"value": {
|
||||
"mode": "basic",
|
||||
"type": "gauge"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "custom.inspect",
|
||||
"value": false
|
||||
"id": "custom.displayMode",
|
||||
"value": "gradient-gauge"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"matcher": {
|
||||
"id": "byName",
|
||||
"options": "Gradient text color value"
|
||||
"options": "Info"
|
||||
},
|
||||
"properties": [
|
||||
{
|
||||
"id": "custom.cellOptions",
|
||||
"value": {
|
||||
"mode": "gradient",
|
||||
"type": "gauge",
|
||||
"valueMode": "text"
|
||||
}
|
||||
"id": "custom.width",
|
||||
"value": 92
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"matcher": {
|
||||
"id": "byName",
|
||||
"options": "LCD hidden value"
|
||||
"options": "Min"
|
||||
},
|
||||
"properties": [
|
||||
{
|
||||
"id": "custom.cellOptions",
|
||||
"value": {
|
||||
"mode": "lcd",
|
||||
"type": "gauge",
|
||||
"valueMode": "hidden"
|
||||
}
|
||||
"id": "custom.width",
|
||||
"value": 76
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"matcher": {
|
||||
"id": "byName",
|
||||
"options": "Max"
|
||||
},
|
||||
"properties": [
|
||||
{
|
||||
"id": "custom.width",
|
||||
"value": 89
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"matcher": {
|
||||
"id": "byName",
|
||||
"options": "Time"
|
||||
},
|
||||
"properties": [
|
||||
{
|
||||
"id": "custom.width",
|
||||
"value": 165
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -280,22 +249,13 @@
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 16,
|
||||
"w": 17,
|
||||
"w": 8,
|
||||
"x": 7,
|
||||
"y": 1
|
||||
},
|
||||
"id": 2,
|
||||
"options": {
|
||||
"footer": {
|
||||
"countRows": false,
|
||||
"fields": "",
|
||||
"reducer": [
|
||||
"sum"
|
||||
],
|
||||
"show": false
|
||||
},
|
||||
"showHeader": true,
|
||||
"showRowNums": false,
|
||||
"sortBy": [
|
||||
{
|
||||
"desc": false,
|
||||
@@ -303,25 +263,22 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
"pluginVersion": "9.5.0-pre",
|
||||
"pluginVersion": "",
|
||||
"targets": [
|
||||
{
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"refId": "A",
|
||||
"scenarioId": "random_walk_table",
|
||||
"stringInput": ""
|
||||
}
|
||||
],
|
||||
"timeFrom": null,
|
||||
"timeShift": null,
|
||||
"title": "Bar gauge cells",
|
||||
"transformations": [
|
||||
{
|
||||
"id": "organize",
|
||||
"options": {
|
||||
"excludeByName": {
|
||||
"Info": true,
|
||||
"Time": true
|
||||
},
|
||||
"indexByName": {
|
||||
@@ -331,43 +288,35 @@
|
||||
"Time": 0,
|
||||
"Value": 4
|
||||
},
|
||||
"renameByName": {
|
||||
"A": "LCD hidden value",
|
||||
"Max": "Gradient text color value",
|
||||
"Min": "Basic "
|
||||
}
|
||||
"renameByName": {}
|
||||
}
|
||||
}
|
||||
],
|
||||
"type": "table"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"datasource": "gdev-testdata",
|
||||
"description": "",
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
"mode": "thresholds"
|
||||
},
|
||||
"custom": {
|
||||
"align": "auto",
|
||||
"cellOptions": {
|
||||
"type": "auto"
|
||||
},
|
||||
"inspect": false
|
||||
"align": null,
|
||||
"filterable": false
|
||||
},
|
||||
"mappings": [],
|
||||
"thresholds": {
|
||||
"mode": "absolute",
|
||||
"mode": "percentage",
|
||||
"steps": [
|
||||
{
|
||||
"color": "green"
|
||||
"color": "blue",
|
||||
"value": null
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
"value": 80
|
||||
"color": "green",
|
||||
"value": 50
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -376,329 +325,82 @@
|
||||
{
|
||||
"matcher": {
|
||||
"id": "byName",
|
||||
"options": "rate"
|
||||
"options": "A"
|
||||
},
|
||||
"properties": [
|
||||
{
|
||||
"id": "custom.cellOptions",
|
||||
"value": {
|
||||
"fillOpacity": 29,
|
||||
"gradientMode": "opacity",
|
||||
"lineWidth": 1,
|
||||
"type": "sparkline"
|
||||
}
|
||||
"id": "custom.displayMode",
|
||||
"value": "lcd-gauge"
|
||||
},
|
||||
{
|
||||
"id": "color",
|
||||
"value": {
|
||||
"mode": "continuous-GrYlRd"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"matcher": {
|
||||
"id": "byName",
|
||||
"options": "cluster"
|
||||
},
|
||||
"properties": [
|
||||
{
|
||||
"id": "custom.width",
|
||||
"value": 120
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"matcher": {
|
||||
"id": "byName",
|
||||
"options": "service"
|
||||
},
|
||||
"properties": [
|
||||
{
|
||||
"id": "custom.width",
|
||||
"value": 120
|
||||
"id": "custom.align",
|
||||
"value": "center"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 7,
|
||||
"h": 16,
|
||||
"w": 9,
|
||||
"x": 0,
|
||||
"y": 17
|
||||
"x": 15,
|
||||
"y": 1
|
||||
},
|
||||
"id": 14,
|
||||
"maxDataPoints": 50,
|
||||
"id": 5,
|
||||
"options": {
|
||||
"cellHeight": "md",
|
||||
"footer": {
|
||||
"countRows": false,
|
||||
"fields": "",
|
||||
"reducer": [
|
||||
"sum"
|
||||
],
|
||||
"show": false
|
||||
},
|
||||
"showHeader": true,
|
||||
"showRowNums": false,
|
||||
"sortBy": []
|
||||
},
|
||||
"pluginVersion": "9.5.0-pre",
|
||||
"pluginVersion": "",
|
||||
"targets": [
|
||||
{
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "gdev-testdata"
|
||||
},
|
||||
"labels": "cluster=eu,service=checkout",
|
||||
"min": 0.1,
|
||||
"refId": "A",
|
||||
"scenarioId": "random_walk",
|
||||
"seriesCount": 3
|
||||
"scenarioId": "random_walk_table",
|
||||
"stringInput": ""
|
||||
}
|
||||
],
|
||||
"title": "Sparkline cell",
|
||||
"timeFrom": null,
|
||||
"timeShift": null,
|
||||
"title": "Retro LCD cell",
|
||||
"transformations": [
|
||||
{
|
||||
"id": "timeSeriesTable",
|
||||
"options": {}
|
||||
},
|
||||
{
|
||||
"id": "organize",
|
||||
"options": {
|
||||
"excludeByName": {},
|
||||
"indexByName": {},
|
||||
"renameByName": {
|
||||
"Trend": "rate"
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"type": "table"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
"mode": "thresholds"
|
||||
},
|
||||
"custom": {
|
||||
"align": "auto",
|
||||
"cellOptions": {
|
||||
"type": "auto"
|
||||
},
|
||||
"inspect": false
|
||||
},
|
||||
"mappings": [],
|
||||
"thresholds": {
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "green"
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
"value": 80
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"overrides": [
|
||||
{
|
||||
"matcher": {
|
||||
"id": "byName",
|
||||
"options": "rate"
|
||||
},
|
||||
"properties": [
|
||||
{
|
||||
"id": "custom.cellOptions",
|
||||
"value": {
|
||||
"drawStyle": "bars",
|
||||
"fillOpacity": 100,
|
||||
"gradientMode": "hue",
|
||||
"lineWidth": 0,
|
||||
"showPoints": "auto",
|
||||
"type": "sparkline"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "color",
|
||||
"value": {
|
||||
"mode": "continuous-GrYlRd"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "color",
|
||||
"value": {
|
||||
"fixedColor": "red",
|
||||
"mode": "fixed"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"matcher": {
|
||||
"id": "byName",
|
||||
"options": "latency"
|
||||
},
|
||||
"properties": [
|
||||
{
|
||||
"id": "custom.cellOptions",
|
||||
"value": {
|
||||
"fillOpacity": 40,
|
||||
"gradientMode": "opacity",
|
||||
"lineInterpolation": "stepBefore",
|
||||
"lineWidth": 1,
|
||||
"type": "sparkline"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "color",
|
||||
"value": {
|
||||
"fixedColor": "purple",
|
||||
"mode": "fixed"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"matcher": {
|
||||
"id": "byName",
|
||||
"options": "service"
|
||||
},
|
||||
"properties": [
|
||||
{
|
||||
"id": "custom.width",
|
||||
"value": 120
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"matcher": {
|
||||
"id": "byName",
|
||||
"options": "cluster"
|
||||
},
|
||||
"properties": [
|
||||
{
|
||||
"id": "custom.width",
|
||||
"value": 120
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 7,
|
||||
"w": 15,
|
||||
"x": 9,
|
||||
"y": 17
|
||||
},
|
||||
"id": 15,
|
||||
"maxDataPoints": 30,
|
||||
"options": {
|
||||
"cellHeight": "md",
|
||||
"footer": {
|
||||
"countRows": false,
|
||||
"fields": "",
|
||||
"reducer": [
|
||||
"sum"
|
||||
],
|
||||
"show": false
|
||||
},
|
||||
"showHeader": true,
|
||||
"showRowNums": false
|
||||
},
|
||||
"pluginVersion": "9.5.0-pre",
|
||||
"targets": [
|
||||
{
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "gdev-testdata"
|
||||
},
|
||||
"labels": "cluster=eu,service=checkout",
|
||||
"min": 0.1,
|
||||
"refId": "A",
|
||||
"scenarioId": "random_walk",
|
||||
"seriesCount": 3
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "gdev-testdata"
|
||||
},
|
||||
"hide": false,
|
||||
"labels": "cluster=eu,service=checkout",
|
||||
"min": 0.1,
|
||||
"refId": "B",
|
||||
"scenarioId": "random_walk",
|
||||
"seriesCount": 3
|
||||
}
|
||||
],
|
||||
"title": "Multiple sparkline cells per row",
|
||||
"transformations": [
|
||||
{
|
||||
"id": "timeSeriesTable",
|
||||
"options": {}
|
||||
},
|
||||
{
|
||||
"id": "joinByField",
|
||||
"options": {
|
||||
"byField": "service",
|
||||
"mode": "outer"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "organize",
|
||||
"options": {
|
||||
"excludeByName": {
|
||||
"cluster 2": true
|
||||
"Info": false,
|
||||
"Max": true,
|
||||
"Min": true,
|
||||
"Time": false
|
||||
},
|
||||
"indexByName": {},
|
||||
"renameByName": {
|
||||
"Trend": "rate",
|
||||
"Trend #A": "rate",
|
||||
"Trend #B": "latency",
|
||||
"cluster 1": "cluster"
|
||||
}
|
||||
"indexByName": {
|
||||
"Info": 1,
|
||||
"Max": 3,
|
||||
"Min": 2,
|
||||
"Time": 0,
|
||||
"Value": 4
|
||||
},
|
||||
"renameByName": {}
|
||||
}
|
||||
}
|
||||
],
|
||||
"type": "table"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "gdev-testdata"
|
||||
},
|
||||
"collapsed": false,
|
||||
"datasource": "gdev-testdata",
|
||||
"gridPos": {
|
||||
"h": 1,
|
||||
"w": 24,
|
||||
"x": 0,
|
||||
"y": 24
|
||||
"y": 17
|
||||
},
|
||||
"id": 9,
|
||||
"targets": [
|
||||
{
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "gdev-testdata"
|
||||
},
|
||||
"refId": "A"
|
||||
}
|
||||
],
|
||||
"panels": [],
|
||||
"title": "Data links",
|
||||
"type": "row"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "gdev-testdata"
|
||||
},
|
||||
"datasource": "gdev-testdata",
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
@@ -706,11 +408,8 @@
|
||||
},
|
||||
"custom": {
|
||||
"align": "center",
|
||||
"cellOptions": {
|
||||
"type": "color-text"
|
||||
},
|
||||
"filterable": false,
|
||||
"inspect": false
|
||||
"displayMode": "color-text",
|
||||
"filterable": false
|
||||
},
|
||||
"decimals": 2,
|
||||
"mappings": [],
|
||||
@@ -718,7 +417,8 @@
|
||||
"mode": "percentage",
|
||||
"steps": [
|
||||
{
|
||||
"color": "green"
|
||||
"color": "green",
|
||||
"value": null
|
||||
},
|
||||
{
|
||||
"color": "blue",
|
||||
@@ -744,7 +444,8 @@
|
||||
},
|
||||
"properties": [
|
||||
{
|
||||
"id": "custom.align"
|
||||
"id": "custom.align",
|
||||
"value": null
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -771,30 +472,17 @@
|
||||
"h": 8,
|
||||
"w": 12,
|
||||
"x": 0,
|
||||
"y": 25
|
||||
"y": 18
|
||||
},
|
||||
"id": 3,
|
||||
"maxDataPoints": "10",
|
||||
"options": {
|
||||
"cellHeight": "md",
|
||||
"footer": {
|
||||
"countRows": false,
|
||||
"fields": "",
|
||||
"reducer": [
|
||||
"sum"
|
||||
],
|
||||
"show": false
|
||||
},
|
||||
"showHeader": true,
|
||||
"showRowNums": false
|
||||
"showHeader": true
|
||||
},
|
||||
"pluginVersion": "9.5.0-pre",
|
||||
"pluginVersion": "",
|
||||
"targets": [
|
||||
{
|
||||
"alias": "S1",
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "gdev-testdata"
|
||||
},
|
||||
"labels": "server=A",
|
||||
"refId": "A",
|
||||
"scenarioId": "random_walk",
|
||||
@@ -803,10 +491,6 @@
|
||||
},
|
||||
{
|
||||
"alias": "S2",
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "gdev-testdata"
|
||||
},
|
||||
"labels": "server=B",
|
||||
"refId": "B",
|
||||
"scenarioId": "random_walk",
|
||||
@@ -815,10 +499,6 @@
|
||||
},
|
||||
{
|
||||
"alias": "S3",
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "gdev-testdata"
|
||||
},
|
||||
"labels": "server=C",
|
||||
"refId": "C",
|
||||
"scenarioId": "random_walk",
|
||||
@@ -826,6 +506,8 @@
|
||||
"stringInput": ""
|
||||
}
|
||||
],
|
||||
"timeFrom": null,
|
||||
"timeShift": null,
|
||||
"title": "Data link with labels and numeric value",
|
||||
"transformations": [
|
||||
{
|
||||
@@ -836,10 +518,7 @@
|
||||
"type": "table"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "gdev-testdata"
|
||||
},
|
||||
"datasource": "gdev-testdata",
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
@@ -847,18 +526,16 @@
|
||||
},
|
||||
"custom": {
|
||||
"align": "center",
|
||||
"cellOptions": {
|
||||
"type": "auto"
|
||||
},
|
||||
"filterable": false,
|
||||
"inspect": false
|
||||
"displayMode": "auto",
|
||||
"filterable": false
|
||||
},
|
||||
"mappings": [],
|
||||
"thresholds": {
|
||||
"mode": "percentage",
|
||||
"steps": [
|
||||
{
|
||||
"color": "green"
|
||||
"color": "green",
|
||||
"value": null
|
||||
},
|
||||
{
|
||||
"color": "blue",
|
||||
@@ -882,21 +559,11 @@
|
||||
"h": 8,
|
||||
"w": 5,
|
||||
"x": 12,
|
||||
"y": 25
|
||||
"y": 18
|
||||
},
|
||||
"id": 10,
|
||||
"options": {
|
||||
"cellHeight": "md",
|
||||
"footer": {
|
||||
"countRows": false,
|
||||
"fields": "",
|
||||
"reducer": [
|
||||
"sum"
|
||||
],
|
||||
"show": false
|
||||
},
|
||||
"showHeader": false,
|
||||
"showRowNums": false,
|
||||
"sortBy": [
|
||||
{
|
||||
"desc": true,
|
||||
@@ -904,19 +571,17 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
"pluginVersion": "9.5.0-pre",
|
||||
"pluginVersion": "",
|
||||
"targets": [
|
||||
{
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "gdev-testdata"
|
||||
},
|
||||
"refId": "A",
|
||||
"scenarioId": "random_walk_table",
|
||||
"seriesCount": 5,
|
||||
"stringInput": ""
|
||||
}
|
||||
],
|
||||
"timeFrom": null,
|
||||
"timeShift": null,
|
||||
"title": "No header",
|
||||
"transformations": [
|
||||
{
|
||||
@@ -941,10 +606,7 @@
|
||||
"type": "table"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "gdev-testdata"
|
||||
},
|
||||
"datasource": "gdev-testdata",
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
@@ -952,17 +614,15 @@
|
||||
},
|
||||
"custom": {
|
||||
"align": "auto",
|
||||
"cellOptions": {
|
||||
"type": "auto"
|
||||
},
|
||||
"inspect": false
|
||||
"displayMode": "auto"
|
||||
},
|
||||
"mappings": [],
|
||||
"thresholds": {
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "green"
|
||||
"color": "green",
|
||||
"value": 0
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
@@ -977,39 +637,25 @@
|
||||
"h": 8,
|
||||
"w": 12,
|
||||
"x": 0,
|
||||
"y": 33
|
||||
"y": 26
|
||||
},
|
||||
"id": 12,
|
||||
"options": {
|
||||
"cellHeight": "md",
|
||||
"footer": {
|
||||
"countRows": false,
|
||||
"show": true,
|
||||
"fields": "",
|
||||
"reducer": [
|
||||
"sum"
|
||||
],
|
||||
"show": true
|
||||
]
|
||||
},
|
||||
"showHeader": true,
|
||||
"showRowNums": false
|
||||
"showHeader": true
|
||||
},
|
||||
"pluginVersion": "9.5.0-pre",
|
||||
"targets": [
|
||||
{
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "gdev-testdata"
|
||||
},
|
||||
"refId": "A"
|
||||
}
|
||||
],
|
||||
"pluginVersion": "",
|
||||
"title": "Footer",
|
||||
"type": "table"
|
||||
}
|
||||
],
|
||||
"refresh": "",
|
||||
"revision": 1,
|
||||
"schemaVersion": 38,
|
||||
"schemaVersion": 27,
|
||||
"style": "dark",
|
||||
"tags": [
|
||||
"gdev",
|
||||
@@ -1038,6 +684,5 @@
|
||||
"timezone": "",
|
||||
"title": "Panel Tests - React Table",
|
||||
"uid": "U_bZIMRMk",
|
||||
"version": 7,
|
||||
"weekStart": ""
|
||||
"version": 6
|
||||
}
|
||||
@@ -736,6 +736,7 @@
|
||||
}
|
||||
],
|
||||
"refresh": false,
|
||||
"revision": 1,
|
||||
"schemaVersion": 38,
|
||||
"style": "dark",
|
||||
"tags": [
|
||||
|
||||
@@ -1156,194 +1156,11 @@
|
||||
],
|
||||
"title": "Boolean On/Off",
|
||||
"type": "timeseries"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
"mode": "palette-classic"
|
||||
},
|
||||
"custom": {
|
||||
"axisCenteredZero": false,
|
||||
"axisColorMode": "text",
|
||||
"axisLabel": "",
|
||||
"axisPlacement": "auto",
|
||||
"barAlignment": 0,
|
||||
"drawStyle": "line",
|
||||
"fillOpacity": 0,
|
||||
"gradientMode": "none",
|
||||
"hideFrom": {
|
||||
"legend": false,
|
||||
"tooltip": false,
|
||||
"viz": false
|
||||
},
|
||||
"lineInterpolation": "linear",
|
||||
"lineWidth": 1,
|
||||
"pointSize": 5,
|
||||
"scaleDistribution": {
|
||||
"log": 2,
|
||||
"type": "log"
|
||||
},
|
||||
"showPoints": "auto",
|
||||
"spanNulls": false,
|
||||
"stacking": {
|
||||
"group": "A",
|
||||
"mode": "none"
|
||||
},
|
||||
"thresholdsStyle": {
|
||||
"mode": "off"
|
||||
}
|
||||
},
|
||||
"mappings": [],
|
||||
"max": 150,
|
||||
"min": 0,
|
||||
"thresholds": {
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "green"
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
"value": 80
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 7,
|
||||
"w": 8,
|
||||
"x": 0,
|
||||
"y": 31
|
||||
},
|
||||
"id": 16,
|
||||
"options": {
|
||||
"legend": {
|
||||
"calcs": [],
|
||||
"displayMode": "list",
|
||||
"placement": "bottom",
|
||||
"showLegend": true
|
||||
},
|
||||
"tooltip": {
|
||||
"mode": "single",
|
||||
"sort": "none"
|
||||
}
|
||||
},
|
||||
"targets": [
|
||||
{
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"refId": "A",
|
||||
"scenarioId": "csv_metric_values",
|
||||
"stringInput": "1,20,90.5,30,5,0"
|
||||
}
|
||||
],
|
||||
"title": "Ignore invalid min/max opts when log scale",
|
||||
"type": "timeseries"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
"mode": "palette-classic"
|
||||
},
|
||||
"custom": {
|
||||
"axisCenteredZero": false,
|
||||
"axisColorMode": "text",
|
||||
"axisLabel": "",
|
||||
"axisPlacement": "auto",
|
||||
"barAlignment": 0,
|
||||
"drawStyle": "line",
|
||||
"fillOpacity": 0,
|
||||
"gradientMode": "none",
|
||||
"hideFrom": {
|
||||
"legend": false,
|
||||
"tooltip": false,
|
||||
"viz": false
|
||||
},
|
||||
"lineInterpolation": "linear",
|
||||
"lineWidth": 1,
|
||||
"pointSize": 5,
|
||||
"scaleDistribution": {
|
||||
"log": 2,
|
||||
"type": "symlog"
|
||||
},
|
||||
"showPoints": "auto",
|
||||
"spanNulls": false,
|
||||
"stacking": {
|
||||
"group": "A",
|
||||
"mode": "none"
|
||||
},
|
||||
"thresholdsStyle": {
|
||||
"mode": "off"
|
||||
}
|
||||
},
|
||||
"mappings": [],
|
||||
"max": 200,
|
||||
"min": -15,
|
||||
"thresholds": {
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "green"
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
"value": 80
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 7,
|
||||
"w": 8,
|
||||
"x": 8,
|
||||
"y": 31
|
||||
},
|
||||
"id": 17,
|
||||
"options": {
|
||||
"legend": {
|
||||
"calcs": [],
|
||||
"displayMode": "list",
|
||||
"placement": "bottom",
|
||||
"showLegend": true
|
||||
},
|
||||
"tooltip": {
|
||||
"mode": "single",
|
||||
"sort": "none"
|
||||
}
|
||||
},
|
||||
"targets": [
|
||||
{
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"refId": "A",
|
||||
"scenarioId": "csv_metric_values",
|
||||
"stringInput": "1,20,90.5,30,5,0"
|
||||
}
|
||||
],
|
||||
"title": "Neg min opt with symlog scale",
|
||||
"type": "timeseries"
|
||||
}
|
||||
],
|
||||
"refresh": "",
|
||||
"schemaVersion": 38,
|
||||
"refresh": false,
|
||||
"revision": 1,
|
||||
"schemaVersion": 37,
|
||||
"style": "dark",
|
||||
"tags": [
|
||||
"gdev",
|
||||
@@ -1374,6 +1191,6 @@
|
||||
"timezone": "",
|
||||
"title": "Panel Tests - Graph NG - Y axis ticks",
|
||||
"uid": "29Yjn62Gk",
|
||||
"version": 13,
|
||||
"version": 1,
|
||||
"weekStart": ""
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@ Useful for testing a second implementation
|
||||
|
||||
- [x] LDAP
|
||||
- [x] SAML
|
||||
- [x] OAuth
|
||||
- [ ] OAuth
|
||||
|
||||
## Deployment
|
||||
|
||||
@@ -71,23 +71,6 @@ allow_idp_initiated = true
|
||||
org_mapping = admin:1:Admin, editor:1:Editor, viewer:1:Viewer
|
||||
```
|
||||
|
||||
# OAuth Setup
|
||||
|
||||
```ini
|
||||
[auth.generic_oauth]
|
||||
name = authentik
|
||||
enabled = true
|
||||
client_id = 43e8d2746fe2e508325a23cdf816d6ddd12e94f1
|
||||
client_secret = e50440f14a010fd69dfed85bc6c071653f22c73e2c6c8d7ba96a936937d92040936b7e5a4bcc1bf40d5cf1dc019b1db327a1a00e2183c53471fb7530d4a09d7e
|
||||
scopes = openid email profile
|
||||
auth_url = http://localhost:9000/application/o/authorize/
|
||||
token_url = http://localhost:9000/application/o/token/
|
||||
api_url = http://localhost:9000/application/o/userinfo/
|
||||
role_attribute_path = contains(groups[*], 'admin') && 'Admin' || contains(groups[*], 'editor') && 'Editor' || 'Viewer'
|
||||
|
||||
[auth]
|
||||
signout_redirect_url = http://localhost:9000/application/o/grafana-oidc/end-session/
|
||||
```
|
||||
|
||||
## Available users and groups
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -39,7 +39,7 @@
|
||||
- "authentik:authentik"
|
||||
|
||||
authentik:
|
||||
image: ${AUTHENTIK_IMAGE:-ghcr.io/goauthentik/server}:${AUTHENTIK_TAG:-2023.2.3}
|
||||
image: ${AUTHENTIK_IMAGE:-ghcr.io/goauthentik/server}:${AUTHENTIK_TAG:-2022.12.1}
|
||||
restart: unless-stopped
|
||||
container_name: authentik
|
||||
command: server
|
||||
|
||||
@@ -53,6 +53,7 @@ async function elasticSendLogItem(timestamp, item) {
|
||||
const url = new URL(ELASTIC_BASE_URL);
|
||||
url.pathname = `/logs-${timestampText}/_doc`;
|
||||
await jsonRequest(item, 'POST', url, 201);
|
||||
console.log(`posted to ${url.toString()}`);
|
||||
}
|
||||
|
||||
async function elasticSetupIndexTemplate() {
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
FROM node:18-alpine
|
||||
FROM node:16-alpine
|
||||
|
||||
COPY data.js /home/node/data.js
|
||||
@@ -47,7 +47,10 @@ async function sleep(duration) {
|
||||
});
|
||||
}
|
||||
|
||||
async function lokiSendLogLine(timestampNs, line, tags) {
|
||||
async function lokiSendLogLine(timestampMs, line, tags) {
|
||||
// we keep nanosecond-timestamp in a string because
|
||||
// as a number it would be too large
|
||||
const timestampNs = `${timestampMs}000000`;
|
||||
const data = {
|
||||
streams: [
|
||||
{
|
||||
@@ -110,60 +113,21 @@ function logFmtLine(item) {
|
||||
return parts.join(' ');
|
||||
}
|
||||
|
||||
const DAYS = 7;
|
||||
const POINTS_PER_DAY = 1000;
|
||||
|
||||
// it's important to have good "delays" between
|
||||
// log-line-timestamps, because the "density" of log-lines
|
||||
// is what gives the loki metric queries shape.
|
||||
function calculateDelays(pointsCount) {
|
||||
const delays = [];
|
||||
for(let i=0;i<pointsCount; i+=1) {
|
||||
const delay = Math.random();
|
||||
delays.push(delay);
|
||||
}
|
||||
// now, i want to normalize the delays-array, so that the sum of
|
||||
// all it's items adds up to `1`.
|
||||
const allDelays = delays.reduce((acc, current) => acc + current, 0);
|
||||
|
||||
for(let i=0;i<delays.length; i++) {
|
||||
delays[i] = delays[i] / allDelays
|
||||
}
|
||||
|
||||
return delays;
|
||||
const SLEEP_ANGLE_STEP = Math.PI / 200;
|
||||
let sleepAngle = 0;
|
||||
function getNextSineWaveSleepDuration() {
|
||||
sleepAngle += SLEEP_ANGLE_STEP;
|
||||
return Math.trunc(1000 * Math.abs(Math.sin(sleepAngle)));
|
||||
}
|
||||
|
||||
function getRandomNanosecPart() {
|
||||
// we want to have cases with milliseconds-only, with microsec and nanosec.
|
||||
const mode = Math.random();
|
||||
|
||||
if (mode < 0.333) {
|
||||
// only milisec precision
|
||||
return '000000';
|
||||
}
|
||||
|
||||
if (mode < 0.666) {
|
||||
// microsec precision
|
||||
return Math.trunc(Math.random()*1000).toString().padStart(3, '0') + '000'
|
||||
}
|
||||
|
||||
// nanosec precision
|
||||
return Math.trunc(Math.random()*1000000).toString().padStart(6, '0')
|
||||
}
|
||||
|
||||
|
||||
async function main() {
|
||||
const delays = calculateDelays(DAYS * POINTS_PER_DAY);
|
||||
const timeRange = DAYS * 24 * 60 * 60 * 1000;
|
||||
let timestampMs = new Date().getTime() - timeRange;
|
||||
for(let i =0; i < delays.length; i++ ) { // i cannot do a forEach because of the `await` inside
|
||||
const delay = delays[i];
|
||||
timestampMs += Math.trunc(delay * timeRange);
|
||||
const timestampNs = `${timestampMs}${getRandomNanosecPart()}`;
|
||||
const item = getRandomLogItem(i + 1)
|
||||
await lokiSendLogLine(timestampNs, JSON.stringify(item), {place:'moon', source: 'data', instance: 'server\\1', job: '"grafana/data"'});
|
||||
await lokiSendLogLine(timestampNs, logFmtLine(item), {place:'luna', source: 'data', instance: 'server\\2', job: '"grafana/data"'});
|
||||
};
|
||||
for (let step = 0; step < 300; step++) {
|
||||
await sleep(getNextSineWaveSleepDuration());
|
||||
const timestampMs = new Date().getTime();
|
||||
const item = getRandomLogItem(step + 1)
|
||||
lokiSendLogLine(timestampMs, JSON.stringify(item), {place:'moon', source: 'data', instance: 'server\\1', job: '"grafana/data"'});
|
||||
lokiSendLogLine(timestampMs, logFmtLine(item), {place:'luna', source: 'data', instance: 'server\\2', job: '"grafana/data"'});
|
||||
}
|
||||
}
|
||||
|
||||
// when running in docker, we catch the needed stop-signal, to shutdown fast
|
||||
|
||||
@@ -3,4 +3,5 @@ This devenv docker-compose.yaml will allow you to;
|
||||
- view traces
|
||||
- upload/download trace JSON files
|
||||
- view service graphs
|
||||
- view the APM table
|
||||
- search traces via Loki
|
||||
|
||||
@@ -81,7 +81,7 @@ services:
|
||||
- "4318:4318" # otlp http
|
||||
|
||||
prometheus:
|
||||
image: prom/prometheus:latest
|
||||
image: prom/prometheus:main
|
||||
command:
|
||||
- --config.file=/etc/prometheus.yaml
|
||||
- --web.enable-remote-write-receiver
|
||||
|
||||
@@ -1,12 +0,0 @@
|
||||
FROM golang:1.19
|
||||
|
||||
ADD webhook-listener.go /go/src/webhook/webhook-listener.go
|
||||
|
||||
WORKDIR /go/src/webhook
|
||||
|
||||
RUN mkdir /tmp/logs
|
||||
RUN go build -o /bin webhook-listener.go
|
||||
|
||||
ENV PORT 8080
|
||||
|
||||
ENTRYPOINT [ "/bin/webhook-listener" ]
|
||||
@@ -32,7 +32,7 @@ services:
|
||||
environment:
|
||||
- VIRTUAL_HOST=prometheus.loc
|
||||
ports:
|
||||
- 9090
|
||||
- 909
|
||||
nginx-proxy:
|
||||
image: jwilder/nginx-proxy
|
||||
ports:
|
||||
@@ -43,53 +43,48 @@ services:
|
||||
db:
|
||||
condition: service_healthy
|
||||
grafana1:
|
||||
extends:
|
||||
file: ./grafana-service.yml
|
||||
service: grafana
|
||||
image: grafana/grafana:dev
|
||||
volumes:
|
||||
- ./grafana/provisioning/:/etc/grafana/provisioning/
|
||||
environment:
|
||||
- VIRTUAL_HOST=grafana.loc
|
||||
- GF_FEATURE_TOGGLES_ENABLE=ngalert
|
||||
- GF_UNIFIED_ALERTING_HA_PEERS=ha-test-unified-alerting_grafana2_1:9094,ha-test-unified-alerting_grafana1_1:9094
|
||||
- GF_SERVER_ROOT_URL=http://grafana.loc
|
||||
- GF_DATABASE_NAME=grafana
|
||||
- GF_DATABASE_USER=grafana
|
||||
- GF_DATABASE_PASSWORD=password
|
||||
- GF_DATABASE_TYPE=mysql
|
||||
- GF_DATABASE_HOST=db:3306
|
||||
- GF_DATABASE_MAX_OPEN_CONN=300
|
||||
- GF_SESSION_PROVIDER=mysql
|
||||
- GF_SESSION_PROVIDER_CONFIG=grafana:password@tcp(db:3306)/grafana?allowNativePasswords=true
|
||||
ports:
|
||||
- 3010:3000
|
||||
depends_on:
|
||||
db:
|
||||
condition: service_healthy
|
||||
|
||||
grafana2:
|
||||
extends:
|
||||
file: ./grafana-service.yml
|
||||
service: grafana
|
||||
image: grafana/grafana:dev
|
||||
volumes:
|
||||
- ./grafana/provisioning/:/etc/grafana/provisioning/
|
||||
environment:
|
||||
- VIRTUAL_HOST=grafana.loc
|
||||
- GF_FEATURE_TOGGLES_ENABLE=ngalert
|
||||
- GF_UNIFIED_ALERTING_HA_PEERS=ha-test-unified-alerting_grafana2_1:9094,ha-test-unified-alerting_grafana1_1:9094
|
||||
- GF_SERVER_ROOT_URL=http://grafana.loc
|
||||
- GF_DATABASE_NAME=grafana
|
||||
- GF_DATABASE_USER=grafana
|
||||
- GF_DATABASE_PASSWORD=password
|
||||
- GF_DATABASE_TYPE=mysql
|
||||
- GF_DATABASE_HOST=db:3306
|
||||
- GF_DATABASE_MAX_OPEN_CONN=300
|
||||
- GF_SESSION_PROVIDER=mysql
|
||||
- GF_SESSION_PROVIDER_CONFIG=grafana:password@tcp(db:3306)/grafana?allowNativePasswords=true
|
||||
ports:
|
||||
- 3020:3000
|
||||
depends_on:
|
||||
db:
|
||||
condition: service_healthy
|
||||
grafana1:
|
||||
condition: service_healthy
|
||||
grafana3:
|
||||
extends:
|
||||
file: ./grafana-service.yml
|
||||
service: grafana
|
||||
ports:
|
||||
- 3030:3000
|
||||
depends_on:
|
||||
db:
|
||||
condition: service_healthy
|
||||
grafana2:
|
||||
condition: service_healthy
|
||||
grafana4:
|
||||
extends:
|
||||
file: ./grafana-service.yml
|
||||
service: grafana
|
||||
ports:
|
||||
- 3040:3000
|
||||
depends_on:
|
||||
db:
|
||||
condition: service_healthy
|
||||
grafana3:
|
||||
condition: service_healthy
|
||||
webhook:
|
||||
image: webhook-receiver
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
ports:
|
||||
- "18081:8080"
|
||||
volumes:
|
||||
- "./logs/webhook:/tmp/logs:rw"
|
||||
|
||||
|
||||
@@ -1,23 +0,0 @@
|
||||
services:
|
||||
grafana:
|
||||
image: grafana/grafana-dev:3a22eba17f23b18faa27436ab2f9c3ea977b550b
|
||||
volumes:
|
||||
- ./grafana/provisioning/:/etc/grafana/provisioning/
|
||||
environment:
|
||||
- VIRTUAL_HOST=grafana.loc
|
||||
- GF_FEATURE_TOGGLES_ENABLE=ngalert
|
||||
- GF_UNIFIED_ALERTING_HA_PEERS=ha-test-unified-alerting-grafana2-1:9094,ha-test-unified-alerting-grafana1-1:9094,ha-test-unified-alerting-grafana3-1:9094,ha-test-unified-alerting-grafana4-1:9094
|
||||
- GF_SERVER_ROOT_URL=http://grafana.loc
|
||||
- GF_DATABASE_NAME=grafana
|
||||
- GF_DATABASE_USER=grafana
|
||||
- GF_DATABASE_PASSWORD=password
|
||||
- GF_DATABASE_TYPE=mysql
|
||||
- GF_DATABASE_HOST=db:3306
|
||||
- GF_DATABASE_MAX_OPEN_CONN=300
|
||||
- GF_SESSION_PROVIDER=mysql
|
||||
- GF_SESSION_PROVIDER_CONFIG=grafana:password@tcp(db:3306)/grafana?allowNativePasswords=true
|
||||
healthcheck:
|
||||
test: timeout 10s bash -c ':> /dev/tcp/127.0.0.1/3000' || exit 1
|
||||
interval: 5s
|
||||
timeout: 15s
|
||||
retries: 3
|
||||
@@ -1,181 +0,0 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"flag"
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"log"
|
||||
"net/http"
|
||||
"os"
|
||||
"path"
|
||||
"path/filepath"
|
||||
"sync"
|
||||
"time"
|
||||
)
|
||||
|
||||
var (
|
||||
fingerprints = make(Fingerprints)
|
||||
mu sync.Mutex
|
||||
waitSeconds int
|
||||
logFile bool
|
||||
logFileName = filepath.Join(os.TempDir(), "/logs/webhook-listener.log")
|
||||
dumpDir = filepath.Join(os.TempDir(), "/logs/dumps")
|
||||
)
|
||||
|
||||
type Alert struct {
|
||||
Fingerprint string `json:"fingerprint"`
|
||||
StartsAt time.Time `json:"startsAt"`
|
||||
Status string `json:"status"`
|
||||
}
|
||||
|
||||
type Data struct {
|
||||
Receiver string `json:"receiver"`
|
||||
Status string `json:"status"`
|
||||
Alerts []Alert `json:"alerts"`
|
||||
}
|
||||
|
||||
// Fingerprints keeps track of the number of alerts received
|
||||
// by fingerprint and StartsAt time.
|
||||
type Fingerprints map[string]map[time.Time]tracker
|
||||
|
||||
type tracker struct {
|
||||
Updates int `json:"updates"`
|
||||
Statuses []string `json:"statuses"`
|
||||
}
|
||||
|
||||
func updateFingerprints(v Data) {
|
||||
mu.Lock()
|
||||
defer mu.Unlock()
|
||||
for _, alert := range v.Alerts {
|
||||
m, ok := fingerprints[alert.Fingerprint]
|
||||
if !ok {
|
||||
m = make(map[time.Time]tracker)
|
||||
}
|
||||
|
||||
t, ok := m[alert.StartsAt]
|
||||
if !ok {
|
||||
t = tracker{
|
||||
Updates: 0,
|
||||
Statuses: []string{},
|
||||
}
|
||||
}
|
||||
|
||||
t.Updates += 1
|
||||
t.Statuses = append(t.Statuses, alert.Status)
|
||||
|
||||
m[alert.StartsAt] = t
|
||||
fingerprints[alert.Fingerprint] = m
|
||||
}
|
||||
}
|
||||
|
||||
func parseFlags() {
|
||||
flag.BoolVar(&logFile, "log-file", true, "Whether to log to file")
|
||||
flag.IntVar(&waitSeconds, "wait-seconds", 0, "The number of seconds to wait before sending an HTTP response")
|
||||
flag.Parse()
|
||||
}
|
||||
|
||||
func saveDump(data []byte) {
|
||||
if !logFile {
|
||||
return
|
||||
}
|
||||
|
||||
if len(data) == 0 {
|
||||
fmt.Println("empty dump - not saving")
|
||||
return
|
||||
}
|
||||
ts := time.Now().UnixNano()
|
||||
name := path.Join(dumpDir, fmt.Sprintf("%d.json", ts))
|
||||
for i := 1; i <= 1000; i++ {
|
||||
if _, err := os.Stat(name); os.IsNotExist(err) {
|
||||
break
|
||||
}
|
||||
name = path.Join(dumpDir, fmt.Sprintf("%d_%04d.json", ts, i))
|
||||
}
|
||||
log.Printf("saving dump to %s", name)
|
||||
err := os.WriteFile(name, data, os.ModePerm)
|
||||
if err != nil {
|
||||
log.Printf("cannot save to file %s: %s\n", name, err)
|
||||
}
|
||||
}
|
||||
|
||||
func main() {
|
||||
parseFlags()
|
||||
|
||||
_, err := os.Stat(dumpDir)
|
||||
if os.IsNotExist(err) {
|
||||
err = os.MkdirAll(dumpDir, os.ModePerm)
|
||||
if err != nil {
|
||||
log.Panicf("can't create directory '%s'", dumpDir)
|
||||
}
|
||||
}
|
||||
|
||||
if logFile {
|
||||
//create your file with desired read/write permissions
|
||||
f, err := os.OpenFile(logFileName, os.O_WRONLY|os.O_CREATE|os.O_APPEND, os.ModePerm)
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
defer f.Close()
|
||||
log.SetOutput(f)
|
||||
}
|
||||
|
||||
waitDuration := time.Duration(waitSeconds) * time.Second
|
||||
http.HandleFunc("/", func(writer http.ResponseWriter, request *http.Request) {
|
||||
|
||||
writer.WriteHeader(http.StatusOK)
|
||||
writer.Write([]byte(landingPage))
|
||||
})
|
||||
|
||||
http.HandleFunc("/listen", func(w http.ResponseWriter, r *http.Request) {
|
||||
log.Printf("got submission from: %s\n", r.RemoteAddr)
|
||||
b, err := ioutil.ReadAll(r.Body)
|
||||
if err != nil {
|
||||
log.Println(err)
|
||||
w.WriteHeader(http.StatusBadRequest)
|
||||
return
|
||||
}
|
||||
saveDump(b)
|
||||
v := Data{}
|
||||
if err := json.Unmarshal(b, &v); err != nil {
|
||||
log.Println(err)
|
||||
w.WriteHeader(http.StatusBadRequest)
|
||||
return
|
||||
}
|
||||
fmt.Printf("receiver: %s, status: %s\n", v.Receiver, v.Status)
|
||||
updateFingerprints(v)
|
||||
<-time.After(waitDuration)
|
||||
})
|
||||
http.HandleFunc("/fingerprints", func(w http.ResponseWriter, r *http.Request) {
|
||||
b, err := func() ([]byte, error) {
|
||||
mu.Lock()
|
||||
defer mu.Unlock()
|
||||
return json.Marshal(fingerprints)
|
||||
}()
|
||||
if err != nil {
|
||||
log.Println(err)
|
||||
w.WriteHeader(http.StatusInternalServerError)
|
||||
return
|
||||
}
|
||||
w.Header().Add("Content-Type", "application/json")
|
||||
w.Write(b)
|
||||
})
|
||||
log.Println("Listening")
|
||||
log.Printf("Wait Duration %v\n", waitDuration)
|
||||
http.ListenAndServe("0.0.0.0:8080", nil)
|
||||
}
|
||||
|
||||
const landingPage = `
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Webhook listener</title>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Webhook Listener<h1>
|
||||
|
||||
<p> For setup, please point your webhook configuration to the "/listen" endpoint. </p>
|
||||
<p> For debugging, please use the "/fingerprints" endpoint. </p>
|
||||
</body>
|
||||
</html>
|
||||
`
|
||||
10
devenv/docker/loadtest-ts/.babelrc
Normal file
10
devenv/docker/loadtest-ts/.babelrc
Normal file
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"presets": [
|
||||
"@babel/env",
|
||||
"@babel/typescript"
|
||||
],
|
||||
"plugins": [
|
||||
"@babel/proposal-class-properties",
|
||||
"@babel/proposal-object-rest-spread"
|
||||
]
|
||||
}
|
||||
3
devenv/docker/loadtest-ts/.gitignore
vendored
Normal file
3
devenv/docker/loadtest-ts/.gitignore
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
scripts/tmp
|
||||
dist/
|
||||
.yarn
|
||||
14
devenv/docker/loadtest-ts/README.md
Normal file
14
devenv/docker/loadtest-ts/README.md
Normal file
@@ -0,0 +1,14 @@
|
||||
# Grafana load tests written in typescript - EXPERIMENTAL
|
||||
|
||||
Runs load tests written in typescript and checks Grafana's performance using [k6](https://k6.io/)
|
||||
|
||||
This is **experimental** - please consider adding new tests to devenv/docker/loadtest while we are testing the typescript approach!
|
||||
|
||||
|
||||
|
||||
# How to run
|
||||
|
||||
```
|
||||
yarn install
|
||||
GRPC_TOKEN={REPLACE_WITH_SERVICE_ACCOUNT_ADMIN_TOKEN} ./run.sh test=object-store-test grpcAddress=127.0.0.1:10000 execution=local
|
||||
```
|
||||
28
devenv/docker/loadtest-ts/package.json
Normal file
28
devenv/docker/loadtest-ts/package.json
Normal file
@@ -0,0 +1,28 @@
|
||||
{
|
||||
"private": true,
|
||||
"license": "Apache-2.0",
|
||||
"name": "@grafana/perf-tests",
|
||||
"version": "9.4.0-pre",
|
||||
"devDependencies": {
|
||||
"@babel/core": "7.19.6",
|
||||
"@babel/plugin-proposal-class-properties": "7.18.6",
|
||||
"@babel/plugin-proposal-object-rest-spread": "7.19.4",
|
||||
"@babel/preset-env": "7.19.4",
|
||||
"@babel/preset-typescript": "7.18.6",
|
||||
"@types/k6": "0.41.0",
|
||||
"@types/shortid": "0.0.29",
|
||||
"@types/webpack": "5.28.0",
|
||||
"babel-loader": "9.1.0",
|
||||
"shortid": "2.2.16",
|
||||
"ts-node": "10.9.1",
|
||||
"typescript": "4.8.4",
|
||||
"webpack": "5.74.0",
|
||||
"webpack-cli": "4.10.0",
|
||||
"webpack-glob-entries": "1.0.1"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "webpack",
|
||||
"prepare-testdata": "yarn run prepare-testdata:object-store-test",
|
||||
"prepare-testdata:object-store-test": "ts-node scripts/prepareDashboardFileNames.ts ../../dev-dashboards ./scripts/tmp/filenames.json"
|
||||
}
|
||||
}
|
||||
64
devenv/docker/loadtest-ts/run.sh
Executable file
64
devenv/docker/loadtest-ts/run.sh
Executable file
@@ -0,0 +1,64 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
if ((BASH_VERSINFO[0] < 4)); then
|
||||
echo "Bash ver >= 4 is needed to run this script"
|
||||
echo "Please upgrade your bash - run 'brew install bash' if you use Homebrew on MacOS"
|
||||
exit 1;
|
||||
fi
|
||||
|
||||
declare -A cfg=(
|
||||
[grpcToken]=$GRPC_TOKEN
|
||||
[grpcAddress]="127.0.0.1:10000"
|
||||
[execution]="local"
|
||||
[test]="object-store-test"
|
||||
[k6CloudToken]=$K6_CLOUD_TOKEN
|
||||
)
|
||||
|
||||
for ARGUMENT in "$@"
|
||||
do
|
||||
KEY=$(echo $ARGUMENT | cut -f1 -d=)
|
||||
|
||||
KEY_LENGTH=${#KEY}
|
||||
VALUE="${ARGUMENT:$KEY_LENGTH+1}"
|
||||
cfg["$KEY"]="$VALUE"
|
||||
done
|
||||
|
||||
function usage() {
|
||||
echo "$0 grpcAddress= grpcToken= execution= k6CloudToken= test=
|
||||
- 'grpcAddress' is the address of Grafana gRPC server. 127.0.0.1:10000 is the default.
|
||||
- 'grpcToken' is the service account admin token used for Grafana gRPC server authentication.
|
||||
- 'execution' is the test execution mode; one of 'local', 'cloud-output', 'cloud'. 'local' is the default.
|
||||
- 'k6CloudToken' is the k6 cloud token required for 'cloud-output' and 'cloud' execution modes.
|
||||
- 'test' is the filepath of the test to execute relative to ./src, without the extension. example 'object-store-test'"
|
||||
exit 0
|
||||
}
|
||||
|
||||
if [ "${cfg[grpcToken]}" == "" ]; then
|
||||
usage
|
||||
fi
|
||||
|
||||
|
||||
if [ "${cfg[execution]}" == "cloud" ]; then
|
||||
echo "cloud execution mode is not yet implemented"
|
||||
exit 0
|
||||
elif [ "${cfg[execution]}" == "cloud-output" ]; then
|
||||
if [ "${cfg[k6CloudToken]}" == "" ]; then
|
||||
usage
|
||||
fi
|
||||
elif [ "${cfg[execution]}" != "local" ]; then
|
||||
usage
|
||||
fi
|
||||
|
||||
yarn run build
|
||||
yarn run prepare-testdata
|
||||
|
||||
TEST_PATH="./dist/${cfg[test]}.js"
|
||||
echo "$(date '+%Y-%m-%d %H:%M:%S'): Executing test ${TEST_PATH} in ${cfg[execution]} mode"
|
||||
|
||||
if [ "${cfg[execution]}" == "cloud-output" ]; then
|
||||
GRPC_TOKEN="${cfg[grpcToken]}" GRPC_ADDRESS="${cfg[grpcAddress]}" K6_CLOUD_TOKEN="${cfg[k6CloudToken]}" k6 run --out cloud "$TEST_PATH"
|
||||
elif [ "${cfg[execution]}" == "local" ]; then
|
||||
GRPC_TOKEN="${cfg[grpcToken]}" GRPC_ADDRESS="${cfg[grpcAddress]}" k6 run "$TEST_PATH"
|
||||
fi
|
||||
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
import { readdirSync, writeFileSync, mkdirSync } from 'fs';
|
||||
import { dirname, resolve } from 'path';
|
||||
|
||||
const args = process.argv.slice(2);
|
||||
|
||||
if (args.length !== 2) {
|
||||
throw new Error('expected dev dashboards dir and the output file path');
|
||||
}
|
||||
|
||||
const devDashboardsDir = args[0];
|
||||
const outputFilePath = args[1];
|
||||
|
||||
const getFiles = (dirPath: string, ext?: string): string[] =>
|
||||
readdirSync(dirPath, { withFileTypes: true })
|
||||
.flatMap((dirEntry) => {
|
||||
const res = resolve(dirPath, dirEntry.name);
|
||||
return dirEntry.isDirectory() ? getFiles(res) : res;
|
||||
})
|
||||
.filter((path) => (ext?.length ? path.endsWith(ext) : true));
|
||||
|
||||
const files = getFiles(devDashboardsDir, '.json');
|
||||
|
||||
mkdirSync(dirname(outputFilePath), { recursive: true });
|
||||
writeFileSync(outputFilePath, JSON.stringify(files, null, 2));
|
||||
116
devenv/docker/loadtest-ts/src/get-large-dashboard.ts
Normal file
116
devenv/docker/loadtest-ts/src/get-large-dashboard.ts
Normal file
@@ -0,0 +1,116 @@
|
||||
const testDash = {
|
||||
annotations: { list: [] },
|
||||
editable: true,
|
||||
fiscalYearStartMonth: 0,
|
||||
graphTooltip: 0,
|
||||
id: 100,
|
||||
links: [],
|
||||
liveNow: false,
|
||||
panels: [
|
||||
{
|
||||
datasource: {
|
||||
type: 'testdata',
|
||||
uid: 'testdata',
|
||||
},
|
||||
fieldConfig: {
|
||||
defaults: {
|
||||
color: {
|
||||
mode: 'thresholds',
|
||||
},
|
||||
custom: {
|
||||
align: 'auto',
|
||||
displayMode: 'auto',
|
||||
inspect: false,
|
||||
},
|
||||
mappings: [],
|
||||
thresholds: {
|
||||
mode: 'absolute',
|
||||
steps: [
|
||||
{
|
||||
color: 'green',
|
||||
value: null,
|
||||
},
|
||||
{
|
||||
color: 'red',
|
||||
value: 80,
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
overrides: [],
|
||||
},
|
||||
gridPos: {
|
||||
h: 9,
|
||||
w: 12,
|
||||
x: 0,
|
||||
y: 0,
|
||||
},
|
||||
id: 2,
|
||||
options: {
|
||||
footer: {
|
||||
fields: '',
|
||||
reducer: ['sum'],
|
||||
show: false,
|
||||
},
|
||||
showHeader: true,
|
||||
},
|
||||
pluginVersion: '9.4.0-pre',
|
||||
targets: [
|
||||
{
|
||||
csvContent: '',
|
||||
datasource: {
|
||||
type: 'testdata',
|
||||
uid: 'PD8C576611E62080A',
|
||||
},
|
||||
refId: 'A',
|
||||
scenarioId: 'csv_content',
|
||||
},
|
||||
],
|
||||
title: 'Panel Title',
|
||||
type: 'table',
|
||||
},
|
||||
],
|
||||
schemaVersion: 37,
|
||||
style: 'dark',
|
||||
tags: [],
|
||||
templating: {
|
||||
list: [],
|
||||
},
|
||||
time: {
|
||||
from: 'now-6h',
|
||||
to: 'now',
|
||||
},
|
||||
timepicker: {},
|
||||
timezone: '',
|
||||
title: 'New dashboard',
|
||||
uid: '5v6e5VH4z',
|
||||
version: 1,
|
||||
weekStart: '',
|
||||
} as const;
|
||||
|
||||
const getCsvContent = (lengthInKb: number): string => {
|
||||
const lines: string[] = ['id,name'];
|
||||
for (let i = 0; i < lengthInKb; i++) {
|
||||
const prefix = `${i},`;
|
||||
lines.push(prefix + 'a'.repeat(1024 - prefix.length));
|
||||
}
|
||||
return lines.join('\n');
|
||||
};
|
||||
|
||||
export const prepareDashboard = (lengthInKb: number): Record<string, unknown> => {
|
||||
const firstPanel = testDash.panels[0];
|
||||
return {
|
||||
...testDash,
|
||||
panels: [
|
||||
{
|
||||
...firstPanel,
|
||||
targets: [
|
||||
{
|
||||
...firstPanel.targets[0],
|
||||
csvContent: getCsvContent(lengthInKb),
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
};
|
||||
};
|
||||
214
devenv/docker/loadtest-ts/src/object-store-client.ts
Normal file
214
devenv/docker/loadtest-ts/src/object-store-client.ts
Normal file
@@ -0,0 +1,214 @@
|
||||
import { check } from 'k6';
|
||||
import { b64encode } from 'k6/encoding';
|
||||
import grpc from 'k6/net/grpc';
|
||||
|
||||
import { Object } from './prepare-data';
|
||||
|
||||
enum GRPCMethods {
|
||||
ServerHealth = 'grpc.health.v1.Health/Check',
|
||||
ObjectWrite = 'object.ObjectStore/Write',
|
||||
ObjectDelete = 'object.ObjectStore/Delete',
|
||||
ObjectRead = 'object.ObjectStore/Read',
|
||||
}
|
||||
|
||||
export class GRPCObjectStoreClient {
|
||||
private connected = false;
|
||||
constructor(private client: grpc.Client, private grpcAddress: string, private grpcToken: string) {}
|
||||
|
||||
connect = () => {
|
||||
if (!this.connected) {
|
||||
this.client.connect(this.grpcAddress, { plaintext: true, reflect: true });
|
||||
this.connected = true;
|
||||
}
|
||||
};
|
||||
|
||||
grpcRequestParams = () => {
|
||||
return {
|
||||
metadata: {
|
||||
authorization: `Bearer ${this.grpcToken}`,
|
||||
},
|
||||
};
|
||||
};
|
||||
|
||||
healthCheck = (): boolean => {
|
||||
this.connect();
|
||||
const response = this.client.invoke(GRPCMethods.ServerHealth, {});
|
||||
|
||||
return check(response, {
|
||||
'server is healthy': (r) => {
|
||||
const statusOK = r && r.status === grpc.StatusOK;
|
||||
if (!statusOK) {
|
||||
return false;
|
||||
}
|
||||
|
||||
const body = r.message;
|
||||
// @ts-ignore
|
||||
return 'status' in body && body.status === 'SERVING';
|
||||
},
|
||||
});
|
||||
};
|
||||
|
||||
deleteObject = (uid: string, kind: string, _?: {}) => {
|
||||
this.connect();
|
||||
|
||||
const response = this.client.invoke(
|
||||
GRPCMethods.ObjectDelete,
|
||||
{
|
||||
kind: kind,
|
||||
UID: uid,
|
||||
},
|
||||
this.grpcRequestParams()
|
||||
);
|
||||
|
||||
check(response, {
|
||||
'object was deleted': (r) => {
|
||||
const statusOK = r && r.status === grpc.StatusOK;
|
||||
if (!statusOK) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!isDeleteObjectResponse(r.message)) {
|
||||
console.log(
|
||||
JSON.stringify({
|
||||
type: 'invalid_delete_response',
|
||||
uid: uid,
|
||||
kind: kind,
|
||||
resp: r,
|
||||
})
|
||||
);
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
},
|
||||
});
|
||||
};
|
||||
|
||||
readObject = (uid: string, kind: string, _?: {}) => {
|
||||
this.connect();
|
||||
|
||||
const response = this.client.invoke(
|
||||
GRPCMethods.ObjectRead,
|
||||
{
|
||||
kind: kind,
|
||||
UID: uid,
|
||||
with_body: true,
|
||||
with_summary: true,
|
||||
},
|
||||
this.grpcRequestParams()
|
||||
);
|
||||
|
||||
check(response, {
|
||||
'object exists': (r) => {
|
||||
const statusOK = r && r.status === grpc.StatusOK;
|
||||
if (!statusOK) {
|
||||
return false;
|
||||
}
|
||||
|
||||
const respBody = r.message;
|
||||
if (!isReadObjectResponse(respBody)) {
|
||||
console.log(
|
||||
JSON.stringify({
|
||||
type: 'invalid_read_response',
|
||||
uid: uid,
|
||||
kind: kind,
|
||||
resp: r,
|
||||
})
|
||||
);
|
||||
return false;
|
||||
}
|
||||
|
||||
return typeof respBody.object.body === 'string';
|
||||
},
|
||||
});
|
||||
};
|
||||
|
||||
writeObject = (object: Object, opts?: { randomizeData?: boolean; checkCreatedOrUpdated?: boolean }) => {
|
||||
this.connect();
|
||||
|
||||
const data = opts?.randomizeData
|
||||
? {
|
||||
...object.data,
|
||||
__random: `${Date.now() - Math.random()}`,
|
||||
}
|
||||
: object.data;
|
||||
|
||||
const response = this.client.invoke(
|
||||
GRPCMethods.ObjectWrite,
|
||||
{
|
||||
body: b64encode(JSON.stringify(data)),
|
||||
comment: '',
|
||||
kind: object.kind,
|
||||
UID: object.uid,
|
||||
},
|
||||
this.grpcRequestParams()
|
||||
);
|
||||
|
||||
const checkName = opts?.checkCreatedOrUpdated ? 'object was created or updated' : 'object was created';
|
||||
check(response, {
|
||||
[checkName]: (r) => {
|
||||
const statusOK = r && r.status === grpc.StatusOK;
|
||||
if (!statusOK) {
|
||||
return false;
|
||||
}
|
||||
|
||||
const respBody = r.message;
|
||||
if (!isWriteObjectResponse(respBody)) {
|
||||
console.log(
|
||||
JSON.stringify({
|
||||
type: 'invalid_write_response',
|
||||
uid: object.uid,
|
||||
kind: object.kind,
|
||||
resp: r,
|
||||
})
|
||||
);
|
||||
return false;
|
||||
}
|
||||
|
||||
return opts?.checkCreatedOrUpdated
|
||||
? respBody.status === WriteObjectResponseStatus.UPDATED ||
|
||||
respBody.status === WriteObjectResponseStatus.CREATED
|
||||
: respBody.status === WriteObjectResponseStatus.CREATED;
|
||||
},
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
type DeleteObjectResponse = {
|
||||
OK: boolean;
|
||||
};
|
||||
|
||||
const isDeleteObjectResponse = (resp: object): resp is DeleteObjectResponse => {
|
||||
return resp.hasOwnProperty('OK');
|
||||
};
|
||||
|
||||
enum WriteObjectResponseStatus {
|
||||
CREATED = 'CREATED',
|
||||
UPDATED = 'UPDATED',
|
||||
}
|
||||
|
||||
type WriteObjectResponse = {
|
||||
status: WriteObjectResponseStatus;
|
||||
};
|
||||
|
||||
const isWriteObjectResponse = (resp: object): resp is WriteObjectResponse => {
|
||||
return resp.hasOwnProperty('status');
|
||||
};
|
||||
|
||||
type ReadObjectResponse = {
|
||||
object: {
|
||||
UID: string;
|
||||
kind: string;
|
||||
body: string;
|
||||
};
|
||||
};
|
||||
|
||||
const isReadObjectResponse = (resp: object): resp is ReadObjectResponse => {
|
||||
if (!resp.hasOwnProperty('object')) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// @ts-ignore
|
||||
const object = resp.object;
|
||||
return Boolean(object && typeof object === 'object' && object.hasOwnProperty('body'));
|
||||
};
|
||||
145
devenv/docker/loadtest-ts/src/object-store-test.ts
Executable file
145
devenv/docker/loadtest-ts/src/object-store-test.ts
Executable file
@@ -0,0 +1,145 @@
|
||||
import { SharedArray } from 'k6/data';
|
||||
import execution from 'k6/execution';
|
||||
import grpc from 'k6/net/grpc';
|
||||
|
||||
import { GRPCObjectStoreClient } from './object-store-client';
|
||||
import { Data, prepareData } from './prepare-data';
|
||||
|
||||
const grpcToken = __ENV.GRPC_TOKEN;
|
||||
const grpcAddress = __ENV.GRPC_ADDRESS;
|
||||
|
||||
if (typeof grpcToken !== 'string' || !grpcToken.length) {
|
||||
throw new Error('GRPC_TOKEN env variable is missing');
|
||||
}
|
||||
|
||||
if (typeof grpcAddress !== 'string' || !grpcAddress.length) {
|
||||
throw new Error('GRPC_ADDRESS env variable is missing');
|
||||
}
|
||||
|
||||
const client = new grpc.Client();
|
||||
const objectStoreClient = new GRPCObjectStoreClient(client, grpcAddress, grpcToken);
|
||||
|
||||
const data: Data = new SharedArray('data', () => {
|
||||
return [prepareData(JSON.parse(open('../scripts/tmp/filenames.json')), 50)];
|
||||
})[0];
|
||||
|
||||
const scenarioDuration = '2m';
|
||||
|
||||
export const options = {
|
||||
setupTimeout: '5m',
|
||||
teardownTimeout: '5m',
|
||||
noConnectionReuse: true,
|
||||
scenarios: {
|
||||
writer: {
|
||||
exec: 'writer',
|
||||
executor: 'constant-arrival-rate',
|
||||
rate: 1,
|
||||
timeUnit: '2s',
|
||||
duration: scenarioDuration,
|
||||
preAllocatedVUs: 1,
|
||||
maxVUs: 1,
|
||||
},
|
||||
reader: {
|
||||
exec: 'reader',
|
||||
executor: 'constant-arrival-rate',
|
||||
rate: 10,
|
||||
timeUnit: '2s',
|
||||
duration: scenarioDuration,
|
||||
preAllocatedVUs: 1,
|
||||
maxVUs: 10,
|
||||
},
|
||||
writer1mb: {
|
||||
exec: 'writer1mb',
|
||||
executor: 'constant-arrival-rate',
|
||||
rate: 1,
|
||||
timeUnit: '20s',
|
||||
duration: scenarioDuration,
|
||||
preAllocatedVUs: 1,
|
||||
maxVUs: 5,
|
||||
},
|
||||
reader1mb: {
|
||||
startTime: '2s',
|
||||
exec: 'reader1mb',
|
||||
executor: 'constant-arrival-rate',
|
||||
rate: 1,
|
||||
timeUnit: '1s',
|
||||
duration: scenarioDuration,
|
||||
preAllocatedVUs: 1,
|
||||
maxVUs: 5,
|
||||
},
|
||||
writer4mb: {
|
||||
exec: 'writer4mb',
|
||||
executor: 'constant-arrival-rate',
|
||||
rate: 1,
|
||||
timeUnit: '30s',
|
||||
duration: scenarioDuration,
|
||||
preAllocatedVUs: 1,
|
||||
maxVUs: 5,
|
||||
},
|
||||
reader4mb: {
|
||||
startTime: '3s',
|
||||
exec: 'reader4mb',
|
||||
executor: 'constant-arrival-rate',
|
||||
rate: 1,
|
||||
timeUnit: '5s',
|
||||
duration: scenarioDuration,
|
||||
preAllocatedVUs: 1,
|
||||
maxVUs: 5,
|
||||
},
|
||||
},
|
||||
// thresholds: { http_req_duration: ['avg<100', 'p(95)<200'] },
|
||||
};
|
||||
|
||||
export function setup() {
|
||||
if (!objectStoreClient.healthCheck()) {
|
||||
execution.test.abort('server should be healthy');
|
||||
}
|
||||
|
||||
console.log('inserting base objects');
|
||||
for (let i = 0; i < data.base.length; i++) {
|
||||
if (i % 100 === 0) {
|
||||
console.log(`inserted ${i} / ${data.base.length}`);
|
||||
}
|
||||
objectStoreClient.writeObject(data.base[i], { randomizeData: false, checkCreatedOrUpdated: false });
|
||||
}
|
||||
}
|
||||
|
||||
export function teardown() {
|
||||
const toDelete = [...data.base, ...data.toWrite, data.size1mb, data.size4mb, data.size100kb];
|
||||
|
||||
console.log('deleting base objects');
|
||||
for (let i = 0; i < toDelete.length; i++) {
|
||||
if (i % 100 === 0) {
|
||||
console.log(`deleted ${i} / ${data.base.length}`);
|
||||
}
|
||||
objectStoreClient.deleteObject(toDelete[i].uid, toDelete[i].kind);
|
||||
}
|
||||
}
|
||||
|
||||
export function reader() {
|
||||
const item = data.base[execution.scenario.iterationInTest % data.base.length];
|
||||
objectStoreClient.readObject(item.uid, item.kind);
|
||||
}
|
||||
|
||||
export function writer() {
|
||||
const item = data.toWrite[execution.scenario.iterationInTest % data.toWrite.length];
|
||||
objectStoreClient.writeObject(item, { randomizeData: true, checkCreatedOrUpdated: true });
|
||||
}
|
||||
|
||||
export function writer1mb() {
|
||||
objectStoreClient.writeObject(data.size1mb, { randomizeData: true, checkCreatedOrUpdated: true });
|
||||
}
|
||||
|
||||
export function reader1mb() {
|
||||
const item = data.size1mb;
|
||||
objectStoreClient.readObject(item.uid, item.kind);
|
||||
}
|
||||
|
||||
export function writer4mb() {
|
||||
objectStoreClient.writeObject(data.size4mb, { randomizeData: true, checkCreatedOrUpdated: true });
|
||||
}
|
||||
|
||||
export function reader4mb() {
|
||||
const item = data.size4mb;
|
||||
objectStoreClient.readObject(item.uid, item.kind);
|
||||
}
|
||||
57
devenv/docker/loadtest-ts/src/prepare-data.ts
Normal file
57
devenv/docker/loadtest-ts/src/prepare-data.ts
Normal file
@@ -0,0 +1,57 @@
|
||||
import shortid from 'shortid';
|
||||
|
||||
import { prepareDashboard } from './get-large-dashboard';
|
||||
|
||||
export type Object = {
|
||||
data: Record<string, unknown>;
|
||||
kind: string;
|
||||
uid: string;
|
||||
};
|
||||
|
||||
export type Data = {
|
||||
base: Object[]; // objects that are inserted in the test setup and removed only in the teardown
|
||||
toWrite: Object[]; // objects that are inserted by scenarios and removed after a short period of time: Object;
|
||||
size100kb: Object;
|
||||
size1mb: Object;
|
||||
size4mb: Object;
|
||||
};
|
||||
|
||||
export const readAsObjects = (paths: string[], kind: string): Object[] => {
|
||||
return paths.map((p) => ({
|
||||
data: JSON.parse(open(p)),
|
||||
uid: shortid.generate(),
|
||||
kind,
|
||||
}));
|
||||
};
|
||||
|
||||
export const getBase = (uniqueObjects: Object[], no: number): Object[] => {
|
||||
const base = new Array<Object>(no);
|
||||
for (let i = 0; i < no; i++) {
|
||||
const obj = uniqueObjects[Math.floor(i % uniqueObjects.length)];
|
||||
base[i] = {
|
||||
...obj,
|
||||
uid: `${obj.uid}-${Math.floor(i / uniqueObjects.length)}`,
|
||||
};
|
||||
}
|
||||
|
||||
return base;
|
||||
};
|
||||
|
||||
const prepareObject = (lengthInKb: number): Object => {
|
||||
return {
|
||||
data: prepareDashboard(lengthInKb),
|
||||
kind: 'dashboard',
|
||||
uid: shortid(),
|
||||
};
|
||||
};
|
||||
|
||||
export const prepareData = (dashboardFilePaths: string[], baseNumber: number): Data => {
|
||||
const objects = readAsObjects(dashboardFilePaths, 'dashboard');
|
||||
return {
|
||||
base: getBase(objects, baseNumber),
|
||||
toWrite: objects,
|
||||
size100kb: prepareObject(100),
|
||||
size1mb: prepareObject(1000),
|
||||
size4mb: prepareObject(4000),
|
||||
};
|
||||
};
|
||||
26
devenv/docker/loadtest-ts/tsconfig.json
Normal file
26
devenv/docker/loadtest-ts/tsconfig.json
Normal file
@@ -0,0 +1,26 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"target": "es5",
|
||||
"moduleResolution": "node",
|
||||
"module": "commonjs",
|
||||
"noEmit": true,
|
||||
"allowJs": true,
|
||||
"removeComments": false,
|
||||
|
||||
"strict": true,
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
|
||||
"noUnusedLocals": true,
|
||||
"noUnusedParameters": true,
|
||||
"noImplicitReturns": true,
|
||||
"noFallthroughCasesInSwitch": true,
|
||||
|
||||
"allowSyntheticDefaultImports": true,
|
||||
"esModuleInterop": true,
|
||||
"experimentalDecorators": true,
|
||||
"emitDecoratorMetadata": true,
|
||||
|
||||
"skipLibCheck": true
|
||||
}
|
||||
}
|
||||
37
devenv/docker/loadtest-ts/webpack.config.js
Normal file
37
devenv/docker/loadtest-ts/webpack.config.js
Normal file
@@ -0,0 +1,37 @@
|
||||
const path = require('path');
|
||||
const GlobEntries = require('webpack-glob-entries');
|
||||
|
||||
module.exports = {
|
||||
mode: 'production',
|
||||
entry: GlobEntries('./src/*test*.ts'), // Generates multiple entry for each test
|
||||
output: {
|
||||
path: path.join(__dirname, 'dist'),
|
||||
libraryTarget: 'commonjs',
|
||||
filename: '[name].js',
|
||||
clean: true,
|
||||
},
|
||||
resolve: {
|
||||
extensions: ['.ts', '.js'],
|
||||
},
|
||||
module: {
|
||||
rules: [
|
||||
{
|
||||
test: /\.ts$/,
|
||||
use: 'babel-loader',
|
||||
exclude: /node_modules/,
|
||||
},
|
||||
],
|
||||
},
|
||||
target: 'web',
|
||||
externals: /^(k6|https?\:\/\/)(\/.*)?/,
|
||||
// Generate map files for compiled scripts
|
||||
devtool: 'source-map',
|
||||
stats: {
|
||||
colors: true,
|
||||
},
|
||||
plugins: [],
|
||||
optimization: {
|
||||
// Don't minimize, as it's not used in the browser
|
||||
minimize: false,
|
||||
},
|
||||
};
|
||||
3167
devenv/docker/loadtest-ts/yarn.lock
Normal file
3167
devenv/docker/loadtest-ts/yarn.lock
Normal file
File diff suppressed because it is too large
Load Diff
@@ -149,13 +149,6 @@ local dashboard = grafana.dashboard;
|
||||
id: 0,
|
||||
}
|
||||
},
|
||||
dashboard.new('datadata-macros', import '../dev-dashboards/feature-templating/datadata-macros.json') +
|
||||
resource.addMetadata('folder', 'dev-dashboards') +
|
||||
{
|
||||
spec+: {
|
||||
id: 0,
|
||||
}
|
||||
},
|
||||
dashboard.new('demo1', import '../dev-dashboards/datasource-testdata/demo1.json') +
|
||||
resource.addMetadata('folder', 'dev-dashboards') +
|
||||
{
|
||||
@@ -380,13 +373,6 @@ local dashboard = grafana.dashboard;
|
||||
id: 0,
|
||||
}
|
||||
},
|
||||
dashboard.new('migrations', import '../dev-dashboards/migrations/migrations.json') +
|
||||
resource.addMetadata('folder', 'dev-dashboards') +
|
||||
{
|
||||
spec+: {
|
||||
id: 0,
|
||||
}
|
||||
},
|
||||
dashboard.new('mssql_fakedata', import '../dev-dashboards/datasource-mssql/mssql_fakedata.json') +
|
||||
resource.addMetadata('folder', 'dev-dashboards') +
|
||||
{
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user