mirror of
https://github.com/grafana/grafana.git
synced 2026-01-07 22:41:10 +08:00
Compare commits
409 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
fe17b64445 | ||
|
|
c98714f77f | ||
|
|
ac9819bfa5 | ||
|
|
6b4394d8e6 | ||
|
|
9b7ad3d663 | ||
|
|
8bb5b17692 | ||
|
|
12fc64b389 | ||
|
|
052fd5713d | ||
|
|
6b64e4d192 | ||
|
|
c89876323c | ||
|
|
24659cc117 | ||
|
|
9fef15403c | ||
|
|
6fbdc2ed89 | ||
|
|
09308c77d8 | ||
|
|
29f26b5a02 | ||
|
|
e6a7b53703 | ||
|
|
37236d6ab6 | ||
|
|
a47cfa9b28 | ||
|
|
8ba6f0f1a8 | ||
|
|
5d1bed9b64 | ||
|
|
a688a916dc | ||
|
|
1136d8c3a9 | ||
|
|
15c0ba7af0 | ||
|
|
4adfebb4c7 | ||
|
|
b2d04ac317 | ||
|
|
7428dbd10e | ||
|
|
17efc62c04 | ||
|
|
f4b75c8db1 | ||
|
|
c05db1f2f8 | ||
|
|
2f3c46b4dd | ||
|
|
ae1fccc1df | ||
|
|
042e4d216b | ||
|
|
72900d81d8 | ||
|
|
bc708d3543 | ||
|
|
a8ceec0ed9 | ||
|
|
62f4012590 | ||
|
|
0c9e3abc52 | ||
|
|
1cf016c9b2 | ||
|
|
15179a6abb | ||
|
|
d26b6aae07 | ||
|
|
d074471557 | ||
|
|
0f0211f400 | ||
|
|
47f8928be1 | ||
|
|
1e97806819 | ||
|
|
d6d6db54f9 | ||
|
|
a01d5a10f5 | ||
|
|
a151924ed3 | ||
|
|
65bd73f5cc | ||
|
|
2c28ae5e70 | ||
|
|
707800cd6c | ||
|
|
cc2560b96f | ||
|
|
4e687bf869 | ||
|
|
b372406a61 | ||
|
|
b689ec5d43 | ||
|
|
bcb1e94784 | ||
|
|
b2b673ab16 | ||
|
|
b333b2bc97 | ||
|
|
a2f412e21f | ||
|
|
40ad7fe358 | ||
|
|
c48d42177f | ||
|
|
18e8f6dc65 | ||
|
|
b123e396ec | ||
|
|
725618e1d1 | ||
|
|
8f06aa45ac | ||
|
|
bc7d29b3d6 | ||
|
|
749d9c2cba | ||
|
|
a54d45fa90 | ||
|
|
91d4141cf9 | ||
|
|
00bede823f | ||
|
|
4d00a510d1 | ||
|
|
68882a861a | ||
|
|
a6faa45073 | ||
|
|
d9a6bf92d7 | ||
|
|
c845bfd9ac | ||
|
|
1049636ef6 | ||
|
|
0e5a094447 | ||
|
|
b82d26e130 | ||
|
|
945c3fafe7 | ||
|
|
164fb230cb | ||
|
|
7382b1be90 | ||
|
|
d38ac63f22 | ||
|
|
67f503b820 | ||
|
|
4ec37fb058 | ||
|
|
4fee0645a1 | ||
|
|
b03e28fc60 | ||
|
|
db55065687 | ||
|
|
7ca5c227dd | ||
|
|
3dc8434cf4 | ||
|
|
8cb58c1560 | ||
|
|
63f6207a1f | ||
|
|
97ee2cf918 | ||
|
|
b642a797fd | ||
|
|
9b07bc7e98 | ||
|
|
94594d61e6 | ||
|
|
0026764f04 | ||
|
|
a09a23c8bf | ||
|
|
e4af9fba96 | ||
|
|
f70d51c2c6 | ||
|
|
b8835eba17 | ||
|
|
4e2d4c42f0 | ||
|
|
ac66ba77da | ||
|
|
afab41a9c4 | ||
|
|
72cf8605c0 | ||
|
|
7ba1e9e258 | ||
|
|
f07841db8a | ||
|
|
797dd2dd58 | ||
|
|
ab3718afba | ||
|
|
d1df696c31 | ||
|
|
dfeb978e3b | ||
|
|
8b7664294c | ||
|
|
5895100beb | ||
|
|
844b08962d | ||
|
|
551c4aa562 | ||
|
|
1ac0c03a1d | ||
|
|
484b098a20 | ||
|
|
ca73c43b56 | ||
|
|
6c027ccf6a | ||
|
|
0275f11785 | ||
|
|
3274e8727e | ||
|
|
522a819e9e | ||
|
|
f6abf640eb | ||
|
|
47b635270e | ||
|
|
36bfb144b7 | ||
|
|
fade9fb6ae | ||
|
|
ad2ea44977 | ||
|
|
924180a25b | ||
|
|
76ed60064d | ||
|
|
e09307c078 | ||
|
|
ec9c2ed029 | ||
|
|
92b10cc965 | ||
|
|
3be1ddc56a | ||
|
|
dac165a7fc | ||
|
|
44655b96cb | ||
|
|
79104ef556 | ||
|
|
95189820fe | ||
|
|
68d7dadaec | ||
|
|
2bfc106473 | ||
|
|
82430165ee | ||
|
|
85f1aab363 | ||
|
|
3df51bf025 | ||
|
|
b1d914bceb | ||
|
|
e0e74ea6d2 | ||
|
|
b94c64ef48 | ||
|
|
43d3f21ff0 | ||
|
|
a62cb4e6c1 | ||
|
|
23b791c234 | ||
|
|
0b27b6a8c2 | ||
|
|
e71e6ae07e | ||
|
|
2576f05029 | ||
|
|
e8cff14164 | ||
|
|
a162fdf32f | ||
|
|
99f6606285 | ||
|
|
d2f721c18e | ||
|
|
efd139ecf3 | ||
|
|
5647a981ed | ||
|
|
d6f248c14e | ||
|
|
f58d6107e1 | ||
|
|
b3a46212df | ||
|
|
3289770198 | ||
|
|
8d7c3f19ee | ||
|
|
68c8987152 | ||
|
|
7832a7579f | ||
|
|
92fa1aba00 | ||
|
|
8ea7a8cff3 | ||
|
|
13e306bbfb | ||
|
|
e69568fec8 | ||
|
|
509cb77bca | ||
|
|
1573285f21 | ||
|
|
06780e2c41 | ||
|
|
201c7e123d | ||
|
|
c4233171f2 | ||
|
|
a318b15cab | ||
|
|
559ef42767 | ||
|
|
aff8e62b8c | ||
|
|
263e3142a1 | ||
|
|
e67669b250 | ||
|
|
9b2d3e3cac | ||
|
|
72d97eb375 | ||
|
|
868e560006 | ||
|
|
b6a91429c9 | ||
|
|
d2fe4b4813 | ||
|
|
46f2243f02 | ||
|
|
fcfbb2415f | ||
|
|
a3bccbbdeb | ||
|
|
188792428d | ||
|
|
15557bf4af | ||
|
|
7582c92f0d | ||
|
|
d8c11cdd7a | ||
|
|
3752197643 | ||
|
|
0d93b268f2 | ||
|
|
09eb30b9a3 | ||
|
|
1547e41ce0 | ||
|
|
1559344944 | ||
|
|
0cc1c86015 | ||
|
|
fc99833cfb | ||
|
|
963a71ba34 | ||
|
|
613d3b5e17 | ||
|
|
a991be81da | ||
|
|
85e2b028de | ||
|
|
a8a1bcc58c | ||
|
|
7cda7094c5 | ||
|
|
880452931b | ||
|
|
29a03139dd | ||
|
|
f03d0facc5 | ||
|
|
00b1a285ad | ||
|
|
c4fdc3d7c6 | ||
|
|
9f8bee7187 | ||
|
|
ba1942febb | ||
|
|
7593d5880f | ||
|
|
cce767fee4 | ||
|
|
29baf812cf | ||
|
|
484df7d682 | ||
|
|
b9cce07b10 | ||
|
|
9c6d358d7f | ||
|
|
0905058657 | ||
|
|
02b1030662 | ||
|
|
a395671237 | ||
|
|
9617d2a14f | ||
|
|
f2fa4eb197 | ||
|
|
38458c40d2 | ||
|
|
04678bc1aa | ||
|
|
ef74b7a486 | ||
|
|
cbdc5e59cf | ||
|
|
7b12482512 | ||
|
|
7a91afc504 | ||
|
|
56fa39ede0 | ||
|
|
1980c169b9 | ||
|
|
9c9480dd0c | ||
|
|
c639251ace | ||
|
|
0965e3ac12 | ||
|
|
1755c72670 | ||
|
|
98dfb42cbf | ||
|
|
3a93203a57 | ||
|
|
b33b3ea0b6 | ||
|
|
9795dbb401 | ||
|
|
11bfb4a387 | ||
|
|
bca3356661 | ||
|
|
95f23777f0 | ||
|
|
8ba2187115 | ||
|
|
c2ce0e82ff | ||
|
|
a3f69498f6 | ||
|
|
27f57b144d | ||
|
|
bcc5a441bf | ||
|
|
4604062f80 | ||
|
|
88194154cd | ||
|
|
c0f54f8f58 | ||
|
|
5b7920fe32 | ||
|
|
51d5a6031e | ||
|
|
6f1af5c007 | ||
|
|
ba9293b09d | ||
|
|
96ae3b7e45 | ||
|
|
5a17ef9d6c | ||
|
|
d78f259ee8 | ||
|
|
c9341d5314 | ||
|
|
0bdc74ba39 | ||
|
|
7d21e021ea | ||
|
|
b3b72165f1 | ||
|
|
53c71b486a | ||
|
|
61f0183275 | ||
|
|
928a9ebc57 | ||
|
|
c74db84073 | ||
|
|
b00bb90926 | ||
|
|
22ae442f56 | ||
|
|
17e197634e | ||
|
|
da5186b07a | ||
|
|
e238b9f9c1 | ||
|
|
1d2037a766 | ||
|
|
e20953e4f8 | ||
|
|
f01526e35b | ||
|
|
7033623093 | ||
|
|
ffa67c888b | ||
|
|
794f9dbb05 | ||
|
|
91c78ce784 | ||
|
|
0cf8f9fab6 | ||
|
|
d02b7fc0ba | ||
|
|
bd81793292 | ||
|
|
0383c57a2f | ||
|
|
e926018407 | ||
|
|
18e3d9d209 | ||
|
|
85f83c44b8 | ||
|
|
abe3dbc53b | ||
|
|
34a054642f | ||
|
|
bf184205dc | ||
|
|
4585d70f22 | ||
|
|
d06eb2fa8b | ||
|
|
e0d8bb2719 | ||
|
|
32111ee203 | ||
|
|
4468aac4ee | ||
|
|
7d182b4890 | ||
|
|
2483c64d26 | ||
|
|
412f05e16f | ||
|
|
a57455e5cd | ||
|
|
f4b37ab8a9 | ||
|
|
b23fd7aad0 | ||
|
|
7593ab4a4e | ||
|
|
1bbbe41a6c | ||
|
|
25e89ba295 | ||
|
|
b8aa31433b | ||
|
|
c258cfb553 | ||
|
|
752f886637 | ||
|
|
27a4dd8765 | ||
|
|
fd7358a6ef | ||
|
|
1024334d7b | ||
|
|
77046b3fba | ||
|
|
1964ddce83 | ||
|
|
d5bb8aba85 | ||
|
|
94341ed95c | ||
|
|
77c1546511 | ||
|
|
9854ac88e9 | ||
|
|
90c8e52a17 | ||
|
|
34e7d48ca6 | ||
|
|
1d02c2cd08 | ||
|
|
77ec6609df | ||
|
|
cacc00aeb8 | ||
|
|
4ac54040a9 | ||
|
|
17655071b7 | ||
|
|
ba5ee60944 | ||
|
|
84a6820fd8 | ||
|
|
dc04e2589c | ||
|
|
5e0b29ed4b | ||
|
|
debd9927c6 | ||
|
|
f6d7f7dec6 | ||
|
|
ece17f30ab | ||
|
|
e6736c4308 | ||
|
|
c00946994a | ||
|
|
2c781d472a | ||
|
|
8f7deb3741 | ||
|
|
9b87e7de11 | ||
|
|
23788d0f70 | ||
|
|
0362260b30 | ||
|
|
0f136e2b26 | ||
|
|
55186418b9 | ||
|
|
4d3408f4f0 | ||
|
|
90168e6c80 | ||
|
|
83fb311b3c | ||
|
|
2b7ec364ad | ||
|
|
b70f14d971 | ||
|
|
7cb8143633 | ||
|
|
536eeaf9ca | ||
|
|
a425170bff | ||
|
|
8741f7dedb | ||
|
|
19427f9797 | ||
|
|
a851432bfb | ||
|
|
536d0d4277 | ||
|
|
64867b09cf | ||
|
|
d0e42cdbc8 | ||
|
|
88d4cc9334 | ||
|
|
a8facce55e | ||
|
|
50c6c5e550 | ||
|
|
04c5b2b9cc | ||
|
|
f7d85ba844 | ||
|
|
6e680cac8f | ||
|
|
6c38c502a9 | ||
|
|
a16104d123 | ||
|
|
483d30730f | ||
|
|
14d98f02da | ||
|
|
7a76da4e15 | ||
|
|
5c5590ec5f | ||
|
|
8560b492c5 | ||
|
|
29bb039c94 | ||
|
|
fcf605e07f | ||
|
|
f2f49abe03 | ||
|
|
c0943153be | ||
|
|
403a834bfa | ||
|
|
33e5cde266 | ||
|
|
211e9896bc | ||
|
|
fa99d31acf | ||
|
|
4decec3c8e | ||
|
|
aae3a73381 | ||
|
|
27e76f5c7a | ||
|
|
d10d842024 | ||
|
|
8c306dfe53 | ||
|
|
08d12df9f3 | ||
|
|
29826e0eb8 | ||
|
|
bde8a1b2e1 | ||
|
|
020494f87a | ||
|
|
50a59305b5 | ||
|
|
32da26ec52 | ||
|
|
db9b11c650 | ||
|
|
9b0d2034dc | ||
|
|
4eb27f194e | ||
|
|
7429b3f894 | ||
|
|
6dce936b65 | ||
|
|
9fd622e549 | ||
|
|
e4e421a8e6 | ||
|
|
6f32c12628 | ||
|
|
1c19fa164a | ||
|
|
c4f955de84 | ||
|
|
48a49eaa9a | ||
|
|
ce6aaa1a37 | ||
|
|
d5d2654dc5 | ||
|
|
3a864b7b27 | ||
|
|
fed02859fd | ||
|
|
731d506c72 | ||
|
|
d86fc082fb | ||
|
|
39c4ba5e67 | ||
|
|
77991d976f | ||
|
|
d132d8a555 | ||
|
|
47f8bf1b11 | ||
|
|
4a653c7d31 | ||
|
|
5242194721 | ||
|
|
db52b3b03b | ||
|
|
6af96f9cd1 | ||
|
|
3931787027 | ||
|
|
5f50e98d12 | ||
|
|
9ab3fa611f | ||
|
|
cddf4eea49 | ||
|
|
d097fb2e28 | ||
|
|
ff550df32f |
2655
.betterer.results
2655
.betterer.results
File diff suppressed because it is too large
Load Diff
105
.betterer.ts
105
.betterer.ts
@@ -1,10 +1,10 @@
|
||||
import { regexp } from '@betterer/regexp';
|
||||
import { BettererFileTest } from '@betterer/betterer';
|
||||
import { ESLint, Linter } from 'eslint';
|
||||
import { existsSync } from 'fs';
|
||||
import path from 'path';
|
||||
import glob from 'glob';
|
||||
|
||||
export default {
|
||||
'no enzyme tests': () => regexp(/from 'enzyme'/g).include('**/*.test.*'),
|
||||
'better eslint': () => countEslintErrors().include('**/*.{ts,tsx}'),
|
||||
'no undocumented stories': () => countUndocumentedStories().include('**/*.story.tsx'),
|
||||
};
|
||||
@@ -22,80 +22,51 @@ function countUndocumentedStories() {
|
||||
});
|
||||
}
|
||||
|
||||
async function findEslintConfigFiles(): Promise<string[]> {
|
||||
return new Promise((resolve, reject) => {
|
||||
glob('**/.eslintrc', (err, files) => {
|
||||
if (err) {
|
||||
reject(err);
|
||||
}
|
||||
resolve(files);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
function countEslintErrors() {
|
||||
return new BettererFileTest(async (filePaths, fileTestResult, resolver) => {
|
||||
const { baseDirectory } = resolver;
|
||||
const cli = new ESLint({ cwd: baseDirectory });
|
||||
|
||||
const eslintConfigFiles = await findEslintConfigFiles();
|
||||
const eslintConfigMainPaths = eslintConfigFiles.map((file) => path.resolve(path.dirname(file)));
|
||||
await Promise.all(
|
||||
filePaths.map(async (filePath) => {
|
||||
const linterOptions = (await cli.calculateConfigForFile(filePath)) as Linter.Config;
|
||||
|
||||
const baseRules: Partial<Linter.RulesRecord> = {
|
||||
'@typescript-eslint/no-explicit-any': 'error',
|
||||
'@grafana/no-aria-label-selectors': 'error',
|
||||
};
|
||||
const rules: Partial<Linter.RulesRecord> = {
|
||||
'@typescript-eslint/no-explicit-any': 'error',
|
||||
};
|
||||
|
||||
const nonTestFilesRules: Partial<Linter.RulesRecord> = {
|
||||
...baseRules,
|
||||
'@typescript-eslint/consistent-type-assertions': ['error', { assertionStyle: 'never' }],
|
||||
};
|
||||
const isTestFile =
|
||||
filePath.endsWith('.test.tsx') || filePath.endsWith('.test.ts') || filePath.includes('__mocks__');
|
||||
|
||||
// group files by eslint config file
|
||||
// this will create two file groups for each eslint config file
|
||||
// one for test files and one for non-test files
|
||||
const fileGroups: Record<string, string[]> = {};
|
||||
if (!isTestFile) {
|
||||
rules['@typescript-eslint/consistent-type-assertions'] = [
|
||||
'error',
|
||||
{
|
||||
assertionStyle: 'never',
|
||||
},
|
||||
];
|
||||
}
|
||||
|
||||
for (const filePath of filePaths) {
|
||||
let configPath = eslintConfigMainPaths.find((configPath) => filePath.startsWith(configPath)) ?? '';
|
||||
const isTestFile =
|
||||
filePath.endsWith('.test.tsx') ||
|
||||
filePath.endsWith('.test.ts') ||
|
||||
filePath.includes('__mocks__') ||
|
||||
filePath.includes('public/test/');
|
||||
|
||||
if (isTestFile) {
|
||||
configPath += '-test';
|
||||
}
|
||||
if (!fileGroups[configPath]) {
|
||||
fileGroups[configPath] = [];
|
||||
}
|
||||
fileGroups[configPath].push(filePath);
|
||||
}
|
||||
|
||||
for (const configPath of Object.keys(fileGroups)) {
|
||||
const rules = configPath.endsWith('-test') ? baseRules : nonTestFilesRules;
|
||||
// this is by far the slowest part of this code. It takes eslint about 2 seconds just to find the config
|
||||
const linterOptions = (await cli.calculateConfigForFile(fileGroups[configPath][0])) as Linter.Config;
|
||||
const runner = new ESLint({
|
||||
baseConfig: {
|
||||
...linterOptions,
|
||||
rules: rules,
|
||||
},
|
||||
useEslintrc: false,
|
||||
cwd: baseDirectory,
|
||||
});
|
||||
const lintResults = await runner.lintFiles(fileGroups[configPath]);
|
||||
lintResults
|
||||
.filter((lintResult) => lintResult.source)
|
||||
.forEach((lintResult) => {
|
||||
const { messages } = lintResult;
|
||||
const filePath = lintResult.filePath;
|
||||
const file = fileTestResult.addFile(filePath, '');
|
||||
messages.forEach((message, index) => {
|
||||
file.addIssue(0, 0, message.message, `${index}`);
|
||||
});
|
||||
const runner = new ESLint({
|
||||
baseConfig: {
|
||||
...linterOptions,
|
||||
rules,
|
||||
},
|
||||
useEslintrc: false,
|
||||
cwd: baseDirectory,
|
||||
});
|
||||
}
|
||||
|
||||
const lintResults = await runner.lintFiles([filePath]);
|
||||
lintResults
|
||||
.filter((lintResult) => lintResult.source)
|
||||
.forEach((lintResult) => {
|
||||
const { messages } = lintResult;
|
||||
const file = fileTestResult.addFile(filePath, '');
|
||||
messages.forEach((message, index) => {
|
||||
file.addIssue(0, 0, message.message, `${index}`);
|
||||
});
|
||||
});
|
||||
})
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -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.6. DO NOT EDIT.
|
||||
# All tools are designed to be build inside $GOBIN.
|
||||
BINGO_DIR := $(dir $(lastword $(MAKEFILE_LIST)))
|
||||
GOPATH ?= $(shell go env GOPATH)
|
||||
@@ -21,41 +21,29 @@ BRA := $(GOBIN)/bra-v0.0.0-20200517080246-1e3013ecaff8
|
||||
$(BRA): $(BINGO_DIR)/bra.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)/bra-v0.0.0-20200517080246-1e3013ecaff8"
|
||||
@cd $(BINGO_DIR) && GOWORK=off $(GO) build -mod=mod -modfile=bra.mod -o=$(GOBIN)/bra-v0.0.0-20200517080246-1e3013ecaff8 "github.com/unknwon/bra"
|
||||
|
||||
CUE := $(GOBIN)/cue-v0.5.0-beta.2
|
||||
$(CUE): $(BINGO_DIR)/cue.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)/cue-v0.5.0-beta.2"
|
||||
@cd $(BINGO_DIR) && GOWORK=off $(GO) build -mod=mod -modfile=cue.mod -o=$(GOBIN)/cue-v0.5.0-beta.2 "cuelang.org/go/cmd/cue"
|
||||
@cd $(BINGO_DIR) && $(GO) build -mod=mod -modfile=bra.mod -o=$(GOBIN)/bra-v0.0.0-20200517080246-1e3013ecaff8 "github.com/unknwon/bra"
|
||||
|
||||
DRONE := $(GOBIN)/drone-v1.5.0
|
||||
$(DRONE): $(BINGO_DIR)/drone.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)/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"
|
||||
@cd $(BINGO_DIR) && $(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.49.0
|
||||
$(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"
|
||||
|
||||
JB := $(GOBIN)/jb-v0.5.1
|
||||
$(JB): $(BINGO_DIR)/jb.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)/jb-v0.5.1"
|
||||
@cd $(BINGO_DIR) && GOWORK=off $(GO) build -mod=mod -modfile=jb.mod -o=$(GOBIN)/jb-v0.5.1 "github.com/jsonnet-bundler/jsonnet-bundler/cmd/jb"
|
||||
@echo "(re)installing $(GOBIN)/golangci-lint-v1.49.0"
|
||||
@cd $(BINGO_DIR) && $(GO) build -mod=mod -modfile=golangci-lint.mod -o=$(GOBIN)/golangci-lint-v1.49.0 "github.com/golangci/golangci-lint/cmd/golangci-lint"
|
||||
|
||||
SWAGGER := $(GOBIN)/swagger-v0.30.2
|
||||
$(SWAGGER): $(BINGO_DIR)/swagger.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)/swagger-v0.30.2"
|
||||
@cd $(BINGO_DIR) && GOWORK=off $(GO) build -mod=mod -modfile=swagger.mod -o=$(GOBIN)/swagger-v0.30.2 "github.com/go-swagger/go-swagger/cmd/swagger"
|
||||
@cd $(BINGO_DIR) && $(GO) build -mod=mod -modfile=swagger.mod -o=$(GOBIN)/swagger-v0.30.2 "github.com/go-swagger/go-swagger/cmd/swagger"
|
||||
|
||||
WIRE := $(GOBIN)/wire-v0.5.0
|
||||
$(WIRE): $(BINGO_DIR)/wire.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)/wire-v0.5.0"
|
||||
@cd $(BINGO_DIR) && GOWORK=off $(GO) build -mod=mod -modfile=wire.mod -o=$(GOBIN)/wire-v0.5.0 "github.com/google/wire/cmd/wire"
|
||||
@cd $(BINGO_DIR) && $(GO) build -mod=mod -modfile=wire.mod -o=$(GOBIN)/wire-v0.5.0 "github.com/google/wire/cmd/wire"
|
||||
|
||||
|
||||
@@ -2,6 +2,6 @@ module _ // Auto generated by https://github.com/bwplotka/bingo. DO NOT EDIT
|
||||
|
||||
go 1.17
|
||||
|
||||
replace golang.org/x/sys => golang.org/x/sys v0.0.0-20220615213510-4f61da869c0c
|
||||
|
||||
require github.com/unknwon/bra v0.0.0-20200517080246-1e3013ecaff8
|
||||
|
||||
replace golang.org/x/sys => golang.org/x/sys v0.0.0-20220615213510-4f61da869c0c
|
||||
@@ -1,5 +0,0 @@
|
||||
module _ // Auto generated by https://github.com/bwplotka/bingo. DO NOT EDIT
|
||||
|
||||
go 1.19
|
||||
|
||||
require cuelang.org/go v0.5.0-beta.2 // cmd/cue
|
||||
@@ -1,30 +0,0 @@
|
||||
cuelang.org/go v0.4.3 h1:W3oBBjDTm7+IZfCKZAmC8uDG0eYfJL4Pp/xbbCMKaVo=
|
||||
cuelang.org/go v0.4.3/go.mod h1:7805vR9H+VoBNdWFdI7jyDR3QLUPp4+naHfbcgp55HI=
|
||||
cuelang.org/go v0.5.0-beta.2 h1:am5M7jGvNTJ0rnjrFNyvE7fucL/wRqb0emK4XxdThQI=
|
||||
cuelang.org/go v0.5.0-beta.2/go.mod h1:okjJBHFQFer+a41sAe2SaGm1glWS8oEb6CmJvn5Zdws=
|
||||
github.com/cockroachdb/apd v1.1.0 h1:3LFP3629v+1aKXU5Q37mxmRxX/pIu1nijXydLShEq5I=
|
||||
github.com/cockroachdb/apd/v2 v2.0.1 h1:y1Rh3tEU89D+7Tgbw+lp52T6p/GJLpDmNvr10UWqLTE=
|
||||
github.com/cockroachdb/apd/v2 v2.0.2 h1:weh8u7Cneje73dDh+2tEVLUvyBc89iwepWCD8b8034E=
|
||||
github.com/emicklei/proto v1.6.15 h1:XbpwxmuOPrdES97FrSfpyy67SSCV/wBIKXqgJzh6hNw=
|
||||
github.com/emicklei/proto v1.10.0 h1:pDGyFRVV5RvV+nkBK9iy3q67FBy9Xa7vwrOTE+g5aGw=
|
||||
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b h1:VKtxabqXZkF25pY9ekfRL6a582T4P37/31XEstQ5p58=
|
||||
github.com/google/uuid v1.2.0 h1:qJYtXnJRWmpe7m/3XlyhrsLrEURqHRM2kxzoxXqyUDs=
|
||||
github.com/mitchellh/go-wordwrap v1.0.1 h1:TLuKupo69TCn6TQSyGxwI1EblZZEsQ0vMlAFQflz0v0=
|
||||
github.com/mpvl/unique v0.0.0-20150818121801-cbe035fff7de h1:D5x39vF5KCwKQaw+OC9ZPiLVHXz3UFw2+psEX+gYcto=
|
||||
github.com/pkg/errors v0.8.1 h1:iURUrRGxPUNPdy5/HRSm+Yj6okJ6UtLINN0Q9M4+h3I=
|
||||
github.com/protocolbuffers/txtpbfmt v0.0.0-20201118171849-f6a6b3f636fc h1:gSVONBi2HWMFXCa9jFdYvYk7IwW/mTLxWOF7rXS4LO0=
|
||||
github.com/protocolbuffers/txtpbfmt v0.0.0-20220428173112-74888fd59c2b h1:zd/2RNzIRkoGGMjE+YIsZ85CnDIz672JK2F3Zl4vux4=
|
||||
github.com/spf13/cobra v1.4.0 h1:y+wJpx64xcgO1V+RcnwW0LEHxTKRi2ZDPSBjWnrg88Q=
|
||||
github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA=
|
||||
golang.org/x/mod v0.3.1-0.20200828183125-ce943fd02449 h1:xUIPaMhvROX9dhPvRCenIJtU78+lbEenGbgqB5hfHCQ=
|
||||
golang.org/x/mod v0.6.0-dev.0.20220818022119-ed83ed61efb9 h1:VtCrPQXM5Wo9l7XN64SjBMczl48j8mkP+2e3OhYlz+0=
|
||||
golang.org/x/net v0.0.0-20200226121028-0de0cce0169b h1:0mm1VjtFUOIlE1SbDlwjYaDxZVDP2S5ou6y0gSgXHu8=
|
||||
golang.org/x/net v0.0.0-20220722155237-a158d28d115b h1:PxfKdU9lEEDYjdIzOtC4qFWgkU2rGHdKlKowJSMN9h0=
|
||||
golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f h1:v4INt8xihDGvnrfjMDVXGxw9wrfxYyCjk0KbXjhR55s=
|
||||
golang.org/x/text v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk=
|
||||
golang.org/x/text v0.3.8 h1:nAL+RVCQ9uMn3vJZbV+MRnydTJFPf8qqY42YiA6MrqY=
|
||||
golang.org/x/tools v0.0.0-20200612220849-54c614fe050c h1:g6oFfz6Cmw68izP3xsdud3Oxu145IPkeFzyRg58AKHM=
|
||||
golang.org/x/tools v0.1.12 h1:VveCTK38A2rkS8ZqFY25HIDFscX5X9OoEhJd3quQmXU=
|
||||
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4=
|
||||
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b h1:h8qDotaEPuJATrMmW04NCwg7v22aHH28wwpauUhK9Oo=
|
||||
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
|
||||
@@ -2,4 +2,173 @@ module _ // Auto generated by https://github.com/bwplotka/bingo. DO NOT EDIT
|
||||
|
||||
go 1.19
|
||||
|
||||
require github.com/golangci/golangci-lint v1.51.2 // cmd/golangci-lint
|
||||
require github.com/golangci/golangci-lint v1.49.0 // cmd/golangci-lint
|
||||
|
||||
require (
|
||||
4d63.com/gochecknoglobals v0.1.0 // indirect
|
||||
github.com/Antonboom/errname v0.1.7 // indirect
|
||||
github.com/Antonboom/nilnil v0.1.1 // indirect
|
||||
github.com/BurntSushi/toml v1.2.0 // indirect
|
||||
github.com/Djarvur/go-err113 v0.0.0-20210108212216-aea10b59be24 // indirect
|
||||
github.com/GaijinEntertainment/go-exhaustruct/v2 v2.3.0 // indirect
|
||||
github.com/Masterminds/semver v1.5.0 // indirect
|
||||
github.com/OpenPeeDeeP/depguard v1.1.0 // indirect
|
||||
github.com/alexkohler/prealloc v1.0.0 // indirect
|
||||
github.com/alingse/asasalint v0.0.11 // indirect
|
||||
github.com/ashanbrown/forbidigo v1.3.0 // indirect
|
||||
github.com/ashanbrown/makezero v1.1.1 // indirect
|
||||
github.com/beorn7/perks v1.0.1 // indirect
|
||||
github.com/bkielbasa/cyclop v1.2.0 // indirect
|
||||
github.com/blizzy78/varnamelen v0.8.0 // indirect
|
||||
github.com/bombsimon/wsl/v3 v3.3.0 // indirect
|
||||
github.com/breml/bidichk v0.2.3 // indirect
|
||||
github.com/breml/errchkjson v0.3.0 // indirect
|
||||
github.com/butuzov/ireturn v0.1.1 // indirect
|
||||
github.com/cespare/xxhash/v2 v2.1.2 // indirect
|
||||
github.com/charithe/durationcheck v0.0.9 // indirect
|
||||
github.com/chavacava/garif v0.0.0-20220630083739-93517212f375 // indirect
|
||||
github.com/curioswitch/go-reassign v0.1.2 // indirect
|
||||
github.com/daixiang0/gci v0.6.3 // indirect
|
||||
github.com/davecgh/go-spew v1.1.1 // indirect
|
||||
github.com/denis-tingaikin/go-header v0.4.3 // indirect
|
||||
github.com/esimonov/ifshort v1.0.4 // indirect
|
||||
github.com/ettle/strcase v0.1.1 // indirect
|
||||
github.com/fatih/color v1.13.0 // indirect
|
||||
github.com/fatih/structtag v1.2.0 // indirect
|
||||
github.com/firefart/nonamedreturns v1.0.4 // indirect
|
||||
github.com/fsnotify/fsnotify v1.5.4 // indirect
|
||||
github.com/fzipp/gocyclo v0.6.0 // indirect
|
||||
github.com/go-critic/go-critic v0.6.4 // indirect
|
||||
github.com/go-toolsmith/astcast v1.0.0 // indirect
|
||||
github.com/go-toolsmith/astcopy v1.0.1 // indirect
|
||||
github.com/go-toolsmith/astequal v1.0.2 // indirect
|
||||
github.com/go-toolsmith/astfmt v1.0.0 // indirect
|
||||
github.com/go-toolsmith/astp v1.0.0 // indirect
|
||||
github.com/go-toolsmith/strparse v1.0.0 // indirect
|
||||
github.com/go-toolsmith/typep v1.0.2 // indirect
|
||||
github.com/go-xmlfmt/xmlfmt v0.0.0-20191208150333-d5b6f63a941b // indirect
|
||||
github.com/gobwas/glob v0.2.3 // indirect
|
||||
github.com/gofrs/flock v0.8.1 // indirect
|
||||
github.com/golang/protobuf v1.5.2 // indirect
|
||||
github.com/golangci/check v0.0.0-20180506172741-cfe4005ccda2 // indirect
|
||||
github.com/golangci/dupl v0.0.0-20180902072040-3e9179ac440a // indirect
|
||||
github.com/golangci/go-misc v0.0.0-20220329215616-d24fe342adfe // indirect
|
||||
github.com/golangci/gofmt v0.0.0-20190930125516-244bba706f1a // indirect
|
||||
github.com/golangci/lint-1 v0.0.0-20191013205115-297bf364a8e0 // indirect
|
||||
github.com/golangci/maligned v0.0.0-20180506175553-b1d89398deca // indirect
|
||||
github.com/golangci/misspell v0.3.5 // indirect
|
||||
github.com/golangci/revgrep v0.0.0-20220804021717-745bb2f7c2e6 // indirect
|
||||
github.com/golangci/unconvert v0.0.0-20180507085042-28b1c447d1f4 // indirect
|
||||
github.com/google/go-cmp v0.5.8 // indirect
|
||||
github.com/gordonklaus/ineffassign v0.0.0-20210914165742-4cc7213b9bc8 // indirect
|
||||
github.com/gostaticanalysis/analysisutil v0.7.1 // indirect
|
||||
github.com/gostaticanalysis/comment v1.4.2 // indirect
|
||||
github.com/gostaticanalysis/forcetypeassert v0.1.0 // indirect
|
||||
github.com/gostaticanalysis/nilerr v0.1.1 // indirect
|
||||
github.com/hashicorp/errwrap v1.0.0 // indirect
|
||||
github.com/hashicorp/go-multierror v1.1.1 // indirect
|
||||
github.com/hashicorp/go-version v1.6.0 // indirect
|
||||
github.com/hashicorp/hcl v1.0.0 // indirect
|
||||
github.com/hexops/gotextdiff v1.0.3 // indirect
|
||||
github.com/inconshreveable/mousetrap v1.0.0 // indirect
|
||||
github.com/jgautheron/goconst v1.5.1 // indirect
|
||||
github.com/jingyugao/rowserrcheck v1.1.1 // indirect
|
||||
github.com/jirfag/go-printf-func-name v0.0.0-20200119135958-7558a9eaa5af // indirect
|
||||
github.com/julz/importas v0.1.0 // indirect
|
||||
github.com/kisielk/errcheck v1.6.2 // indirect
|
||||
github.com/kisielk/gotool v1.0.0 // indirect
|
||||
github.com/kulti/thelper v0.6.3 // indirect
|
||||
github.com/kunwardeep/paralleltest v1.0.6 // indirect
|
||||
github.com/kyoh86/exportloopref v0.1.8 // indirect
|
||||
github.com/ldez/gomoddirectives v0.2.3 // indirect
|
||||
github.com/ldez/tagliatelle v0.3.1 // indirect
|
||||
github.com/leonklingele/grouper v1.1.0 // indirect
|
||||
github.com/lufeee/execinquery v1.2.1 // indirect
|
||||
github.com/magiconair/properties v1.8.6 // indirect
|
||||
github.com/maratori/testpackage v1.1.0 // indirect
|
||||
github.com/matoous/godox v0.0.0-20210227103229-6504466cf951 // indirect
|
||||
github.com/mattn/go-colorable v0.1.13 // indirect
|
||||
github.com/mattn/go-isatty v0.0.16 // indirect
|
||||
github.com/mattn/go-runewidth v0.0.9 // indirect
|
||||
github.com/matttproud/golang_protobuf_extensions v1.0.1 // indirect
|
||||
github.com/mbilski/exhaustivestruct v1.2.0 // indirect
|
||||
github.com/mgechev/revive v1.2.3 // indirect
|
||||
github.com/mitchellh/go-homedir v1.1.0 // indirect
|
||||
github.com/mitchellh/mapstructure v1.5.0 // indirect
|
||||
github.com/moricho/tparallel v0.2.1 // indirect
|
||||
github.com/nakabonne/nestif v0.3.1 // indirect
|
||||
github.com/nbutton23/zxcvbn-go v0.0.0-20210217022336-fa2cb2858354 // indirect
|
||||
github.com/nishanths/exhaustive v0.8.1 // indirect
|
||||
github.com/nishanths/predeclared v0.2.2 // indirect
|
||||
github.com/olekukonko/tablewriter v0.0.5 // indirect
|
||||
github.com/pelletier/go-toml v1.9.5 // indirect
|
||||
github.com/pelletier/go-toml/v2 v2.0.2 // indirect
|
||||
github.com/phayes/checkstyle v0.0.0-20170904204023-bfd46e6a821d // indirect
|
||||
github.com/pkg/errors v0.9.1 // indirect
|
||||
github.com/pmezard/go-difflib v1.0.0 // indirect
|
||||
github.com/polyfloyd/go-errorlint v1.0.2 // indirect
|
||||
github.com/prometheus/client_golang v1.12.1 // indirect
|
||||
github.com/prometheus/client_model v0.2.0 // indirect
|
||||
github.com/prometheus/common v0.32.1 // indirect
|
||||
github.com/prometheus/procfs v0.7.3 // indirect
|
||||
github.com/quasilyte/go-ruleguard v0.3.17 // indirect
|
||||
github.com/quasilyte/gogrep v0.0.0-20220120141003-628d8b3623b5 // indirect
|
||||
github.com/quasilyte/regex/syntax v0.0.0-20200407221936-30656e2c4a95 // indirect
|
||||
github.com/quasilyte/stdinfo v0.0.0-20220114132959-f7386bf02567 // indirect
|
||||
github.com/ryancurrah/gomodguard v1.2.4 // indirect
|
||||
github.com/ryanrolds/sqlclosecheck v0.3.0 // indirect
|
||||
github.com/sanposhiho/wastedassign/v2 v2.0.6 // indirect
|
||||
github.com/sashamelentyev/interfacebloat v1.1.0 // indirect
|
||||
github.com/sashamelentyev/usestdlibvars v1.13.0 // indirect
|
||||
github.com/securego/gosec/v2 v2.13.1 // indirect
|
||||
github.com/shazow/go-diff v0.0.0-20160112020656-b6b7b6733b8c // indirect
|
||||
github.com/sirupsen/logrus v1.9.0 // indirect
|
||||
github.com/sivchari/containedctx v1.0.2 // indirect
|
||||
github.com/sivchari/nosnakecase v1.7.0 // indirect
|
||||
github.com/sivchari/tenv v1.7.0 // indirect
|
||||
github.com/sonatard/noctx v0.0.1 // indirect
|
||||
github.com/sourcegraph/go-diff v0.6.1 // indirect
|
||||
github.com/spf13/afero v1.8.2 // indirect
|
||||
github.com/spf13/cast v1.5.0 // indirect
|
||||
github.com/spf13/cobra v1.5.0 // indirect
|
||||
github.com/spf13/jwalterweatherman v1.1.0 // indirect
|
||||
github.com/spf13/pflag v1.0.5 // indirect
|
||||
github.com/spf13/viper v1.12.0 // indirect
|
||||
github.com/ssgreg/nlreturn/v2 v2.2.1 // indirect
|
||||
github.com/stbenjam/no-sprintf-host-port v0.1.1 // indirect
|
||||
github.com/stretchr/objx v0.4.0 // indirect
|
||||
github.com/stretchr/testify v1.8.0 // indirect
|
||||
github.com/subosito/gotenv v1.4.0 // indirect
|
||||
github.com/sylvia7788/contextcheck v1.0.6 // indirect
|
||||
github.com/tdakkota/asciicheck v0.1.1 // indirect
|
||||
github.com/tetafro/godot v1.4.11 // indirect
|
||||
github.com/timakin/bodyclose v0.0.0-20210704033933-f49887972144 // indirect
|
||||
github.com/timonwong/logrlint v0.1.0 // indirect
|
||||
github.com/tomarrell/wrapcheck/v2 v2.6.2 // indirect
|
||||
github.com/tommy-muehle/go-mnd/v2 v2.5.0 // indirect
|
||||
github.com/ultraware/funlen v0.0.3 // indirect
|
||||
github.com/ultraware/whitespace v0.0.5 // indirect
|
||||
github.com/uudashr/gocognit v1.0.6 // indirect
|
||||
github.com/yagipy/maintidx v1.0.0 // indirect
|
||||
github.com/yeya24/promlinter v0.2.0 // indirect
|
||||
gitlab.com/bosi/decorder v0.2.3 // indirect
|
||||
go.uber.org/atomic v1.7.0 // indirect
|
||||
go.uber.org/multierr v1.6.0 // indirect
|
||||
go.uber.org/zap v1.17.0 // indirect
|
||||
golang.org/x/exp v0.0.0-20220722155223-a9213eeb770e // indirect
|
||||
golang.org/x/exp/typeparams v0.0.0-20220613132600-b0d781184e0d // indirect
|
||||
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4 // indirect
|
||||
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4 // indirect
|
||||
golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab // indirect
|
||||
golang.org/x/text v0.3.7 // indirect
|
||||
golang.org/x/tools v0.1.12 // indirect
|
||||
google.golang.org/protobuf v1.28.0 // indirect
|
||||
gopkg.in/ini.v1 v1.66.6 // indirect
|
||||
gopkg.in/yaml.v2 v2.4.0 // indirect
|
||||
gopkg.in/yaml.v3 v3.0.1 // indirect
|
||||
honnef.co/go/tools v0.3.3 // indirect
|
||||
mvdan.cc/gofumpt v0.3.1 // indirect
|
||||
mvdan.cc/interfacer v0.0.0-20180901003855-c20040233aed // indirect
|
||||
mvdan.cc/lint v0.0.0-20170908181259-adc824a0674b // indirect
|
||||
mvdan.cc/unparam v0.0.0-20220706161116-678bad134442 // indirect
|
||||
)
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,5 +0,0 @@
|
||||
module _ // Auto generated by https://github.com/bwplotka/bingo. DO NOT EDIT
|
||||
|
||||
go 1.18
|
||||
|
||||
require github.com/jsonnet-bundler/jsonnet-bundler v0.5.1 // cmd/jb
|
||||
@@ -1,50 +0,0 @@
|
||||
github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751 h1:JYp7IbQjafoB+tBA3gMyHYHrpOtNuDiK/uB5uXxq5wM=
|
||||
github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc=
|
||||
github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137 h1:s6gZFSlWYmbqAuRjVTiNNhvNRfY2Wxp9nhfyel4rklc=
|
||||
github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137/go.mod h1:OMCwj8VM1Kc9e19TLln2VL61YJF0x1XFtfdL4JdbSyE=
|
||||
github.com/campoy/embedmd v1.0.0/go.mod h1:oxyr9RCiSXg0M3VJ3ks0UGfp98BpSSGr0kpiX3MzVl8=
|
||||
github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
|
||||
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/fatih/color v1.13.0 h1:8LOYc1KYPPmyKMuN8QV2DNRWNbLo6LZ0iLs8+mlH53w=
|
||||
github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk=
|
||||
github.com/jsonnet-bundler/jsonnet-bundler v0.5.1 h1:eUd6EA1Qzz73Q4NLNLOrNkMb96+6NTTERbX9lqaxVwk=
|
||||
github.com/jsonnet-bundler/jsonnet-bundler v0.5.1/go.mod h1:Qrdw/7mOFS2SKCOALKFfEH8gdvXJi8XZjw9g5ilpf4I=
|
||||
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
|
||||
github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI=
|
||||
github.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NBk=
|
||||
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
|
||||
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
|
||||
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
|
||||
github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc=
|
||||
github.com/mattn/go-colorable v0.1.12 h1:jF+Du6AlPIjs2BiUiQlKOX0rt3SujHxPnksPKZbaA40=
|
||||
github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4=
|
||||
github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU=
|
||||
github.com/mattn/go-isatty v0.0.14 h1:yVuAays6BHfxijgZPzw+3Zlu5yQgKGP2/hcQbHb7S9Y=
|
||||
github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94=
|
||||
github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA=
|
||||
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
|
||||
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
|
||||
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
|
||||
github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc=
|
||||
github.com/rogpeppe/go-internal v1.8.1/go.mod h1:JeRgkft04UBgHMgCIwADu4Pn6Mtm5d4nPKWu0nJ5d+o=
|
||||
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
||||
github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=
|
||||
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
|
||||
github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
|
||||
github.com/stretchr/testify v1.7.4/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
|
||||
golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220615213510-4f61da869c0c h1:aFV+BgZ4svzjfabn8ERpuB4JI4N6/rdy1iusx77G3oU=
|
||||
golang.org/x/sys v0.0.0-20220615213510-4f61da869c0c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
gopkg.in/alecthomas/kingpin.v2 v2.2.6 h1:jMFz6MfLP0/4fUyZle81rXUoxOBFi19VUFKVDOQfozc=
|
||||
gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw=
|
||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q=
|
||||
gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI=
|
||||
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||
@@ -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.6. 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)}
|
||||
@@ -10,13 +10,9 @@ fi
|
||||
|
||||
BRA="${GOBIN}/bra-v0.0.0-20200517080246-1e3013ecaff8"
|
||||
|
||||
CUE="${GOBIN}/cue-v0.5.0-beta.2"
|
||||
|
||||
DRONE="${GOBIN}/drone-v1.5.0"
|
||||
|
||||
GOLANGCI_LINT="${GOBIN}/golangci-lint-v1.51.2"
|
||||
|
||||
JB="${GOBIN}/jb-v0.5.1"
|
||||
GOLANGCI_LINT="${GOBIN}/golangci-lint-v1.49.0"
|
||||
|
||||
SWAGGER="${GOBIN}/swagger-v0.30.2"
|
||||
|
||||
|
||||
12
.bra.toml
12
.bra.toml
@@ -1,9 +1,9 @@
|
||||
[run]
|
||||
init_cmds = [
|
||||
["make", "gen-go"],
|
||||
["make", "gen-jsonnet"],
|
||||
["GO_BUILD_DEV=1", "make", "build-go"],
|
||||
["./bin/grafana", "server", "-packaging=dev", "cfg:app_mode=development"]
|
||||
["GO_BUILD_DEV=1", "make", "build-cli"],
|
||||
["GO_BUILD_DEV=1", "make", "build-server"],
|
||||
["./bin/grafana-server", "-packaging=dev", "cfg:app_mode=development"]
|
||||
]
|
||||
watch_all = true
|
||||
follow_symlinks = true
|
||||
@@ -11,14 +11,12 @@ watch_dirs = [
|
||||
"$WORKDIR/pkg",
|
||||
"$WORKDIR/public/views",
|
||||
"$WORKDIR/conf",
|
||||
"$WORKDIR/devenv/dev-dashboards",
|
||||
]
|
||||
watch_exts = [".go", ".ini", ".toml", ".template.html"]
|
||||
ignore_files = [".*_gen.go"]
|
||||
build_delay = 1500
|
||||
cmds = [
|
||||
["make", "gen-go"],
|
||||
["make", "gen-jsonnet"],
|
||||
["GO_BUILD_DEV=1", "make", "build-go"],
|
||||
["./bin/grafana", "server", "-packaging=dev", "cfg:app_mode=development"]
|
||||
["GO_BUILD_DEV=1", "make", "build-server"],
|
||||
["./bin/grafana-server", "-packaging=dev", "cfg:app_mode=development"]
|
||||
]
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
.dockerignore
|
||||
.git
|
||||
.gitignore
|
||||
.github
|
||||
.vscode
|
||||
bin
|
||||
data*
|
||||
|
||||
67
.drone.star
67
.drone.star
@@ -3,57 +3,20 @@
|
||||
# 2. Login to drone and export the env variables (token and server) shown here: https://drone.grafana.net/account
|
||||
# 3. Run `make drone`
|
||||
# More information about this process here: https://github.com/grafana/deployment_tools/blob/master/docs/infrastructure/drone/signing.md
|
||||
"""
|
||||
This module returns a Drone configuration including pipelines and secrets.
|
||||
"""
|
||||
|
||||
load("scripts/drone/events/pr.star", "pr_pipelines")
|
||||
load("scripts/drone/events/main.star", "main_pipelines")
|
||||
load(
|
||||
"scripts/drone/events/release.star",
|
||||
"integration_test_pipelines",
|
||||
"publish_artifacts_pipelines",
|
||||
"publish_npm_pipelines",
|
||||
"publish_packages_pipeline",
|
||||
)
|
||||
load(
|
||||
"scripts/drone/rgm.star",
|
||||
"rgm",
|
||||
)
|
||||
load(
|
||||
"scripts/drone/pipelines/publish_images.star",
|
||||
"publish_image_pipelines_public",
|
||||
)
|
||||
load(
|
||||
"scripts/drone/pipelines/ci_images.star",
|
||||
"publish_ci_build_container_image_pipeline",
|
||||
"publish_ci_windows_test_image_pipeline",
|
||||
)
|
||||
load(
|
||||
"scripts/drone/pipelines/windows.star",
|
||||
"windows_test_backend",
|
||||
)
|
||||
load("scripts/drone/version.star", "version_branch_pipelines")
|
||||
load("scripts/drone/events/cron.star", "cronjobs")
|
||||
load("scripts/drone/vault.star", "secrets")
|
||||
load('scripts/drone/events/pr.star', 'pr_pipelines')
|
||||
load('scripts/drone/events/main.star', 'main_pipelines')
|
||||
load('scripts/drone/pipelines/docs.star', 'docs_pipelines')
|
||||
load('scripts/drone/events/release.star', 'release_pipelines', 'publish_artifacts_pipelines', 'publish_npm_pipelines', 'publish_packages_pipeline', 'artifacts_page_pipeline')
|
||||
load('scripts/drone/pipelines/publish_images.star', 'publish_image_pipelines_public', 'publish_image_pipelines_security')
|
||||
load('scripts/drone/version.star', 'version_branch_pipelines')
|
||||
load('scripts/drone/events/cron.star', 'cronjobs')
|
||||
load('scripts/drone/vault.star', 'secrets')
|
||||
|
||||
def main(_ctx):
|
||||
return (
|
||||
pr_pipelines() +
|
||||
main_pipelines() +
|
||||
publish_image_pipelines_public() +
|
||||
publish_artifacts_pipelines("public") +
|
||||
publish_npm_pipelines() +
|
||||
publish_packages_pipeline() +
|
||||
rgm() +
|
||||
[windows_test_backend({
|
||||
"event": ["promote"],
|
||||
"target": ["test-windows"],
|
||||
}, "oss", "testing")] +
|
||||
version_branch_pipelines() +
|
||||
integration_test_pipelines() +
|
||||
publish_ci_windows_test_image_pipeline() +
|
||||
publish_ci_build_container_image_pipeline() +
|
||||
cronjobs() +
|
||||
secrets()
|
||||
)
|
||||
def main(ctx):
|
||||
edition = 'oss'
|
||||
return pr_pipelines(edition=edition) + main_pipelines(edition=edition) + release_pipelines() + \
|
||||
publish_image_pipelines_public() + publish_image_pipelines_security() + \
|
||||
publish_artifacts_pipelines('security') + publish_artifacts_pipelines('public') + \
|
||||
publish_npm_pipelines('public') + publish_packages_pipeline() + artifacts_page_pipeline() + \
|
||||
version_branch_pipelines() + cronjobs(edition=edition) + secrets()
|
||||
|
||||
5048
.drone.yml
5048
.drone.yml
File diff suppressed because it is too large
Load Diff
103
.eslintrc
103
.eslintrc
@@ -1,15 +1,13 @@
|
||||
{
|
||||
"extends": ["@grafana/eslint-config"],
|
||||
"root": true,
|
||||
"plugins": ["@emotion", "lodash", "jest", "import", "jsx-a11y", "@grafana"],
|
||||
"plugins": ["@emotion", "lodash", "jest", "import", "jsx-a11y"],
|
||||
"settings": {
|
||||
"import/internal-regex": "^(app/)|(@grafana)",
|
||||
"import/external-module-folders": ["node_modules", ".yarn"]
|
||||
},
|
||||
"rules": {
|
||||
"react/prop-types": "off",
|
||||
// need to ignore emotion's `css` prop, see https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-unknown-property.md#rule-options
|
||||
"react/no-unknown-property": ["error", { "ignore": ["css"] }],
|
||||
"@emotion/jsx-import": "error",
|
||||
"lodash/import-scope": [2, "member"],
|
||||
"jest/no-focused-tests": "error",
|
||||
@@ -22,18 +20,13 @@
|
||||
}
|
||||
],
|
||||
"no-restricted-imports": [
|
||||
"error",
|
||||
"warn",
|
||||
{
|
||||
"paths": [
|
||||
{
|
||||
"name": "react-redux",
|
||||
"importNames": ["useDispatch", "useSelector"],
|
||||
"message": "Please import from app/types instead."
|
||||
},
|
||||
{
|
||||
"name": "react-i18next",
|
||||
"importNames": ["Trans", "t"],
|
||||
"message": "Please import from app/core/internationalization instead"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -41,15 +34,68 @@
|
||||
|
||||
// Use typescript's no-redeclare for compatibility with overrides
|
||||
"no-redeclare": "off",
|
||||
"@typescript-eslint/no-redeclare": ["error"]
|
||||
"@typescript-eslint/no-redeclare": ["error"],
|
||||
|
||||
|
||||
// these are all the rules listed in the strict preset
|
||||
// we should fix them one by one and mark them as errors
|
||||
// once they're all fixed, we can remove them all and instead extend the strict preset
|
||||
// with "extends": ["plugin:jsx-a11y/strict"]
|
||||
"jsx-a11y/alt-text": "off",
|
||||
"jsx-a11y/anchor-has-content": "error",
|
||||
"jsx-a11y/anchor-is-valid": "off",
|
||||
"jsx-a11y/aria-activedescendant-has-tabindex": "error",
|
||||
"jsx-a11y/aria-props": "error",
|
||||
"jsx-a11y/aria-proptypes": "error",
|
||||
"jsx-a11y/aria-role": "off",
|
||||
"jsx-a11y/aria-unsupported-elements": "error",
|
||||
"jsx-a11y/autocomplete-valid": "error",
|
||||
"jsx-a11y/click-events-have-key-events": "off",
|
||||
"jsx-a11y/heading-has-content": "error",
|
||||
"jsx-a11y/html-has-lang": "error",
|
||||
"jsx-a11y/iframe-has-title": "off",
|
||||
"jsx-a11y/img-redundant-alt": "off",
|
||||
"jsx-a11y/interactive-supports-focus": [
|
||||
"off",
|
||||
{
|
||||
"tabbable": [
|
||||
"button",
|
||||
"checkbox",
|
||||
"link",
|
||||
"progressbar",
|
||||
"searchbox",
|
||||
"slider",
|
||||
"spinbutton",
|
||||
"switch",
|
||||
"textbox"
|
||||
]
|
||||
}
|
||||
],
|
||||
"jsx-a11y/label-has-associated-control": "off",
|
||||
"jsx-a11y/media-has-caption": "error",
|
||||
"jsx-a11y/mouse-events-have-key-events": "off",
|
||||
"jsx-a11y/no-access-key": "error",
|
||||
"jsx-a11y/no-autofocus": "off",
|
||||
"jsx-a11y/no-distracting-elements": "error",
|
||||
"jsx-a11y/no-interactive-element-to-noninteractive-role": "error",
|
||||
"jsx-a11y/no-noninteractive-element-interactions": [
|
||||
"off",
|
||||
{
|
||||
"body": ["onError", "onLoad"],
|
||||
"iframe": ["onError", "onLoad"],
|
||||
"img": ["onError", "onLoad"]
|
||||
}
|
||||
],
|
||||
"jsx-a11y/no-noninteractive-element-to-interactive-role": "off",
|
||||
"jsx-a11y/no-noninteractive-tabindex": "off",
|
||||
"jsx-a11y/no-redundant-roles": "error",
|
||||
"jsx-a11y/no-static-element-interactions": "off",
|
||||
"jsx-a11y/role-has-required-aria-props": "off",
|
||||
"jsx-a11y/role-supports-aria-props": "off",
|
||||
"jsx-a11y/scope": "error",
|
||||
"jsx-a11y/tabindex-no-positive": "off"
|
||||
},
|
||||
"overrides": [
|
||||
{
|
||||
"files": ["public/app/features/scenes/**/*.{ts,tsx}"],
|
||||
"rules": {
|
||||
"@typescript-eslint/explicit-member-accessibility": ["error", { "accessibility": "explicit" }]
|
||||
}
|
||||
},
|
||||
{
|
||||
"files": ["packages/grafana-ui/src/components/uPlot/**/*.{ts,tsx}"],
|
||||
"rules": {
|
||||
@@ -71,31 +117,6 @@
|
||||
"no-redeclare": "error",
|
||||
"@typescript-eslint/no-redeclare": "off"
|
||||
}
|
||||
},
|
||||
{
|
||||
"extends": ["plugin:jsx-a11y/recommended"],
|
||||
"files": ["**/*"],
|
||||
"excludedFiles": ["**/*.{spec,test}.{ts,tsx}"],
|
||||
"rules": {
|
||||
// rules marked "off" are those left in the recommended preset we need to fix
|
||||
// we should remove the corresponding line and fix them one by one
|
||||
// any marked "error" contain specific overrides we'll need to keep
|
||||
"jsx-a11y/click-events-have-key-events": "off",
|
||||
"jsx-a11y/no-autofocus": [
|
||||
"error",
|
||||
{
|
||||
"ignoreNonDOM": true
|
||||
}
|
||||
],
|
||||
"jsx-a11y/no-static-element-interactions": "off",
|
||||
"jsx-a11y/label-has-associated-control": [
|
||||
"error",
|
||||
{
|
||||
"controlComponents": ["NumberInput"],
|
||||
"depth": 2
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
711
.github/CODEOWNERS
vendored
711
.github/CODEOWNERS
vendored
@@ -12,614 +12,205 @@
|
||||
# This should make it easy to add new rules without breaking existing ones.
|
||||
|
||||
# Documentation
|
||||
/docs/ @grafana/docs-grafana
|
||||
/contribute/ @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
|
||||
/docs/ @grafana/docs-squad
|
||||
/contribute/ @grafana/docs-squad
|
||||
/docs/sources/developers/plugins/ @grafana/docs-squad @grafana/plugins-platform-frontend @grafana/plugins-platform-backend
|
||||
/docs/sources/developers/plugins/backend @grafana/docs-squad @grafana/plugins-platform-backend
|
||||
# Administration, data sources, querying, release updates: Garrett Guillotte
|
||||
# Set up, dashboards/visualization, best practices: Chris Moyer
|
||||
# Alerting: Brenda Muir
|
||||
/docs/sources/administration/ @gguillotte-grafana
|
||||
/docs/sources/alerting @brendamuir
|
||||
/docs/sources/best-practices/ @chri2547
|
||||
/docs/sources/dashboards/ @chri2547
|
||||
/docs/sources/datasources/ @gguillotte-grafana
|
||||
/docs/sources/enterprise/ @gguillotte-grafana
|
||||
/docs/sources/explore/ @gguillotte-grafana
|
||||
/docs/sources/getting-started/ @chri2547
|
||||
/docs/sources/old-alerting @brendamuir
|
||||
/docs/sources/panels/ @chri2547
|
||||
/docs/sources/release-notes/ @gguillotte-grafana
|
||||
/docs/sources/visualization/ @chri2547
|
||||
/docs/sources/whatsnew/ @gguillotte-grafana
|
||||
|
||||
# Backend code
|
||||
/go.mod @grafana/backend-platform
|
||||
/go.sum @grafana/backend-platform
|
||||
/.bingo/ @grafana/backend-platform
|
||||
/pkg/README.md @grafana/backend-platform
|
||||
/pkg/ruleguard.rules.go @grafana/backend-platform
|
||||
/.bra.toml @grafana/backend-platform
|
||||
/.golangci.toml @grafana/backend-platform
|
||||
/build.go @grafana/backend-platform
|
||||
*.go @grafana/backend-platform
|
||||
go.mod @grafana/backend-platform
|
||||
go.sum @grafana/backend-platform
|
||||
/.bingo @grafana/backend-platform
|
||||
|
||||
/pkg/api/ @grafana/backend-platform
|
||||
/pkg/bus/ @grafana/backend-platform
|
||||
/pkg/cmd/ @grafana/backend-platform
|
||||
/pkg/components/apikeygen/ @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
|
||||
/pkg/components/null/ @grafana/backend-platform
|
||||
/pkg/components/simplejson/ @grafana/backend-platform
|
||||
/pkg/events/ @grafana/backend-platform
|
||||
/pkg/extensions/ @grafana/backend-platform
|
||||
/pkg/ifaces/ @grafana/backend-platform
|
||||
/pkg/infra/appcontext/ @grafana/backend-platform
|
||||
/pkg/infra/db/ @grafana/backend-platform
|
||||
/pkg/infra/grn/ @grafana/backend-platform
|
||||
/pkg/infra/localcache/ @grafana/backend-platform
|
||||
/pkg/infra/log/ @grafana/backend-platform
|
||||
/pkg/infra/metrics/ @grafana/backend-platform
|
||||
/pkg/infra/network/ @grafana/backend-platform
|
||||
/pkg/infra/process/ @grafana/backend-platform
|
||||
/pkg/infra/remotecache/ @grafana/backend-platform
|
||||
/pkg/infra/serverlock/ @grafana/backend-platform
|
||||
/pkg/infra/slugify/ @grafana/backend-platform
|
||||
/pkg/infra/tracing/ @grafana/backend-platform
|
||||
/pkg/infra/usagestats/ @grafana/backend-platform
|
||||
/pkg/middleware/ @grafana/backend-platform
|
||||
/pkg/mocks/ @grafana/backend-platform
|
||||
/pkg/models/ @grafana/backend-platform
|
||||
/pkg/server/ @grafana/backend-platform
|
||||
/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
|
||||
/pkg/services/dashboards/ @grafana/backend-platform
|
||||
/pkg/services/dashboardsnapshots/ @grafana/backend-platform
|
||||
/pkg/services/dashboardversion/ @grafana/backend-platform
|
||||
/pkg/services/encryption/ @grafana/backend-platform
|
||||
/pkg/services/featuremgmt/ @grafana/backend-platform
|
||||
/pkg/services/folder/ @grafana/backend-platform
|
||||
/pkg/services/hooks/ @grafana/backend-platform
|
||||
/pkg/services/kmsproviders/ @grafana/backend-platform
|
||||
/pkg/services/licensing/ @grafana/backend-platform
|
||||
/pkg/services/navtree/ @grafana/backend-platform
|
||||
/pkg/services/notifications/ @grafana/backend-platform
|
||||
/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
|
||||
/pkg/services/query/ @grafana/backend-platform
|
||||
/pkg/services/queryhistory/ @grafana/backend-platform
|
||||
/pkg/services/quota/ @grafana/backend-platform
|
||||
/pkg/services/rendering/ @grafana/backend-platform
|
||||
/pkg/services/screenshot/ @grafana/backend-platform
|
||||
/pkg/services/search/ @grafana/backend-platform
|
||||
/pkg/services/searchusers/ @grafana/backend-platform
|
||||
/pkg/services/secrets/ @grafana/backend-platform
|
||||
/pkg/services/shorturls/ @grafana/backend-platform
|
||||
/pkg/services/sqlstore/ @grafana/backend-platform
|
||||
/pkg/services/star/ @grafana/backend-platform
|
||||
/pkg/services/stats/ @grafana/backend-platform
|
||||
/pkg/services/tag/ @grafana/backend-platform
|
||||
/pkg/services/team/ @grafana/grafana-authnz-team
|
||||
/pkg/services/temp_user/ @grafana/backend-platform
|
||||
/pkg/services/updatechecker/ @grafana/backend-platform
|
||||
/pkg/services/user/ @grafana/backend-platform
|
||||
/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
|
||||
/pkg/tsdb/opentsdb/ @grafana/backend-platform
|
||||
/pkg/tsdb/sqleng/ @grafana/backend-platform
|
||||
/pkg/util/ @grafana/backend-platform
|
||||
/pkg/web/ @grafana/backend-platform
|
||||
|
||||
/pkg/services/grpcserver/ @grafana/backend-platform
|
||||
/pkg/infra/kvstore/ @grafana/backend-platform
|
||||
/pkg/infra/fs/ @grafana/backend-platform
|
||||
/pkg/infra/x/ @grafana/backend-platform
|
||||
|
||||
|
||||
# devenv
|
||||
# Backend code, developers environment
|
||||
/devenv/docker/blocks/auth/ @grafana/grafana-authnz-team
|
||||
/devenv/docker/blocks/auth @grafana/grafana-authnz-team
|
||||
|
||||
# Logs code, developers environment
|
||||
/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
|
||||
/devenv/dashboards.yaml @grafana/dashboards-squad
|
||||
/devenv/datasources.yaml @grafana/backend-platform
|
||||
/devenv/datasources_docker.yaml @grafana/backend-platform
|
||||
/devenv/dev-dashboards-without-uid/ @grafana/dashboards-squad
|
||||
/devenv/dev-dashboards/ @grafana/dashboards-squad
|
||||
/devenv/docker/blocks/alert_webhook_listener/ @grafana/alerting-squad-backend
|
||||
/devenv/docker/blocks/clickhouse/ @grafana/partner-plugins
|
||||
/devenv/docker/blocks/collectd/ @grafana/observability-metrics
|
||||
/devenv/docker/blocks/grafana/ @grafana/grafana-as-code
|
||||
/devenv/docker/blocks/graphite/ @grafana/observability-metrics
|
||||
/devenv/docker/blocks/graphite09/ @grafana/observability-metrics
|
||||
/devenv/docker/blocks/graphite1/ @grafana/observability-metrics
|
||||
/devenv/docker/blocks/influxdb/ @grafana/observability-metrics
|
||||
/devenv/docker/blocks/influxdb1/ @grafana/observability-metrics
|
||||
/devenv/docker/blocks/jaeger/ @grafana/observability-traces-and-profiling
|
||||
/devenv/docker/blocks/maildev/ @grafana/alerting-squad-frontend
|
||||
/devenv/docker/blocks/memcached/ @grafana/backend-platform
|
||||
/devenv/docker/blocks/mssql/ @grafana/grafana-bi-squad
|
||||
/devenv/docker/blocks/mssql_arm64/ @grafana/grafana-bi-squad
|
||||
/devenv/docker/blocks/mssql_tests/ @grafana/grafana-bi-squad
|
||||
/devenv/docker/blocks/mssql_tls/ @grafana/grafana-bi-squad
|
||||
/devenv/docker/blocks/mysql/ @grafana/grafana-bi-squad
|
||||
/devenv/docker/blocks/mysql_exporter/ @grafana/grafana-bi-squad
|
||||
/devenv/docker/blocks/mysql_opendata/ @grafana/grafana-bi-squad
|
||||
/devenv/docker/blocks/mysql_tests/ @grafana/grafana-bi-squad
|
||||
/devenv/docker/blocks/opentsdb/ @grafana/observability-metrics
|
||||
/devenv/docker/blocks/phlare/ @grafana/observability-traces-and-profiling
|
||||
/devenv/docker/blocks/postgres/ @grafana/grafana-bi-squad
|
||||
/devenv/docker/blocks/postgres_tests/ @grafana/grafana-bi-squad
|
||||
/devenv/docker/blocks/prometheus/ @grafana/observability-metrics
|
||||
/devenv/docker/blocks/prometheus_random_data/ @grafana/observability-metrics
|
||||
/devenv/docker/blocks/redis/ @bergquist
|
||||
/devenv/docker/blocks/sensugo/ @grafana/backend-platform
|
||||
/devenv/docker/blocks/slow_proxy/ @bergquist
|
||||
/devenv/docker/blocks/smtp/ @bergquist
|
||||
/devenv/docker/blocks/tempo/ @grafana/observability-traces-and-profiling
|
||||
/devenv/docker/blocks/traefik/ @mckn
|
||||
/devenv/docker/blocks/zipkin/ @grafana/observability-traces-and-profiling
|
||||
/devenv/docker/buildcontainer/ @bergquist
|
||||
/devenv/docker/compose_header.yml @grafana/backend-platform
|
||||
/devenv/docker/debtest/ @bergquist
|
||||
/devenv/docker/ha-test-unified-alerting/ @grafana/alerting-squad-backend
|
||||
/devenv/docker/ha_test/ @grafana/backend-platform
|
||||
/devenv/docker/loadtest/ @grafana/backend-platform
|
||||
/devenv/docker/rpmtest/ @grafana/backend-platform
|
||||
/devenv/jsonnet/ @grafana/grafana-edge-squad
|
||||
/devenv/local-npm/ @grafana/frontend-ops
|
||||
/devenv/vscode/ @grafana/frontend-ops
|
||||
/devenv/setup.sh @grafana/backend-platform
|
||||
|
||||
# Emails
|
||||
/emails/ @grafana/alerting-squad-frontend
|
||||
|
||||
#Packaging
|
||||
/packaging/ @DanCech
|
||||
|
||||
|
||||
# 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
|
||||
/scripts/list-release-artifacts.sh @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
|
||||
|
||||
# OSS Plugin Partnerships backend code
|
||||
/pkg/tsdb/cloudwatch/ @grafana/aws-plugins
|
||||
/pkg/tsdb/azuremonitor/ @grafana/partner-plugins
|
||||
/pkg/tsdb/cloudmonitoring/ @grafana/partner-plugins
|
||||
# Cloud Datasources backend code
|
||||
/pkg/tsdb/cloudwatch @grafana/aws-plugins
|
||||
/pkg/tsdb/azuremonitor @grafana/cloud-provider-plugins
|
||||
/pkg/tsdb/cloudmonitoring @grafana/cloud-provider-plugins
|
||||
|
||||
# Observability backend code
|
||||
/pkg/tsdb/prometheus/ @grafana/observability-metrics
|
||||
/pkg/tsdb/influxdb/ @grafana/observability-metrics
|
||||
/pkg/tsdb/elasticsearch/ @grafana/observability-logs
|
||||
/pkg/tsdb/graphite/ @grafana/observability-metrics
|
||||
/pkg/tsdb/loki/ @grafana/observability-logs
|
||||
/pkg/tsdb/tempo/ @grafana/observability-traces-and-profiling
|
||||
/pkg/tsdb/phlare/ @grafana/observability-traces-and-profiling
|
||||
/pkg/tsdb/parca/ @grafana/observability-traces-and-profiling
|
||||
/pkg/tsdb/prometheus @grafana/observability-metrics
|
||||
/pkg/tsdb/influxdb @grafana/observability-metrics
|
||||
/pkg/tsdb/elasticsearch @grafana/observability-logs
|
||||
/pkg/tsdb/graphite @grafana/observability-metrics
|
||||
/pkg/tsdb/jaeger @grafana/observability-traces-and-profiling
|
||||
/pkg/tsdb/loki @grafana/observability-logs
|
||||
/pkg/tsdb/zipkin @grafana/observability-traces-and-profiling
|
||||
/pkg/tsdb/tempo @grafana/observability-traces-and-profiling
|
||||
|
||||
# BI backend code
|
||||
/pkg/tsdb/mysql/ @grafana/grafana-bi-squad
|
||||
/pkg/tsdb/postgres/ @grafana/grafana-bi-squad
|
||||
/pkg/tsdb/mssql/ @grafana/grafana-bi-squad
|
||||
/pkg/tsdb/mysql @grafana/grafana-bi-squad
|
||||
/pkg/tsdb/postgres @grafana/grafana-bi-squad
|
||||
/pkg/tsdb/mssql @grafana/grafana-bi-squad
|
||||
|
||||
# Database migrations
|
||||
/pkg/services/sqlstore/migrations/ @grafana/backend-platform @grafana/hosted-grafana-team
|
||||
/pkg/services/sqlstore/migrations @grafana/backend-platform @grafana/hosted-grafana-team
|
||||
*_mig.go @grafana/backend-platform @grafana/hosted-grafana-team
|
||||
|
||||
# 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
|
||||
# Grafana edge
|
||||
/pkg/services/live/ @grafana/grafana-edge-squad
|
||||
/pkg/services/searchV2/ @grafana/grafana-edge-squad
|
||||
/pkg/services/store/ @grafana/grafana-edge-squad
|
||||
/pkg/services/export/ @grafana/grafana-edge-squad
|
||||
/pkg/infra/filestore/ @grafana/grafana-edge-squad
|
||||
/pkg/tsdb/testdatasource/sims/ @grafana/grafana-edge-squad
|
||||
|
||||
# Alerting
|
||||
/pkg/services/ngalert/ @grafana/alerting-squad-backend
|
||||
/pkg/services/sqlstore/migrations/ualert/ @grafana/alerting-squad-backend
|
||||
/pkg/services/alerting/ @grafana/alerting-squad-backend
|
||||
/pkg/tests/api/alerting/ @grafana/alerting-squad-backend
|
||||
/public/app/features/alerting/ @grafana/alerting-squad-frontend
|
||||
/pkg/services/ngalert @grafana/alerting-squad-backend
|
||||
/pkg/services/sqlstore/migrations/ualert @grafana/alerting-squad-backend
|
||||
/pkg/services/alerting @grafana/alerting-squad-backend
|
||||
/pkg/tests/api/alerting @grafana/alerting-squad-backend
|
||||
/public/app/features/alerting @grafana/alerting-squad-frontend
|
||||
|
||||
# Library Services
|
||||
/pkg/services/libraryelements/ @grafana/user-essentials
|
||||
/pkg/services/librarypanels/ @grafana/user-essentials
|
||||
/pkg/services/libraryelements @grafana/user-essentials
|
||||
/pkg/services/librarypanels @grafana/user-essentials
|
||||
|
||||
# Plugins
|
||||
/pkg/api/pluginproxy/ @grafana/plugins-platform-backend
|
||||
/pkg/infra/httpclient/ @grafana/plugins-platform-backend
|
||||
/pkg/plugins/ @grafana/plugins-platform-backend
|
||||
/pkg/services/datasourceproxy/ @grafana/plugins-platform-backend
|
||||
/pkg/services/datasources/ @grafana/plugins-platform-backend
|
||||
/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/api/pluginproxy @grafana/plugins-platform-backend
|
||||
/pkg/plugins @grafana/plugins-platform-backend
|
||||
/pkg/services/datasourceproxy @grafana/plugins-platform-backend
|
||||
/pkg/services/datasources @grafana/plugins-platform-backend
|
||||
/pkg/plugins/pfs @grafana/plugins-platform-backend @grafana/grafana-as-code
|
||||
|
||||
# Dashboard previews / crawler (behind feature flag)
|
||||
/pkg/services/thumbs/ @grafana/multitenancy-squad
|
||||
/pkg/services/thumbs @grafana/grafana-edge-squad
|
||||
|
||||
# Backend code docs
|
||||
/contribute/backend/ @grafana/backend-platform
|
||||
/contribute/style-guides/backend.md @grafana/backend-platform
|
||||
/contribute/architecture/backend @grafana/backend-platform
|
||||
/contribute/engineering/backend @grafana/backend-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/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/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/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
|
||||
|
||||
|
||||
# root files, mostly frontend
|
||||
.browserslistrc @grafana/frontend-ops
|
||||
/e2e @grafana/user-essentials
|
||||
/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/DateTimePickers @grafana/grafana-bi-squad
|
||||
/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/grafana-bi-squad
|
||||
/packages/grafana-ui/src/components/uPlot @grafana/grafana-bi-squad
|
||||
/packages/grafana-ui/src/utils/storybook @grafana/plugins-platform-frontend
|
||||
/packages/jaeger-ui-components/ @grafana/observability-traces-and-profiling
|
||||
/plugins-bundled @grafana/plugins-platform-frontend
|
||||
# public folder
|
||||
/public/app/core/components/TimePicker @grafana/grafana-bi-squad
|
||||
/public/app/core/components/Layers @grafana/grafana-edge-squad
|
||||
/public/app/features/canvas/ @grafana/grafana-edge-squad
|
||||
/public/app/features/comments/ @grafana/grafana-edge-squad
|
||||
/public/app/features/dimensions/ @grafana/grafana-edge-squad
|
||||
/public/app/features/geo/ @grafana/grafana-edge-squad
|
||||
/public/app/features/storage/ @grafana/grafana-edge-squad
|
||||
/public/app/features/live/ @grafana/grafana-edge-squad
|
||||
/public/app/features/explore/ @grafana/observability-experience-squad
|
||||
/public/app/features/plugins @grafana/plugins-platform-frontend
|
||||
/public/app/features/transformers/spatial @grafana/grafana-edge-squad
|
||||
/public/app/plugins/panel/alertlist @grafana/alerting-squad-frontend
|
||||
/public/app/plugins/panel/barchart @grafana/grafana-bi-squad
|
||||
/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/piechart @grafana/grafana-bi-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/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
|
||||
/scripts/build/release-packages.sh @grafana/plugins-platform-frontend
|
||||
/scripts/circle-release-next-packages.sh @grafana/plugins-platform-frontend
|
||||
/scripts/ci-frontend-metrics.sh @grafana/user-essentials @grafana/plugins-platform-frontend @grafana/grafana-bi-squad
|
||||
/scripts/grunt @grafana/frontend-ops
|
||||
/scripts/webpack @grafana/frontend-ops
|
||||
/scripts/generate-a11y-report.sh @grafana/user-essentials
|
||||
package.json @grafana/frontend-ops
|
||||
tsconfig.json @grafana/frontend-ops
|
||||
/.editorconfig @grafana/frontend-ops
|
||||
/.eslintignore @grafana/frontend-ops
|
||||
/.gitattributes @grafana/frontend-ops
|
||||
/.gitignore @grafana/frontend-ops
|
||||
/.husky/pre-commit @grafana/frontend-ops
|
||||
/.nvmrc @grafana/frontend-ops
|
||||
/.prettierignore @grafana/frontend-ops
|
||||
/.yarn @grafana/frontend-ops
|
||||
/.yarnrc.yml @grafana/frontend-ops
|
||||
/yarn.lock @grafana/frontend-ops
|
||||
/.linguirc @grafana/user-essentials
|
||||
/babel.config.json @grafana/frontend-ops
|
||||
lerna.json @grafana/frontend-ops
|
||||
/.prettierrc.js @grafana/frontend-ops
|
||||
/.eslintrc @grafana/frontend-ops
|
||||
/.vim @zoltanbedi
|
||||
/jest.config.js @grafana/frontend-ops
|
||||
/latest.json @grafana/frontend-ops
|
||||
/metadata.md @grafana/plugins-platform
|
||||
/stylelint.config.js @grafana/frontend-ops
|
||||
/tools/ @grafana/frontend-ops
|
||||
|
||||
|
||||
# public folder
|
||||
/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/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/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/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/multitenancy-squad
|
||||
/public/app/features/manage-dashboards/ @grafana/dashboards-squad
|
||||
/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/user-essentials
|
||||
/public/app/features/runtime/ @ryantxu
|
||||
/public/app/features/query/ @grafana/dashboards-squad
|
||||
/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/user-essentials
|
||||
/public/app/features/serviceaccounts/ @grafana/grafana-authnz-team
|
||||
/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/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/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/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/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/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/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/user-essentials
|
||||
/public/gazetteer/ @ryantxu
|
||||
/public/img/ @grafana/user-essentials
|
||||
/public/lib/ @grafana/user-essentials
|
||||
/public/maps/ @ryantxu
|
||||
/public/robots.txt @grafana/frontend-ops
|
||||
/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
|
||||
|
||||
/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/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/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/user-essentials
|
||||
/scripts/helpers/ @grafana/grafana-delivery
|
||||
/scripts/import_many_dashboards.sh @torkelo
|
||||
/scripts/mixin-check.sh @bergquist
|
||||
/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/webpack/ @grafana/frontend-ops
|
||||
/scripts/generate-a11y-report.sh @grafana/user-essentials
|
||||
.babelrc @grafana/frontend-ops
|
||||
.prettierrc.js @grafana/frontend-ops
|
||||
.eslintrc @grafana/frontend-ops
|
||||
.pa11yci.conf.js @grafana/user-essentials
|
||||
.pa11yci-pr.conf.js @grafana/user-essentials
|
||||
.betterer.results @joshhunt
|
||||
.betterer.ts @joshhunt
|
||||
|
||||
# @grafana/ui component documentation
|
||||
*.mdx @grafana/plugins-platform-frontend
|
||||
|
||||
# Design system
|
||||
/public/img/icons/unicons/ @grafana/design-system
|
||||
*.mdx @jessover9000 @grafana/plugins-platform-frontend
|
||||
|
||||
# Core datasources
|
||||
/public/app/plugins/datasource/dashboard/ @grafana/dashboards-squad
|
||||
/public/app/plugins/datasource/cloudwatch/ @grafana/aws-plugins
|
||||
/public/app/plugins/datasource/elasticsearch/ @grafana/observability-logs
|
||||
/public/app/plugins/datasource/grafana/ @grafana/user-essentials
|
||||
/public/app/plugins/datasource/testdata/ @grafana/plugins-platform-frontend
|
||||
/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
|
||||
/public/app/plugins/datasource/loki/ @grafana/observability-logs
|
||||
/public/app/plugins/datasource/mixed/ @grafana/dashboards-squad
|
||||
/public/app/plugins/datasource/mssql/ @grafana/grafana-bi-squad
|
||||
/public/app/plugins/datasource/mysql/ @grafana/grafana-bi-squad
|
||||
/public/app/plugins/datasource/opentsdb/ @grafana/backend-platform
|
||||
/public/app/plugins/datasource/postgres/ @grafana/grafana-bi-squad
|
||||
/public/app/plugins/datasource/prometheus/ @grafana/observability-metrics
|
||||
/public/app/plugins/datasource/cloud-monitoring/ @grafana/partner-plugins
|
||||
/public/app/plugins/datasource/zipkin/ @grafana/observability-traces-and-profiling
|
||||
/public/app/plugins/datasource/tempo/ @grafana/observability-traces-and-profiling
|
||||
/public/app/plugins/datasource/phlare/ @grafana/observability-traces-and-profiling
|
||||
/public/app/plugins/datasource/parca/ @grafana/observability-traces-and-profiling
|
||||
/public/app/plugins/datasource/alertmanager/ @grafana/alerting-squad
|
||||
|
||||
# SSE - Server Side Expressions
|
||||
/pkg/expr/ @grafana/observability-metrics
|
||||
/public/app/plugins/datasource/cloudwatch @grafana/aws-plugins
|
||||
/public/app/plugins/datasource/elasticsearch @grafana/observability-logs
|
||||
/public/app/plugins/datasource/grafana-azure-monitor-datasource @grafana/cloud-provider-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
|
||||
/public/app/plugins/datasource/loki @grafana/observability-logs
|
||||
/public/app/plugins/datasource/mssql @grafana/grafana-bi-squad
|
||||
/public/app/plugins/datasource/mysql @grafana/grafana-bi-squad
|
||||
/public/app/plugins/datasource/opentsdb @grafana/backend-platform
|
||||
/public/app/plugins/datasource/postgres @grafana/grafana-bi-squad
|
||||
/public/app/plugins/datasource/prometheus @grafana/observability-metrics
|
||||
/public/app/plugins/datasource/cloud-monitoring @grafana/cloud-provider-plugins
|
||||
/public/app/plugins/datasource/zipkin @grafana/observability-traces-and-profiling
|
||||
/public/app/plugins/datasource/tempo @grafana/observability-traces-and-profiling
|
||||
/public/app/plugins/datasource/alertmanager @grafana/alerting-squad
|
||||
|
||||
# Cloud middleware
|
||||
/grafana-mixin/ @grafana/hosted-grafana-team
|
||||
|
||||
# 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/accesscontrol @grafana/grafana-authnz-team
|
||||
/pkg/services/auth @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/multildap/ @grafana/grafana-authnz-team
|
||||
/pkg/services/loginattempt/ @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
|
||||
|
||||
# Support bundles
|
||||
/public/app/features/support-bundles/ @grafana/grafana-authnz-team
|
||||
/pkg/services/supportbundles/ @grafana/grafana-authnz-team
|
||||
/pkg/services/datasources/permissions @grafana/grafana-authnz-team
|
||||
/pkg/services/datasources/permissions/accesscontrol.go @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/multildap @grafana/grafana-authnz-team
|
||||
/pkg/services/oauthtoken @grafana/grafana-authnz-team
|
||||
/pkg/services/teamguardian @grafana/grafana-authnz-team
|
||||
/pkg/services/serviceaccounts @grafana/grafana-authnz-team
|
||||
|
||||
# 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
|
||||
/kinds/ @grafana/grafana-as-code
|
||||
|
||||
# Kind system and code generation
|
||||
embed.go @grafana/grafana-as-code
|
||||
/pkg/kinds/ @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
|
||||
# Schema framework and code generation
|
||||
/pkg/codegen @grafana/grafana-as-code
|
||||
/pkg/framework/coremodel @grafana/grafana-as-code
|
||||
/public/app/plugins/*gen.go @grafana/grafana-as-code
|
||||
/cue.mod/ @grafana/grafana-as-code
|
||||
|
||||
# GitHub Workflows and Templates
|
||||
/.github/CODEOWNERS @tolzhabayev
|
||||
/.github/ISSUE_TEMPLATE/ @torkelo
|
||||
/.github/PULL_REQUEST_TEMPLATE.md @torkelo
|
||||
/.github/bot.md @torkelo
|
||||
/.github/commands.json @torkelo
|
||||
/.github/dependabot.yml @grafana/frontend-ops
|
||||
/.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/auto-milestone.yml @grafana/grafana-delivery
|
||||
/.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-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/metrics-collector.yml @torkelo
|
||||
/.github/workflows/milestone.yml @marefr
|
||||
/.github/workflows/ox-code-coverage.yml @grafana/explore-squad
|
||||
/.github/workflows/pr-checks.yml @marefr
|
||||
/.github/workflows/pr-codeql-analysis-go.yml @DanCech
|
||||
/.github/workflows/pr-codeql-analysis-javascript.yml @DanCech
|
||||
/.github/workflows/pr-codeql-analysis-python.yml @DanCech
|
||||
/.github/workflows/pr-commands-closed.yml @tolzhabayev
|
||||
/.github/workflows/pr-commands.yml @marefr
|
||||
/.github/workflows/pr-patch-check.yml @grafana/grafana-delivery
|
||||
/.github/workflows/sync-mirror.yml @grafana/grafana-delivery
|
||||
/.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/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/user-essentials
|
||||
/.github/workflows/update-changelog.yml @grafana/grafana-delivery
|
||||
/.github/workflows/snyk.yml @grafana/security-team
|
||||
|
||||
# Conf
|
||||
/conf/defaults.ini @torkelo
|
||||
/conf/sample.ini @torkelo
|
||||
/conf/ldap.toml @grafana/grafana-authnz-team
|
||||
/conf/ldap_multiple.toml @grafana/grafana-authnz-team
|
||||
/conf/provisioning/access-control/ @grafana/grafana-authnz-team
|
||||
/conf/provisioning/alerting/ @grafana/alerting-squad-backend
|
||||
/conf/provisioning/dashboards/ @grafana/dashboards-squad
|
||||
/conf/provisioning/datasources/ @grafana/plugins-platform-backend
|
||||
/conf/provisioning/notifiers/ @bergquist
|
||||
/conf/provisioning/plugins/ @grafana/plugins-platform-backend
|
||||
|
||||
16
.github/PULL_REQUEST_TEMPLATE.md
vendored
16
.github/PULL_REQUEST_TEMPLATE.md
vendored
@@ -14,23 +14,11 @@ Thank you for sending a pull request! Here are some tips:
|
||||
|
||||
6. Name your PR as "<FeatureArea>: Describe your change", e.g. Alerting: Prevent race condition. If it's a fix or feature relevant for the changelog describe the user impact in the title. The PR title is used to auto-generate the changelog for issues marked with the "add to changelog" label.
|
||||
|
||||
7. If your PR content should be added to the What's New document for the next major or minor release, add the **add to what's new** label to your PR. Note that you should add this label to the main PR that introduces the feature; do not add this label to smaller PRs for the feature.
|
||||
|
||||
-->
|
||||
|
||||
**What is this feature?**
|
||||
**What this PR does / why we need it**:
|
||||
|
||||
[Add a brief description of what the feature or update does.]
|
||||
|
||||
**Why do we need this feature?**
|
||||
|
||||
[Add a description of the problem the feature is trying to solve.]
|
||||
|
||||
**Who is this feature for?**
|
||||
|
||||
[Add information on what kind of user the feature is for.]
|
||||
|
||||
**Which issue(s) does this PR fix?**:
|
||||
**Which issue(s) this PR fixes**:
|
||||
|
||||
<!--
|
||||
|
||||
|
||||
24
.github/commands.json
vendored
24
.github/commands.json
vendored
@@ -155,22 +155,6 @@
|
||||
"url":"https://github.com/orgs/grafana/projects/221"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type":"label",
|
||||
"name":"datasource/Phlare",
|
||||
"action":"addToProject",
|
||||
"addToProject":{
|
||||
"url":"https://github.com/orgs/grafana/projects/221"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type":"label",
|
||||
"name":"datasource/Parca",
|
||||
"action":"addToProject",
|
||||
"addToProject":{
|
||||
"url":"https://github.com/orgs/grafana/projects/221"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type":"label",
|
||||
"name":"datasource/Elasticsearch",
|
||||
@@ -314,13 +298,5 @@
|
||||
"addToProject": {
|
||||
"url": "https://github.com/orgs/grafana/projects/86"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "label",
|
||||
"name": "area/internationalization",
|
||||
"action": "addToProject",
|
||||
"addToProject": {
|
||||
"url": "https://github.com/orgs/grafana/projects/78"
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
2
.github/pr-checks.json
vendored
2
.github/pr-checks.json
vendored
@@ -46,4 +46,4 @@
|
||||
},
|
||||
"targetUrl": "https://github.com/grafana/grafana/blob/main/contribute/merge-pull-request.md#include-in-changelog-and-release-notes"
|
||||
}
|
||||
]
|
||||
]
|
||||
3
.github/pr-commands.json
vendored
3
.github/pr-commands.json
vendored
@@ -66,7 +66,8 @@
|
||||
"scripts/build/**/*",
|
||||
"scripts/*.sh",
|
||||
"Makefile",
|
||||
"Dockerfile"
|
||||
"Dockerfile",
|
||||
"Dockerfile.ubuntu"
|
||||
],
|
||||
"action": "updateLabel",
|
||||
"addLabel": "type/build-packaging"
|
||||
|
||||
53
.github/renovate.json5
vendored
53
.github/renovate.json5
vendored
@@ -5,13 +5,22 @@
|
||||
"enabledManagers": ["npm"],
|
||||
"ignoreDeps": [
|
||||
"@types/systemjs",
|
||||
"@types/d3-force", // we should bump this once we move to esm modules
|
||||
"@types/d3-interpolate", // we should bump this once we move to esm modules
|
||||
"@types/d3-scale-chromatic", // we should bump this once we move to esm modules
|
||||
"@types/react-icons", // jaeger-ui-components is being refactored to use @grafana/ui icons instead
|
||||
"commander", // we are planning to remove this, so no need to update it
|
||||
"d3",
|
||||
"d3-force", // we should bump this once we move to esm modules
|
||||
"d3-interpolate", // we should bump this once we move to esm modules
|
||||
"d3-scale-chromatic", // we should bump this once we move to esm modules
|
||||
"execa", // we should bump this once we move to esm modules
|
||||
"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-icons", // jaeger-ui-components is being refactored to use @grafana/ui icons instead
|
||||
"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",
|
||||
@@ -19,12 +28,6 @@
|
||||
"ts-loader", // we should remove ts-loader and use babel-loader instead
|
||||
"ora", // we should bump this once we move to esm modules
|
||||
|
||||
// Sentry deprecated in favor of Grafana Faro for frontend logging.
|
||||
// Major effort required to upgrade to latest Sentry, not worthwhile
|
||||
"@sentry/browser",
|
||||
"@sentry/types",
|
||||
"@sentry/utils",
|
||||
|
||||
// dep updates blocked by React 18
|
||||
"@testing-library/react",
|
||||
"@types/react",
|
||||
@@ -34,7 +37,6 @@
|
||||
"react-dom",
|
||||
"react-test-renderer"
|
||||
],
|
||||
"includePaths": ["package.json", "packages/**"],
|
||||
"ignorePaths": ["packages/grafana-toolkit/package.json", "emails/**", "plugins-bundled/**", "**/mocks/**"],
|
||||
"labels": ["area/frontend", "dependencies", "no-backport", "no-changelog"],
|
||||
"packageRules": [
|
||||
@@ -48,49 +50,12 @@
|
||||
"matchPackagePatterns": ["@storybook"],
|
||||
"extends": ["schedule:monthly"],
|
||||
"groupName": "Storybook updates"
|
||||
},
|
||||
{
|
||||
"groupName": "React Aria",
|
||||
"matchPackagePrefixes": [
|
||||
"@react-aria/",
|
||||
"@react-stately/"
|
||||
]
|
||||
},
|
||||
{
|
||||
"groupName": "Moveable",
|
||||
"matchPackageNames": [
|
||||
"moveable",
|
||||
"react-moveable"
|
||||
]
|
||||
},
|
||||
{
|
||||
"groupName": "Slate",
|
||||
"matchPackageNames": [
|
||||
"@types/slate",
|
||||
"@types/slate-react",
|
||||
"slate",
|
||||
"slate-react"
|
||||
]
|
||||
},
|
||||
{
|
||||
"groupName": "d3",
|
||||
"matchPackagePrefixes": [
|
||||
"d3",
|
||||
"@types/d3"
|
||||
]
|
||||
},
|
||||
{
|
||||
"groupName": "visx",
|
||||
"matchPackagePrefixes": [
|
||||
"@visx/"
|
||||
]
|
||||
}
|
||||
],
|
||||
"pin": {
|
||||
"enabled": false
|
||||
},
|
||||
"prConcurrentLimit": 10,
|
||||
"rebaseWhen": "conflicted",
|
||||
"reviewers": ["team:grafana/frontend-ops"],
|
||||
"separateMajorMinor": false,
|
||||
"vulnerabilityAlerts": {
|
||||
|
||||
22
.github/workflows/auto-milestone.yml
vendored
22
.github/workflows/auto-milestone.yml
vendored
@@ -1,22 +0,0 @@
|
||||
name: Auto-milestone
|
||||
on:
|
||||
pull_request:
|
||||
types:
|
||||
- closed
|
||||
|
||||
jobs:
|
||||
main:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: "Generate token"
|
||||
id: generate_token
|
||||
uses: tibdex/github-app-token@b62528385c34dbc9f38e5f4225ac829252d1ea92
|
||||
with:
|
||||
app_id: ${{ secrets.GRAFANA_DELIVERY_BOT_APP_ID }}
|
||||
private_key: ${{ secrets.GRAFANA_DELIVERY_BOT_APP_PEM }}
|
||||
|
||||
- name: Run auto-milestone
|
||||
uses: grafana/grafana-github-actions-go/auto-milestone@main
|
||||
with:
|
||||
pr: ${{ github.event.pull_request.number }}
|
||||
token: ${{ steps.generate_token.outputs.token }}
|
||||
8
.github/workflows/backport.yml
vendored
8
.github/workflows/backport.yml
vendored
@@ -17,16 +17,10 @@ jobs:
|
||||
ref: main
|
||||
- name: Install Actions
|
||||
run: npm install --production --prefix ./actions
|
||||
- name: "Generate token"
|
||||
id: generate_token
|
||||
uses: tibdex/github-app-token@b62528385c34dbc9f38e5f4225ac829252d1ea92
|
||||
with:
|
||||
app_id: ${{ secrets.GRAFANA_DELIVERY_BOT_APP_ID }}
|
||||
private_key: ${{ secrets.GRAFANA_DELIVERY_BOT_APP_PEM }}
|
||||
- name: Run backport
|
||||
uses: ./actions/backport
|
||||
with:
|
||||
metricsWriteAPIKey: ${{secrets.GRAFANA_MISC_STATS_API_KEY}}
|
||||
token: ${{ steps.generate_token.outputs.token }}
|
||||
token: ${{secrets.GH_BOT_ACCESS_TOKEN}}
|
||||
labelsToAdd: "backport,no-changelog"
|
||||
title: "[{{base}}] {{originalTitle}}"
|
||||
|
||||
45
.github/workflows/bump-version.yml
vendored
45
.github/workflows/bump-version.yml
vendored
@@ -5,19 +5,30 @@ on:
|
||||
version:
|
||||
description: 'Needs to match, exactly, the name of a milestone. The version to be released please respect: major.minor.patch or major.minor.patch-beta<number> format. example: 7.4.3 or 7.4.3-beta1'
|
||||
required: true
|
||||
workflow_call:
|
||||
inputs:
|
||||
version_call:
|
||||
description: 'Needs to match, exactly, the name of a milestone. The version to be released please respect: major.minor.patch or major.minor.patch-beta<number> format. example: 7.4.3 or 7.4.3-beta1'
|
||||
required: true
|
||||
type: string
|
||||
secrets:
|
||||
token:
|
||||
required: true
|
||||
metricsWriteAPIKey:
|
||||
required: true
|
||||
env:
|
||||
YARN_ENABLE_IMMUTABLE_INSTALLS: false
|
||||
YARN_ENABLE_IMMUTABLE_INSTALLS: false
|
||||
jobs:
|
||||
main:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
# This is a basic workflow to help you get started with Actions
|
||||
# This is a basic workflow to help you get started with Actions
|
||||
- uses: actions-ecosystem/action-regex-match@v2.0.2
|
||||
if: ${{ github.event.inputs.version != '' }}
|
||||
id: regex-match
|
||||
with:
|
||||
text: ${{ github.event.inputs.version }}
|
||||
regex: '^(\d+.\d+).\d+(?:-beta\d+)?$'
|
||||
regex: '^(\d+.\d+).\d+(?:-beta.\d+)?$'
|
||||
- uses: actions-ecosystem/action-regex-match@v2.0.2
|
||||
if: ${{ inputs.version_call != '' }}
|
||||
id: regex-match-version-call
|
||||
@@ -29,7 +40,7 @@ jobs:
|
||||
run: |
|
||||
echo "The input version format is not correct, please respect:\
|
||||
major.minor.patch or major.minor.patch-beta.number format. \
|
||||
example: 7.4.3 or 7.4.3-beta1"
|
||||
example: 7.4.3 or 7.4.3-beta.1"
|
||||
exit 1
|
||||
- name: Validate input version call
|
||||
if: ${{ inputs.version_call != '' && steps.regex-match-version-call.outputs.match == '' }}
|
||||
@@ -44,10 +55,10 @@ jobs:
|
||||
- name: Set intermedia variables
|
||||
id: intermedia
|
||||
run: |
|
||||
echo "short_ref=${GITHUB_REF#refs/*/}" >> $GITHUB_OUTPUT
|
||||
echo "check_passed=false" >> $GITHUB_OUTPUT
|
||||
echo "branch_name=v${{steps.regex-match.outputs.group1}}" >> $GITHUB_OUTPUT
|
||||
echo "branch_exist=$(git ls-remote --heads https://github.com/grafana/grafana.git v${{ steps.regex-match.outputs.group1 }}.x | wc -l)" >> $GITHUB_OUTPUT
|
||||
echo "::set-output name=short_ref::${GITHUB_REF#refs/*/}"
|
||||
echo "::set-output name=check_passed::false"
|
||||
echo "::set-output name=branch_name::v${{steps.regex-match.outputs.group1}}"
|
||||
echo "::set-output name=branch_exist::$(git ls-remote --heads https://github.com/grafana/grafana.git v${{ steps.regex-match.outputs.group1 }}.x | wc -l)"
|
||||
|
||||
- name: Check input version is aligned with branch(main)
|
||||
if: ${{ github.event.inputs.version != '' && steps.intermedia.outputs.branch_exist == '0' && !contains(steps.intermedia.outputs.short_ref, 'main') }}
|
||||
@@ -63,19 +74,21 @@ jobs:
|
||||
repository: "grafana/grafana-github-actions"
|
||||
path: ./actions
|
||||
ref: main
|
||||
- uses: actions/setup-node@v3.5.1
|
||||
- uses: actions/setup-node@v3.4.0
|
||||
with:
|
||||
node-version: '16'
|
||||
- name: Install Actions
|
||||
run: npm install --production --prefix ./actions
|
||||
- name: "Generate token"
|
||||
id: generate_token
|
||||
uses: tibdex/github-app-token@b62528385c34dbc9f38e5f4225ac829252d1ea92
|
||||
with:
|
||||
app_id: ${{ secrets.GRAFANA_DELIVERY_BOT_APP_ID }}
|
||||
private_key: ${{ secrets.GRAFANA_DELIVERY_BOT_APP_PEM }}
|
||||
- name: Run bump version (manually invoked)
|
||||
if: ${{ github.event.inputs.version != '' }}
|
||||
uses: ./actions/bump-version
|
||||
with:
|
||||
token: ${{ steps.generate_token.outputs.token }}
|
||||
token: ${{ secrets.GH_BOT_ACCESS_TOKEN }}
|
||||
metricsWriteAPIKey: ${{ secrets.GRAFANA_MISC_STATS_API_KEY }}
|
||||
- name: Run bump version (workflow invoked)
|
||||
if: ${{ inputs.version_call != '' }}
|
||||
uses: ./actions/bump-version
|
||||
with:
|
||||
version_call: ${{ inputs.version_call }}
|
||||
token: ${{ secrets.token }}
|
||||
metricsWriteAPIKey: ${{ secrets.metricsWriteAPIKey }}
|
||||
|
||||
14
.github/workflows/close-milestone.yml
vendored
14
.github/workflows/close-milestone.yml
vendored
@@ -11,7 +11,9 @@ on:
|
||||
description: Needs to match, exactly, the name of a milestone
|
||||
required: true
|
||||
type: string
|
||||
|
||||
secrets:
|
||||
token:
|
||||
required: true
|
||||
jobs:
|
||||
main:
|
||||
runs-on: ubuntu-latest
|
||||
@@ -24,20 +26,14 @@ jobs:
|
||||
ref: main
|
||||
- name: Install Actions
|
||||
run: npm install --production --prefix ./actions
|
||||
- name: "Generate token"
|
||||
id: generate_token
|
||||
uses: tibdex/github-app-token@b62528385c34dbc9f38e5f4225ac829252d1ea92
|
||||
with:
|
||||
app_id: ${{ secrets.GRAFANA_DELIVERY_BOT_APP_ID }}
|
||||
private_key: ${{ secrets.GRAFANA_DELIVERY_BOT_APP_PEM }}
|
||||
- name: Close milestone (manually invoked)
|
||||
if: ${{ github.event.inputs.version != '' }}
|
||||
uses: ./actions/close-milestone
|
||||
with:
|
||||
token: ${{ steps.generate_token.outputs.token }}
|
||||
token: ${{ secrets.GH_BOT_ACCESS_TOKEN }}
|
||||
- name: Close milestone (workflow invoked)
|
||||
if: ${{ inputs.version_call != '' }}
|
||||
uses: ./actions/close-milestone
|
||||
with:
|
||||
version_call: ${{ inputs.version_call }}
|
||||
token: ${{ steps.generate_token.outputs.token }}
|
||||
token: ${{ secrets.token }}
|
||||
|
||||
@@ -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.12
|
||||
with:
|
||||
frontend-path-regexp: public\/app\/plugins\/datasource\/(grafana-azure-monitor-datasource|cloud-monitoring|cloudwatch)
|
||||
backend-path-regexp: pkg\/tsdb\/(azuremonitor|cloudmonitoring|cloudwatch)
|
||||
|
||||
38
.github/workflows/codeowners-validator.yml
vendored
38
.github/workflows/codeowners-validator.yml
vendored
@@ -1,38 +0,0 @@
|
||||
name: "Codeowners Validator"
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches: [ main ]
|
||||
|
||||
jobs:
|
||||
codeowners-validator:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
# Checks-out your repository, which is validated in the next step
|
||||
- uses: actions/checkout@v2
|
||||
- name: GitHub CODEOWNERS Validator
|
||||
uses: mszostok/codeowners-validator@v0.7.4
|
||||
# input parameters
|
||||
with:
|
||||
# ==== GitHub Auth ====
|
||||
|
||||
# "The list of checks that will be executed. By default, all checks are executed. Possible values: files,owners,duppatterns,syntax"
|
||||
checks: "files,duppatterns,syntax"
|
||||
|
||||
# "The comma-separated list of experimental checks that should be executed. By default, all experimental checks are turned off. Possible values: notowned,avoid-shadowing"
|
||||
experimental_checks: "notowned,avoid-shadowing"
|
||||
|
||||
# The repository path in which CODEOWNERS file should be validated."
|
||||
repository_path: "."
|
||||
|
||||
# Defines the level on which the application should treat check issues as failures. Defaults to warning, which treats both errors and warnings as failures, and exits with error code 3. Possible values are error and warning. Default: warning"
|
||||
check_failure_level: "error"
|
||||
|
||||
# The comma-separated list of patterns that should be ignored by not-owned-checker. For example, you can specify * and as a result, the * pattern from the CODEOWNERS file will be ignored and files owned by this pattern will be reported as unowned unless a later specific pattern will match that path. It's useful because often we have default owners entry at the begging of the CODOEWNERS file, e.g. * @global-owner1 @global-owner2"
|
||||
not_owned_checker_skip_patterns: ""
|
||||
|
||||
# Specifies whether CODEOWNERS may have unowned files. For example, `/infra/oncall-rotator/oncall-config.yml` doesn't have owner and this is not reported.
|
||||
owner_checker_allow_unowned_patterns: "false"
|
||||
|
||||
# Specifies whether only teams are allowed as owners of files.
|
||||
owner_checker_owners_must_be_teams: "false"
|
||||
@@ -1,34 +0,0 @@
|
||||
# Workflow for skipping the Levitate detection
|
||||
# (This is needed because workflows that are skipped due to path filtering will show up as pending in Github.
|
||||
# As this has the same name as the one in detect-breaking-changes-build.yml it will take over in these cases and succeed quickly.)
|
||||
|
||||
name: Levitate / Detect breaking changes
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
paths-ignore:
|
||||
- "packages/**"
|
||||
branches:
|
||||
- 'main'
|
||||
|
||||
jobs:
|
||||
detect:
|
||||
name: Detect breaking changes
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Skipping
|
||||
run: echo "No modifications in the public API (packages/), skipping."
|
||||
|
||||
# Build and persist output as a JSON (we need to tell the report workflow that the check has been skipped)
|
||||
- name: Persisting the check output
|
||||
run: |
|
||||
mkdir -p ./levitate
|
||||
echo "{ \"shouldSkip\": true }" > ./levitate/result.json
|
||||
|
||||
# Upload artifact (so it can be used in the more privileged "report" workflow)
|
||||
- name: Upload check output as artifact
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: levitate
|
||||
path: levitate/
|
||||
@@ -1,14 +1,6 @@
|
||||
# Only runs if anything under the packages/ directory changes.
|
||||
# (Otherwise detect-breaking-changes-build-skip.yml takes over)
|
||||
|
||||
name: Levitate / Detect breaking changes
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
paths:
|
||||
- 'packages/**'
|
||||
branches:
|
||||
- 'main'
|
||||
on: pull_request
|
||||
|
||||
jobs:
|
||||
buildPR:
|
||||
@@ -22,16 +14,16 @@ jobs:
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
path: './pr'
|
||||
- uses: actions/setup-node@v3.5.1
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 16.16.0
|
||||
|
||||
- name: Get yarn cache directory path
|
||||
id: yarn-cache-dir-path
|
||||
run: echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT
|
||||
run: echo "::set-output name=dir::$(yarn config get cacheFolder)"
|
||||
|
||||
- name: Restore yarn cache
|
||||
uses: actions/cache@v3.0.11
|
||||
uses: actions/cache@v2
|
||||
id: yarn-cache
|
||||
with:
|
||||
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
|
||||
@@ -70,16 +62,16 @@ jobs:
|
||||
path: './base'
|
||||
ref: ${{ github.event.pull_request.base.ref }}
|
||||
|
||||
- uses: actions/setup-node@v3.5.1
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 16.16.0
|
||||
|
||||
- name: Get yarn cache directory path
|
||||
id: yarn-cache-dir-path
|
||||
run: echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT
|
||||
run: echo "::set-output name=dir::$(yarn config get cacheFolder)"
|
||||
|
||||
- name: Restore yarn cache
|
||||
uses: actions/cache@v3.0.11
|
||||
uses: actions/cache@v2
|
||||
id: yarn-cache
|
||||
with:
|
||||
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
|
||||
@@ -110,7 +102,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
needs: ['buildPR', 'buildBase']
|
||||
env:
|
||||
GITHUB_STEP_NUMBER: 8
|
||||
GITHUB_STEP_NUMBER: 7
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
@@ -136,9 +128,8 @@ jobs:
|
||||
uses: actions/github-script@v6
|
||||
with:
|
||||
script: |
|
||||
const name = 'Detect breaking changes';
|
||||
const script = require('./.github/workflows/scripts/pr-get-job-link.js')
|
||||
await script({name, github, context, core})
|
||||
await script({github, context, core})
|
||||
|
||||
- name: Detect breaking changes
|
||||
id: breaking-changes
|
||||
|
||||
@@ -10,13 +10,12 @@ jobs:
|
||||
name: Report
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
ARTIFACT_NAME: 'levitate' # The name of the artifact that we would like to download
|
||||
ARTIFACT_FOLDER: '${{ github.workspace }}/tmp' # The name of the folder where we will download the artifact to
|
||||
ARTIFACT_FOLDER: '${{ github.workspace }}/tmp'
|
||||
ARTIFACT_NAME: 'levitate'
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
# Download artifact (as a .zip archive)
|
||||
|
||||
- name: 'Download artifact'
|
||||
uses: actions/github-script@v6
|
||||
env:
|
||||
@@ -50,12 +49,9 @@ jobs:
|
||||
fs.mkdirSync(artifactFolder, { recursive: true });
|
||||
fs.writeFileSync(`${ artifactFolder }/${ artifactName }.zip`, Buffer.from(download.data));
|
||||
|
||||
# Unzip artifact
|
||||
- name: Unzip artifact
|
||||
run: unzip "${ARTIFACT_FOLDER}/${ARTIFACT_NAME}.zip" -d "${ARTIFACT_FOLDER}"
|
||||
|
||||
# Parse the artifact and register fields as step output variables
|
||||
# (All fields in the JSON will be available as ${{ steps.levitate-run.outputs.<field-name> }}
|
||||
- name: Parsing levitate result
|
||||
uses: actions/github-script@v6
|
||||
id: levitate-run
|
||||
@@ -65,15 +61,8 @@ jobs:
|
||||
const script = require('./.github/workflows/scripts/json-file-to-job-output.js');
|
||||
await script({ core, filePath });
|
||||
|
||||
# Skip - print a message if the "Detect" workflow was skipped
|
||||
- name: Check if the workflow should be skipped
|
||||
if: steps.levitate-run.outputs.shouldSkip == 'true'
|
||||
run: echo "Skipping."
|
||||
|
||||
# Check if label exists
|
||||
- name: Check if "levitate breaking change" label exists
|
||||
id: does-label-exist
|
||||
if: steps.levitate-run.outputs.shouldSkip != 'true'
|
||||
uses: actions/github-script@v6
|
||||
env:
|
||||
PR_NUMBER: ${{ github.event.workflow_run.pull_requests[0].number }}
|
||||
@@ -89,9 +78,8 @@ jobs:
|
||||
|
||||
return doesExist ? 1 : 0;
|
||||
|
||||
# Comment on the PR
|
||||
- name: Comment on PR
|
||||
if: steps.levitate-run.outputs.exit_code == 1 && steps.levitate-run.outputs.shouldSkip != 'true'
|
||||
if: ${{ steps.levitate-run.outputs.exit_code == 1 }}
|
||||
uses: marocchino/sticky-pull-request-comment@v2
|
||||
with:
|
||||
number: ${{ steps.levitate-run.outputs.pr_number }}
|
||||
@@ -105,9 +93,8 @@ jobs:
|
||||
[Console output](${{ steps.levitate-run.outputs.job_link }})
|
||||
[Read our guideline](https://github.com/grafana/grafana/blob/main/contribute/breaking-changes-guide.md)
|
||||
|
||||
# Remove comment from the PR (no more breaking changes)
|
||||
- name: Remove comment from PR
|
||||
if: steps.levitate-run.outputs.exit_code == 0 && steps.levitate-run.outputs.shouldSkip != 'true'
|
||||
- name: Remove comment on PR
|
||||
if: ${{ steps.levitate-run.outputs.exit_code == 0 }}
|
||||
uses: marocchino/sticky-pull-request-comment@v2
|
||||
with:
|
||||
number: ${{ steps.levitate-run.outputs.pr_number }}
|
||||
@@ -116,8 +103,8 @@ jobs:
|
||||
# Posts a notification to Slack if a PR has a breaking change and it did not have a breaking change before
|
||||
- name: Post to Slack
|
||||
id: slack
|
||||
if: steps.levitate-run.outputs.exit_code == 1 && steps.does-label-exist.outputs.result == 0 && steps.levitate-run.outputs.shouldSkip != 'true'
|
||||
uses: slackapi/slack-github-action@v1.23.0
|
||||
if: ${{ steps.levitate-run.outputs.exit_code == 1 && steps.does-label-exist.outputs.result == 0 }}
|
||||
uses: slackapi/slack-github-action@v1.19.0
|
||||
with:
|
||||
payload: |
|
||||
{
|
||||
@@ -130,9 +117,8 @@ jobs:
|
||||
env:
|
||||
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_LEVITATE_WEBHOOK_URL }}
|
||||
|
||||
# Add the label
|
||||
- name: Add "levitate breaking change" label
|
||||
if: steps.levitate-run.outputs.exit_code == 1 && steps.does-label-exist.outputs.result == 0 && steps.levitate-run.outputs.shouldSkip != 'true'
|
||||
if: ${{ steps.levitate-run.outputs.exit_code == 1 && steps.does-label-exist.outputs.result == 0 }}
|
||||
uses: actions/github-script@v6
|
||||
env:
|
||||
PR_NUMBER: ${{ steps.levitate-run.outputs.pr_number }}
|
||||
@@ -146,9 +132,8 @@ jobs:
|
||||
labels: ['levitate breaking change']
|
||||
})
|
||||
|
||||
# Remove label (no more breaking changes)
|
||||
- name: Remove "levitate breaking change" label
|
||||
if: steps.levitate-run.outputs.exit_code == 0 && steps.does-label-exist.outputs.result == 1 && steps.levitate-run.outputs.shouldSkip != 'true'
|
||||
if: ${{ steps.levitate-run.outputs.exit_code == 0 && steps.does-label-exist.outputs.result == 1 }}
|
||||
uses: actions/github-script@v6
|
||||
env:
|
||||
PR_NUMBER: ${{ steps.levitate-run.outputs.pr_number }}
|
||||
@@ -162,11 +147,10 @@ jobs:
|
||||
name: 'levitate breaking change'
|
||||
})
|
||||
|
||||
# Add reviewers
|
||||
# This is very weird, the actual request goes through (comes back with a 201), but does not assign the team.
|
||||
# Related issue: https://github.com/renovatebot/renovate/issues/1908
|
||||
- name: Add "grafana/plugins-platform-frontend" as a reviewer
|
||||
if: steps.levitate-run.outputs.exit_code && steps.levitate-run.outputs.shouldSkip != 'true'
|
||||
if: ${{ steps.levitate-run.outputs.exit_code == 1 }}
|
||||
uses: actions/github-script@v6
|
||||
env:
|
||||
PR_NUMBER: ${{ steps.levitate-run.outputs.pr_number }}
|
||||
@@ -181,9 +165,8 @@ jobs:
|
||||
team_reviewers: ['grafana/plugins-platform-frontend']
|
||||
});
|
||||
|
||||
# Remove reviewers (no more breaking changes)
|
||||
- name: Remove "grafana/plugins-platform-frontend" from the list of reviewers
|
||||
if: steps.levitate-run.outputs.exit_code == 0 && steps.levitate-run.outputs.shouldSkip != 'true'
|
||||
if: ${{ steps.levitate-run.outputs.exit_code == 0 }}
|
||||
uses: actions/github-script@v6
|
||||
env:
|
||||
PR_NUMBER: ${{ steps.levitate-run.outputs.pr_number }}
|
||||
|
||||
4
.github/workflows/doc-validator.yml
vendored
4
.github/workflows/doc-validator.yml
vendored
@@ -7,10 +7,10 @@ jobs:
|
||||
doc-validator:
|
||||
runs-on: "ubuntu-latest"
|
||||
container:
|
||||
image: "grafana/doc-validator:v1.9.0"
|
||||
image: "grafana/doc-validator:latest"
|
||||
steps:
|
||||
- name: "Checkout code"
|
||||
uses: "actions/checkout@v3"
|
||||
- name: "Run doc-validator tool"
|
||||
# Ensure that the CI always passes until all errors are resolved.
|
||||
run: "doc-validator --skip-image-validation ./docs/sources /docs/grafana/latest || true"
|
||||
run: "doc-validator ./docs/sources || true"
|
||||
|
||||
2
.github/workflows/enterprise-pr-check.yml
vendored
2
.github/workflows/enterprise-pr-check.yml
vendored
@@ -23,4 +23,4 @@ jobs:
|
||||
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 }}"}'
|
||||
'{"source_branch": "${{ github.head_ref }}", "target_branch": "${{ github.base_ref }}", "pr_number": "${{ github.event.number }}"}'
|
||||
|
||||
@@ -1,134 +0,0 @@
|
||||
name: When epic issues changed in Platform UX squad projects, check if epic is part of specified child projects and update on Platform UX parent project
|
||||
|
||||
on:
|
||||
issues:
|
||||
types: [opened, closed, edited, reopened, assigned, unassigned, labeled, unlabeled]
|
||||
labels:
|
||||
- 'type/epic'
|
||||
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GH_BOT_PROJECTS_ACCESS_TOKEN }}
|
||||
ORGANIZATION: ${{ github.repository_owner }}
|
||||
REPO: ${{ github.event.repository.name }}
|
||||
PARENT_PROJECT: 304
|
||||
CHILD_PROJECT_1: 78
|
||||
CHILD_PROJECT_2: 111
|
||||
CHILD_PROJECT_3: 202
|
||||
|
||||
concurrency:
|
||||
group: issue-add-to-parent-project-${{ github.event.number }}
|
||||
jobs:
|
||||
main:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Check if issue is in child or parent projects
|
||||
run: |
|
||||
gh api graphql -f query='
|
||||
query($org: String!, $repo: String!) {
|
||||
repository(name: $repo, owner: $org) {
|
||||
issue (number: ${{ github.event.issue.number }}) {
|
||||
projectItems(first:20) {
|
||||
nodes {
|
||||
id,
|
||||
project {
|
||||
number,
|
||||
title
|
||||
},
|
||||
fieldValueByName(name:"Status") {
|
||||
... on ProjectV2ItemFieldSingleSelectValue {
|
||||
optionId
|
||||
name
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}' -f org=$ORGANIZATION -f repo=$REPO > projects_data.json
|
||||
|
||||
echo 'IN_PARENT_PROJ='$(jq '.data.repository.issue.projectItems.nodes[] | select(.project.number==${{ env.PARENT_PROJECT }}) | .project != null' projects_data.json) >> $GITHUB_ENV
|
||||
echo 'PARENT_PROJ_STATUS_ID='$(jq '.data.repository.issue.projectItems.nodes[] | select(.project.number==${{ env.PARENT_PROJECT }}) | select(.fieldValueByName != null) | .fieldValueByName.optionId' projects_data.json) >> $GITHUB_ENV
|
||||
echo 'ITEM_ID='$(jq '.data.repository.issue.projectItems.nodes[] | select(.project.number==${{ env.PARENT_PROJECT }}) | .id' projects_data.json) >> $GITHUB_ENV
|
||||
echo 'IN_CHILD_PROJ='$(jq 'first(.data.repository.issue.projectItems.nodes[] | select(.project.number==${{ env.CHILD_PROJECT_1 }} or .project.number==${{ env.CHILD_PROJECT_2 }} or .project.number==${{ env.CHILD_PROJECT_3 }}) | .project != null)' projects_data.json) >> $GITHUB_ENV
|
||||
echo 'CHILD_PROJ_STATUS='$(jq -r '.data.repository.issue.projectItems.nodes[] | select(.project.number==${{ env.CHILD_PROJECT_1 }} or .project.number==${{ env.CHILD_PROJECT_2 }} or .project.number==${{ env.CHILD_PROJECT_3 }}) | select(.fieldValueByName != null) | .fieldValueByName.name' projects_data.json) >> $GITHUB_ENV
|
||||
- name: Get parent project project data
|
||||
if: env.IN_CHILD_PROJ
|
||||
run: |
|
||||
gh api graphql -f query='
|
||||
query($org: String!, $number: Int!) {
|
||||
organization(login: $org){
|
||||
projectV2(number: $number) {
|
||||
id
|
||||
fields(first:20) {
|
||||
nodes {
|
||||
... on ProjectV2Field {
|
||||
id
|
||||
name
|
||||
}
|
||||
... on ProjectV2SingleSelectField {
|
||||
id
|
||||
name
|
||||
options {
|
||||
id
|
||||
name
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}' -f org=$ORGANIZATION -F number=$PARENT_PROJECT > project_data.json
|
||||
|
||||
echo 'PROJECT_ID='$(jq '.data.organization.projectV2.id' project_data.json) >> $GITHUB_ENV
|
||||
echo 'STATUS_FIELD_ID='$(jq '.data.organization.projectV2.fields.nodes[] | select(.name== "Status") | .id' project_data.json) >> $GITHUB_ENV
|
||||
echo 'TODO_OPTION_ID='$(jq '.data.organization.projectV2.fields.nodes[] | select(.name== "Status") | .options[] | select(.name=="Todo") |.id' project_data.json) >> $GITHUB_ENV
|
||||
echo 'PROGRESS_OPTION_ID='$(jq '.data.organization.projectV2.fields.nodes[] | select(.name== "Status") | .options[] | select(.name=="In Progress") |.id' project_data.json) >> $GITHUB_ENV
|
||||
echo 'DONE_OPTION_ID='$(jq '.data.organization.projectV2.fields.nodes[] | select(.name== "Status") | .options[] | select(.name=="Done") |.id' project_data.json) >> $GITHUB_ENV
|
||||
- name: Add issue to parent project
|
||||
if: env.IN_CHILD_PROJ && !env.IN_PARENT_PROJ
|
||||
run: |
|
||||
item_id="$( gh api graphql -f query='
|
||||
mutation($project:ID!, $issue:ID!) {
|
||||
addProjectV2ItemById(input: {projectId: $project, contentId: $issue}) {
|
||||
item {
|
||||
id
|
||||
}
|
||||
}
|
||||
}' -f project=$PROJECT_ID -f issue=${{ github.event.issue.node_id }} --jq '.data.addProjectV2ItemById.item.id')"
|
||||
|
||||
echo 'ITEM_ID='$item_id >> $GITHUB_ENV
|
||||
- name: Set parent project status Done
|
||||
if: contains(env.CHILD_PROJ_STATUS, 'Done')
|
||||
run: |
|
||||
echo 'OPTION_ID='$DONE_OPTION_ID >> $GITHUB_ENV
|
||||
- name: Set parent project status In Progress
|
||||
if: contains(env.CHILD_PROJ_STATUS, 'In ') || contains(env.CHILD_PROJ_STATUS, 'Blocked')
|
||||
run: |
|
||||
echo 'OPTION_ID='$PROGRESS_OPTION_ID >> $GITHUB_ENV
|
||||
- name: Set parent project status To do
|
||||
if: env.CHILD_PROJ_STATUS && !contains(env.CHILD_PROJ_STATUS, 'In ') && !contains(env.CHILD_PROJ_STATUS, 'Blocked') && ! contains(env.CHILD_PROJ_STATUS, 'Done')
|
||||
run: |
|
||||
echo 'OPTION_ID='$TODO_OPTION_ID >> $GITHUB_ENV
|
||||
- name: Set issue status in parent project
|
||||
if: env.OPTION_ID && (env.OPTION_ID != env.PARENT_PROJ_STATUS_ID)
|
||||
run: |
|
||||
gh api graphql -f query='
|
||||
mutation (
|
||||
$project: ID!
|
||||
$item: ID!
|
||||
$status_field: ID!
|
||||
$status_value: String!
|
||||
) {
|
||||
set_status: updateProjectV2ItemFieldValue(input: {
|
||||
projectId: $project
|
||||
itemId: $item
|
||||
fieldId: $status_field
|
||||
value: {
|
||||
singleSelectOptionId: $status_value
|
||||
}
|
||||
}) {
|
||||
projectV2Item {
|
||||
id
|
||||
}
|
||||
}
|
||||
}' -f project=$PROJECT_ID -f item=$ITEM_ID -f status_field=$STATUS_FIELD_ID -f status_value=${{ env.OPTION_ID }} --silent
|
||||
12
.github/workflows/github-release.yml
vendored
12
.github/workflows/github-release.yml
vendored
@@ -3,7 +3,7 @@ on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
version:
|
||||
required: true
|
||||
required: true
|
||||
description: Needs to match, exactly, the name of a milestone (NO v prefix)
|
||||
jobs:
|
||||
main:
|
||||
@@ -14,17 +14,11 @@ jobs:
|
||||
with:
|
||||
repository: "grafana/grafana-github-actions"
|
||||
path: ./actions
|
||||
ref: main
|
||||
ref: main
|
||||
- name: Install Actions
|
||||
run: npm install --production --prefix ./actions
|
||||
- name: "Generate token"
|
||||
id: generate_token
|
||||
uses: tibdex/github-app-token@b62528385c34dbc9f38e5f4225ac829252d1ea92
|
||||
with:
|
||||
app_id: ${{ secrets.GRAFANA_DELIVERY_BOT_APP_ID }}
|
||||
private_key: ${{ secrets.GRAFANA_DELIVERY_BOT_APP_PEM }}
|
||||
- name: Run github release action
|
||||
uses: ./actions/github-release
|
||||
with:
|
||||
token: ${{ steps.generate_token.outputs.token }}
|
||||
token: ${{secrets.GH_BOT_ACCESS_TOKEN}}
|
||||
metricsWriteAPIKey: ${{secrets.GRAFANA_MISC_STATS_API_KEY}}
|
||||
|
||||
2
.github/workflows/issue-labeled.yml
vendored
2
.github/workflows/issue-labeled.yml
vendored
@@ -58,7 +58,7 @@ jobs:
|
||||
|
||||
- name: "Send Slack notification"
|
||||
if: ${{ env.CHANNEL != 'null' }}
|
||||
uses: slackapi/slack-github-action@v1.23.0
|
||||
uses: slackapi/slack-github-action@v1.14.0
|
||||
with:
|
||||
payload: >
|
||||
{
|
||||
|
||||
8
.github/workflows/milestone.yml
vendored
8
.github/workflows/milestone.yml
vendored
@@ -10,10 +10,12 @@ jobs:
|
||||
uses: grafana/grafana/.github/workflows/remove-milestone.yml@main
|
||||
with:
|
||||
version_call: ${{ github.event.inputs.version_input }}
|
||||
secrets: inherit
|
||||
secrets:
|
||||
token: ${{ secrets.GH_BOT_ACCESS_TOKEN }}
|
||||
call-close-milestone:
|
||||
uses: grafana/grafana/.github/workflows/close-milestone.yml@main
|
||||
with:
|
||||
version_call: ${{ github.event.inputs.version_input }}
|
||||
secrets: inherit
|
||||
needs: call-remove-milestone
|
||||
secrets:
|
||||
token: ${{ secrets.GH_BOT_ACCESS_TOKEN }}
|
||||
needs: call-remove-milestone
|
||||
10
.github/workflows/ox-code-coverage.yml
vendored
10
.github/workflows/ox-code-coverage.yml
vendored
@@ -3,19 +3,15 @@ on:
|
||||
pull_request:
|
||||
paths:
|
||||
- 'pkg/services/queryhistory/**'
|
||||
- 'pkg/tsdb/loki/**'
|
||||
- 'pkg/tsdb/elasticsearch/**'
|
||||
- 'public/app/features/explore/**'
|
||||
- 'public/app/features/correlations/**'
|
||||
- 'public/app/plugins/datasource/loki/**'
|
||||
- 'public/app/plugins/datasource/elasticsearch/**'
|
||||
branches-ignore:
|
||||
- dependabot/**
|
||||
- backport-*
|
||||
|
||||
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.12
|
||||
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)
|
||||
frontend-path-regexp: public\/app\/features\/(explore|correlations)
|
||||
backend-path-regexp: pkg\/services\/(queryhistory)
|
||||
|
||||
24
.github/workflows/pr-patch-check.yml
vendored
24
.github/workflows/pr-patch-check.yml
vendored
@@ -1,24 +0,0 @@
|
||||
# Owned by grafana-delivery-squad
|
||||
# Intended to be dropped into the base repo Ex: grafana/grafana
|
||||
name: Check for patch conflicts
|
||||
run-name: check-patch-conflicts-${{ github.base_ref }}-${{ github.head_ref }}
|
||||
on:
|
||||
pull_request_target:
|
||||
types:
|
||||
- opened
|
||||
branches:
|
||||
- "main"
|
||||
- "v*.*.*"
|
||||
- "release-*"
|
||||
|
||||
# Since this is run on a pull request, we want to apply the patches intended for the
|
||||
# target branch onto the source branch, to verify compatibility before merging.
|
||||
jobs:
|
||||
trigger_downstream_patch_check:
|
||||
uses: grafana/security-patch-actions/.github/workflows/test-patches.yml@main
|
||||
with:
|
||||
src_repo: "${{ github.repository }}"
|
||||
src_ref: "${{ github.head_ref }}" # this is the source branch name, Ex: "feature/newthing"
|
||||
patch_repo: "${{ github.repository }}-security-patches"
|
||||
patch_ref: "${{ github.base_ref }}" # this is the target branch name, Ex: "main"
|
||||
secrets: inherit
|
||||
@@ -1,38 +0,0 @@
|
||||
name: "publish-technical-documentation-next"
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- "main"
|
||||
paths:
|
||||
- "docs/sources/**"
|
||||
workflow_dispatch:
|
||||
jobs:
|
||||
sync:
|
||||
if: "github.repository == 'grafana/grafana'"
|
||||
runs-on: "ubuntu-latest"
|
||||
steps:
|
||||
- name: "Checkout Grafana repo"
|
||||
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"
|
||||
|
||||
- name: "Publish to website repository (next)"
|
||||
uses: "./.github/actions/website-sync"
|
||||
id: "publish-next"
|
||||
with:
|
||||
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 }}"
|
||||
source_folder: "docs/sources"
|
||||
target_folder: "content/docs/grafana/next"
|
||||
@@ -1,68 +0,0 @@
|
||||
name: "publish-technical-documentation-release"
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- v[0-9]+.[0-9]+.x
|
||||
tags:
|
||||
- v[0-9]+.[0-9]+.[0-9]+
|
||||
paths:
|
||||
- "docs/sources/**"
|
||||
workflow_dispatch:
|
||||
jobs:
|
||||
sync:
|
||||
if: "github.repository == 'grafana/grafana'"
|
||||
runs-on: "ubuntu-latest"
|
||||
steps:
|
||||
- name: "Checkout Grafana repo"
|
||||
uses: "actions/checkout@v3"
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: "Checkout Actions library"
|
||||
uses: "actions/checkout@v3"
|
||||
with:
|
||||
repository: "grafana/grafana-github-actions"
|
||||
path: "./actions"
|
||||
|
||||
- name: "Install Actions from library"
|
||||
run: "npm install --production --prefix ./actions"
|
||||
|
||||
- name: "Determine if there is a matching release tag"
|
||||
id: "has-matching-release-tag"
|
||||
uses: "./actions/has-matching-release-tag"
|
||||
with:
|
||||
ref_name: "${{ github.ref_name }}"
|
||||
release_tag_regexp: "^v(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)$"
|
||||
release_branch_regexp: "^v(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.x$"
|
||||
|
||||
- name: "Determine technical documentation version"
|
||||
if: "steps.has-matching-release-tag.outputs.bool == 'true'"
|
||||
uses: "./actions/docs-target"
|
||||
id: "target"
|
||||
with:
|
||||
ref_name: "${{ github.ref_name }}"
|
||||
|
||||
- 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"
|
||||
|
||||
- name: "Publish to website repository (release)"
|
||||
if: "steps.has-matching-release-tag.outputs.bool == 'true'"
|
||||
uses: "./.github/actions/website-sync"
|
||||
id: "publish-release"
|
||||
with:
|
||||
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 }}"
|
||||
source_folder: "docs/sources"
|
||||
target_folder: "content/docs/grafana/${{ steps.target.outputs.target }}"
|
||||
48
.github/workflows/publish.yml
vendored
Normal file
48
.github/workflows/publish.yml
vendored
Normal file
@@ -0,0 +1,48 @@
|
||||
name: publish_docs
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- v9.2.x
|
||||
paths:
|
||||
- 'docs/sources/**'
|
||||
- 'packages/grafana-*/**'
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- run: git clone --single-branch --no-tags --depth 1 -b master https://grafanabot:${{ secrets.GH_BOT_ACCESS_TOKEN }}@github.com/grafana/website-sync ./.github/actions/website-sync
|
||||
- name: generate-packages-docs
|
||||
uses: actions/setup-node@v3.4.0
|
||||
id: generate-docs
|
||||
with:
|
||||
node-version: '16'
|
||||
- name: Get yarn cache directory path
|
||||
id: yarn-cache-dir-path
|
||||
run: echo "::set-output name=dir::$(yarn config get cacheFolder)"
|
||||
- uses: actions/cache@v2.1.7
|
||||
with:
|
||||
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
|
||||
key: yarn-${{ hashFiles('**/yarn.lock') }}
|
||||
restore-keys: |
|
||||
yarn-
|
||||
- run: yarn install --immutable
|
||||
- name: publish-to-git
|
||||
uses: ./.github/actions/website-sync
|
||||
id: publish
|
||||
with:
|
||||
repository: grafana/website
|
||||
branch: master
|
||||
host: github.com
|
||||
github_pat: '${{ secrets.GH_BOT_ACCESS_TOKEN }}'
|
||||
source_folder: docs/sources
|
||||
target_folder: content/docs/grafana/latest
|
||||
allow_no_changes: 'true'
|
||||
- shell: bash
|
||||
run: |
|
||||
test -n "${{ steps.publish.outputs.commit_hash }}"
|
||||
test -n "${{ steps.publish.outputs.working_directory }}"
|
||||
14
.github/workflows/remove-milestone.yml
vendored
14
.github/workflows/remove-milestone.yml
vendored
@@ -11,7 +11,9 @@ on:
|
||||
description: Needs to match, exactly, the name of a milestone
|
||||
required: true
|
||||
type: string
|
||||
|
||||
secrets:
|
||||
token:
|
||||
required: true
|
||||
jobs:
|
||||
main:
|
||||
runs-on: ubuntu-latest
|
||||
@@ -24,20 +26,14 @@ jobs:
|
||||
ref: main
|
||||
- name: Install Actions
|
||||
run: npm install --production --prefix ./actions
|
||||
- name: "Generate token"
|
||||
id: generate_token
|
||||
uses: tibdex/github-app-token@b62528385c34dbc9f38e5f4225ac829252d1ea92
|
||||
with:
|
||||
app_id: ${{ secrets.GRAFANA_DELIVERY_BOT_APP_ID }}
|
||||
private_key: ${{ secrets.GRAFANA_DELIVERY_BOT_APP_PEM }}
|
||||
- name: Remove milestone from open issues (manually invoked)
|
||||
if: ${{ github.event.inputs.version != '' }}
|
||||
uses: ./actions/remove-milestone
|
||||
with:
|
||||
token: ${{ steps.generate_token.outputs.token }}
|
||||
token: ${{ secrets.GH_BOT_ACCESS_TOKEN }}
|
||||
- name: Remove milestone from open issues (workflow invoked)
|
||||
if: ${{ inputs.version_call != '' }}
|
||||
uses: ./actions/remove-milestone
|
||||
with:
|
||||
version_call: ${{ inputs.version_call }}
|
||||
token: ${{ steps.generate_token.outputs.token }}
|
||||
token: ${{ secrets.token }}
|
||||
|
||||
12
.github/workflows/scripts/pr-get-job-link.js
vendored
12
.github/workflows/scripts/pr-get-job-link.js
vendored
@@ -1,9 +1,9 @@
|
||||
|
||||
module.exports = async ({ name, github, context, core }) => {
|
||||
module.exports = async ({ github, context, core }) => {
|
||||
const { owner, repo } = context.repo;
|
||||
const url = `https://api.github.com/repos/${owner}/${repo}/actions/runs/${context.runId}/jobs`
|
||||
const result = await github.request(url);
|
||||
const job = result.data.jobs.find(j => j.name === name);
|
||||
|
||||
core.setOutput('link', `${job.html_url}?check_suite_focus=true`);
|
||||
}
|
||||
const result = await github.request(url)
|
||||
const link = `https://github.com/grafana/grafana/runs/${result.data.jobs[0].id}?check_suite_focus=true`;
|
||||
|
||||
core.setOutput('link', link);
|
||||
}
|
||||
2
.github/workflows/stale.yml
vendored
2
.github/workflows/stale.yml
vendored
@@ -7,7 +7,7 @@ jobs:
|
||||
stale:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/stale@v6
|
||||
- uses: actions/stale@v5
|
||||
with:
|
||||
repo-token: ${{ secrets.GH_BOT_ACCESS_TOKEN }}
|
||||
# Number of days of inactivity before a stale Issue or Pull Request is closed.
|
||||
|
||||
25
.github/workflows/sync-mirror.yml
vendored
25
.github/workflows/sync-mirror.yml
vendored
@@ -1,25 +0,0 @@
|
||||
# Owned by grafana-delivery-squad
|
||||
# Intended to be dropped into the base repo, Ex: grafana/grafana
|
||||
name: Sync to mirror
|
||||
run-name: sync-to-mirror-${{ github.ref_name }}
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
branches:
|
||||
- "main"
|
||||
- "v*.*.*"
|
||||
- "release-*"
|
||||
|
||||
# This is run after the pull request has been merged, so we'll run against the target branch
|
||||
jobs:
|
||||
trigger_downstream_patch_mirror:
|
||||
concurrency: patch-mirror-${{ github.ref_name }}
|
||||
uses: grafana/security-patch-actions/.github/workflows/mirror-branch-and-apply-patches.yml@main
|
||||
if: github.repository == 'grafana/grafana'
|
||||
with:
|
||||
ref: "${{ github.ref_name }}" # this is the target branch name, Ex: "main"
|
||||
src_repo: "${{ github.repository }}"
|
||||
dest_repo: "${{ github.repository }}-security-mirror"
|
||||
patch_repo: "${{ github.repository }}-security-patches"
|
||||
secrets: inherit
|
||||
|
||||
27
.github/workflows/update-changelog.yml
vendored
27
.github/workflows/update-changelog.yml
vendored
@@ -5,16 +5,21 @@ on:
|
||||
version:
|
||||
required: true
|
||||
description: 'Needs to match, exactly, the name of a milestone. The version to be released please respect: major.minor.patch or major.minor.patch-beta<number> format. example: 7.4.3 or 7.4.3-beta1'
|
||||
workflow_call:
|
||||
inputs:
|
||||
version_call:
|
||||
description: 'Needs to match, exactly, the name of a milestone. The version to be released please respect: major.minor.patch or major.minor.patch-beta<number> format. example: 7.4.3 or 7.4.3-beta1'
|
||||
required: true
|
||||
type: string
|
||||
secrets:
|
||||
token:
|
||||
required: true
|
||||
metricsWriteAPIKey:
|
||||
required: true
|
||||
jobs:
|
||||
main:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: "Generate token"
|
||||
id: generate_token
|
||||
uses: tibdex/github-app-token@b62528385c34dbc9f38e5f4225ac829252d1ea92
|
||||
with:
|
||||
app_id: ${{ secrets.GRAFANA_DELIVERY_BOT_APP_ID }}
|
||||
private_key: ${{ secrets.GRAFANA_DELIVERY_BOT_APP_PEM }}
|
||||
- name: Checkout Actions
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
@@ -24,7 +29,15 @@ jobs:
|
||||
- name: Install Actions
|
||||
run: npm install --production --prefix ./actions
|
||||
- name: Run update changelog (manually invoked)
|
||||
if: ${{ github.event.inputs.version != '' }}
|
||||
uses: ./actions/update-changelog
|
||||
with:
|
||||
token: ${{ steps.generate_token.outputs.token }}
|
||||
token: ${{ secrets.GH_BOT_ACCESS_TOKEN }}
|
||||
metricsWriteAPIKey: ${{ secrets.GRAFANA_MISC_STATS_API_KEY }}
|
||||
- name: Run update changelog (workflow invoked)
|
||||
if: ${{ inputs.version != '' }}
|
||||
uses: ./actions/update-changelog
|
||||
with:
|
||||
version_call: ${{ inputs.version }}
|
||||
token: ${{ secrets.token }}
|
||||
metricsWriteAPIKey: ${{ secrets.metricsWriteAPIKey }}
|
||||
|
||||
21
.gitignore
vendored
21
.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
|
||||
@@ -107,7 +105,6 @@ debug.test
|
||||
/packaging/**/*.tar.gz
|
||||
/packaging/**/*.tar.gz.sha256
|
||||
pkg/cmd/grafana-server/__debug_bin
|
||||
pkg/services/quota/quotaimpl/storage/storage.json
|
||||
|
||||
# Ignore OSX indexing
|
||||
.DS_Store
|
||||
@@ -129,7 +126,6 @@ pkg/services/quota/quotaimpl/storage/storage.json
|
||||
!.yarn/patches/*.patch
|
||||
|
||||
# Ignoring frontend packages specifics
|
||||
/packages/grafana-ui/.yarn/.cache
|
||||
/packages/**/dist
|
||||
/packages/**/compiled
|
||||
/packages/**/.rpt2_cache
|
||||
@@ -159,8 +155,6 @@ compilation-stats.json
|
||||
/e2e/benchmarks/**/results/*
|
||||
/e2e/benchmarks/**/results
|
||||
/e2e/build_results.zip
|
||||
/e2e/extensions
|
||||
/e2e/extensions-suite
|
||||
|
||||
# grafana server
|
||||
/scripts/grafana-server/server.log
|
||||
@@ -175,17 +169,18 @@ compilation-stats.json
|
||||
# auto generated frontend docs
|
||||
/docs/sources/packages_api
|
||||
|
||||
# wire generated files
|
||||
**/wire_gen.go
|
||||
# auto generated Go files
|
||||
*_gen.go
|
||||
!pkg/services/featuremgmt/toggles_gen.go
|
||||
!pkg/coremodel/**/*_gen.go
|
||||
!pkg/framework/**/*_gen.go
|
||||
!pkg/plugins/pfs/**/*_gen.go
|
||||
!public/app/plugins/**/*_gen.go
|
||||
|
||||
# Auto-generated internationalization files
|
||||
public/locales/_build/
|
||||
public/locales/*/*.js
|
||||
public/locales/*/grafana_old.json
|
||||
public/locales/**/*.js
|
||||
|
||||
deployment_tools_config.json
|
||||
|
||||
.betterer.cache
|
||||
|
||||
# Temporary file for backporting PRs
|
||||
.pr-body.txt
|
||||
|
||||
@@ -19,7 +19,6 @@ include-go-root = true
|
||||
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"
|
||||
|
||||
[linters-settings.gocritic]
|
||||
enabled-checks = ["ruleguard"]
|
||||
@@ -57,6 +56,7 @@ enable = [
|
||||
"typecheck",
|
||||
"asciicheck",
|
||||
"errorlint",
|
||||
"sqlclosecheck",
|
||||
"revive",
|
||||
]
|
||||
|
||||
@@ -83,11 +83,7 @@ text = "ST1001"
|
||||
# Use golang.org/x/text/cases instead.
|
||||
[[issues.exclude-rules]]
|
||||
linters = ["staticcheck"]
|
||||
text = "SA1019: strings.Title"
|
||||
|
||||
[[issues.exclude-rules]]
|
||||
linters = ["staticcheck"]
|
||||
text = "use fake service and real access control evaluator instead"
|
||||
text = "SA1019"
|
||||
|
||||
[[issues.exclude-rules]]
|
||||
linters = ["gosec"]
|
||||
|
||||
@@ -30,11 +30,3 @@ theme.dark.generated.json
|
||||
public/api-spec.json
|
||||
public/api-merged.json
|
||||
public/openapi3.json
|
||||
|
||||
# Generated Kinds report
|
||||
kinds/report.json
|
||||
|
||||
# Generated schema docs
|
||||
docs/sources/developers/kinds/
|
||||
|
||||
scripts/cli/bettererIssueTemplate.md
|
||||
|
||||
19
.vscode/launch.json
vendored
19
.vscode/launch.json
vendored
@@ -6,17 +6,10 @@
|
||||
"type": "go",
|
||||
"request": "launch",
|
||||
"mode": "auto",
|
||||
"program": "${workspaceFolder}/pkg/cmd/grafana/",
|
||||
"program": "${workspaceFolder}/pkg/cmd/grafana-server/",
|
||||
"env": {},
|
||||
"cwd": "${workspaceFolder}",
|
||||
"args": ["server", "--homepath", "${workspaceFolder}", "--packaging", "dev"]
|
||||
},
|
||||
{
|
||||
"name": "Attach to Chrome",
|
||||
"port": 9222,
|
||||
"request": "attach",
|
||||
"type": "chrome",
|
||||
"webRoot": "${workspaceFolder}"
|
||||
"args": ["--homepath", "${workspaceFolder}", "--packaging", "dev"]
|
||||
},
|
||||
{
|
||||
"name": "Debug Jest test",
|
||||
@@ -27,14 +20,6 @@
|
||||
"console": "integratedTerminal",
|
||||
"internalConsoleOptions": "neverOpen",
|
||||
"port": 9229
|
||||
},
|
||||
{
|
||||
"name": "Debug Go test",
|
||||
"type": "go",
|
||||
"request": "launch",
|
||||
"mode": "test",
|
||||
"program": "${workspaceFolder}/${relativeFileDirname}",
|
||||
"showLog": true
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
BIN
.yarn/cache/rst2html-https-e87da7ea2f-63d5ff3068.zip
vendored
BIN
.yarn/cache/rst2html-https-e87da7ea2f-63d5ff3068.zip
vendored
Binary file not shown.
Binary file not shown.
783
.yarn/releases/yarn-3.2.3.cjs
vendored
Executable file
783
.yarn/releases/yarn-3.2.3.cjs
vendored
Executable file
File diff suppressed because one or more lines are too long
807
.yarn/releases/yarn-3.3.0.cjs
vendored
807
.yarn/releases/yarn-3.3.0.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.32.0-sdk",
|
||||
"version": "8.23.0-sdk",
|
||||
"main": "./lib/api.js",
|
||||
"type": "commonjs"
|
||||
}
|
||||
|
||||
2
.yarn/sdks/prettier/package.json
vendored
2
.yarn/sdks/prettier/package.json
vendored
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "prettier",
|
||||
"version": "2.8.1-sdk",
|
||||
"version": "2.7.1-sdk",
|
||||
"main": "./index.js",
|
||||
"type": "commonjs"
|
||||
}
|
||||
|
||||
2
.yarn/sdks/typescript/package.json
vendored
2
.yarn/sdks/typescript/package.json
vendored
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "typescript",
|
||||
"version": "4.8.4-sdk",
|
||||
"version": "4.8.2-sdk",
|
||||
"main": "./lib/typescript.js",
|
||||
"type": "commonjs"
|
||||
}
|
||||
|
||||
81
.yarnrc.yml
81
.yarnrc.yml
@@ -3,36 +3,41 @@ enableTelemetry: false
|
||||
nodeLinker: pnp
|
||||
|
||||
packageExtensions:
|
||||
'@storybook/addon-docs@6.5.12':
|
||||
"@mdx-js/loader@1.6.22":
|
||||
peerDependencies:
|
||||
'@babel/core': ^7.0.0
|
||||
'@storybook/manager-webpack5': 6.5.12
|
||||
'webpack': 5.74.0
|
||||
'@storybook/addon-essentials@6.5.12':
|
||||
peerDependencies:
|
||||
'@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.12':
|
||||
peerDependencies:
|
||||
'@babel/core': ^7.0.0
|
||||
'@storybook/manager-webpack5': 6.5.12
|
||||
'@storybook/csf-tools@6.5.12':
|
||||
peerDependencies:
|
||||
'@babel/core': ^7.0.0
|
||||
'@storybook/mdx2-csf@0.0.3':
|
||||
react: 17.0.1
|
||||
"@npmcli/run-script@4.1.3":
|
||||
dependencies:
|
||||
'@babel/types': ^7.14.8
|
||||
'@storybook/react@6.5.12':
|
||||
which: ^2.0.2
|
||||
"@storybook/addon-docs@6.4.21":
|
||||
peerDependencies:
|
||||
'@storybook/manager-webpack5': 6.5.12
|
||||
"@storybook/manager-webpack5": 6.4.21
|
||||
"@storybook/addon-essentials@6.4.21":
|
||||
peerDependencies:
|
||||
"@storybook/components": 6.4.21
|
||||
"@storybook/core-events": 6.4.21
|
||||
"@storybook/manager-webpack5": 6.4.21
|
||||
"@storybook/theming": 6.4.21
|
||||
"@storybook/core-server@6.4.21":
|
||||
peerDependencies:
|
||||
"@babel/core": ^7.0.0
|
||||
"@storybook/core@6.4.21":
|
||||
peerDependencies:
|
||||
"@babel/core": ^7.0.0
|
||||
"@storybook/manager-webpack5": 6.4.21
|
||||
"@storybook/csf-tools@6.4.21":
|
||||
peerDependencies:
|
||||
"@babel/core": ^7.0.0
|
||||
"@storybook/react@6.4.21":
|
||||
peerDependencies:
|
||||
"@storybook/manager-webpack5": 6.4.21
|
||||
doctrine@3.0.0:
|
||||
dependencies:
|
||||
assert: 2.0.0
|
||||
moveable@0.30.0:
|
||||
dependencies:
|
||||
"@daybrush/utils": 1.7.0
|
||||
framework-utils: ^1.1.0
|
||||
rc-time-picker@3.7.3:
|
||||
peerDependencies:
|
||||
react: 17.0.1
|
||||
@@ -44,26 +49,30 @@ packageExtensions:
|
||||
react-compat-css-styled@1.0.8:
|
||||
dependencies:
|
||||
react-simple-compat: 1.2.2
|
||||
react-compat-moveable@0.18.0:
|
||||
dependencies:
|
||||
"@egjs/agent": ^2.2.1
|
||||
"@egjs/children-differ": ^1.0.1
|
||||
"@scena/matrix": 1.1.1
|
||||
css-to-mat: ^1.0.3
|
||||
gesto: ^1.9.0
|
||||
overlap-area: ^1.0.0
|
||||
react-simple-compat: 1.2.2
|
||||
peerDependencies:
|
||||
framework-utils: ^1.1.0
|
||||
react-icons@2.2.7:
|
||||
peerDependencies:
|
||||
prop-types: '*'
|
||||
prop-types: "*"
|
||||
react-resizable@3.0.4:
|
||||
peerDependencies:
|
||||
react-dom: 17.0.1
|
||||
|
||||
plugins:
|
||||
- path: .yarn/plugins/@yarnpkg/plugin-typescript.cjs
|
||||
spec: '@yarnpkg/plugin-typescript'
|
||||
spec: "@yarnpkg/plugin-typescript"
|
||||
- path: .yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs
|
||||
spec: '@yarnpkg/plugin-interactive-tools'
|
||||
spec: "@yarnpkg/plugin-interactive-tools"
|
||||
- path: .yarn/plugins/@yarnpkg/plugin-outdated.cjs
|
||||
spec: 'https://mskelton.dev/yarn-outdated/v2'
|
||||
spec: "https://mskelton.dev/yarn-outdated/v2"
|
||||
|
||||
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:
|
||||
# npmRegistryServer: http://localhost:4873
|
||||
|
||||
# unsafeHttpWhitelist:
|
||||
# - 'localhost'
|
||||
yarnPath: .yarn/releases/yarn-3.2.3.cjs
|
||||
|
||||
840
CHANGELOG.md
840
CHANGELOG.md
@@ -1,790 +1,3 @@
|
||||
<!-- 9.4.13 START -->
|
||||
|
||||
# 9.4.13 (2023-06-22)
|
||||
|
||||
### Bug fixes
|
||||
|
||||
- **Auth:** Fixed CVE-2023-3128. [#70579](https://github.com/grafana/grafana/issues/70579), [@zerok](https://github.com/zerok)
|
||||
|
||||
<!-- 9.4.13 END -->
|
||||
<!-- 9.4.12 START -->
|
||||
|
||||
# 9.4.12 (2023-06-06)
|
||||
|
||||
### Bug fixes
|
||||
|
||||
- **Query:** Prevent crash while executing concurrent mixed queries
|
||||
- **Alerting:** Require alert.notifications:write permissions to test receivers and templates
|
||||
- **RBAC:** Remove legacy AC editor and admin role on new dashboard route. [#68775](https://github.com/grafana/grafana/issues/68775), [@grafanabot](https://github.com/grafanabot)
|
||||
- **Revert:** Allow editors to access GET /datasources. [#68653](https://github.com/grafana/grafana/issues/68653), [@grafanabot](https://github.com/grafanabot)
|
||||
- **Explore:** Remove data source onboarding page. [#68642](https://github.com/grafana/grafana/issues/68642), [@grafanabot](https://github.com/grafanabot)
|
||||
|
||||
<!-- 9.4.12 END -->
|
||||
<!-- 9.4.10 START -->
|
||||
|
||||
# 9.4.10 (2023-05-08)
|
||||
|
||||
### Features and enhancements
|
||||
|
||||
- **Chore:** Upgrade Go to 1.20.4. [#67760](https://github.com/grafana/grafana/issues/67760), [@papagian](https://github.com/papagian)
|
||||
|
||||
### Bug fixes
|
||||
|
||||
- **AzureMonitor:** Fix logs query multi-resource and timespan values. [#67931](https://github.com/grafana/grafana/issues/67931), [@grafanabot](https://github.com/grafanabot)
|
||||
- **TimeSeries:** Fix leading null-fill for missing intervals. [#67572](https://github.com/grafana/grafana/issues/67572), [@leeoniya](https://github.com/leeoniya)
|
||||
- **Alerting:** Fix misleading status code in provisioning API. [#67357](https://github.com/grafana/grafana/issues/67357), [@grafanabot](https://github.com/grafanabot)
|
||||
- **Azure Monitor:** Fix bug that was not showing resources for certain locations. [#66617](https://github.com/grafana/grafana/issues/66617), [@grafanabot](https://github.com/grafanabot)
|
||||
|
||||
<!-- 9.4.10 END -->
|
||||
<!-- 9.4.9 START -->
|
||||
|
||||
# 9.4.9 (2023-04-24)
|
||||
|
||||
### Features and enhancements
|
||||
|
||||
- **Chore:** Upgrade Go to 1.20.3. [#66836](https://github.com/grafana/grafana/issues/66836), [@sakjur](https://github.com/sakjur)
|
||||
|
||||
### Bug fixes
|
||||
|
||||
- **Expressions/threshold:** Fix incorrect thresholds args length. [#66925](https://github.com/grafana/grafana/issues/66925), [@gillesdemey](https://github.com/gillesdemey)
|
||||
- **Alerting:** Fix share URL for Prometheus rules on subpath (#66752). [#66802](https://github.com/grafana/grafana/issues/66802), [@gillesdemey](https://github.com/gillesdemey)
|
||||
- **Trace View:** Update the queryType to traceql for checking if same trace when clicking span link. [#66670](https://github.com/grafana/grafana/issues/66670), [@ericmustin](https://github.com/ericmustin)
|
||||
- **Google Cloud Monitoring:** Fix project variable. [#66602](https://github.com/grafana/grafana/issues/66602), [@asimpson](https://github.com/asimpson)
|
||||
- **InfluxDB:** Fix querying with hardcoded retention policy. [#66587](https://github.com/grafana/grafana/issues/66587), [@itsmylife](https://github.com/itsmylife)
|
||||
- **Auth:** Remove the session cookie only if it's invalid or revoked. [#66430](https://github.com/grafana/grafana/issues/66430), [@mgyongyosi](https://github.com/mgyongyosi)
|
||||
- **AccessControl:** Allow editors to access GET /api/datasources. [#66375](https://github.com/grafana/grafana/issues/66375), [@mgyongyosi](https://github.com/mgyongyosi)
|
||||
- **CloudMonitoring:** Add project selector for MQL editor[fix]. [#65844](https://github.com/grafana/grafana/issues/65844), [@alyssabull](https://github.com/alyssabull)
|
||||
|
||||
<!-- 9.4.9 END -->
|
||||
<!-- 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.4.0-beta1 END -->
|
||||
<!-- 9.3.6 START -->
|
||||
|
||||
# 9.3.6 (2023-01-26)
|
||||
|
||||
### Bug fixes
|
||||
|
||||
- **QueryEditorRow:** Fixes issue loading query editor when data source variable selected. [#61927](https://github.com/grafana/grafana/pull/61927), [@torkelo](https://github.com/torkelo)
|
||||
|
||||
<!-- 9.3.6 END -->
|
||||
<!-- 9.3.4 START -->
|
||||
|
||||
# 9.3.4 (2023-01-25)
|
||||
|
||||
### Features and enhancements
|
||||
|
||||
- **Prometheus:** Add default editor configuration. [#61510](https://github.com/grafana/grafana/pull/61510), [@itsmylife](https://github.com/itsmylife)
|
||||
- **TextPanel:** Refactor to functional component (#60885). [#61937](https://github.com/grafana/grafana/pull/61937), [@ryantxu](https://github.com/ryantxu)
|
||||
|
||||
### Bug fixes
|
||||
|
||||
- **Alerting:** Fix webhook to use correct key for decrypting token. [#61717](https://github.com/grafana/grafana/pull/61717), [@yuri-tceretian](https://github.com/yuri-tceretian)
|
||||
- **Alerting:** Set error annotation on EvaluationError regardless of underlying error type. [#61506](https://github.com/grafana/grafana/pull/61506), [@alexweav](https://github.com/alexweav)
|
||||
- **Datasources:** Fix Proxy by UID Failing for UIDs with a Hyphen. [#61723](https://github.com/grafana/grafana/pull/61723), [@csmarchbanks](https://github.com/csmarchbanks)
|
||||
- **Elasticsearch:** Fix creating of span link with no tags. [#61753](https://github.com/grafana/grafana/pull/61753), [@ivanahuckova](https://github.com/ivanahuckova)
|
||||
- **Elasticsearch:** Fix failing requests when using SigV4. [#61923](https://github.com/grafana/grafana/pull/61923), [@svennergr](https://github.com/svennergr)
|
||||
- **Elasticsearch:** Fix toggle-settings are not shown correctly. [#61751](https://github.com/grafana/grafana/pull/61751), [@svennergr](https://github.com/svennergr)
|
||||
- **Explore:** Be sure time range key bindings are mounted after clear. [#61892](https://github.com/grafana/grafana/pull/61892), [@gelicia](https://github.com/gelicia)
|
||||
- **Explore:** Unsync time ranges when a pane is closed. [#61369](https://github.com/grafana/grafana/pull/61369), [@Elfo404](https://github.com/Elfo404)
|
||||
- **Logs:** Lines with long words do not break properly. [#61707](https://github.com/grafana/grafana/pull/61707), [@svennergr](https://github.com/svennergr)
|
||||
- **Loki:** Fix misaligned derived fields settings. [#61475](https://github.com/grafana/grafana/pull/61475), [@svennergr](https://github.com/svennergr)
|
||||
- **Query Builder:** Fix max width of input component to prevent overflows. [#61798](https://github.com/grafana/grafana/pull/61798), [@matyax](https://github.com/matyax)
|
||||
- **Search:** Auto focus input elements. [#61443](https://github.com/grafana/grafana/pull/61443), [@ryantxu](https://github.com/ryantxu)
|
||||
- **Search:** Fix empty folder message showing when by starred dashboards. [#61610](https://github.com/grafana/grafana/pull/61610), [@eledobleefe](https://github.com/eledobleefe)
|
||||
- **Table Panel:** Fix image of image cell overflowing table cell and cells ignoring text alignment setting when a data link is added. [#59392](https://github.com/grafana/grafana/pull/59392), [@oscarkilhed](https://github.com/oscarkilhed)
|
||||
|
||||
<!-- 9.3.4 END -->
|
||||
<!-- 9.3.2 START -->
|
||||
|
||||
# 9.3.2 (2023-12-13)
|
||||
|
||||
### Features and enhancements
|
||||
|
||||
- **Graphite:** Process multiple queries to Graphite plugin. [#59608](https://github.com/grafana/grafana/pull/59608), [@mmandrus](https://github.com/mmandrus)
|
||||
|
||||
### Bug fixes
|
||||
|
||||
- **API:** Fix delete user failure due to quota not enabled. [#59875](https://github.com/grafana/grafana/pull/59875), [@papagian](https://github.com/papagian)
|
||||
- **Accessibility:** Improved keyboard accessibility in BarGauge. [#59382](https://github.com/grafana/grafana/pull/59382), [@lpskdl](https://github.com/lpskdl)
|
||||
- **Accessibility:** Improved keyboard accessibility in BigValue. [#59830](https://github.com/grafana/grafana/pull/59830), [@lpskdl](https://github.com/lpskdl)
|
||||
- **Alerting:** Use the QuotaTargetSrv instead of the QuotaTarget in quota check. [#60026](https://github.com/grafana/grafana/pull/60026), [@joeblubaugh](https://github.com/joeblubaugh)
|
||||
- **AzureMonitor:** Automate location retrieval. [#59602](https://github.com/grafana/grafana/pull/59602), [@aangelisc](https://github.com/aangelisc)
|
||||
- **AzureMonitor:** Fix bad request when setting dimensions. [#59700](https://github.com/grafana/grafana/pull/59700), [@andresmgot](https://github.com/andresmgot)
|
||||
- **BarChart:** Fix value mappings. [#60066](https://github.com/grafana/grafana/pull/60066), [@leeoniya](https://github.com/leeoniya)
|
||||
- **Build:** Streamline and sync dockerfiles. [#58101](https://github.com/grafana/grafana/pull/58101), [@DanCech](https://github.com/DanCech)
|
||||
- **Build:** Unified dockerfile for all builds. [#59173](https://github.com/grafana/grafana/pull/59173), [@DanCech](https://github.com/DanCech)
|
||||
- **CloudWatch:** Fix - make sure dimensions are propagated to alert query editor. [#58281](https://github.com/grafana/grafana/pull/58281), [@conorevans](https://github.com/conorevans)
|
||||
- **Cloudwatch:** Fix deeplink with default region (#60260). [#60274](https://github.com/grafana/grafana/pull/60274), [@iwysiu](https://github.com/iwysiu)
|
||||
- **Command Palette:** Fix not being able to type if triggered whilst another modal is open. [#59728](https://github.com/grafana/grafana/pull/59728), [@ashharrison90](https://github.com/ashharrison90)
|
||||
- **Command Palette:** Maintain page state when changing theme. [#59787](https://github.com/grafana/grafana/pull/59787), [@ashharrison90](https://github.com/ashharrison90)
|
||||
- **Dashboards:** Fix 'Make Editable' button not working in Dashboard Settings. [#60306](https://github.com/grafana/grafana/pull/60306), [@joshhunt](https://github.com/joshhunt)
|
||||
- **Dashboards:** Show error when data source is missing. [#60099](https://github.com/grafana/grafana/pull/60099), [@joshhunt](https://github.com/joshhunt)
|
||||
- **Datasource:** Fix - apply default query also to queries in new panels. [#59625](https://github.com/grafana/grafana/pull/59625), [@sunker](https://github.com/sunker)
|
||||
- **Dropdown:** Menu now closes correctly when selecting options on touch devices. [#60181](https://github.com/grafana/grafana/pull/60181), [@ashharrison90](https://github.com/ashharrison90)
|
||||
- **Influx:** Query segment menus now position correctly near the bottom of the screen. [#60087](https://github.com/grafana/grafana/pull/60087), [@ashharrison90](https://github.com/ashharrison90)
|
||||
- **Login:** Fix failure to login a new user via an external provider if quota are enabled. [#60015](https://github.com/grafana/grafana/pull/60015), [@papagian](https://github.com/papagian)
|
||||
- **Loki/Prometheus:** Fix wrong queries executed in split view. [#60172](https://github.com/grafana/grafana/pull/60172), [@svennergr](https://github.com/svennergr)
|
||||
- **Loki:** Fix wrongly escaped label values when using LabelFilter. [#59812](https://github.com/grafana/grafana/pull/59812), [@svennergr](https://github.com/svennergr)
|
||||
- **Navigation:** Prevent app crash when importing a dashboard with a uid of `home`. [#59874](https://github.com/grafana/grafana/pull/59874), [@ashharrison90](https://github.com/ashharrison90)
|
||||
- **Panel Edit:** Fix data links edit icons being off screen when provided title is too long. [#59829](https://github.com/grafana/grafana/pull/59829), [@dprokop](https://github.com/dprokop)
|
||||
- **Prometheus:** Fix exemplar fill color to match series color in time series. [#59908](https://github.com/grafana/grafana/pull/59908), [@gtk-grafana](https://github.com/gtk-grafana)
|
||||
- **Prometheus:** Fix exemplars not respecting corresponding series display status. [#59743](https://github.com/grafana/grafana/pull/59743), [@gtk-grafana](https://github.com/gtk-grafana)
|
||||
- **StateTimeline:** Fix negative infinity legend/tooltip from thresholds. [#60279](https://github.com/grafana/grafana/pull/60279), [@leeoniya](https://github.com/leeoniya)
|
||||
- **Table:** Fixes row border style not showing and colored rows blending together. [#59660](https://github.com/grafana/grafana/pull/59660), [@torkelo](https://github.com/torkelo)
|
||||
- **Tempo:** Fix TraceQL autocomplete issues (#60058). [#60125](https://github.com/grafana/grafana/pull/60125), [@CrypticSignal](https://github.com/CrypticSignal)
|
||||
- **TimePicker:** Prevent TimePicker overflowing viewport on small screens. [#59808](https://github.com/grafana/grafana/pull/59808), [@ashharrison90](https://github.com/ashharrison90)
|
||||
- **TimeRangePicker:** Fix recently ranges only not showing all recent ranges. [#59836](https://github.com/grafana/grafana/pull/59836), [@joshhunt](https://github.com/joshhunt)
|
||||
- **TimeZonePicker:** Scroll menu correctly when using keyboard controls. [#60008](https://github.com/grafana/grafana/pull/60008), [@ashharrison90](https://github.com/ashharrison90)
|
||||
|
||||
<!-- 9.3.2 END -->
|
||||
<!-- 9.3.1 START -->
|
||||
|
||||
# 9.3.1 (2022-11-30)
|
||||
|
||||
### Features and enhancements
|
||||
|
||||
- **Connections:** Update "Your connections/Data sources" page. [#58589](https://github.com/grafana/grafana/pull/58589), [@mikkancso](https://github.com/mikkancso)
|
||||
|
||||
### Bug fixes
|
||||
|
||||
- **Accessibility:** Increase badge constrast to be WCAG AA compliant. [#59531](https://github.com/grafana/grafana/pull/59531), [@eledobleefe](https://github.com/eledobleefe)
|
||||
|
||||
<!-- 9.3.1 END -->
|
||||
<!-- 9.3.0 START -->
|
||||
|
||||
# 9.3.0 (2022-11-30)
|
||||
|
||||
### Features and enhancements
|
||||
|
||||
- **Alerting:** Enable interpolation for notification policies in file provisioning. [#58956](https://github.com/grafana/grafana/pull/58956), [@JohnnyQQQQ](https://github.com/JohnnyQQQQ)
|
||||
- **Azure Monitor Logs:** Avoid warning when the response is empty. [#59211](https://github.com/grafana/grafana/pull/59211), [@andresmgot](https://github.com/andresmgot)
|
||||
- **Azure Monitor:** Add support to customized routes. [#54829](https://github.com/grafana/grafana/pull/54829), [@ms-hujia](https://github.com/ms-hujia)
|
||||
- **Canvas:** Add icon value mapping. [#59013](https://github.com/grafana/grafana/pull/59013), [@nmarrs](https://github.com/nmarrs)
|
||||
- **CloudWatch:** Cross-account querying support. [#59362](https://github.com/grafana/grafana/pull/59362), [@sunker](https://github.com/sunker)
|
||||
- **Docs:** Update `merge-pull-request.md` regarding backport policies. [#59239](https://github.com/grafana/grafana/pull/59239), [@dsotirakis](https://github.com/dsotirakis)
|
||||
- **GaugePanel:** Setting the neutral-point of a gauge. [#53989](https://github.com/grafana/grafana/pull/53989), [@sfranzis](https://github.com/sfranzis)
|
||||
- **Geomap:** Improve location editor. [#58017](https://github.com/grafana/grafana/pull/58017), [@drew08t](https://github.com/drew08t)
|
||||
- **Internationalization:** Enable internationalization by default. [#59204](https://github.com/grafana/grafana/pull/59204), [@joshhunt](https://github.com/joshhunt)
|
||||
- **Logs:** Add `Download logs` button to log log-browser. [#55163](https://github.com/grafana/grafana/pull/55163), [@svennergr](https://github.com/svennergr)
|
||||
- **Loki:** Add `gzip` compression to resource calls. [#59059](https://github.com/grafana/grafana/pull/59059), [@svennergr](https://github.com/svennergr)
|
||||
- **Loki:** Add improvements to loki label browser. [#59387](https://github.com/grafana/grafana/pull/59387), [@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:** Remove raw query toggle. [#59125](https://github.com/grafana/grafana/pull/59125), [@gwdawson](https://github.com/gwdawson)
|
||||
- **Middleware:** Add CSP Report Only support. [#58074](https://github.com/grafana/grafana/pull/58074), [@jcalisto](https://github.com/jcalisto)
|
||||
- **Navigation:** Prevent viewer role accessing dashboard creation, import and folder creation. [#58842](https://github.com/grafana/grafana/pull/58842), [@lpskdl](https://github.com/lpskdl)
|
||||
- **OAuth:** Refactor OAuth parameters handling to support obtaining refresh tokens for Google OAuth. [#58782](https://github.com/grafana/grafana/pull/58782), [@mgyongyosi](https://github.com/mgyongyosi)
|
||||
- **Oauth:** Display friendly error message when role_attribute_strict=true and no valid role found. [#57818](https://github.com/grafana/grafana/pull/57818), [@kalleep](https://github.com/kalleep)
|
||||
- **Preferences:** Add confirmation modal when saving org preferences. [#59119](https://github.com/grafana/grafana/pull/59119), [@JoaoSilvaGrafana](https://github.com/JoaoSilvaGrafana)
|
||||
- **PublicDashboards:** Orphaned public dashboard deletion script added. [#57917](https://github.com/grafana/grafana/pull/57917), [@juanicabanas](https://github.com/juanicabanas)
|
||||
- **Query Editor:** Hide overflow for long query names. [#58840](https://github.com/grafana/grafana/pull/58840), [@zuchka](https://github.com/zuchka)
|
||||
- **Reports:** Configurable timezone. (Enterprise)
|
||||
- **Solo Panel:** Configurable timezone. [#59153](https://github.com/grafana/grafana/pull/59153), [@spinillos](https://github.com/spinillos)
|
||||
- **TablePanel:** Add support for Count calculation per column or per entire dataset. [#58134](https://github.com/grafana/grafana/pull/58134), [@mdvictor](https://github.com/mdvictor)
|
||||
- **Tempo:** Send the correct start time when making a TraceQL query. [#59128](https://github.com/grafana/grafana/pull/59128), [@CrypticSignal](https://github.com/CrypticSignal)
|
||||
- **Various Panels:** Remove beta label from Bar Chart, Candlestick, Histogram, State Timeline, & Status History Panels. [#58557](https://github.com/grafana/grafana/pull/58557), [@codeincarnate](https://github.com/codeincarnate)
|
||||
|
||||
### Bug fixes
|
||||
|
||||
- **Access Control:** Clear user's permission cache after resource creation. [#59307](https://github.com/grafana/grafana/pull/59307), [@grafanabot](https://github.com/grafanabot)
|
||||
- **Access Control:** Clear user's permission cache after resource creation. [#59101](https://github.com/grafana/grafana/pull/59101), [@IevaVasiljeva](https://github.com/IevaVasiljeva)
|
||||
- **Accessibility:** Improve keyboard accessibility in `AnnoListPanel`. [#58971](https://github.com/grafana/grafana/pull/58971), [@ashharrison90](https://github.com/ashharrison90)
|
||||
- **Accessibility:** Improve keyboard accessibility in `Collapse`. [#59022](https://github.com/grafana/grafana/pull/59022), [@ashharrison90](https://github.com/ashharrison90)
|
||||
- **Accessibility:** Improve keyboard accessibility in `GettingStarted` panel. [#58966](https://github.com/grafana/grafana/pull/58966), [@ashharrison90](https://github.com/ashharrison90)
|
||||
- **Accessibility:** Improve keyboard accessibility of `FilterPill`. [#58976](https://github.com/grafana/grafana/pull/58976), [@ashharrison90](https://github.com/ashharrison90)
|
||||
- **Admin:** Fix broken links to image assets in email templates. [#58729](https://github.com/grafana/grafana/pull/58729), [@zuchka](https://github.com/zuchka)
|
||||
- **Azure Monitor:** Fix namespace selection for storageaccounts. [#56449](https://github.com/grafana/grafana/pull/56449), [@andresmgot](https://github.com/andresmgot)
|
||||
- **Calcs:** Fix difference percent in legend. [#59243](https://github.com/grafana/grafana/pull/59243), [@zoltanbedi](https://github.com/zoltanbedi)
|
||||
- **DataLinks:** Improve Data-Links AutoComplete Logic. [#58934](https://github.com/grafana/grafana/pull/58934), [@zuchka](https://github.com/zuchka)
|
||||
- **Explore:** Fix a11y issue with logs navigation buttons. [#58944](https://github.com/grafana/grafana/pull/58944), [@Elfo404](https://github.com/Elfo404)
|
||||
- **Heatmap:** Fix blurry text & rendering. [#59260](https://github.com/grafana/grafana/pull/59260), [@leeoniya](https://github.com/leeoniya)
|
||||
- **Heatmap:** Fix tooltip y range of top and bottom buckets in calculated heatmaps. [#59172](https://github.com/grafana/grafana/pull/59172), [@leeoniya](https://github.com/leeoniya)
|
||||
- **Logs:** Fix misalignment of LogRows. [#59279](https://github.com/grafana/grafana/pull/59279), [@svennergr](https://github.com/svennergr)
|
||||
- **Navigation:** Stop clearing search state when opening a result in a new tab. [#58880](https://github.com/grafana/grafana/pull/58880), [@ashharrison90](https://github.com/ashharrison90)
|
||||
- **OptionsUI:** SliderValueEditor does not get auto focused on slider change. [#59209](https://github.com/grafana/grafana/pull/59209), [@eledobleefe](https://github.com/eledobleefe)
|
||||
- **PanelEdit:** Fixes bug with not remembering panel options pane collapse/expand state. [#59265](https://github.com/grafana/grafana/pull/59265), [@torkelo](https://github.com/torkelo)
|
||||
- **Query Caching:** Skip 207 status codes. (Enterprise)
|
||||
- **Quota:** Fix failure in store due to missing scope parameters. [#58874](https://github.com/grafana/grafana/pull/58874), [@papagian](https://github.com/papagian)
|
||||
- **Quota:** Fix failure when checking session limits. [#58865](https://github.com/grafana/grafana/pull/58865), [@papagian](https://github.com/papagian)
|
||||
- **Reports:** Fix time preview. (Enterprise)
|
||||
- **StateTimeline:** Prevent label text from overflowing state rects. [#59169](https://github.com/grafana/grafana/pull/59169), [@leeoniya](https://github.com/leeoniya)
|
||||
- **Tempo:** Fix search table duration unit. [#58642](https://github.com/grafana/grafana/pull/58642), [@joey-grafana](https://github.com/joey-grafana)
|
||||
- **TraceView:** Fix broken rendering when scrolling in Dashboard panel in Firefox. [#56642](https://github.com/grafana/grafana/pull/56642), [@zdg-github](https://github.com/zdg-github)
|
||||
|
||||
### Plugin development fixes & changes
|
||||
|
||||
- **GrafanaUI:** Add disabled option for menu items. [#58980](https://github.com/grafana/grafana/pull/58980), [@going-confetti](https://github.com/going-confetti)
|
||||
|
||||
<!-- 9.3.0 END -->
|
||||
<!-- 9.3.0-beta1 START -->
|
||||
|
||||
# 9.3.0-beta1 (2022-11-15)
|
||||
|
||||
### Features and enhancements
|
||||
|
||||
- **Alerting:** Add Alertmanager choice warning. [#55311](https://github.com/grafana/grafana/pull/55311), [@konrad147](https://github.com/konrad147)
|
||||
- **Alerting:** Add support for linking external images securely - Azure Blob (#1). [#56598](https://github.com/grafana/grafana/pull/56598), [@petr-stupka](https://github.com/petr-stupka)
|
||||
- **Alerting:** Add threshold expression. [#55102](https://github.com/grafana/grafana/pull/55102), [@gillesdemey](https://github.com/gillesdemey)
|
||||
- **Alerting:** Add traceability headers for alert queries. [#57127](https://github.com/grafana/grafana/pull/57127), [@alexweav](https://github.com/alexweav)
|
||||
- **Alerting:** Allow none provenance alert rule creation from provisioning API. [#58410](https://github.com/grafana/grafana/pull/58410), [@alexmobo](https://github.com/alexmobo)
|
||||
- **Alerting:** Cache result of dashboard ID lookups. [#56587](https://github.com/grafana/grafana/pull/56587), [@alexweav](https://github.com/alexweav)
|
||||
- **Alerting:** Expressions pipeline redesign. [#54601](https://github.com/grafana/grafana/pull/54601), [@gillesdemey](https://github.com/gillesdemey)
|
||||
- **Alerting:** Fall back to "range" query type for unified alerting when "both" is specified. [#57288](https://github.com/grafana/grafana/pull/57288), [@gillesdemey](https://github.com/gillesdemey)
|
||||
- **Alerting:** Implement the Webex notifier. [#58480](https://github.com/grafana/grafana/pull/58480), [@gotjosh](https://github.com/gotjosh)
|
||||
- **Alerting:** Improve group modal with validation on evaluation interval. [#57830](https://github.com/grafana/grafana/pull/57830), [@soniaAguilarPeiron](https://github.com/soniaAguilarPeiron)
|
||||
- **Alerting:** Persist annotations from multidimensional rules in batches. [#56575](https://github.com/grafana/grafana/pull/56575), [@alexweav](https://github.com/alexweav)
|
||||
- **Alerting:** Query time logging. [#57585](https://github.com/grafana/grafana/pull/57585), [@konrad147](https://github.com/konrad147)
|
||||
- **Alerting:** Remove the alert manager selection from the data source configuration. [#57369](https://github.com/grafana/grafana/pull/57369), [@VikaCep](https://github.com/VikaCep)
|
||||
- **Alerting:** Remove the alert manager selection from the data source configuration. [#56460](https://github.com/grafana/grafana/pull/56460), [@gitstart](https://github.com/gitstart)
|
||||
- **Alerting:** Support values in notification templates. [#56457](https://github.com/grafana/grafana/pull/56457), [@grobinson-grafana](https://github.com/grobinson-grafana)
|
||||
- **Alerting:** Templated URLs for webhook type contact points. [#57296](https://github.com/grafana/grafana/pull/57296), [@santihernandezc](https://github.com/santihernandezc)
|
||||
- **Annotations:** Disable "Add annotation" button when annotations are disabled. [#57481](https://github.com/grafana/grafana/pull/57481), [@ryantxu](https://github.com/ryantxu)
|
||||
- **Auth:** Add validation and ingestion of conflict file. [#53014](https://github.com/grafana/grafana/pull/53014), [@eleijonmarck](https://github.com/eleijonmarck)
|
||||
- **Auth:** Make built-in login configurable. [#46978](https://github.com/grafana/grafana/pull/46978), [@TsotosA](https://github.com/TsotosA)
|
||||
- **Auth:** Refresh OAuth access_token automatically using the refresh_token. [#56076](https://github.com/grafana/grafana/pull/56076), [@mgyongyosi](https://github.com/mgyongyosi)
|
||||
- **Auth:** Validate Azure ID token version on login is not v1. [#58088](https://github.com/grafana/grafana/pull/58088), [@Jguer](https://github.com/Jguer)
|
||||
- **BackendSrv:** Make it possible to pass `options` to `.get|post|patch...` methods. [#51316](https://github.com/grafana/grafana/pull/51316), [@leventebalogh](https://github.com/leventebalogh)
|
||||
- **Canvas:** Add tabs to inline editor. [#57778](https://github.com/grafana/grafana/pull/57778), [@adela-almasan](https://github.com/adela-almasan)
|
||||
- **Canvas:** Extend root context menu. [#58097](https://github.com/grafana/grafana/pull/58097), [@adela-almasan](https://github.com/adela-almasan)
|
||||
- **Chore:** Switch Grafana to using faro libraries. [#58186](https://github.com/grafana/grafana/pull/58186), [@tolzhabayev](https://github.com/tolzhabayev)
|
||||
- **Chore:** Use strings.ReplaceAll and preallocate containers. [#58483](https://github.com/grafana/grafana/pull/58483), [@sashamelentyev](https://github.com/sashamelentyev)
|
||||
- **CloudWatch:** Cache resource request responses in the browser. [#57082](https://github.com/grafana/grafana/pull/57082), [@sunker](https://github.com/sunker)
|
||||
- **Config:** Change jwt config value to be "expect_claims". [#58284](https://github.com/grafana/grafana/pull/58284), [@conorevans](https://github.com/conorevans)
|
||||
- **Configuration:** Update ssl_mode documentation in sample.ini to match default.ini. [#55138](https://github.com/grafana/grafana/pull/55138), [@alecxvs](https://github.com/alecxvs)
|
||||
- **Correlations:** Add query editor and target field to settings page. [#55567](https://github.com/grafana/grafana/pull/55567), [@Elfo404](https://github.com/Elfo404)
|
||||
- **Dashboard:** Record the number of cached queries for usage insights. [#56050](https://github.com/grafana/grafana/pull/56050), [@juanicabanas](https://github.com/juanicabanas)
|
||||
- **Dashboard:** Record the number of cached queries for usage insights. (Enterprise)
|
||||
- **Datasources:** Support mixed datasources in a single query. [#56832](https://github.com/grafana/grafana/pull/56832), [@mmandrus](https://github.com/mmandrus)
|
||||
- **Docs:** Add documentation for Custom Branding on Public Dashboards. [#58090](https://github.com/grafana/grafana/pull/58090), [@leandro-deveikis](https://github.com/leandro-deveikis)
|
||||
- **Docs:** Add missing documentation for enterprise features. [#56753](https://github.com/grafana/grafana/pull/56753), [@mmandrus](https://github.com/mmandrus)
|
||||
- **Docs:** Clarify that audit logs are generated only for API requests. [#57521](https://github.com/grafana/grafana/pull/57521), [@spinillos](https://github.com/spinillos)
|
||||
- **Echo:** Add config option to prevent duplicate page views for GA4. [#57619](https://github.com/grafana/grafana/pull/57619), [@tolzhabayev](https://github.com/tolzhabayev)
|
||||
- **Elasticsearch:** Add trace to logs functionality. [#58063](https://github.com/grafana/grafana/pull/58063), [@ivanahuckova](https://github.com/ivanahuckova)
|
||||
- **Elasticsearch:** Reuse http client in the backend. [#55172](https://github.com/grafana/grafana/pull/55172), [@gabor](https://github.com/gabor)
|
||||
- **Explore:** Add tracesToMetrics span time shift options (#54710). [#55335](https://github.com/grafana/grafana/pull/55335), [@hanjm](https://github.com/hanjm)
|
||||
- **Explore:** Logs volume histogram: always start Y axis from zero. [#56200](https://github.com/grafana/grafana/pull/56200), [@gabor](https://github.com/gabor)
|
||||
- **Explore:** Remove explore2Dashboard feature toggle. [#58329](https://github.com/grafana/grafana/pull/58329), [@Elfo404](https://github.com/Elfo404)
|
||||
- **Explore:** Support fields interpolation in logs panel. [#58426](https://github.com/grafana/grafana/pull/58426), [@ifrost](https://github.com/ifrost)
|
||||
- **Frontend Routing:** Always render standalone plugin pages using the `<AppRootPage>`. [#57771](https://github.com/grafana/grafana/pull/57771), [@leventebalogh](https://github.com/leventebalogh)
|
||||
- **GRPC Server:** Add gRPC server service. [#47849](https://github.com/grafana/grafana/pull/47849), [@FZambia](https://github.com/FZambia)
|
||||
- **Geomap:** Add photo layer. [#57307](https://github.com/grafana/grafana/pull/57307), [@drew08t](https://github.com/drew08t)
|
||||
- **Geomap:** Upgrade to openlayers 7.x. [#57317](https://github.com/grafana/grafana/pull/57317), [@ryantxu](https://github.com/ryantxu)
|
||||
- **GrafanaData:** Deprecate logs functions. [#56077](https://github.com/grafana/grafana/pull/56077), [@gabor](https://github.com/gabor)
|
||||
- **GrafanaData:** Deprecate the LogsParser type. [#56242](https://github.com/grafana/grafana/pull/56242), [@gabor](https://github.com/gabor)
|
||||
- **Kindsys:** Introduce Kind framework. [#56492](https://github.com/grafana/grafana/pull/56492), [@sdboyer](https://github.com/sdboyer)
|
||||
- **LDAP:** Add `skip_org_role_sync` configuration option. [#56792](https://github.com/grafana/grafana/pull/56792), [@grafanabot](https://github.com/grafanabot)
|
||||
- **LDAP:** Add `skip_org_role_sync` configuration option. [#56679](https://github.com/grafana/grafana/pull/56679), [@gamab](https://github.com/gamab)
|
||||
- **LDAPSync:** Improve performance of sync and make it case insensitive. (Enterprise)
|
||||
- **LibraryPanels:** Load library panels in the frontend rather than the backend. [#50560](https://github.com/grafana/grafana/pull/50560), [@ryantxu](https://github.com/ryantxu)
|
||||
- **LogContext:** Add header and close button to modal. [#56283](https://github.com/grafana/grafana/pull/56283), [@svennergr](https://github.com/svennergr)
|
||||
- **LogContext:** Improve text describing the loglines. [#55475](https://github.com/grafana/grafana/pull/55475), [@svennergr](https://github.com/svennergr)
|
||||
- **Logs:** Allow collapsing the logs volume histogram. [#52808](https://github.com/grafana/grafana/pull/52808), [@gabor](https://github.com/gabor)
|
||||
- **Logs:** Center `show context` modal on click. [#55989](https://github.com/grafana/grafana/pull/55989), [@svennergr](https://github.com/svennergr)
|
||||
- **Logs:** Center `show context` modal on click. [#55405](https://github.com/grafana/grafana/pull/55405), [@svennergr](https://github.com/svennergr)
|
||||
- **Logs:** Show LogRowMenu also for long logs and wrap-lines turned off. [#56030](https://github.com/grafana/grafana/pull/56030), [@svennergr](https://github.com/svennergr)
|
||||
- **LogsContext:** Added button to load 10 more log lines. [#55923](https://github.com/grafana/grafana/pull/55923), [@svennergr](https://github.com/svennergr)
|
||||
- **Loki:** Add case insensitive line contains operation. [#58177](https://github.com/grafana/grafana/pull/58177), [@gwdawson](https://github.com/gwdawson)
|
||||
- **Loki:** Monaco Query Editor enabled by default. [#58080](https://github.com/grafana/grafana/pull/58080), [@matyax](https://github.com/matyax)
|
||||
- **Loki:** Redesign and improve query patterns. [#55097](https://github.com/grafana/grafana/pull/55097), [@ivanahuckova](https://github.com/ivanahuckova)
|
||||
- **Loki:** Rename log browser to label browser. [#58416](https://github.com/grafana/grafana/pull/58416), [@gwdawson](https://github.com/gwdawson)
|
||||
- **Loki:** Show invalid fields in label filter. [#55751](https://github.com/grafana/grafana/pull/55751), [@ivanahuckova](https://github.com/ivanahuckova)
|
||||
- **MSSQL:** Add connection timeout setting in configuration page. [#58631](https://github.com/grafana/grafana/pull/58631), [@mdvictor](https://github.com/mdvictor)
|
||||
- **Navigation:** Add `pluginId` to standalone plugin page NavLinks. [#57769](https://github.com/grafana/grafana/pull/57769), [@leventebalogh](https://github.com/leventebalogh)
|
||||
- **Navigation:** Expose new props to extend `Page`/`PluginPage`. [#58465](https://github.com/grafana/grafana/pull/58465), [@ashharrison90](https://github.com/ashharrison90)
|
||||
- **Navtree:** Make it possible to configure standalone plugin pages. [#56393](https://github.com/grafana/grafana/pull/56393), [@leventebalogh](https://github.com/leventebalogh)
|
||||
- **Node Graph:** Always show context menu. [#56876](https://github.com/grafana/grafana/pull/56876), [@joey-grafana](https://github.com/joey-grafana)
|
||||
- **Number formatting:** Strip trailing zeros after decimal point when decimals=auto. [#57373](https://github.com/grafana/grafana/pull/57373), [@leeoniya](https://github.com/leeoniya)
|
||||
- **OAuth:** Feature toggle for access token expiration check and docs. [#58179](https://github.com/grafana/grafana/pull/58179), [@mgyongyosi](https://github.com/mgyongyosi)
|
||||
- **Opentsdb:** Allow template variables for filter keys. [#57226](https://github.com/grafana/grafana/pull/57226), [@bohandley](https://github.com/bohandley)
|
||||
- **PanelEdit:** Allow test id to be passed to panel editors. [#55417](https://github.com/grafana/grafana/pull/55417), [@mckn](https://github.com/mckn)
|
||||
- **Plugins:** Add hook to make it easier to track interactions in plugins. [#56126](https://github.com/grafana/grafana/pull/56126), [@mckn](https://github.com/mckn)
|
||||
- **Plugins:** Introduce new Flame graph panel. [#56376](https://github.com/grafana/grafana/pull/56376), [@joey-grafana](https://github.com/joey-grafana)
|
||||
- **Plugins:** Make "README" the default markdown request param. [#58264](https://github.com/grafana/grafana/pull/58264), [@wbrowne](https://github.com/wbrowne)
|
||||
- **PostgreSQL:** Migrate to React. [#52831](https://github.com/grafana/grafana/pull/52831), [@zoltanbedi](https://github.com/zoltanbedi)
|
||||
- **Preferences:** Create indices. [#48356](https://github.com/grafana/grafana/pull/48356), [@sakjur](https://github.com/sakjur)
|
||||
- **Profiling:** Add Phlare and Parca datasources. [#57809](https://github.com/grafana/grafana/pull/57809), [@aocenas](https://github.com/aocenas)
|
||||
- **Prometheus:** Handle errors and warnings in buffered client. [#58504](https://github.com/grafana/grafana/pull/58504), [@itsmylife](https://github.com/itsmylife)
|
||||
- **Prometheus:** Make Prometheus streaming parser as default client. [#58365](https://github.com/grafana/grafana/pull/58365), [@itsmylife](https://github.com/itsmylife)
|
||||
- **Public Dashboards:** Add audit table. [#54508](https://github.com/grafana/grafana/pull/54508), [@jalevin](https://github.com/jalevin)
|
||||
- **PublicDashboards:** Add PubDash support to Angular panel plugins. [#57293](https://github.com/grafana/grafana/pull/57293), [@mmandrus](https://github.com/mmandrus)
|
||||
- **PublicDashboards:** Add annotations support. [#56413](https://github.com/grafana/grafana/pull/56413), [@owensmallwood](https://github.com/owensmallwood)
|
||||
- **PublicDashboards:** Add custom branding for Public Dashboard. (Enterprise)
|
||||
- **PublicDashboards:** Add delete public dashboard button in public dashboard modal. [#58095](https://github.com/grafana/grafana/pull/58095), [@juanicabanas](https://github.com/juanicabanas)
|
||||
- **PublicDashboards:** Cached queries column added in public dashboard insight query. (Enterprise)
|
||||
- **PublicDashboards:** Can toggle annotations in modal. [#57312](https://github.com/grafana/grafana/pull/57312), [@owensmallwood](https://github.com/owensmallwood)
|
||||
- **PublicDashboards:** Delete public dashboard in public dashboard table. [#57766](https://github.com/grafana/grafana/pull/57766), [@juanicabanas](https://github.com/juanicabanas)
|
||||
- **PublicDashboards:** Delete public dashboard when dashboard is deleted. [#57291](https://github.com/grafana/grafana/pull/57291), [@juanicabanas](https://github.com/juanicabanas)
|
||||
- **PublicDashboards:** Extract config of Public Dashboard. [#57788](https://github.com/grafana/grafana/pull/57788), [@leandro-deveikis](https://github.com/leandro-deveikis)
|
||||
- **PublicDashboards:** Hide top navigation bar. [#56873](https://github.com/grafana/grafana/pull/56873), [@evictorero](https://github.com/evictorero)
|
||||
- **PublicDashboards:** Make mixed datasource calls concurrently. [#56421](https://github.com/grafana/grafana/pull/56421), [@juanicabanas](https://github.com/juanicabanas)
|
||||
- **PublicDashboards:** Orphaned public dashboard item list modified. [#58014](https://github.com/grafana/grafana/pull/58014), [@juanicabanas](https://github.com/juanicabanas)
|
||||
- **PublicDashboards:** Rename PubdashFooter frontend component. [#58137](https://github.com/grafana/grafana/pull/58137), [@leandro-deveikis](https://github.com/leandro-deveikis)
|
||||
- **PublicDashboards:** Update docs with supported datasources. [#57629](https://github.com/grafana/grafana/pull/57629), [@owensmallwood](https://github.com/owensmallwood)
|
||||
- **PublicDashboards:** Validate access token. [#57298](https://github.com/grafana/grafana/pull/57298), [@leandro-deveikis](https://github.com/leandro-deveikis)
|
||||
- **PublicDashboards:** Validate access token not to be duplicated and add retries. [#56755](https://github.com/grafana/grafana/pull/56755), [@juanicabanas](https://github.com/juanicabanas)
|
||||
- **RBAC:** Improve performance of dashboard filter query. [#56813](https://github.com/grafana/grafana/pull/56813), [@kalleep](https://github.com/kalleep)
|
||||
- **Rendering:** Add configuration options for `renderKey` lifetime. [#57339](https://github.com/grafana/grafana/pull/57339), [@Willena](https://github.com/Willena)
|
||||
- **Reports:** Dynamic scale factor per report. (Enterprise)
|
||||
- **SAML:** Set cookie option SameSite=none and Secure=true. (Enterprise)
|
||||
- **SQLStore:** Optionally retry queries if sqlite returns database is locked. [#56096](https://github.com/grafana/grafana/pull/56096), [@papagian](https://github.com/papagian)
|
||||
- **Server:** Make unix socket permission configurable. [#52944](https://github.com/grafana/grafana/pull/52944), [@unknowndevQwQ](https://github.com/unknowndevQwQ)
|
||||
- **Tempo:** Add start time and end time parameters while querying traces. [#48068](https://github.com/grafana/grafana/pull/48068), [@bikashmishra100](https://github.com/bikashmishra100)
|
||||
- **TimeSeries:** Render null-bounded points at data edges. [#57798](https://github.com/grafana/grafana/pull/57798), [@leeoniya](https://github.com/leeoniya)
|
||||
- **Tracing:** Allow trace to logs for OpenSearch. [#58161](https://github.com/grafana/grafana/pull/58161), [@gabor](https://github.com/gabor)
|
||||
- **Transformers:** PartitionByValues. [#56767](https://github.com/grafana/grafana/pull/56767), [@leeoniya](https://github.com/leeoniya)
|
||||
- **UsageStats:** Add traces when sending usage stats. [#55474](https://github.com/grafana/grafana/pull/55474), [@sakjur](https://github.com/sakjur)
|
||||
|
||||
### Bug fixes
|
||||
|
||||
- **Alerting:** Fix mathexp.NoData in ConditionsCmd. [#56812](https://github.com/grafana/grafana/pull/56812), [@grobinson-grafana](https://github.com/grobinson-grafana)
|
||||
- **BarChart:** Fix coloring from thresholds and value mappings. [#58285](https://github.com/grafana/grafana/pull/58285), [@leeoniya](https://github.com/leeoniya)
|
||||
- **BarChart:** Fix stacked hover. [#57711](https://github.com/grafana/grafana/pull/57711), [@leeoniya](https://github.com/leeoniya)
|
||||
- **Explore:** Fix shared crosshair for logs, logsvolume and graph panels. [#57892](https://github.com/grafana/grafana/pull/57892), [@Elfo404](https://github.com/Elfo404)
|
||||
- **Flame Graph:** Exact search. [#56769](https://github.com/grafana/grafana/pull/56769), [@joey-grafana](https://github.com/joey-grafana)
|
||||
- **Flame Graph:** Fix for dashboard scrolling. [#56555](https://github.com/grafana/grafana/pull/56555), [@joey-grafana](https://github.com/joey-grafana)
|
||||
- **LogContext:** Fix scroll behavior in context modal. [#56070](https://github.com/grafana/grafana/pull/56070), [@svennergr](https://github.com/svennergr)
|
||||
- **Loki:** Fix showing of history of querying in query editor. [#57344](https://github.com/grafana/grafana/pull/57344), [@ivanahuckova](https://github.com/ivanahuckova)
|
||||
- **OAuth:** Fix misleading warn log related to oauth and increase logged content. [#57336](https://github.com/grafana/grafana/pull/57336), [@Jguer](https://github.com/Jguer)
|
||||
- **Plugins:** Plugin details page visual alignment issues. [#57729](https://github.com/grafana/grafana/issues/57729)
|
||||
- **PublicDashboards:** Fix GET public dashboard that doesn't match. [#57571](https://github.com/grafana/grafana/pull/57571), [@juanicabanas](https://github.com/juanicabanas)
|
||||
- **PublicDashboards:** Fix annotations error for public dashboards. [#57455](https://github.com/grafana/grafana/pull/57455), [@leandro-deveikis](https://github.com/leandro-deveikis)
|
||||
- **PublicDashboards:** Fix granularity discrepancy between public and original dashboard. [#57129](https://github.com/grafana/grafana/pull/57129), [@guicaulada](https://github.com/guicaulada)
|
||||
- **PublicDashboards:** Fix granularity issue caused by query caching. (Enterprise)
|
||||
- **PublicDashboards:** Fix hidden queries execution. (Enterprise)
|
||||
- **RBAC:** Add primary key to seed_assignment table. [#56540](https://github.com/grafana/grafana/pull/56540), [@kalleep](https://github.com/kalleep)
|
||||
- **Tempo:** Fix search removing service name from query. [#58630](https://github.com/grafana/grafana/pull/58630), [@joey-grafana](https://github.com/joey-grafana)
|
||||
- **TimeRangeInput:** Fix clear button type. [#56545](https://github.com/grafana/grafana/pull/56545), [@Clarity-89](https://github.com/Clarity-89)
|
||||
|
||||
### Breaking changes
|
||||
|
||||
Removes the unused close-milestone command from `@grafana/toolkit`. Issue [#57062](https://github.com/grafana/grafana/issues/57062)
|
||||
|
||||
@grafana/toolkit `cherrypick` command was removed. Issue [#56114](https://github.com/grafana/grafana/issues/56114)
|
||||
|
||||
`EmotionPerfTest` is no longer exported from the `@grafana/ui` bundle. Issue [#56100](https://github.com/grafana/grafana/issues/56100)
|
||||
|
||||
Removing the unused `changelog` command in `@grafana/toolkit`. Issue [#56073](https://github.com/grafana/grafana/issues/56073)
|
||||
|
||||
### Deprecations
|
||||
|
||||
The interface type `LogsParser` in `grafana-data` is deprecated. Issue [#56242](https://github.com/grafana/grafana/issues/56242)
|
||||
|
||||
The following functions and classes related to logs are deprecated in the `grafana-ui` package: `getLogLevel`, `getLogLevelFromKey`, `addLogLevelToSeries`, `LogsParsers`, `calculateFieldStats`, `calculateLogsLabelStats`, `calculateStats`, `getParser`, `sortInAscendingOrder`, `sortInDescendingOrder`, `sortLogsResult`, `sortLogRows`, `checkLogsError`, `escapeUnescapedString`. Issue [#56077](https://github.com/grafana/grafana/issues/56077)
|
||||
|
||||
### Plugin development fixes & changes
|
||||
|
||||
- **Toolkit:** Deprecate `plugin:update-circleci` command. [#57743](https://github.com/grafana/grafana/pull/57743), [@academo](https://github.com/academo)
|
||||
- **Toolkit:** Deprecate `plugin:github-publish` command. [#57726](https://github.com/grafana/grafana/pull/57726), [@academo](https://github.com/academo)
|
||||
- **Toolkit:** Deprecate `plugin:bundle-managed` command and move its functionality to a bash script. [#57719](https://github.com/grafana/grafana/pull/57719), [@academo](https://github.com/academo)
|
||||
- **Toolkit:** Deprecate and replace toolkit:build with plain yarn scripts. [#57620](https://github.com/grafana/grafana/pull/57620), [@academo](https://github.com/academo)
|
||||
- **Toolkit:** Deprecate node-version-check command. [#57591](https://github.com/grafana/grafana/pull/57591), [@academo](https://github.com/academo)
|
||||
- **Toolkit:** Deprecate searchTestData command. [#57589](https://github.com/grafana/grafana/pull/57589), [@academo](https://github.com/academo)
|
||||
- **Toolkit:** Remove unused close-milestone command. [#57062](https://github.com/grafana/grafana/pull/57062), [@academo](https://github.com/academo)
|
||||
- **Toolkit:** Remove unused legacy cherrypick command. [#56114](https://github.com/grafana/grafana/pull/56114), [@academo](https://github.com/academo)
|
||||
- **Grafana UI:** Clean up bundle. [#56100](https://github.com/grafana/grafana/pull/56100), [@jackw](https://github.com/jackw)
|
||||
- **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.10 START -->
|
||||
|
||||
# 9.2.10 (2023-01-24)
|
||||
|
||||
### Features and enhancements
|
||||
|
||||
- **TextPanel:** Refactor to functional component (#60885). [#61940](https://github.com/grafana/grafana/pull/61940), [@ryantxu](https://github.com/ryantxu)
|
||||
- **[v9.2.x] Chore:** Upgrade Go to 1.19.4. [#60826](https://github.com/grafana/grafana/pull/60826), [@sakjur](https://github.com/sakjur)
|
||||
|
||||
### Bug fixes
|
||||
|
||||
- **Live:** Fix `Subscription to the channel already exists` live streaming error. [#61420](https://github.com/grafana/grafana/pull/61420), [@grafanabot](https://github.com/grafanabot)
|
||||
- **Live:** Fix `Subscription to the channel already exists` live streaming error. [#61419](https://github.com/grafana/grafana/pull/61419), [@grafanabot](https://github.com/grafanabot)
|
||||
- **Live:** Fix `Subscription to the channel already exists` live streaming error. [#61406](https://github.com/grafana/grafana/pull/61406), [@ArturWierzbicki](https://github.com/ArturWierzbicki)
|
||||
|
||||
<!-- 9.2.10 END -->
|
||||
|
||||
<!-- 9.2.7 START -->
|
||||
|
||||
# 9.2.7 (2022-11-29)
|
||||
|
||||
### Bug fixes
|
||||
|
||||
- **Access Control:** Clear user's permission cache after resource creation. [#59318](https://github.com/grafana/grafana/pull/59318), [@IevaVasiljeva](https://github.com/IevaVasiljeva)
|
||||
- **Azure Monitor:** Fix empty/errored responses for Logs variables. [#59240](https://github.com/grafana/grafana/pull/59240), [@andresmgot](https://github.com/andresmgot)
|
||||
- **Azure Monitor:** Fix resource picker selection for subresources. [#56392](https://github.com/grafana/grafana/pull/56392), [@andresmgot](https://github.com/andresmgot)
|
||||
- **Navigation:** Fix crash when Help is disabled. [#58919](https://github.com/grafana/grafana/pull/58919), [@lpskdl](https://github.com/lpskdl)
|
||||
- **PostgreSQL:** Fix missing CA field from configuration. [#59280](https://github.com/grafana/grafana/pull/59280), [@oscarkilhed](https://github.com/oscarkilhed)
|
||||
- **SQL Datasources:** Fix annotation migration. [#59438](https://github.com/grafana/grafana/pull/59438), [@zoltanbedi](https://github.com/zoltanbedi)
|
||||
- **SQL:** Fix code editor for SQL datasources. [#58116](https://github.com/grafana/grafana/pull/58116), [@zoltanbedi](https://github.com/zoltanbedi)
|
||||
- **SSE:** Make sure to forward headers, user and cookies/OAuth token. [#58897](https://github.com/grafana/grafana/pull/58897), [@kylebrandt](https://github.com/kylebrandt)
|
||||
- **TimeseriesPanel:** Preserve string fields for data link interpolation. [#58424](https://github.com/grafana/grafana/pull/58424), [@mdvictor](https://github.com/mdvictor)
|
||||
|
||||
<!-- 9.2.7 END -->
|
||||
|
||||
<!-- 9.2.6 START -->
|
||||
|
||||
# 9.2.6 (2022-11-22)
|
||||
@@ -802,7 +15,6 @@ The following functions and classes related to logs are deprecated in the `grafa
|
||||
- **Server:** Write internal server error on missing write. [#57813](https://github.com/grafana/grafana/pull/57813), [@sakjur](https://github.com/sakjur)
|
||||
|
||||
<!-- 9.2.6 END -->
|
||||
|
||||
<!-- 9.2.5 START -->
|
||||
|
||||
# 9.2.5 (2022-11-16)
|
||||
@@ -830,7 +42,6 @@ The following functions and classes related to logs are deprecated in the `grafa
|
||||
- **Tooltips:** Make tooltips in FormField and FormLabel interactive and keyboard friendly. [#57706](https://github.com/grafana/grafana/pull/57706), [@asimpson](https://github.com/asimpson)
|
||||
|
||||
<!-- 9.2.5 END -->
|
||||
<!-- 9.3.0-beta1 END -->
|
||||
<!-- 9.2.4 START -->
|
||||
|
||||
# 9.2.4 (2022-11-07)
|
||||
@@ -1216,27 +427,6 @@ Issue [#55364](https://github.com/grafana/grafana/issues/55364)
|
||||
- **CustomScrollbar:** Add optional scroll indicators to `CustomScrollbar`. [#54705](https://github.com/grafana/grafana/pull/54705), [@ashharrison90](https://github.com/ashharrison90)
|
||||
- **Build:** Introduce ESM and Treeshaking to NPM package builds. [#51517](https://github.com/grafana/grafana/pull/51517), [@jackw](https://github.com/jackw)
|
||||
|
||||
<!-- 9.1.8 START -->
|
||||
|
||||
# 9.1.8 (2022-10-11)
|
||||
|
||||
### Features and enhancements
|
||||
|
||||
- **Alerting:** Update imported prometheus alertmanager version. Backport (#56228). [#56429](https://github.com/grafana/grafana/pull/56429), [@joeblubaugh](https://github.com/joeblubaugh)
|
||||
- **Chore:** Upgrade Go to 1.19.2. [#56355](https://github.com/grafana/grafana/pull/56355), [@sakjur](https://github.com/sakjur)
|
||||
|
||||
### Bug fixes
|
||||
|
||||
- **Alerting:** Fix evaluation interval validation. [#56115](https://github.com/grafana/grafana/pull/56115), [@konrad147](https://github.com/konrad147)
|
||||
- **Alerting:** Fix migration to create rules with group index 1. [#56511](https://github.com/grafana/grafana/pull/56511), [@yuri-tceretian](https://github.com/yuri-tceretian)
|
||||
- **Alerting:** Fix migration to not add label "alertname". [#56509](https://github.com/grafana/grafana/pull/56509), [@yuri-tceretian](https://github.com/yuri-tceretian)
|
||||
- **Azure Monitor:** Fix empty Logs response for Alerting. [#56378](https://github.com/grafana/grafana/pull/56378), [@andresmgot](https://github.com/andresmgot)
|
||||
- **Azure Monitor:** Fix subscription selector when changing data sources. [#56284](https://github.com/grafana/grafana/pull/56284), [@andresmgot](https://github.com/andresmgot)
|
||||
- **Caching:** Fix wrong memcached setting name in defaults. (Enterprise)
|
||||
- **Google Cloud Monitoring:** Fix bucket bound for distributions. [#56565](https://github.com/grafana/grafana/pull/56565), [@andresmgot](https://github.com/andresmgot)
|
||||
|
||||
<!-- 9.1.8 END -->
|
||||
|
||||
<!-- 9.1.7 START -->
|
||||
|
||||
# 9.1.7 (2022-10-04)
|
||||
@@ -2432,36 +1622,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.20 START -->
|
||||
|
||||
# 8.5.20 (2023-01-25)
|
||||
|
||||
### Features and enhancements
|
||||
|
||||
- **Chore:** Upgrade Go to 1.19.4 [v8.5.x]. [#60824](https://github.com/grafana/grafana/pull/60824), [@sakjur](https://github.com/sakjur)
|
||||
|
||||
<!-- 8.5.20 END -->
|
||||
|
||||
<!-- 8.5.15 START -->
|
||||
|
||||
# 8.5.15 (2022-11-08)
|
||||
|
||||
### Features and enhancements
|
||||
|
||||
- **Chore:** Upgrade Go to 1.19.2. [#56857](https://github.com/grafana/grafana/pull/56857), [@sakjur](https://github.com/sakjur)
|
||||
|
||||
<!-- 8.5.15 END -->
|
||||
|
||||
<!-- 8.5.14 START -->
|
||||
|
||||
# 8.5.14 (2022-10-11)
|
||||
|
||||
### Features and enhancements
|
||||
|
||||
- **Access Control:** Allow org admins to invite new users. [#55585](https://github.com/grafana/grafana/pull/55585), [@IevaVasiljeva](https://github.com/IevaVasiljeva)
|
||||
|
||||
<!-- 8.5.14 END -->
|
||||
|
||||
<!-- 8.5.13 START -->
|
||||
|
||||
# 8.5.13 (2022-09-20)
|
||||
|
||||
@@ -15,8 +15,6 @@ You can contribute to Grafana in several ways. Here are some examples:
|
||||
- Organize meetups and user groups in your local area.
|
||||
- Help others by answering questions about Grafana.
|
||||
|
||||
**Please note:** We do not currently accept contributions for translations. Please do not submit pull requests for messages.po files - they will be rejected.
|
||||
|
||||
For more ways to contribute, check out the [Open Source Guides](https://opensource.guide/how-to-contribute/).
|
||||
|
||||
### Report bugs
|
||||
|
||||
162
Dockerfile
162
Dockerfile
@@ -1,17 +1,8 @@
|
||||
# syntax=docker/dockerfile:1
|
||||
|
||||
ARG BASE_IMAGE=alpine:3.17
|
||||
ARG JS_IMAGE=node:18-alpine3.17
|
||||
ARG GO_IMAGE=golang:1.20.4-alpine3.17
|
||||
|
||||
ARG GO_SRC=go-builder
|
||||
ARG JS_SRC=js-builder
|
||||
|
||||
FROM ${JS_IMAGE} as js-builder
|
||||
FROM node:16-alpine3.15 as js-builder
|
||||
|
||||
ENV NODE_OPTIONS=--max_old_space_size=8000
|
||||
|
||||
WORKDIR /tmp/grafana
|
||||
WORKDIR /grafana
|
||||
|
||||
COPY package.json yarn.lock .yarnrc.yml ./
|
||||
COPY .yarn .yarn
|
||||
@@ -22,145 +13,82 @@ RUN yarn install
|
||||
|
||||
COPY tsconfig.json .eslintrc .editorconfig .browserslistrc .prettierrc.js babel.config.json .linguirc ./
|
||||
COPY public public
|
||||
COPY tools tools
|
||||
COPY scripts scripts
|
||||
COPY emails emails
|
||||
|
||||
ENV NODE_ENV production
|
||||
RUN yarn build
|
||||
|
||||
FROM ${GO_IMAGE} as go-builder
|
||||
FROM golang:1.19.3-alpine3.15 as go-builder
|
||||
|
||||
# Install build dependencies
|
||||
RUN if grep -i -q alpine /etc/issue; then \
|
||||
apk add --no-cache gcc g++ make; \
|
||||
fi
|
||||
RUN apk add --no-cache gcc g++ make
|
||||
|
||||
WORKDIR /tmp/grafana
|
||||
WORKDIR /grafana
|
||||
|
||||
COPY go.* ./
|
||||
COPY .bingo .bingo
|
||||
|
||||
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 go.mod go.sum embed.go Makefile build.go package.json ./
|
||||
COPY packages/grafana-schema packages/grafana-schema
|
||||
COPY public/app/plugins public/app/plugins
|
||||
COPY public/api-spec.json public/api-spec.json
|
||||
COPY pkg pkg
|
||||
COPY scripts scripts
|
||||
COPY conf conf
|
||||
COPY .github .github
|
||||
COPY LICENSE ./
|
||||
COPY cue.mod cue.mod
|
||||
COPY .bingo .bingo
|
||||
|
||||
RUN go mod verify
|
||||
RUN make build-go
|
||||
|
||||
FROM ${BASE_IMAGE} as tgz-builder
|
||||
|
||||
WORKDIR /tmp/grafana
|
||||
|
||||
ARG GRAFANA_TGZ="grafana-latest.linux-x64-musl.tar.gz"
|
||||
|
||||
COPY ${GRAFANA_TGZ} /tmp/grafana.tar.gz
|
||||
|
||||
# add -v to make tar print every file it extracts
|
||||
RUN tar x -z -f /tmp/grafana.tar.gz --strip-components=1
|
||||
|
||||
# helpers for COPY --from
|
||||
FROM ${GO_SRC} as go-src
|
||||
FROM ${JS_SRC} as js-src
|
||||
|
||||
# Final stage
|
||||
FROM ${BASE_IMAGE}
|
||||
FROM alpine:3.15.6
|
||||
|
||||
LABEL maintainer="Grafana Labs <hello@grafana.com>"
|
||||
LABEL maintainer="Grafana team <hello@grafana.com>"
|
||||
|
||||
ARG GF_UID="472"
|
||||
ARG GF_GID="0"
|
||||
|
||||
ENV PATH="/usr/share/grafana/bin:$PATH" \
|
||||
GF_PATHS_CONFIG="/etc/grafana/grafana.ini" \
|
||||
GF_PATHS_DATA="/var/lib/grafana" \
|
||||
GF_PATHS_HOME="/usr/share/grafana" \
|
||||
GF_PATHS_LOGS="/var/log/grafana" \
|
||||
GF_PATHS_PLUGINS="/var/lib/grafana/plugins" \
|
||||
GF_PATHS_PROVISIONING="/etc/grafana/provisioning"
|
||||
GF_PATHS_CONFIG="/etc/grafana/grafana.ini" \
|
||||
GF_PATHS_DATA="/var/lib/grafana" \
|
||||
GF_PATHS_HOME="/usr/share/grafana" \
|
||||
GF_PATHS_LOGS="/var/log/grafana" \
|
||||
GF_PATHS_PLUGINS="/var/lib/grafana/plugins" \
|
||||
GF_PATHS_PROVISIONING="/etc/grafana/provisioning"
|
||||
|
||||
WORKDIR $GF_PATHS_HOME
|
||||
|
||||
# Install dependencies
|
||||
RUN if grep -i -q alpine /etc/issue; then \
|
||||
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 && \
|
||||
apt-get update && \
|
||||
apt-get install -y ca-certificates curl tzdata musl && \
|
||||
apt-get autoremove -y && \
|
||||
rm -rf /var/lib/apt/lists/*; \
|
||||
else \
|
||||
echo 'ERROR: Unsupported base image' && /bin/false; \
|
||||
fi
|
||||
RUN apk add --no-cache ca-certificates bash tzdata musl-utils
|
||||
RUN apk info -vv | sort
|
||||
|
||||
# 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 && \
|
||||
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 && \
|
||||
rm -f /tmp/glibc-bin-2.35-r0.apk && \
|
||||
rm -f /lib/ld-linux-x86-64.so.2 && \
|
||||
rm -f /etc/ld.so.cache; \
|
||||
fi
|
||||
|
||||
COPY --from=go-src /tmp/grafana/conf ./conf
|
||||
COPY conf ./conf
|
||||
|
||||
RUN if [ ! $(getent group "$GF_GID") ]; then \
|
||||
if grep -i -q alpine /etc/issue; then \
|
||||
addgroup -S -g $GF_GID grafana; \
|
||||
else \
|
||||
addgroup --system --gid $GF_GID grafana; \
|
||||
fi; \
|
||||
fi && \
|
||||
GF_GID_NAME=$(getent group $GF_GID | cut -d':' -f1) && \
|
||||
mkdir -p "$GF_PATHS_HOME/.aws" && \
|
||||
if grep -i -q alpine /etc/issue; then \
|
||||
adduser -S -u $GF_UID -G "$GF_GID_NAME" grafana; \
|
||||
else \
|
||||
adduser --system --uid $GF_UID --ingroup "$GF_GID_NAME" grafana; \
|
||||
fi && \
|
||||
mkdir -p "$GF_PATHS_PROVISIONING/datasources" \
|
||||
"$GF_PATHS_PROVISIONING/dashboards" \
|
||||
"$GF_PATHS_PROVISIONING/notifiers" \
|
||||
"$GF_PATHS_PROVISIONING/plugins" \
|
||||
"$GF_PATHS_PROVISIONING/access-control" \
|
||||
"$GF_PATHS_PROVISIONING/alerting" \
|
||||
"$GF_PATHS_LOGS" \
|
||||
"$GF_PATHS_PLUGINS" \
|
||||
"$GF_PATHS_DATA" && \
|
||||
cp conf/sample.ini "$GF_PATHS_CONFIG" && \
|
||||
cp conf/ldap.toml /etc/grafana/ldap.toml && \
|
||||
chown -R "grafana:$GF_GID_NAME" "$GF_PATHS_DATA" "$GF_PATHS_HOME/.aws" "$GF_PATHS_LOGS" "$GF_PATHS_PLUGINS" "$GF_PATHS_PROVISIONING" && \
|
||||
chmod -R 777 "$GF_PATHS_DATA" "$GF_PATHS_HOME/.aws" "$GF_PATHS_LOGS" "$GF_PATHS_PLUGINS" "$GF_PATHS_PROVISIONING"
|
||||
addgroup -S -g $GF_GID grafana; \
|
||||
fi
|
||||
|
||||
COPY --from=go-src /tmp/grafana/bin/grafana* /tmp/grafana/bin/*/grafana* ./bin/
|
||||
COPY --from=js-src /tmp/grafana/public ./public
|
||||
COPY --from=go-src /tmp/grafana/LICENSE ./
|
||||
RUN export GF_GID_NAME=$(getent group $GF_GID | cut -d':' -f1) && \
|
||||
mkdir -p "$GF_PATHS_HOME/.aws" && \
|
||||
adduser -S -u $GF_UID -G "$GF_GID_NAME" grafana && \
|
||||
mkdir -p "$GF_PATHS_PROVISIONING/datasources" \
|
||||
"$GF_PATHS_PROVISIONING/dashboards" \
|
||||
"$GF_PATHS_PROVISIONING/notifiers" \
|
||||
"$GF_PATHS_PROVISIONING/plugins" \
|
||||
"$GF_PATHS_PROVISIONING/access-control" \
|
||||
"$GF_PATHS_PROVISIONING/alerting" \
|
||||
"$GF_PATHS_LOGS" \
|
||||
"$GF_PATHS_PLUGINS" \
|
||||
"$GF_PATHS_DATA" && \
|
||||
cp "$GF_PATHS_HOME/conf/sample.ini" "$GF_PATHS_CONFIG" && \
|
||||
cp "$GF_PATHS_HOME/conf/ldap.toml" /etc/grafana/ldap.toml && \
|
||||
chown -R "grafana:$GF_GID_NAME" "$GF_PATHS_DATA" "$GF_PATHS_HOME/.aws" "$GF_PATHS_LOGS" "$GF_PATHS_PLUGINS" "$GF_PATHS_PROVISIONING" && \
|
||||
chmod -R 777 "$GF_PATHS_DATA" "$GF_PATHS_HOME/.aws" "$GF_PATHS_LOGS" "$GF_PATHS_PLUGINS" "$GF_PATHS_PROVISIONING"
|
||||
|
||||
COPY --from=go-builder /grafana/bin/*/grafana-server /grafana/bin/*/grafana-cli ./bin/
|
||||
COPY --from=js-builder /grafana/public ./public
|
||||
COPY --from=js-builder /grafana/tools ./tools
|
||||
|
||||
EXPOSE 3000
|
||||
|
||||
ARG RUN_SH=./packaging/docker/run.sh
|
||||
COPY ./packaging/docker/run.sh /run.sh
|
||||
|
||||
COPY ${RUN_SH} /run.sh
|
||||
|
||||
USER "$GF_UID"
|
||||
USER grafana
|
||||
ENTRYPOINT [ "/run.sh" ]
|
||||
|
||||
87
Dockerfile.ubuntu
Normal file
87
Dockerfile.ubuntu
Normal file
@@ -0,0 +1,87 @@
|
||||
FROM node:16-alpine3.15 as js-builder
|
||||
|
||||
ENV NODE_OPTIONS=--max_old_space_size=8000
|
||||
|
||||
WORKDIR /usr/src/app/
|
||||
|
||||
COPY package.json yarn.lock ./
|
||||
COPY packages packages
|
||||
COPY .yarnrc.yml ./
|
||||
COPY .yarn .yarn
|
||||
COPY plugins-bundled plugins-bundled
|
||||
|
||||
RUN yarn install
|
||||
|
||||
COPY tsconfig.json .eslintrc .editorconfig .browserslistrc .prettierrc.js babel.config.json .linguirc ./
|
||||
COPY public public
|
||||
COPY tools tools
|
||||
COPY scripts scripts
|
||||
COPY emails emails
|
||||
|
||||
ENV NODE_ENV production
|
||||
RUN yarn build
|
||||
|
||||
FROM golang:1.19.3 AS go-builder
|
||||
|
||||
WORKDIR /src/grafana
|
||||
|
||||
COPY go.mod go.sum embed.go ./
|
||||
COPY Makefile build.go package.json ./
|
||||
COPY .bingo .bingo
|
||||
COPY pkg pkg/
|
||||
COPY cue.mod cue.mod/
|
||||
COPY packages/grafana-schema packages/grafana-schema/
|
||||
COPY public/app/plugins public/app/plugins/
|
||||
COPY public/api-spec.json public/api-spec.json
|
||||
|
||||
RUN go mod verify
|
||||
RUN make build-go
|
||||
|
||||
FROM ubuntu:20.04
|
||||
|
||||
LABEL maintainer="Grafana team <hello@grafana.com>"
|
||||
EXPOSE 3000
|
||||
|
||||
ARG GF_UID="472"
|
||||
ARG GF_GID="472"
|
||||
|
||||
ENV PATH="/usr/share/grafana/bin:$PATH" \
|
||||
GF_PATHS_CONFIG="/etc/grafana/grafana.ini" \
|
||||
GF_PATHS_DATA="/var/lib/grafana" \
|
||||
GF_PATHS_HOME="/usr/share/grafana" \
|
||||
GF_PATHS_LOGS="/var/log/grafana" \
|
||||
GF_PATHS_PLUGINS="/var/lib/grafana/plugins" \
|
||||
GF_PATHS_PROVISIONING="/etc/grafana/provisioning"
|
||||
|
||||
WORKDIR $GF_PATHS_HOME
|
||||
|
||||
COPY conf conf
|
||||
|
||||
# curl should be part of the image
|
||||
RUN apt-get update && apt-get install -y ca-certificates curl
|
||||
|
||||
RUN mkdir -p "$GF_PATHS_HOME/.aws" && \
|
||||
addgroup --system --gid $GF_GID grafana && \
|
||||
adduser --uid $GF_UID --system --ingroup grafana grafana && \
|
||||
mkdir -p "$GF_PATHS_PROVISIONING/datasources" \
|
||||
"$GF_PATHS_PROVISIONING/dashboards" \
|
||||
"$GF_PATHS_PROVISIONING/notifiers" \
|
||||
"$GF_PATHS_PROVISIONING/plugins" \
|
||||
"$GF_PATHS_PROVISIONING/access-control" \
|
||||
"$GF_PATHS_PROVISIONING/alerting" \
|
||||
"$GF_PATHS_LOGS" \
|
||||
"$GF_PATHS_PLUGINS" \
|
||||
"$GF_PATHS_DATA" && \
|
||||
cp conf/sample.ini "$GF_PATHS_CONFIG" && \
|
||||
cp conf/ldap.toml /etc/grafana/ldap.toml && \
|
||||
chown -R grafana:grafana "$GF_PATHS_DATA" "$GF_PATHS_HOME/.aws" "$GF_PATHS_LOGS" "$GF_PATHS_PLUGINS" "$GF_PATHS_PROVISIONING" && \
|
||||
chmod -R 777 "$GF_PATHS_DATA" "$GF_PATHS_HOME/.aws" "$GF_PATHS_LOGS" "$GF_PATHS_PLUGINS" "$GF_PATHS_PROVISIONING"
|
||||
|
||||
COPY --from=go-builder /src/grafana/bin/*/grafana-server /src/grafana/bin/*/grafana-cli bin/
|
||||
COPY --from=js-builder /usr/src/app/public public
|
||||
COPY --from=js-builder /usr/src/app/tools tools
|
||||
|
||||
COPY packaging/docker/run.sh /
|
||||
|
||||
USER grafana
|
||||
ENTRYPOINT [ "/run.sh" ]
|
||||
133
ISSUE_TRIAGE.md
133
ISSUE_TRIAGE.md
@@ -20,52 +20,43 @@ If you don't have the knowledge or time to code, consider helping with triage. T
|
||||
<!-- https://textik.com/#610afa78553def29 -->
|
||||
|
||||
```
|
||||
+-------------------+
|
||||
| |
|
||||
| new issue/ | +
|
||||
| more info added |
|
||||
| |
|
||||
+---------|---------+
|
||||
|
|
||||
+-------------|-----------+
|
||||
| |
|
||||
NO +------- all info needed to ------+ YES
|
||||
| | categorize the issue? | |
|
||||
| | | |
|
||||
| +-------------------------+ |
|
||||
+------|-----------+ +------------|----------+
|
||||
| | | |
|
||||
| label: | | label: type/* |
|
||||
| needs more info | | label: area/* |
|
||||
| | | label: datasource/* |
|
||||
+------------------+ | | |
|
||||
+------------|----------+
|
||||
|
|
||||
+--------|-------+
|
||||
| |
|
||||
NO +---------- is duplicate? --------------------+ YES
|
||||
| | | |
|
||||
| +----------------+ |
|
||||
| +----------------|---------------+
|
||||
+------|-----+ | |
|
||||
| | | add comment: |
|
||||
NO +------------ can repro? ------------+ YES | |
|
||||
| | | | | /duplicate of #<issue number> |
|
||||
| +------------+ | | |
|
||||
| | +--------------------------------+
|
||||
+-------------|-------------+ |
|
||||
| | +--------|---------+
|
||||
| label: | | |
|
||||
| triage/needs-confirmation | NO +-------- needs priority? ------+ YES
|
||||
| | | | | |
|
||||
+-------------|-------------+ | +------------------+ |
|
||||
| | |
|
||||
+-------------|------+ +-------|--------+ +----------|---------+
|
||||
| | | | | |
|
||||
| Assign to project ------ Done -------------- label: priority/* |
|
||||
| | | | | |
|
||||
+--------------------+ +----------------+ +--------------------+
|
||||
|
||||
+--------------------------+
|
||||
+----------------+ New issue opened/ |
|
||||
| | more information added |
|
||||
| +-------------+------------+
|
||||
| Ask for more |
|
||||
| information +-------------+------------+
|
||||
| | All information needed |
|
||||
| +--------+ to categorize the issue? +--------+
|
||||
| | | | |
|
||||
| | NO +--------------------------+ YES |
|
||||
| | |
|
||||
+------+-------+-------------+ +------------+---------+ +----------------------------+
|
||||
| | | | | |
|
||||
| label: needs more info | | Needs investigation? +--YES---+ label: needs investigation |
|
||||
| | | | | |
|
||||
+----------------------------+ +----------------+-----+ +--------------+-------------+
|
||||
NO | |
|
||||
| Investigate |
|
||||
+-----------+----------+ |
|
||||
| label: type/* | |
|
||||
| label: area/* +------------------+
|
||||
| label: datasource/* |
|
||||
+-----|----------+-----+
|
||||
| |
|
||||
| |
|
||||
| +--+--------------------+ +--------------------+
|
||||
| | | | label: priority/* |
|
||||
| | Needs priority? +--YES---+| milestone? |
|
||||
| | | | |
|
||||
| +--------------------+--+ +----+---------------+
|
||||
| NO | |
|
||||
| | |
|
||||
+----+-------------+ +---+----------+ |
|
||||
| | | | |
|
||||
| Close issue +----------+ Done +------+
|
||||
| | | |
|
||||
+------------------+ +--------------+
|
||||
```
|
||||
|
||||
## 1. Find uncategorized issues
|
||||
@@ -96,29 +87,28 @@ Given a certain [issue template](https://github.com/grafana/grafana/issues/new/c
|
||||
|
||||
Should explain what happened, what was expected and how to reproduce it together with any additional information that may help giving a complete picture of what happened such as screenshots, [query inspector](https://community.grafana.com/t/using-grafanas-query-inspector-to-troubleshoot-issues/2630) output and any environment related information that's applicable and/or maybe related to the reported problem:
|
||||
|
||||
- Grafana version:
|
||||
- Data source type & version:
|
||||
- OS Grafana is installed on:
|
||||
- User OS & Browser:
|
||||
- Grafana plugins:
|
||||
- Others:
|
||||
- Grafana version
|
||||
- Data source type & version
|
||||
- Platform & OS Grafana is installed on
|
||||
- User OS & Browser + versions
|
||||
- Using docker + what environment
|
||||
- Which plugins
|
||||
- Configuration database in use (sqlite, mysql, postgres)
|
||||
- Reverse proxy in front of Grafana, what version and configuration
|
||||
- Non-default configuration settings
|
||||
- Development environment like Go and Node versions, if applicable
|
||||
|
||||
#### Enhancement requests
|
||||
|
||||
Enhancement requests (aka. feature requests) should be created as a [Github discussion](https://github.com/grafana/grafana/discussions). When submitting an enhancement request we ask that users focus on the problem they'd like to solve and why it’s a problem rather than focusing on the solution itself. To facilitate this we recommend using the following template:
|
||||
|
||||
- What would you like to be added?:
|
||||
- Why is this needed (describe your use case and goals)\*\*?:
|
||||
Should explain what enhancement or feature that the author wants to be added and why that is needed.
|
||||
|
||||
#### Accessibility issues
|
||||
|
||||
This is a mix between a bug report and enhancement request but focused on accessibility issues to help make Grafana improve keyboard navigation, screen-reader support and being accessible to everyone. The report should include relevant [WCAG criteria](https://www.w3.org/WAI/WCAG21/quickref/?versions=2.0), if applicable.
|
||||
|
||||
Grafana Labs is dedicated to improving our graphical user interfaces and overall experience so that our product becomes usable and accessible for people with disabilities as well as anyone else. Learn more about Grafana's commitment to [A11y](https://grafana.com/accessibility/) (accessibility).
|
||||
This is a mix between a bug report and enhancement request but focused on accessibility issues to help make Grafana improve keyboard navigation, screen-reader support and being accessible to everyone. The report should include relevant WCAG criteria, if applicable.
|
||||
|
||||
#### Support requests
|
||||
|
||||
In general, if the issue description and title is perceived as a question no more information is needed. See how to categorize these requests [here](#support-requests-1).
|
||||
In general, if the issue description and title is perceived as a question no more information is needed.
|
||||
|
||||
### Good practices
|
||||
|
||||
@@ -132,7 +122,7 @@ To make it easier for everyone to understand and find issues they're searching f
|
||||
|
||||
### Do you have all the information needed to categorize an issue?
|
||||
|
||||
Depending on the issue, you might not feel all this information is needed. Use your best judgement. If you cannot triage an issue using what its author provided, explain kindly to the author that they must provide the above information to clarify the problem. Label issue with `needs more info` and add any related `area/*` or `datasource/*` labels. Alternatively, use `bot/needs more info` label and the Grafana bot will request it for you.
|
||||
Depending on the issue, you might not feel all this information is needed. Use your best judgement. If you cannot triage an issue using what its author provided, explain kindly to the author that they must provide the above information to clarify the problem. Label issue with `needs more detail` and add any related `area/*` or `datasource/*` labels.
|
||||
|
||||
If the author provides the standard information but you are still unable to triage the issue, request additional information. Do this kindly and politely because you are asking for more of the author's time.
|
||||
|
||||
@@ -168,7 +158,7 @@ Make sure it's not a duplicate by searching existing issues using related terms
|
||||
|
||||
1. Add a comment `/duplicate of #<issue number>`. GitHub will recognize this and add some additional context to the issue activity.
|
||||
2. The Grafana bot will do the rest, adding the correct label and closing comment
|
||||
3. Add `type/duplicate` label. Optionally add any related `area/*` or `datasource/*` labels.
|
||||
3. Optionally add any related `area/*` or `datasource/*` labels.
|
||||
|
||||
### Bug reports
|
||||
|
||||
@@ -193,8 +183,8 @@ If it's not perfectly clear that it's an actual bug, quickly try to reproduce it
|
||||
|
||||
### Enhancement/feature?
|
||||
|
||||
1. Remind the contributor that enhancement/feature request should be created as a GitHub discussion. See [Enhancements requests.](https://github.com/grafana/grafana/blob/main/ISSUE_TRIAGE.md#enhancement-requests)
|
||||
2. Label the issue `type/feature-request` and at least one `area/*` or `datasource/*` label.
|
||||
1. Label the issue `type/feature-request` and at least one `area/*` or `datasource/*` label.
|
||||
2. Move on to [prioritizing the issue](#4-prioritization-of-issues).
|
||||
|
||||
### Documentation issue?
|
||||
|
||||
@@ -225,7 +215,7 @@ There's a minor typo/error/lack of information that adds a lot of confusion for
|
||||
### Support requests
|
||||
|
||||
1. Kindly and politely direct the issue author to the [community site](https://community.grafana.com/) and explain that GitHub is mainly used for tracking bugs and feature requests. If possible, it's usually a good idea to add some pointers to the issue author's question.
|
||||
2. Label the issue with `bot/question`. The Grafana bot will automatically close the issue, and it will add the type/question label for you.
|
||||
2. Close the issue and label it with `type/question`.
|
||||
|
||||
## 4. Prioritization of issues
|
||||
|
||||
@@ -306,7 +296,7 @@ In many cases the issue author or community as a whole is more suitable to contr
|
||||
|
||||
## Investigation of issues
|
||||
|
||||
When an issue has all basic information provided, but the triage responsible haven't been able to reproduce the reported problem at a first glance, the issue is labeled [`triage/needs-confirmation`](https://github.com/grafana/grafana/labels/triage%2Fneeds-confirmation). Depending on the perceived severity and/or number of [upvotes](https://github.blog/2016-03-10-add-reactions-to-pull-requests-issues-and-comments), the investigation will either be delegated to another maintainer for further investigation or put on hold until someone else (maintainer or contributor) picks it up and eventually starts investigating it.
|
||||
When an issue has all basic information provided, but the triage responsible haven't been able to reproduce the reported problem at a first glance, the issue is labeled [Needs investigation](https://github.com/grafana/grafana/labels/needs%20investigation). Depending on the perceived severity and/or number of [upvotes](https://github.blog/2016-03-10-add-reactions-to-pull-requests-issues-and-comments), the investigation will either be delegated to another maintainer for further investigation or put on hold until someone else (maintainer or contributor) picks it up and eventually starts investigating it.
|
||||
|
||||
Investigating issues can be a very time consuming task, especially for the maintainers, given the huge number of combinations of plugins, data sources, platforms, databases, browsers, tools, hardware, integrations, versions and cloud services, etc that are being used with Grafana. There is a certain number of combinations that are more common than others, and these are in general easier for maintainers to investigate.
|
||||
|
||||
@@ -318,16 +308,19 @@ Even if you don't have the time or knowledge to investigate an issue we highly r
|
||||
|
||||
We have some automation that triggers on comments or labels being added to issues. Many of these automated behaviors are defined in [commands.json](https://github.com/grafana/grafana/blob/main/.github/commands.json). Or in other [GitHub Actions](https://github.com/grafana/grafana/tree/main/.github/workflows)
|
||||
|
||||
- Add /duplicate `#<issue number>` to have Grafana label & close issue with an appropriate message.
|
||||
- Add `bot/question` and the bot will close it with an appropriate message.
|
||||
|
||||
[Read more on bot actions](https://github.com/grafana/grafana/blob/main/.github/bot.md)
|
||||
|
||||
## External PRs
|
||||
|
||||
Part of issue triage should also be triaging of external PRs. Main goal should be to make sure PRs from external contributors have an owner/reviewer and are not forgotten.
|
||||
|
||||
1. Check new external PRs which do not have a reviewer. You can easily search for pull requests made by external contributors by using the label: `pr/external` in your [query search](https://github.com/grafana/grafana/pulls?q=is%3Aopen+is%3Apr+label%3Apr%2Fexternal) Note: external PRs are automatically labeled with `pr/external` upon creation.
|
||||
2. Check if there is a link to an existing issue. The link to a existing issue should be in the description section, underneath “Which issue(s) does this PR fix?:”.
|
||||
3. If not and you know which issue it is solving, add the link yourself, otherwise ask the author to link the issue or create one.
|
||||
4. Assign a reviewer based on who was handling the linked issue or what code or feature does the PR touches (look at who was the last to make changes there if all else fails).
|
||||
1. Check new external PRs which do not have a reviewer.
|
||||
1. Check if there is a link to an existing issue.
|
||||
1. If not and you know which issue it is solving, add the link yourself, otherwise ask the author to link the issue or create one.
|
||||
1. Assign a reviewer based on who was handling the linked issue or what code or feature does the PR touches (look at who was the last to make changes there if all else fails).
|
||||
|
||||
## Appendix
|
||||
|
||||
|
||||
10
LICENSING.md
10
LICENSING.md
@@ -15,14 +15,12 @@ packages/grafana-e2e-selectors/
|
||||
packages/grafana-runtime/
|
||||
packages/grafana-toolkit/
|
||||
packages/grafana-ui/
|
||||
packages/jaeger-ui-components/
|
||||
packaging/
|
||||
kinds/
|
||||
pkg/kinds/
|
||||
pkg/kindsys/
|
||||
pkg/registry/corekind/
|
||||
pkg/coremodel/
|
||||
pkg/framework/coremodel/
|
||||
grafana-mixin/
|
||||
public/app/plugins/datasource/tempo
|
||||
public/app/features/explore/TraceView/components
|
||||
cue/
|
||||
public/img/icons/solid/
|
||||
public/img/icons/unicons/
|
||||
```
|
||||
|
||||
46
Makefile
46
Makefile
@@ -7,13 +7,12 @@ WIRE_TAGS = "oss"
|
||||
-include local/Makefile
|
||||
include .bingo/Variables.mk
|
||||
|
||||
.PHONY: all deps-go deps-js deps build-go build-backend build-server build-cli build-js build build-docker-full build-docker-full-ubuntu lint-go golangci-lint test-go test-js gen-ts test run run-frontend clean devenv devenv-down protobuf drone help gen-go gen-cue fix-cue
|
||||
.PHONY: all deps-go deps-js deps build-go build-server build-cli build-js build build-docker-full build-docker-full-ubuntu lint-go golangci-lint test-go test-js gen-ts test run run-frontend clean devenv devenv-down protobuf drone help gen-go gen-cue
|
||||
|
||||
GO = go
|
||||
GO_FILES ?= ./pkg/...
|
||||
SH_FILES ?= $(shell find ./scripts -name *.sh)
|
||||
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))
|
||||
|
||||
all: deps build
|
||||
@@ -47,8 +46,7 @@ $(SPEC_TARGET): $(SWAGGER) ## Generate API Swagger specification
|
||||
SWAGGER_GENERATE_EXTENSION=false $(SWAGGER) generate spec -m -w pkg/server -o $(SPEC_TARGET) \
|
||||
-x "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" \
|
||||
-x "github.com/prometheus/alertmanager" \
|
||||
-i pkg/api/swagger_tags.json \
|
||||
--exclude-tag=alpha
|
||||
-i pkg/api/swagger_tags.json
|
||||
|
||||
swagger-api-spec: gen-go $(SPEC_TARGET) $(MERGED_SPEC_TARGET) validate-api-spec
|
||||
|
||||
@@ -67,31 +65,17 @@ openapi3-gen: swagger-api-spec ## Generates OpenApi 3 specs from the Swagger 2 a
|
||||
##@ Building
|
||||
gen-cue: ## Do all CUE/Thema code generation
|
||||
@echo "generate code from .cue files"
|
||||
go generate ./pkg/plugins/plugindef
|
||||
go generate ./kinds/gen.go
|
||||
go generate ./public/app/plugins/gen.go
|
||||
go generate ./pkg/kindsys/report.go
|
||||
go generate ./pkg/framework/coremodel
|
||||
go generate ./public/app/plugins
|
||||
|
||||
gen-go: $(WIRE) gen-cue
|
||||
@echo "generate go files"
|
||||
$(WIRE) gen -tags $(WIRE_TAGS) ./pkg/server ./pkg/cmd/grafana-cli/runner
|
||||
|
||||
fix-cue: $(CUE)
|
||||
@echo "formatting cue files"
|
||||
$(CUE) fix kinds/**/*.cue
|
||||
$(CUE) fix public/app/plugins/**/**/*.cue
|
||||
|
||||
gen-jsonnet:
|
||||
go generate ./devenv/jsonnet
|
||||
|
||||
build-go: $(MERGED_SPEC_TARGET) gen-go ## Build all Go binaries.
|
||||
@echo "build go files"
|
||||
$(GO) run build.go $(GO_BUILD_FLAGS) build
|
||||
|
||||
build-backend: ## Build Grafana backend.
|
||||
@echo "build backend"
|
||||
$(GO) run build.go $(GO_BUILD_FLAGS) build-backend
|
||||
|
||||
build-server: ## Build Grafana server.
|
||||
@echo "build server"
|
||||
$(GO) run build.go $(GO_BUILD_FLAGS) build-server
|
||||
@@ -132,13 +116,13 @@ test-go-integration: ## Run integration tests for backend with flags.
|
||||
test-go-integration-postgres: devenv-postgres ## Run integration tests for postgres backend with flags.
|
||||
@echo "test backend integration postgres tests"
|
||||
$(GO) clean -testcache
|
||||
$(GO) list './pkg/...' | xargs -I {} sh -c 'GRAFANA_TEST_DB=postgres go test -run Integration -covermode=atomic -timeout=2m {}'
|
||||
$(GO) list './pkg/...' | xargs -I {} sh -c 'GRAFANA_TEST_DB=postgres go test -run Integration -covermode=atomic -timeout=30m {}'
|
||||
|
||||
.PHONY: test-go-integration-mysql
|
||||
test-go-integration-mysql: devenv-mysql ## Run integration tests for mysql backend with flags.
|
||||
@echo "test backend integration mysql tests"
|
||||
$(GO) clean -testcache
|
||||
$(GO) list './pkg/...' | xargs -I {} sh -c 'GRAFANA_TEST_DB=mysql go test -run Integration -covermode=atomic -timeout=2m {}'
|
||||
$(GO) list './pkg/...' | xargs -I {} sh -c 'GRAFANA_TEST_DB=mysql go test -run Integration -covermode=atomic -timeout=30m {}'
|
||||
|
||||
test-js: ## Run tests for frontend.
|
||||
@echo "test frontend"
|
||||
@@ -164,17 +148,12 @@ shellcheck: $(SH_FILES) ## Run checks for shell scripts.
|
||||
|
||||
build-docker-full: ## Build Docker image for development.
|
||||
@echo "build docker container"
|
||||
DOCKER_BUILDKIT=1 \
|
||||
docker build \
|
||||
--tag grafana/grafana:dev .
|
||||
docker build --tag grafana/grafana:dev .
|
||||
|
||||
build-docker-full-ubuntu: ## Build Docker image based on Ubuntu for development.
|
||||
@echo "build docker container"
|
||||
DOCKER_BUILDKIT=1 \
|
||||
docker build \
|
||||
--build-arg BASE_IMAGE=ubuntu:20.04 \
|
||||
--build-arg GO_IMAGE=golang:1.20.4 \
|
||||
--tag grafana/grafana:dev-ubuntu .
|
||||
docker build --tag grafana/grafana:dev-ubuntu -f ./Dockerfile.ubuntu .
|
||||
|
||||
|
||||
##@ Services
|
||||
|
||||
@@ -239,12 +218,5 @@ drone: $(DRONE)
|
||||
$(DRONE) lint .drone.yml --trusted
|
||||
$(DRONE) --server https://drone.grafana.net sign --save grafana/grafana
|
||||
|
||||
# Generate an Emacs tags table (https://www.gnu.org/software/emacs/manual/html_node/emacs/Tags-Tables.html) for Starlark files.
|
||||
scripts/drone/TAGS: $(shell find scripts/drone -name '*.star')
|
||||
etags --lang none --regex="/def \(\w+\)[^:]+:/\1/" --regex="/\s*\(\w+\) =/\1/" $^ -o $@
|
||||
|
||||
format-drone:
|
||||
buildifier -r scripts/drone
|
||||
|
||||
help: ## Display this help.
|
||||
@awk 'BEGIN {FS = ":.*##"; printf "\nUsage:\n make \033[36m<target>\033[0m\n"} /^[a-zA-Z_-]+:.*?##/ { printf " \033[36m%-15s\033[0m %s\n", $$1, $$2 } /^##@/ { printf "\n\033[1m%s\033[0m\n", substr($$0, 5) } ' $(MAKEFILE_LIST)
|
||||
|
||||
33
PLUGIN_DEV.md
Normal file
33
PLUGIN_DEV.md
Normal file
@@ -0,0 +1,33 @@
|
||||
# Plugin development
|
||||
|
||||
This document is not meant as a complete guide for developing plugins but more as a changelog for changes in
|
||||
Grafana that can impact plugin development. Whenever you as a plugin author encounter an issue with your plugin after
|
||||
upgrading Grafana please check here before creating an issue.
|
||||
|
||||
## Plugin development resources
|
||||
|
||||
- [Grafana plugin developer guide](https://grafana.com/docs/grafana/latest/developers/plugins/)
|
||||
- [Webpack Grafana plugin template project](https://github.com/CorpGlory/grafana-plugin-template-webpack)
|
||||
- [Simple JSON datasource plugin](https://github.com/grafana/simple-json-datasource)
|
||||
|
||||
## Changes in Grafana v4.6
|
||||
|
||||
This version of Grafana has big changes that will impact a limited set of plugins. We moved from systemjs to webpack
|
||||
for built-in plugins and everything internal. External plugins still use systemjs but now with a limited
|
||||
set of Grafana components they can import. Plugins can depend on libs like lodash & moment and internal components
|
||||
like before using the same import paths. However since everything in Grafana is no longer accessible, a few plugins could encounter issues when importing a Grafana dependency.
|
||||
|
||||
[List of exposed components plugins can import/require](https://github.com/grafana/grafana/blob/main/public/app/features/plugins/plugin_loader.ts#L48)
|
||||
|
||||
If you think we missed exposing a crucial lib or Grafana component let us know by opening an issue.
|
||||
|
||||
### Deprecated components
|
||||
|
||||
The angular directive `<spectrum-picker>` is now deprecated (will still work for a version more) but we recommend plugin authors
|
||||
upgrade to new `<color-picker color="ctrl.color" onChange="ctrl.onSparklineColorChange"></color-picker>`
|
||||
|
||||
## Changes in Grafana v6.0
|
||||
|
||||
### DashboardSrv.ts
|
||||
|
||||
If you utilize [DashboardSrv](https://github.com/grafana/grafana/commit/8574dca081002f36e482b572517d8f05fd44453f#diff-1ab99561f9f6a10e1fafcddc39bc1d65) in your plugin code, `dash` was renamed to `dashboard`.
|
||||
@@ -18,7 +18,7 @@ Grafana allows you to query, visualize, alert on and understand your metrics no
|
||||
## Get started
|
||||
|
||||
- [Get Grafana](https://grafana.com/get)
|
||||
- [Installation guides](https://grafana.com/docs/grafana/latest/setup-grafana/installation/)
|
||||
- [Installation guides](http://docs.grafana.org/installation/)
|
||||
|
||||
Unsure if Grafana is for you? Watch Grafana in action on [play.grafana.org](https://play.grafana.org/)!
|
||||
|
||||
|
||||
@@ -14,6 +14,7 @@ Grafana Labs will send you a response indicating the next steps in handling your
|
||||
|
||||
## Security announcements
|
||||
|
||||
We will post a summary, remediation, and mitigation details for any patch containing security fixes on the Grafana blog. The security announcement blog posts will be tagged with the [security tag](https://grafana.com/tags/security/).
|
||||
We maintain a category on the community site called [Security Announcements](https://community.grafana.com/c/support/security-announcements),
|
||||
where we will post a summary, remediation, and mitigation details for any patch containing security fixes.
|
||||
|
||||
You can also track security announcements via the [RSS feed](https://grafana.com/tags/security/index.xml).
|
||||
You can also subscribe to email updates to this category if you have a grafana.com account and sign on to the community site or track updates via an [RSS feed](https://community.grafana.com/c/support/security-announcements.rss).
|
||||
|
||||
@@ -66,15 +66,6 @@ enable_gzip = false
|
||||
cert_file =
|
||||
cert_key =
|
||||
|
||||
# Unix socket gid
|
||||
# Changing the gid of a file without privileges requires that the target group is in the group of the process and that the process is the file owner
|
||||
# It is recommended to set the gid as http server user gid
|
||||
# Not set when the value is -1
|
||||
socket_gid = -1
|
||||
|
||||
# Unix socket mode
|
||||
socket_mode = 0660
|
||||
|
||||
# Unix socket path
|
||||
socket = /tmp/grafana.sock
|
||||
|
||||
@@ -85,11 +76,6 @@ cdn_url =
|
||||
# `0` means there is no timeout for reading the request.
|
||||
read_timeout = 0
|
||||
|
||||
# This setting enables you to specify additional headers that the server adds to HTTP(S) responses.
|
||||
[server.custom_response_headers]
|
||||
#exampleHeader1 = exampleValue1
|
||||
#exampleHeader2 = exampleValue2
|
||||
|
||||
#################################### Database ############################
|
||||
[database]
|
||||
# You can configure the database connection by specifying type, host, name, user and password
|
||||
@@ -139,18 +125,9 @@ path = grafana.db
|
||||
# For "sqlite3" only. cache mode setting used for connecting to the database
|
||||
cache_mode = private
|
||||
|
||||
# For "sqlite3" only. Enable/disable Write-Ahead Logging, https://sqlite.org/wal.html. Default is false.
|
||||
wal = false
|
||||
|
||||
# For "mysql" only if migrationLocking feature toggle is set. How many seconds to wait before failing to lock the database for the migrations, default is 0.
|
||||
locking_attempt_timeout_sec = 0
|
||||
|
||||
# For "sqlite" only. How many times to retry query in case of database is locked failures. Default is 0 (disabled).
|
||||
query_retries = 0
|
||||
|
||||
# For "sqlite" only. How many times to retry transaction in case of database is locked failures. Default is 5.
|
||||
transaction_retries = 5
|
||||
|
||||
#################################### Cache server #############################
|
||||
[remote_cache]
|
||||
# Either "redis", "memcached" or "database" default is "database"
|
||||
@@ -162,12 +139,6 @@ type = database
|
||||
# memcache: 127.0.0.1:11211
|
||||
connstr =
|
||||
|
||||
# prefix prepended to all the keys in the remote cache
|
||||
prefix =
|
||||
|
||||
# This enables encryption of values stored in the remote cache
|
||||
encryption =
|
||||
|
||||
#################################### Data proxy ###########################
|
||||
[dataproxy]
|
||||
|
||||
@@ -244,9 +215,6 @@ google_analytics_ua_id =
|
||||
# Google Analytics 4 tracking code, only enabled if you specify an id here
|
||||
google_analytics_4_id =
|
||||
|
||||
# When Google Analytics 4 Enhanced event measurement is enabled, we will try to avoid sending duplicate events and let Google Analytics 4 detect navigation changes, etc.
|
||||
google_analytics_4_send_manual_page_views = false
|
||||
|
||||
# Google Tag Manager ID, only enabled if you specify an id here
|
||||
google_tag_manager_id =
|
||||
|
||||
@@ -262,9 +230,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 =
|
||||
|
||||
@@ -346,15 +311,6 @@ content_security_policy = false
|
||||
# $ROOT_PATH is server.root_url without the protocol.
|
||||
content_security_policy_template = """script-src 'self' 'unsafe-eval' 'unsafe-inline' 'strict-dynamic' $NONCE;object-src 'none';font-src 'self';style-src 'self' 'unsafe-inline' blob:;img-src * data:;base-uri 'self';connect-src 'self' grafana.com ws://$ROOT_PATH wss://$ROOT_PATH;manifest-src 'self';media-src 'none';form-action 'self';"""
|
||||
|
||||
# Enable adding the Content-Security-Policy-Report-Only header to your requests.
|
||||
# Allows you to monitor the effects of a policy without enforcing it.
|
||||
content_security_policy_report_only = false
|
||||
|
||||
# Set Content Security Policy Report Only template used when adding the Content-Security-Policy-Report-Only header to your requests.
|
||||
# $NONCE in the template includes a random nonce.
|
||||
# $ROOT_PATH is server.root_url without the protocol.
|
||||
content_security_policy_report_only_template = """script-src 'self' 'unsafe-eval' 'unsafe-inline' 'strict-dynamic' $NONCE;object-src 'none';font-src 'self';style-src 'self' 'unsafe-inline' blob:;img-src * data:;base-uri 'self';connect-src 'self' grafana.com ws://$ROOT_PATH wss://$ROOT_PATH;manifest-src 'self';media-src 'none';form-action 'self';"""
|
||||
|
||||
# Controls if old angular plugins are supported or not. This will be disabled by default in future release
|
||||
angular_support_enabled = true
|
||||
|
||||
@@ -369,9 +325,6 @@ data_keys_cache_cleanup_interval = 1m
|
||||
|
||||
#################################### Snapshots ###########################
|
||||
[snapshots]
|
||||
# set to false to remove snapshot functionality
|
||||
enabled = true
|
||||
|
||||
# snapshot sharing options
|
||||
external_enabled = true
|
||||
external_snapshot_url = https://snapshots.raintank.io
|
||||
@@ -426,11 +379,11 @@ verify_email_enabled = false
|
||||
login_hint = email or username
|
||||
password_hint = password
|
||||
|
||||
# Default UI theme ("dark" or "light" or "system")
|
||||
# Default UI theme ("dark" or "light")
|
||||
default_theme = dark
|
||||
|
||||
# Default UI language (supported IETF language tag, such as en-US)
|
||||
default_language = en-US
|
||||
# Default locale (supported IETF language tag, such as en-US)
|
||||
default_locale = en-US
|
||||
|
||||
# Path to a custom home page. Users are only redirected to this if the default home dashboard is used. It should match a frontend route and contain a leading slash.
|
||||
home_page =
|
||||
@@ -452,17 +405,10 @@ user_invite_max_lifetime_duration = 24h
|
||||
# Enter a comma-separated list of usernames to hide them in the Grafana UI. These users are shown to Grafana admins and to themselves.
|
||||
hidden_users =
|
||||
|
||||
[service_accounts]
|
||||
# When set, Grafana will not allow the creation of tokens with expiry greater than this setting.
|
||||
token_expiration_day_limit =
|
||||
|
||||
[auth]
|
||||
# Login cookie name
|
||||
login_cookie_name = grafana_session
|
||||
|
||||
# Disable usage of Grafana build-in login solution.
|
||||
disable_login = false
|
||||
|
||||
# The maximum lifetime (duration) an authenticated user can be inactive before being required to login at next visit. Default is 7 days (7d). This setting should be expressed as a duration, e.g. 5m (minutes), 6h (hours), 10d (days), 2w (weeks), 1M (month). The lifetime resets at each successful token rotation (token_rotation_interval_minutes).
|
||||
login_maximum_inactive_lifetime_duration =
|
||||
|
||||
@@ -483,7 +429,6 @@ signout_redirect_url =
|
||||
|
||||
# Set to true to attempt login with OAuth automatically, skipping the login screen.
|
||||
# This setting is ignored if multiple OAuth providers are configured.
|
||||
# Deprecated, use auto_login option for specific provider instead.
|
||||
oauth_auto_login = false
|
||||
|
||||
# OAuth state max age cookie duration in seconds. Defaults to 600 seconds.
|
||||
@@ -504,9 +449,6 @@ sigv4_verbose_logging = false
|
||||
# Set to true to enable Azure authentication option for HTTP-based datasources
|
||||
azure_auth_enabled = false
|
||||
|
||||
# Use email lookup in addition to the unique ID provided by the IdP
|
||||
oauth_allow_insecure_email_lookup = false
|
||||
|
||||
#################################### Anonymous Auth ######################
|
||||
[auth.anonymous]
|
||||
# enable anonymous access
|
||||
@@ -525,7 +467,6 @@ hide_version = false
|
||||
[auth.github]
|
||||
enabled = false
|
||||
allow_sign_up = true
|
||||
auto_login = false
|
||||
client_id = some_id
|
||||
client_secret =
|
||||
scopes = user:email,read:org
|
||||
@@ -538,17 +479,11 @@ allowed_organizations =
|
||||
role_attribute_path =
|
||||
role_attribute_strict = false
|
||||
allow_assign_grafana_admin = false
|
||||
skip_org_role_sync = false
|
||||
tls_skip_verify_insecure = false
|
||||
tls_client_cert =
|
||||
tls_client_key =
|
||||
tls_client_ca =
|
||||
|
||||
#################################### GitLab Auth #########################
|
||||
[auth.gitlab]
|
||||
enabled = false
|
||||
allow_sign_up = true
|
||||
auto_login = false
|
||||
client_id = some_id
|
||||
client_secret =
|
||||
scopes = api
|
||||
@@ -560,13 +495,11 @@ allowed_groups =
|
||||
role_attribute_path =
|
||||
role_attribute_strict = false
|
||||
allow_assign_grafana_admin = false
|
||||
skip_org_role_sync = false
|
||||
|
||||
#################################### Google Auth #########################
|
||||
[auth.google]
|
||||
enabled = false
|
||||
allow_sign_up = true
|
||||
auto_login = false
|
||||
client_id = some_client_id
|
||||
client_secret =
|
||||
scopes = https://www.googleapis.com/auth/userinfo.profile https://www.googleapis.com/auth/userinfo.email
|
||||
@@ -575,7 +508,6 @@ token_url = https://accounts.google.com/o/oauth2/token
|
||||
api_url = https://www.googleapis.com/oauth2/v1/userinfo
|
||||
allowed_domains =
|
||||
hosted_domain =
|
||||
skip_org_role_sync = false
|
||||
|
||||
#################################### Grafana.com Auth ####################
|
||||
# legacy key names (so they work in env variables)
|
||||
@@ -590,19 +522,16 @@ allowed_organizations =
|
||||
[auth.grafana_com]
|
||||
enabled = false
|
||||
allow_sign_up = true
|
||||
auto_login = false
|
||||
client_id = some_id
|
||||
client_secret =
|
||||
scopes = user:email
|
||||
allowed_organizations =
|
||||
skip_org_role_sync = false
|
||||
|
||||
#################################### Azure AD OAuth #######################
|
||||
[auth.azuread]
|
||||
name = Azure AD
|
||||
enabled = false
|
||||
allow_sign_up = true
|
||||
auto_login = false
|
||||
client_id = some_client_id
|
||||
client_secret =
|
||||
scopes = openid email profile
|
||||
@@ -620,7 +549,6 @@ name = Okta
|
||||
icon = okta
|
||||
enabled = false
|
||||
allow_sign_up = true
|
||||
auto_login = false
|
||||
client_id = some_id
|
||||
client_secret =
|
||||
scopes = openid profile email groups
|
||||
@@ -632,7 +560,6 @@ allowed_groups =
|
||||
role_attribute_path =
|
||||
role_attribute_strict = false
|
||||
allow_assign_grafana_admin = false
|
||||
skip_org_role_sync = false
|
||||
|
||||
#################################### Generic OAuth #######################
|
||||
[auth.generic_oauth]
|
||||
@@ -640,7 +567,6 @@ name = OAuth
|
||||
icon = signin
|
||||
enabled = false
|
||||
allow_sign_up = true
|
||||
auto_login = false
|
||||
client_id = some_id
|
||||
client_secret =
|
||||
scopes = user:email
|
||||
@@ -695,14 +621,13 @@ username_claim =
|
||||
jwk_set_url =
|
||||
jwk_set_file =
|
||||
cache_ttl = 60m
|
||||
expect_claims = {}
|
||||
expected_claims = {}
|
||||
key_file =
|
||||
role_attribute_path =
|
||||
role_attribute_strict = false
|
||||
auto_sign_up = false
|
||||
url_login = false
|
||||
allow_assign_grafana_admin = false
|
||||
skip_org_role_sync = false
|
||||
|
||||
#################################### Auth LDAP ###########################
|
||||
[auth.ldap]
|
||||
@@ -750,10 +675,6 @@ managed_identity_client_id =
|
||||
# If enabled, cache permissions in a in memory cache
|
||||
permission_cache = true
|
||||
|
||||
# Reset basic roles permissions on boot
|
||||
# Warning left to true, basic roles permissions will be reset on every boot
|
||||
reset_basic_roles = false
|
||||
|
||||
#################################### SMTP / Emailing #####################
|
||||
[smtp]
|
||||
enabled = false
|
||||
@@ -965,17 +886,10 @@ 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
|
||||
|
||||
# The timeout for capturing screenshots. If a screenshot cannot be captured within the timeout then
|
||||
# the notification is sent without a screenshot. The maximum duration is 30 seconds. This timeout
|
||||
# should be less than the minimum Interval of all Evaluation Groups to avoid back pressure on alert
|
||||
# rule evaluation.
|
||||
capture_timeout = 10s
|
||||
|
||||
# The maximum number of screenshots that can be taken at the same time. This option is different from
|
||||
# concurrent_render_request_limit as max_concurrent_screenshots sets the number of concurrent screenshots
|
||||
# that can be taken at the same time for all firing alerts where as concurrent_render_request_limit sets
|
||||
@@ -992,10 +906,6 @@ upload_external_image_storage = false
|
||||
# For example: `disabled_labels=grafana_folder`
|
||||
disabled_labels =
|
||||
|
||||
[unified_alerting.state_history]
|
||||
# Enable the state history functionality in Unified Alerting. The previous states of alert rules will be visible in panels and in the UI.
|
||||
enabled = true
|
||||
|
||||
#################################### Alerting ############################
|
||||
[alerting]
|
||||
# Enable the legacy alerting sub-system and interface. If Unified Alerting is already enabled and you try to go back to legacy alerting, all data that is part of Unified Alerting will be deleted. When this configuration section and flag are not defined, the state is defined at runtime. See the documentation for more details.
|
||||
@@ -1113,7 +1023,6 @@ url = https://grafana.com
|
||||
|
||||
[grafana_com]
|
||||
url = https://grafana.com
|
||||
api_url = https://grafana.com/api
|
||||
|
||||
#################################### Distributed tracing ############
|
||||
# Opentracing is deprecated use opentelemetry instead
|
||||
@@ -1191,7 +1100,6 @@ signed_url_expiration =
|
||||
account_name =
|
||||
account_key =
|
||||
container_name =
|
||||
sas_token_expiration_days =
|
||||
|
||||
[external_image_storage.local]
|
||||
# does not require any configuration
|
||||
@@ -1207,11 +1115,6 @@ renderer_token = -
|
||||
# Concurrent render request limit affects when the /render HTTP endpoint is used. Rendering many images at the same time can overload the server,
|
||||
# which this setting can help protect against by only allowing a certain amount of concurrent requests.
|
||||
concurrent_render_request_limit = 30
|
||||
# Determines the lifetime of the render key used by the image renderer to access and render Grafana.
|
||||
# This setting should be expressed as a duration. Examples: 10s (seconds), 5m (minutes), 2h (hours).
|
||||
# Default is 5m. This should be more than enough for most deployments.
|
||||
# Change the value only if image rendering is failing and you see `Failed to get the render key from cache` in Grafana logs.
|
||||
render_key_lifetime = 5m
|
||||
|
||||
[panels]
|
||||
# here for to support old env variables, can remove after a few months
|
||||
@@ -1326,10 +1229,20 @@ license_path =
|
||||
# enable = feature1,feature2
|
||||
enable =
|
||||
|
||||
# Some features are enabled by default, see:
|
||||
# https://grafana.com/docs/grafana/next/setup-grafana/configure-grafana/feature-toggles/
|
||||
# To enable features by default, set `Expression: "true"` in:
|
||||
# https://github.com/grafana/grafana/blob/main/pkg/services/featuremgmt/registry.go
|
||||
# The new prometheus visual query builder
|
||||
promQueryBuilder = true
|
||||
|
||||
# The new loki visual query builder
|
||||
lokiQueryBuilder = true
|
||||
|
||||
# Experimental Explore to Dashboard workflow
|
||||
explore2Dashboard = true
|
||||
|
||||
# Command Palette
|
||||
commandPalette = true
|
||||
|
||||
# Use dynamic labels in CloudWatch datasource
|
||||
cloudWatchDynamicLabels = true
|
||||
|
||||
# feature1 = true
|
||||
# feature2 = false
|
||||
@@ -1406,24 +1319,3 @@ full_reindex_interval = 5m
|
||||
# Defines the frequency of partial index updates based on recent changes such as dashboard updates.
|
||||
# This is a temporary settings that might be removed in the future.
|
||||
index_update_interval = 10s
|
||||
|
||||
|
||||
# Move an app plugin referenced by its id (including all its pages) to a specific navigation section
|
||||
# Dependencies: needs the `topnav` feature to be enabled
|
||||
# Format: <Plugin ID> = <Section ID> <Sort Weight>
|
||||
[navigation.app_sections]
|
||||
|
||||
# Move a specific app plugin page (referenced by its `path` field) to a specific navigation section
|
||||
# Format: <Page URL> = <Section ID> <Sort Weight>
|
||||
[navigation.app_standalone_pages]
|
||||
|
||||
|
||||
#################################### Secure Socks5 Datasource Proxy #####################################
|
||||
[secure_socks_datasource_proxy]
|
||||
enabled = false
|
||||
root_ca_cert =
|
||||
client_key =
|
||||
client_cert =
|
||||
server_name =
|
||||
# The address of the socks5 proxy datasources should connect to
|
||||
proxy_address =
|
||||
|
||||
@@ -24,8 +24,6 @@ bind_dn = "cn=admin,dc=grafana,dc=org"
|
||||
# Search user bind password
|
||||
# If the password contains # or ; you have to wrap it with triple quotes. Ex """#password;"""
|
||||
bind_password = 'grafana'
|
||||
# We recommend using variable expansion for the bind_password, for more info https://grafana.com/docs/grafana/latest/setup-grafana/configure-grafana/#variable-expansion
|
||||
# bind_password = '$__env{LDAP_BIND_PASSWORD}'
|
||||
|
||||
# Timeout in seconds (applies to each host specified in the 'host' entry (space separated))
|
||||
timeout = 10
|
||||
@@ -60,7 +58,7 @@ org_role = "Admin"
|
||||
# org_id = 1
|
||||
|
||||
[[servers.group_mappings]]
|
||||
group_dn = "cn=editors,ou=groups,dc=grafana,dc=org"
|
||||
group_dn = "cn=users,ou=groups,dc=grafana,dc=org"
|
||||
org_role = "Editor"
|
||||
|
||||
[[servers.group_mappings]]
|
||||
|
||||
@@ -11,7 +11,7 @@ apiVersion: 1
|
||||
# folder: my_first_folder
|
||||
# # <duration, required> interval of the rule group evaluation
|
||||
# interval: 60s
|
||||
# # <list, required> list of rules that are part of the rule group
|
||||
# # <list, required> list of rules that are part of the rule group
|
||||
# rules:
|
||||
# # <string, required> unique identifier for the rule
|
||||
# - uid: my_id_1
|
||||
@@ -23,7 +23,7 @@ apiVersion: 1
|
||||
# # evaluation - should be obtained via the API
|
||||
# data:
|
||||
# - refId: A
|
||||
# datasourceUid: "__expr__"
|
||||
# datasourceUid: "-100"
|
||||
# model:
|
||||
# conditions:
|
||||
# - evaluator:
|
||||
@@ -40,7 +40,7 @@ apiVersion: 1
|
||||
# type: query
|
||||
# datasource:
|
||||
# type: __expr__
|
||||
# uid: "__expr__"
|
||||
# uid: "-100"
|
||||
# expression: 1==0
|
||||
# intervalMs: 1000
|
||||
# maxDataPoints: 43200
|
||||
@@ -53,7 +53,7 @@ apiVersion: 1
|
||||
# # <string> state of the alert rule when no data is returned
|
||||
# # possible values: "NoData", "Alerting", "OK", default = NoData
|
||||
# noDataState: Alerting
|
||||
# # <string> state of the alert rule when the query execution
|
||||
# # <string> state of the alert rule when the query execution
|
||||
# # fails - possible values: "Error", "Alerting", "OK"
|
||||
# # default = Alerting
|
||||
# executionErrorState: Alerting
|
||||
@@ -62,11 +62,10 @@ apiVersion: 1
|
||||
# # <map<string, string>> map of strings to attach arbitrary custom data
|
||||
# annotations:
|
||||
# some_key: some_value
|
||||
# # <map<string, string> map of strings to filter and
|
||||
# # <map<string, string> map of strings to filter and
|
||||
# # route alerts
|
||||
# labels:
|
||||
# team: sre_team_1
|
||||
# isPaused: false
|
||||
|
||||
# # List of alert rule UIDs that should be deleted
|
||||
# deleteRules:
|
||||
@@ -104,7 +103,7 @@ apiVersion: 1
|
||||
# # <list<string>> The labels by which incoming alerts are grouped together. For example,
|
||||
# # multiple alerts coming in for cluster=A and alertname=LatencyHigh would
|
||||
# # be batched into a single group.
|
||||
# #
|
||||
# #
|
||||
# # To aggregate by all possible labels, use the special value '...' as
|
||||
# # the sole label name, for example:
|
||||
# # group_by: ['...']
|
||||
@@ -128,18 +127,18 @@ apiVersion: 1
|
||||
# mute_time_intervals:
|
||||
# - abc
|
||||
# # <duration> How long to initially wait to send a notification for a group
|
||||
# # of alerts. Allows to collect more initial alerts for the same group.
|
||||
# # of alerts. Allows to collect more initial alerts for the same group.
|
||||
# # (Usually ~0s to few minutes), default = 30s
|
||||
# group_wait: 30s
|
||||
# # <duration> How long to wait before sending a notification about new alerts that
|
||||
# # are added to a group of alerts for which an initial notification has
|
||||
# # already been sent. (Usually ~5m or more), default = 5m
|
||||
# group_interval: 5m
|
||||
# group_internval: 5m
|
||||
# # <duration> How long to wait before sending a notification again if it has already
|
||||
# # been sent successfully for an alert. (Usually ~3h or more), default = 4h
|
||||
# repeat_interval: 4h
|
||||
# # <list> Zero or more child routes
|
||||
# routes:
|
||||
# routes:
|
||||
# ...
|
||||
|
||||
# # List of orgIds that should be reset to the default policy
|
||||
|
||||
121
conf/sample.ini
121
conf/sample.ini
@@ -67,15 +67,6 @@
|
||||
;cert_file =
|
||||
;cert_key =
|
||||
|
||||
# Unix socket gid
|
||||
# Changing the gid of a file without privileges requires that the target group is in the group of the process and that the process is the file owner
|
||||
# It is recommended to set the gid as http server user gid
|
||||
# Not set when the value is -1
|
||||
;socket_gid =
|
||||
|
||||
# Unix socket mode
|
||||
;socket_mode =
|
||||
|
||||
# Unix socket path
|
||||
;socket =
|
||||
|
||||
@@ -86,11 +77,6 @@
|
||||
# `0` means there is no timeout for reading the request.
|
||||
;read_timeout = 0
|
||||
|
||||
# This setting enables you to specify additional headers that the server adds to HTTP(S) responses.
|
||||
[server.custom_response_headers]
|
||||
#exampleHeader1 = exampleValue1
|
||||
#exampleHeader2 = exampleValue2
|
||||
|
||||
#################################### Database ####################################
|
||||
[database]
|
||||
# You can configure the database connection by specifying type, host, name, user and password
|
||||
@@ -108,8 +94,7 @@
|
||||
# Example: mysql://user:secret@host:port/database
|
||||
;url =
|
||||
|
||||
# For "postgres", use either "disable", "require" or "verify-full"
|
||||
# For "mysql", use either "true", "false", or "skip-verify".
|
||||
# For "postgres" only, either "disable", "require" or "verify-full"
|
||||
;ssl_mode = disable
|
||||
|
||||
# Database drivers may support different transaction isolation levels.
|
||||
@@ -141,18 +126,9 @@
|
||||
# For "sqlite3" only. cache mode setting used for connecting to the database. (private, shared)
|
||||
;cache_mode = private
|
||||
|
||||
# For "sqlite3" only. Enable/disable Write-Ahead Logging, https://sqlite.org/wal.html. Default is false.
|
||||
;wal = false
|
||||
|
||||
# For "mysql" only if migrationLocking feature toggle is set. How many seconds to wait before failing to lock the database for the migrations, default is 0.
|
||||
;locking_attempt_timeout_sec = 0
|
||||
|
||||
# For "sqlite" only. How many times to retry query in case of database is locked failures. Default is 0 (disabled).
|
||||
;query_retries = 0
|
||||
|
||||
# For "sqlite" only. How many times to retry transaction in case of database is locked failures. Default is 5.
|
||||
;transaction_retries = 5
|
||||
|
||||
################################### Data sources #########################
|
||||
[datasources]
|
||||
# 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.
|
||||
@@ -169,12 +145,6 @@
|
||||
# memcache: 127.0.0.1:11211
|
||||
;connstr =
|
||||
|
||||
# prefix prepended to all the keys in the remote cache
|
||||
; prefix =
|
||||
|
||||
# This enables encryption of values stored in the remote cache
|
||||
;encryption =
|
||||
|
||||
#################################### Data proxy ###########################
|
||||
[dataproxy]
|
||||
|
||||
@@ -249,10 +219,7 @@
|
||||
;google_analytics_ua_id =
|
||||
|
||||
# Google Analytics 4 tracking code, only enabled if you specify an id here
|
||||
;google_analytics_4_id =
|
||||
|
||||
# When Google Analytics 4 Enhanced event measurement is enabled, we will try to avoid sending duplicate events and let Google Analytics 4 detect navigation changes, etc.
|
||||
;google_analytics_4_send_manual_page_views = false
|
||||
;google_analytics_4_id =
|
||||
|
||||
# Google Tag Manager ID, only enabled if you specify an id here
|
||||
;google_tag_manager_id =
|
||||
@@ -269,9 +236,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
|
||||
|
||||
@@ -347,14 +311,6 @@
|
||||
# $ROOT_PATH is server.root_url without the protocol.
|
||||
;content_security_policy_template = """script-src 'self' 'unsafe-eval' 'unsafe-inline' 'strict-dynamic' $NONCE;object-src 'none';font-src 'self';style-src 'self' 'unsafe-inline' blob:;img-src * data:;base-uri 'self';connect-src 'self' grafana.com ws://$ROOT_PATH wss://$ROOT_PATH;manifest-src 'self';media-src 'none';form-action 'self';"""
|
||||
|
||||
# Enable adding the Content-Security-Policy-Report-Only header to your requests.
|
||||
# Allows you to monitor the effects of a policy without enforcing it.
|
||||
;content_security_policy_report_only = false
|
||||
|
||||
# Set Content Security Policy Report Only template used when adding the Content-Security-Policy-Report-Only header to your requests.
|
||||
# $NONCE in the template includes a random nonce.
|
||||
# $ROOT_PATH is server.root_url without the protocol.
|
||||
;content_security_policy_report_only_template = """script-src 'self' 'unsafe-eval' 'unsafe-inline' 'strict-dynamic' $NONCE;object-src 'none';font-src 'self';style-src 'self' 'unsafe-inline' blob:;img-src * data:;base-uri 'self';connect-src 'self' grafana.com ws://$ROOT_PATH wss://$ROOT_PATH;manifest-src 'self';media-src 'none';form-action 'self';"""
|
||||
# Controls if old angular plugins are supported or not. This will be disabled by default in future release
|
||||
;angular_support_enabled = true
|
||||
|
||||
@@ -375,9 +331,6 @@
|
||||
|
||||
#################################### Snapshots ###########################
|
||||
[snapshots]
|
||||
# set to false to remove snapshot functionality
|
||||
;enabled = true
|
||||
|
||||
# snapshot sharing options
|
||||
;external_enabled = true
|
||||
;external_snapshot_url = https://snapshots.raintank.io
|
||||
@@ -416,7 +369,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
|
||||
@@ -429,8 +382,8 @@
|
||||
# Default UI theme ("dark" or "light")
|
||||
;default_theme = dark
|
||||
|
||||
# Default UI language (supported IETF language tag, such as en-US)
|
||||
;default_language = en-US
|
||||
# Default locale (supported IETF language tag, such as en-US)
|
||||
;default_locale = en-US
|
||||
|
||||
# Path to a custom home page. Users are only redirected to this if the default home dashboard is used. It should match a frontend route and contain a leading slash.
|
||||
;home_page =
|
||||
@@ -452,18 +405,10 @@
|
||||
# Enter a comma-separated list of users login to hide them in the Grafana UI. These users are shown to Grafana admins and themselves.
|
||||
; hidden_users =
|
||||
|
||||
[service_accounts]
|
||||
# Service account maximum expiration date in days.
|
||||
# When set, Grafana will not allow the creation of tokens with expiry greater than this setting.
|
||||
; token_expiration_day_limit =
|
||||
|
||||
[auth]
|
||||
# Login cookie name
|
||||
;login_cookie_name = grafana_session
|
||||
|
||||
# Disable usage of Grafana build-in login solution.
|
||||
;disable_login = false
|
||||
|
||||
# The maximum lifetime (duration) an authenticated user can be inactive before being required to login at next visit. Default is 7 days (7d). This setting should be expressed as a duration, e.g. 5m (minutes), 6h (hours), 10d (days), 2w (weeks), 1M (month). The lifetime resets at each successful token rotation.
|
||||
;login_maximum_inactive_lifetime_duration =
|
||||
|
||||
@@ -484,7 +429,6 @@
|
||||
|
||||
# Set to true to attempt login with OAuth automatically, skipping the login screen.
|
||||
# This setting is ignored if multiple OAuth providers are configured.
|
||||
# Deprecated, use auto_login option for specific provider instead.
|
||||
;oauth_auto_login = false
|
||||
|
||||
# OAuth state max age cookie duration in seconds. Defaults to 600 seconds.
|
||||
@@ -505,12 +449,6 @@
|
||||
# Set to true to enable Azure authentication option for HTTP-based datasources.
|
||||
;azure_auth_enabled = false
|
||||
|
||||
# Set to skip the organization role from JWT login and use system's role assignment instead.
|
||||
; skip_org_role_sync = false
|
||||
|
||||
# Use email lookup in addition to the unique ID provided by the IdP
|
||||
;oauth_allow_insecure_email_lookup = false
|
||||
|
||||
#################################### Anonymous Auth ######################
|
||||
[auth.anonymous]
|
||||
# enable anonymous access
|
||||
@@ -529,7 +467,6 @@
|
||||
[auth.github]
|
||||
;enabled = false
|
||||
;allow_sign_up = true
|
||||
;auto_login = false
|
||||
;client_id = some_id
|
||||
;client_secret = some_secret
|
||||
;scopes = user:email,read:org
|
||||
@@ -542,13 +479,11 @@
|
||||
;role_attribute_path =
|
||||
;role_attribute_strict = false
|
||||
;allow_assign_grafana_admin = false
|
||||
;skip_org_role_sync = false
|
||||
|
||||
#################################### GitLab Auth #########################
|
||||
[auth.gitlab]
|
||||
;enabled = false
|
||||
;allow_sign_up = true
|
||||
;auto_login = false
|
||||
;client_id = some_id
|
||||
;client_secret = some_secret
|
||||
;scopes = api
|
||||
@@ -560,13 +495,11 @@
|
||||
;role_attribute_path =
|
||||
;role_attribute_strict = false
|
||||
;allow_assign_grafana_admin = false
|
||||
;skip_org_role_sync = false
|
||||
|
||||
#################################### Google Auth ##########################
|
||||
[auth.google]
|
||||
;enabled = false
|
||||
;allow_sign_up = true
|
||||
;auto_login = false
|
||||
;client_id = some_client_id
|
||||
;client_secret = some_client_secret
|
||||
;scopes = https://www.googleapis.com/auth/userinfo.profile https://www.googleapis.com/auth/userinfo.email
|
||||
@@ -575,25 +508,21 @@
|
||||
;api_url = https://www.googleapis.com/oauth2/v1/userinfo
|
||||
;allowed_domains =
|
||||
;hosted_domain =
|
||||
;skip_org_role_sync = false
|
||||
|
||||
#################################### Grafana.com Auth ####################
|
||||
[auth.grafana_com]
|
||||
;enabled = false
|
||||
;allow_sign_up = true
|
||||
;auto_login = false
|
||||
;client_id = some_id
|
||||
;client_secret = some_secret
|
||||
;scopes = user:email
|
||||
;allowed_organizations =
|
||||
;skip_org_role_sync = false
|
||||
|
||||
#################################### Azure AD OAuth #######################
|
||||
[auth.azuread]
|
||||
;name = Azure AD
|
||||
;enabled = false
|
||||
;allow_sign_up = true
|
||||
;auto_login = false
|
||||
;client_id = some_client_id
|
||||
;client_secret = some_client_secret
|
||||
;scopes = openid email profile
|
||||
@@ -603,15 +532,12 @@
|
||||
;allowed_groups =
|
||||
;role_attribute_strict = false
|
||||
;allow_assign_grafana_admin = false
|
||||
# prevent synchronizing users organization roles
|
||||
;skip_org_role_sync = false
|
||||
|
||||
#################################### Okta OAuth #######################
|
||||
[auth.okta]
|
||||
;name = Okta
|
||||
;enabled = false
|
||||
;allow_sign_up = true
|
||||
;auto_login = false
|
||||
;client_id = some_id
|
||||
;client_secret = some_secret
|
||||
;scopes = openid profile email groups
|
||||
@@ -623,14 +549,12 @@
|
||||
;role_attribute_path =
|
||||
;role_attribute_strict = false
|
||||
;allow_assign_grafana_admin = false
|
||||
;skip_org_role_sync = false
|
||||
|
||||
#################################### Generic OAuth ##########################
|
||||
[auth.generic_oauth]
|
||||
;enabled = false
|
||||
;name = OAuth
|
||||
;allow_sign_up = true
|
||||
;auto_login = false
|
||||
;client_id = some_id
|
||||
;client_secret = some_secret
|
||||
;scopes = user:email,read:org
|
||||
@@ -686,7 +610,7 @@
|
||||
;jwk_set_url = https://foo.bar/.well-known/jwks.json
|
||||
;jwk_set_file = /path/to/jwks.json
|
||||
;cache_ttl = 60m
|
||||
;expect_claims = {"aud": ["foo", "bar"]}
|
||||
;expected_claims = {"aud": ["foo", "bar"]}
|
||||
;key_file = /path/to/key/file
|
||||
;role_attribute_path =
|
||||
;role_attribute_strict = false
|
||||
@@ -736,11 +660,6 @@
|
||||
#################################### Role-based Access Control ###########
|
||||
[rbac]
|
||||
;permission_cache = true
|
||||
|
||||
# Reset basic roles permissions on boot
|
||||
# Warning left to true, basic roles permissions will be reset on every boot
|
||||
#reset_basic_roles = false
|
||||
|
||||
#################################### SMTP / Emailing ##########################
|
||||
[smtp]
|
||||
;enabled = false
|
||||
@@ -1072,7 +991,6 @@
|
||||
# Url used to import dashboards directly from Grafana.com
|
||||
[grafana_com]
|
||||
;url = https://grafana.com
|
||||
;api_url = https://grafana.com/api
|
||||
|
||||
#################################### Distributed tracing ############
|
||||
# Opentracing is deprecated use opentelemetry instead
|
||||
@@ -1146,7 +1064,6 @@
|
||||
;account_name =
|
||||
;account_key =
|
||||
;container_name =
|
||||
;sas_token_expiration_days =
|
||||
|
||||
[external_image_storage.local]
|
||||
# does not require any configuration
|
||||
@@ -1162,11 +1079,6 @@
|
||||
# Concurrent render request limit affects when the /render HTTP endpoint is used. Rendering many images at the same time can overload the server,
|
||||
# which this setting can help protect against by only allowing a certain amount of concurrent requests.
|
||||
;concurrent_render_request_limit = 30
|
||||
# Determines the lifetime of the render key used by the image renderer to access and render Grafana.
|
||||
# This setting should be expressed as a duration. Examples: 10s (seconds), 5m (minutes), 2h (hours).
|
||||
# Default is 5m. This should be more than enough for most deployments.
|
||||
# Change the value only if image rendering is failing and you see `Failed to get the render key from cache` in Grafana logs.
|
||||
;render_key_lifetime = 5m
|
||||
|
||||
[panels]
|
||||
# If set to true Grafana will allow script tags in text panels. Not recommended as it enable XSS vulnerabilities.
|
||||
@@ -1318,24 +1230,3 @@
|
||||
|
||||
# Enable or disable loading other base map layers
|
||||
;enable_custom_baselayers = true
|
||||
|
||||
# Move an app plugin referenced by its id (including all its pages) to a specific navigation section
|
||||
# Dependencies: needs the `topnav` feature to be enabled
|
||||
[navigation.app_sections]
|
||||
# The following will move an app plugin with the id of `my-app-id` under the `starred` section
|
||||
# my-app-id = admin
|
||||
|
||||
# Move a specific app plugin page (referenced by its `path` field) to a specific navigation section
|
||||
[navigation.app_standalone_pages]
|
||||
# The following will move the page with the path "/a/my-app-id/starred-content" from `my-app-id` to the `starred` section
|
||||
# /a/my-app-id/starred-content = starred
|
||||
|
||||
#################################### Secure Socks5 Datasource Proxy #####################################
|
||||
[secure_socks_datasource_proxy]
|
||||
; enabled = false
|
||||
; root_ca_cert =
|
||||
; client_key =
|
||||
; client_cert =
|
||||
; server_name =
|
||||
# The address of the socks5 proxy datasources should connect to
|
||||
; proxy_address =
|
||||
|
||||
@@ -10,7 +10,8 @@ This directory contains guides for contributors to the Grafana project.
|
||||
|
||||
The `style-guides` directory contains style guides for the Grafana software project and documentation.
|
||||
|
||||
- [Backend style guide](backend/style-guide.md) for how to style and format backend functionality and code.
|
||||
- [Backend style guide](style-guides/backend.md) for how to style and format backend functionality and code.
|
||||
- [Documentation style guide](style-guides/documentation-style-guide.md) for how to style and format documentation.
|
||||
- [Frontend style guide](style-guides/frontend.md) for how to style and format the user-facing functionality and code.
|
||||
- [Redux framework](style-guides/redux.md) for designing the Grafana redux framework.
|
||||
- [Themes style guide](style-guides/themes.md) for designing and updating Grafana themes.
|
||||
|
||||
@@ -4,9 +4,9 @@ Are you looking to take on contributions with bigger impact? These guides help y
|
||||
|
||||
Learn more about the backend architecture:
|
||||
|
||||
- Part 1: [Services](../backend/services.md)
|
||||
- Part 2: [Communication](../backend/communication.md)
|
||||
- Part 3: [Database](../backend/database.md)
|
||||
- Part 1: [Services](backend/services.md)
|
||||
- Part 2: [Communication](backend/communication.md)
|
||||
- Part 3: [Database](backend/database.md)
|
||||
|
||||
Learn more about the frontend architecture:
|
||||
|
||||
|
||||
@@ -62,7 +62,7 @@ You can now make SQL queries in any of your [command handlers](communication.md#
|
||||
|
||||
```go
|
||||
func (s *MyService) DeleteDashboard(ctx context.Context, cmd *models.DeleteDashboardCommand) error {
|
||||
if err := s.SQLStore.WithDbSession(ctx, func(sess *db.Session) error {
|
||||
if err := s.SQLStore.WithDbSession(ctx, func(sess *sqlstore.DBSession) error {
|
||||
_, err := sess.Exec("DELETE FROM dashboards WHERE dashboard_id=?", cmd.DashboardID)
|
||||
return err
|
||||
})
|
||||
81
contribute/architecture/backend/errors.md
Normal file
81
contribute/architecture/backend/errors.md
Normal file
@@ -0,0 +1,81 @@
|
||||
# Errors
|
||||
|
||||
Grafana introduced its own error type `github.com/grafana/grafana/pkg/util/errutil.Error`
|
||||
in June 2022. It's built on top of the Go `error` interface extended to
|
||||
contain all the information necessary by Grafana to handle errors in an
|
||||
informative and safe way.
|
||||
|
||||
Previously, Grafana has passed around regular Go errors and have had to
|
||||
rely on bespoke solutions in API handlers to communicate informative
|
||||
messages to the end-user. With the new `errutil.Error`, the API handlers
|
||||
can be slimmed as information about public messaging, structured data
|
||||
related to the error, localization metadata, log level, HTTP status
|
||||
code, and so forth are carried by the error.
|
||||
|
||||
## Basic use
|
||||
|
||||
### Declaring errors
|
||||
|
||||
For a service, declare the different categories of errors that may occur
|
||||
from your service (this corresponds to what you might want to have
|
||||
specific public error messages or their templates for) by globally
|
||||
constructing variables using the `errutil.NewBase(status, messageID, opts...)`
|
||||
function.
|
||||
|
||||
The status code loosely corresponds to HTTP status codes and provides a
|
||||
default log level for errors to ensure that the request logging is
|
||||
properly informing administrators about various errors occurring in
|
||||
Grafana (e.g. `StatusBadRequest` is generally speaking not as relevant
|
||||
as `StatusInternal`). All available status codes live in the `errutil`
|
||||
package and have names starting with `Status`.
|
||||
|
||||
The messageID is constructed as `<servicename>.<error-identifier>` where
|
||||
the `<servicename>` corresponds to the root service directory per
|
||||
[the package hierarchy](package-hierarchy.md) and `<error-identifier>`
|
||||
is a short identifier using dashes for word separation that identifies
|
||||
the specific category of errors within the service.
|
||||
|
||||
To set a static message sent to the client when the error occurs, the
|
||||
`errutil.WithPublicMessage(message string)` option may be appended to
|
||||
the NewBase function call. For dynamic messages or more options, refer
|
||||
to the `errutil` package's GoDocs.
|
||||
|
||||
Errors are then constructed using the `Base.Errorf` method, which
|
||||
functions like the [fmt.Errorf](https://pkg.go.dev/fmt#Errorf) method
|
||||
except that it creates an `errutil.Error`.
|
||||
|
||||
```go
|
||||
package main
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"github.com/grafana/grafana/pkg/util/errutil"
|
||||
"example.org/thing"
|
||||
)
|
||||
|
||||
var ErrBaseNotFound = errutil.NewBase(errutil.StatusNotFound, "main.not-found", errutil.WithPublicMessage("Thing not found"))
|
||||
|
||||
func Look(id int) (*Thing, error) {
|
||||
t, err := thing.GetByID(id)
|
||||
if errors.Is(err, thing.ErrNotFound) {
|
||||
return nil, ErrBaseNotFound.Errorf("did not find thing with ID %d: %w", id, err)
|
||||
}
|
||||
|
||||
return t, nil
|
||||
}
|
||||
```
|
||||
|
||||
Check out [errutil's GoDocs](https://pkg.go.dev/github.com/grafana/grafana@v0.0.0-20220621133844-0f4fc1290421/pkg/util/errutil)
|
||||
for details on how to construct and use Grafana style errors.
|
||||
|
||||
### Handling errors in the API
|
||||
|
||||
API handlers use the `github.com/grafana/grafana/pkg/api/response.Err`
|
||||
function to create responses based on `errutil.Error`s.
|
||||
|
||||
> **Note:** (@sakjur 2022-06) `response.Err` requires all errors to be
|
||||
> `errutil.Error` or it'll be considered an internal server error.
|
||||
> This is something that should be fixed in the near future to allow
|
||||
> fallback behavior to make it possible to correctly handle Grafana
|
||||
> style errors if they're present but allow fallback to a reasonable
|
||||
> default otherwise.
|
||||
@@ -19,11 +19,11 @@ package example
|
||||
type Service struct {
|
||||
logger log.Logger
|
||||
cfg *setting.Cfg
|
||||
sqlStore db.DB
|
||||
sqlStore *sqlstore.SQLStore
|
||||
}
|
||||
|
||||
// ProvideService provides Service as dependency for other services.
|
||||
func ProvideService(cfg *setting.Cfg, sqlStore db.DB) (*Service, error) {
|
||||
func ProvideService(cfg *setting.Cfg, sqlStore *sqlstore.SQLStore) (*Service, error) {
|
||||
s := &Service{
|
||||
logger: log.New("service"),
|
||||
cfg: cfg,
|
||||
@@ -76,7 +76,7 @@ package server
|
||||
import (
|
||||
"github.com/google/wire"
|
||||
"github.com/grafana/grafana/pkg/example"
|
||||
"github.com/grafana/grafana/pkg/infra/db"
|
||||
"github.com/grafana/grafana/pkg/services/sqlstore"
|
||||
)
|
||||
|
||||
var wireBasicSet = wire.NewSet(
|
||||
@@ -98,7 +98,7 @@ func Initialize(cla setting.CommandLineArgs, opts Options, apiOpts api.ServerOpt
|
||||
return &Server{}, nil
|
||||
}
|
||||
|
||||
func InitializeForTest(cla setting.CommandLineArgs, opts Options, apiOpts api.ServerOptions, sqlStore db.DB) (*Server, error) {
|
||||
func InitializeForTest(cla setting.CommandLineArgs, opts Options, apiOpts api.ServerOptions, sqlStore *sqlstore.SQLStore) (*Server, error) {
|
||||
wire.Build(wireExtsTestSet)
|
||||
return &Server{}, nil
|
||||
}
|
||||
@@ -1,98 +0,0 @@
|
||||
# Backend
|
||||
|
||||
This document gives an overview of the directory structure, and ongoing refactorings.
|
||||
|
||||
For more information on developing for the backend:
|
||||
|
||||
- [Backend style guide](/contribute/backend/style-guide.md)
|
||||
- [Architecture](/contribute/architecture)
|
||||
|
||||
## 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,103 +0,0 @@
|
||||
# Errors
|
||||
|
||||
Grafana introduced its own error type `github.com/grafana/grafana/pkg/util/errutil.Error`
|
||||
in June 2022. It's built on top of the Go `error` interface extended to
|
||||
contain all the information necessary by Grafana to handle errors in an
|
||||
informative and safe way.
|
||||
|
||||
Previously, Grafana has passed around regular Go errors and have had to
|
||||
rely on bespoke solutions in API handlers to communicate informative
|
||||
messages to the end-user. With the new `errutil.Error`, the API handlers
|
||||
can be slimmed as information about public messaging, structured data
|
||||
related to the error, localization metadata, log level, HTTP status
|
||||
code, and so forth are carried by the error.
|
||||
|
||||
## Basic use
|
||||
|
||||
### Declaring errors
|
||||
|
||||
For a service, declare the different categories of errors that may occur
|
||||
from your service (this corresponds to what you might want to have
|
||||
specific public error messages or their templates for) by globally
|
||||
constructing variables using the `errutil.NewBase(status, messageID, opts...)`
|
||||
function.
|
||||
|
||||
The status code loosely corresponds to HTTP status codes and provides a
|
||||
default log level for errors to ensure that the request logging is
|
||||
properly informing administrators about various errors occurring in
|
||||
Grafana (e.g. `StatusBadRequest` is generally speaking not as relevant
|
||||
as `StatusInternal`). All available status codes live in the `errutil`
|
||||
package and have names starting with `Status`.
|
||||
|
||||
The messageID is constructed as `<servicename>.<errorIdentifier>` where
|
||||
the `<servicename>` corresponds to the root service directory per
|
||||
[the package hierarchy](package-hierarchy.md) and `<errorIdentifier>`
|
||||
is a camelCased short identifier that identifies the specific category
|
||||
of errors within the service.
|
||||
|
||||
Errors should be grouped together (i.e. share `errutil.Base`) based on
|
||||
their public facing properties, a single messageID should represent a
|
||||
translatable string and what metadata is carried with it.
|
||||
_service.MissingRequiredFields_ and _service.MessageTooLong_ are likely
|
||||
to be two different errors that are both validation failures, as their
|
||||
user-friendly expansions are likely different. This is the maximization
|
||||
rule of declaring as many `errutil.Error`s as you need public message
|
||||
structures.
|
||||
|
||||
The other side of this is that even though a login service's
|
||||
"user is ratelimited", "user does not exist", "wrong username", and
|
||||
"wrong password" are reasonable errors to separate between internally,
|
||||
for security reasons the end-user should not be told which particular
|
||||
error they struck. This means that they should share the same base (such
|
||||
as _login.Failed_). This is the minimization rule of grouping together
|
||||
distinct logged errors that provide the same information via the API.
|
||||
|
||||
To set a static message sent to the client when the error occurs, the
|
||||
`errutil.WithPublicMessage(message string)` option may be appended to
|
||||
the NewBase function call. For dynamic messages or more options, refer
|
||||
to the `errutil` package's GoDocs.
|
||||
|
||||
Errors are then constructed using the `Base.Errorf` method, which
|
||||
functions like the [fmt.Errorf](https://pkg.go.dev/fmt#Errorf) method
|
||||
except that it creates an `errutil.Error`.
|
||||
|
||||
```go
|
||||
package main
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"github.com/grafana/grafana/pkg/util/errutil"
|
||||
"example.org/thing"
|
||||
)
|
||||
|
||||
var ErrBaseNotFound = errutil.NewBase(errutil.StatusNotFound, "main.notFound", errutil.WithPublicMessage("Thing not found"))
|
||||
|
||||
func Look(id int) (*Thing, error) {
|
||||
t, err := thing.GetByID(id)
|
||||
if errors.Is(err, thing.ErrNotFound) {
|
||||
return nil, ErrBaseNotFound.Errorf("did not find thing with ID %d: %w", id, err)
|
||||
}
|
||||
|
||||
return t, nil
|
||||
}
|
||||
```
|
||||
|
||||
Errors consider themselves to be both its `errutil.Base` or
|
||||
`errutil.Template` and whatever errors it wraps for the purposes of the
|
||||
`errors.Is` function.
|
||||
|
||||
Check out the package and method documentation for
|
||||
github.com/grafana/grafana/pkg/util/errutil for details on how to
|
||||
construct and use Grafana style errors. This documentation is
|
||||
unfortunately not readily available on pkg.go.dev because Grafana is not
|
||||
fully Go modules compatible, but can be viewed using
|
||||
[godoc](https://go.dev/cmd/godoc/) from the Grafana directory.
|
||||
|
||||
### Handling errors in the API
|
||||
|
||||
API handlers use the `github.com/grafana/grafana/pkg/api/response.Err`
|
||||
or `github.com/grafana/grafana/pkg/api/response.ErrWithFallback`
|
||||
(same signature as `response.Error`) function to create responses based
|
||||
on `errutil.Error`.
|
||||
|
||||
Using `response.Err` requires all errors to be Grafana style errors.
|
||||
@@ -1,211 +0,0 @@
|
||||
# Backend style guide
|
||||
|
||||
Grafana's backend has been developed for a long time with a mix of code styles. This guide explains how we want to write Go code in the future.
|
||||
|
||||
Unless stated otherwise, use the guidelines listed in the following articles:
|
||||
|
||||
- [Effective Go](https://golang.org/doc/effective_go.html)
|
||||
- [Code Review Comments](https://github.com/golang/go/wiki/CodeReviewComments)
|
||||
- [Go: Best Practices for Production Environments](http://peter.bourgon.org/go-in-production/#formatting-and-style)
|
||||
|
||||
## Linting and formatting
|
||||
|
||||
To ensure consistency across the Go codebase, we require all code to pass a number of linter 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:
|
||||
|
||||
```bash
|
||||
make lint-go
|
||||
```
|
||||
|
||||
## Testing
|
||||
|
||||
We value clean and readable code, that is loosely coupled and covered by unit tests. This makes it easier to collaborate and maintain the code.
|
||||
|
||||
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.
|
||||
|
||||
To properly mark a test as being an integration test, you must format your test function definition as follows, with the function name starting with `TestIntegration` and the check for `testing.Short()`:
|
||||
|
||||
```
|
||||
func TestIntegrationFoo(t *testing.T) {
|
||||
if testing.Short() {
|
||||
t.Skip("skipping integration test")
|
||||
}
|
||||
// function body
|
||||
}
|
||||
```
|
||||
|
||||
If you do not follow this convention, your integration test may be run twice or not run at all.
|
||||
|
||||
### Assertions
|
||||
|
||||
Use respectively [`assert.*`](https://github.com/stretchr/testify#assert-package) functions to make assertions that
|
||||
should _not_ halt the test ("soft checks") and [`require.*`](https://github.com/stretchr/testify#require-package)
|
||||
functions to make assertions that _should_ halt the test ("hard checks"). Typically you want to use the latter type of
|
||||
check to assert that errors have or have not happened, since continuing the test after such an assertion fails is
|
||||
chaotic (the system under test will be in an undefined state) and you'll often have segfaults in practice.
|
||||
|
||||
### Sub-tests
|
||||
|
||||
Use [`t.Run`](https://golang.org/pkg/testing/#T.Run) to group sub-test cases, since it allows common setup and teardown
|
||||
code, plus lets you run each test case in isolation when debugging. Don't use `t.Run` to e.g. group assertions.
|
||||
|
||||
### Cleanup
|
||||
|
||||
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
|
||||
|
||||
Optionally, we use [`mock.Mock`](https://github.com/stretchr/testify#mock-package) package to generate mocks. This is
|
||||
useful when you expect different behaviours of the same function.
|
||||
|
||||
#### Tips
|
||||
|
||||
- Use `Once()` or `Times(n)` to make this mock only works `n` times.
|
||||
- Use `mockedClass.AssertExpectations(t)` to guarantee that the mock is called the times asked.
|
||||
- If any mock set is not called or its expects more calls, the test fails.
|
||||
- You can pass `mock.Anything` as argument if you don't care about the argument passed.
|
||||
- Use `mockedClass.AssertNotCalled(t, "FunctionName")` to assert that this test is not called.
|
||||
|
||||
#### Example
|
||||
|
||||
This is an example to easily create a mock of an interface.
|
||||
|
||||
Given this interface:
|
||||
|
||||
```go
|
||||
func MyInterface interface {
|
||||
Get(ctx context.Context, id string) (Object, error)
|
||||
}
|
||||
```
|
||||
|
||||
Mock implementation should be like this:
|
||||
|
||||
```go
|
||||
import
|
||||
|
||||
func MockImplementation struct {
|
||||
mock.Mock
|
||||
}
|
||||
|
||||
func (m *MockImplementation) Get(ctx context.Context, id string) error {
|
||||
args := m.Called(ctx, id) // Pass all arguments in order here
|
||||
return args.Get(0).(Object), args.Error(1)
|
||||
}
|
||||
```
|
||||
|
||||
And use it as the following way:
|
||||
|
||||
```go
|
||||
|
||||
objectToReturn := Object{Message: "abc"}
|
||||
errToReturn := errors.New("my error")
|
||||
|
||||
myMock := &MockImplementation{}
|
||||
defer myMock.AssertExpectations(t)
|
||||
|
||||
myMock.On("Get", mock.Anything, "id1").Return(objectToReturn, errToReturn).Once()
|
||||
myMock.On("Get", mock.Anything, "id2").Return(Object{}, nil).Once()
|
||||
|
||||
anyService := NewService(myMock)
|
||||
resp, err := anyService.Call("id1")
|
||||
|
||||
assert.Equal(t, resp.Message, objectToReturn.Message)
|
||||
assert.Error(t, err, errToReturn)
|
||||
|
||||
resp, err = anyService.Call("id2")
|
||||
assert.Nil(t, err)
|
||||
```
|
||||
|
||||
#### Mockery
|
||||
|
||||
When an interface to test is too big, it's annoying to mock each function manually. To avoid this, you can
|
||||
use [`mockery`](https://github.com/vektra/mockery) library to generate the mocks.
|
||||
|
||||
The command is like the following (there are more options documented if you need to use another one):
|
||||
|
||||
```
|
||||
mockery --name InterfaceName --structname MockImplementationName --inpackage --filename my_implementation_mock.go
|
||||
```
|
||||
|
||||
- `--name`: Interface to mock
|
||||
- `--structname`: Mock implementation name
|
||||
- `--inpackage`: To use the same package name as the interface
|
||||
- `--filename`: Your mock generated file name
|
||||
|
||||
If any interface signature changes, executing the command again updates the mock.
|
||||
|
||||
Additionally, you can put `go:generate` command on the top of the file as a comment. It's useful because some IDEs
|
||||
like Goland and Visual Studio Code allows executing scripts from the IDE.
|
||||
|
||||
```
|
||||
package <package>
|
||||
|
||||
import (
|
||||
...
|
||||
)
|
||||
|
||||
//go:generate mockery --name InterfaceName --structname MockImplementationName --inpackage --filename my_implementation_mock.go
|
||||
```
|
||||
|
||||
## Globals
|
||||
|
||||
As a general rule of thumb, avoid using global variables, since they make the code difficult to maintain and reason
|
||||
about, and to write tests for. The Grafana codebase currently does use a lot of global variables, especially when
|
||||
it comes to configuration, but that is a problem we're trying to solve.
|
||||
|
||||
## Pointers
|
||||
|
||||
In general, use value types and only reach for pointers when there's a real need. The reason being that pointers
|
||||
increase the risk of bugs, since a pointer can be nil and dereferencing a nil pointer leads to a panic (AKA segfault).
|
||||
Valid reasons to use a pointer include (but not necessarily limited to):
|
||||
|
||||
- You might need to pass a modifiable argument to a function
|
||||
- Copying an object might incur a performance hit (benchmark to check your assumptions, copying is often faster than
|
||||
allocating heap memory)
|
||||
- You might _need_ `nil` to tell if a variable isn't set, although usually it's better to use the type's zero
|
||||
value to tell instead
|
||||
|
||||
## Database
|
||||
|
||||
In database related code, we follow certain patterns.
|
||||
|
||||
### Foreign keys
|
||||
|
||||
While they can be useful, we don't generally use foreign key constraints in Grafana, for historical and
|
||||
technical reasons. See this [comment](https://github.com/grafana/grafana/issues/3269#issuecomment-383328548) by Torkel
|
||||
for context.
|
||||
|
||||
### Unique columns
|
||||
|
||||
If a column, or column combination, should be unique, add a corresponding uniqueness constraint through a migration.
|
||||
|
||||
## 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 [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.
|
||||
@@ -72,7 +72,7 @@ We make use of a tool called [**Betterer**](https://phenomnomnominal.github.io/b
|
||||
|
||||
## Backend-specific guidelines
|
||||
|
||||
Please refer to the [backend style guidelines](/contribute/backend/style-guide.md).
|
||||
Please refer to the [backend style guidelines](/contribute/style-guides/backend.md).
|
||||
|
||||
## Code review
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ We recommend using [Homebrew](https://brew.sh/) for installing any missing depen
|
||||
```
|
||||
brew install git
|
||||
brew install go
|
||||
brew install node@18
|
||||
brew install node@16
|
||||
npm install -g yarn
|
||||
```
|
||||
|
||||
@@ -149,13 +149,13 @@ go test -covermode=atomic -tags=integration ./pkg/...
|
||||
To run PostgreSQL and MySQL integration tests locally, you need to start the docker blocks for MySQL and/or PostgreSQL test data sources by running `make devenv sources=mysql_tests,postgres_tests`. When your test data sources are running, you can execute integration tests by running:
|
||||
|
||||
```bash
|
||||
make test-go-integration-mysql
|
||||
GRAFANA_TEST_DB=mysql go test -covermode=atomic -tags=integration ./pkg/...
|
||||
```
|
||||
|
||||
and/or
|
||||
|
||||
```bash
|
||||
make test-go-integration-postgres
|
||||
GRAFANA_TEST_DB=postgres go test -covermode=atomic -tags=integration ./pkg/...
|
||||
```
|
||||
|
||||
### Run end-to-end tests
|
||||
|
||||
@@ -1,7 +1,235 @@
|
||||
# Contribute to our documentation
|
||||
|
||||
Welcome. We're glad you're here to help make our technical documentation even better.
|
||||
We provide these guidelines to help our contributors make additions or corrections to our documentation.
|
||||
|
||||
For our style guide and writing guidelines, see [Writers' Toolkit](https://grafana.com/docs/writers-toolkit/).
|
||||
## Welcome
|
||||
|
||||
If you're interested in contributing to the Writers' Toolkit, refer to the [Writers' Toolkit](https://github.com/grafana/writers-toolkit) repository.
|
||||
Welcome. We're glad you're here to help make our technical documentation even better. We develop content that leads our users to success using Grafana products. Technical accuracy is our primary consideration, and we value the use of inclusive language. We regard your feedback as a gift - thanks for reading through these guidelines.
|
||||
|
||||
### Intended audience
|
||||
|
||||
We write these guidelines for contributors who are interested in improving our technical content.
|
||||
|
||||
## Understanding the structure of Grafana documentation
|
||||
|
||||
All Grafana Enterprise and OSS documentation is located in the [Grafana open source project](https://github.com/grafana/grafana) GitHub repository: https://github.com/grafana/grafana/tree/main/docs/sources.
|
||||
|
||||
- The **sources** directory organizes content by topic areas, for example **administration** and **alerting**.
|
||||
- Topic directories include an `_index.md` file, which provides an overview of the topic, and optionally includes subtopics that provide more detail.
|
||||
|
||||
> The `_index.md` file is required.
|
||||
|
||||
### Writing in markdown
|
||||
|
||||
We write technical documentation using [Markdown](https://en.wikipedia.org/wiki/Markdown). We've put together a short guide to help you how to structure and format your content.
|
||||
|
||||
To access the markdown guide, refer to [Markdown style guide](documentation-markdown-guide.md).
|
||||
|
||||
## Ways to contribute
|
||||
|
||||
We're thrilled that you are considering contributing to the documentation. You can contribute content in the following ways:
|
||||
|
||||
- [Request a change](#request-a-change)
|
||||
- [Edit a topic](#edit-a-topic)
|
||||
- [Write a topic](#write-a-topic)
|
||||
|
||||
### Request a change
|
||||
|
||||
Request a change when you want to make a suggestion about a topic, but don't want to provide an edit that generates a pull request. Requesting a change gives you the freedom to express your ideas without committing language. Your suggestion can reflect a small change to wording or can reflect larger, more substantive changes.
|
||||
|
||||
GitHub captures your request as an **Issue** logged against the repository.
|
||||
|
||||
Before you begin:
|
||||
|
||||
- Create a GitHub account.
|
||||
|
||||
To request a change, complete the following steps:
|
||||
|
||||
1. While viewing the topic, click **Request a change**.
|
||||
|
||||
The Issue title auto-populates with the location of the file about which you are requesting a change.
|
||||
|
||||

|
||||
|
||||
2. Enter a change request description.
|
||||
|
||||
3. Add the **type/docs** label.
|
||||
|
||||
4. Click **Submit new issue**.
|
||||
|
||||
### Edit a topic
|
||||
|
||||
If you want to recommend a small change, such as suggesting a correction to a topic, you can edit the topic directly in GitHub. You are not required to fork and clone the repo to use this approach.
|
||||
|
||||
Other small changes might include:
|
||||
|
||||
- Adding steps to a task
|
||||
- Adding clarifying language to a concept
|
||||
- Providing an example
|
||||
|
||||
Before you begin:
|
||||
|
||||
- Create a GitHub account.
|
||||
|
||||
To edit a topic, complete the following steps:
|
||||
|
||||
1. While viewing the topic you want to edit, click **Edit this page**.
|
||||
|
||||

|
||||
|
||||
2. Add your changes to the topic.
|
||||
|
||||
3. Scroll to the bottom of the page and enter a branch name.
|
||||
|
||||
For example, enter `clarified dashboard panel definition`.
|
||||
|
||||
4. Click **Commit**.
|
||||
|
||||
GitHub prompts you to create a PR.
|
||||
|
||||
5. Complete the prompts provided in the body of the PR.
|
||||
|
||||
6. Click **Create pull request**.
|
||||
|
||||
### Write a topic
|
||||
|
||||
At Grafana Labs, we use the principles of topic-based authoring when we write technical documentation. Topic-based authoring provides guidelines for writing three _types_ of technical documentation: concept, task, and reference. Before you begin writing, establish the topic type you want to write.
|
||||
|
||||
#### Understanding topic types
|
||||
|
||||
Technical content is divided into three topic types: concept, task, and reference.
|
||||
|
||||
- **Concept**: A concept topic explains _what_ a feature (or idea) is, and why it is important.
|
||||
- **Task**: A task topic explains _how_ to complete an end user procedure in the system. Task topics contain steps.
|
||||
- **Reference** A reference topic contains lookup information that a user might consult when they complete a task. Documenting a list of values with descriptions is a common form of reference topic.
|
||||
|
||||
**Example**
|
||||
|
||||
Suppose you are writing content for a site called _Doggie handbook_. You might organize your topics like this:
|
||||
|
||||
**Concepts**
|
||||
|
||||
- What a dog is
|
||||
- Brief history of dogs
|
||||
- Why you might want a dog
|
||||
- Tasks dogs can be trained to do
|
||||
|
||||
**Tasks**
|
||||
|
||||
- Feed the dog
|
||||
- Groom the dog
|
||||
- Train the dog
|
||||
|
||||
**References**
|
||||
|
||||
- List of dog equipment you will need
|
||||
- Table of breeds that includes breed name, size range, short or long hair, and type of dog
|
||||
|
||||
#### Prepare your environment
|
||||
|
||||
Before you begin writing, we recommend that you fork and clone the Grafana repository so that you can use a text editor locally to create branches, commit your changes, and create a PR.
|
||||
|
||||
While this document doesn't include git commands or descriptions of Github operations, you might find these links useful.
|
||||
|
||||
- [Install git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git): We store all source code, including documentation, in Git repositories.
|
||||
- [Fork a repo](https://docs.github.com/en/get-started/quickstart/fork-a-repo): Locate the repo you want to clone, and fork it.
|
||||
- [Clone a repo](https://docs.github.com/en/repositories/creating-and-managing-repositories/cloning-a-repository): Clone the repository to your local machine.
|
||||
- [Create a branch](https://git-scm.com/book/en/v2/Git-Branching-Basic-Branching-and-Merging): Before you make change, create a branch. Do not push changes against the `main` branch.
|
||||
- [Create a PR](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request): After you add, commit, and push your changes, create a PR in Github.
|
||||
|
||||
#### Use a documentation template to contribute a topic
|
||||
|
||||
We have provided documentation templates that align with each topic type:
|
||||
|
||||
- [Concept](templates/doc-concept-template.md)
|
||||
- [Task](templates/doc-task-template.md)
|
||||
- [Reference](templates/doc-reference-template.md)
|
||||
|
||||
Each template provides additional usage and formatting guidelines. We recommend that you make a copy of whichever template you are using, then add content.
|
||||
|
||||
> Remove any unused content before you commit your changes.
|
||||
|
||||
#### View a local build
|
||||
|
||||
Prior to pushing your changes, you can view a local build of the documentation so that you can review your work.
|
||||
|
||||
To view a local build:
|
||||
|
||||
1. Install [Docker](https://www.docker.com/products/docker-desktop).
|
||||
|
||||
1. Run Docker.
|
||||
|
||||
1. Navigate to the **docs** root directory.
|
||||
|
||||
1. Run `make build`.
|
||||
|
||||
1. Open `localhost:3002` to review your changes.
|
||||
|
||||
## Push changes and create a PR
|
||||
|
||||
When you are ready for other people to review your work, perform the following tasks.
|
||||
|
||||
1. [Add](https://git-scm.com/docs/git-add) your changes, which prepares your content for the next commit.
|
||||
|
||||
1. [Commit](https://git-scm.com/docs/git-commit) your changes.
|
||||
|
||||
1. [Push](https://git-scm.com/docs/git-push) your changes to Github.
|
||||
|
||||
1. [Create a PR](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request) in Github.
|
||||
|
||||
The docs build system automatically conducts a series of tests to ensure that the content doesn't conflict with other content in the docs repository.
|
||||
|
||||
### Understanding the PR review and approval workflow
|
||||
|
||||
When a PR is added to the repo with a label associated with `docs`, it will be reviewed by a member of the technical writing team. Depending on the size of the PR and the priority of other work, the PR will either be immediately reviewed and merged (minor fixes typically follow this pattern) or the PR will be triaged and placed in the backlog of work or moved into further development.
|
||||
|
||||
## Join our community
|
||||
|
||||
For general discussions on documentation, you’re welcome to join the `#docs` channel on our [public Grafana Slack](http://slack.raintank.io) team.
|
||||
|
||||
## Reference: Top five writing tips
|
||||
|
||||
While we don't provide a comprehensive style guide in this document, here's a few writing tips to help the writing process.
|
||||
|
||||
### Consider the audience
|
||||
|
||||
Write for an audience that is computer literate and has general technical knowledge, but is not necessarily familiar with Grafana or the finer points of observability.
|
||||
|
||||
Pretend you are explaining your topic to a brand new Grafana user or developer.
|
||||
|
||||
### Write clear and concise sentences and paragraphs
|
||||
|
||||
Use the following sentence structure when you write: _subject_—_verb_—_object_. If you are telling a user to do something, write an imperative sentence. For example “Enter the refresh rate time interval and click Save.”
|
||||
|
||||
- You can also start a sentence with an _if_ clause, which positions the condition before the action.
|
||||
- Limit the number of words in a sentence to 20..
|
||||
|
||||
### Use active voice
|
||||
|
||||
Active voice makes the performer of the action the subject
|
||||
of the sentence. When you write in passive voice, the recipient of the action (and not the performer) becomes the subject of the sentence.
|
||||
|
||||
Active-voice sentences are more direct and clearly identify _who_ is doing _what_. Not all tasks are completed by a user; sometimes the system can also be a performer (and by extension, the subject of the sentence). When you write in active voice you clearly make that distinction, which results in more engaging and less wordy content.
|
||||
|
||||
| Use (active) | Avoid (passive) |
|
||||
| ----------------------------------------------------- | -------------------------------------------------------------------- |
|
||||
| After you upgrade the software, restart the computer. | After the software has been upgraded, the computer can be restarted. |
|
||||
| Click **OK** to save the dashboard. | The dashboard is saved when the **OK** button is clicked. |
|
||||
| Create a dashboard. | A dashboard is created by you. |
|
||||
|
||||
### Avoid obscure non-English words and abbreviations
|
||||
|
||||
Users might be unfamiliar with some non-English words and abbreviations such as _per_, _vs_, and _via_. Latin abbreviations in particular, like _i.e._, _e.g._, and _etc._, are vague.
|
||||
|
||||
| Use | Don’t use |
|
||||
| ------------ | ----------- |
|
||||
| through | via |
|
||||
| that is | i.e. |
|
||||
| according to | per, as per |
|
||||
| and so on | etc. |
|
||||
|
||||
### Write self-contained topics
|
||||
|
||||
Thanks to search engines, every page in the documentation might be a reader's entry point. This means that each page needs to be self-contained and make sense on its own. The reader should not need to read other topics in order to perform the task or understand the concept.
|
||||
|
||||
However, try to be helpful and link to related information. Using the _Doggie handbook_ example, the concept topic that explains what dogs can be trained to do might link to the Train the dog task.
|
||||
|
||||
152
contribute/documentation/documentation-markdown-guide.md
Normal file
152
contribute/documentation/documentation-markdown-guide.md
Normal file
@@ -0,0 +1,152 @@
|
||||
# Markdown style guide
|
||||
|
||||
This guide for Markdown style helps keep contributions consistent across all documentation created for Grafana products. Refer to the guide and update its sections as needed when a Subject Matter Expert answers a question on Markdown style, or a decision is made about how to apply Markdown.
|
||||
|
||||
## Headers
|
||||
|
||||
In Markdown, the number of "#" symbols creates different heading levels, similar to HTML heading levels:
|
||||
|
||||
**Example**
|
||||
|
||||
- \# is \<h1>.
|
||||
- \#\# is \<h2>.
|
||||
- \#\#\# is \<h3>.
|
||||
|
||||
Start your document with a single `#` for the title of the page. Add the sub-headings with two `##`.
|
||||
|
||||
## Bold and emphasis
|
||||
|
||||
- Make text **bold** using two asterisks.
|
||||
|
||||
**Example:** It is `**important**` to use GitHub-flavored Markdown emoji consistently.
|
||||
|
||||
- Make text `_emphasized_` using single ` _underscores_`. Do not use the single asterisk, it can be easily confused with bold.
|
||||
|
||||
**Example:** GitHub-flavored markdown emoji should _only_ appear in specific cases.
|
||||
|
||||
## Links and references
|
||||
|
||||
Create links to other website by wrapping the display text in square brackets, and the web URL in curved brackets.
|
||||
|
||||
\[text to display](www.website.com)
|
||||
|
||||
**Example:** For more information on including emoji in GitHub-flavored markdown, refer to the [webfx page on emoji](https://www.webfx.com/tools/emoji-cheat-sheet/) for a list of emoji.
|
||||
|
||||
## Block quotes
|
||||
|
||||
Include block quotes inside text using right-facing arrows:
|
||||
|
||||
**Example**
|
||||
|
||||
> Any important information
|
||||
> about emoji can be separated into
|
||||
> a blockquote.
|
||||
|
||||
## Code blocks
|
||||
|
||||
Code blocks written with markdown can show off syntax highlighting specific to different languages. Use three back tics to create a code block:
|
||||
|
||||
```
|
||||
function testNum(a) {
|
||||
if (a > 0) {
|
||||
return "positive";
|
||||
} else {
|
||||
return "NOT positive";
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
Write the name of the language after the first set of back tics, no spaces, to show specific syntax highlighting. For example; "\```javascript" produces the following:
|
||||
|
||||
```javascript
|
||||
function testNum(a) {
|
||||
if (a > 0) {
|
||||
return 'positive';
|
||||
} else {
|
||||
return 'NOT positive';
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Tables
|
||||
|
||||
Construct a table by typing the table headings, and separating them with a "|" character. Then, add a second line of dashes ("-") separated by another "|" character. When constructing the table cells, separate each cell data with another "|".
|
||||
|
||||
**Example**
|
||||
|
||||
Heading one | Heading two
|
||||
|
||||
\------------|------------
|
||||
|
||||
Cell one data| Cell two data
|
||||
|
||||
Will publish as:
|
||||
|
||||
| Heading one | Heading two |
|
||||
| ------------- | ------------- |
|
||||
| Cell one data | Cell two data |
|
||||
|
||||
## Lists
|
||||
|
||||
### Numbered lists
|
||||
|
||||
To avoid inconsistent list numbering, use repetitive list numbering:
|
||||
|
||||
\1. First
|
||||
|
||||
\1. Second
|
||||
|
||||
\1. Third
|
||||
|
||||
The list above will always display as:
|
||||
|
||||
1. First
|
||||
2. Second
|
||||
3. Third
|
||||
|
||||
### Unordered lists
|
||||
|
||||
Build a list of points - an unordered or unnumbered list - by using "\-" (hyphen) characters.
|
||||
|
||||
**Example**
|
||||
|
||||
- First
|
||||
- Another item
|
||||
- The last list item
|
||||
|
||||
## Images
|
||||
|
||||
_Do not_ use image shortcodes at this time.
|
||||
|
||||
Include images in a document using the following syntax:
|
||||
|
||||
```
|
||||

|
||||
```
|
||||
|
||||
> **Note:** Alt text does not appear when the user hovers the mouse over the image, but title text does.
|
||||
|
||||
**Examples:**
|
||||
|
||||
- \!\[Grafana logo](/link/to/grafanalogo/logo.png "Grafana logo")
|
||||
- \!\[Example](/static/img/docs/folder_name/alert_test_rule.png "Example title")
|
||||
|
||||
This follows the format of "!", alt text wrapped in "[]" and the link URL wrapped in "()".
|
||||
|
||||
You can also use HTML such as the following:
|
||||
|
||||
```
|
||||
<img src="example.png"
|
||||
alt="Example image"
|
||||
style="float: left; margin-right: 5px;" />
|
||||
```
|
||||
|
||||
In most cases, use the markdown syntax rather than the HTML syntax. Only use the HTML if you need to change the image in ways unsupported by Markdown.
|
||||
|
||||
## Comments
|
||||
|
||||
You can include comments that will not appear in published markdown using the following syntax:
|
||||
|
||||
\[comment]: <> (Comment text to display)
|
||||
|
||||
The word "comment" wrapped in "[]" followed by a ":", a space, "<>", and then the comment itself wrapped in "()".
|
||||
BIN
contribute/documentation/edit-file.png
Normal file
BIN
contribute/documentation/edit-file.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 182 KiB |
BIN
contribute/documentation/request-change.png
Normal file
BIN
contribute/documentation/request-change.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 179 KiB |
42
contribute/documentation/templates/doc-concept-template.md
Normal file
42
contribute/documentation/templates/doc-concept-template.md
Normal file
@@ -0,0 +1,42 @@
|
||||
DELETE THIS LINE: If draft = false, then the document will not be built in the doc site. If the date is earlier than the build date, than the document will not show in the build site. Use these settings to control whether future content is shown in the doc site.
|
||||
+++
|
||||
draft = "false"
|
||||
date = "yyyy-mm-dd"
|
||||
title = "Title in sentence case"
|
||||
description = "Description in title case"
|
||||
keywords = ["grafana", "enter", "keywords", "here"]
|
||||
type = "docs"
|
||||
[menu.docs]
|
||||
name = "Name of topic"
|
||||
identifier = "identifier"
|
||||
parent = "menu parent"
|
||||
weight = 100
|
||||
+++
|
||||
|
||||
# Concept
|
||||
|
||||
The title of the concept topic will generally be a noun or a gerund. Examples include Templates, Templating, Dashboards, and panels.
|
||||
|
||||
Concepts are topic types for any information that doesn't involve task lists or reference information. Ideally you use concept elements to explain concepts, ideas, overviews, workflows, and the like. In the intro section, this first paragraph or two, you should explain to the user what to expect in this topic or section.
|
||||
|
||||
[Permissions overview](https://grafana.com/docs/grafana/latest/permissions/overview/) is an example of a concept topic.
|
||||
|
||||
## Idea
|
||||
|
||||
Concept topics or sections explain _what_ and _why_. They do not explain _how_. If you are a new user, you might look for concept information to learn about what Grafana is, why it might be useful to you, and what the general workflow is.
|
||||
|
||||
## Workflow
|
||||
|
||||
Continuing the example in the previous section, here is a sample Grafana workflow.
|
||||
|
||||
1. Install Grafana. <link to task for installing Grafana>
|
||||
1. Set up data sources. <link to data sources concept topic, which links to data source task topics>
|
||||
1. Create panels. <link to panel concept topic, which links to tasks>
|
||||
1. Create dashboards. <link to panel concept topic, which links to tasks>
|
||||
1. Enter queries. <link to query editor concept topic>
|
||||
1. Add users. <link to user management concept topic, which links to tasks>
|
||||
1. Create playlists. <link to Playlist topic that contains concept information and tasks>
|
||||
|
||||
## Next steps
|
||||
|
||||
Concept tasks often link to related information, including _tasks_ related to the concept and _reference_ topics related to the concept.
|
||||
75
contribute/documentation/templates/doc-reference-template.md
Normal file
75
contribute/documentation/templates/doc-reference-template.md
Normal file
@@ -0,0 +1,75 @@
|
||||
DELETE THIS LINE: If draft = false, then the document will not be built in the doc site. If the date is earlier than the build date, than the document will not show in the build site. Use these settings to control whether future content is shown in the doc site.
|
||||
+++
|
||||
draft = "false"
|
||||
date = "yyyy-mm-dd"
|
||||
title = "Title in sentence case"
|
||||
description = "Description in title case"
|
||||
keywords = ["grafana", "enter", "keywords", "here"]
|
||||
type = "docs"
|
||||
[menu.docs]
|
||||
name = "Name of topic"
|
||||
identifier = "identifier"
|
||||
parent = "menu parent"
|
||||
weight = 100
|
||||
+++
|
||||
|
||||
# Reference
|
||||
|
||||
The _reference_ topic type is for storing reference information, such as extensive tables, lists, or other information that is used as support for a task. Reference topics are also designed for API information.
|
||||
|
||||
Often reference topics are linked from _task_ topics, because they contain information the user needs in order to perform a task.
|
||||
|
||||
[Grafana CLI](https://grafana.com/docs/grafana/latest/administration/cli/) is one example of a reference topic.
|
||||
|
||||
## Lists
|
||||
|
||||
Lists of commands or parameters are often organized in reference topics. The information you need to present will dictate the format.
|
||||
|
||||
- They might
|
||||
- be in
|
||||
- unordered lists.
|
||||
|
||||
[Configuration](https://grafana.com/docs/grafana/latest/installation/configuration/) is an example of lists.
|
||||
|
||||
## Tables
|
||||
|
||||
If you have a large list of things to store in a table, then you are probably dealing with reference information. Hugo accepts either tables in Markdown or in HTML format, so use whichever is easier for you.
|
||||
|
||||
The [Glossary](https://grafana.com/docs/grafana/latest/guides/glossary/) provides an example of reference data in a table.
|
||||
|
||||
### Empty markdown table
|
||||
|
||||
While you might not need a heading for each table, headings are a good way to chunk information if you have several tables. They also make the content easy to skim. Use headings or intro paragraphs like this one to explain to the reader what the information in the table is used for.
|
||||
|
||||
| | | | | | |
|
||||
| :-- | :-- | :-: | :-: | --: | --: |
|
||||
| | | | | | |
|
||||
| | | | | | |
|
||||
| | | | | | |
|
||||
| | | | | | |
|
||||
|
||||
### Empty HTML table
|
||||
|
||||
And here is intro text, similar to the paragraph in the previous section. Do not add local styling to the table. The website CSS will take care of that for you.
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<th>Firstname</th>
|
||||
<th>Lastname</th>
|
||||
<th>Age</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Jill</td>
|
||||
<td>Smith</td>
|
||||
<td>50</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Eve</td>
|
||||
<td>Jackson</td>
|
||||
<td>94</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
## API documentation
|
||||
|
||||
API documentation is always a reference topic rather than a task topic, but it has its own rules.
|
||||
57
contribute/documentation/templates/doc-task-template.md
Normal file
57
contribute/documentation/templates/doc-task-template.md
Normal file
@@ -0,0 +1,57 @@
|
||||
+++
|
||||
draft = "false"
|
||||
date = "yyyy-mm-dd"
|
||||
title = "Title in sentence case"
|
||||
description = "Description in title case"
|
||||
keywords = ["grafana", "enter", "keywords", "here"]
|
||||
type = "docs"
|
||||
[menu.docs]
|
||||
name = "Name of topic"
|
||||
identifier = "identifier"
|
||||
parent = "menu parent"
|
||||
weight = 100
|
||||
+++
|
||||
|
||||
# Task
|
||||
|
||||
A _task_ topic is intended for a procedure that describes how to accomplish a task. It lists a series of steps that users follow to produce an intended outcome. It tells the reader _how_ to do something. [Install Grafana plugins](https://grafana.com/docs/grafana/latest/plugins/installation/) and [Playlist](https://grafana.com/docs/grafana/latest/reference/playlist/) are examples of task topics. Playlist includes a small amount of concept information in the introduction, which is appropriate.
|
||||
|
||||
Always include an introduction of a short paragraph or two to explain what the task is for, perhaps give the reader an idea of what the outcome will be.
|
||||
|
||||
In most cases, each topic should only contain one task. If you have several very short, related tasks, then you might combine them into one topic.
|
||||
|
||||
In the case of a long task, then you probably won't need any headings except for the h1 at the top of the page.
|
||||
|
||||
1. Start with step one.
|
||||
1. Use second-person imperative tense.
|
||||
1. Basically, "You, do this" with every sentence.
|
||||
1. Do not use the third-person "user" for steps you want the reader ("you") to perform.
|
||||
1. Write steps that contain one action, possibly two related actions, such as copy and paste a thing or save and quit the program.
|
||||
If a sentence is not telling the reader to do something, then it is not a step. You can use nested images or paragraphs like this one to add information if necessary.
|
||||
|
||||
In many cases, you should tell the reader what the outcome should be so that they know when they are done.
|
||||
|
||||
## One-step task
|
||||
|
||||
Some tasks are so short, they only contain one step.
|
||||
|
||||
Write one-step tasks as simple sentences, not as unordered lists or numbered lists.
|
||||
|
||||
## Short task
|
||||
|
||||
Short tasks can be grouped. How short constitutes "short" is a judgment call based on number of steps and how long individual steps are.
|
||||
|
||||
1. Use your judgment.
|
||||
1. Ask your coworkers or someone on the Comm team for advice if you aren't sure.
|
||||
|
||||
## Next steps
|
||||
|
||||
If the task you are writing leads naturally to one or more other tasks, then include links after the task to help the reader figure out where to go next.
|
||||
|
||||
Thanks to internet search engines, every page in the documentation could be page one. Pretend you are explaining your task to a new Grafana user who just walked in off the street.
|
||||
|
||||
## Testing
|
||||
|
||||
It is a good practice to have someone else test the task you have written. If they can successfully complete the task using _only_ what the steps you have written, not guessing or using their inherent knowledge, then your task has passed the test. However, it is very common to find you have skipped steps, because _you_ are very familiar with Grafana and the topic you are explaining.
|
||||
|
||||
New users or people from other teams are very helpful for these tests.
|
||||
@@ -55,8 +55,6 @@ When to use which log level?
|
||||
|
||||
Use a contextual logger to include additional key/value pairs attached to `context.Context`, e.g. `traceID`, to allow correlating logs with traces and/or correlate logs with a common identifier.
|
||||
|
||||
You must [Enable tracing in Grafana](#2-enable-tracing-in-grafana) to get a traceID
|
||||
|
||||
Example:
|
||||
|
||||
```go
|
||||
@@ -154,7 +152,7 @@ A distributed trace is data that tracks an application request as it flows throu
|
||||
|
||||
### Usage
|
||||
|
||||
Grafana currently supports two tracing implementations, [OpenTelemetry](https://opentelemetry.io/) and [OpenTracing](https://opentracing.io/). OpenTracing is deprecated, but still supported until we remove it. The two different implementations implements the `Tracer` and `Span` interfaces, defined in the _pkg/infra/tracing_ package, which you can use to create traces and spans. To get a hold of a `Tracer` you would need to get it injected as dependency into your service, see [Services](services.md) for more details.
|
||||
Grafana currently supports two tracing implementations, [OpenTelemetry](https://opentelemetry.io/) and [OpenTracing](https://opentracing.io/). OpenTracing is deprecated, but still supported until we remove it. The two different implementations implements the `Tracer` and `Span` interfaces, defined in the _pkg/infra/tracing_ package, which you can use to create traces and spans. To get a hold of a `Tracer` you would need to get it injected as dependency into your service, see [Services](../../architecture/backend/services.md) for more details.
|
||||
|
||||
Example:
|
||||
|
||||
@@ -243,38 +241,36 @@ Be **careful** to not expose any sensitive information in span names, attribute
|
||||
|
||||
### How to collect, visualize and query traces (and correlate logs with traces) locally
|
||||
|
||||
#### 1. Start Jaeger
|
||||
1. Start Jaeger
|
||||
|
||||
```bash
|
||||
make devenv sources=jaeger
|
||||
```
|
||||
```bash
|
||||
make devenv sources=jaeger
|
||||
```
|
||||
|
||||
#### 2. Enable tracing in Grafana
|
||||
2. Enable tracing in Grafana
|
||||
|
||||
To enable tracing in Grafana, you must set the address in your config.ini file
|
||||
opentelemetry tracing (recommended):
|
||||
|
||||
opentelemetry tracing (recommended):
|
||||
```ini
|
||||
[tracing.opentelemetry.jaeger]
|
||||
address = http://localhost:14268/api/traces
|
||||
```
|
||||
|
||||
```ini
|
||||
[tracing.opentelemetry.jaeger]
|
||||
address = http://localhost:14268/api/traces
|
||||
```
|
||||
opentracing tracing (deprecated/not recommended):
|
||||
|
||||
opentracing tracing (deprecated/not recommended):
|
||||
```ini
|
||||
[tracing.jaeger]
|
||||
address = localhost:6831
|
||||
```
|
||||
|
||||
```ini
|
||||
[tracing.jaeger]
|
||||
address = localhost:6831
|
||||
```
|
||||
3. Search/browse collected logs and traces in Grafana Explore
|
||||
|
||||
#### 3. Search/browse collected logs and traces in Grafana Explore
|
||||
You need provisioned gdev-jaeger and gdev-loki datasources, see [developer dashboard and data sources](https://github.com/grafana/grafana/tree/main/devenv#developer-dashboards-and-data-sources) for setup instructions.
|
||||
|
||||
You need provisioned gdev-jaeger and gdev-loki datasources, see [developer dashboard and data sources](https://github.com/grafana/grafana/tree/main/devenv#developer-dashboards-and-data-sources) for setup instructions.
|
||||
Open Grafana explore and select gdev-loki datasource and use the query `{filename="/var/log/grafana/grafana.log"} | logfmt`.
|
||||
|
||||
Open Grafana explore and select gdev-loki datasource and use the query `{filename="/var/log/grafana/grafana.log"} | logfmt`.
|
||||
You can then inspect any log message that includes a `traceID` and from there click on `gdev-jaeger` to split view and inspect the trace in question.
|
||||
|
||||
You can then inspect any log message that includes a `traceID` and from there click on `gdev-jaeger` to split view and inspect the trace in question.
|
||||
4. Search/browse collected traces in Jaeger UI
|
||||
|
||||
#### 4. Search/browse collected traces in Jaeger UI
|
||||
|
||||
You can open http://localhost:16686 to use the Jaeger UI for browsing and searching traces.
|
||||
You can open http://localhost:16686 to use the Jaeger UI for browsing and searching traces.
|
||||
@@ -1,87 +1,48 @@
|
||||
# Internationalization
|
||||
|
||||
Grafana uses the [i18next](https://www.i18next.com/) framework for managing translating phrases in the Grafana frontend.
|
||||
Grafana uses the [LinguiJS](https://github.com/lingui/js-lingui) framework for managing translating phrases in the Grafana frontend.
|
||||
|
||||
## tl;dr
|
||||
|
||||
**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`
|
||||
- Use `<Trans id="search-results.panel-link">Go to {panel.title}</Trans>` in code to add a translatable phrase
|
||||
- Translations are stored in .po files in `public/locales/{locale}/messages.po`
|
||||
- If a particular phrase is not available in the a language then it will fall back to English
|
||||
- To update phrases in English, edit the default phrase in the component's source, then run `yarn i18n:extract`. Do not edit the `en-ES/grafana.json` or update the english phrase in Crowdin
|
||||
- To update phrases in any translated language, edit the phrase in Crowdin. Do not edit the `{locale}/grafana.json`
|
||||
|
||||
## How to add a new translation phrase
|
||||
|
||||
### JSX
|
||||
|
||||
1. For JSX children, use the `<Trans />` component from `app/core/internationalization` with the `i18nKey`, ensuring it conforms to the guidelines below, with the default english translation. e.g.
|
||||
1. Use one of `@lingui/macro`'s React components with the `id`, ensuring it conforms to the guidelines below, with the default english translation. e.g.
|
||||
|
||||
```jsx
|
||||
import { Trans } from 'app/core/internationalization';
|
||||
import { Trans } from @lingui/macro
|
||||
|
||||
const SearchTitle = ({ term }) => (
|
||||
<Trans i18nKey="search-page.results-title">
|
||||
Results for <em>{{ term }}</em>
|
||||
const SearchTitle = ({term}) => (
|
||||
<Trans id="search-page.results-title">
|
||||
Results for {term}
|
||||
</Trans>
|
||||
);
|
||||
```
|
||||
|
||||
Prefer using `<Trans />` for JSX children, and `t()` for props and other javascript usage.
|
||||
Prefer using the JSX components (compared to the plain javascript functions, see below) where possible for phrases. Many props can (and probably should) be changed to accept the `React.ReactNode` instead of `string` for phrases put into the DOM.
|
||||
|
||||
When translating in grafana-ui, use a relative path to import `<Trans />` and `t()` from `src/utils/i18n`.
|
||||
|
||||
Note that our tooling must be able to statically analyse the code to extract the phrase, so the `i18nKey` can not be dynamic. e.g. the following will not work:
|
||||
Note that Lingui must be able to statically analyse the code to extract the phrase, so the `id` can not be dynamic. e.g. the following will not work:
|
||||
|
||||
```jsx
|
||||
const ErrorMessage = ({ id, message }) => <Trans i18nKey={`errors.${id}`}>There was an error: {{ message }}</Trans>;
|
||||
const ErrorMessage = ({ id, message }) => <Trans id={`errors.${id}`}>There was an error: {message}</Trans>;
|
||||
```
|
||||
|
||||
2. Upon reload, the default English phrase will appear on the page.
|
||||
|
||||
3. Before submitting your PR, run the `yarn i18n:extract` command to extract the messages you added into the `grafana.json` file and make them available for translation.
|
||||
|
||||
### Plain JS usage
|
||||
|
||||
Sometimes you may need to translate a string cannot be represented in JSX, such as `placeholder` props. Use the `t` macro for this.
|
||||
|
||||
```jsx
|
||||
import { t } from "app/core/internationalization"
|
||||
|
||||
const placeholder = t('form.username-placeholder','Username');
|
||||
|
||||
return <input type="value" placeholder={placeholder}>
|
||||
```
|
||||
|
||||
Interpolating phrases is a bit more verbose. Make sure the placeholders in the string match the values passed in the object - there's no type safety here!
|
||||
|
||||
```jsx
|
||||
const placeholder = t('page.greeting', 'Hello {{ username }}', { username });
|
||||
```
|
||||
|
||||
While the `t` function can technically be used outside of React functions (e.g, in actions/reducers), aim to keep all UI phrases within the React UI functions.
|
||||
|
||||
## How to add a new language
|
||||
|
||||
1. Add new locale in Crowdin and sync files to repo
|
||||
1. Grafana OSS Crowdin project -> "dot dot dot" menu in top right -> Target languages
|
||||
2. Grafana OSS Crowdin project -> Integrations -> Github -> Sync Now
|
||||
3. If Crowdin's locale code is different from our IETF language tag, add a custom mapping in Project Settings -> Language mapping
|
||||
2. Update `public/app/core/internationalization/constants.ts` (add new constant, and add to `LOCALES`)
|
||||
3. Update `public/locales/i18next-parser.config.js` to add the new locale to `locales`
|
||||
4. Run `yarn i18n:extract` and commit the result
|
||||
3. Before submitting your PR, run the `yarn i18n:extract` command to extract the messages you added into the `messages.po` file and make them available for translation.
|
||||
|
||||
## How translations work in Grafana
|
||||
|
||||
Grafana uses the [i18next](https://www.i18next.com/) framework for managing translating phrases in the Grafana frontend. It:
|
||||
Grafana uses the [LinguiJS](https://github.com/lingui/js-lingui) framework for managing translating phrases in the Grafana frontend. It:
|
||||
|
||||
- Marks up phrases within our code for extraction
|
||||
- Extracts phrases into messages catalogues for translating in external systems
|
||||
- "Compiles" the catalogues to a format that can be used in the website
|
||||
- Manages the user's locale and putting the translated phrases in the UI
|
||||
|
||||
English phrases remain in our Javascript bundle in the source components (as the `<Trans />` or `t()` default phrase). At runtime, we don't need to load any messages for en-US. If the user's language preference is set to another language, Grafana will load that translations's messages JSON before the initial render.
|
||||
|
||||
### Phrase ID naming convention
|
||||
|
||||
We set explicit IDs for phrases to make it easier to identify phrases out of context, and to track where they're used. IDs follow a naming scheme that includes _where_ the phrase is used. The exception is the rare case of single reoccuring words like "Cancel", but default to using a feature/phrase specific phrase.
|
||||
@@ -96,83 +57,137 @@ For components used all over the site, use just two segments:
|
||||
- `footer.update`
|
||||
- `navigation.home`
|
||||
|
||||
### I18next context
|
||||
### Top-level provider
|
||||
|
||||
We rely on a global i18next singleton (that lives inside the i18next) for storing the i18next config/context.
|
||||
In [AppWrapper.tsx](/public/app/AppWrapper.tsx) the app is wrapped with `I18nProvider` from `public/app/core/internationalization/index.tsx` where the Lingui instance is created with the user's preferred locale. This sets the appropriate context and allows any component from `@lingui/macro` to use the translations for the user's preferred locale.
|
||||
|
||||
### Message format
|
||||
|
||||
Lingui uses the [ICU MessageFormat](https://unicode-org.github.io/icu/userguide/format_parse/messages/) for the phrases in the .po catalogues. ICU has special syntax especially for describing plurals across multiple languages. For more details see the [Lingui docs](https://lingui.js.org/ref/message-format.html).
|
||||
|
||||
### Plain JS usage
|
||||
|
||||
See [Lingui Docs](https://lingui.js.org/ref/macro.html#t) for more details.
|
||||
|
||||
Sometimes you may need to translate a string cannot be represented in JSX, such as `placeholder` props. Use the `t` macro for this.
|
||||
|
||||
```jsx
|
||||
import { t } from "@lingui/macro"
|
||||
|
||||
const placeholder = t({
|
||||
id: 'form.username-placeholder',
|
||||
message: `Username`
|
||||
});
|
||||
|
||||
return <input type="value" placeholder={placeholder}>
|
||||
```
|
||||
|
||||
While the `t` macro can technically be used outside of React functions (e.g, in actions/reducers), aim to keep all UI phrases within the React UI functions.
|
||||
|
||||
## Examples
|
||||
|
||||
See [i18next](https://www.i18next.com/) and [react-i18next](https://react.i18next.com/) documentation for more details.
|
||||
See the [Lingui docs](https://lingui.js.org/ref/macro.html#usage) for more details.
|
||||
|
||||
### Basic usage
|
||||
|
||||
For fixed phrases:
|
||||
|
||||
```jsx
|
||||
import { Trans } from 'app/core/internationalization';
|
||||
import { Trans } from '@lingui/macro';
|
||||
|
||||
<Trans i18nKey="page.greeting">Hello user!</Trans>;
|
||||
<Trans id="page.greeting">Hello user!</Trans>;
|
||||
```
|
||||
|
||||
To interpolate variables, include it as an object child. It's weird syntax, but Trans will do it's magic to make it work:
|
||||
You can include variables, just like regular JSX. Prefer using "simple" variables to make the extracted phrase easier to read for translators
|
||||
|
||||
```jsx
|
||||
import { Trans } from 'app/core/internationalization';
|
||||
import { Trans } from '@lingui/macro';
|
||||
|
||||
<Trans i18nKey="page.greeting">Hello {{ name: user.name }}!</Trans>;
|
||||
// Bad - translators will see: Hello {0}
|
||||
<Trans id="page.greeting">Hello {user.name}!</Trans>;
|
||||
|
||||
// Good - translators will see: Hello {userName}
|
||||
const userName = user.name;
|
||||
<Trans i18nKey="page.greeting">Hello {{ userName }}!</Trans>;
|
||||
<Trans id="page.greeting">Hello {userName}!</Trans>;
|
||||
```
|
||||
|
||||
Variables must be strings (or, must support calling `.toString()`, which we almost never want).
|
||||
|
||||
```jsx
|
||||
import { Trans } from 'app/core/internationalization';
|
||||
import { Trans } from '@lingui/macro';
|
||||
|
||||
// This will not work
|
||||
const userName = <strong>user.name</strong>;
|
||||
<Trans i18nKey="page.greeting">Hello {{ userName }}!</Trans>;
|
||||
<Trans id="page.greeting">Hello {userName}!</Trans>;
|
||||
|
||||
// Instead, put the JSX inside the phrase directly
|
||||
const userName = user.name;
|
||||
<Trans i18nKey="page.greeting">
|
||||
Hello <strong>{{ userName }}</strong>!
|
||||
<Trans id="page.greeting">
|
||||
Hello <strong>{userName}</strong>!
|
||||
</Trans>;
|
||||
```
|
||||
|
||||
### React components and HTML tags
|
||||
|
||||
Both HTML tags and React components can be included in a phase. The Trans function will handle interpolating it's children properly
|
||||
Both HTML tags and React components can be included in a phase. The Lingui macro will replace them with placeholder tags for the translators
|
||||
|
||||
```js
|
||||
import { Trans } from "app/core/internationalization"
|
||||
import { Trans } from "@lingui/macro"
|
||||
|
||||
<Trans i18nKey="page.explainer">
|
||||
const randomVariable = "variable"
|
||||
|
||||
<Trans id="page.explainer">
|
||||
Click <button>here</button> to <a href="https://grafana.com">learn more.</a>
|
||||
</Trans>
|
||||
|
||||
// ↓ is in the grafana.json file like ↓
|
||||
{
|
||||
"page": {
|
||||
"explainer": "Click <0>here</0> to <1>learn more</1>"
|
||||
}
|
||||
}
|
||||
// ↓ is transformed by macros into ↓
|
||||
<Trans
|
||||
id="page.explainer"
|
||||
defaults="Click <0>here</0> to <1>learn more</1>"
|
||||
components={[
|
||||
<button />,
|
||||
<Text />
|
||||
]}
|
||||
/>
|
||||
|
||||
// ↓ is in the messages.po file like ↓
|
||||
msgid "page.explainer"
|
||||
msgstr "Click <0>here</0> to <1>learn more</1>"
|
||||
```
|
||||
|
||||
### Plurals
|
||||
|
||||
Plurals require special handling to make sure they can be translating according to the rules of each locale (which may be more complex that you think!). Use the `<Trans />` component, with the `count` prop.
|
||||
See the [Lingui docs](https://lingui.js.org/ref/macro.html#id1) for more details.
|
||||
|
||||
Plurals require special handling to make sure they can be translating according to the rules of each locale (which may be more complex that you think!). Use the `<Plural />` component and specify the plural forms for the default language (English). The message will be extracted into a form where translators can extend it with rules for other locales.
|
||||
|
||||
```js
|
||||
import { Trans } from 'app/core/internationalization';
|
||||
import { Plural } from "@lingui/macro"
|
||||
|
||||
<Trans i18nKey="newMessages" count={messages.length}>
|
||||
You got {{ count: messages.length }} messages.
|
||||
</Trans>;
|
||||
<Plural
|
||||
id="sharing.shared-with"
|
||||
value={sharedCount}
|
||||
none="Not shared with anyone"
|
||||
one="Shared with one person"
|
||||
other="Shared with # people"
|
||||
/>
|
||||
|
||||
// ↓ is transformed by macros into ↓
|
||||
|
||||
<Trans
|
||||
id="example.plurals"
|
||||
values={{ sharedCount }}
|
||||
defaults="{sharedCount, plural, none {Not shared with anyone}, one {Shared with one person}, other {Shared with # people}"
|
||||
/>
|
||||
|
||||
// sharedCount = 0 -> Not shared with anyone
|
||||
// sharedCount = 1 -> Shared with one person
|
||||
// sharedCount = 3 -> Shared with # people
|
||||
```
|
||||
|
||||
Once extracted with `yarn i18n:extract` you will need to manually fill in the grafana.json message catalogues with the additional plural forms. See the [react-i18next docs](https://react.i18next.com/latest/trans-component#plural) for more details.
|
||||
### Date and time
|
||||
|
||||
[Lingui has functions](https://lingui.js.org/ref/core.html#I18n.date) to format dates and times according to the convention to the user's preferred locale, based on the browser [Intl.DateTimeFormat](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat) API. However, as displaying dates and times is fundamental to Grafana, guidelines have not been established for this yet.
|
||||
|
||||
## Documentation
|
||||
|
||||
|
||||
@@ -13,6 +13,7 @@ The following checklist/summary should give you a quick overview of what to ask/
|
||||
- Reviewed and approved?
|
||||
- All checks passed?
|
||||
- Proper pull request title?
|
||||
- Milestone assigned?
|
||||
- Add to changelog/release notes?
|
||||
- Needs backporting?
|
||||
|
||||
@@ -39,18 +40,10 @@ See [formatting guidelines](create-pull-request.md#formatting-guidelines) for mo
|
||||
|
||||
### Assign a milestone
|
||||
|
||||
Several things in the Grafana release process requires at least pull requests to be in a milestone, for example [generating changelog/release notes](#include-in-changelog-and-release-notes).
|
||||
A milestone **should** be added to every pull request. Several things in the Grafana release process requires at least pull requests to be in a milestone, for example [generating changelog/release notes](#include-in-changelog-and-release-notes).
|
||||
|
||||
This makes it easier to track what changes go into a certain release. Without this information, release managers have to go through git commits which is not an efficient process.
|
||||
|
||||
That being said, _you don't have to assign a milestone manually_ to a pull request.
|
||||
Instead, when it is merged & closed then a bot will look for the most appropriate miletone and assign it to the pull request.
|
||||
|
||||
That milestone should always reflect the branch that the pull request is merged into.
|
||||
For every major and minor release there is a milestone ending with `.x` (e.g. `10.0.x` for the 10.0.x releases).
|
||||
Pull requests targetting `main` should use the `.x` milestone of the next minor (or major) version (you can find that version number inside the `package.json` file).
|
||||
Backport pull requestss should use the version of the target branch (e.g. `9.4.x` for the `v9.4.x` branch).
|
||||
|
||||
### Include in changelog and release notes?
|
||||
|
||||
At Grafana we generate the [changelog](https://github.com/grafana/grafana/blob/main/CHANGELOG.md) and [release notes](https://grafana.com/docs/grafana/latest/release-notes/) based on merged pull requests. Including changes in the changelog/release notes is very important to provide a somewhat complete picture of what changes a Grafana release actually includes.
|
||||
@@ -85,15 +78,15 @@ The changelog/release notes are divided into sections and here's a description o
|
||||
|
||||
**Features and enhancements:**
|
||||
|
||||
Labeled with `add to changelog` and any of the other section rules don't apply.
|
||||
Milestone assigned and labeled with `add to changelog` and any of the other section rules don't apply.
|
||||
|
||||
**Bug fixes:**
|
||||
|
||||
Labeled with `add to changelog` and either labeled with `type/bug` or the pull request title contains `fix` or `fixes`.
|
||||
Milestone assigned and labeled with `add to changelog` and either labeled with `type/bug` or the pull request title contains `fix` or `fixes`.
|
||||
|
||||
**Plugin development fixes & changes:**
|
||||
|
||||
Labeled with `area/grafana/toolkit`, `area/grafana/ui` or `area/grafana/runtime`.
|
||||
Milestone assigned and labeled with `area/grafana/toolkit`, `area/grafana/ui` or `area/grafana/runtime`.
|
||||
|
||||
**Deprecations:**
|
||||
|
||||
@@ -142,14 +135,6 @@ Some examples when backport is not required:
|
||||
|
||||
- The change is supposed to be released in the next major/minor release, e.g. v8.0.0, but the release branch, e.g. v8.0.x, has not yet been created.
|
||||
|
||||
#### Required labels
|
||||
|
||||
To ensure that we don't backport pull requests that don't need to be backported, i.e. implement new features, and only backport pull requests that address bugs, have a product approval, or refer to docs changes, backport labels need to be followed by either:
|
||||
|
||||
- `type/bug` label: Pull requests which address bugs,
|
||||
- `product-approved` label: Urgent fixes which need product approval, in order to get merged,
|
||||
- `type/docs` label: Docs changes`.
|
||||
|
||||
> **Note:** You can still backport a pull request after it's been merged.
|
||||
|
||||
## Doing the actual merge
|
||||
|
||||
194
contribute/style-guides/backend.md
Normal file
194
contribute/style-guides/backend.md
Normal file
@@ -0,0 +1,194 @@
|
||||
# Backend style guide
|
||||
|
||||
Grafana's backend has been developed for a long time with a mix of code styles. This guide explains how we want to write Go code in the future.
|
||||
|
||||
Unless stated otherwise, use the guidelines listed in the following articles:
|
||||
|
||||
- [Effective Go](https://golang.org/doc/effective_go.html)
|
||||
- [Code Review Comments](https://github.com/golang/go/wiki/CodeReviewComments)
|
||||
- [Go: Best Practices for Production Environments](http://peter.bourgon.org/go-in-production/#formatting-and-style)
|
||||
|
||||
## Linting and formatting
|
||||
|
||||
To ensure consistency across the Go codebase, we require all code to pass a number of linter 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:
|
||||
|
||||
```bash
|
||||
make lint-go
|
||||
```
|
||||
|
||||
## Testing
|
||||
|
||||
We value clean and readable code, that is loosely coupled and covered by unit tests. This makes it easier to collaborate and maintain the code.
|
||||
|
||||
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.
|
||||
|
||||
### Assertions
|
||||
|
||||
Use respectively [`assert.*`](https://github.com/stretchr/testify#assert-package) functions to make assertions that
|
||||
should _not_ halt the test ("soft checks") and [`require.*`](https://github.com/stretchr/testify#require-package)
|
||||
functions to make assertions that _should_ halt the test ("hard checks"). Typically you want to use the latter type of
|
||||
check to assert that errors have or have not happened, since continuing the test after such an assertion fails is
|
||||
chaotic (the system under test will be in an undefined state) and you'll often have segfaults in practice.
|
||||
|
||||
### Sub-tests
|
||||
|
||||
Use [`t.Run`](https://golang.org/pkg/testing/#T.Run) to group sub-test cases, since it allows common setup and teardown
|
||||
code, plus lets you run each test case in isolation when debugging. Don't use `t.Run` to e.g. group assertions.
|
||||
|
||||
### Cleanup
|
||||
|
||||
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
|
||||
|
||||
Optionally, we use [`mock.Mock`](https://github.com/stretchr/testify#mock-package) package to generate mocks. This is
|
||||
useful when you expect different behaviours of the same function.
|
||||
|
||||
#### Tips
|
||||
|
||||
- Use `Once()` or `Times(n)` to make this mock only works `n` times.
|
||||
- Use `mockedClass.AssertExpectations(t)` to guarantee that the mock is called the times asked.
|
||||
- If any mock set is not called or its expects more calls, the test fails.
|
||||
- You can pass `mock.Anything` as argument if you don't care about the argument passed.
|
||||
- Use `mockedClass.AssertNotCalled(t, "FunctionName")` to assert that this test is not called.
|
||||
|
||||
#### Example
|
||||
|
||||
This is an example to easily create a mock of an interface.
|
||||
|
||||
Given this interface:
|
||||
|
||||
```go
|
||||
func MyInterface interface {
|
||||
Get(ctx context.Context, id string) (Object, error)
|
||||
}
|
||||
```
|
||||
|
||||
Mock implementation should be like this:
|
||||
|
||||
```go
|
||||
import
|
||||
|
||||
func MockImplementation struct {
|
||||
mock.Mock
|
||||
}
|
||||
|
||||
func (m *MockImplementation) Get(ctx context.Context, id string) error {
|
||||
args := m.Called(ctx, id) // Pass all arguments in order here
|
||||
return args.Get(0).(Object), args.Error(1)
|
||||
}
|
||||
```
|
||||
|
||||
And use it as the following way:
|
||||
|
||||
```go
|
||||
|
||||
objectToReturn := Object{Message: "abc"}
|
||||
errToReturn := errors.New("my error")
|
||||
|
||||
myMock := &MockImplementation{}
|
||||
defer myMock.AssertExpectations(t)
|
||||
|
||||
myMock.On("Get", mock.Anything, "id1").Return(objectToReturn, errToReturn).Once()
|
||||
myMock.On("Get", mock.Anything, "id2").Return(Object{}, nil).Once()
|
||||
|
||||
anyService := NewService(myMock)
|
||||
resp, err := anyService.Call("id1")
|
||||
|
||||
assert.Equal(t, resp.Message, objectToReturn.Message)
|
||||
assert.Error(t, err, errToReturn)
|
||||
|
||||
resp, err = anyService.Call("id2")
|
||||
assert.Nil(t, err)
|
||||
```
|
||||
|
||||
#### Mockery
|
||||
|
||||
When an interface to test is too big, it's annoying to mock each function manually. To avoid this, you can
|
||||
use [`mockery`](https://github.com/vektra/mockery) library to generate the mocks.
|
||||
|
||||
The command is like the following (there are more options documented if you need to use another one):
|
||||
|
||||
```
|
||||
mockery --name InterfaceName --structname MockImplementationName --inpackage --filename my_implementation_mock.go
|
||||
```
|
||||
|
||||
- `--name`: Interface to mock
|
||||
- `--structname`: Mock implementation name
|
||||
- `--inpackage`: To use the same package name as the interface
|
||||
- `--filename`: Your mock generated file name
|
||||
|
||||
If any interface signature changes, executing the command again updates the mock.
|
||||
|
||||
Additionally, you can put `go:generate` command on the top of the file as a comment. It's useful because some IDEs
|
||||
like Goland and Visual Studio Code allows executing scripts from the IDE.
|
||||
|
||||
```
|
||||
package <package>
|
||||
|
||||
import (
|
||||
...
|
||||
)
|
||||
|
||||
//go:generate mockery --name InterfaceName --structname MockImplementationName --inpackage --filename my_implementation_mock.go
|
||||
```
|
||||
|
||||
## Globals
|
||||
|
||||
As a general rule of thumb, avoid using global variables, since they make the code difficult to maintain and reason
|
||||
about, and to write tests for. The Grafana codebase currently does use a lot of global variables, especially when
|
||||
it comes to configuration, but that is a problem we're trying to solve.
|
||||
|
||||
## Pointers
|
||||
|
||||
In general, use value types and only reach for pointers when there's a real need. The reason being that pointers
|
||||
increase the risk of bugs, since a pointer can be nil and dereferencing a nil pointer leads to a panic (AKA segfault).
|
||||
Valid reasons to use a pointer include (but not necessarily limited to):
|
||||
|
||||
- You might need to pass a modifiable argument to a function
|
||||
- Copying an object might incur a performance hit (benchmark to check your assumptions, copying is often faster than
|
||||
allocating heap memory)
|
||||
- You might _need_ `nil` to tell if a variable isn't set, although usually it's better to use the type's zero
|
||||
value to tell instead
|
||||
|
||||
## Database
|
||||
|
||||
In database related code, we follow certain patterns.
|
||||
|
||||
### Foreign keys
|
||||
|
||||
While they can be useful, we don't generally use foreign key constraints in Grafana, for historical and
|
||||
technical reasons. See this [comment](https://github.com/grafana/grafana/issues/3269#issuecomment-383328548) by Torkel
|
||||
for context.
|
||||
|
||||
### Unique columns
|
||||
|
||||
If a column, or column combination, should be unique, add a corresponding uniqueness constraint through a migration.
|
||||
|
||||
## 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 [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.
|
||||
345
contribute/style-guides/documentation-style-guide.md
Normal file
345
contribute/style-guides/documentation-style-guide.md
Normal file
@@ -0,0 +1,345 @@
|
||||
# Documentation style guide
|
||||
|
||||
This style guide applies to all documentation created for Grafana products.
|
||||
|
||||
For information about how to write technical documentation, refer to the following resources:
|
||||
|
||||
- [Google Technical Writing courses](https://developers.google.com/tech-writing)
|
||||
- [Divio documentation system](https://documentation.divio.com/)
|
||||
- [Vue writing principles](https://v3.vuejs.org/guide/contributing/writing-guide.html#principles)
|
||||
|
||||
## Contributing
|
||||
|
||||
The _Documentation style guide_ is a living document. Add to it whenever a style decision is made or a question is answered regarding style, grammar, or word choice.
|
||||
|
||||
## Published guides
|
||||
|
||||
For all items that are not covered in this guide, refer to the [Google developer documentation style guide](https://developers.google.com/style) and the [Microsoft style guide](https://docs.microsoft.com/en-us/style-guide/welcome/), in that order.
|
||||
|
||||
## Spelling
|
||||
|
||||
To catch common misspellings, the [codespell](https://github.com/codespell-project/codespell) tool is run for every change.
|
||||
|
||||
## Inclusive language
|
||||
|
||||
Avoid using charged language.
|
||||
|
||||
### Allowing and blocking
|
||||
|
||||
When referring to _allowing_ or _blocking_ content or traffic, use a form of _allow_ or _block_:
|
||||
|
||||
- (noun) _allowlist_ or _blocklist_
|
||||
- (verb) _allow_ or _block_
|
||||
|
||||
Example: _To **allow** outgoing traffic, add the IP to the **allowlist**._
|
||||
|
||||
Avoid _whitelist_ or _blacklist_.
|
||||
|
||||
### Primary and secondary
|
||||
|
||||
To describe relationships between nodes or processes, there are several options:
|
||||
|
||||
- Use _primary_, _main_, or _parent_, instead of _master_.
|
||||
- Use _secondary_, _replica_, or _child_, instead of _slave_.
|
||||
|
||||
Avoid _master_ or _slave_.
|
||||
|
||||
## Grafana-specific style
|
||||
|
||||
The following guidelines are specific to Grafana documentation. For the most part, these are _guidelines_ are not rigid rules. If you have questions, then please ask in the #docs channel of Grafana Slack.
|
||||
|
||||
### General
|
||||
|
||||
Per the [Voice and tone](https://developers.google.com/style/tone) section of the Google developer documentation style guide:
|
||||
|
||||
> In your documents, aim for a voice and tone that's conversational, friendly, and respectful without being overly colloquial or frivolous; a voice that's casual and natural and approachable, not pedantic or pushy. Try to sound like a knowledgeable friend who understands what the developer wants to do.
|
||||
|
||||
- Use active voice:
|
||||
- Active: Grafana displays the heatmap visualization.
|
||||
- Passive: The heatmap visualization is displayed.
|
||||
- Write directly to the reader:
|
||||
- Use: "After you create a dashboard, you can add a panel to it."
|
||||
- Avoid: "After you create a dashboard, it is possible to add a panel to it."
|
||||
- Write in the imperative second person:
|
||||
- "Click the panel."
|
||||
- "Close the window."
|
||||
- Write in present tense:
|
||||
- Use: "The panel opens."
|
||||
- Avoid: "The panel will open."
|
||||
- Do not use an ampersand (&) as an abbreviation for _and_.
|
||||
- **Exceptions:** If an ampersand is used in the Grafana UI, then match the UI.
|
||||
- Avoid using internal jargon or slang.
|
||||
- Do not use two spaces after a period; use one space after a sentence.
|
||||
- Remove any extra space characters at the end of a paragraph.
|
||||
- Aim for your sentences to be fewer than 25 words. Instead, use smaller complete phrases or change the format, such as using a list.
|
||||
- Aim for paragraphs to be three sentences or fewer. Make the text more concise, use more headings, or both.
|
||||
|
||||
### File naming conventions
|
||||
|
||||
- Files that are displayed in the help system should have names that are all lowercase, no spaces. Use hyphens instead of spaces. Example: glossary.md
|
||||
- Documentation file names should match the title. **Note:** This only applies to new files at this time. Do not change the names of older files unless directed to do so.
|
||||
- Internal reference file names should be all uppercase except the file extension. Example: CONTRIBUTING.md
|
||||
- Image file names should be descriptive and unique. Also, add the software version number that the image applies to or the screenshot was taken in. Example: share-dashboard-link-7-3.png
|
||||
|
||||
### Headings
|
||||
|
||||
- Write headings in sentence case, not title case.
|
||||
- This is sentence case
|
||||
- This is Title Case
|
||||
- Task topic headings start with a verb.
|
||||
- Write a query
|
||||
- Create a dashboard
|
||||
- Concept and reference topic headings should be nouns or gerunds. Examples: Contributing to docs, Visualizations, Style guide
|
||||
|
||||
#### Heading don'ts
|
||||
|
||||
- Avoid stacked headings, which is following one heading with another heading.
|
||||
- Avoid skipping heading levels. For example, an h1 should be followed by an h2 rather than an h3.
|
||||
- Avoid having just one lower-level heading. For example, h1, h2, h2, h3, h3, h2, h2 is a good order. Do not go h1, h2, h3, h2, h3, h2.
|
||||
- Avoid using hyphens in headings.
|
||||
- Do not include parenthetical words like (Important!) in headings.
|
||||
|
||||
#### Step-by-step headings
|
||||
|
||||
In most cases, headings should not be numbered steps.
|
||||
|
||||
However, sometimes we need to use headings as numbered steps. This is mostly in cases where each step is complex or a series of other procedures. For example, in [Getting started with Grafana and Prometheus](https://grafana.com/docs/grafana/latest/getting-started/getting-started-prometheus/).
|
||||
|
||||
If that is the case, then use the following format for headings:
|
||||
|
||||
##### Step 1. Install the software
|
||||
|
||||
##### Step 2. Run the software
|
||||
|
||||
### Images
|
||||
|
||||
- Preferred format is .png
|
||||
- File extension should be all lowercase.
|
||||
- Preferred DPI is 72.
|
||||
- Assume all graphics will be exclusively viewed on the web.
|
||||
- Maximum image size is 3840px X 2160px.
|
||||
- Screenshots should be readable, but not too large.
|
||||
- _Do not_ use image shortcodes. Follow the guidance in [Markdown style guide](../documentation/documentation-markdown-guide.md#Images).
|
||||
- Markdown image links are preferred. Only use the HTML image links if you need to style the image in ways unsupported in Markdown.
|
||||
- When you name a file, follow the [file naming conventions](#file-naming-conventions). Example: image-name-7-3.png
|
||||
|
||||
### Unordered lists
|
||||
|
||||
Here are a few general rules about unordered lists. For more guidance, refer to [Lists](https://developers.google.com/style/lists) in the [Google developer style guide](https://developers.google.com/style/).
|
||||
|
||||
- List items should begin with a capital letter unless there is a strong reason not to. For example, you are listing case-sensitive parameters.
|
||||
- List items should end with periods if they are complete sentences. If one item in a list ends with a period, then apply periods to all of them.
|
||||
|
||||
### Capitalization
|
||||
|
||||
- Grafana, Loki, and Prometheus are always capitalized unless part of a code block.
|
||||
- API names are always Title Case, followed by "API"—for example, "Dashboard Permissions API"
|
||||
- Abbreviations are always capitalized (such as API, HTTP, ID, JSON, SQL, or URL) unless they are part of a code block.
|
||||
- Menu and submenu titles always use sentence case: capitalize the first word, and lowercase the rest.
|
||||
- "Dashboards" when referring to the submenu title.
|
||||
- "Keyboard shortcuts" when referring to the submenu topic.
|
||||
- Generic and plural versions are always lowercase.
|
||||
- Lowercase "dashboard" when referring to a dashboard generally.
|
||||
- Lowercase "dashboards" when referring to multiple dashboards.
|
||||
- **Exceptions:** If a term is lowercased in the Grafana UI, then match the UI.
|
||||
|
||||
#### Git, GitHub
|
||||
|
||||
Git is always capitalized, unless part of a code block. GitHub is the correct spelling and capitalization.
|
||||
|
||||
#### Integrations
|
||||
|
||||
In general, "integration" is not capitalized. Only capitalize it if it is capitalized in the UI or part of a proper noun, like the name of a specific integration.
|
||||
|
||||
The first letter of the name of an integration is always capitalized, even if the original named source is lowercase.
|
||||
|
||||
**Examples:**
|
||||
|
||||
- MySQL Integration
|
||||
- CockroachDB Integration
|
||||
- Etcd Integration
|
||||
- I installed an integration on my local Grafana.
|
||||
|
||||
#### Kubernetes objects
|
||||
|
||||
Capitalize Kubernetes objects such as Job, Pod, and StatefulSet when it is clear you are specifically talking about them and not generic jobs, pods, or whatever.
|
||||
|
||||
Introduce the object as "Kubernetes XX" on the first usage, then just the object in subsequent uses.
|
||||
|
||||
**Example:**
|
||||
|
||||
Create the Kubernetes Job and check the logs to retrieve the generated token:
|
||||
|
||||
The Job requires the token be submitted as …
|
||||
|
||||
### Links and references
|
||||
|
||||
When referencing another document, use "Refer to" rather than alternatives such as "See" or "Check out."
|
||||
|
||||
Always give the reader some idea of what to expect in the reference. Avoid blind references, such as, "Refer to [this file](link)."
|
||||
|
||||
When possible, use the exact title of the page or section you are linking to as the link text.
|
||||
|
||||
**Example**
|
||||
Refer to the [Documentation style guide](documentation-style-guide.md) for information about word usage and capitalization guidelines.
|
||||
|
||||
### Notes, tips, cautions, and warnings
|
||||
|
||||
Grafana documentation uses notes, tips, cautions, and warnings. Notes are the most common. The format for all of them is indented, bold, sentence case:
|
||||
|
||||
```
|
||||
> **Note:**
|
||||
```
|
||||
|
||||
#### Notes
|
||||
|
||||
Notes provide additional information that the user should be extra aware of. For example:
|
||||
|
||||
> **Note:** This page describes a feature for Grafana 7.0 beta.
|
||||
|
||||
#### Tips
|
||||
|
||||
Tips describe alternate or more efficient ways of doing things. Rarely used.
|
||||
|
||||
#### Cautions
|
||||
|
||||
Cautions warn the user that they should proceed with caution. Use cautions to emphasize the potential downside of a course of action.
|
||||
|
||||
> **Caution:** If you turn off authentication requirements, then anyone can access your Grafana instance. This poses a considerable security risk.
|
||||
|
||||
#### Warnings
|
||||
|
||||
Warnings tell the user not to do something. For example:
|
||||
|
||||
> **Warning:** Grafana does not back up your dashboards. If you delete a dashboard, then you might not be able to recover it.
|
||||
|
||||
### Command line examples
|
||||
|
||||
- Do not assume everyone is using Linux. Make sure instructions include enough information for Windows and Mac users to successfully complete procedures.
|
||||
|
||||
- Do not add `$` before commands. Make it easy for users to copy and paste commands.
|
||||
|
||||
- **Right:** `sudo yum install grafana`
|
||||
- **Wrong:** `$ sudo yum install grafana`
|
||||
|
||||
- Include `sudo` before commands that require `sudo` to work.
|
||||
|
||||
For terminal examples and Grafana configuration, use a `bash` code block:
|
||||
|
||||
```bash
|
||||
sudo yum install grafana
|
||||
```
|
||||
|
||||
For HTTP request/response, use an `http` code block:
|
||||
|
||||
```http
|
||||
GET /api/dashboards/id/1/permissions HTTP/1.1
|
||||
Accept: application/json
|
||||
Content-Type: application/json
|
||||
Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk
|
||||
```
|
||||
|
||||
### Word usage
|
||||
|
||||
Grafana products has some words, abbreviations, and terms particular to the Grafana discourse community.
|
||||
|
||||
#### changelog
|
||||
|
||||
One word, not two.
|
||||
|
||||
**Example**
|
||||
|
||||
- Read the full changelog.
|
||||
|
||||
**Exception:**
|
||||
|
||||
- When referring to the file containing the official changelog, use the filename: `CHANGELOG.md`.
|
||||
|
||||
#### checkout, check out
|
||||
|
||||
Two words if used as a verb, one word if used as a noun.
|
||||
|
||||
**Examples**
|
||||
|
||||
- Check out these new features!
|
||||
- Proceed to checkout.
|
||||
|
||||
#### data source
|
||||
|
||||
Two words, not one.
|
||||
|
||||
**Exceptions:**
|
||||
|
||||
- "datasource" used as an identifier
|
||||
- "datasource" in a URL
|
||||
- Use "data source" instead of "datasource" unless used as an identifier, in code, or as part of a URL.
|
||||
- Spell out "repository" and avoid the shorter "repo."
|
||||
- Use "Unix" as the preferred spelling (as opposed to "UNIX", or "unix") when referring to the family of operating systems.
|
||||
|
||||
#### display (verb)
|
||||
|
||||
_Display_ is a transitive verb, which means it always needs a direct object.
|
||||
|
||||
- Correct, active voice: Grafana displays your list of active alarms.
|
||||
- Correct, but passive voice: Your list of active alarms is displayed.
|
||||
- Incorrect: The list of active alarms displays.
|
||||
|
||||
#### drawer
|
||||
|
||||
Do not use. This is developer jargon that refers to a UI panel. Refer to the panel or feature by its proper name.
|
||||
|
||||
#### intro, introduction
|
||||
|
||||
"Introduction" is the preferred word. Use "intro" if there are space constraints (like on the side menu) or you are specifically trying for a less formal, more conversational tone.
|
||||
|
||||
#### metadata
|
||||
|
||||
One word, not two.
|
||||
|
||||
#### mixin
|
||||
|
||||
One word, not two. Also, not hyphenated.
|
||||
|
||||
#### open source, open-source
|
||||
|
||||
Do not hyphenate when used as an adjective unless the lack of hyphen would cause confusion. For example: _Open source software design is the most open open-source system I can imagine._
|
||||
|
||||
Do not hyphenate when it is used as a noun. For example: _Open source is the best way to develop software._
|
||||
|
||||
#### plugin, plug in
|
||||
|
||||
Two words if used as a verb, one word if used as a noun. Do not use _plug-in_.
|
||||
|
||||
**Examples**
|
||||
|
||||
- Plug in the appliance.
|
||||
- Download the plugin.
|
||||
|
||||
#### setup, set up
|
||||
|
||||
Two words if used as a verb, one word if used as a noun.
|
||||
|
||||
**Examples**
|
||||
|
||||
- Set up the workspace.
|
||||
- Initial setup might take five minutes.
|
||||
|
||||
#### node_exporter, windows_exporter
|
||||
|
||||
When referencing the Prometheus data source exporters, always use "node_exporter" and "windows_exporter" when referring to those tools.
|
||||
|
||||
**Correct:** node_exporter, windows_exporter
|
||||
**Incorrect:** Node Exporter, node exporter, Windows Exporter, Windows exporter, windows exporter.
|
||||
|
||||
#### web server
|
||||
|
||||
Two words, not one.
|
||||
|
||||
**Correct:** web server
|
||||
**Incorrect:** webserver
|
||||
|
||||
### MS SQL Server
|
||||
|
||||
Always use "MS SQL" when referring to MS SQL Server application.
|
||||
|
||||
Incorrect UI spellings will be corrected in a later version of Grafana.
|
||||
@@ -25,15 +25,14 @@ import { GrafanaTheme2 } from '@grafana/data';
|
||||
import { useStyles2 } from '@grafana/ui';
|
||||
import { css } from '@emotion/css';
|
||||
|
||||
function Foo(props: FooProps) {
|
||||
const styles = useStyles2(getStyles);
|
||||
// Use styles with className
|
||||
}
|
||||
const getComponentStyles = (theme: GrafanaTheme2) => css`
|
||||
padding: ${theme.spacing.md};
|
||||
`;
|
||||
|
||||
const getStyles = (theme: GrafanaTheme2) =>
|
||||
css({
|
||||
padding: theme.spacing(1, 2),
|
||||
});
|
||||
const Foo: FC<FooProps> = () => {
|
||||
const styles = useStyles2(getComponentsStyles);
|
||||
// Use styles with className
|
||||
};
|
||||
```
|
||||
|
||||
#### Get the theme object
|
||||
@@ -94,7 +93,7 @@ Example use cases:
|
||||
| -------------------------- | ------------------------------------------------------------ |
|
||||
| theme.colors.border.weak | Primary border for panels and panes and other subtle borders |
|
||||
| theme.colors.border.medium | For stronger borders like inputs |
|
||||
| theme.colors.border.strong | For even stronger border like hover highlighted border |
|
||||
| theme.colors.border.strong | For even stronger border like hover highighted border |
|
||||
|
||||
### Actions
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user