Compare commits

..

324 Commits

Author SHA1 Message Date
Dominik Prokop
4cafe613e1 Merge pull request #289 from grafana/bump-version-8.4.5
Release: Bump version to 8.4.5
2022-03-31 05:23:19 -07:00
grafanabot
eb30befb0f "Release: Updated versions in package to 8.4.5" 2022-03-31 12:07:48 +00:00
Dominik Prokop
8cea14f8d1 bump-version.yml - remove check about version alignment with main 2022-03-31 14:03:53 +02:00
Dominik Prokop
83f8c366a1 Merge branch 'v8.4.x' of github.com:grafana/grafana into v8.4.x 2022-03-31 13:39:07 +02:00
Piotr Jamróz
85525e84a0 [v8.4.x] Explore: Fix time interpolation (#46737) (#47114)
* Explore: Fix time interpolation (#46737)

* Ensure TemplateService is updated with new time range on each time range change.

* Fix linting errors

* Fix explorePane.test.ts

* Reuse createDefaultInitialState

* Remove unused imports

* Add a test for left/right split

* Silence console.error in tests

* Silence console.error in tests

(cherry picked from commit bf977ac245)

# Conflicts:
#	.betterer.results
#	packages/grafana-runtime/src/services/templateSrv.ts
#	public/app/features/explore/spec/helper/setup.tsx
#	public/app/features/explore/state/query.test.ts
#	public/app/features/explore/state/time.ts
#	public/app/features/explore/utils/links.test.ts
#	public/app/features/templating/template_srv.mock.ts
#	public/app/plugins/datasource/loki/configuration/DebugSection.test.tsx

* Add missing mocks

* Add missing mocks
2022-03-31 12:04:51 +02:00
Zoltán Bedi
aac024732e Updated content based on feedback. (#46896) (#47112)
(cherry picked from commit 9f16644476)

Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
2022-03-31 02:32:59 -07:00
Grot (@grafanabot)
839485a4b6 Text Panel: Fixes mailto links not working (#47025) (#47109) 2022-03-31 10:15:23 +01:00
Grot (@grafanabot)
4ced7b959e logs: better handle missing fields (#46963) (#47100)
(cherry picked from commit 2d61022d93)

Co-authored-by: Gábor Farkas <gabor.farkas@gmail.com>
2022-03-31 11:00:18 +02:00
Grot (@grafanabot)
9a3ed87c89 Add back domain configuration (#46820) (#46833)
It was lost in the PR #30695

(cherry picked from commit 52fec0d7db)

Co-authored-by: Simon Lundström <github-profile@soy.se>
2022-03-31 10:56:18 +02:00
Grot (@grafanabot)
9ec26dc477 ManageDashboards: Fix error when deleting all dashboards from folder view (#46877) (#46917)
* user essentials mob! 🔱

* draft tests

* tests!

* better default ids for test data

(cherry picked from commit 89757cf58f)

Co-authored-by: Josh Hunt <joshhunt@users.noreply.github.com>
2022-03-31 10:50:50 +02:00
Grot (@grafanabot)
90a99a4719 [v8.4.x] Datasource: Fixes changing default data source causes inconsistency between panel data source and query data source (#46221)
* Datasource: Fixes changing default data source causes inconsistency between panel data source and query data source (#46167)

* Datasource: Fixes changing default data source causes inconsistency between panel data source and query data source

* Fix unit tests

(cherry picked from commit a404dba29d)

* updated test

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
2022-03-31 10:46:56 +02:00
Grot (@grafanabot)
3af9f2fa2e Grafana-UI: Fix TimeSeries not updating when timeZone is changed (#46728) (#47070) 2022-03-31 09:34:26 +01:00
Alex Khomenko
873b254249 [8.4.x] Feature highlights: update components (#47059)
* manual backport

* Remove betterer.results
2022-03-31 09:48:38 +02:00
Grot (@grafanabot)
4d3c28a5d5 Resize map on changing browser size (#47084) (#47086)
(cherry picked from commit dea9b51a0f)

Co-authored-by: Adela Almasan <88068998+adela-almasan@users.noreply.github.com>
2022-03-31 00:55:56 +02:00
Grot (@grafanabot)
0766f05408 Call optionsChanged when props options have changed (#47031) (#47065)
(cherry picked from commit 851c54b3b1)

Co-authored-by: Adela Almasan <88068998+adela-almasan@users.noreply.github.com>
2022-03-30 11:27:45 -05:00
Grot (@grafanabot)
b96a5eea1a Geomap: Display legend (#46886) (#47061)
* Display legend for fixed colors and field; Hide tooltip on base layer;

(cherry picked from commit 118b87ee8f)

Co-authored-by: Adela Almasan <88068998+adela-almasan@users.noreply.github.com>
2022-03-30 10:00:02 -05:00
Grot (@grafanabot)
4b2c823521 mssql: explicit disable encryption when its disabled (#46546) (#47060)
(cherry picked from commit b52794601d)

Co-authored-by: Dirkco du Plessis <dirkcoduplessis@gmail.com>
2022-03-30 16:24:54 +02:00
Grot (@grafanabot)
a6e58b7e3a replaced ascii image with png image (#47032) (#47057)
(cherry picked from commit d3b2ffed35)

Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
2022-03-30 09:25:38 -04:00
Grot (@grafanabot)
13fc39def9 Plugins: Don't start runner ticker for Core plugins (#46964) (#47056)
* Plugins: Don't start runner ticker for Core plugins

* add test

* correct start check in test

(cherry picked from commit 23dde457ef)

Co-authored-by: Will Browne <wbrowne@users.noreply.github.com>
2022-03-30 15:03:35 +02:00
Dimitris Sotirakis
205421fbbf Fix prettier:checkDocs command (#47045) 2022-03-30 15:20:01 +03:00
Grot (@grafanabot)
703308f31a Graphite: Fallback to hardcoded list of functions when no functions are returned (#46681) (#46688)
(cherry picked from commit ed155e47c4)

Co-authored-by: Piotr Jamróz <pm.jamroz@gmail.com>
2022-03-30 09:52:47 +02:00
Grot (@grafanabot)
3bcf117344 AzureMonitor: Fix missing top parameter when dimensions are set (#47010) (#47017)
(cherry picked from commit 48113beeeb)

Co-authored-by: Andres Martinez Gotor <andres.mgotor@gmail.com>
2022-03-29 17:43:59 +02:00
Grot (@grafanabot)
5ed397b8d2 Collapse: Change icon (#46950) (#47016)
(cherry picked from commit 7d2476d045)

Co-authored-by: Andres Martinez Gotor <andres.mgotor@gmail.com>
2022-03-29 17:43:44 +02:00
Grot (@grafanabot)
a38d16cbf3 Grafana-UI: Fixes timezone offset for default timezone when it is different from browser timezone (#46796) (#47011) 2022-03-29 14:06:15 +01:00
Victor Marin
49ce88d84d Table panel: Show datalinks for cell display modes JSON View and Gauge derivates (#46020) (#47014)
Backport 5242d44693 from https://github.com/grafana/grafana/pull/46020
2022-03-29 14:26:20 +02:00
Grot (@grafanabot)
2f33b1241c Logger: Use specified format for file logger (#46970) (#46979)
Fixes #45941

(cherry picked from commit 7bc821baf2)

Co-authored-by: Emil Tullstedt <emil.tullstedt@grafana.com>
2022-03-29 13:15:17 +02:00
Grot (@grafanabot)
64747b8da8 [v8.4.x] Plugins: Make backend plugin metrics endpoints available with optional authentication (#47004) 2022-03-29 13:07:25 +02:00
Dimitris Sotirakis
bf0a07f7d2 [v8.4.x] CI: Sync CI changes with v8.4.x (#47007)
* CI: Trigger release build upon drone yaml changes (#46882)

* Add trigger-test-release step

* Change cd command

* Add failure:ignore

* Add depth when cloning

* Fix wrong secret

(cherry picked from commit 758ccfb69e)

* Fetch tags after cloning (#46921)

(cherry picked from commit 9bf82c37e3)

* Add GH token when referring to remote - add --quite when running git push (#46926)

(cherry picked from commit 0e682397ab)

* Sign drone
2022-03-29 11:05:20 +01:00
Grot (@grafanabot)
30757ee92d Datemath: Fix weekstart calculation (#46962) (#46983)
* Update go-datemath version

* Remove unnecessary bits

* fixup! Remove unnecessary bits

(cherry picked from commit 8c622c1ef6)

Co-authored-by: Tania B <yalyna.ts@gmail.com>
2022-03-26 20:10:17 +01:00
Grot (@grafanabot)
44887a2519 CloudWatch: Fix metric names (#46929) (#46949)
(cherry picked from commit 3c5e68a349)

Co-authored-by: Andres Martinez Gotor <andres.mgotor@gmail.com>
2022-03-25 09:47:58 +01:00
Sarah Zinger
964876d95c Azure Monitor: Small bug fixes for Resource Picker (#46665) (#46933)
- fixes issue with checkbox styling
- fixes issue with selecting subscriptions

(cherry picked from commit dd49f9d182)
2022-03-24 12:51:05 -04:00
Grot (@grafanabot)
3903b62ea5 Docs: Reorganize Dashboards and add note for escalations issue 2013 (#46902) (#46927)
* Initial commit.

* Update version number

* Initial commit.

* More formatting changes. Also added URL links.

* Ran prettier.

(cherry picked from commit c42b0d7498)

Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
2022-03-24 10:23:31 -04:00
Grot (@grafanabot)
7660a65579 Tracing: Prevent createSpanLink from returning an invalid Loki query (#46864) (#46897)
(cherry picked from commit 78c23d8dab)

Co-authored-by: Connor Lindsey <cblindsey3@gmail.com>
2022-03-23 18:25:52 +01:00
achatterjee-grafana
a93e236263 Docs: update version (#46838) (#46859)
* update version (#46838)

* Empty-Commit
2022-03-23 13:00:42 -04:00
Grot (@grafanabot)
c8a022d109 AccessControl: Handle ':' in attribute resolution (#46742) (#46869)
* AccessControl: Handle ':' in attribute resolution

* Simplify based on assumption that prefixes will have maximum 2 parts

(cherry picked from commit ff3c1e3144)

Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com>
2022-03-23 11:31:43 -04:00
Grot (@grafanabot)
d271d27829 Plugins: Make plugin loading from file system deterministic (#46842) (#46873)
* Plugins: Make plugin loading from file system deterministic

* fix test name

* flip assertion arg order

(cherry picked from commit 5e18293f88)

Co-authored-by: Will Browne <wbrowne@users.noreply.github.com>
2022-03-23 12:13:49 +01:00
Jack Westbrook
17ba2a553b build(webpack): revert update dependency fork-ts-checker-webpack-plugin to v6.5.0 (#43229) (#46836) 2022-03-23 07:26:49 +01:00
Grot (@grafanabot)
0f8e196b31 Updated regex function (#46839) (#46841)
(cherry picked from commit a0f5953cb3)

Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
2022-03-22 13:08:34 -04:00
Grot (@grafanabot)
cd6044b5a5 Azure Monitor: Bump core plugin version (#46776) (#46804)
* Azure Monitor: Bump core plugin version

* Remove updated, update learn more link

(cherry picked from commit 499445a5f9)

Co-authored-by: Shirley <4163034+fridgepoet@users.noreply.github.com>
2022-03-22 16:22:40 +01:00
Grot (@grafanabot)
a06f6bf074 fix double slash in share link (#46757) (#46785)
(cherry picked from commit 18c1c6ca6a)

Co-authored-by: Santiago <santiagohernandez.1997@gmail.com>
2022-03-22 09:40:42 +01:00
Grot (@grafanabot)
398cb9fe55 Fix anchor (#46797) (#46810)
(cherry picked from commit 45745debe5)

Co-authored-by: Tomas Rohrer <rohlik@3server.cz>
2022-03-21 15:59:38 -04:00
Grot (@grafanabot)
782210ef98 Docs: Correct Team Sync availability (#45340) (#46795)
Update the explanation of which users can use Team Sync

Co-authored-by: achatterjee-grafana <aparajita.chatterjee@grafana.com>
(cherry picked from commit 8199cc0cf8)

Co-authored-by: Fiona Artiaga <89225282+GrafanaWriter@users.noreply.github.com>
2022-03-21 11:55:08 -04:00
Grot (@grafanabot)
89568408af TimePickerContent: Use button time for range dropdown toggle (#46778) (#46788)
(cherry picked from commit 912018ff64)

Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>
2022-03-21 15:46:31 +01:00
Dimitris Sotirakis
43ec783fd7 Update grabpl (#46639) (#46640)
(cherry picked from commit 85184ee9dc)
2022-03-21 11:30:40 +00:00
Grot (@grafanabot)
adec7aba14 AzureMonitor: Update China regions (#46695) (#46770)
(cherry picked from commit 788fde7ead)

Co-authored-by: Andres Martinez Gotor <andres.mgotor@gmail.com>
2022-03-21 12:11:34 +01:00
Grot (@grafanabot)
22e6d10e42 Updated bucket size/offeset settings; Check for negative values in bucket size (#46754) (#46756)
(cherry picked from commit 576b73ed48)

Co-authored-by: Adela Almasan <88068998+adela-almasan@users.noreply.github.com>
2022-03-18 20:44:30 -07:00
Grot (@grafanabot)
403438c53d Fixing delete dashboard url form datasource configuration (#46637) (#46739)
(cherry picked from commit c3ee98a9b6)

Co-authored-by: lean.dev <34773040+leandro-deveikis@users.noreply.github.com>
2022-03-18 12:39:25 -03:00
Grot (@grafanabot)
1a0ee53cdb Chore: Fix failing lerna publish commands (#46359) (#46705)
(cherry picked from commit e2a283b6b9)

Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com>
2022-03-17 18:52:07 +00:00
Grot (@grafanabot)
35e78a7721 release: update latest.json (#46704) (#46706) 2022-03-17 19:33:04 +01:00
Grot (@grafanabot)
efe529917a ReleaseNotes: Updated changelog and release notes for 8.4.4 (#46702) (#46703)
(cherry picked from commit 9a00df1e8d)
2022-03-17 18:40:34 +01:00
Grot (@grafanabot)
0fee11137e "Release: Updated versions in package to 8.4.4" (#46698) 2022-03-17 17:59:14 +01:00
Grot (@grafanabot)
2bcbb2dfb3 Annotations: Fix issue with spinner always showing (#46686) (#46687)
(cherry picked from commit a9002e80b4)

Co-authored-by: Joao Silva <100691367+JoaoSilvaGrafana@users.noreply.github.com>
2022-03-17 13:24:16 +00:00
Grot (@grafanabot)
00e27a3925 Data links: Fix issue with not being able to click a variable after scroll (#46643) (#46685)
(cherry picked from commit c224da0f02)

Co-authored-by: Joao Silva <100691367+JoaoSilvaGrafana@users.noreply.github.com>
2022-03-17 11:52:29 +00:00
Grot (@grafanabot)
907ca6d81f Update contact-points.md (#46657) (#46670)
As you see. "orgId": 1 is duplicated.

(cherry picked from commit 8025997982)

Co-authored-by: Atrbear <x.koala@outlook.com>
2022-03-16 17:07:32 -04:00
Todd Treece
7e25e7c14f Chore: Update go version used in CI to 1.17.8 (#46591) (#46631)
(cherry picked from commit 3f58abe9bd)
2022-03-16 10:00:36 -04:00
Dimitris Sotirakis
fcfb01faeb Update grabpl (#46639)
(cherry picked from commit 85184ee9dc)
(cherry picked from commit 3d8c6b1640)
2022-03-16 13:36:26 +00:00
Daniel Lee
b9df06ed3a Merge pull request #279 from grafana/bump-version-8.4.4
Release: Bump version to 8.4.4
2022-03-16 13:21:40 +01:00
grafanabot
a07ad8af45 "Release: Updated versions in package to 8.4.4" 2022-03-16 12:12:00 +00:00
Daniel Lee
708cda2052 Merge branch 'v8.4.x' of github.com:grafana/grafana into v8.4.x 2022-03-16 13:07:45 +01:00
Grot (@grafanabot)
4450276449 Alerting: fix alert groups grouping (#45012) (#46092)
* fix multiple non-grouped groupings

* drop duplicate alerts

* add test for multiple groups without labels

Co-authored-by: gillesdemey <gilles.de.mey@gmail.com>
(cherry picked from commit e814e7364b)

Co-authored-by: Nathan Rodman <nathanrodman@gmail.com>
2022-03-16 13:06:45 +01:00
Grot (@grafanabot)
880bf3c550 Auth Proxy: encoding of non-ASCII headers (#44797) (#46236)
* Decode auth proxy headers using URL encoding

* Header encoding configuration via settings file

* Rename configuration setting to headers_encoded

* Quoted-printable encoding

* Tests for AuthProxy

* Fix encoding name

* Remove authproxy init

(cherry picked from commit 1dca39fb91)

Co-authored-by: Sergey Kostrukov <sekost@microsoft.com>
2022-03-16 08:04:32 -04:00
Grot (@grafanabot)
aaf3abc468 CloudMonitoring: Improve error message (#46599) (#46620)
(cherry picked from commit 727204ed5e)

Co-authored-by: Andres Martinez Gotor <andres.mgotor@gmail.com>
2022-03-16 09:48:46 +01:00
Grot (@grafanabot)
f1cd74a5e9 Dashboards: Fixes repeating by row and no refresh (#46565) (#46614)
(cherry picked from commit 31d141b267)

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
2022-03-16 09:24:01 +01:00
Grot (@grafanabot)
c00e4668ab TimeSeries: Preserve null/undefined values when performing negative y transform (#46584) (#46617)
(cherry picked from commit 5ae3e3f6f7)

Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
2022-03-16 09:22:30 +01:00
Grot (@grafanabot)
cf2e7779ec Grafana-UI: Fix use of Fragments as children of InlineField (#46326) (#46603)
(cherry picked from commit 00c93fff8c)

Co-authored-by: Joao Silva <100691367+JoaoSilvaGrafana@users.noreply.github.com>
2022-03-15 18:01:58 +00:00
Ryan McKinley
7e963a1110 Geomap: applying multiple line builders should keep each segment #46563 (#46597) 2022-03-15 10:54:02 -07:00
Grot (@grafanabot)
7a0a6f7b29 Docs: Add description to remote cache configuration (#46589) (#46596)
* Add description to remote cache configuration

* Apply feedback

(cherry picked from commit 8e13b201ba)

Co-authored-by: Tania B <yalyna.ts@gmail.com>
2022-03-15 18:28:48 +01:00
Grot (@grafanabot)
29fc1213d3 Dashboard: Validate refId when generating id for cloudwatch query (#46182) (#46542)
* Validate refId when generating id for cloudwatch query

* add test case when refId is a valid metric data id

(cherry picked from commit 99b4dfc27d)

Co-authored-by: Kevin Yu <kevinwcyu@users.noreply.github.com>
2022-03-15 09:31:05 -07:00
Grot (@grafanabot)
3bee136ba6 Search: sort results correctly when using postgres (#46466) (#46586)
* Search: sort results correctly when using postgres

postgresql puts nulls first while both mysql and sqlite puts them last

* linting

(cherry picked from commit f46038ed3a)

Co-authored-by: Leonard Gram <leo@xlson.com>
2022-03-15 16:14:57 +01:00
Grot (@grafanabot)
eecedff435 Add unpack to Loki Log Browser (#44623). (#46573) (#46583)
(cherry picked from commit 5cf0906622)

Co-authored-by: Alexander Kubyshkin <i.am.glint@gmail.com>
2022-03-15 14:34:23 +01:00
Grot (@grafanabot)
edd5d8bd92 TimeSeries: Add migration for Graph panel's transform series override (#46577) (#46580)
(cherry picked from commit f452e068f0)

Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
2022-03-15 13:45:05 +01:00
Grot (@grafanabot)
5e332cc55d SSE: Keep FieldConfig for data source queries (#46328) (#46415)
for #46325

(cherry picked from commit cab509fbe8)

Co-authored-by: Kyle Brandt <kyle@grafana.com>
2022-03-14 16:00:11 +01:00
Gilles De Mey
5d078ba874 Alerting: adds support for federated rules (#46037) (#46520)
(cherry picked from commit a9b1a964b0)
2022-03-14 11:32:17 +01:00
Dimitris Sotirakis
af255219a4 [v8.4.x] CI: Sync CI changes (#46083)
* CI: Introduce `build-frontend-packages` step (#45824)

* Split frontend build

* Fix command name

* Update grabpl

(cherry picked from commit 2f6c827f5d)

* CI: Add more checks to standalone docs pipeline (#46449)

* Add build frontend package step

* Reorder dependencies

* Add codespell and prettier checks

(cherry picked from commit 82b436afee)

* Update golang (#46458)

(cherry picked from commit a29159f362)

* Fix architectures
2022-03-11 19:14:16 +02:00
Grot (@grafanabot)
3158f15ce5 Gauge: Fixes blank viz when data link is added and orientation was horizontal (#46335) (#46445)
(cherry picked from commit cb0b089d32)

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
2022-03-11 06:06:25 -05:00
Gabriel MABILLE
dfbd23ba7b Accesscontrol: fix data source name resolver and add uid name resolver (#46409) (#46437)
* Fix data source scope resolver

* Adding ds UID scope resolver

* Register UID resolver

* use package full name

* even if it cannot be empty as of now and is also checked by store, better safe than sorry

(cherry picked from commit bd918927b4)
2022-03-11 09:41:18 +01:00
Grot (@grafanabot)
5b5e175127 Card: make elements in metadata clickable (#46336) (#46410)
* Card: make elements in metadata clickable

* add docs

(cherry picked from commit 8b9e27c4ba)

Co-authored-by: Giordano Ricci <me@giordanoricci.com>
2022-03-10 20:52:02 +01:00
achatterjee-grafana
10965b7842 Revert "update exemplars and azure authentication topics. (#46382) (#46384)"
This reverts commit bc3ebce715.
2022-03-10 11:02:51 -05:00
Grot (@grafanabot)
25d8d0a49d Removed extra word. (#46386) (#46413)
(cherry picked from commit 3d5ebba0c2)

Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
2022-03-10 10:02:42 -05:00
Grot (@grafanabot)
bc3ebce715 update exemplars and azure authentication topics. (#46382) (#46384)
(cherry picked from commit f19594e8ff)

Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
2022-03-09 14:08:20 -05:00
Grot (@grafanabot)
95af6176bf Perf: don't re-init plots when changing dashboard timeRange (#46339) (#46340)
(cherry picked from commit ec911be8ef)

Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
2022-03-09 19:53:59 +01:00
Grot (@grafanabot)
8ddab3893e Logging: Helper to create NopLogger (#46376) (#46377)
(cherry picked from commit b1e6f7126a)

Co-authored-by: gotjosh <josue.abreu@gmail.com>
2022-03-09 18:20:39 +01:00
Grot (@grafanabot)
2617226815 CloudWatch: Use default http client from aws-sdk-go (#46370) (#46375)
* use default http client from aws-sdk-go

* temp comment out line and link to issue

(cherry picked from commit 6670257c5e)

Co-authored-by: Erik Sundell <erik.sundell87@gmail.com>
2022-03-09 16:44:33 +01:00
Grot (@grafanabot)
bebe1c243e A11y: Replace LinkButton with Button in Value Mappings to make it accessible (#46330) (#46364)
(cherry picked from commit 4b57ffbb4f)

Co-authored-by: Joao Silva <100691367+JoaoSilvaGrafana@users.noreply.github.com>
2022-03-09 14:29:31 +00:00
Grot (@grafanabot)
77d1f996cc [v8.4.x] DataLinks: Encode variable params for data link URLs (#46257)
Co-authored-by: kay delaney <45561153+kaydelaney@users.noreply.github.com>
2022-03-09 14:42:33 +01:00
Todd Treece
f7d66fd008 Prometheus: Fix timestamp truncation (#46302) (#46332)
(cherry picked from commit db5f480a8f)
2022-03-08 17:44:03 +00:00
Grot (@grafanabot)
d7f27135db A11y : Updated EmptyListCTA to switch between Button and LinkButton (#46292) (#46319)
* Updated EmptyListCTA to switch between Button and LinkButton

* Added tests

(cherry picked from commit bfde8ee603)

Co-authored-by: Yaelle Chaudy <42030685+yaelleC@users.noreply.github.com>
2022-03-08 12:59:50 +01:00
Grot (@grafanabot)
2ae8f2bbb1 TagsInput: fix tags remove button accessibility issues (#46254) (#46315)
* TagsInput: fix remove button focusable state

* Add tests

* use IconButton

* reverted style changes & disable iconbutton hover animation

(cherry picked from commit 1ef247e0c6)

Co-authored-by: Giordano Ricci <me@giordanoricci.com>
2022-03-08 10:15:28 +01:00
Leon Sorokin
94a794b315 LegacyBrowser: fix Safari 13.1 (lacks logical nullish assignent) (#46260) (#46300)
(cherry picked from commit 0ee552dd65)
2022-03-07 12:36:49 -08:00
Grot (@grafanabot)
711bfa8ae9 Adding migration guide for dashboard and fixing signing doc (#46238) (#46289)
(cherry picked from commit 00a8542ecf)

Co-authored-by: Timur Olzhabayev <timur.olzhabayev@grafana.com>
2022-03-07 13:18:32 +01:00
Grot (@grafanabot)
a022ca2333 TraceView: Reduce whitespace in KeyValuesTable (#46105) (#46250)
(cherry picked from commit 23956557d8)

Co-authored-by: Connor Lindsey <cblindsey3@gmail.com>
2022-03-04 15:53:58 +01:00
Grot (@grafanabot)
1e780bdaac Live: Fix support for StreamingFrameAction.Replace (#46086) (#46237)
* fix StreamingFrameAction.replace

* simplify

* beautify

* cover `streamingDataFrame.ts` changes with unit tests

* formatting

* cover `LiveDataStream.ts` changes with unit tests

* update frame length after pushing new values

(cherry picked from commit bdbb9ed54a)

Co-authored-by: Artur Wierzbicki <wierzbicki.artur.94@gmail.com>
2022-03-04 14:48:45 +04:00
Grot (@grafanabot)
4377817b27 Added test coverage commands to package.json (#46235) (#46239)
(cherry picked from commit 45e4611807)

Co-authored-by: Yaelle Chaudy <42030685+yaelleC@users.noreply.github.com>
2022-03-04 11:47:44 +01:00
Timur Olzhabayev
ba1e26796d Backporting bump version fixes (#46233) 2022-03-04 10:39:56 +01:00
Grot (@grafanabot)
50d614098a feat: add a new <SecretInput> component (#46073) (#46230)
(cherry picked from commit 47d1d83673)

Co-authored-by: Levente Balogh <balogh.levente.hu@gmail.com>
2022-03-04 10:36:33 +01:00
Grot (@grafanabot)
b288d6c805 Plugins: allow using both Function and Class components for app plugins (#46148) (#46228)
* fix: make it possible to use both class and functional components for plugins

* fix: accept both class and functional components as plugin root pages

* refactor: import types by name

* refactor: use `ComponentType`

(cherry picked from commit c331af93b9)

Co-authored-by: Levente Balogh <balogh.levente.hu@gmail.com>
2022-03-04 10:11:09 +01:00
Grot (@grafanabot)
270f7b2d9c CloudWatch: Update minimal policies documentation (#45478) (#46213)
* Separate metrics and logs policies

* Update policy examples

Removes GetMetricStatistics which is no longer used

* WIP for testDatasource

* WIP add datasource health check test

* Undo changes on imports

(cherry picked from commit e39d5382cf)

Co-authored-by: Shirley <4163034+fridgepoet@users.noreply.github.com>
2022-03-03 17:10:25 -05:00
Grot (@grafanabot)
57423746ce BarChart: fix hovered series highlight in tooltip (#44882) (#46187)
(cherry picked from commit 3e3a657343)

Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
2022-03-03 18:11:23 +01:00
Grot (@grafanabot)
205874431c TextPanel: Sanitize after markdown has been rendered to html (#46166) (#46185)
* Sanitize after markdown has been rendered to html

* Update e2e test

(cherry picked from commit b1125c0ba3)

Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2022-03-03 18:00:53 +01:00
Grot (@grafanabot)
82cbff094a Fixing docs comma (#46169) (#46175)
(cherry picked from commit 32170e401f)

Co-authored-by: Timur Olzhabayev <timur.olzhabayev@grafana.com>
2022-03-03 16:55:14 +01:00
Grot (@grafanabot)
afc761746d NodeGraph: Include frames with name edges or nodes in node graph (#46047) (#46164)
* Include frames with name edges or nodes in node graph

(cherry picked from commit cb1649e9b8)

Co-authored-by: Connor Lindsey <cblindsey3@gmail.com>
2022-03-03 14:53:13 +01:00
Grot (@grafanabot)
61335700d3 Unexport mocks, use aws-sdk-go helpers, rename test utilities file (#46107) (#46144)
(cherry picked from commit 1255f8a76a)

Co-authored-by: Shirley <4163034+fridgepoet@users.noreply.github.com>
2022-03-03 14:04:30 +01:00
Grot (@grafanabot)
b58fac8f07 Graph (old): fix null interval insertion, again (follow-up to #46069) (#46139) (#46141)
(cherry picked from commit 89140c8353)

Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
2022-03-03 09:14:19 +01:00
Grot (@grafanabot)
5bc24bf018 StateTimeline: insert trailing null value at +interval (#45997) (#46133)
(cherry picked from commit 854f872b40)

Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
2022-03-03 01:38:08 +01:00
achatterjee-grafana
4cca6e11da Docs: Update ldap authentication topic (#46128) (#46130)
* Fixed broken relrefs, and updated password format in ldap authentication topic.

* Fixed few more broken links.
2022-03-02 16:26:59 -05:00
Giordano Ricci
5212a7a47a chore: update latest.json (#46122) (#46123)
(cherry picked from commit e8a54d58c5)
2022-03-02 19:59:12 +00:00
Grot (@grafanabot)
1a3f892ddc Docs: Include ID token example in Forward OAuth identity for the logged-in user section (#46121) (#46125)
Ref #45938

(cherry picked from commit 76495374dc)

Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
2022-03-02 20:57:47 +01:00
Grot (@grafanabot)
d5e4a54271 ReleaseNotes: Updated changelog and release notes for 8.4.3 (#46119) (#46120)
(cherry picked from commit 50fb63a468)
2022-03-02 19:30:19 +00:00
Grot (@grafanabot)
b2918bf4d9 "Release: Updated versions in package to 8.4.3" (#46118) 2022-03-02 19:15:52 +00:00
Grot (@grafanabot)
84f41f4fe8 Document available Alerting annotations (#46081) (#46112)
* Document available Alerting annotations

* Update docs/sources/alerting/unified-alerting/alerting-rules/alert-annotation-label.md

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

Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
(cherry picked from commit cd3fb8e832)

Co-authored-by: Armand Grillet <2117580+armandgrillet@users.noreply.github.com>
2022-03-02 13:04:00 -05:00
Grot (@grafanabot)
bec2878fe4 Dashboard: Add feature reporting for dashboard import (#46080) (#46099)
* Add feature reporting for dashboard import

* Update tracking event names

(cherry picked from commit 3427ae463d)

Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2022-03-02 15:03:42 +00:00
Giordano Ricci
b7d2911cac Merge pull request #269 from grafana/bump-version-8.4.3
Release: Bump version to 8.4.3
2022-03-02 13:01:27 +00:00
grafanabot
f944a0fe16 "Release: Updated versions in package to 8.4.3" 2022-03-02 12:50:11 +00:00
Elfo404
e68b468420 Merge branch 'v8.4.x' of github.com:grafana/grafana into v8.4.x 2022-03-02 12:46:54 +00:00
Grot (@grafanabot)
5ad4d91de3 Alerting: Fix silence url in notifications (#46031) (#46090)
* Update silence url generation

* Update tests

* Update test to the new silence params format

* Fix tests

(cherry picked from commit aeec087065)

Co-authored-by: Konrad Lalik <konrad.lalik@grafana.com>
2022-03-02 13:22:56 +01:00
Grot (@grafanabot)
659ce4bcad Graph (old): use timeField.config.interval to apply null insertion logic (#46069) (#46070)
(cherry picked from commit fa99143eee)

Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
2022-03-02 06:41:03 +01:00
Grot (@grafanabot)
9d0e4efd9b Docs: Fix typo in Forward OAuth identity for the logged-in user section (#46043) (#46048)
Fixes #45938

(cherry picked from commit 843e587a05)

Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
2022-03-01 19:00:12 +01:00
Grot (@grafanabot)
14acf3e39f Alerting: Fix use of > instead of >= when checking the For duration (#46011) (#46044)
(cherry picked from commit 789cfc31e3)

Co-authored-by: George Robinson <george.robinson@grafana.com>
2022-03-01 18:20:11 +01:00
Grot (@grafanabot)
45e484132c Docs update default.ini file description (#46036) (#46038)
* remove confusing wording

* fixed broken alerting links

(cherry picked from commit 77dddf43bc)

Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
2022-03-01 10:53:06 -05:00
Erik Sundell
f26e850297 fix conflict (#45957) 2022-03-01 14:17:25 +01:00
Grot (@grafanabot)
6e03fe1f94 Transformations: Use asterisk for First non-null label (#45940) (#46014)
(cherry picked from commit 07dda8a299)

Co-authored-by: matt abrams <37156449+zuchka@users.noreply.github.com>
2022-03-01 14:03:34 +01:00
Grot (@grafanabot)
a31a0e898a Making yarn.lock bump work (#46016) (#46019)
(cherry picked from commit 6f14490c6b)

Co-authored-by: Timur Olzhabayev <timur.olzhabayev@grafana.com>
2022-03-01 13:40:33 +01:00
Grot (@grafanabot)
1f39b05f33 Histogram: auto-skip x tick labels to avoid overlap (#45996) (#46001)
(cherry picked from commit b491d6b4dc)

Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
2022-03-01 09:12:36 +01:00
Grot (@grafanabot)
865723d56e StateTimeline: fix duration in tooltip (#45955) (#45987)
- Fixes duration in StateTimeline appearing incorrectly when "merge consecutive values" is enabled.

(cherry picked from commit 5aab0063c7)

Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
2022-02-28 16:55:54 -06:00
Grot (@grafanabot)
700fd45f54 BarChart: fix single group rendering (#45953) (#45992)
(cherry picked from commit 1c4b20b268)

Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
2022-02-28 15:33:38 -06:00
Grot (@grafanabot)
be55f8800e Jaeger: Show loader when search options havent yet loaded (#45936) (#45985)
* Swap out Select component for AsyncSelect to Jaeger search panel

(cherry picked from commit 83664121bc)

Co-authored-by: Cat Perry <000.perry@gmail.com>
2022-02-28 11:37:38 -08:00
Grot (@grafanabot)
b0646b1be3 Middleware: Fix IPv6 host parsing in CSRF check (#45911) (#45984)
- Also create tests for this middleware

Co-authored-by: Kyle Brandt <kyle@grafana.com>
(cherry picked from commit 06ed5efdf0)

Co-authored-by: ying-jeanne <74549700+ying-jeanne@users.noreply.github.com>
2022-02-28 14:15:10 -05:00
Grot (@grafanabot)
e7f52218d1 Capitalize Webhook contact point type (#45942) (#45943)
(cherry picked from commit 1b2c4dca61)

Co-authored-by: Armand Grillet <2117580+armandgrillet@users.noreply.github.com>
2022-02-26 21:16:40 +01:00
Grot (@grafanabot)
87edde2b38 Update comment for scheduler_behind_seconds metric (#45918) (#45919)
(cherry picked from commit f87bfdf2ff)

Co-authored-by: George Robinson <george.robinson@grafana.com>
2022-02-25 15:54:42 +01:00
Grot (@grafanabot)
6ea6c611a9 Fix incorrect metric values for scheduler_behind_seconds (#45830) (#45904)
(cherry picked from commit 6cccbb5a09)

Co-authored-by: George Robinson <george.robinson@grafana.com>
2022-02-25 14:24:44 +00:00
Grot (@grafanabot)
e555fd5455 CloudWatch: Add test to executeStartQuery (#45888) (#45912)
* CloudWatch: Add test to executeStartQuery

* Add test for absence of limit

* Restrict assertions to limit in some tests

(cherry picked from commit a68a570e92)

Co-authored-by: Shirley <4163034+fridgepoet@users.noreply.github.com>
2022-02-25 14:28:08 +01:00
Grot (@grafanabot)
d17f59f052 loki: log-volume: improved documentation (#45823) (#45887)
* loki: log-volume: improved documentation

* spelling fixes

(cherry picked from commit 7152deb92f)

Co-authored-by: Gábor Farkas <gabor.farkas@gmail.com>
2022-02-25 06:45:29 -05:00
Grot (@grafanabot)
1d1e81b309 CloudWatch: Fix running go test with count (#45892) (#45903)
(cherry picked from commit 304185f682)

Co-authored-by: Shirley <4163034+fridgepoet@users.noreply.github.com>
2022-02-25 12:36:34 +01:00
Grot (@grafanabot)
d27bc6e788 Escape windows newline. (#45771) (#45857)
Fixes #45746

(cherry picked from commit dcd98f7819)

Co-authored-by: Per Osbäck <perosb@users.noreply.github.com>
2022-02-25 12:17:48 +01:00
Grot (@grafanabot)
47c777930d fix: update bump-version-action node runtime to 16 (#45856) (#45896)
(cherry picked from commit ab0bbf6715)

Co-authored-by: Timur Olzhabayev <timur.olzhabayev@grafana.com>
2022-02-25 11:39:48 +01:00
Grot (@grafanabot)
787940f32e Rename evalCtx to avoid confusion with context.Context (#45144) (#45893)
(cherry picked from commit 2ca79ca0c7)

Co-authored-by: George Robinson <george.robinson@grafana.com>
2022-02-25 11:20:35 +01:00
George Robinson
cdf8bab022 Alerting: Create annotation if Firing alert is removed (#45703) (#45865)
This commit changes staleResultsHandler to create an annotation if the current state is Alerting and the result is being removed from the state cache as it has not been updated since 2x the evaluation interval.

(cherry picked from commit feae959c9d)
2022-02-25 07:38:31 +01:00
Grot (@grafanabot)
c29c1691fd SSE: Fix NoData when some series were no data but others not (#45867) (#45875)
Co-authored-by: Santiago <santiagohernandez.1997@gmail.com>
(cherry picked from commit a578cf0f7c)

Co-authored-by: Kyle Brandt <kyle@grafana.com>
2022-02-24 21:48:56 -03:00
Grot (@grafanabot)
585b39ac0f Update dashboard_versions.md (#45871) (#45872)
Fixes https://github.com/grafana/grafana/issues/45866, change dashboard version example to use `version` instead of `id`

`api/dashboards/id/24/versions/1`

(cherry picked from commit 8a98354844)

Co-authored-by: Melori Arellano <melori.arellano@grafana.com>
2022-02-24 16:28:48 -05:00
George Robinson
37b6fc7067 Alerting: Use expanded labels in dashboard annotations (#45726) (#45858) 2022-02-24 17:55:37 +00:00
Grot (@grafanabot)
2255628a5a ReleaseNotes: Updated changelog and release notes for 8.4.2 (#45850) (#45859)
(cherry picked from commit 91af956eb7)
2022-02-24 13:28:00 -04:00
Grot (@grafanabot)
bfb9c7f249 Release: Bump version to 8.4.2 (#45849)
* "Release: Updated versions in package to 8.4.2"

* Update yarn lock

Co-authored-by: Stephanie Closson <srclosson@gmail.com>
2022-02-24 16:00:20 +00:00
Grot (@grafanabot)
01628c4045 Azure Monitor: Fixes broken log queries that use workspace (#45820) (#45843)
* allow log queries to be executed also without a resource

* add unit tests

(cherry picked from commit b7a2fda2ae)

Co-authored-by: Erik Sundell <erik.sundell87@gmail.com>
2022-02-24 15:42:01 +01:00
Grot (@grafanabot)
01411b5f45 Add a fallback for the clipboard API (#45831) (#45841)
(cherry picked from commit 64ad33f31a)

Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2022-02-24 15:14:54 +01:00
Grot (@grafanabot)
4363f9af1f Adding ap-southeast-3 to cloudwatch regions (#45821) (#45836)
(cherry picked from commit 0e7b0f16b8)

Co-authored-by: Yaelle Chaudy <42030685+yaelleC@users.noreply.github.com>
2022-02-24 15:05:26 +01:00
Dimitris Sotirakis
3734b455d7 grafana-cli: Diff generated ts directly instead of relying on git (#45815) (#45828)
* Add diffing support to grafana-cli cue gen-ts

* Rely on diff comparison in cuetsify pipeline step

* Ignore *.gen.ts files with eslint

* Chore: Fix lint `sdboyer/cuetsify-compare` (#45818)

* Sync drone

(cherry picked from commit 40645ab19e39ff9b0a12b7ebb13a4dc4c5e1d472)

* Fix lint

(cherry picked from commit c95ece983984432fea029335b2b729b09d76c7eb)

* Sign drone

Co-authored-by: Dimitris Sotirakis <sotirakis.dim@gmail.com>
(cherry picked from commit 60db643983)

Co-authored-by: sam boyer <sdboyer@grafana.com>
2022-02-24 12:25:59 +01:00
sam boyer
dea7d4996a grafana-cli: Diff generated ts directly instead of relying on git (#45815)
* Add diffing support to grafana-cli cue gen-ts

* Rely on diff comparison in cuetsify pipeline step

* Ignore *.gen.ts files with eslint

* Chore: Fix lint `sdboyer/cuetsify-compare` (#45818)

* Sync drone

(cherry picked from commit 40645ab19e39ff9b0a12b7ebb13a4dc4c5e1d472)

* Fix lint

(cherry picked from commit c95ece983984432fea029335b2b729b09d76c7eb)

* Sign drone

Co-authored-by: Dimitris Sotirakis <sotirakis.dim@gmail.com>
(cherry picked from commit 60db643983)
(cherry picked from commit 0a3fcc07d8)
2022-02-24 13:19:31 +02:00
Grot (@grafanabot)
f443777309 Alerting: add field for custom slack endpoint (#45751) (#45812)
* add field for custom slack endpoint

* add test for using custom endpoint

* Update pkg/services/ngalert/notifier/channels/slack.go

Co-authored-by: Alexander Weaver <weaver.alex.d@gmail.com>

* specify description for endpoint

* remove brittle string constants

Co-authored-by: Alexander Weaver <weaver.alex.d@gmail.com>
(cherry picked from commit f9701d78b1)

Co-authored-by: Nathan Rodman <nathanrodman@gmail.com>
2022-02-24 11:05:44 +01:00
Kevin Minehart
69d1d4b124 remove flaky cloudwatch test (#45800) (#45807)
* remove flaky cloudwatch tests

* Skip flaking templating-dashboard-links-and-variables test

(cherry picked from commit cbf96e6a8b)
2022-02-23 15:27:50 -05:00
Grot (@grafanabot)
9fc02d717f Release: Bump version to 8.4.2 (#261)
* "Release: Updated versions in package to 8.4.2"

* updated yarn.lock - 8.4.2 release process

Co-authored-by: Stephanie Closson <srclosson@gmail.com>
2022-02-23 14:22:54 -04:00
Stephanie Closson
d98982bf02 Merge branch 'v8.4.x' of github.com:grafana/grafana into v8.4.x 2022-02-23 13:53:00 -04:00
Grot (@grafanabot)
1c10ae4106 Skip flaky test (#45785) (#45799)
(cherry picked from commit 3cfbbbdbf2)

Co-authored-by: Sofia Papagiannaki <1632407+papagian@users.noreply.github.com>
2022-02-23 17:09:58 +01:00
Grot (@grafanabot)
884b573c0b Encryption: Refine secrets-related commands (#45201) (#45790)
* CLI: Adjust 're-encrypt-data-keys' command

* CLI: Adjust 're-encrypt' command

* Multiple improvements on re-encrypt secrets migration

* Another bunch of code improvements

* Lint fixes

(cherry picked from commit e6a85826e9)

Co-authored-by: Joan López de la Franca Beltran <5459617+joanlopez@users.noreply.github.com>
2022-02-23 16:21:52 +01:00
Dimitris Sotirakis
6fd53a9b88 Update grabpl and build-container version (#45784) (#45788)
(cherry picked from commit 2f0dcbbd9d)
2022-02-23 15:30:40 +01:00
Grot (@grafanabot)
e6b5a6b227 bump go version to 1.17.7 (#45772) (#45783)
(cherry picked from commit b512a3d75f)

Co-authored-by: ying-jeanne <74549700+ying-jeanne@users.noreply.github.com>
2022-02-23 14:47:57 +01:00
Grot (@grafanabot)
17354bfbe6 Search: fix PostgreSQL query (#45305) (#45780)
* Search: fix PostgreSQL query

* Apply suggestion from code review

(cherry picked from commit 5a1d8cbea7)

Co-authored-by: Sofia Papagiannaki <1632407+papagian@users.noreply.github.com>
2022-02-23 13:49:33 +01:00
Grot (@grafanabot)
f86e30f492 Annotations: Fixes issue with tags filter not showing in annotation query (#45724) (#45778)
(cherry picked from commit ef3f254208)

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
2022-02-23 04:47:32 -08:00
Grot (@grafanabot)
e85b839bc4 add default number of returned dashboards (#45755) (#45777)
(cherry picked from commit ade8c18557)

Co-authored-by: matt abrams <37156449+zuchka@users.noreply.github.com>
2022-02-23 04:38:16 -08:00
Dimitris Sotirakis
ec21ded065 Docs: Remove dependency between build-frontend and build-frontend-docs (#45736) (#45768)
* Remove dependency

* Add yarn commands

(cherry picked from commit 02640c7436)
2022-02-23 12:43:45 +01:00
Dimitris Sotirakis
7fb85157c9 CI: Add docs pipeline for main pipelines (#45740) (#45767)
* Add docs pipeline for main

* Extract trigger docs

* Change trigger for main

(cherry picked from commit ea3e41ea62)
2022-02-23 12:26:30 +01:00
Dimitris Sotirakis
90ec0128c1 DockerHub: Use grafana(-oss)-image-tags to push to grafana(-oss)-dev DockerHub repo (#45708) (#45712)
* Revert back changes - changes are done on grabpl

* Sync drone

(cherry picked from commit 3db331402d)
2022-02-23 13:12:52 +02:00
Grot (@grafanabot)
bf25f13e54 feat(45145): add more links to developers page (#45585) (#45671)
(cherry picked from commit 7c826cb43f)

Co-authored-by: Timur Olzhabayev <timur.olzhabayev@grafana.com>
2022-02-23 10:28:06 +01:00
Grot (@grafanabot)
efd6b24077 Tracing: Add option to map tag names to log label names in trace to logs settings (#45178) (#45753)
* Add mapped tags input to allow renaming tags in trace to logs settings

* Use mappedTags in createSpanLink

* Update traceToLogs docs

* Show 'add kv' button if no tags

* Update docs

* Default mappedTags to tag values

(cherry picked from commit af2d19b02e)

Co-authored-by: Connor Lindsey <cblindsey3@gmail.com>
2022-02-22 23:34:31 +01:00
Giordano Ricci
9bceb3e737 UI: Improve modal a11y by setting role & using title as label (#45472) (#45731)
* UI: Improve modal a11y by setting role & using title as label

* remove wrapping div for cutom title components

* Fix typo

(cherry picked from commit 9307cc86f2)
2022-02-22 16:02:09 +01:00
Grot (@grafanabot)
2b19fed282 Update alertmanager.md (#45699) (#45733)
Update default port which is used to host alertmanager.
Official port is 9093.
9090 is used officially by Prometheus.

(cherry picked from commit 68ef0e1f84)

Co-authored-by: Michał Sochoń <kaszpir@gmail.com>
2022-02-22 10:00:09 -05:00
Grot (@grafanabot)
b381e17521 remove unused code of Cloud Monitoring distribution metrics type (#45702) (#45716)
(cherry picked from commit 7acb203b52)

Co-authored-by: Mitsuhiro Tanda <mitsuhiro.tanda@gmail.com>
2022-02-22 11:44:59 +01:00
Emil Tullstedt
eae91b6f50 Chore: add setting to skip org assignment for external users (#34834) (#45692)
* Chore: add setting to skip org assignment for external users

Introduce 'skip_org_role_update_sync' setting to skip any kind of org assignment during the login of external users.
As a consequence manual organization assignments won't be overridden during the upsert of an external user.

Part of #22605

* Chore: Rename skip_org_role_update_sync to oauth_skip_org_role_update_sync and relocate it to auth section

* Chore: replace global setting access where possible

(cherry picked from commit 6beba5a049)

Co-authored-by: baez90 <peter.kurfer@googlemail.com>
2022-02-22 11:27:32 +01:00
Grot (@grafanabot)
4f036ad4db Update mute-timings.md (#45679) (#45693)
cleaned up feature description (there were some leftovers from when the text was last edited)

(cherry picked from commit 34ae28846e)

Co-authored-by: juschm <juschm@users.noreply.github.com>
2022-02-21 12:48:35 -05:00
Grot (@grafanabot)
85c3713611 Docs: Fix encryption docs (#45687) (#45689)
(cherry picked from commit a7d86e023f)

Co-authored-by: Tania B <yalyna.ts@gmail.com>
2022-02-21 17:15:55 +01:00
Ashley Harrison
40d60834c2 Add babel plugin to workaround bug in @babel/preset-env (#45664) (#45667)
* Add babel plugin to workaround bug in @babel/preset-env (#45664)

(cherry picked from commit 05f68c391c)

* Change ordering
2022-02-21 15:28:12 +00:00
Dimitris Sotirakis
f59e0ed914 CI: Introduce docs pipeline (#45454) (#45669)
* Add docs.star

* Fixes in drone yaml

* Add grabpl

* Remove unnecessary steps

(cherry picked from commit f2e03cdb107eb283416885a73051c1ff86eb8b7f)

* Rename docs pipeline

* Exclude docs related steps from PR pipelines

* Add packages/** trigger

* Remove packages exclusion from pr pipelines

(cherry picked from commit 434697e0fd)
2022-02-21 16:50:55 +02:00
Grot (@grafanabot)
563a9ab439 Explore: Fix closing split pane when logs panel is used (#45602) (#45609)
* Clear cache when LogsNavigation is mounted

* Update docs

(cherry picked from commit 25f155a44d)

Co-authored-by: Piotr Jamróz <pm.jamroz@gmail.com>
2022-02-21 12:27:57 +01:00
Dimitris Sotirakis
6edfc5f9b3 Release: Sync changes for Grafana v8.4.1 (#45655)
* "Release: Updated versions in package to 8.4.0-beta.1"

* Update yarn.lock

* "Release: Updated versions in package to 8.4.0"

* Update yarn.lock

* "Release: Updated versions in package to 8.4.1"

* update yarn.lock

* Update grabpl (#45591) (#45596)

(cherry picked from commit 0a8c3f92f6)
(cherry picked from commit 787553ed31)

Co-authored-by: grafanabot <bot@grafana.com>
Co-authored-by: Andres Martinez Gotor <andres.martinez@grafana.com>
Co-authored-by: Andres Martinez Gotor <andres.mgotor@gmail.com>
Co-authored-by: Andrej Ocenas <mr.ocenas@gmail.com>
2022-02-21 12:41:38 +02:00
Grot (@grafanabot)
c70c590f39 Cloud Monitoring: set missing meta data for distribution type metrics (#45500) (#45658)
* set missing meta data for distribution type metrics

* add test

* add test

* simplify custom set

* add test for executedQueryString

* add test data

* fix tests

* check group by

(cherry picked from commit 0fb490c00d)

Co-authored-by: Mitsuhiro Tanda <mitsuhiro.tanda@gmail.com>
2022-02-21 11:37:28 +01:00
achatterjee-grafana
1ae1bc213d Deleting empty lines at list (#45610) (#45622)
Co-authored-by: lean.dev <34773040+leandro-deveikis@users.noreply.github.com>
2022-02-18 11:40:54 -05:00
Grot (@grafanabot)
62c6522b1b Fix: JSON parsing in backend_srv (#45598) (#45615)
* fix(plugins/state): console log errors during install / uninstall

* fix(backend_srv): catch JSON parse errors

Sometimes it can happen that a backend API responses says that it's
returning with a JSON content-type, however it actually returns an invalid
JSON (e.g. an empty body) - in which case the backendSrv() request errors out.

(cherry picked from commit 1e21184f65)

Co-authored-by: Levente Balogh <balogh.levente.hu@gmail.com>
2022-02-18 16:24:16 +01:00
Grot (@grafanabot)
238c5bc7ee Release: Bump version to 8.4.1 (#45603)
* "Release: Updated versions in package to 8.4.1"

* Update yarn.lock

Co-authored-by: Andrej Ocenas <mr.ocenas@gmail.com>
2022-02-18 14:05:07 +00:00
Grot (@grafanabot)
4991ca5f51 ReleaseNotes: Updated changelog and release notes for 8.4.1 (#45604) (#45606)
* ReleaseNotes: Updated changelog and release notes for 8.4.1

* Add alerting bugfix

Co-authored-by: Andrej Ocenas <mr.ocenas@gmail.com>
(cherry picked from commit 380e07ba29)
2022-02-18 14:45:44 +01:00
Andrej Ocenas
53f5c6a44c Merge pull request #258 from grafana/bump-version-8.4.1
Release: Bump version to 8.4.1
2022-02-18 12:14:07 +01:00
Dimitris Sotirakis
5407140306 Update grabpl (#45591) (#45596)
(cherry picked from commit 0a8c3f92f6)
(cherry picked from commit 787553ed31)
2022-02-18 12:57:17 +02:00
Dimitris Sotirakis
787553ed31 Update grabpl (#45591) (#45596)
(cherry picked from commit 0a8c3f92f6)
2022-02-18 12:49:24 +02:00
Andrej Ocenas
0a66eb3a8a update yarn.lock 2022-02-18 11:33:51 +01:00
grafanabot
468735b7a2 "Release: Updated versions in package to 8.4.1" 2022-02-18 10:18:25 +00:00
Andrej Ocenas
eb1e411991 Merge branch 'v8.4.x' of github.com:grafana/grafana into v8.4.x 2022-02-18 11:11:57 +01:00
Grot (@grafanabot)
3afbc685fc Docs: Update log level information and add tip (#45411) (#45506)
* Docs: Update conent for log level

* Add tip

(cherry picked from commit 123f095536)

Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
2022-02-18 11:00:53 +01:00
Dimitris Sotirakis
129734d1f5 Update grabpl (#45520) (#45527)
(cherry picked from commit af1691dbfb)
2022-02-18 10:50:52 +01:00
Grot (@grafanabot)
2443ddf518 AccessControl: Remove permissions on data source delete (#45504) (#45519)
* AccessControl: Remove permissions on datasource delete

* Ensure legacy behavior is preserved

(cherry picked from commit 47e248ceab)

Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com>
2022-02-18 10:50:34 +01:00
Grot (@grafanabot)
dc3dc215d8 Chore: avoid pointer events in viz tooltip (#45492) (#45494)
(cherry picked from commit 685ec5383e)

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2022-02-18 10:49:48 +01:00
Grot (@grafanabot)
fe7e1292cb Cloudwatch: Add support for AWS/PrivateLink* metrics and dimensions (#45515) (#45586)
Add support for AWS/PrivateLink{Endpoints,Interfaces} metrics and
dimensions. Change is based on the official AWS documentation[1].

1. https://docs.aws.amazon.com/vpc/latest/privatelink/privatelink-cloudwatch-metrics.html

(cherry picked from commit 929d8a358f)

Co-authored-by: Szymon Szypulski <szymon.szypulski@gmail.com>
2022-02-18 10:35:25 +01:00
Grot (@grafanabot)
80b8629f58 Data source insights: Switch from ID to UID (#45532) (#45580)
(cherry picked from commit 478efffce7)

Co-authored-by: Agnès Toulet <35176601+AgnesToulet@users.noreply.github.com>
2022-02-18 09:39:57 +01:00
Grot (@grafanabot)
0743f84f50 SQLStore: Fix migrator locking test for SQLite (#45523) (#45530)
* SQLStore: Fix migrator locking test for SQLite

(cherry picked from commit 17dee4700c)

Co-authored-by: Sofia Papagiannaki <1632407+papagian@users.noreply.github.com>
2022-02-18 10:03:14 +02:00
Grot (@grafanabot)
f1fe8a870b make send_alerts_to field nullable (#45572) (#45573)
* make send_alerts_to field nullable

* set nullable to true since we have a default value

(cherry picked from commit a9de33601c)

Co-authored-by: Santiago <santiagohernandez.1997@gmail.com>
2022-02-18 07:03:43 +01:00
Grot (@grafanabot)
5a3e45dd6c Added correct format. (#45562) (#45565)
(cherry picked from commit e29c38ae27)

Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
2022-02-17 15:21:21 -05:00
Grot (@grafanabot)
bbdad0fb27 Docs: Update 8.4 What's New (#45547) (#45561)
* replace * with

* Ran prettier check

* Revert "Ran prettier check"

This reverts commit 32be986af8.

* Ran prettier check again.

* Added backticks.

(cherry picked from commit 912464a073)

Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
2022-02-17 14:13:06 -05:00
Grot (@grafanabot)
3384269133 Cloudwatch: Fix bug with onblur in Metric Search (#45488) (#45557)
(cherry picked from commit 85753afdf0)

Co-authored-by: Sarah Zinger <sarahzinger@users.noreply.github.com>
2022-02-17 13:52:01 -05:00
Grot (@grafanabot)
2a35b4fcef Tempo: Switch out Select with AsyncSelect component to get loading state in Tempo Search (#45110) (#45554)
* Replace Select with AsyncSelect to get loading state

(cherry picked from commit fcd85951a7)

Co-authored-by: Cat Perry <000.perry@gmail.com>
2022-02-17 09:57:16 -08:00
Andrej Ocenas
d5e0ba2e43 Udpate latest.json (#45548) (#45551)
(cherry picked from commit 4fcbfab711)
2022-02-17 18:06:40 +01:00
Grot (@grafanabot)
f3c1c06753 ReleaseNotes: Updated changelog and release notes for 8.4.0 (#45531) (#45540)
* ReleaseNotes: Updated changelog and release notes for 8.4.0

* Apply suggestions from code review

* Apply suggestions from code review

* Apply suggestions from code review

Co-authored-by: Andrej Ocenas <mr.ocenas@gmail.com>
(cherry picked from commit 23144fbcad)
2022-02-17 17:34:30 +01:00
Grot (@grafanabot)
4dec7e8387 Release: Bump version to 8.4.0 (#45529)
* "Release: Updated versions in package to 8.4.0"

* update lockfile

Co-authored-by: Andrej Ocenas <mr.ocenas@gmail.com>
2022-02-17 17:23:23 +01:00
Connor Lindsey
f4566647bf [v8.4.x] Chore: Clean up logs and deprecated library in tracing tests (#45486) (#45544)
* Chore: Clean up logs and deprecated library in tracing tests (#45486)

* Fix logs and errors from tracing tests

* Refactor SpanBar to remove recompose

* Fix NodeGraph tests

(cherry picked from commit 6e07b30048)
2022-02-17 17:10:23 +01:00
Andrej Ocenas
50c883a346 Docs: Update publish.yml for 8.4.0 (#45542) 2022-02-17 17:02:29 +01:00
Dan Cech
077f4c3079 Configuration: Add ability to customize okta login button name and icon (#44079) (#45483)
* add ability to customize okta login button name and icon

* update configs, add basic frontend test

* add icon to oauth settings type

* trigger tests

* fix typecheck

(cherry picked from commit 51cd6f3cc5)
2022-02-17 09:55:34 -05:00
Grot (@grafanabot)
8789c6b2ae Feature Highlights: add RS event for nav items (#45470) (#45521)
(cherry picked from commit 8835020457)

Co-authored-by: Agnès Toulet <35176601+AgnesToulet@users.noreply.github.com>
2022-02-17 15:25:06 +01:00
Will Browne
bd0ff79e28 Plugins: Add ability to enable debug logging per plugin (#45481)
* use plugin ID in logger name

* retrigger
2022-02-16 17:49:16 +01:00
Andrej Ocenas
e6728d1434 Merge pull request #255 from grafana/bump-version-8.4.0
Release: Bump version to 8.4.0
2022-02-16 17:08:58 +01:00
Andrej Ocenas
6cd56ee459 Update yarn.lock 2022-02-16 16:38:48 +01:00
grafanabot
2d7625ac1b "Release: Updated versions in package to 8.4.0" 2022-02-16 15:24:39 +00:00
Andrej Ocenas
37c34c6d5b Merge branch 'v8.4.x' of github.com:grafana/grafana into v8.4.x 2022-02-16 16:11:07 +01:00
Grot (@grafanabot)
3179d548bb Alerting: Fix updating notification channels in legacy (#45302) (#45331)
The problem here is that without the orgID we ignore the lookup of the existing notification channel just before updating and end up failing the update because there is no channel available.

(cherry picked from commit 8bf2e642aa)

Co-authored-by: gotjosh <josue.abreu@gmail.com>
2022-02-16 13:35:39 +00:00
Grot (@grafanabot)
5b73b4e070 Analytics: Collect information about queries reordering (#45392) (#45465)
(cherry picked from commit 8bb3de3037)

Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
2022-02-16 14:30:35 +01:00
Grot (@grafanabot)
122f8b257d remove whitespace from ${__value.raw } (#44928) (#45176)
(cherry picked from commit 7ef43fb959)

Co-authored-by: matt abrams <37156449+zuchka@users.noreply.github.com>
2022-02-16 14:13:06 +01:00
Grot (@grafanabot)
48e5624095 Loki: Use explore query field unless new query builder feature toggle is enabled (#44858) (#44901)
* Loki: Fix using of Explore editor in Explore

* Add test and remove Explore fields in module

* Update tests

(cherry picked from commit e7a0e69153)

Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
2022-02-16 14:04:39 +01:00
Grot (@grafanabot)
7c079483eb Update changelog for 8.3.5 and 7.5.15 (#45078) (#45084)
(cherry picked from commit b2a8487684)

Co-authored-by: Dimitris Sotirakis <sotirakis.dim@gmail.com>
2022-02-16 13:53:17 +01:00
Grot (@grafanabot)
2932cc8ec8 [docs] Clarify legacy alerting deprecation (#44759) (#44817)
* Clarify legacy alerting deprecation

* Lint Markdown

(cherry picked from commit 8c6a5f043a)

Co-authored-by: Armand Grillet <2117580+armandgrillet@users.noreply.github.com>
2022-02-16 13:51:37 +01:00
Grot (@grafanabot)
c630e0ce4f Update docs library element http api (#44493) (#44812)
(cherry picked from commit 16f0c6617a)

Co-authored-by: JM <justintmai@gmail.com>
2022-02-16 13:51:08 +01:00
Grot (@grafanabot)
1308e19197 Explore: avoid locking timepicker when range is inverted (#44790) (#44841)
* Explore: avoid locking timepicker when range is inverted

* Explore: prevent time picker to lock if from & to search parameters are present

(cherry picked from commit 6415b9a54d)

Co-authored-by: Giordano Ricci <me@giordanoricci.com>
2022-02-16 13:48:47 +01:00
Grot (@grafanabot)
a682943b24 QueryEditor: Fix setting panel state to done if query had no error (#45453) (#45456)
(cherry picked from commit da91c93f4a)

Co-authored-by: Zoltán Bedi <zoltan.bedi@gmail.com>
2022-02-16 11:59:55 +01:00
Grot (@grafanabot)
fd83e14400 QueryEditor: Fix crash in angular panels when query have error (#45422) (#45448)
(cherry picked from commit befb2afccc)

Co-authored-by: Zoltán Bedi <zoltan.bedi@gmail.com>
2022-02-16 11:44:48 +01:00
Grot (@grafanabot)
19a88b3e6f Fix notification routes editing when filters are applied (#45380) (#45450)
* Fix route editing when filters are applied

* Fix route delete operation, reset expanded item when filters change

* Refactor edit and delete functions, add tests

* Fix comment

(cherry picked from commit 1886a59a12)

Co-authored-by: Konrad Lalik <konrad.lalik@grafana.com>
2022-02-16 11:37:25 +01:00
Sofia Papagiannaki
3d2fbcba2d [8.4.x]: SQLStore: Prevent concurrent migrations (#44101) (#45447)
* SQLStore: Prevent concurrent migrations (#44101)

* SQLStore: Prevent concurrent migrations

* Hide behind a feature toggle

* Configurable locking attempt timeout

* Update docs/sources/administration/configuration.md

Co-authored-by: Igor Suleymanov <radiohead@users.noreply.github.com>
Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
(cherry picked from commit d718ee1918)

* Resolve dependency cycle (#45427)

(cherry picked from commit 6a38ce2307)
2022-02-16 11:23:54 +02:00
Dimitris Sotirakis
e43e5c3c42 CI: Remove manual gcloud authentication (#44986) (#45444)
* Remove manual gcloud auth from store-packages

* Update grabpl

(cherry picked from commit 163b570f5d)
2022-02-16 09:45:50 +01:00
Jack Westbrook
67fc8ecbe3 Toolkit: Bump react-dev-utils to 12.0.0 (#44696) (#45408)
* chore: bump react-dev-utils due to vulnerbility reports

* chore(yarn): update checksum, remove react-dev-utils packageExtensions

(cherry picked from commit b409811005)
2022-02-16 10:30:08 +02:00
Grot (@grafanabot)
709b49fdc8 Highlights: fix RS event name (#45436) (#45441)
(cherry picked from commit 39797e33ae)

Co-authored-by: Agnès Toulet <35176601+AgnesToulet@users.noreply.github.com>
2022-02-16 09:03:10 +01:00
Ieva
6fdb1d0440 merge (#45413) 2022-02-15 18:27:11 +01:00
Grot (@grafanabot)
f0f4348aa5 AccessControl: Enable empty list New button based on user permissions (#45398) (#45402)
(cherry picked from commit d11f6a95a4)

Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com>
2022-02-15 16:36:51 +01:00
Grot (@grafanabot)
eeab540874 CloudWatch: Add tests to annotations query (#45337) (#45391)
(cherry picked from commit 1c1a45a880)

Co-authored-by: Shirley <4163034+fridgepoet@users.noreply.github.com>
2022-02-15 15:47:45 +01:00
Grot (@grafanabot)
47c3f21c26 Tempo: Update service graph linked queries to use rate_interval and group histogram (#45248) (#45403)
(cherry picked from commit 3da0434e64)

Co-authored-by: Connor Lindsey <cblindsey3@gmail.com>
2022-02-15 15:32:40 +01:00
Grot (@grafanabot)
b00b61f565 AccessControl: Trigger permission reload with team removal (#45383) (#45397)
(cherry picked from commit 91dd0563c9)

Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com>
2022-02-15 14:35:37 +01:00
Grot (@grafanabot)
f5c43af76a Alerting: do not unescape external AM label values (#45334) (#45394)
(cherry picked from commit 651bb773db)

Co-authored-by: Gilles De Mey <gilles.de.mey@gmail.com>
2022-02-15 14:08:18 +01:00
Grot (@grafanabot)
382600c9eb Init node item (#45218) (#45323)
(cherry picked from commit 574f609550)

Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>
2022-02-12 11:21:59 +02:00
Grot (@grafanabot)
099e6ee22d Documentation for teams with FGAC (#45321) (#45336)
* docs for teams with FGAC

* Update docs/sources/enterprise/access-control/fine-grained-access-control-references.md

Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com>

Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com>
(cherry picked from commit 9ac4843df1)

Co-authored-by: Ieva <ieva.vasiljeva@grafana.com>
2022-02-11 18:11:28 +01:00
Ieva
3a04080972 merge (#45335)
Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com>
2022-02-11 18:02:50 +01:00
Grot (@grafanabot)
16870af3e8 Docs: Update whats new in 8.4 (#45289) (#45316)
Changed the swagger ui feature flag to the actual feature flag.

(cherry picked from commit 77a0a71929)

Co-authored-by: Zoltán Bedi <zoltan.bedi@gmail.com>
2022-02-11 09:41:55 -05:00
Grot (@grafanabot)
3af0331022 Update access_controls.md: Add global to documented query parameter for deleting custom roles. (#40167) (#45270)
* Update access_controls.md

Update the parameter table for deleting custom roles to make it explicit that the `global` query parameter is handled by this endpoint/should be specified when deleting a globally-scoped role.

* Update docs/sources/http_api/access_control.md

Co-authored-by: Karl Persson <kalle.persson92@gmail.com>
Co-authored-by: achatterjee-grafana <aparajita.chatterjee@grafana.com>
(cherry picked from commit 1239911b5b)

Co-authored-by: Roberto Acevedo <rxacevedo@users.noreply.github.com>
2022-02-11 08:48:16 -05:00
Grot (@grafanabot)
1edb8f0a5d Postgres/MySQL/MSSQL: Remove usage of legacy timeSrv (#45241) (#45293)
(cherry picked from commit 0e8a5407d1)

Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
2022-02-11 13:47:46 +01:00
Grot (@grafanabot)
18056a148c Alerting: support ok state in alert migration (#45264) (#45267)
(cherry picked from commit c59567a236)

Co-authored-by: Yuriy Tseretyan <yuriy.tseretyan@grafana.com>
2022-02-11 13:39:37 +01:00
Grot (@grafanabot)
a7f0fb5052 Angular: Add AngularJS plugin support deprecation plan to docs site (#45149) (#45287)
* Angular: Add AngularJS plugin support deprecation plan to docs site

* Updated wording

* Update

* Update docs/sources/developers/angular_deprecation.md

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

* Update docs/sources/developers/angular_deprecation.md

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

* Update docs/sources/developers/angular_deprecation.md

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

* Update docs/sources/developers/angular_deprecation.md

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

* Update docs/sources/developers/angular_deprecation.md

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

* Update docs/sources/developers/angular_deprecation.md

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

Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
(cherry picked from commit fed112ef3b)

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
2022-02-11 12:46:47 +01:00
Grot (@grafanabot)
32ce82b874 loki: add logs-volume documentation (#45283) (#45285)
(cherry picked from commit 29d48a503c)

Co-authored-by: Gábor Farkas <gabor.farkas@gmail.com>
2022-02-11 12:20:07 +01:00
Grot (@grafanabot)
0a9406b26c loki: enable-by-default the full-range-logs-volume feature (try2) (#45246) (#45280)
* loki: enable-by-default the full-range-logs-volume feature

* add explanation comment

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>

* fixed invalid code

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
(cherry picked from commit 4a7cc3e0f0)

Co-authored-by: Gábor Farkas <gabor.farkas@gmail.com>
2022-02-11 12:13:11 +01:00
Grot (@grafanabot)
527e5bb6f8 LibraryPanels: Prevent long descriptions and names from obscuring the delete button (#45190) (#45284)
* fix library panel description wrapping

* make panel name wrap

(cherry picked from commit 8c47373d74)

Co-authored-by: matt abrams <37156449+zuchka@users.noreply.github.com>
2022-02-11 12:09:47 +01:00
Grot (@grafanabot)
3e351914fd Cloudwatch: Remove unused parameters (#45237) (#45251)
* Remove unused parameters

* Remove unused context

* Make plugin context first parameter

(cherry picked from commit 89a0c0fc37)

Co-authored-by: Shirley <4163034+fridgepoet@users.noreply.github.com>
2022-02-11 11:20:29 +01:00
Grot (@grafanabot)
f5212e4d5a Access control: team UI improvements with FGAC (#45255) (#45277)
* show teams page for user who can't list teams but can create teams

* Fixing buttons and routes

* Small refactor

Co-authored-by: gamab <gabi.mabs@gmail.com>
(cherry picked from commit 6fb3aac2e1)

Co-authored-by: Ieva <ieva.vasiljeva@grafana.com>
2022-02-11 11:09:54 +01:00
Grot (@grafanabot)
6c0652989f TablePanel: Do not prefix columns with frame name if multiple frames and override active (#45174) (#45276)
* Fix bug where table panel shows column names prefixed with frame name

* simplify && fix tests

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
(cherry picked from commit a12f2e1d19)

Co-authored-by: Victor Marin <36818606+mdvictor@users.noreply.github.com>
2022-02-11 11:00:12 +01:00
Grot (@grafanabot)
a5637bd2ac Fix issue with undo history in query field when suggestion inserted (#28656) (#39114) (#45272)
(cherry picked from commit 4d0a37baed)

Co-authored-by: Alexander Kubyshkin <i.am.glint@gmail.com>
2022-02-11 09:46:04 +01:00
Grot (@grafanabot)
162466cad4 Update geomap.md (#43527) (#45269)
(cherry picked from commit d97e74d80f)

Co-authored-by: JJgitGit <JJgitGit@users.noreply.github.com>
2022-02-10 17:51:03 -05:00
Grot (@grafanabot)
c897372237 Thresholds: fix crash when trying to render zero-height base thresholds (#45256) (#45258)
(cherry picked from commit 586b89f776)

Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
2022-02-10 19:00:44 +01:00
Grot (@grafanabot)
843c1c71d9 Fetch: parse JSON off-main-thread (async) based on response Content-Type (#45188) (#45257)
(cherry picked from commit 9af6202a7f)

Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
2022-02-10 18:57:26 +01:00
Grot (@grafanabot)
8d60ca53c5 Access control: Support uids for resource permissions (#45226) (#45254)
* add middleware to solve uid -> id for requests

(cherry picked from commit d2b9da9dde)

Co-authored-by: Karl Persson <kalle.persson@grafana.com>
2022-02-10 18:05:15 +01:00
Grot (@grafanabot)
0aac670de0 order subscriptions by name (#45228) (#45234)
(cherry picked from commit 57ecabf319)

Co-authored-by: Erik Sundell <erik.sundell87@gmail.com>
2022-02-10 16:14:52 +01:00
Grot (@grafanabot)
57fa05501b add the permission to read org users to team creator (#45224) (#45245)
(cherry picked from commit 9fafbfc87e)

Co-authored-by: Ieva <ieva.vasiljeva@grafana.com>
2022-02-10 15:02:16 +00:00
Grot (@grafanabot)
232fdd195a Unescape regex string (#45137) (#45244)
(cherry picked from commit ec48b81388)

Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2022-02-10 15:57:56 +01:00
Gabriel MABILLE
e6d0f5367f AccessControl: Implement SQL filters for team members filtering (#44898) (#45219)
* AccessControl: Filter team members

* Modify GetTeamMembersByUser comment

* Fix postgres failing test due to quoting

* Rename GetTeamMembersByUser to GetUserTeamMemberships

* Update TeamStore interface

(cherry picked from commit 78fc0258b1)
2022-02-10 15:49:02 +01:00
Grot (@grafanabot)
82fc75cacc test (#45240) (#45243)
(cherry picked from commit fd5e968bc1)

Co-authored-by: Will Browne <wbrowne@users.noreply.github.com>
2022-02-10 15:35:51 +01:00
Grot (@grafanabot)
ef9779c4c3 Popovers: Improve contrast by darkening shadow and changing border to medium (#45136) (#45229)
* Popovers: Improve contrast by darkening shadow and changing border to medium

* Updated sass theme

* Revert back to weak border

(cherry picked from commit 374681b546)

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
2022-02-10 15:14:05 +01:00
Grot (@grafanabot)
bab2f84155 Logging: Fix server hangs when using log.WithSuffix (#45213) (#45223)
Fixes a problem where server hangs if setting
GF_DATABASE_LOG_QUERIES=true.

Ref #44925

(cherry picked from commit ca311bf94f)

Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
2022-02-10 13:02:47 +01:00
Grot (@grafanabot)
0ff1be7ccc Adjust menu positioning (#45217) (#45222)
(cherry picked from commit e48baefd32)

Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2022-02-10 13:02:15 +01:00
Grot (@grafanabot)
3fda778e6d Chore: Remove menuShouldPortal deprecation warning (#45211) (#45221)
* Chore: Remove Select deprecation

* remove unused import

* Update lockfile

(cherry picked from commit 947b8b8d3b)

Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2022-02-10 12:58:19 +01:00
Gabriel MABILLE
4c55c450c3 AccessControl: SQL filters for team search (#44557) (#45200)
* AccessControl: SQL filters for team search

Set test config

* Remove userIdFilter when FGAC is on

(cherry picked from commit 01b88adb3a)
2022-02-10 10:45:40 +01:00
Grot (@grafanabot)
6c370d7d66 Cloudwatch: Use generic null-insertion mechanism (#43507) (#45204)
* Cloudwatch: Fix nil values for a period gap in metrics

* Use fields periods for intervals

(cherry picked from commit 5edcc2e795)

Co-authored-by: Shirley <4163034+fridgepoet@users.noreply.github.com>
2022-02-10 10:31:21 +01:00
Grot (@grafanabot)
90316bedee Logging: Fix so that filters can contain commented lines (#45159) (#45202)
Fixes log filters that contains comments should not be enabled

(cherry picked from commit 2082eeb72f)

Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
2022-02-10 10:10:43 +01:00
Grot (@grafanabot)
7b67b1c961 Revert fixed roles and service accounts (#44778) (#44818)
* Revert fixed roles and service accounts

* Leave the fixed role for service accounts

(cherry picked from commit f38f10416a)

Co-authored-by: Vardan Torosyan <vardants@gmail.com>
2022-02-09 21:01:30 +01:00
Vardan Torosyan
ff8e53a347 Security: Sync security changes on main (#45083) (#45140)
* Security: Sync security changes on main (#45083)

* * Teams: Appropriately apply user id filter in /api/teams/:id and /api/teams/search
* Teams: Ensure that users searching for teams are only able see teams they have access to
* Teams: Require teamGuardian admin privileges to list team members
* Teams: Prevent org viewers from administering teams
* Teams: Add org_id condition to team count query
* Teams: clarify permission requirements in teams api docs
* Teams: expand scenarios for team search tests
* Teams: mock teamGuardian in tests

Co-authored-by: Dan Cech <dcech@grafana.com>

* remove duplicate WHERE statement

* Fix for CVE-2022-21702

(cherry picked from commit 202d7c190082c094bc1dc13f7fe9464746c37f9e)

* Lint and test fixes

(cherry picked from commit 3e6b67d5504abf4a1d7b8d621f04d062c048e981)

* check content type properly

(cherry picked from commit 70b4458892bf2f776302720c10d24c9ff34edd98)

* basic csrf origin check

(cherry picked from commit 3adaa5ff39832364f6390881fb5b42ad47df92e1)

* compare origin to host

(cherry picked from commit 5443892699e8ed42836bb2b9a44744ff3e970f42)

* simplify url parsing

(cherry picked from commit b2ffbc9513fed75468628370a48b929d30af2b1d)

* check csrf for GET requests, only compare origin

(cherry picked from commit 8b81dc12d8f8a1f07852809c5b4d44f0f0b1d709)

* parse content type properly

(cherry picked from commit 16f76f4902e6f2188bea9606c68b551af186bdc0)

* mentioned get in the comment

(cherry picked from commit a7e61811ef8ae558ce721e2e3fed04ce7a5a5345)

* add content-type: application/json to test HTTP requests

* fix pluginproxy test

* Fix linter when comparing errors

Co-authored-by: Kevin Minehart <kmineh0151@gmail.com>
Co-authored-by: Dan Cech <dcech@grafana.com>
Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
Co-authored-by: Serge Zaitsev <serge.zaitsev@grafana.com>
Co-authored-by: Vardan Torosyan <vardants@gmail.com>
(cherry picked from commit 605d056136)

* Apply suggestions from code review

* remove uneeded test fix from patch

Co-authored-by: Dimitris Sotirakis <sotirakis.dim@gmail.com>
Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
Co-authored-by: jguer <joao.guerreiro@grafana.com>
2022-02-09 20:43:42 +01:00
Grot (@grafanabot)
1f1d599815 API: Fix missing enterprise routes in swagger spec (#45152) (#45156)
(cherry picked from commit 2983082eb3)

Co-authored-by: Sofia Papagiannaki <1632407+papagian@users.noreply.github.com>
2022-02-09 15:43:21 +01:00
Grot (@grafanabot)
24411c633c Provisioning: Ensure that the default value for orgID is set when provisioning datasources to be deleted (#44244) (#45130)
Fixes #44243

Signed-off-by: Maicon Costa <maiconscosta@gmail.com>
(cherry picked from commit 8e03541228)

Co-authored-by: maicon <maiconscosta@gmail.com>
2022-02-09 12:55:21 +01:00
Grot (@grafanabot)
5aef9ffb19 logs-volume: remove custom timeout (#45041) (#45085)
* logs-volume: remove custom timeout

* make error message a little better

(cherry picked from commit 2c0030b1b4)

Co-authored-by: Gábor Farkas <gabor.farkas@gmail.com>
2022-02-09 12:01:47 +01:00
Grot (@grafanabot)
f8b27f44c0 Feature Highlights: add RudderStack events (#45099) (#45126)
* add RS events for PRO badge

* part 2

* fix team sync events

* clean up ProBadge

(cherry picked from commit ee6f8b6cd9)

Co-authored-by: Agnès Toulet <35176601+AgnesToulet@users.noreply.github.com>
2022-02-09 11:31:16 +01:00
Grot (@grafanabot)
82b20b7c43 Remove unified alerting specific assertions from panel base spec (#44961) (#45047)
(cherry picked from commit e50a78a61a)

Co-authored-by: Konrad Lalik <konrad.lalik@grafana.com>
2022-02-09 10:54:10 +01:00
Grot (@grafanabot)
daf7c5fe93 Add context.Context to AlertingStore (#45069) (#45121)
(cherry picked from commit 4e3a72fc2a)

Co-authored-by: George Robinson <george.robinson@grafana.com>
2022-02-09 09:40:05 +00:00
Grot (@grafanabot)
0680dff343 Update Storybook updates to v6.4.15 (#44586) (#44972)
* Update Storybook updates to v6.4.15

* revert(storybook): remove webpack process resolution as 6.4.14 patched it

* chore(yarn): update packageExtensions for storybook bump

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com>
(cherry picked from commit 08ee093dfe)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-02-09 10:31:24 +01:00
Grot (@grafanabot)
87dfe0a523 Docs: Added what's new for 8.4 (#45108) (#45111)
* Checking in changes from gdoc.

* New more changes.

* Added links to images.

* Added 8-4 link to the What's new index page.

(cherry picked from commit 065819b707)

Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
2022-02-08 18:00:35 -05:00
Grot (@grafanabot)
66b1f6722f BarChart: fix excessive re-renders during mousemove and panel resize (#45027) (#45109)
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
(cherry picked from commit b3b1f945b0)

Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
2022-02-08 16:56:42 -06:00
Grot (@grafanabot)
bcff7ec68f Alerting: remove error banner when Prometheus ruler is not supported (#44571)
(cherry picked from commit 3d0cff5410)

Co-authored-by: Roy C <crosscent@gmail.com>
2022-02-08 22:27:44 +01:00
Grot (@grafanabot)
66f9e505e7 Access control: hide team role picker if user doesn't have access to it (#45068) (#45095)
* hide team role column

* hide or disable the role picker as needed

* add SWL filtering for role listing

(cherry picked from commit 4f4b1cb5ea)

Co-authored-by: Ieva <ieva.vasiljeva@grafana.com>
2022-02-08 17:55:02 +01:00
Grot (@grafanabot)
da3c22d3be Alerting: Improve Contact Points error handling (#44888) (#45092)
(cherry picked from commit 1cf48618de)

Co-authored-by: Konrad Lalik <konrad.lalik@grafana.com>
2022-02-08 17:23:15 +01:00
Grot (@grafanabot)
4697ef8b81 TimeSeries: Add support for negative Y and constant transform (#44774) (#45087)
* add negative y config

* Handle negative y and constant transform in Timeseries panel

* Typechecks

* Add migration from old graph panel

* Docs update

* Revert "Add migration from old graph panel"

This reverts commit 33b5a90b66.

* Revert VizLegendItem changes

* Automatically separate positive and negative stacks within a group

* Update packages/grafana-ui/src/components/VizLegend/VizLegend.story.tsx

* Remove SeriesLabel component

* Update docs/sources/visualizations/time-series/_index.md

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

* Update docs/sources/visualizations/time-series/_index.md

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

* Leftover reverts

* Don't crate bands (for now0 for negative -y stack

* Add docs note about transform being only available as an override

* Fill negative bands in reversed direction

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
(cherry picked from commit ffea53f2f6)

Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
2022-02-08 07:46:48 -08:00
Grot (@grafanabot)
b07267f3e3 use correct version (#45076) (#45080)
(cherry picked from commit f691902949)

Co-authored-by: Will Browne <wbrowne@users.noreply.github.com>
2022-02-08 16:16:43 +01:00
Grot (@grafanabot)
fb3d542562 Auth: Guarantee consistency of signed SigV4 headers (#45054) (#45075)
* use latest sigv4 changes

* update configuration docs

* lint

* reformat lint ignore

* specific version for docs

(cherry picked from commit fc42dfe396)

Co-authored-by: Will Browne <wbrowne@users.noreply.github.com>
2022-02-08 15:54:38 +01:00
Grot (@grafanabot)
62a3b5a94d Add context.Context to InstanceStore (#45049) (#45065)
(cherry picked from commit 67a3e1d6fd)

Co-authored-by: George Robinson <george.robinson@grafana.com>
2022-02-08 15:08:36 +01:00
Gabriel MABILLE
dca648f034 AccessControl: Use an SQLFilter struct (#44887) (#44999)
(cherry picked from commit 178193c84b)
2022-02-08 14:59:49 +01:00
George Robinson
8291389f6c Alerting: Add context.Context to RuleStore (#45004) (#45046) 2022-02-08 13:48:15 +00:00
Grot (@grafanabot)
3fdbc461f1 Chore: uPlot 1.6.19 (#45037) (#45044)
(cherry picked from commit d0bc3b10bf)

Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
2022-02-08 05:35:29 -08:00
Grot (@grafanabot)
08ad99c36e API: Extract OpenAPI specification from source code using go-swagger (#40528) (#45061)
* API: Using go-swagger for extracting OpenAPI specification from source code

* Merge Grafana Alerting spec

* Include enterprise endpoints (if enabled)

* Serve SwaggerUI under feature flag

* Fix building dev docker images

* Configure swaggerUI

* Add missing json tags

Co-authored-by: Ying WANG <ying.wang@grafana.com>
Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
(cherry picked from commit 35fe58de37)
2022-02-08 13:52:05 +01:00
Grot (@grafanabot)
c6a58003d1 Chore: Make detect breaking changes workflow backport compatible (#45005) (#45052)
* fix(detect-breaking-changes): use the base.ref for backport compatibility

* chore(check-breaking-changes): update path to previous package dist directory

(cherry picked from commit f885c2ede9)

Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com>
2022-02-08 12:17:38 +01:00
Grot (@grafanabot)
eb666f12a7 Feature Highlights: Refactor report nav highlight (#44765) (#45039)
* Remove UpgradeBox from report nav

* Add children prop

* Update icon

* Update styles

* Update text

* Add pro badge to main nav

* Remove redundant span

* Update secondaryAction

(cherry picked from commit d21abdfe77)

Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>
2022-02-08 10:36:45 +02:00
Grot (@grafanabot)
4f21d4dabe LibraryPanels: Removes save errors for panels changed to library panels (#45033) (#45035)
(cherry picked from commit 9e1cb8c12a)

Co-authored-by: Hugo Häggmark <hugo.haggmark@gmail.com>
2022-02-08 07:56:42 +01:00
Grot (@grafanabot)
836168eb13 BarChart: Fix Sticky Tooltip (#45017) (#45019) 2022-02-07 23:46:04 +01:00
Grot (@grafanabot)
c4da73ce4d CI: Remove grafana/drone-grafana-docker image (#44983) (#45011)
* Remove grafana/drone-grafana-docker image

* Rename step

* Remove manual gcloud authentication

(cherry picked from commit 329b1a1ef3903c7e2c3ec1f286f9b0f00fcd023e)

* Add publish command for main

* Fix TAG variable parsing

* Remove shouldSave from main builds

* Reorder dependencies

* Update grabpl version

(cherry picked from commit 5543ad883d)

Co-authored-by: Dimitris Sotirakis <sotirakis.dim@gmail.com>
2022-02-07 19:19:27 +01:00
Grot (@grafanabot)
d9eb80f7f5 Feature Highlights: add highlight to toolbar button and add upgrade modal (#44645) (#44998)
* Feature Highlights: add highlight to toolbar button and add upgrade modal

* replace hideTitle attribute by making title optional

* update modal design

* remove unused updates

(cherry picked from commit bdac6576e4)

Co-authored-by: Agnès Toulet <35176601+AgnesToulet@users.noreply.github.com>
2022-02-07 16:18:21 +01:00
Grot (@grafanabot)
6459fd73ed Chore: Logging improvements (#44925) (#44996)
Fixing a couple bugs, adds some tests and hopefully decrease
lock contention when logging.
Switching from using sync.RWMutex to go-kit SwapLogger.
Fixes bug when creating a new logger from an existing one that
screwed up the keyvals and/or lost the logger name.

Ref #44681

(cherry picked from commit 05ea825c76)

Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
2022-02-07 16:15:14 +01:00
Grot (@grafanabot)
be7782032e [v8.4.x] CI: Update GCP_GRAFANA_UPLOAD_KEY var name (#44964)
* CI: Update `GCP_GRAFANA_UPLOAD_KEY` var name (#44303)

* Update GCP_KEY var name

* Rename GCP_GRAFANA_UPLOAD_KEY for upload-packages

* Update grabpl

(cherry picked from commit f96a6c10c5)

* Update upload-cdn command args (#44966)

(cherry picked from commit 67225d9cfc)

Co-authored-by: Dimitris Sotirakis <sotirakis.dim@gmail.com>
2022-02-07 12:47:17 +01:00
Grot (@grafanabot)
206b447a37 Deprecation: use locationService in favor of getLocationSrv (#44813) (#44963)
* deprecated

* updating documentation.

* added deprecation notice.

* Replacing deprecated getLocationSrv.

* Update docs/sources/developers/plugins/migration-guide.md

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

* Update docs/sources/developers/plugins/migration-guide.md

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

* Update docs/sources/developers/plugins/migration-guide.md

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

* Update docs/sources/developers/plugins/migration-guide.md

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

* updating according to feedback.

* Update docs/sources/developers/plugins/migration-guide.md

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

* Update docs/sources/developers/plugins/migration-guide.md

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

Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
(cherry picked from commit eb9d85a2bf)

Co-authored-by: Marcus Andersson <marcus.andersson@grafana.com>
2022-02-07 10:06:42 +01:00
Grot (@grafanabot)
32198a472f BarChart: Add support for data links (#44932) (#44943)
(cherry picked from commit 3a2e3267ba)

Co-authored-by: Nathan Marrs <nathanielmarrs@gmail.com>
2022-02-04 18:50:20 -08:00
Grot (@grafanabot)
bfd38ece7e StateTimeline: add spanNulls editor (#44811) (#44938)
(cherry picked from commit b07345e57e)

Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
2022-02-05 00:16:23 +01:00
Grot (@grafanabot)
ce185ce6a3 Fix evaluation of alert rules for datasources with custom headers (#44862) (#44912)
* Fix evaluation of alert rules for datasources with custom headers

* Fix unit tests

* Fix integration tests

* Evaluator fields should be package private

(cherry picked from commit 9df43abbb5)

Co-authored-by: George Robinson <george.robinson@grafana.com>
2022-02-04 18:32:57 +01:00
Grot (@grafanabot)
cc9d96e1dc Access control: Reduce number of API calls for role picker (#44905) (#44908)
* Restucture state for TeamRolePicker and UserRolePicker

Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>
(cherry picked from commit 3cf31451ec)

Co-authored-by: Karl Persson <kalle.persson@grafana.com>
2022-02-04 15:17:39 +01:00
Grot (@grafanabot)
d18f53977f Alerting: validate namespace and groupname for Grafana manages and Lotex alerts (#44872) (#44910)
(cherry picked from commit 1680e284e5)

Co-authored-by: Gilles De Mey <gilles.de.mey@gmail.com>
2022-02-04 15:15:35 +01:00
Grot (@grafanabot)
6295ce8149 Improve prettier:check output (#44816) (#44844)
(cherry picked from commit a943bf9963)

Co-authored-by: Armand Grillet <2117580+armandgrillet@users.noreply.github.com>
2022-02-04 13:22:12 +01:00
Grot (@grafanabot)
63b7770220 Accessibility: Fix text selection when using FocusScope (#44770) (#44902)
* Add tabIndex={-1} to places using focusScope to allow for text highlighting

* use useDialog

* don't need explicit tabIndex anymore

* remove duplicate spreading of props

(cherry picked from commit 9e52361c1e)

Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2022-02-04 12:38:39 +01:00
Grot (@grafanabot)
6671367781 Alerting: add custom grouping to Alert Panel (#44559) (#44873)
Co-authored-by: Peter Holmberg <peterholmberg@users.noreply.github.com>
(cherry picked from commit c1a0c2664c)

Co-authored-by: Gilles De Mey <gilles.de.mey@gmail.com>
2022-02-03 19:32:10 +01:00
Grot (@grafanabot)
53313e4a2d Logging: Fix don't return an error trying to initialize the file logger (#42952) (#44867)
Fixes #42897

Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
(cherry picked from commit 7f2d3055d8)

Co-authored-by: bolshoytoster <91278344+bolshoytoster@users.noreply.github.com>
2022-02-03 18:58:07 +01:00
Grot (@grafanabot)
6909246a7a AccessControl: Change teams permissions page when accesscontrol is enabled (#43971) (#44864)
* AccessControl: Change teams permissions page when frontend is hit

* Implement frontend changes for group sync

* Changing the org/teams/edit permissions

Co-authored-by: ievaVasiljeva <ieva.vasiljeva@grafana.com>

* Fixing routes

Co-authored-by: ievaVasiljeva <ieva.vasiljeva@grafana.com>

* Use props straight away no need to go through the state

Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>

* Update public/app/features/teams/TeamPages.tsx

Co-authored-by: ievaVasiljeva <ieva.vasiljeva@grafana.com>
Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>
(cherry picked from commit 8217d6d206)

Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com>
2022-02-03 18:00:38 +01:00
Grot (@grafanabot)
ee54923bdd Chore: Update latest.json (#44854) (#44859)
(cherry picked from commit 53a693fd84)

Co-authored-by: Andres Martinez Gotor <andres.martinez@grafana.com>
2022-02-03 17:37:00 +01:00
Grot (@grafanabot)
2b516126cf Prometheus: Fix Azure authentication support (#44407) (#44861)
Re-adding back Azure authentication support to Prometheus datasource
after the datasource query logic was rewritten from plugin.json routes to
Go backend.

Ref #35857

(cherry picked from commit 85ea1a5d64)

Co-authored-by: Sergey Kostrukov <sekost@microsoft.com>
2022-02-03 17:27:57 +01:00
Grot (@grafanabot)
ae33b9fce9 AccessControl: Show UserPicker based on canListUsers (#44843) (#44860)
* AccessControl: Show UserPicker based on canListUser

* Update public/app/core/components/AccessControl/AddPermission.tsx

Co-authored-by: Ieva <ieva.vasiljeva@grafana.com>
(cherry picked from commit 6d931226d8)

Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com>
2022-02-03 17:23:49 +01:00
Grot (@grafanabot)
8ff34fa36e AccessControl: introduce a different accesscontrol check (licensed or not) (#44777) (#44857)
Co-authored-by: ievaVasiljeva <ieva.vasiljeva@grafana.com>
(cherry picked from commit 86756ee3e5)

Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com>
2022-02-03 16:52:12 +01:00
Grot (@grafanabot)
36edcfe208 Prometheus: Set interval on time field (#44802) (#44837)
(cherry picked from commit c8bb4c733e)

Co-authored-by: Todd Treece <360020+toddtreece@users.noreply.github.com>
2022-02-03 10:49:46 -05:00
Grot (@grafanabot)
358db0d130 Access control: FGAC for team sync endpoints (#44673) (#44856)
* add actions for team group sync

* extend the hook to allow specifying whether the user is external

* move user struct to type package

* interface for permission service to allow mocking it

* reuse existing permissions

* test fix

* refactor

* linting

(cherry picked from commit 602d62ebcc)

Co-authored-by: Ieva <ieva.vasiljeva@grafana.com>
2022-02-03 15:48:13 +00:00
Grot (@grafanabot)
9e0acc9ece Chore: Fix log filters (#44681) (#44853)
(cherry picked from commit bc7e55d99b)

Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
2022-02-03 16:34:18 +01:00
Grot (@grafanabot)
5a1fc33eb4 ReleaseNotes: Updated changelog and release notes for 8.4.0-beta1 (#44822) (#44845)
(cherry picked from commit afac7701cb)
2022-02-03 16:02:47 +01:00
Grot (@grafanabot)
c5aaf9526e Rename build-e2e-publish pipelines (#44836) (#44847)
(cherry picked from commit 5f16e4cedc)
(cherry picked from commit 37ac299853b27ff819d16085630f425fc30c794e)

Co-authored-by: Dimitris Sotirakis <dimitrios.sotirakis@grafana.com>
2022-02-03 17:02:05 +02:00
Grot (@grafanabot)
d20ac04120 Loki: use generic grafana null-insertion mechanism (#44826) (#44846)
* loki: refactor: return dataframes instead of timeseries

* fixed unit test

* removed unused import

(cherry picked from commit 0c2ba819a7)

Co-authored-by: Gábor Farkas <gabor.farkas@gmail.com>
2022-02-03 09:57:01 -05:00
Grot (@grafanabot)
1fe18694ad Alerting: Fix alert notification template (#44761) (#44839)
(cherry picked from commit bb88cf683c)

Co-authored-by: Konrad Lalik <konrad.lalik@grafana.com>
2022-02-03 14:32:48 +01:00
Grot (@grafanabot)
e37dde0036 Alerting: load correct unified alerting tab (#44794) (#44832)
(cherry picked from commit 29b97361f7)

Co-authored-by: Gilles De Mey <gilles.de.mey@gmail.com>
2022-02-03 14:08:57 +01:00
Grot (@grafanabot)
60fcb87a6b Feature Highlights: move setting to a feature toggle (#44780) (#44827)
* Add toggle

* Use the toggle

* Cleanup

(cherry picked from commit a79c048344)

Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>
2022-02-03 14:54:42 +02:00
Grot (@grafanabot)
6292749014 Release: Bump version to 8.4.0-beta.1 (#44821)
Co-authored-by: Andres Martinez Gotor <andres.mgotor@gmail.com>
2022-02-03 11:14:18 +01:00
Grot (@grafanabot)
d7ba4dd293 grafana/ui: Fix RelativeTimeRange supported formats (#44535) (#44819)
* remove link to docs site

* extract tooltip to component

* text and formatting

* use div instead of p

(cherry picked from commit 3314178a0a)

Co-authored-by: Peter Holmberg <peterholmberg@users.noreply.github.com>
2022-02-03 10:49:12 +01:00
Grot (@grafanabot)
a7ad5ee55f Encryption: Add support for data keys re-encryption (#43548) (#44814)
* Encryption: Add support for data keys re-encryption

* Add tests for data keys re-encryption

* Update code after refactorings

Co-authored-by: Leonard Gram <leo@xlson.com>
(cherry picked from commit b2655750e8)

Co-authored-by: Joan López de la Franca Beltran <5459617+joanlopez@users.noreply.github.com>
2022-02-03 09:58:12 +01:00
Grot (@grafanabot)
71a0ae7931 Encryption: CLI rollback command (#43935) (#44810)
* Encryption: CLI rollback command

* Update flag reference to 'featuremgmt' pkg

* Update feature toggles usage

* Clean up data keys table after envelope encryption rollback

(cherry picked from commit f8105efff3)

Co-authored-by: Joan López de la Franca Beltran <5459617+joanlopez@users.noreply.github.com>
2022-02-03 07:54:57 +01:00
Grot (@grafanabot)
b4579334d4 DataFrame: insert null values along interval (#44622) (#44792)
(cherry picked from commit 3504844ad7)

Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
2022-02-02 14:05:14 -06:00
Grot (@grafanabot)
e031568aa4 Do not store EvaluationString in Evaluation. (#44606) (#44795)
* do not store evaluation string in Evaluation.
* reduce number of buckets to store for a single state

(cherry picked from commit 984c95de63)

Co-authored-by: Yuriy Tseretyan <tceretian@gmail.com>
2022-02-02 19:29:13 +01:00
Grot (@grafanabot)
918f1d943a Instrumentation: Fix HTTP request instrumentation of authentication failures (#44234) (#44793)
Moves the request tracing middleware earlier in the chain, just after the tracing middleware
and before the log middleware. With these changes we'll be able to track
authentication/authorization status failures that currently exits early and don't execute the
request tracing middleware. In addition, there might be some other routes now being tracked
with this that we didn't do before.

Fixes #39590

(cherry picked from commit 0092d10764)

Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
2022-02-02 19:07:37 +01:00
Andres Martinez Gotor
d0871959b6 Update yarn.lock 2022-02-02 17:58:37 +01:00
Andres Martinez Gotor
0a90d1eeeb Merge pull request #243 from grafana/bump-version-8.4.0-beta.1
Release: Bump version to 8.4.0-beta.1
2022-02-02 17:39:53 +01:00
grafanabot
c52dae0296 "Release: Updated versions in package to 8.4.0-beta.1" 2022-02-02 16:09:46 +00:00
5939 changed files with 99969 additions and 296168 deletions

View File

@@ -1,249 +0,0 @@
// BETTERER RESULTS V2.
//
// If this file contains merge conflicts, use `betterer merge` to automatically resolve them:
// https://phenomnomnominal.github.io/betterer/docs/results-file/#merge
//
exports[`no enzyme tests`] = {
value: `{
"packages/grafana-ui/src/components/BarGauge/BarGauge.test.tsx:4199795290": [
[0, 19, 13, "RegExp match", "2409514259"]
],
"packages/grafana-ui/src/components/Forms/Legacy/Input/Input.test.tsx:3129955645": [
[0, 19, 13, "RegExp match", "2409514259"]
],
"packages/grafana-ui/src/components/Graph/Graph.test.tsx:1664091255": [
[0, 17, 13, "RegExp match", "2409514259"]
],
"packages/grafana-ui/src/components/Graph/GraphTooltip/MultiModeGraphTooltip.test.tsx:1865444105": [
[0, 17, 13, "RegExp match", "2409514259"]
],
"packages/grafana-ui/src/components/Logs/LogRowContextProvider.test.tsx:2719724375": [
[0, 17, 13, "RegExp match", "2409514259"]
],
"packages/grafana-ui/src/components/QueryField/QueryField.test.tsx:375894800": [
[0, 19, 13, "RegExp match", "2409514259"]
],
"packages/grafana-ui/src/components/Typeahead/PartialHighlighter.test.tsx:1751923376": [
[0, 31, 13, "RegExp match", "2409514259"]
],
"packages/grafana-ui/src/components/Typeahead/Typeahead.test.tsx:972524250": [
[0, 17, 13, "RegExp match", "2409514259"]
],
"packages/grafana-ui/src/slate-plugins/braces.test.tsx:1440546721": [
[0, 19, 13, "RegExp match", "2409514259"]
],
"packages/grafana-ui/src/slate-plugins/clear.test.tsx:1085648664": [
[0, 19, 13, "RegExp match", "2409514259"]
],
"packages/grafana-ui/src/slate-plugins/runner.test.tsx:446043290": [
[0, 19, 13, "RegExp match", "2409514259"]
],
"packages/grafana-ui/src/slate-plugins/suggestions.test.tsx:3654981205": [
[0, 18, 13, "RegExp match", "2409514259"]
],
"packages/jaeger-ui-components/src/TracePageHeader/SpanGraph/CanvasSpanGraph.test.js:1974748555": [
[14, 19, 13, "RegExp match", "2409514259"]
],
"packages/jaeger-ui-components/src/TracePageHeader/SpanGraph/GraphTicks.test.js:940336852": [
[14, 19, 13, "RegExp match", "2409514259"]
],
"packages/jaeger-ui-components/src/TracePageHeader/SpanGraph/Scrubber.test.js:4256741694": [
[14, 19, 13, "RegExp match", "2409514259"]
],
"packages/jaeger-ui-components/src/TracePageHeader/SpanGraph/TickLabels.test.js:2931161174": [
[14, 19, 13, "RegExp match", "2409514259"]
],
"packages/jaeger-ui-components/src/TracePageHeader/SpanGraph/ViewingLayer.test.js:1676554632": [
[14, 19, 13, "RegExp match", "2409514259"]
],
"packages/jaeger-ui-components/src/TracePageHeader/SpanGraph/index.test.js:186764954": [
[14, 19, 13, "RegExp match", "2409514259"]
],
"packages/jaeger-ui-components/src/TracePageHeader/TracePageHeader.test.js:3242042907": [
[14, 26, 13, "RegExp match", "2409514259"]
],
"packages/jaeger-ui-components/src/TracePageHeader/TracePageSearchBar.test.js:1062402339": [
[14, 19, 13, "RegExp match", "2409514259"]
],
"packages/jaeger-ui-components/src/TraceTimelineViewer/ListView/index.test.js:1734982398": [
[14, 26, 13, "RegExp match", "2409514259"]
],
"packages/jaeger-ui-components/src/TraceTimelineViewer/SpanDetail/AccordianKeyValues.test.js:2408389970": [
[14, 19, 13, "RegExp match", "2409514259"]
],
"packages/jaeger-ui-components/src/TraceTimelineViewer/SpanDetail/AccordianLogs.test.js:3960703835": [
[14, 19, 13, "RegExp match", "2409514259"]
],
"packages/jaeger-ui-components/src/TraceTimelineViewer/SpanDetail/AccordianReferences.test.js:2429764318": [
[14, 19, 13, "RegExp match", "2409514259"]
],
"packages/jaeger-ui-components/src/TraceTimelineViewer/SpanDetail/KeyValuesTable.test.js:3813002651": [
[14, 19, 13, "RegExp match", "2409514259"]
],
"packages/jaeger-ui-components/src/TraceTimelineViewer/SpanDetail/index.test.js:2816619357": [
[16, 19, 13, "RegExp match", "2409514259"]
],
"packages/jaeger-ui-components/src/TraceTimelineViewer/SpanDetailRow.test.js:2623922632": [
[14, 19, 13, "RegExp match", "2409514259"]
],
"packages/jaeger-ui-components/src/TraceTimelineViewer/SpanTreeOffset.test.js:174536706": [
[14, 19, 13, "RegExp match", "2409514259"]
],
"packages/jaeger-ui-components/src/TraceTimelineViewer/Ticks.test.js:743308415": [
[14, 19, 13, "RegExp match", "2409514259"]
],
"packages/jaeger-ui-components/src/TraceTimelineViewer/TimelineHeaderRow/TimelineCollapser.test.js:4018342820": [
[14, 19, 13, "RegExp match", "2409514259"]
],
"packages/jaeger-ui-components/src/TraceTimelineViewer/TimelineHeaderRow/TimelineColumnResizer.test.js:2286101708": [
[15, 17, 13, "RegExp match", "2409514259"]
],
"packages/jaeger-ui-components/src/TraceTimelineViewer/TimelineHeaderRow/TimelineHeaderRow.test.js:2106409544": [
[14, 19, 13, "RegExp match", "2409514259"]
],
"packages/jaeger-ui-components/src/TraceTimelineViewer/TimelineHeaderRow/TimelineViewingLayer.test.js:1423129438": [
[15, 17, 13, "RegExp match", "2409514259"]
],
"packages/jaeger-ui-components/src/TraceTimelineViewer/VirtualizedTraceView.test.js:551014442": [
[13, 26, 13, "RegExp match", "2409514259"]
],
"packages/jaeger-ui-components/src/TraceTimelineViewer/index.test.js:381298544": [
[14, 19, 13, "RegExp match", "2409514259"]
],
"packages/jaeger-ui-components/src/common/NewWindowIcon.test.js:1750458349": [
[14, 19, 13, "RegExp match", "2409514259"]
],
"packages/jaeger-ui-components/src/common/UiFindInput.test.js:2207118020": [
[14, 19, 13, "RegExp match", "2409514259"]
],
"packages/jaeger-ui-components/src/url/ReferenceLink.test.js:3249503373": [
[14, 26, 13, "RegExp match", "2409514259"]
],
"public/app/core/components/PageActionBar/PageActionBar.test.tsx:1251504193": [
[0, 19, 13, "RegExp match", "2409514259"]
],
"public/app/core/components/QueryOperationRow/QueryOperationAction.test.tsx:3032694716": [
[0, 19, 13, "RegExp match", "2409514259"]
],
"public/app/core/components/QueryOperationRow/QueryOperationRow.test.tsx:3743889097": [
[0, 26, 13, "RegExp match", "2409514259"]
],
"public/app/core/components/Select/MetricSelect.test.tsx:3351544014": [
[0, 19, 13, "RegExp match", "2409514259"]
],
"public/app/features/alerting/AlertRuleList.test.tsx:2998938420": [
[0, 19, 13, "RegExp match", "2409514259"]
],
"public/app/features/alerting/TestRuleResult.test.tsx:2358420489": [
[0, 19, 13, "RegExp match", "2409514259"]
],
"public/app/features/api-keys/ApiKeysAddedModal.test.tsx:3246264379": [
[0, 20, 13, "RegExp match", "2409514259"]
],
"public/app/features/dashboard/components/DashboardRow/DashboardRow.test.tsx:1463123173": [
[0, 17, 13, "RegExp match", "2409514259"]
],
"public/app/features/dashboard/components/ShareModal/ShareLink.test.tsx:2357087833": [
[0, 35, 13, "RegExp match", "2409514259"]
],
"public/app/features/dashboard/dashgrid/DashboardGrid.test.tsx:2723773538": [
[0, 35, 13, "RegExp match", "2409514259"]
],
"public/app/features/dashboard/dashgrid/PanelHeader/PanelHeaderCorner.test.tsx:2851646279": [
[0, 19, 13, "RegExp match", "2409514259"]
],
"public/app/features/datasources/DashboardsTable.test.tsx:1950355032": [
[0, 19, 13, "RegExp match", "2409514259"]
],
"public/app/features/datasources/DataSourceDashboards.test.tsx:1369048021": [
[0, 19, 13, "RegExp match", "2409514259"]
],
"public/app/features/datasources/DataSourcesListPage.test.tsx:2960099202": [
[0, 19, 13, "RegExp match", "2409514259"]
],
"public/app/features/datasources/settings/BasicSettings.test.tsx:625016324": [
[0, 19, 13, "RegExp match", "2409514259"]
],
"public/app/features/datasources/settings/ButtonRow.test.tsx:1422996720": [
[0, 19, 13, "RegExp match", "2409514259"]
],
"public/app/features/dimensions/editors/ThresholdsEditor/ThresholdsEditor.test.tsx:4164297658": [
[0, 17, 13, "RegExp match", "2409514259"]
],
"public/app/features/folders/FolderSettingsPage.test.tsx:1109052730": [
[0, 19, 13, "RegExp match", "2409514259"]
],
"public/app/features/invites/InviteesTable.test.tsx:3612992381": [
[0, 19, 13, "RegExp match", "2409514259"]
],
"public/app/features/org/OrgDetailsPage.test.tsx:3835042085": [
[0, 19, 13, "RegExp match", "2409514259"]
],
"public/app/features/org/OrgProfile.test.tsx:623809345": [
[0, 19, 13, "RegExp match", "2409514259"]
],
"public/app/features/teams/TeamList.test.tsx:854193970": [
[0, 19, 13, "RegExp match", "2409514259"]
],
"public/app/features/teams/TeamMemberRow.test.tsx:1649328210": [
[0, 19, 13, "RegExp match", "2409514259"]
],
"public/app/features/teams/TeamMembers.test.tsx:4089428239": [
[0, 19, 13, "RegExp match", "2409514259"]
],
"public/app/features/teams/TeamPages.test.tsx:3990420214": [
[0, 19, 13, "RegExp match", "2409514259"]
],
"public/app/features/teams/TeamSettings.test.tsx:2043271249": [
[0, 19, 13, "RegExp match", "2409514259"]
],
"public/app/features/users/UsersListPage.test.tsx:2518052139": [
[0, 19, 13, "RegExp match", "2409514259"]
],
"public/app/features/users/UsersTable.test.tsx:263958312": [
[0, 19, 13, "RegExp match", "2409514259"]
],
"public/app/plugins/datasource/cloud-monitoring/components/Aggregation.test.tsx:3822406835": [
[1, 19, 13, "RegExp match", "2409514259"]
],
"public/app/plugins/datasource/cloudwatch/components/ConfigEditor.test.tsx:227258837": [
[0, 19, 13, "RegExp match", "2409514259"]
],
"public/app/plugins/datasource/cloudwatch/components/LogsQueryField.test.tsx:1501504663": [
[2, 19, 13, "RegExp match", "2409514259"]
],
"public/app/plugins/datasource/elasticsearch/configuration/ConfigEditor.test.tsx:3481855642": [
[0, 26, 13, "RegExp match", "2409514259"]
],
"public/app/plugins/datasource/elasticsearch/configuration/DataLinks.test.tsx:248699332": [
[0, 17, 13, "RegExp match", "2409514259"]
],
"public/app/plugins/datasource/influxdb/components/ConfigEditor.test.tsx:57753101": [
[0, 19, 13, "RegExp match", "2409514259"]
],
"public/app/plugins/datasource/loki/components/LokiExploreQueryEditor.test.tsx:1488067923": [
[0, 26, 13, "RegExp match", "2409514259"]
],
"public/app/plugins/datasource/loki/components/LokiQueryEditor.test.tsx:146069464": [
[0, 19, 13, "RegExp match", "2409514259"]
],
"public/app/plugins/datasource/loki/configuration/ConfigEditor.test.tsx:3658171175": [
[0, 17, 13, "RegExp match", "2409514259"]
],
"public/app/plugins/datasource/loki/configuration/DebugSection.test.tsx:1551927716": [
[0, 17, 13, "RegExp match", "2409514259"]
],
"public/app/plugins/datasource/loki/configuration/DerivedField.test.tsx:3570129984": [
[0, 19, 13, "RegExp match", "2409514259"]
],
"public/app/plugins/datasource/loki/configuration/DerivedFields.test.tsx:2402631398": [
[0, 17, 13, "RegExp match", "2409514259"]
],
"public/app/plugins/datasource/prometheus/configuration/AzureCredentialsForm.test.tsx:3424320489": [
[0, 19, 13, "RegExp match", "2409514259"]
],
"public/app/plugins/panel/bargauge/BarGaugePanel.test.tsx:1597135392": [
[0, 31, 13, "RegExp match", "2409514259"]
]
}`
};

View File

@@ -1,5 +0,0 @@
import { regexp } from '@betterer/regexp';
export default {
'no enzyme tests': () => regexp(/from 'enzyme'/g).include('**/*.test.*'),
};

View File

@@ -1,8 +1,8 @@
[run]
init_cmds = [
["make", "gen-go"],
["GO_BUILD_DEV=1", "make", "build-cli"],
["GO_BUILD_DEV=1", "make", "build-server"],
["go", "run", "build.go", "-dev", "build-cli"],
["go", "run", "build.go", "-dev", "build-server"],
["./bin/grafana-server", "-packaging=dev", "cfg:app_mode=development"]
]
watch_all = true
@@ -13,10 +13,10 @@ watch_dirs = [
"$WORKDIR/conf",
]
watch_exts = [".go", ".ini", ".toml", ".template.html"]
ignore_files = ["wire_gen.go"]
ignore_files = ["wire_gen.go"]
build_delay = 1500
cmds = [
["make", "gen-go"],
["GO_BUILD_DEV=1", "make", "build-server"],
["go", "run", "build.go", "-dev", "build-server"],
["./bin/grafana-server", "-packaging=dev", "cfg:app_mode=development"]
]

1414
.drone.yml

File diff suppressed because it is too large Load Diff

View File

@@ -1,18 +1,14 @@
.git
.github
.yarn
build
node_modules
compiled
data
deployment_tools_config.json
build
vendor
devenv
data
dist
e2e/tmp
node_modules
pkg
public/lib/monaco
scripts/grafana-server/tmp
vendor
public/lib/monaco
deployment_tools_config.json
# TS generate from cue by cuetsy
**/*.gen.ts
@@ -20,6 +16,3 @@ vendor
# Auto-generated localisation files
public/locales/_build/
public/locales/**/*.js
# Auto-generated icon file
packages/grafana-ui/src/components/Icon/iconBundle.ts

View File

@@ -1,24 +1,12 @@
{
"extends": ["@grafana/eslint-config"],
"root": true,
"plugins": ["@emotion", "lodash", "jest", "import"],
"settings": {
"import/internal-regex": "^(app/)|(@grafana)",
"import/external-module-folders": ["node_modules", ".yarn"]
},
"plugins": ["no-only-tests", "@emotion", "lodash"],
"rules": {
"no-only-tests/no-only-tests": "error",
"react/prop-types": "off",
"@emotion/jsx-import": "error",
"lodash/import-scope": [2, "member"],
"jest/no-focused-tests": "error",
"import/order": [
"error",
{
"groups": [["builtin", "external"], "internal", "parent", "sibling", "index"],
"newlines-between": "always",
"alphabetize": { "order": "asc" }
}
]
"lodash/import-scope": [2, "member"]
},
"overrides": [
{

34
.github/CODEOWNERS vendored
View File

@@ -28,7 +28,6 @@ go.sum @grafana/backend-platform
.drone.yml @grafana/grafana-release-eng
.drone.star @grafana/grafana-release-eng
/scripts/drone/ @grafana/grafana-release-eng
/pkg/build/ @grafana/grafana-release-eng
# Cloud Datasources backend code
/pkg/tsdb/cloudwatch @grafana/cloud-datasources
@@ -54,20 +53,12 @@ go.sum @grafana/backend-platform
/pkg/services/sqlstore/migrations @grafana/backend-platform @grafana/hosted-grafana-team
*_mig.go @grafana/backend-platform @grafana/hosted-grafana-team
# Grafana edge
# Grafana live
/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
# Unified Alerting
/pkg/services/ngalert @grafana/alerting-squad
/pkg/services/sqlstore/migrations/ualert @grafana/alerting-squad
# Library Services
/pkg/services/libraryelements @grafana/user-essentials
@@ -105,13 +96,12 @@ pkg/tsdb/testdatasource/sims/ @grafana/grafana-edge-squad
/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/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/core/components/TransformersUI/spatial @grafana/grafana-edge-squad
/public/app/plugins/panel/alertlist @grafana/alerting-squad
/public/app/plugins/panel/barchart @grafana/grafana-bi-squad
/public/app/plugins/panel/heatmap @grafana/grafana-bi-squad
@@ -167,17 +157,3 @@ lerna.json @grafana/frontend-ops
# Cloud middleware
/grafana-mixin/ @grafana/hosted-grafana-team
# Grafana authentication and authorization
/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/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

View File

@@ -1,43 +0,0 @@
name: UX design issue
description: Create an issue for delivering wireframes, mockups or other design solutions.
title: "UX: "
labels: ["type/ux"]
body:
- type: textarea
id: background
attributes:
label: "Background / Why we're doing this"
description: Describe the problem and background of the issue. This could include research insights that inform the design changes, unmet user needs, or other usability issues.
placeholder: Add UI improvements to make Grafana Alerting alert creation easier based on usability test results.
validations:
required: true
- type: dropdown
attributes:
label: Is there existing research for this?
description: Please link research results or insights in the Background section if you have any. If no research was conducted, you might want to consider usability testing your design later.
options: [
"Yes, I have linked it",
"No research yet"
]
validations:
required: true
- type: textarea
id: problems-or-tasks
attributes:
label: Problems or tasks
description: Describe problems the new design should solve or tasks the user needs to complete.
placeholder:
value: |
- A problem we're trying to solve
- A task the user needs to accomplish
- …
validations:
required: false
- type: textarea
attributes:
label: Deliverables
description: Add a checklist of deliverables here. You can later add links to each deliverable.
value: |
- Figma mockup
- Miro board
- …

70
.github/commands.json vendored
View File

@@ -90,14 +90,6 @@
"url":"https://github.com/orgs/grafana/projects/97"
}
},
{
"type":"label",
"name":"datasource/CloudWatch Logs",
"action":"addToProject",
"addToProject":{
"url":"https://github.com/orgs/grafana/projects/97"
}
},
{
"type":"label",
"name":"datasource/GoogleCloudMonitoring",
@@ -106,12 +98,20 @@
"url":"https://github.com/orgs/grafana/projects/97"
}
},
{
"type":"label",
"name":"oss-observability",
"action":"addToProject",
"addToProject":{
"url":"https://github.com/orgs/grafana/projects/54"
}
},
{
"type":"label",
"name":"datasource/Prometheus",
"action":"addToProject",
"addToProject":{
"url":"https://github.com/orgs/grafana/projects/112"
"url":"https://github.com/orgs/grafana/projects/54"
}
},
{
@@ -119,23 +119,7 @@
"name":"datasource/InfluxDB",
"action":"addToProject",
"addToProject":{
"url":"https://github.com/orgs/grafana/projects/112"
}
},
{
"type":"label",
"name":"datasource/Graphite",
"action":"addToProject",
"addToProject":{
"url":"https://github.com/orgs/grafana/projects/112"
}
},
{
"type":"label",
"name":"datasource/OpenTSDB",
"action":"addToProject",
"addToProject":{
"url":"https://github.com/orgs/grafana/projects/112"
"url":"https://github.com/orgs/grafana/projects/54"
}
},
{
@@ -143,7 +127,7 @@
"name":"datasource/OpenSearch",
"action":"addToProject",
"addToProject":{
"url":"https://github.com/orgs/grafana/projects/110"
"url":"https://github.com/orgs/grafana/projects/54"
}
},
{
@@ -151,7 +135,7 @@
"name":"datasource/Loki",
"action":"addToProject",
"addToProject":{
"url":"https://github.com/orgs/grafana/projects/110"
"url":"https://github.com/orgs/grafana/projects/54"
}
},
{
@@ -159,7 +143,7 @@
"name":"datasource/Tempo",
"action":"addToProject",
"addToProject":{
"url":"https://github.com/orgs/grafana/projects/110"
"url":"https://github.com/orgs/grafana/projects/54"
}
},
{
@@ -167,23 +151,7 @@
"name":"datasource/Elasticsearch",
"action":"addToProject",
"addToProject":{
"url":"https://github.com/orgs/grafana/projects/110"
}
},
{
"type":"label",
"name":"datasource/Jaeger",
"action":"addToProject",
"addToProject":{
"url":"https://github.com/orgs/grafana/projects/110"
}
},
{
"type":"label",
"name":"datasource/Zipkin",
"action":"addToProject",
"addToProject":{
"url":"https://github.com/orgs/grafana/projects/110"
"url":"https://github.com/orgs/grafana/projects/54"
}
},
{
@@ -191,7 +159,7 @@
"name":"area/explore",
"action":"addToProject",
"addToProject":{
"url":"https://github.com/orgs/grafana/projects/111"
"url":"https://github.com/orgs/grafana/projects/54"
}
},
{
@@ -209,13 +177,5 @@
"removeFromProject":{
"url":"https://github.com/grafana/grafana/projects/33"
}
},
{
"type": "label",
"name": "team/grafana-partners",
"action": "addToProject",
"addToProject": {
"url": "https://github.com/orgs/grafana/projects/87"
}
}
]

View File

@@ -7,43 +7,12 @@
"failure": "Milestone not set"
},
{
"type": "check-label",
"type": "check-backport",
"title": "Backport Check",
"labels": {
"exists": "Backport enabled",
"notExists": "Backport decision needed",
"matches": [
"backport v*"
]
},
"skip": {
"message": "Backport skipped",
"matches": [
"backport",
"no-backport"
]
},
"targetUrl": "https://github.com/grafana/grafana/blob/main/contribute/merge-pull-request.md#should-the-pull-request-be-backported"
},
{
"type": "check-changelog",
"title": "Changelog Check",
"labels": {
"exists": "Changelog enabled",
"notExists": "Changelog decision needed",
"matches": [
"add to changelog"
]
},
"breakingChangeLabels": [
"breaking change"
],
"skip": {
"message": "Changelog skipped",
"matches": [
"no-changelog"
]
},
"targetUrl": "https://github.com/grafana/grafana/blob/main/contribute/merge-pull-request.md#include-in-changelog-and-release-notes"
"backportEnabled": "Backport enabled",
"backportSkipped": "Backport skipped",
"failure": "Backport decision needed",
"targetUrl": "https://github.com/grafana/grafana/blob/main/contribute/merge-pull-request.md#should-the-pull-request-be-backported",
"skipLabels": [ "backport", "no-backport"]
}
]

View File

@@ -179,17 +179,11 @@
"action": "updateLabel",
"addLabel": "area/dashboard/templating"
},
{
"type": "changedfiles",
"matches": ["/pkg/services/ngalert/**/*", "/pkg/services/sqlstore/migrations/ualert/**/*", "/pkg/services/alerting/**/*", "/public/app/features/alerting/**/*", "/pkg/tests/api/alerting/**/*"],
"action": "updateLabel",
"addLabel": "area/alerting"
},
{
"type": "author",
"name": "pr/external",
"notMemberOf": { "org": "grafana" },
"ignoreList": ["renovate[bot]","dependabot[bot]"],
"ignoreList": ["renovate[bot]"],
"action": "updateLabel",
"addLabel": "pr/external"
}

View File

@@ -11,17 +11,13 @@
"@types/d3-scale-chromatic", // we should bump this once we move to esm modules
"@types/grafana__slate-react", // should be updated when the `slate` package is updated
"@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
"eslint", // wait until `eslint-plugin-react-hooks>4.2.0` is released
"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 it's 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-router-dom", // we should bump this together with history
"slate",
@@ -29,6 +25,7 @@
"systemjs",
"copy-webpack-plugin", // try to upgrade with newer yarn release. Not working with 3.1.1
"ts-loader", // we should remove ts-loader and use babel-loader instead
"typescript", // >4.5.x doesn't seem to work on windows with pnp currently. probably similar to https://github.com/yarnpkg/berry/issues/3722
"ora" // we should bump this once we move to esm modules
],
"ignorePaths": ["packages/grafana-toolkit/package.json", "emails/**", "plugins-bundled/**", "**/mocks/**"],

47
.github/stale.yml vendored Normal file
View File

@@ -0,0 +1,47 @@
# Configuration for probot-stale - https://github.com/probot/stale
# General configuration
# Label to use when marking as stale
staleLabel: stale
# Pull request specific configuration
pulls:
# Number of days of inactivity before an Issue or Pull Request becomes stale
daysUntilStale: 14
# Number of days of inactivity before a stale Issue or Pull Request is closed.
# Set to false to disable. If disabled, issues still need to be closed manually, but will remain marked as stale.
daysUntilClose: 30
# Comment to post when marking as stale. Set to `false` to disable
markComment: >
This pull request has been automatically marked as stale because it has not had
activity in the last 2 weeks. It will be closed in 30 days if no further activity occurs. Please
feel free to give a status update now, ping for review, or re-open when it's ready.
Thank you for your contributions!
# Comment to post when closing a stale Issue or Pull Request.
closeComment: >
This pull request has been automatically closed because it has not had
activity in the last 30 days. Please feel free to give a status update now, ping for review, or re-open when it's ready.
Thank you for your contributions!
# Limit the number of actions per hour, from 1-30. Default is 30
limitPerRun: 1
exemptLabels:
- help wanted
- type/bug
- type/feature-request
- Epic
- no stalebot
# Issue specific configuration
issues:
limitPerRun: 1
daysUntilStale: 100000
daysUntilClose: 100000
markComment: >
This issue has been automatically marked as stale because it has not had activity in the
last 100 days. It will be closed in the next 100 days if no activity occurs.
Thank you for your contributions.
closeComment: >
This issue has been automatically closed because it has not had activity in the
last month and a half. If this issue is still valid, please ping a maintainer and ask them to check this again.
Thank you for your contributions.

View File

@@ -10,7 +10,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout Actions
uses: actions/checkout@v3
uses: actions/checkout@v2
with:
repository: "grafana/grafana-github-actions"
path: ./actions

View File

@@ -4,7 +4,7 @@ on:
inputs:
version:
required: true
default: '7.x.x'
default: '8.x.x'
workflow_call:
inputs:
version_call:
@@ -50,7 +50,7 @@ jobs:
example: 7.4.3 or 7.4.3-beta1"
exit 1
- uses: actions/checkout@v3
- uses: actions/checkout@v2
- name: Set intermedia variables
id: intermedia
@@ -69,12 +69,12 @@ jobs:
exit 1
- name: Checkout Actions
uses: actions/checkout@v3
uses: actions/checkout@v2
with:
repository: "grafana/grafana-github-actions"
path: ./actions
ref: main
- uses: actions/setup-node@v3.2.0
- uses: actions/setup-node@v2.5.1
with:
node-version: '16'
- name: Install Actions

View File

@@ -19,7 +19,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout Actions
uses: actions/checkout@v3
uses: actions/checkout@v2
with:
repository: "grafana/grafana-github-actions"
path: ./actions

View File

@@ -1,17 +0,0 @@
name: Cloud data sources test code coverage
on:
pull_request:
paths:
- 'pkg/tsdb/azuremonitor/**'
- 'pkg/tsdb/cloudwatch/**'
- 'pkg/tsdb/cloudmonitoring/**'
- 'public/app/plugins/datasource/grafana-azure-monitor-datasource/**'
- 'public/app/plugins/datasource/cloudwatch/**'
- 'public/app/plugins/datasource/cloud-monitoring/**'
branches-ignore:
- dependabot/**
- backport-*
jobs:
workflow-call:
uses: grafana/code-coverage/.github/workflows/code-coverage.yml@v0.1.2

View File

@@ -8,12 +8,9 @@ name: "CodeQL"
on:
push:
branches: [main, v1.8.x, v2.0.x, v2.1.x, v2.6.x, v3.0.x, v3.1.x, v4.0.x, v4.1.x, v4.2.x, v4.3.x, v4.4.x, v4.5.x, v4.6.x, v4.7.x, v5.0.x, v5.1.x, v5.2.x, v5.3.x, v5.4.x, v6.0.x, v6.1.x, v6.2.x, v6.3.x, v6.4.x, v6.5.x, v6.6.x, v6.7.x, v7.0.x, v7.1.x, v7.2.x]
paths-ignore:
- '**/*.cue'
- '**/*.json'
- '**/*.md'
- '**/*.txt'
- '**/*.yml'
pull_request:
# The branches below must be a subset of the branches above
branches: [main]
schedule:
- cron: '0 4 * * 6'
@@ -33,7 +30,7 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v2
with:
# We must fetch at least the immediate parents so that if this is
# a pull request then we can checkout the head.
@@ -49,5 +46,21 @@ jobs:
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v1
# Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language
#- run: |
# make bootstrap
# make release
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1

View File

@@ -4,14 +4,13 @@ on:
types: [labeled, unlabeled]
issue_comment:
types: [created]
concurrency:
group: issue-commands-${{ github.event.issue.number }}
jobs:
main:
runs-on: ubuntu-latest
steps:
- name: Checkout Actions
uses: actions/checkout@v3
uses: actions/checkout@v2
with:
repository: "grafana/grafana-github-actions"
path: ./actions

View File

@@ -11,7 +11,7 @@ jobs:
working-directory: './pr'
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v2
with:
path: './pr'
@@ -51,7 +51,7 @@ jobs:
working-directory: './base'
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v2
with:
path: './base'
ref: ${{ github.event.pull_request.base.ref }}
@@ -92,15 +92,15 @@ jobs:
GITHUB_STEP_NUMBER: 7
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v2
- name: Get built packages from pr
uses: actions/download-artifact@v3
uses: actions/download-artifact@v2
with:
name: buildPr
- name: Get built packages from base
uses: actions/download-artifact@v3
uses: actions/download-artifact@v2
with:
name: buildBase
@@ -112,7 +112,7 @@ jobs:
- name: Get link for the Github Action job
id: job
uses: actions/github-script@v6
uses: actions/github-script@v5
with:
script: |
const script = require('./.github/workflows/scripts/pr-get-job-link.js')
@@ -128,7 +128,7 @@ jobs:
- name: Persisting the check output
run: |
mkdir -p ./levitate
echo "{ \"exit_code\": ${{ steps.breaking-changes.outputs.is_breaking }}, \"message\": \"${{ steps.breaking-changes.outputs.message }}\", \"job_link\": \"${{ steps.job.outputs.link }}#step:${GITHUB_STEP_NUMBER}:1\", \"pr_number\": \"${{ github.event.pull_request.number }}\" }" > ./levitate/result.json
echo "{ \"exit_code\": ${{ steps.breaking-changes.outputs.is_breaking }}, \"message\": \"${{ steps.breaking-changes.outputs.message }}\", \"job_link\": \"${{ steps.job.outputs.link }}#step:${GITHUB_STEP_NUMBER}:1\" }" > ./levitate/result.json
- name: Upload check output as artifact
uses: actions/upload-artifact@v2

View File

@@ -14,10 +14,10 @@ jobs:
ARTIFACT_NAME: 'levitate'
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v2
- name: 'Download artifact'
uses: actions/github-script@v6
uses: actions/github-script@v5
env:
RUN_ID: ${{ github.event.workflow_run.id }}
with:
@@ -53,7 +53,7 @@ jobs:
run: unzip "${ARTIFACT_FOLDER}/${ARTIFACT_NAME}.zip" -d "${ARTIFACT_FOLDER}"
- name: Parsing levitate result
uses: actions/github-script@v6
uses: actions/github-script@v5
id: levitate-run
with:
script: |
@@ -61,9 +61,9 @@ jobs:
const script = require('./.github/workflows/scripts/json-file-to-job-output.js');
await script({ core, filePath });
- name: Check if "levitate breaking change" label exists
- name: Check if "breaking change" label exists
id: does-label-exist
uses: actions/github-script@v6
uses: actions/github-script@v5
env:
PR_NUMBER: ${{ github.event.workflow_run.pull_requests[0].number }}
with:
@@ -74,7 +74,7 @@ jobs:
repo: context.repo.repo,
});
const labels = data.map(({ name }) => name);
const doesExist = labels.includes('levitate breaking change');
const doesExist = labels.includes('breaking change');
return doesExist ? 1 : 0;
@@ -82,7 +82,7 @@ jobs:
if: ${{ steps.levitate-run.outputs.exit_code == 1 }}
uses: marocchino/sticky-pull-request-comment@v2
with:
number: ${{ steps.levitate-run.outputs.pr_number }}
number: ${{ github.event.workflow_run.pull_requests[0].number }}
message: |
⚠️ &nbsp;&nbsp;**Possible breaking changes**
@@ -90,72 +90,52 @@ jobs:
${{ steps.levitate-run.outputs.message }}
[Console output](${{ steps.levitate-run.outputs.job_link }})
[Read our guideline](https://github.com/grafana/grafana/blob/main/contribute/breaking-changes-guide.md)
[Check console output](${{ steps.levitate-run.outputs.job_link }})
- 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 }}
number: ${{ github.event.workflow_run.pull_requests[0].number }}
delete: true
# 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 }}
uses: slackapi/slack-github-action@v1.18.0
with:
payload: |
{
"pr_link": "https://github.com/grafana/grafana/pull/${{ steps.levitate-run.outputs.pr_number }}",
"pr_number": "${{ steps.levitate-run.outputs.pr_number }}",
"job_link": "${{ steps.levitate-run.outputs.job_link }}",
"reporting_job_link": "${{ github.event.workflow_run.html_url }}",
"message": "${{ steps.levitate-run.outputs.message }}"
}
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_LEVITATE_WEBHOOK_URL }}
- name: Add "levitate breaking change" label
- name: Add "breaking change" label
if: ${{ steps.levitate-run.outputs.exit_code == 1 && steps.does-label-exist.outputs.result == 0 }}
uses: actions/github-script@v6
uses: actions/github-script@v5
env:
PR_NUMBER: ${{ steps.levitate-run.outputs.pr_number }}
PR_NUMBER: ${{ github.event.workflow_run.pull_requests[0].number }}
with:
github-token: ${{ secrets.GH_BOT_ACCESS_TOKEN }}
script: |
await github.rest.issues.addLabels({
issue_number: process.env.PR_NUMBER,
owner: context.repo.owner,
repo: context.repo.repo,
labels: ['levitate breaking change']
labels: ['breaking change']
})
- name: Remove "levitate breaking change" label
- name: Remove "breaking change" label
if: ${{ steps.levitate-run.outputs.exit_code == 0 && steps.does-label-exist.outputs.result == 1 }}
uses: actions/github-script@v6
uses: actions/github-script@v5
env:
PR_NUMBER: ${{ steps.levitate-run.outputs.pr_number }}
PR_NUMBER: ${{ github.event.workflow_run.pull_requests[0].number }}
with:
github-token: ${{ secrets.GH_BOT_ACCESS_TOKEN }}
script: |
await github.rest.issues.removeLabel({
issue_number: process.env.PR_NUMBER,
owner: context.repo.owner,
repo: context.repo.repo,
name: 'levitate breaking change'
name: 'breaking change'
})
# 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 == 1 }}
uses: actions/github-script@v6
uses: actions/github-script@v5
env:
PR_NUMBER: ${{ steps.levitate-run.outputs.pr_number }}
PR_NUMBER: ${{ github.event.workflow_run.pull_requests[0].number }}
with:
github-token: ${{ secrets.GH_BOT_ACCESS_TOKEN }}
script: |
await github.rest.pulls.requestReviewers({
pull_number: process.env.PR_NUMBER,
@@ -167,11 +147,10 @@ jobs:
- name: Remove "grafana/plugins-platform-frontend" from the list of reviewers
if: ${{ steps.levitate-run.outputs.exit_code == 0 }}
uses: actions/github-script@v6
uses: actions/github-script@v5
env:
PR_NUMBER: ${{ steps.levitate-run.outputs.pr_number }}
PR_NUMBER: ${{ github.event.workflow_run.pull_requests[0].number }}
with:
github-token: ${{ secrets.GH_BOT_ACCESS_TOKEN }}
script: |
await github.rest.pulls.removeRequestedReviewers({
pull_number: process.env.PR_NUMBER,

View File

@@ -1,26 +0,0 @@
name: Enterprise PR check
on:
pull_request:
branches:
- main
- 'v[0-9]+.[0-9]+.x'
jobs:
dispatch:
runs-on: ubuntu-latest
steps:
- name: Checkout Actions
uses: actions/checkout@v2
with:
repository: "grafana/grafana-github-actions"
path: ./actions
ref: main
- name: Install Actions
run: npm install --production --prefix ./actions
- name: Repository Dispatch
uses: ./actions/repository-dispatch
with:
token: ${{ secrets.GH_BOT_ACCESS_TOKEN }}
repository: grafana/grafana-enterprise
event_type: oss-pull-request
client_payload:
'{"source_branch": "${{ github.head_ref }}", "target_branch": "${{ github.base_ref }}", "pr_number": "${{ github.event.number }}"}'

View File

@@ -10,7 +10,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout Actions
uses: actions/checkout@v3
uses: actions/checkout@v2
with:
repository: "grafana/grafana-github-actions"
path: ./actions

View File

@@ -20,7 +20,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout Actions
uses: actions/checkout@v3
uses: actions/checkout@v2
with:
repository: "grafana/grafana-github-actions"
path: ./actions

View File

@@ -5,23 +5,21 @@ on:
- opened
- reopened
- synchronize
- ready_for_review
- ready_for_review
- labeled
- unlabeled
- edited
issues:
types:
- milestoned
- demilestoned
concurrency:
group: pr-checks-${{ github.event.number }}
jobs:
main:
runs-on: ubuntu-latest
if: github.event.pull_request.draft == false
steps:
- name: Checkout Actions
uses: actions/checkout@v3
uses: actions/checkout@v2
with:
repository: "grafana/grafana-github-actions"
path: ./actions

View File

@@ -1,29 +0,0 @@
name: "CodeQL for PR / go"
on:
pull_request:
branches: [main]
paths:
- '**/*.go'
jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
# We must fetch at least the immediate parents so that if this is
# a pull request then we can checkout the head.
fetch-depth: 2
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
with:
languages: "go"
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1

View File

@@ -1,31 +0,0 @@
name: "CodeQL for PR / javascript"
on:
pull_request:
branches: [main]
paths:
- '**/*.js'
- '**/*.ts'
- '**/*.tsx'
jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
# We must fetch at least the immediate parents so that if this is
# a pull request then we can checkout the head.
fetch-depth: 2
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
with:
languages: "javascript"
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1

View File

@@ -1,29 +0,0 @@
name: "CodeQL for PR / python"
on:
pull_request:
branches: [main]
paths:
- '**/*.py'
jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
# We must fetch at least the immediate parents so that if this is
# a pull request then we can checkout the head.
fetch-depth: 2
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
with:
languages: "python"
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1

View File

@@ -3,8 +3,7 @@ on:
pull_request:
types:
- closed
concurrency:
group: pr-commands-closed-${{ github.event.number }}
jobs:
close_job:
# this job will only run if the PR has been closed without being merged

View File

@@ -4,14 +4,13 @@ on:
types:
- opened
- synchronize
concurrency:
group: pr-commands-${{ github.event.number }}
jobs:
main:
runs-on: ubuntu-latest
steps:
- name: Checkout Actions
uses: actions/checkout@v3
uses: actions/checkout@v2
with:
repository: "grafana/grafana-github-actions"
path: ./actions

View File

@@ -3,7 +3,7 @@ name: publish_docs
on:
push:
branches:
- main
- v8.4.x
paths:
- 'docs/sources/**'
- 'packages/grafana-*/**'
@@ -14,13 +14,13 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v1
- 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.2.0
uses: actions/setup-node@v2.5.1
id: generate-docs
with:
node-version: '16'
node-version: '14'
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn config get cacheFolder)"
@@ -41,7 +41,7 @@ jobs:
host: github.com
github_pat: '${{ secrets.GH_BOT_ACCESS_TOKEN }}'
source_folder: docs/sources
target_folder: content/docs/grafana/next
target_folder: content/docs/grafana/latest
allow_no_changes: 'true'
- shell: bash
run: |

View File

@@ -19,7 +19,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout Actions
uses: actions/checkout@v3
uses: actions/checkout@v2
with:
repository: "grafana/grafana-github-actions"
path: ./actions

View File

@@ -1,33 +0,0 @@
name: 'Close stale issues and PRs'
on:
schedule:
- cron: '30 1 * * *'
jobs:
stale:
runs-on: ubuntu-latest
steps:
- 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.
# Set to -1 to disable. If disabled, issues still need to be closed manually, but will remain marked as stale.
days-before-close: 14
# Number of days of inactivity before an Issue or Pull Request becomes stale
days-before-stale: 30
# We don't want any Issues to be marked as stale for now.
days-before-issue-stale: -1
exempt-issue-labels: no stalebot
exempt-pr-labels: no stalebot
operations-per-run: 500
stale-issue-label: stale
stale-pr-label: stale
stale-pr-message: >
This pull request has been automatically marked as stale because it has not had
activity in the last 30 days. It will be closed in 2 weeks if no further activity occurs. Please
feel free to give a status update now, ping for review, or re-open when it's ready.
Thank you for your contributions!
close-pr-message: >
This pull request has been automatically closed because it has not had
activity in the last 2 weeks. Please feel free to give a status update now, ping for review, or re-open when it's ready.
Thank you for your contributions!

View File

@@ -21,7 +21,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout Actions
uses: actions/checkout@v3
uses: actions/checkout@v2
with:
repository: "grafana/grafana-github-actions"
path: ./actions

3
.gitignore vendored
View File

@@ -7,6 +7,7 @@ awsconfig
/.awcache
/dist
/public/build
public/dist/tsconfig.tsbuildinfo
/public/views/index.html
/public/views/error.html
/emails/dist
@@ -16,7 +17,6 @@ awsconfig
vendor/
/docs/menu.yaml
/requests
tsconfig.tsbuildinfo
# Yarn
.yarn/*
@@ -39,7 +39,6 @@ tsconfig.tsbuildinfo
# Enterprise devenv
/devenv/docker/blocks/grafana-enterprise
/devenv/docker/blocks/saml-enterprise
/tmp
tools/phantomjs/phantomjs

View File

@@ -1,8 +1,4 @@
#!/bin/sh
# Ignore husky hooks if no frontend code has been changed
git diff --cached --name-only | grep -v --quiet "^pkg/" || exit 0
. "$(dirname "$0")/_/husky.sh"
yarn run precommit

2
.nvmrc
View File

@@ -1 +1 @@
v16.14.0
v16.13.2

View File

@@ -1,27 +1,14 @@
.git
.github
.yarn
build
compiled
data
deployment_tools_config.json
devenv
dist
e2e/tmp
dist/
pkg/
node_modules
pkg
public/lib/monaco
public/sass/*.generated.scss
public/vendor/
vendor/
/data/
e2e/tmp
scripts/grafana-server/tmp
vendor
# TS generate from cue by cuetsy
**/*.gen.ts
# Auto-generated localisation files
public/locales/_build/
public/locales/**/*.js
# Auto-generated theme files
theme.light.generated.json
theme.dark.generated.json
public/build/
public/sass/*.generated.scss
devenv/
public/lib/monaco

4
.vscode/launch.json vendored
View File

@@ -8,15 +8,13 @@
"mode": "auto",
"program": "${workspaceFolder}/pkg/cmd/grafana-server/",
"env": {},
"cwd": "${workspaceFolder}",
"args": ["--homepath", "${workspaceFolder}", "--packaging", "dev"]
},
{
"name": "Debug Jest test",
"type": "node",
"request": "launch",
"runtimeExecutable": "yarn",
"runtimeArgs": ["run", "jest", "--runInBand", "${file}"],
"runtimeArgs": ["--inspect-brk", "${workspaceRoot}/node_modules/.bin/jest", "--runInBand", "${file}"],
"console": "integratedTerminal",
"internalConsoleOptions": "neverOpen",
"port": 9229

768
.yarn/releases/yarn-3.1.1.cjs vendored Executable file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -1,6 +1,6 @@
{
"name": "eslint",
"version": "8.11.0-sdk",
"version": "7.28.0-sdk",
"main": "./lib/api.js",
"type": "commonjs"
}

View File

@@ -1,6 +1,6 @@
{
"name": "prettier",
"version": "2.6.0-sdk",
"version": "2.2.1-sdk",
"main": "./index.js",
"type": "commonjs"
}

20
.yarn/sdks/stylelint/bin/stylelint.js vendored Executable file
View File

@@ -0,0 +1,20 @@
#!/usr/bin/env node
const {existsSync} = require(`fs`);
const {createRequire, createRequireFromPath} = require(`module`);
const {resolve} = require(`path`);
const relPnpApiPath = "../../../../.pnp.cjs";
const absPnpApiPath = resolve(__dirname, relPnpApiPath);
const absRequire = (createRequire || createRequireFromPath)(absPnpApiPath);
if (existsSync(absPnpApiPath)) {
if (!process.versions.pnp) {
// Setup the environment to be able to require stylelint/bin/stylelint.js
require(absPnpApiPath).setup();
}
}
// Defer to the real stylelint/bin/stylelint.js your application uses
module.exports = absRequire(`stylelint/bin/stylelint.js`);

20
.yarn/sdks/stylelint/lib/index.js vendored Normal file
View File

@@ -0,0 +1,20 @@
#!/usr/bin/env node
const {existsSync} = require(`fs`);
const {createRequire, createRequireFromPath} = require(`module`);
const {resolve} = require(`path`);
const relPnpApiPath = "../../../../.pnp.cjs";
const absPnpApiPath = resolve(__dirname, relPnpApiPath);
const absRequire = (createRequire || createRequireFromPath)(absPnpApiPath);
if (existsSync(absPnpApiPath)) {
if (!process.versions.pnp) {
// Setup the environment to be able to require stylelint/lib/index.js
require(absPnpApiPath).setup();
}
}
// Defer to the real stylelint/lib/index.js your application uses
module.exports = absRequire(`stylelint/lib/index.js`);

6
.yarn/sdks/stylelint/package.json vendored Normal file
View File

@@ -0,0 +1,6 @@
{
"name": "stylelint",
"version": "14.0.1-sdk",
"main": "lib/index.js",
"type": "commonjs"
}

View File

@@ -18,7 +18,6 @@ const moduleWrapper = tsserver => {
const pnpApi = require(`pnpapi`);
const isVirtual = str => str.match(/\/(\$\$virtual|__virtual__)\//);
const isPortal = str => str.startsWith("portal:/");
const normalize = str => str.replace(/\\/g, `/`).replace(/^\/?/, `/`);
const dependencyTreeRoots = new Set(pnpApi.getDependencyTreeRoots().map(locator => {
@@ -45,7 +44,7 @@ const moduleWrapper = tsserver => {
const resolved = isVirtual(str) ? pnpApi.resolveVirtual(str) : str;
if (resolved) {
const locator = pnpApi.findPackageLocator(resolved);
if (locator && (dependencyTreeRoots.has(`${locator.name}@${locator.reference}`) || isPortal(locator.reference))) {
if (locator && dependencyTreeRoots.has(`${locator.name}@${locator.reference}`)) {
str = resolved;
}
}
@@ -61,24 +60,16 @@ const moduleWrapper = tsserver => {
//
// Ref: https://github.com/microsoft/vscode/issues/105014#issuecomment-686760910
//
// Update 2021-10-08: VSCode changed their format in 1.61.
// Update Oct 8 2021: VSCode changed their format in 1.61.
// Before | ^zip:/c:/foo/bar.zip/package.json
// After | ^/zip//c:/foo/bar.zip/package.json
//
// Update 2022-04-06: VSCode changed the format in 1.66.
// Before | ^/zip//c:/foo/bar.zip/package.json
// After | ^/zip/c:/foo/bar.zip/package.json
//
case `vscode <1.61`: {
str = `^zip:${str}`;
} break;
case `vscode <1.66`: {
str = `^/zip/${str}`;
} break;
case `vscode`: {
str = `^/zip${str}`;
str = `^/zip/${str}`;
} break;
// To make "go to definition" work,
@@ -94,7 +85,7 @@ const moduleWrapper = tsserver => {
// everything else is up to neovim
case `neovim`: {
str = normalize(resolved).replace(/\.zip\//, `.zip::`);
str = `zipfile://${str}`;
str = `zipfile:${str}`;
} break;
default: {
@@ -109,7 +100,8 @@ const moduleWrapper = tsserver => {
function fromEditorPath(str) {
switch (hostInfo) {
case `coc-nvim`: {
case `coc-nvim`:
case `neovim`: {
str = str.replace(/\.zip::/, `.zip/`);
// The path for coc-nvim is in format of /<pwd>/zipfile:/<pwd>/.yarn/...
// So in order to convert it back, we use .* to match all the thing
@@ -119,12 +111,6 @@ const moduleWrapper = tsserver => {
: str.replace(/^.*zipfile:/, ``);
} break;
case `neovim`: {
str = str.replace(/\.zip::/, `.zip/`);
// The path for neovim is in format of zipfile:///<pwd>/.yarn/...
return str.replace(/^zipfile:\/\//, ``);
} break;
case `vscode`:
default: {
return process.platform === `win32`
@@ -157,9 +143,8 @@ const moduleWrapper = tsserver => {
let hostInfo = `unknown`;
Object.assign(Session.prototype, {
onMessage(/** @type {string | object} */ message) {
const isStringMessage = typeof message === 'string';
const parsedMessage = isStringMessage ? JSON.parse(message) : message;
onMessage(/** @type {string} */ message) {
const parsedMessage = JSON.parse(message)
if (
parsedMessage != null &&
@@ -168,23 +153,14 @@ const moduleWrapper = tsserver => {
typeof parsedMessage.arguments.hostInfo === `string`
) {
hostInfo = parsedMessage.arguments.hostInfo;
if (hostInfo === `vscode` && process.env.VSCODE_IPC_HOOK) {
if (/(\/|-)1\.([1-5][0-9]|60)\./.test(process.env.VSCODE_IPC_HOOK)) {
hostInfo += ` <1.61`;
} else if (/(\/|-)1\.(6[1-5])\./.test(process.env.VSCODE_IPC_HOOK)) {
hostInfo += ` <1.66`;
}
if (hostInfo === `vscode` && process.env.VSCODE_IPC_HOOK && process.env.VSCODE_IPC_HOOK.match(/Code\/1\.([1-5][0-9]|60)\./)) {
hostInfo += ` <1.61`;
}
}
const processedMessageJSON = JSON.stringify(parsedMessage, (key, value) => {
return typeof value === 'string' ? fromEditorPath(value) : value;
});
return originalOnMessage.call(
this,
isStringMessage ? processedMessageJSON : JSON.parse(processedMessageJSON)
);
return originalOnMessage.call(this, JSON.stringify(parsedMessage, (key, value) => {
return typeof value === `string` ? fromEditorPath(value) : value;
}));
},
send(/** @type {any} */ msg) {

View File

@@ -18,7 +18,6 @@ const moduleWrapper = tsserver => {
const pnpApi = require(`pnpapi`);
const isVirtual = str => str.match(/\/(\$\$virtual|__virtual__)\//);
const isPortal = str => str.startsWith("portal:/");
const normalize = str => str.replace(/\\/g, `/`).replace(/^\/?/, `/`);
const dependencyTreeRoots = new Set(pnpApi.getDependencyTreeRoots().map(locator => {
@@ -45,7 +44,7 @@ const moduleWrapper = tsserver => {
const resolved = isVirtual(str) ? pnpApi.resolveVirtual(str) : str;
if (resolved) {
const locator = pnpApi.findPackageLocator(resolved);
if (locator && (dependencyTreeRoots.has(`${locator.name}@${locator.reference}`) || isPortal(locator.reference))) {
if (locator && dependencyTreeRoots.has(`${locator.name}@${locator.reference}`)) {
str = resolved;
}
}
@@ -61,24 +60,16 @@ const moduleWrapper = tsserver => {
//
// Ref: https://github.com/microsoft/vscode/issues/105014#issuecomment-686760910
//
// Update 2021-10-08: VSCode changed their format in 1.61.
// Update Oct 8 2021: VSCode changed their format in 1.61.
// Before | ^zip:/c:/foo/bar.zip/package.json
// After | ^/zip//c:/foo/bar.zip/package.json
//
// Update 2022-04-06: VSCode changed the format in 1.66.
// Before | ^/zip//c:/foo/bar.zip/package.json
// After | ^/zip/c:/foo/bar.zip/package.json
//
case `vscode <1.61`: {
str = `^zip:${str}`;
} break;
case `vscode <1.66`: {
str = `^/zip/${str}`;
} break;
case `vscode`: {
str = `^/zip${str}`;
str = `^/zip/${str}`;
} break;
// To make "go to definition" work,
@@ -94,7 +85,7 @@ const moduleWrapper = tsserver => {
// everything else is up to neovim
case `neovim`: {
str = normalize(resolved).replace(/\.zip\//, `.zip::`);
str = `zipfile://${str}`;
str = `zipfile:${str}`;
} break;
default: {
@@ -109,7 +100,8 @@ const moduleWrapper = tsserver => {
function fromEditorPath(str) {
switch (hostInfo) {
case `coc-nvim`: {
case `coc-nvim`:
case `neovim`: {
str = str.replace(/\.zip::/, `.zip/`);
// The path for coc-nvim is in format of /<pwd>/zipfile:/<pwd>/.yarn/...
// So in order to convert it back, we use .* to match all the thing
@@ -119,12 +111,6 @@ const moduleWrapper = tsserver => {
: str.replace(/^.*zipfile:/, ``);
} break;
case `neovim`: {
str = str.replace(/\.zip::/, `.zip/`);
// The path for neovim is in format of zipfile:///<pwd>/.yarn/...
return str.replace(/^zipfile:\/\//, ``);
} break;
case `vscode`:
default: {
return process.platform === `win32`
@@ -157,9 +143,8 @@ const moduleWrapper = tsserver => {
let hostInfo = `unknown`;
Object.assign(Session.prototype, {
onMessage(/** @type {string | object} */ message) {
const isStringMessage = typeof message === 'string';
const parsedMessage = isStringMessage ? JSON.parse(message) : message;
onMessage(/** @type {string} */ message) {
const parsedMessage = JSON.parse(message)
if (
parsedMessage != null &&
@@ -168,23 +153,14 @@ const moduleWrapper = tsserver => {
typeof parsedMessage.arguments.hostInfo === `string`
) {
hostInfo = parsedMessage.arguments.hostInfo;
if (hostInfo === `vscode` && process.env.VSCODE_IPC_HOOK) {
if (/(\/|-)1\.([1-5][0-9]|60)\./.test(process.env.VSCODE_IPC_HOOK)) {
hostInfo += ` <1.61`;
} else if (/(\/|-)1\.(6[1-5])\./.test(process.env.VSCODE_IPC_HOOK)) {
hostInfo += ` <1.66`;
}
if (hostInfo === `vscode` && process.env.VSCODE_IPC_HOOK && process.env.VSCODE_IPC_HOOK.match(/Code\/1\.([1-5][0-9]|60)\./)) {
hostInfo += ` <1.61`;
}
}
const processedMessageJSON = JSON.stringify(parsedMessage, (key, value) => {
return typeof value === 'string' ? fromEditorPath(value) : value;
});
return originalOnMessage.call(
this,
isStringMessage ? processedMessageJSON : JSON.parse(processedMessageJSON)
);
return originalOnMessage.call(this, JSON.stringify(parsedMessage, (key, value) => {
return typeof value === `string` ? fromEditorPath(value) : value;
}));
},
send(/** @type {any} */ msg) {

View File

@@ -1,6 +1,6 @@
{
"name": "typescript",
"version": "4.6.4-sdk",
"version": "4.4.4-sdk",
"main": "./lib/typescript.js",
"type": "commonjs"
}

View File

@@ -9,32 +9,32 @@ packageExtensions:
"@mdx-js/loader@1.6.22":
peerDependencies:
react: 17.0.1
"@storybook/addon-docs@6.4.21":
"@storybook/addon-docs@6.4.15":
peerDependencies:
"@storybook/manager-webpack5": 6.4.21
"@storybook/addon-essentials@6.4.21":
"@storybook/manager-webpack5": 6.4.15
"@storybook/addon-essentials@6.4.15":
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":
"@storybook/components": 6.4.15
"@storybook/core-events": 6.4.15
"@storybook/manager-webpack5": 6.4.15
"@storybook/theming": 6.4.15
"@storybook/core-server@6.4.15":
peerDependencies:
"@babel/core": ^7.0.0
"@storybook/core@6.4.21":
"@storybook/core@6.4.15":
peerDependencies:
"@babel/core": ^7.0.0
"@storybook/manager-webpack5": 6.4.21
"@storybook/csf-tools@6.4.21":
"@storybook/manager-webpack5": 6.4.15
"@storybook/csf-tools@6.4.15":
peerDependencies:
"@babel/core": ^7.0.0
"@storybook/react@6.4.21":
"@storybook/react@6.4.15":
peerDependencies:
"@storybook/manager-webpack5": 6.4.21
"@storybook/manager-webpack5": 6.4.15
doctrine@3.0.0:
dependencies:
assert: 2.0.0
moveable@0.29.8:
moveable@0.27.3:
dependencies:
"@daybrush/utils": 1.6.0
framework-utils: ^1.1.0
@@ -49,13 +49,13 @@ packageExtensions:
react-compat-css-styled@1.0.8:
dependencies:
react-simple-compat: 1.2.1
react-compat-moveable@0.17.8:
react-compat-moveable@0.15.2:
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.7.0
gesto: ^1.4.0
overlap-area: ^1.0.0
react-simple-compat: 1.2.1
peerDependencies:
@@ -78,4 +78,4 @@ plugins:
- path: .yarn/plugins/@yarnpkg/plugin-outdated.cjs
spec: "https://mskelton.dev/yarn-outdated/v2"
yarnPath: .yarn/releases/yarn-3.2.1.cjs
yarnPath: .yarn/releases/yarn-3.1.1.cjs

View File

@@ -1,541 +1,3 @@
<!-- 9.0.0-beta3 START -->
# 9.0.0-beta3 (2022-06-06)
### Features and enhancements
- **Alerting:** Add provenance guard to config api. [#50147](https://github.com/grafana/grafana/pull/50147), [@JohnnyQQQQ](https://github.com/JohnnyQQQQ)
- **Alerting:** Make folder filter clearable in Alert list panel. [#50093](https://github.com/grafana/grafana/pull/50093), [@peterholmberg](https://github.com/peterholmberg)
- **Alerting:** Provisioning API - Alert rules. [#47930](https://github.com/grafana/grafana/pull/47930), [@JohnnyQQQQ](https://github.com/JohnnyQQQQ)
- **Alerting:** Remove Image Upload code from Slack notifier. [#50062](https://github.com/grafana/grafana/pull/50062), [@joeblubaugh](https://github.com/joeblubaugh)
- **Alerting:** Remove double quotes from matchers. [#50038](https://github.com/grafana/grafana/pull/50038), [@gotjosh](https://github.com/gotjosh)
- **Cloudwatch:** Dynamic labels autocomplete. [#49794](https://github.com/grafana/grafana/pull/49794), [@sunker](https://github.com/sunker)
- **Datasource:** Remove deprecated max_idle_connections_per_host setting. [#49948](https://github.com/grafana/grafana/pull/49948), [@marefr](https://github.com/marefr)
- **Datasource:** Remove support for unencrypted passwords. [#49987](https://github.com/grafana/grafana/pull/49987), [@marefr](https://github.com/marefr)
- **Dependencies:** Update to Golang version `1.17.11`. [#50253](https://github.com/grafana/grafana/pull/50253), [@dsotirakis](https://github.com/dsotirakis)
- **Loki:** Run query when pressing Enter on line-filters. [#49913](https://github.com/grafana/grafana/pull/49913), [@svennergr](https://github.com/svennergr)
- **Metrics:** Remove support for using summaries instead of histogram for HTTP instrumentation. [#49985](https://github.com/grafana/grafana/pull/49985), [@bergquist](https://github.com/bergquist)
- **Plugins:** Remove deprecated /api/tsdb/query metrics endpoint. [#49916](https://github.com/grafana/grafana/pull/49916), [@wbrowne](https://github.com/wbrowne)
- **Plugins:** Support headers field for check health. [#49930](https://github.com/grafana/grafana/pull/49930), [@marefr](https://github.com/marefr)
- **Prometheus/Loki:** Add raw query and syntax highlight in explain mode. [#50070](https://github.com/grafana/grafana/pull/50070), [@aocenas](https://github.com/aocenas)
- **Prometheus:** Migrate metadata queries to use resource calls. [#49921](https://github.com/grafana/grafana/pull/49921), [@srclosson](https://github.com/srclosson)
- **RBAC:** Make RBAC action names more consistent. [#49730](https://github.com/grafana/grafana/pull/49730), [@IevaVasiljeva](https://github.com/IevaVasiljeva)
- **RBAC:** Make RBAC action names more consistent. (Enterprise)
- **Settings:** Sunset non-duration based login lifetime config. [#49944](https://github.com/grafana/grafana/pull/49944), [@sakjur](https://github.com/sakjur)
- **[9.0.x] Alerting:** Update alert rule diff to not see difference between nil and empty map. [#50198](https://github.com/grafana/grafana/pull/50198), [@yuri-tceretian](https://github.com/yuri-tceretian)
### Bug fixes
- **Alerting:** Fix alert list panel showing firing alerts with no instances. [#50069](https://github.com/grafana/grafana/pull/50069), [@gillesdemey](https://github.com/gillesdemey)
- **Alerting:** Fix notification policy "Override grouping" form save. [#50031](https://github.com/grafana/grafana/pull/50031), [@JacobsonMT](https://github.com/JacobsonMT)
- **Alerting:** Remove double quotes from matchers. [#50046](https://github.com/grafana/grafana/pull/50046), [@alexweav](https://github.com/alexweav)
- **Alerting:** Use correct permission scope for external AM updates. [#50159](https://github.com/grafana/grafana/pull/50159), [@gillesdemey](https://github.com/gillesdemey)
- **Datasource:** Fix allowed cookies to be forwarded as header to backend datasources. [#49541](https://github.com/grafana/grafana/pull/49541), [@marefr](https://github.com/marefr)
- **Licensing:** Fix trial expiration warning. (Enterprise)
- **Loki:** Fix uncaught errors if `labelKey` contains special characters. [#49887](https://github.com/grafana/grafana/pull/49887), [@svennergr](https://github.com/svennergr)
- **Prometheus:** Fix aligning of labels of exemplars after backend migration. [#49924](https://github.com/grafana/grafana/pull/49924), [@aocenas](https://github.com/aocenas)
- **SharePDF:** Fix repeated datasource variables in PDF. (Enterprise)
- **State Timeline:** Fix Null Value Filling and Value Transformation. [#50054](https://github.com/grafana/grafana/pull/50054), [@codeincarnate](https://github.com/codeincarnate)
- **Usage stats:** Divide collection into multiple functions to isolate failures. [#49928](https://github.com/grafana/grafana/pull/49928), [@sakjur](https://github.com/sakjur)
### Breaking changes
Removes support for storing/using datasource `password` and `basicAuthPassword` unencrypted which was [deprecated in Grafana v8.1.0](https://grafana.com/docs/grafana/latest/installation/upgrading/#use-of-unencrypted-passwords-for-data-sources-no-longer-supported). Please use `secureJsonData.password` and `secureJsonData.basicAuthPassword`. Issue [#49987](https://github.com/grafana/grafana/issues/49987)
Removes the option to instrument HTTP request in Grafana using summaries instead of histograms. Issue [#49985](https://github.com/grafana/grafana/issues/49985)
Removes support for deprecated dataproxy.max_idle_connections_per_host setting. Please use max_idle_connections instead. Issue [#49948](https://github.com/grafana/grafana/issues/49948)
Removes the deprecated `getFormStyles` function from grafana-ui.
Prefer using `GrafanaTheme2` and the `useStyles2` hook. Issue [#49945](https://github.com/grafana/grafana/issues/49945)
The configuration options `auth.login_maximum_inactive_lifetime_days` and `auth.login_maximum_lifetime_days` were deprecated in Grafana v7.2.0 and have now been removed. Use `login_maximum_inactive_lifetime_duration` and `login_maximum_lifetime_duration` to customize the maximum lifetime of a login session. Issue [#49944](https://github.com/grafana/grafana/issues/49944)
Removed the deprecated `isFocused` and `isInvalid` props from the `InlineLabel` component. These props haven't done anything for a while, so migration is just a matter of removing the props. Issue [#49929](https://github.com/grafana/grafana/issues/49929)
Removed the deprecated `onColorChange` prop from `ColorPicker`. Moving forward the `onChange` prop should be used. Issue [#49923](https://github.com/grafana/grafana/issues/49923)
`/api/tsdb/query` API has been removed. Use [/api/ds/query](https://grafana.com/docs/grafana/latest/http_api/data_source/#query-a-data-source) instead.
Issue [#49916](https://github.com/grafana/grafana/issues/49916)
`onClipboardCopy` and `onClipboardError` APIs have been changed such that the callback's argument is just the text that's been copied rather than the old `ClipboardEvent` interface.
Migration should just be a matter of going from
```tsx
<ClipboardButton
{/*other props... */}
onClipboardCopy={(e) => {
console.log(`Text "${e.text}" was copied!`);
}}
/>
```
to
````tsx
<ClipboardButton
{/* other props... */}
onClipboardCopy={(copiedText) => {
console.log(`Text "${copiedText}" was copied!`);
}}
/>
``` Issue [#49847](https://github.com/grafana/grafana/issues/49847)
The following RBAC action renames have been carried out:
* `users.authtoken:update` -> `users.authtoken:write`;
* `users.password:update` -> `users.password:write`;
* `users.permissions:update` -> `users.permissions:write`;
* `users.quotas:update` -> `users.quotas:write`;
* `org.users.role:update` -> `org.users:write`;
* `alert.instances:update` -> `alert.instances:write`;
* `alert.rules:update` -> `alert.rules:write`;
* `users.authtoken:list` -> `users.authtoken:read`;
* `users.quotas:list` -> `users.quotas:read`;
* `users.teams:read` -> replaced by `users.read` + `teams:read`
We've added a migration from the old action names to the new names and have updated our documentation. But you will have to update any scripts and provisioning files that are using the old action names. Issue [#49730](https://github.com/grafana/grafana/issues/49730)
The following RBAC action renames have been carried out:
* `reports.admin:write` -> `reports:write`;
* `reports.admin:create` -> `reports:create`;
* `licensing:update` -> `licensing:write`;
* `roles:list` -> `roles:read`;
* `teams.roles:list` -> `teams.roles:read`;
* `users.roles:list` -> `users.roles:read`;
* `users.permissions:list` -> `users.permissions:read`
We've added a migration from the old action names to the new names and have updated our documentation. But you will have to update any scripts and provisioning files that are using the old action names. Issue [#3372](https://github.com/grafana/grafana/issues/3372)
### Plugin development fixes & changes
- **UI:** Remove deprecated getFormStyles function. [#49945](https://github.com/grafana/grafana/pull/49945), [@kaydelaney](https://github.com/kaydelaney)
- **InlineLabel:** Remove deprecated props. [#49929](https://github.com/grafana/grafana/pull/49929), [@kaydelaney](https://github.com/kaydelaney)
- **ColorPicker:** Remove deprecated onColorChange prop. [#49923](https://github.com/grafana/grafana/pull/49923), [@kaydelaney](https://github.com/kaydelaney)
- **ClipboardButton:** Simplify callbacks. [#49847](https://github.com/grafana/grafana/pull/49847), [@kaydelaney](https://github.com/kaydelaney)
<!-- 9.0.0-beta3 END -->
<!-- 9.0.0-beta2 START -->
# 9.0.0-beta2 (2022-05-31)
### Features and enhancements
- **Alerting:** Add legacy indicator to navbar. [#49511](https://github.com/grafana/grafana/pull/49511), [@peterholmberg](https://github.com/peterholmberg)
- **Alerting:** Add templated subject config to email notifier. [#49742](https://github.com/grafana/grafana/pull/49742), [@JacobsonMT](https://github.com/JacobsonMT)
- **Alerting:** Enable Unified Alerting for open source and enterprise. [#49834](https://github.com/grafana/grafana/pull/49834), [@grobinson-grafana](https://github.com/grobinson-grafana)
- **Alerting:** Make alertmanager datasource stable. [#49485](https://github.com/grafana/grafana/pull/49485), [@gillesdemey](https://github.com/gillesdemey)
- **Angular:** Remove deprecated angular modal support and libs. [#49781](https://github.com/grafana/grafana/pull/49781), [@torkelo](https://github.com/torkelo)
- **AuthProxy:** Remove deprecated ldap_sync_ttl setting. [#49902](https://github.com/grafana/grafana/pull/49902), [@kalleep](https://github.com/kalleep)
- **Build:** Enable long term caching for frontend assets. [#47625](https://github.com/grafana/grafana/pull/47625), [@jackw](https://github.com/jackw)
- **Chore:** Remove deprecated TextDisplayOptions export. [#49705](https://github.com/grafana/grafana/pull/49705), [@kaydelaney](https://github.com/kaydelaney)
- **Chore:** Remove deprecated `surface` prop from IconButton. [#49715](https://github.com/grafana/grafana/pull/49715), [@kaydelaney](https://github.com/kaydelaney)
- **Chore:** Remove usage of deprecated getColorForTheme function. [#49519](https://github.com/grafana/grafana/pull/49519), [@kaydelaney](https://github.com/kaydelaney)
- **DatePicker:** Add minDate prop. [#49503](https://github.com/grafana/grafana/pull/49503), [@alexanderzobnin](https://github.com/alexanderzobnin)
- **Notification history:** Enable by default. [#49502](https://github.com/grafana/grafana/pull/49502), [@ashharrison90](https://github.com/ashharrison90)
- **Prometheus:** Add pluginVersion to query. [#49414](https://github.com/grafana/grafana/pull/49414), [@toddtreece](https://github.com/toddtreece)
- **Prometheus:** Enable prometheusStreamingJSONParser by default. [#49475](https://github.com/grafana/grafana/pull/49475), [@toddtreece](https://github.com/toddtreece)
- **Prometheus:** Predefined scopes for Azure authentication. [#49557](https://github.com/grafana/grafana/pull/49557), [@kostrse](https://github.com/kostrse)
- **Prometheus:** Streaming JSON parser performance improvements. [#48792](https://github.com/grafana/grafana/pull/48792), [@toddtreece](https://github.com/toddtreece)
- **ValueMapping:** Add support for regex replacement over multiple lines. [#49607](https://github.com/grafana/grafana/pull/49607), [@ashharrison90](https://github.com/ashharrison90)
### Bug fixes
- **Accessibility:** Pressing escape in a Modal or DashboardSettings correctly closes the overlay. [#49500](https://github.com/grafana/grafana/pull/49500), [@ashharrison90](https://github.com/ashharrison90)
- **Alerting:** Validate alert notification UID length. [#45546](https://github.com/grafana/grafana/pull/45546), [@wbrowne](https://github.com/wbrowne)
- **BackendSrv:** Throw an error when fetching an invalid JSON. [#47493](https://github.com/grafana/grafana/pull/47493), [@leventebalogh](https://github.com/leventebalogh)
- **Fix:** Timeseries migration regex override. [#49629](https://github.com/grafana/grafana/pull/49629), [@zoltanbedi](https://github.com/zoltanbedi)
- **Loki:** Fix unwrap parsing in query builder. [#49732](https://github.com/grafana/grafana/pull/49732), [@ivanahuckova](https://github.com/ivanahuckova)
- **Navigation:** Position hamburger menu correctly in mobile view. [#49603](https://github.com/grafana/grafana/pull/49603), [@ashharrison90](https://github.com/ashharrison90)
- **PanelEditor:** Fixes issue with Table view and multi data frames. [#49854](https://github.com/grafana/grafana/pull/49854), [@JoaoSilvaGrafana](https://github.com/JoaoSilvaGrafana)
- **Preferences:** Fix updating of preferences for Navbar and Query History. [#49677](https://github.com/grafana/grafana/pull/49677), [@ivanahuckova](https://github.com/ivanahuckova)
- **TimeRange:** Fixes issue when zooming out on a timerange with timespan 0. [#49622](https://github.com/grafana/grafana/pull/49622), [@JoaoSilvaGrafana](https://github.com/JoaoSilvaGrafana)
- **Variables:** Fixes DS variables not being correctly used in panel queries. [#49323](https://github.com/grafana/grafana/pull/49323), [@JoaoSilvaGrafana](https://github.com/JoaoSilvaGrafana)
### Breaking changes
Drop support for deprecated setting ldap_sync_ttl under [auth.proxy]
Only sync_ttl will work from now on Issue [#49902](https://github.com/grafana/grafana/issues/49902)
Removes support for deprecated `heading` and `description` props. Moving forward, the `Card.Heading` and `Card.Description` components should be used. Issue [#49885](https://github.com/grafana/grafana/issues/49885)
Removes the deprecated `link` variant from the `Button` component.
To migrate, replace any usage of `variant="link"` with `fill="text"`. Issue [#49843](https://github.com/grafana/grafana/issues/49843)
Removes the deprecated `surface` prop from the `IconButton` component. This prop hasn't actually done anything for a while, so it should be safe to just remove any instances of its usage.
Issue [#49715](https://github.com/grafana/grafana/issues/49715)
Removes the deprecated `TextDisplayOptions` export from `@grafana/data` in favor of `VizTextDisplayOptions` from `@grafana/schema`. To migrate, just replace usage of `TextDisplayOptions` with `VizTextDisplayOptions`. Issue [#49705](https://github.com/grafana/grafana/issues/49705)
Removed support for the deprecated `getColorForTheme(color: string, theme: GrafanaTheme)` function in favor of the
`theme.visualization.getColorByName(color: string)` method. The output of this method is identical to the removed function, so migration should just be a matter of rewriting calls of `getColorForTheme(myColor, myTheme)` to `myTheme.visualization.getColorByName(myColor)`.
Issue [#49519](https://github.com/grafana/grafana/issues/49519)
In the Prometheus data source, for consistency and performance reasons, we changed how we represent `NaN` (not a number) values received from Prometheus. In the past versions, we converted these to `null` in the frontend (for dashboard and explore), and kept as `NaN` in the alerting path. Starting with this version, we will always keep it as `NaN`. This change should be mostly invisible for the users. Issue [#49475](https://github.com/grafana/grafana/issues/49475)
Plugins using custom Webpack configs could potentially break due to the changes between webpack@4 and webpack@5. Please refer to the [official migration guide](https://webpack.js.org/migrate/5/) for assistance.
Webpack 5 does not include polyfills for node.js core modules by default (e.g. `buffer`, `stream`, `os`). This can result in failed builds for plugins. If polyfills are required it is recommended to create a custom webpack config in the root of the plugin repo and add the required fallbacks:
```js
// webpack.config.js
module.exports.getWebpackConfig = (config, options) => ({
...config,
resolve: {
...config.resolve,
fallback: {
os: require.resolve('os-browserify/browser'),
stream: require.resolve('stream-browserify'),
timers: require.resolve('timers-browserify'),
},
},
});
````
Please refer to the webpack build error messages or the [official migration guide](https://webpack.js.org/migrate/5/) for assistance with fallbacks.
**Which issue(s) this PR fixes**:
<!--
- Automatically closes linked issue when the Pull Request is merged.
Usage: "Fixes #<issue number>", or "Fixes (paste link of issue)"
-->
Fixes #
**Special notes for your reviewer**:
It does not bump the following dependencies to the very latest due to the latest versions being ES modules:
- ora
- globby
- execa
- chalk
Issue [#47826](https://github.com/grafana/grafana/issues/47826)
We have changed the internals of `backendSrv.fetch()` to throw an error when the response is an incorrect JSON.
```javascript
// PREVIOUSLY: this was returning with an empty object {} - in case the response is an invalid JSON
return await getBackendSrv().post(`${API_ROOT}/${id}/install`);
// AFTER THIS CHANGE: the following will throw an error - in case the response is an invalid JSON
return await getBackendSrv().post(`${API_ROOT}/${id}/install`);
```
**When is the response handled as JSON?**
- If the response has the `"Content-Type: application/json"` header, OR
- If the backendSrv options ([`BackendSrvRequest`](https://github.com/grafana/grafana/blob/e237ff20a996c7313632b2e28f38032012f0e340/packages/grafana-runtime/src/services/backendSrv.ts#L8)) specify the response as JSON: `{ responseType: 'json' }`
**How does it work after this change?**
- In case it is recognised as a JSON response and the response is empty, it returns an empty object `{}`
- In case it is recognised as a JSON response and it has formatting errors, it throws an error
**How to migrate?**
Make sure to handle possible errors on the callsite where using `backendSrv.fetch()` (or any other `backendSrv` methods). Issue [#47493](https://github.com/grafana/grafana/issues/47493)
### Plugin development fixes & changes
- **UI/Card:** Remove deprecated props. [#49885](https://github.com/grafana/grafana/pull/49885), [@kaydelaney](https://github.com/kaydelaney)
- **UI/Button:** Remove deprecated "link" variant. [#49843](https://github.com/grafana/grafana/pull/49843), [@kaydelaney](https://github.com/kaydelaney)
- **Toolkit:** Bump dependencies. [#47826](https://github.com/grafana/grafana/pull/47826), [@jackw](https://github.com/jackw)
<!-- 9.0.0-beta2 END -->
<!-- 9.0.0-beta1 START -->
# 9.0.0-beta1 (2022-05-24)
### Features and enhancements
- **AccessControl:** Add setting for permission cache. (Enterprise)
- **AccessControl:** Check dashboard permissions for reports. (Enterprise)
- **Auth:** Remove grafana ui dependency to the aws sdk. [#43559](https://github.com/grafana/grafana/pull/43559), [@sunker](https://github.com/sunker)
- **BasicRoles:** Add API endpoint to reset basic roles permissions to factory. (Enterprise)
- **LDAP Mapping:** Allow Grafana Admin mapping without org role. [#37189](https://github.com/grafana/grafana/pull/37189), [@krzysdabro](https://github.com/krzysdabro)
- **Licensing:** Only enforce total number of users. (Enterprise)
- **Loki:** do not convert NaN to null. [#45389](https://github.com/grafana/grafana/pull/45389), [@gabor](https://github.com/gabor)
- **Report:** API support for multiple dashboards. (Enterprise)
- **Report:** Support sending embedded image in the report email. (Enterprise)
- **Report:** UI for multiple dashboards. (Enterprise)
- **Reporting:** Remove redundant empty attachment when export to CSV is enabled. (Enterprise)
- **SAML:** Implement Name Templates for assertion_attribute_name option. (Enterprise)
- **SSE/Alerting:** Support prom instant vector responses. [#44865](https://github.com/grafana/grafana/pull/44865), [@kylebrandt](https://github.com/kylebrandt)
- **Tracing:** Add trace to metrics config behind feature toggle. [#46298](https://github.com/grafana/grafana/pull/46298), [@connorlindsey](https://github.com/connorlindsey)
### Bug fixes
- **Fix:** Prevent automatic parsing of string data types to numbers. [#46035](https://github.com/grafana/grafana/pull/46035), [@joshhunt](https://github.com/joshhunt)
- **Prometheus:** Fix inconsistent labels in exemplars resulting in marshal json error. [#46135](https://github.com/grafana/grafana/pull/46135), [@hanjm](https://github.com/hanjm)
### Breaking changes
In the Loki data source, for consistency and performance reasons, we changed how we represent `NaN` (not a number) values received from Loki. In the past versions, we converted these to `null` in the frontend (for dashboard and explore), and kept as `NaN` in the alerting path. Starting with this version, we will always keep it as `NaN`. This change should be mostly invisible for the users. Issue [#45389](https://github.com/grafana/grafana/issues/45389)
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)
<!-- 9.0.0-beta1 END -->
<!-- 8.5.4 START -->
# 8.5.4 (2022-05-30)
### Features and enhancements
- **Alerting:** Remove disabled flag for data source when migrating alerts. [#48559](https://github.com/grafana/grafana/pull/48559), [@yuri-tceretian](https://github.com/yuri-tceretian)
- **Alerting:** Show notification tab of legacy alerting only to editor. [#49624](https://github.com/grafana/grafana/pull/49624), [@yuri-tceretian](https://github.com/yuri-tceretian)
- **Alerting:** Update migration to migrate only alerts that belong to existing org\dashboard. [#49192](https://github.com/grafana/grafana/pull/49192), [@yuri-tceretian](https://github.com/yuri-tceretian)
- **AzureMonitor:** Do not quote variables when a custom "All" variable option is used. [#49428](https://github.com/grafana/grafana/pull/49428), [@andresmgot](https://github.com/andresmgot)
- **AzureMonitor:** Update allowed namespaces. [#48468](https://github.com/grafana/grafana/pull/48468), [@jcolladokuri](https://github.com/jcolladokuri)
- **CloudMonitor:** Correctly encode default project response. [#49510](https://github.com/grafana/grafana/pull/49510), [@aangelisc](https://github.com/aangelisc)
- **Cloudwatch:** Add support for new AWS/RDS EBS\* metrics. [#48798](https://github.com/grafana/grafana/pull/48798), [@szymonpk](https://github.com/szymonpk)
- **InfluxDB:** Use backend for influxDB by default via feature toggle. [#48453](https://github.com/grafana/grafana/pull/48453), [@yesoreyeram](https://github.com/yesoreyeram)
- **Legend:** Use correct unit for percent and count calculations. [#49004](https://github.com/grafana/grafana/pull/49004), [@dprokop](https://github.com/dprokop)
- **LokI:** use millisecond steps in Grafana 8.5.x. [#48630](https://github.com/grafana/grafana/pull/48630), [@gabor](https://github.com/gabor)
- **Plugins:** Introduce HTTP 207 Multi Status response to api/ds/query. [#48550](https://github.com/grafana/grafana/pull/48550), [@wbrowne](https://github.com/wbrowne)
- **Reporting:** Improve PDF file size using grid layout. (Enterprise)
- **Transformations:** Add an All Unique Values Reducer. [#48653](https://github.com/grafana/grafana/pull/48653), [@josiahg](https://github.com/josiahg)
- **Transformers:** avoid error when the ExtractFields source field is missing. [#49368](https://github.com/grafana/grafana/pull/49368), [@wardbekker](https://github.com/wardbekker)
- **[v8.5.x] Alerting:** Update migration to migrate only alerts that belong to existing org\dashboard. [#49199](https://github.com/grafana/grafana/pull/49199), [@grafanabot](https://github.com/grafanabot)
- **[v8.5.x] Reporting:** Improve PDF file size using grid layout. (Enterprise)
### Bug fixes
- **Alerting:** Allow disabling override timings for notification policies. [#48648](https://github.com/grafana/grafana/pull/48648), [@gillesdemey](https://github.com/gillesdemey)
- **Alerting:** Allow serving images from custom url path. [#49022](https://github.com/grafana/grafana/pull/49022), [@gillesdemey](https://github.com/gillesdemey)
- **Alerting:** Apply Custom Headers to datasource queries. [#47860](https://github.com/grafana/grafana/pull/47860), [@joeblubaugh](https://github.com/joeblubaugh)
- **Alerting:** Fix RBAC actions for notification policies. [#49185](https://github.com/grafana/grafana/pull/49185), [@yuri-tceretian](https://github.com/yuri-tceretian)
- **Alerting:** Fix access to alerts for viewer with editor permissions when RBAC is disabled. [#49270](https://github.com/grafana/grafana/pull/49270), [@yuri-tceretian](https://github.com/yuri-tceretian)
- **Alerting:** Fix anonymous access to alerting. [#49203](https://github.com/grafana/grafana/pull/49203), [@yuri-tceretian](https://github.com/yuri-tceretian)
- **Alerting:** correctly show all alerts in a folder. [#48684](https://github.com/grafana/grafana/pull/48684), [@gillesdemey](https://github.com/gillesdemey)
- **AzureMonitor:** Fixes metric definition for Azure Storage queue/file/blob/table resources. [#49101](https://github.com/grafana/grafana/pull/49101), [@aangelisc](https://github.com/aangelisc)
- **Dashboard:** Fix dashboard update permission check. [#48746](https://github.com/grafana/grafana/pull/48746), [@IevaVasiljeva](https://github.com/IevaVasiljeva)
- **DashboardExport:** Fix exporting and importing dashboards where query data source ended up as incorrect. [#48410](https://github.com/grafana/grafana/pull/48410), [@torkelo](https://github.com/torkelo)
- **FileUpload:** clicking the `Upload file` button now opens the modal correctly. [#48766](https://github.com/grafana/grafana/pull/48766), [@ashharrison90](https://github.com/ashharrison90)
- **GrafanaUI:** Fix color of links in error Tooltips in light theme. [#49327](https://github.com/grafana/grafana/pull/49327), [@joshhunt](https://github.com/joshhunt)
- **LibraryPanels:** Fix library panels not connecting properly in imported dashboards. [#49161](https://github.com/grafana/grafana/pull/49161), [@joshhunt](https://github.com/joshhunt)
- **Loki:** Improve unpack parser handling. [#49074](https://github.com/grafana/grafana/pull/49074), [@gabor](https://github.com/gabor)
- **RolePicker:** Fix menu position on smaller screens. [#48429](https://github.com/grafana/grafana/pull/48429), [@Clarity-89](https://github.com/Clarity-89)
- **TimeRange:** Fixes updating time range from url and browser history. [#48657](https://github.com/grafana/grafana/pull/48657), [@torkelo](https://github.com/torkelo)
- **TimeSeries:** Fix detection & rendering of sparse datapoints. [#48841](https://github.com/grafana/grafana/pull/48841), [@leeoniya](https://github.com/leeoniya)
- **Timeseries:** Fix outside range stale state. [#49633](https://github.com/grafana/grafana/pull/49633), [@ryantxu](https://github.com/ryantxu)
- **Tooltip:** Fix links not legible in Tooltips when using light theme. [#48748](https://github.com/grafana/grafana/pull/48748), [@joshhunt](https://github.com/joshhunt)
- **Tooltip:** Sort decimals using standard numeric compare. [#49084](https://github.com/grafana/grafana/pull/49084), [@dprokop](https://github.com/dprokop)
- **Transforms:** Labels to fields, fix label picker layout. [#49304](https://github.com/grafana/grafana/pull/49304), [@torkelo](https://github.com/torkelo)
- **Variables:** Fixes issue with data source variables not updating queries with variable. [#49478](https://github.com/grafana/grafana/pull/49478), [@torkelo](https://github.com/torkelo)
- **[v8.5.x] Alerting:** Fix RBAC actions for notification policies (#49185). [#49348](https://github.com/grafana/grafana/pull/49348), [@yuri-tceretian](https://github.com/yuri-tceretian)
- **[v8.5.x] Alerting:** Fix access to alerts for viewer with editor permissions when RBAC is disabled. [#49427](https://github.com/grafana/grafana/pull/49427), [@konrad147](https://github.com/konrad147)
- **[v8.5.x] Alerting:** Fix anonymous access to alerting. [#49268](https://github.com/grafana/grafana/pull/49268), [@yuri-tceretian](https://github.com/yuri-tceretian)
### Breaking changes
For a data source query made via /api/ds/query :
- If the `DatasourceQueryMultiStatus` feature is enabled and
- The data source response has an error set as part of the `DataResponse`, the resulting HTTP status code is now `207 Multi Status` instead of `400 Bad gateway`
- If the `DatasourceQueryMultiStatus` feature is **not** enabled and
- The data source response has an error set as part of the `DataResponse`, the resulting HTTP status code is `400 Bad Request` (no breaking change)
--> Issue [#48550](https://github.com/grafana/grafana/issues/48550)
<!-- 8.5.4 END -->
<!-- 8.5.3 START -->
# 8.5.3
### Bug fixes
- **Security:** fixes CVE-2022-29170. [#49240](https://github.com/grafana/grafana/pull/49240), [@xlson](https://github.com/xlson)
<!-- 8.5.3 END -->
<!-- 8.5.2 START -->
# 8.5.2 (2022-05-03)
### Features and enhancements
- **Alerting:** Add safeguard for migrations that might cause dataloss. [#48526](https://github.com/grafana/grafana/pull/48526), [@JohnnyQQQQ](https://github.com/JohnnyQQQQ)
- **AzureMonitor:** Add support for not equals and startsWith operators when creating Azure Metrics dimension filters. [#48077](https://github.com/grafana/grafana/pull/48077), [@aangelisc](https://github.com/aangelisc)
- **Elasticsearch:** Add deprecation notice for < 7.10 versions. [#48506](https://github.com/grafana/grafana/pull/48506), [@ivanahuckova](https://github.com/ivanahuckova)
- **Traces:** Filter by service/span name and operation in Tempo and Jaeger. [#48209](https://github.com/grafana/grafana/pull/48209), [@joey-grafana](https://github.com/joey-grafana)
### Bug fixes
- **AzureAd Oauth:** Fix strictMode to reject users without an assigned role. [#48474](https://github.com/grafana/grafana/pull/48474), [@kyschouv](https://github.com/kyschouv)
- **CloudWatch:** Fix variable query tag migration. [#48587](https://github.com/grafana/grafana/pull/48587), [@iwysiu](https://github.com/iwysiu)
- **Plugins:** Ensure catching all appropriate 4xx api/ds/query scenarios. [#47565](https://github.com/grafana/grafana/pull/47565), [@wbrowne](https://github.com/wbrowne)
<!-- 8.5.2 END -->
<!-- 8.5.1 START -->
# 8.5.1 (2022-04-27)
### Bug fixes
- **Azure Monitor:** Fix space character encoding for metrics query link to Azure Portal. [#48139](https://github.com/grafana/grafana/pull/48139), [@kevinwcyu](https://github.com/kevinwcyu)
- **CloudWatch:** Prevent log groups from being removed on query change. [#47994](https://github.com/grafana/grafana/pull/47994), [@asimpson](https://github.com/asimpson)
- **Cloudwatch:** Fix template variables in variable queries. [#48140](https://github.com/grafana/grafana/pull/48140), [@iwysiu](https://github.com/iwysiu)
- **Explore:** Prevent direct access to explore if disabled via feature toggle. [#47714](https://github.com/grafana/grafana/pull/47714), [@Elfo404](https://github.com/Elfo404)
- **InfluxDB:** Fixes invalid no data alerts. [#48295](https://github.com/grafana/grafana/pull/48295), [@yesoreyeram](https://github.com/yesoreyeram)
- **Navigation:** Prevent navbar briefly showing on login. [#47968](https://github.com/grafana/grafana/pull/47968), [@ashharrison90](https://github.com/ashharrison90)
- **Plugins Catalog:** Fix styling of hyperlinks. [#48196](https://github.com/grafana/grafana/pull/48196), [@marefr](https://github.com/marefr)
- **Table:** Fix filter crashes table. [#48258](https://github.com/grafana/grafana/pull/48258), [@zoltanbedi](https://github.com/zoltanbedi)
- **TimeSeries:** Properly stack series with missing datapoints. [#48321](https://github.com/grafana/grafana/pull/48321), [@leeoniya](https://github.com/leeoniya)
<!-- 8.5.1 END -->
<!-- 8.5.0 START -->
# 8.5.0 (2022-04-21)
### Features and enhancements
- **Alerting:** Add contact points provisioning API. [#47197](https://github.com/grafana/grafana/pull/47197), [@JohnnyQQQQ](https://github.com/JohnnyQQQQ)
- **Alerting:** Add resolved count to notification title when both firing and resolved present. [#46697](https://github.com/grafana/grafana/pull/46697), [@JacobsonMT](https://github.com/JacobsonMT)
- **Alerting:** Alert rule should wait For duration when execution error state is Alerting. [#47052](https://github.com/grafana/grafana/pull/47052), [@grobinson-grafana](https://github.com/grobinson-grafana)
- **Alerting:** Classic conditions can now display multiple values. [#46971](https://github.com/grafana/grafana/pull/46971), [@gotjosh](https://github.com/gotjosh)
- **Alerting:** Display query from grafana-managed alert rules on `/api/v1/rules`. [#45969](https://github.com/grafana/grafana/pull/45969), [@gotjosh](https://github.com/gotjosh)
- **Alerting:** Enhance support for arbitrary group names in managed alerts. [#47785](https://github.com/grafana/grafana/pull/47785), [@gillesdemey](https://github.com/gillesdemey)
- **Alerting:** add field for custom slack endpoint. [#45751](https://github.com/grafana/grafana/pull/45751), [@nathanrodman](https://github.com/nathanrodman)
- **Azure Monitor :** Adding json formatting of error messages in Panel Header Corner and Inspect Error Tab. [#44877](https://github.com/grafana/grafana/pull/44877), [@yaelleC](https://github.com/yaelleC)
- **Azure Monitor:** Add 2 more Curated Dashboards for VM Insights. [#45187](https://github.com/grafana/grafana/pull/45187), [@jcolladokuri](https://github.com/jcolladokuri)
- **CloudWatch:** Handle new error codes for MetricInsights. [#47033](https://github.com/grafana/grafana/pull/47033), [@Gabrielopesantos](https://github.com/Gabrielopesantos)
- **Dashboards:** show changes in save dialog. [#46557](https://github.com/grafana/grafana/pull/46557), [@ryantxu](https://github.com/ryantxu)
- **DataSource:** Default data source is no longer a persisted state but just the default data source for new panels. [#45132](https://github.com/grafana/grafana/pull/45132), [@torkelo](https://github.com/torkelo)
- **DataSourcePlugin API:** Allow queries import when changing data source type. [#47435](https://github.com/grafana/grafana/pull/47435), [@dprokop](https://github.com/dprokop)
- **Explore:** Remove return to panel button. [#45018](https://github.com/grafana/grafana/pull/45018), [@gelicia](https://github.com/gelicia)
- **Explore:** allow users to save Explore state to a new panel in a new dashboard. [#45148](https://github.com/grafana/grafana/pull/45148), [@Elfo404](https://github.com/Elfo404)
- **Instrumentation:** Proxy status code correction and various improvements. [#47473](https://github.com/grafana/grafana/pull/47473), [@marefr](https://github.com/marefr)
- **Logging:** Introduce feature toggle to activate gokit/log format. [#47336](https://github.com/grafana/grafana/pull/47336), [@ying-jeanne](https://github.com/ying-jeanne)
- **NewsPanel:** Add support for Atom feeds. [#45390](https://github.com/grafana/grafana/pull/45390), [@kaydelaney](https://github.com/kaydelaney)
- **Plugins:** Add deprecation notice for /api/tsdb/query endpoint. [#45238](https://github.com/grafana/grafana/pull/45238), [@wbrowne](https://github.com/wbrowne)
- **Plugins:** Adding support for traceID field to accept variables. [#45559](https://github.com/grafana/grafana/pull/45559), [@vinisdl](https://github.com/vinisdl)
- **PostgreSQL:** \_\_unixEpochGroup to support arithmetic expression as argument. [#46764](https://github.com/grafana/grafana/pull/46764), [@s0nik42](https://github.com/s0nik42)
- **Profile/Help:** Expose option to disable profile section and help menu. [#46308](https://github.com/grafana/grafana/pull/46308), [@cameronwaterman](https://github.com/cameronwaterman)
- **Prometheus:** Enable new visual query builder by default. [#46634](https://github.com/grafana/grafana/pull/46634), [@torkelo](https://github.com/torkelo)
- **SAML:** Allow disabling of SAML signups. [#47481](https://github.com/grafana/grafana/pull/47481), [@mmandrus](https://github.com/mmandrus)
- **SAML:** Allow disabling of SAML signups. (Enterprise)
- **Table:** New pagination option. [#45732](https://github.com/grafana/grafana/pull/45732), [@zoltanbedi](https://github.com/zoltanbedi)
- **TablePanel:** Add cell inspect option. [#45620](https://github.com/grafana/grafana/pull/45620), [@dprokop](https://github.com/dprokop)
- **Tempo / Trace Viewer:** Support Span Links in Trace Viewer. [#45632](https://github.com/grafana/grafana/pull/45632), [@Shachi16](https://github.com/Shachi16)
- **Tempo:** Download span references in data inspector. [#47074](https://github.com/grafana/grafana/pull/47074), [@connorlindsey](https://github.com/connorlindsey)
- **Tempo:** Separate trace to logs and loki search datasource config. [#46655](https://github.com/grafana/grafana/pull/46655), [@connorlindsey](https://github.com/connorlindsey)
- **Trace View:** Show number of child spans. [#44393](https://github.com/grafana/grafana/pull/44393), [@tharun208](https://github.com/tharun208)
- **Transformations:** Support escaped characters in key-value pair parsing. [#47901](https://github.com/grafana/grafana/pull/47901), [@aangelisc](https://github.com/aangelisc)
### Bug fixes
- **Azure Monitor:** Bug Fix for incorrect variable cascading for template variables. [#47478](https://github.com/grafana/grafana/pull/47478), [@jcolladokuri](https://github.com/jcolladokuri)
- **CloudWatch:** List all metrics properly in SQL autocomplete. [#45898](https://github.com/grafana/grafana/pull/45898), [@sunker](https://github.com/sunker)
- **CloudWatch:** Run query on blur in logs query field. [#47454](https://github.com/grafana/grafana/pull/47454), [@fridgepoet](https://github.com/fridgepoet)
- **Dashboard:** Template variables are now correctly persisted when clicking breadcrumb links. [#46790](https://github.com/grafana/grafana/pull/46790), [@ashharrison90](https://github.com/ashharrison90)
- **DashboardPage:** Remember scroll position when coming back panel edit / view panel. [#47639](https://github.com/grafana/grafana/pull/47639), [@torkelo](https://github.com/torkelo)
- **Panel Edit:** Options search now works correctly when a logarithmic scale option is set. [#47927](https://github.com/grafana/grafana/pull/47927), [@ashharrison90](https://github.com/ashharrison90)
- **Postgres:** Return tables with hyphenated schemes. [#45754](https://github.com/grafana/grafana/pull/45754), [@zuchka](https://github.com/zuchka)
- **Table panel:** Fix horizontal scrolling when pagination is enabled. [#47776](https://github.com/grafana/grafana/pull/47776), [@dprokop](https://github.com/dprokop)
- **Variables:** Ensure variables in query params are correctly recognised. [#47049](https://github.com/grafana/grafana/pull/47049), [@ashharrison90](https://github.com/ashharrison90)
- **Variables:** Fix crash when changing query variable datasource. [#44957](https://github.com/grafana/grafana/pull/44957), [@joshhunt](https://github.com/joshhunt)
- **Visualizations:** Stack negative-valued series downwards. [#47373](https://github.com/grafana/grafana/pull/47373), [@leeoniya](https://github.com/leeoniya)
### Breaking changes
For a proxied request, e.g. Grafana's datasource or plugin proxy:
- If the request is cancelled, e.g. from the browser/by the client, the HTTP status code is now `499 Client closed request` instead of `502 Bad gateway`
- If the request times out, e.g. takes longer time than allowed, the HTTP status code is now `504 Gateway timeout` instead of `502 Bad gateway`. Issue [#47473](https://github.com/grafana/grafana/issues/47473)
The change in behavior is that negative-valued series are now stacked downwards from 0 (in their own stacks), rather than downwards from the top of the positive stacks. We now automatically group stacks by Draw style, Line interpolation, and Bar alignment, making it impossible to stack bars on top of lines, or smooth lines on top of stepped lines. Issue [#47373](https://github.com/grafana/grafana/issues/47373)
The meaning of the default data source has now changed from being a persisted property in a panel. Before when you selected the default data source for a panel and later changed the default data source to another data source it would change all panels who were configured to use the default data source. From now on the default data source is just the default for new panels and changing the default will not impact any currently saved dashboards. Issue [#45132](https://github.com/grafana/grafana/issues/45132)
The Tooltip component provided by `@grafana/ui` is no longer automatically interactive (that is you can hover onto it and click a link or select text). It will from now on by default close automatically when you mouse out from the trigger element. To make tooltips behave like before set the new `interactive` property to true.
Issue [#45053](https://github.com/grafana/grafana/issues/45053)
### Deprecations
`/api/tsdb/query` API has been deprecated and will be removed in a future release. Use [/api/ds/query](https://grafana.com/docs/grafana/latest/http_api/data_source/#query-a-data-source) instead. Issue [#45238](https://github.com/grafana/grafana/issues/45238)
### Plugin development fixes & changes
- **Card:** Increase clickable area when meta items are present. [#47935](https://github.com/grafana/grafana/pull/47935), [@ashharrison90](https://github.com/ashharrison90)
- **Loki:** Fix operator description propup from being shortened. [#46575](https://github.com/grafana/grafana/pull/46575), [@glintik](https://github.com/glintik)
- **Tooltips:** Make tooltips non interactive by default. [#45053](https://github.com/grafana/grafana/pull/45053), [@torkelo](https://github.com/torkelo)
<!-- 8.5.0 END -->
<!-- 8.5.0-beta1 START -->
# 8.5.0-beta1 (2022-04-06)
### Features and enhancements
- Add config option to enable/disable reporting. (Enterprise)
- **Alerting:** Accurately set value for prom-compatible APIs. [#47216](https://github.com/grafana/grafana/pull/47216), [@gotjosh](https://github.com/gotjosh)
- **Alerting:** Provisioning API - Notification Policies. [#46755](https://github.com/grafana/grafana/pull/46755), [@alexweav](https://github.com/alexweav)
- **Alerting:** Notification URL points to alert view page instead of alert edit page. [#47752](https://github.com/grafana/grafana/pull/47752), [@joeblubaugh](https://github.com/joeblubaugh)
- **Analytics:** Enable grafana and plugin update checks to be operated independently. [#46352](https://github.com/grafana/grafana/pull/46352), [@wbrowne](https://github.com/wbrowne)
- **Azure Monitor:** Add support for multiple template variables in resource picker. [#46215](https://github.com/grafana/grafana/pull/46215), [@sarahzinger](https://github.com/sarahzinger)
- **Caching:** Add separate TTL for resources cache. (Enterprise)
- **Caching:** add support for TLS configuration for Redis Cluster. (Enterprise)
- **NewsPanel:** Remove Use Proxy option and update documentation with recommendations. [#47189](https://github.com/grafana/grafana/pull/47189), [@joshhunt](https://github.com/joshhunt)
- **OAuth:** Sync GitHub OAuth user name to Grafana if it's set. [#45438](https://github.com/grafana/grafana/pull/45438), [@pallxk](https://github.com/pallxk)
### Bug fixes
- **Plugins:** Fix Default Nav URL for dashboard includes. [#47143](https://github.com/grafana/grafana/pull/47143), [@wbrowne](https://github.com/wbrowne)
### Breaking changes
When user is using Github OAuth, GitHub login is showed as both Grafana login and name. Now the GitHub name is showed as Grafana name, and GitHub login is showed as Grafana Login. Issue [#45438](https://github.com/grafana/grafana/issues/45438)
The meaning of the default data source has now changed from being a persisted property in a panel. Before when you selected the default data source for a panel and later changed the default data source to another data source it would change all panels who were configured to use the default data source. From now on the default data source is just the default for new panels and changing the default will not impact any currently saved dashboards. Issue [#45132](https://github.com/grafana/grafana/issues/45132)
<!-- 8.4.7 START -->
# 8.4.7 (2022-04-19)
### Features and enhancements
- **CloudWatch:** Added missing MemoryDB Namespace metrics. [#47290](https://github.com/grafana/grafana/pull/47290), [@james-deee](https://github.com/james-deee)
- **Histogram Panel:** Take decimal into consideration. [#47330](https://github.com/grafana/grafana/pull/47330), [@mdvictor](https://github.com/mdvictor)
- **TimeSeries:** Sort tooltip values based on raw values. [#46738](https://github.com/grafana/grafana/pull/46738), [@dprokop](https://github.com/dprokop)
### Bug fixes
- **API:** Include userId, orgId, uname in request logging middleware. [#47183](https://github.com/grafana/grafana/pull/47183), [@marefr](https://github.com/marefr)
- **Elasticsearch:** Respect maxConcurrentShardRequests datasource setting. [#47120](https://github.com/grafana/grafana/pull/47120), [@alexandrst88](https://github.com/alexandrst88)
<!-- 8.4.7 END -->
<!-- 8.5.0-beta1 END -->
<!-- 8.4.6 START -->
# 8.4.6 (2022-04-12)
- **Security:** Fixes CVE-2022-24812. For more information, see our [blog](https://grafana.com/blog/2022/04/12/grafana-enterprise-8.4.6-released-with-high-severity-security-fix/)
<!-- 8.4.6 END -->
<!-- 8.4.5 START -->
# 8.4.5 (2022-03-31)
### Features and enhancements
- **Instrumentation:** Make backend plugin metrics endpoints available with optional authentication. [#46467](https://github.com/grafana/grafana/pull/46467), [@marefr](https://github.com/marefr)
- **Table panel:** Show datalinks for cell display modes JSON View and Gauge derivates. [#46020](https://github.com/grafana/grafana/pull/46020), [@mdvictor](https://github.com/mdvictor)
### Bug fixes
- **Azure Monitor:** Small bug fixes for Resource Picker. [#46665](https://github.com/grafana/grafana/pull/46665), [@sarahzinger](https://github.com/sarahzinger)
- **Logger:** Use specified format for file logger. [#46970](https://github.com/grafana/grafana/pull/46970), [@sakjur](https://github.com/sakjur)
- **Logs:** Handle missing fields in dataframes better. [#46963](https://github.com/grafana/grafana/pull/46963), [@gabor](https://github.com/gabor)
- **ManageDashboards:** Fix error when deleting all dashboards from folder view. [#46877](https://github.com/grafana/grafana/pull/46877), [@joshhunt](https://github.com/joshhunt)
<!-- 8.4.5 END -->
<!-- 8.4.4 START -->
# 8.4.4 (2022-03-16)
@@ -682,43 +144,6 @@ AngularJS plugin support is now in a deprecated state, meaning it will be remove
- **News:** Reload feed when changing the time range or refreshing. [#42217](https://github.com/grafana/grafana/pull/42217), [@ashharrison90](https://github.com/ashharrison90)
- **UI/Plot:** Implement keyboard controls for plot cursor. [#42244](https://github.com/grafana/grafana/pull/42244), [@kaydelaney](https://github.com/kaydelaney)
<!-- 8.3.7 START -->
# 8.3.7 (2022-03-01)
### Bug fixes
- **Provisioning:** Ensure that the default value for orgID is set when provisioning datasources to be deleted. [#44244](https://github.com/grafana/grafana/pull/44244), [@filewalkwithme](https://github.com/filewalkwithme)
<!-- 8.3.7 END -->
<!-- 8.3.6 START -->
# 8.3.6 (2022-02-09)
### Features and enhancements
- **Cloud Monitoring:** Reduce request size when listing labels. [#44365](https://github.com/grafana/grafana/pull/44365), [@mtanda](https://github.com/mtanda)
- **Explore:** Show scalar data result in a table instead of graph. [#44362](https://github.com/grafana/grafana/pull/44362), [@tharun208](https://github.com/tharun208)
- **Snapshots:** Updates the default external snapshot server URL. [#44563](https://github.com/grafana/grafana/pull/44563), [@DanCech](https://github.com/DanCech)
- **Table:** Makes footer not overlap table content. [#44210](https://github.com/grafana/grafana/pull/44210), [@dprokop](https://github.com/dprokop)
- **Tempo:** Add request histogram to service graph datalink. [#44671](https://github.com/grafana/grafana/pull/44671), [@connorlindsey](https://github.com/connorlindsey)
- **Tempo:** Add time range to tempo search query behind a feature flag. [#43811](https://github.com/grafana/grafana/pull/43811), [@connorlindsey](https://github.com/connorlindsey)
- **Tempo:** Auto-clear results when changing query type. [#44390](https://github.com/grafana/grafana/pull/44390), [@connorlindsey](https://github.com/connorlindsey)
- **Tempo:** Display start time in search results as relative time. [#44568](https://github.com/grafana/grafana/pull/44568), [@tharun208](https://github.com/tharun208)
### Bug fixes
- **CloudMonitoring:** Fix resource labels in query editor. [#44550](https://github.com/grafana/grafana/pull/44550), [@iwysiu](https://github.com/iwysiu)
- **Cursor sync:** Apply the settings without saving the dashboard. [#44270](https://github.com/grafana/grafana/pull/44270), [@dprokop](https://github.com/dprokop)
- **LibraryPanels:** Fix for Error while cleaning library panels. [#45033](https://github.com/grafana/grafana/pull/45033), [@hugohaggmark](https://github.com/hugohaggmark)
- **Logs Panel:** fix timestamp parsing for string dates without timezone. [#44664](https://github.com/grafana/grafana/pull/44664), [@Elfo404](https://github.com/Elfo404)
- **Prometheus:** Fix some of the alerting queries that use reduce/math operation. [#44380](https://github.com/grafana/grafana/pull/44380), [@ivanahuckova](https://github.com/ivanahuckova)
- **TablePanel:** Fix ad-hoc variables not working on default datasources. [#44314](https://github.com/grafana/grafana/pull/44314), [@joshhunt](https://github.com/joshhunt)
- **Text Panel:** Fix alignment of elements. [#44313](https://github.com/grafana/grafana/pull/44313), [@ashharrison90](https://github.com/ashharrison90)
- **Variables:** Fix for constant variables in self referencing links. [#44631](https://github.com/grafana/grafana/pull/44631), [@hugohaggmark](https://github.com/hugohaggmark)
<!-- 8.3.6 END -->
<!-- 8.4.0-beta1 END -->
<!-- 8.3.5 START -->
@@ -916,7 +341,7 @@ The access mode "browser" is deprecated in the following data sources and will b
### Features and enhancements
- **AccessControl:** Apply role-based access control to licensing. (Enterprise)
- **AccessControl:** Apply fine-grained access control to licensing. (Enterprise)
- **Alerting:** Add UI for contact point testing with custom annotations and labels. [#40491](https://github.com/grafana/grafana/pull/40491), [@nathanrodman](https://github.com/nathanrodman)
- **Alerting:** Make alert state indicator in panel header work with Grafana 8 alerts. [#38713](https://github.com/grafana/grafana/pull/38713), [@domasx2](https://github.com/domasx2)
- **Alerting:** Option for Discord notifier to use webhook name. [#40463](https://github.com/grafana/grafana/pull/40463), [@Skyebold](https://github.com/Skyebold)

View File

@@ -20,7 +20,7 @@ COPY emails emails
ENV NODE_ENV production
RUN yarn build
FROM golang:1.17.11-alpine3.15 as go-builder
FROM golang:1.17.8-alpine3.15 as go-builder
RUN apk add --no-cache gcc g++ make

View File

@@ -21,7 +21,7 @@ COPY emails emails
ENV NODE_ENV production
RUN yarn build
FROM golang:1.17.11 AS go-builder
FROM golang:1.17.8 AS go-builder
WORKDIR /src/grafana

View File

@@ -80,6 +80,7 @@ The current team members are:
- Emil Tullstedt ([Grafana Labs](https://grafana.com/))
- Erik Sundell ([Grafana Labs](https://grafana.com/))
- Fredrik Enestad ([Embark Studios](https://www.embark-studios.com/))
- Hugo Häggmark ([Grafana Labs](https://grafana.com/))
- Ivana Huckova ([Grafana Labs](https://grafana.com/))
- Jeroen Op 't Eynde ([Grafana Labs](https://grafana.com/))
- Jessica Müller ([Grafana Labs](https://grafana.com/))
@@ -99,7 +100,7 @@ The current team members are:
- Ryan McKinley ([Grafana Labs](https://grafana.com/))
- Sofia Papagiannaki ([Grafana Labs](https://grafana.com/))
- Stephanie Closson ([Grafana Labs](https://grafana.com/))
- Tobias Skarhed ([CERN](https://home.web.cern.ch/))
- Tobias Skarhed ([Grafana Labs](https://grafana.com/))
- Torkel Ödegaard ([Grafana Labs](https://grafana.com/))
- Utkarsh Bhatnagar ([Tinder](https://www.tinder.com/))
- Will Browne ([Grafana Labs](https://grafana.com/))

View File

@@ -1,5 +0,0 @@
# Hall of fame
List of previous team members that have had a big impact on the company or the product and contributed during a long period of time.
- Hugo Häggmark ([School of applied technology](https://salt.study))

View File

@@ -77,11 +77,11 @@ Instructions for setting up filters in Gmail can be found [here](#setting-up-gma
## 2. Ensure the issue contains basic information
Before triaging an issue very far, make sure that the issue's author provided the standard issue information. This will help you make an educated recommendation on how to categorize the issue. The Grafana project utilizes [GitHub issue templates](https://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/configuring-issue-templates-for-your-repository) to guide contributors to provide standard information that must be included for each type of template or type of issue.
Before triaging an issue very far, make sure that the issue's author provided the standard issue information. This will help you make an educated recommendation on how to categorize the issue. The Grafana project utilizes [GitHub issue templates](https://help.github.com/en/articles/creating-issue-templates-for-your-repository) to guide contributors to provide standard information that must be included for each type of template or type of issue.
### Standard issue information that must be included
Given a certain [issue template](https://github.com/grafana/grafana/issues/new/choose) have been used by the issue author or depending how the issue is perceived by the issue triage responsible, the following should help you understand what standard issue information that must be included.
Given a certain [issue template](<[template](https://github.com/grafana/grafana/issues/new/choose)>) have been used by the issue author or depending how the issue is perceived by the issue triage responsible, the following should help you understand what standard issue information that must be included.
#### Bug reports
@@ -192,7 +192,7 @@ First, evaluate if the documentation makes sense to be included in the Grafana p
- Is this something we want/can maintain as a project?
- Is this referring to usage of some specific integration/tool and in that case is that a popular use case in combination with Grafana?
- If unsure, kindly and politely add a comment explaining that we would need [upvotes](https://github.blog/2016-03-10-add-reactions-to-pull-requests-issues-and-comments) to identify that lots of other users want/need this.
- If unsure, kindly and politely add a comment explaining that we would need [upvotes](https://help.github.com/en/articles/about-conversations-on-github#reacting-to-ideas-in-comments) to identify that lots of other users want/need this.
Second, label the issue `type/docs` and at least one `area/*` or `datasource/*` label.
@@ -296,13 +296,13 @@ 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 [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.
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://help.github.com/en/articles/about-conversations-on-github#reacting-to-ideas-in-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.
For some other combinations it may not be possible at all for a maintainer to setup a proper test environment to investigate the issue. In these cases we really appreciate any help we can get from the community. Otherwise the issue is highly likely to be closed.
Even if you don't have the time or knowledge to investigate an issue we highly recommend that you [upvote](https://github.blog/2016-03-10-add-reactions-to-pull-requests-issues-and-comments) the issue if you happen to have the same problem. If you have further details that may help investigating the issue please provide as much information as possible.
Even if you don't have the time or knowledge to investigate an issue we highly recommend that you [upvote](https://help.github.com/en/articles/about-conversations-on-github#reacting-to-ideas-in-comments) the issue if you happen to have the same problem. If you have further details that may help investigating the issue please provide as much information as possible.
## Automation

View File

@@ -17,8 +17,6 @@ packages/grafana-toolkit/
packages/grafana-ui/
packages/jaeger-ui-components/
packaging/
pkg/coremodel/
pkg/framework/coremodel/
grafana-mixin/
cue/
```

View File

@@ -14,8 +14,6 @@ GO_FILES ?= ./pkg/...
SH_FILES ?= $(shell find ./scripts -name *.sh)
API_DEFINITION_FILES = $(shell find ./pkg/api/docs/definitions -name '*.go' -print)
SWAGGER_TAG ?= latest
GO_BUILD_FLAGS += $(if $(GO_BUILD_DEV),-dev)
GO_BUILD_FLAGS += $(if $(GO_BUILD_TAGS),-build-tags=$(GO_BUILD_TAGS))
all: deps build
@@ -35,7 +33,7 @@ node_modules: package.json yarn.lock ## Install node modules.
##@ Swagger
SPEC_TARGET = public/api-spec.json
MERGED_SPEC_TARGET := public/api-merged.json
NGALERT_SPEC_TARGET = pkg/services/ngalert/api/tooling/api.json
NGALERT_SPEC_TARGET = pkg/services/ngalert/api/tooling/post.json
$(SPEC_TARGET): $(API_DEFINITION_FILES) ## Generate API spec
docker run --rm -it \
@@ -50,13 +48,13 @@ $(SPEC_TARGET): $(API_DEFINITION_FILES) ## Generate API spec
-x "github.com/prometheus/alertmanager" \
-i /grafana/pkg/api/docs/tags.json
swagger-api-spec: gen-go $(SPEC_TARGET) $(MERGED_SPEC_TARGET) validate-api-spec
swagger-api-spec: gen-go $(SPEC_TARGET) $(MERGED_SPEC_TARGET)
$(NGALERT_SPEC_TARGET):
+$(MAKE) -C pkg/services/ngalert/api/tooling api.json
+$(MAKE) -C pkg/services/ngalert/api/tooling post.json
$(MERGED_SPEC_TARGET): $(SPEC_TARGET) $(NGALERT_SPEC_TARGET) ## Merge generated and ngalert API specs
go run pkg/api/docs/merge/merge_specs.go -o=public/api-merged.json $(<) pkg/services/ngalert/api/tooling/api.json
go run pkg/api/docs/merge/merge_specs.go -o=public/api-merged.json $(<) pkg/services/ngalert/api/tooling/post.json
ensure_go-swagger_mac:
@hash swagger &>/dev/null || (brew tap go-swagger/go-swagger && brew install go-swagger)
@@ -67,7 +65,7 @@ ensure_go-swagger_mac:
-x "github.com/prometheus/alertmanager" \
-i pkg/api/docs/tags.json
swagger-api-spec-mac: gen-go --swagger-api-spec-mac $(MERGED_SPEC_TARGET) validate-api-spec
swagger-api-spec-mac: gen-go --swagger-api-spec-mac $(MERGED_SPEC_TARGET)
validate-api-spec: $(MERGED_SPEC_TARGET) ## Validate API spec
docker run --rm -it \
@@ -89,15 +87,15 @@ gen-go: $(WIRE)
build-go: $(MERGED_SPEC_TARGET) gen-go ## Build all Go binaries.
@echo "build go files"
$(GO) run build.go $(GO_BUILD_FLAGS) build
$(GO) run build.go build
build-server: ## Build Grafana server.
@echo "build server"
$(GO) run build.go $(GO_BUILD_FLAGS) build-server
$(GO) run build.go build-server
build-cli: ## Build Grafana CLI application.
@echo "build grafana-cli"
$(GO) run build.go $(GO_BUILD_FLAGS) build-cli
$(GO) run build.go build-cli
build-js: ## Build frontend assets.
@echo "build frontend"

View File

@@ -1,14 +1,14 @@
![Grafana](docs/logo-horizontal.png)
The open-source platform for monitoring and observability
The open-source platform for monitoring and observability.
[![License](https://img.shields.io/github/license/grafana/grafana)](LICENSE)
[![Drone](https://drone.grafana.net/api/badges/grafana/grafana/status.svg)](https://drone.grafana.net/grafana/grafana)
[![Go Report Card](https://goreportcard.com/badge/github.com/grafana/grafana)](https://goreportcard.com/report/github.com/grafana/grafana)
Grafana allows you to query, visualize, alert on and understand your metrics no matter where they are stored. Create, explore, and share dashboards with your team and foster a data-driven culture:
Grafana allows you to query, visualize, alert on and understand your metrics no matter where they are stored. Create, explore, and share dashboards with your team and foster a data driven culture:
- **Visualizations:** Fast and flexible client side graphs with a multitude of options. Panel plugins offer many different ways to visualize metrics and logs.
- **Visualize:** Fast and flexible client side graphs with a multitude of options. Panel plugins offer many different ways to visualize metrics and logs.
- **Dynamic Dashboards:** Create dynamic & reusable dashboards with template variables that appear as dropdowns at the top of the dashboard.
- **Explore Metrics:** Explore your data through ad-hoc queries and dynamic drilldown. Split view and compare different time ranges, queries and data sources side by side.
- **Explore Logs:** Experience the magic of switching from metrics to logs with preserved label filters. Quickly search through all your logs or streaming them live.

View File

@@ -15,7 +15,6 @@ Upgrading Go or Node.js requires making changes in many different files. See bel
- `grafana/build-container`
- Appveyor
- Dockerfile
- `.github/workflows/publish.yml`
## Go dependencies

View File

@@ -9,9 +9,6 @@ app_mode = production
# instance name, defaults to HOSTNAME environment variable value or hostname if HOSTNAME var is empty
instance_name = ${HOSTNAME}
# force migration will run migrations that might cause dataloss
force_migration = false
#################################### Paths ###############################
[paths]
# Path to where grafana can store temp files, sessions, and the sqlite3 db (if that is used)
@@ -196,19 +193,12 @@ reporting_enabled = true
reporting_distributor = grafana-labs
# Set to false to disable all checks to https://grafana.com
# for new versions of grafana. The check is used
# in some UI views to notify that a grafana update exists.
# for new versions (grafana itself and plugins), check is used
# in some UI views to notify that grafana or plugin update exists
# This option does not cause any auto updates, nor send any information
# only a GET request to https://raw.githubusercontent.com/grafana/grafana/main/latest.json to get the latest version.
# only a GET request to https://grafana.com to get latest versions
check_for_updates = true
# Set to false to disable all checks to https://grafana.com
# for new versions of plugins. The check is used
# in some UI views to notify that a plugin update exists.
# This option does not cause any auto updates, nor send any information
# only a GET request to https://grafana.com to get the latest versions.
check_for_plugin_updates = true
# Google Analytics universal tracking code, only enabled if you specify an id here
google_analytics_ua_id =
@@ -233,9 +223,6 @@ application_insights_connection_string =
# Optional. Specifies an Application Insights endpoint URL where the endpoint string is wrapped in backticks ``.
application_insights_endpoint_url =
# Controls if the UI contains any links to user feedback forms
feedback_links_enabled = true
#################################### Security ############################
[security]
# disable creation of admin user on first start of grafana
@@ -305,18 +292,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';"""
# Controls if old angular plugins are supported or not. This will be disabled by default in future release
angular_support_enabled = true
[security.encryption]
# Defines the time-to-live (TTL) for decrypted data encryption keys stored in memory (cache).
# Please note that small values may cause performance issues due to a high frequency decryption operations.
data_keys_cache_ttl = 15m
# Defines the frequency of data encryption keys cache cleanup interval.
# On every interval, decrypted data encryption keys that reached the TTL are removed from the cache.
data_keys_cache_cleanup_interval = 1m
#################################### Snapshots ###########################
[snapshots]
# snapshot sharing options
@@ -477,8 +452,6 @@ token_url = https://gitlab.com/oauth/token
api_url = https://gitlab.com/api/v4
allowed_domains =
allowed_groups =
role_attribute_path =
role_attribute_strict = false
#################################### Google Auth #########################
[auth.google]
@@ -523,7 +496,6 @@ auth_url = https://login.microsoftonline.com/<tenant-id>/oauth2/v2.0/authorize
token_url = https://login.microsoftonline.com/<tenant-id>/oauth2/v2.0/token
allowed_domains =
allowed_groups =
role_attribute_strict = false
#################################### Okta OAuth #######################
[auth.okta]
@@ -584,6 +556,8 @@ enabled = false
header_name = X-WEBAUTH-USER
header_property = username
auto_sign_up = true
# Deprecated, use sync_ttl instead
ldap_sync_ttl = 60
sync_ttl = 60
whitelist =
headers =
@@ -611,7 +585,7 @@ allow_sign_up = true
# LDAP background sync (Enterprise only)
# At 1 am every day
sync_cron = "0 1 * * *"
sync_cron = "0 0 1 * * *"
active_sync_enabled = true
#################################### AWS ###########################
@@ -643,12 +617,6 @@ managed_identity_enabled = false
# Should be set for user-assigned identity and should be empty for system-assigned identity
managed_identity_client_id =
#################################### Role-based Access Control ###########
[rbac]
enabled = true
# If enabled, cache permissions in a in memory cache (Enterprise only)
permission_cache = true
#################################### SMTP / Emailing #####################
[smtp]
enabled = false
@@ -841,22 +809,6 @@ max_attempts = 3
# The interval string is a possibly signed sequence of decimal numbers, followed by a unit suffix (ms, s, m, h, d), e.g. 30s or 1m.
min_interval = 10s
[unified_alerting.screenshots]
# Enable screenshots in notifications. This option requires a remote HTTP image rendering service. Please
# see [rendering] for further configuration options.
capture = false
# 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
# the total number of concurrent screenshots across all Grafana services.
max_concurrent_screenshots = 5
# Uploads screenshots to the local Grafana server or remote storage such as Azure, S3 and GCS. Please
# see [external_image_storage] for further configuration options. If this option is false then
# screenshots will be persisted to disk for up to temp_data_lifetime.
upload_external_image_storage = false
#################################### 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.
@@ -925,20 +877,10 @@ max_annotations_to_keep =
# Enable the Explore section
enabled = true
#################################### Help #############################
[help]
# Enable the Help section
enabled = true
#################################### Profile #############################
[profile]
# Enable the Profile section
enabled = true
#################################### Query History #############################
[query_history]
# Enable the Query history
enabled = true
enabled = false
#################################### Internal Grafana Metrics ############
# Metrics available at HTTP URL /metrics and /metrics/plugins/:pluginId
@@ -972,7 +914,6 @@ url = https://grafana.com
url = https://grafana.com
#################################### Distributed tracing ############
# Opentracing is deprecated use opentelemetry instead
[tracing.jaeger]
# jaeger destination (ex localhost:6831)
address =
@@ -999,15 +940,6 @@ disable_shared_zipkin_spans = false
[tracing.opentelemetry.jaeger]
# jaeger destination (ex http://localhost:14268/api/traces)
address =
# Propagation specifies the text map propagation format: w3c, jaeger
propagation =
# This is a configuration for OTLP exporter with GRPC protocol
[tracing.opentelemetry.otlp]
# otlp destination (ex localhost:4317)
address =
# Propagation specifies the text map propagation format: w3c, jaeger
propagation =
#################################### External Image Storage ##############
[external_image_storage]
@@ -1169,24 +1101,6 @@ license_path =
# enable = feature1,feature2
enable =
# The new prometheus visual query builder
promQueryBuilder = true
# The new loki visual query builder
lokiQueryBuilder = true
# Experimental Explore to Dashboard workflow
explore2Dashboard = true
# Experimental Command Palette
commandPalette = true
# Use dynamic labels in CloudWatch datasource
cloudWatchDynamicLabels = true
# New expandable navigation
newNavigation = true
# feature1 = true
# feature2 = false
@@ -1220,22 +1134,3 @@ default_baselayer_config =
# Enable or disable loading other base map layers
enable_custom_baselayers = true
#################################### Dashboard previews #####################################
[dashboard_previews.crawler]
# Number of dashboards rendered in parallel. Default is 6.
thread_count =
# Timeout passed down to the Image Renderer plugin. It is used in two separate places within a single rendering request:
# First during the initial navigation to the dashboard and then when waiting for all the panels to load. Default is 20s.
# This setting should be expressed as a duration. Examples: 10s (seconds), 1m (minutes).
rendering_timeout =
# Maximum duration of a single crawl. Default is 1h.
# This setting should be expressed as a duration. Examples: 10s (seconds), 1m (minutes).
max_crawl_duration =
# Minimum interval between two subsequent scheduler runs. Default is 12h.
# This setting should be expressed as a duration. Examples: 10s (seconds), 1m (minutes).
scheduler_interval =

View File

@@ -1,68 +1,76 @@
# ---
# # config file version
# apiVersion: 2
# apiVersion: 1
# # <list> list of roles to insert/update/delete
# roles:
# # <string, required> name of the role you want to create or update. Required.
# - name: 'custom:users:writer'
# # <string> uid of the role. Has to be unique for all orgs.
# uid: customuserswriter1
# # <string> description of the role, informative purpose only.
# description: 'Create, read, write users'
# # <int> version of the role, Grafana will update the role when increased.
# version: 2
# # <int> org id. Defaults to Grafana's default if not specified.
# # list of default built-in role assignments that should be removed
# removeDefaultAssignments:
# # <string>, must be one of the Organization roles (`Viewer`, `Editor`, `Admin`) or `Grafana Admin`
# - builtInRole: "Grafana Admin"
# # <string>, must be one of the existing fixed roles
# fixedRole: "fixed:permissions:admin"
# # list of default built-in role assignments that should be added back
# addDefaultAssignments:
# # <string>, must be one of the Organization roles (`Viewer`, `Editor`, `Admin`) or `Grafana Admin`
# - builtInRole: "Admin"
# # <string>, must be one of the existing fixed roles
# fixedRole: "fixed:reporting:admin:read"
# # list of roles that should be deleted
# deleteRoles:
# # <string> name of the role you want to create. Required if no uid is set
# - name: "custom:reports:editor"
# # <string> uid of the role. Required if no name
# uid: "customreportseditor1"
# # <int> org id. will default to Grafana's default if not specified
# orgId: 1
# # <list> list of the permissions granted by this role.
# permissions:
# # <string, required> action allowed.
# - action: 'users:read'
# #<string> scope it applies to.
# scope: 'users:*'
# - action: 'users:write'
# scope: 'users:*'
# - action: 'users:create'
# - name: 'custom:global:users:reader'
# # <bool> overwrite org id and creates a global role.
# global: true
# # <string> state of the role. Defaults to 'present'. If 'absent', role will be deleted.
# state: 'absent'
# # <bool> force deletion revoking all grants of the role.
# # <bool> force deletion revoking all grants of the role
# force: true
# - uid: 'basic_editor'
# version: 2
# - name: "custom:global:reports:reader"
# uid: "customglobalreportsreader1"
# # <bool> overwrite org id and removes a global role
# global: true
# # <list> list of roles to copy permissions from.
# from:
# - uid: 'basic_editor'
# global: true
# - name: 'fixed:users:writer'
# global: true
# # <list> list of the permissions to add/remove on top of the copied ones.
# permissions:
# - action: 'users:read'
# scope: 'users:*'
# - action: 'users:write'
# scope: 'users:*'
# # <string> state of the permission. Defaults to 'present'. If 'absent', the permission will be removed.
# state: absent
# force: true
# # <list> list role assignments to teams to create or remove.
# teams:
# # <string, required> name of the team you want to assign roles to. Required.
# - name: 'Users writers'
# # <int> org id. Will default to Grafana's default if not specified.
# orgId: 1
# # <list> list of roles to assign to the team
# roles:
# # <string> uid of the role you want to assign to the team.
# - uid: 'customuserswriter1'
# # <int> org id. Will default to Grafana's default if not specified.
# orgId: 1
# # <string> name of the role you want to assign to the team.
# - name: 'fixed:users:writer'
# # <bool> overwrite org id to specify the role is global.
# # list of roles to insert/update depending on what is available in the database
# roles:
# # <string, required> name of the role you want to create. Required
# - name: "custom:users:editor"
# # <string> uid of the role. Has to be unique for all orgs.
# uid: customuserseditor1
# # <string> description of the role, informative purpose only.
# description: "Role for our custom user editors"
# # <int> version of the role, Grafana will update the role when increased
# version: 2
# # <int> org id. will default to Grafana's default if not specified
# orgId: 1
# # <list> list of the permissions granted by this role
# permissions:
# # <string, required> action allowed
# - action: "users:read"
# #<string> scope it applies to
# scope: "users:*"
# - action: "users:write"
# scope: "users:*"
# - action: "users:create"
# scope: "users:*"
# # <list> list of builtIn roles the role should be assigned to
# builtInRoles:
# # <string, required> name of the builtin role you want to assign the role to
# - name: "Editor"
# # <int> org id. will default to the role org id
# orgId: 1
# - name: "custom:global:users:reader"
# uid: "customglobalusersreader1"
# description: "Global Role for custom user readers"
# version: 1
# # <bool> overwrite org id and creates a global role
# global: true
# permissions:
# - action: "users:read"
# scope: "users:*"
# builtInRoles:
# - name: "Viewer"
# orgId: 1
# - name: "Editor"
# # <bool> overwrite org id and assign role globally
# global: true
# # <string> state of the assignment. Defaults to 'present'. If 'absent', the assignment will be revoked.
# state: absent

View File

@@ -19,6 +19,8 @@ apiVersion: 1
# orgId: 1
# # <string> url
# url: http://localhost:8080
# # <string> database password, if used
# password:
# # <string> database user, if used
# user:
# # <string> database name, if used
@@ -27,6 +29,8 @@ apiVersion: 1
# basicAuth:
# # <string> basic auth username
# basicAuthUser:
# # <string> basic auth password
# basicAuthPassword:
# # <bool> enable/disable with credentials headers
# withCredentials:
# # <bool> mark as default datasource. Max one per org

View File

@@ -9,9 +9,6 @@
# instance name, defaults to HOSTNAME environment variable value or hostname if HOSTNAME var is empty
;instance_name = ${HOSTNAME}
# force migration will run migrations that might cause dataloss
;force_migration = false
#################################### Paths ####################################
[paths]
# Path to where grafana can store temp files, sessions, and the sqlite3 db (if that is used)
@@ -201,20 +198,13 @@
# The name of the distributor of the Grafana instance. Ex hosted-grafana, grafana-labs
;reporting_distributor = grafana-labs
# Set to false to disable all checks to https://grafana.com
# for new versions of grafana. The check is used
# in some UI views to notify that a grafana update exists.
# Set to false to disable all checks to https://grafana.net
# for new versions (grafana itself and plugins), check is used
# in some UI views to notify that grafana or plugin update exists
# This option does not cause any auto updates, nor send any information
# only a GET request to https://raw.githubusercontent.com/grafana/grafana/main/latest.json to get the latest version.
# only a GET request to http://grafana.com to get latest versions
;check_for_updates = true
# Set to false to disable all checks to https://grafana.com
# for new versions of plugins. The check is used
# in some UI views to notify that a plugin update exists.
# This option does not cause any auto updates, nor send any information
# only a GET request to https://grafana.com to get the latest versions.
;check_for_plugin_updates = true
# Google Analytics universal tracking code, only enabled if you specify an id here
;google_analytics_ua_id =
@@ -233,9 +223,6 @@
# Rudderstack Config url, optional, used by Rudderstack SDK to fetch source config
;rudderstack_config_url =
# Controls if the UI contains any links to user feedback forms
;feedback_links_enabled = true
#################################### Security ####################################
[security]
# disable creation of admin user on first start of grafana
@@ -305,18 +292,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';"""
# Controls if old angular plugins are supported or not. This will be disabled by default in future release
;angular_support_enabled = true
[security.encryption]
# Defines the time-to-live (TTL) for decrypted data encryption keys stored in memory (cache).
# Please note that small values may cause performance issues due to a high frequency decryption operations.
;data_keys_cache_ttl = 15m
# Defines the frequency of data encryption keys cache cleanup interval.
# On every interval, decrypted data encryption keys that reached the TTL are removed from the cache.
;data_keys_cache_cleanup_interval = 1m
#################################### Snapshots ###########################
[snapshots]
# snapshot sharing options
@@ -506,7 +481,6 @@
;token_url = https://login.microsoftonline.com/<tenant-id>/oauth2/v2.0/token
;allowed_domains =
;allowed_groups =
;role_attribute_strict = false
#################################### Okta OAuth #######################
[auth.okta]
@@ -594,7 +568,7 @@
# LDAP background sync (Enterprise only)
# At 1 am every day
;sync_cron = "0 1 * * *"
;sync_cron = "0 0 1 * * *"
;active_sync_enabled = true
#################################### AWS ###########################
@@ -623,11 +597,6 @@
# Should be set for user-assigned identity and should be empty for system-assigned identity
;managed_identity_client_id =
#################################### Role-based Access Control ###########
[rbac]
;enabled = true
# If enabled, cache permissions in a in memory cache (Enterprise only)
;permission_cache = true
#################################### SMTP / Emailing ##########################
[smtp]
;enabled = false
@@ -890,20 +859,10 @@
# Enable the Explore section
;enabled = true
#################################### Help #############################
[help]
# Enable the Help section
;enabled = true
#################################### Profile #############################
[profile]
# Enable the Profile section
;enabled = true
#################################### Query History #############################
[query_history]
# Enable the Query history
;enabled = true
;enabled = false
#################################### Internal Grafana Metrics ##########################
# Metrics available at HTTP URL /metrics and /metrics/plugins/:pluginId
@@ -937,7 +896,6 @@
;url = https://grafana.com
#################################### Distributed tracing ############
# Opentracing is deprecated use opentelemetry instead
[tracing.jaeger]
# Enable by setting the address sending traces to jaeger (ex localhost:6831)
;address = localhost:6831
@@ -964,15 +922,6 @@
[tracing.opentelemetry.jaeger]
# jaeger destination (ex http://localhost:14268/api/traces)
; address = http://localhost:14268/api/traces
# Propagation specifies the text map propagation format: w3c, jaeger
; propagation = jaeger
# This is a configuration for OTLP exporter with GRPC protocol
[tracing.opentelemetry.otlp]
# otlp destination (ex localhost:4317)
; address = localhost:4317
# Propagation specifies the text map propagation format: w3c, jaeger
; propagation = w3c
#################################### External image storage ##########################
[external_image_storage]

View File

@@ -2,8 +2,6 @@
Grafana uses a _bus_ to pass messages between different parts of the application. All communication over the bus happens synchronously.
> **Deprecated:** The bus has officially been deprecated, however, we're still using the command/query objects paradigms.
There are three types of messages: _events_, _commands_, and _queries_.
## Events

View File

@@ -99,8 +99,6 @@ To add a migration:
- In the `AddMigrations` function, find the `addXxxMigration` function for the service you want to create a migration for.
- At the end of the `addXxxMigration` function, register your migration:
> **NOTE:** Putting migrations behind feature flags is no longer recommended as it may cause the migration skip integration testing.
[Example](https://github.com/grafana/grafana/blob/00d0640b6e778ddaca021670fe851fe00982acf2/pkg/services/sqlstore/migrations/migrations.go#L55-L70)
### Implement `DatabaseMigrator`

Binary file not shown.

Before

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 119 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 61 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 54 KiB

View File

@@ -1,119 +0,0 @@
# Handling breaking changes in Grafana frontend APIs
This guide tries to help you identify and communicate breaking changes introduced to our frontend API.
- [What are our public APIs?](#what-are-our-public-apis)
- [What is Levitate?](#what-is-levitate)
- [How does the CI workflow look like?](#how-does-the-ci-workflow-look-like)
- [I received a comment on my PR, what does it mean?](#i-received-a-comment-on-my-pr-what-does-it-mean)
- [**I know it's a breaking change, what's next?**](#i-know-its-a-breaking-change-whats-next)
- [Introduce breaking changes only in major versions](#introduce-breaking-changes-only-in-major-versions)
- [Deprecate first](#deprecate-first)
- [Communicate](#communicate)
- [I still have questions, who can help me out?](#i-still-have-questions-who-can-help-me-out)
---
## What are our public APIs?
The Grafana frontend codebase is exposing functionality through NPM packages to make plugin development easier and faster.
These packages live in the `/packages` folder and contain packages like:
- `@grafana/data`
- `@grafana/runtime`
- `@grafana/toolkit`
- `@grafana/ui`
- etc. ([They can be viewed here](https://github.com/grafana/grafana/tree/main/packages)
Any change that causes dependent software to behave differently is considered to be breaking.
## What is Levitate?
[`@grafana/levitate`](https://github.com/grafana/levitate) is a tool created by Grafana that can show breaking changes between two versions of a **TypeScript** package or a source file.
It can list exported members of an NPM package or imports used by an NPM package,
**but we are mainly using it for comparing different versions of the same package to see changes in the exported members.**
A Github workflow runs against every pull request and comments a hint in case there are
possible breaking changes. It also adds the `"breaking change"` label to the pull request.
## How does the CI workflow look like?
<img src="./breaking-changes-workflow.png" alt="CI workflow" width="700" />
## I received a comment on my PR, what does it mean?
![Levitate comment](./breaking-changes-comment-screenshot.png)
Receiving a comment like the one above does not necessarily mean that you actually introduced breaking
changes (as certain edge cases are still not covered by the tool), but as there is a good chance we rather raise attention.
By clicking the links in the comment ("more info" or "Check console output") you can view more detailed information about what triggered the notification.
**Removed exported members** (console view):<br />
This means that some previously exported members won't be available in the newer version of the package which can break dependent plugins.
![](./breaking-changes-console-screenshot-1.png)
**Changed an existing member** (console view):<br />
This means that a member was changed in a way that can break dependent plugins.
![](./breaking-changes-console-screenshot-2.png)
**No breaking changes** (console view):<br />
Seeing this suggests that whilst changes were made, most probably none of them were breaking. You are good to go! 👏
![](./breaking-changes-console-screenshot-3.png)
## How can I decide if it is really a breaking change?
First go to the console output of the workflow and make sure that the diffs make sense.
It can happen that Levitate highlights a change which is marked with TSDoc tags `// @alpha` or `// @internal` in
which case you can choose to ignore it - keep in mind though that these flags won't really hold developers back
from using your code and most likely it is going to cause them problems if we are breaking them.
It can also happen that Levitate marks changing an interface as a possible breaking change.
For anyone that implements that interface introducing a new property will break their code. Whilst this is correctly marked as a breaking change maybe it is an interface that is never implemented by other developers. In which case you can choose to ignore Levitate's message.
These notifications are only warnings though, and **in the end it's up to the author of the PR to make a decision that makes the most sense.**
## I know it's a breaking change, what's next?
### Introduce breaking changes only in major versions
We can make breaking changes less painful if they are only happening between major releases of Grafana.
### Deprecate first
Whenever possible try to deprecate first what you are about to remove or change. For example:
```javascript
import { deprecationWarning } from '@grafana/data';
/**
* @deprecated -- this is no longer necessary and will be removed in Grafana 9.0.0
*/
myOldFunction(name: string) {
deprecationWarning('MyFile', 'myOldFunction', 'myNewFunction');
// ...
}
```
1. Add a deprecation comment `// @deprecated`
2. Add info in the comment about **when it is going to be removed**
3. Add info in the comment about **what should be used instead**
4. In case it's a function or a method, use `deprecationWarning(<file name>, <old name>, <new name>)` to raise attention during runtime as well
5. Update the [migration guide](../docs/sources/developers/plugins/migration-guide.md) with your instructions
### Communicate
Reach out to **@grafana/plugins-platform-frontend** to help finding which plugins are using the code that is just about to change, so we try making it smoother by communicating it to them.
---
## I still have questions, who can help me out?
We are here to help.
Please either ping us in the pull request by using the **@grafana/plugins-platform-frontend** handle or reach out to us on the internal Slack in `#grafana-plugins-platform`.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 130 KiB

View File

@@ -117,14 +117,11 @@ If you're unsure, see the existing [changelog](https://github.com/grafana/grafan
### Pull request titles
The pull request title should be formatted according to `<Area>: <Summary>` (Both "Area" and "Summary" should start with a capital letter).
The Grafana team _squashes_ all commits into one when we accept a pull request. The title of the pull request becomes the subject line of the squashed commit message. We still encourage contributors to write informative commit messages, as they becomes a part of the Git commit body.
We use the pull request title when we generate change logs for releases. As such, we strive to make the title as informative as possible.
**Example:**
`Docs: Change url to URL in all documentation files`
Make sure that the title for your pull request uses the same format as the subject line in the commit message.
## Configuration changes

View File

@@ -136,26 +136,6 @@ Running the backend tests on Windows currently needs some tweaking, so use the b
go run build.go test
```
### Run SQLLite, PostgreSQL and MySQL integration tests
By default, Grafana runs SQLite to run tests with SQLite.
```bash
go test -covermode=atomic -tags=integration ./pkg/...
```
To run PostgreSQL and MySQL integration tests locally, 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
GRAFANA_TEST_DB=mysql go test -covermode=atomic -tags=integration ./pkg/...
```
and/or
```bash
GRAFANA_TEST_DB=postgres go test -covermode=atomic -tags=integration ./pkg/...
```
### Run end-to-end tests
The end to end tests in Grafana use [Cypress](https://www.cypress.io/) to run automated scripts in a headless Chromium browser. Read more about our [e2e framework](/contribute/style-guides/e2e.md).

View File

@@ -212,10 +212,10 @@ of the sentence. When you write in passive voice, the recipient of the action (a
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. |
| Create a dashboard. | A dashboard is created by you. | . |
### Avoid obscure non-English words and abbreviations

View File

@@ -1,194 +0,0 @@
# Localisation
Grafana uses the [LinguiJS](https://github.com/lingui/js-lingui) framework for managing translating phrases in the Grafana frontend.
## tl;dr
- 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
## How to add a new translation phrase
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 @lingui/macro
const SearchTitle = ({term}) => (
<Trans id="search-page.results-title">
Results for {term}
</Trans>
);
```
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.
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 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 `messages.po` file and make them available for translation.
## How translations work in Grafana
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
### 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.
Message IDs are made of _up to_ three segments in the format `feature.area.phrase`. For example:
- `dashboard.header.refresh-label`
- `explore.toolbar.share-tooltip`
For components used all over the site, use just two segments:
- `footer.update`
- `navigation.home`
### Top-level provider
In [AppWrapper.tsx](/public/app/AppWrapper.tsx) the app is wrapped with `I18nProvider` from `public/app/core/localisation.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 the [Lingui docs](https://lingui.js.org/ref/macro.html#usage) for more details.
### Basic usage
For fixed phrases:
```jsx
import { Trans } from '@lingui/macro';
<Trans id="page.greeting">Hello user!</Trans>;
```
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 '@lingui/macro';
// 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 id="page.greeting">Hello {userName}!</Trans>;
```
Variables must be strings (or, must support calling `.toString()`, which we almost never want).
```jsx
import { Trans } from '@lingui/macro';
// This will not work
const userName = <strong>user.name</strong>;
<Trans id="page.greeting">Hello {userName}!</Trans>;
// Instead, put the JSX inside the phrase directly
const userName = user.name;
<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 Lingui macro will replace them with placeholder tags for the translators
```js
import { Trans } from "@lingui/macro"
const randomVariable = "variable"
<Trans id="page.explainer">
Click <button>here</button> to <a href="https://grafana.com">learn more.</a>
</Trans>
// ↓ 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
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 { Plural } from "@lingui/macro"
<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
```
### 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
[Grafana's documentation](https://grafana.com/docs/grafana/latest/) is not yet open for translation and should be authored in English only.

View File

@@ -27,15 +27,10 @@ Before you can merge a pull request, it must have a review approval, and all the
### Format the pull request title
The pull request title should be formatted according to `<Area>: <Summary>` (Both "Area" and "Summary" should start with a capital letter).
Keep the summary short and understandable for the community as a whole.
The pull request title should be formatted according to `<Area>: <Summary>`. Keep the summary short and understandable for the community as a whole.
All commits in a pull request are squashed when merged and the pull request title will be the default subject line of the squashed commit message. It's also used for [changelog/release notes](#include-in-changelog-and-release-notes).
**Example:**
`Docs: Change url to URL in all documentation files`
See [formatting guidelines](create-pull-request.md#formatting-guidelines) for more information.
### Assign a milestone
@@ -48,31 +43,11 @@ This makes it easier to track what changes go into a certain release. Without th
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.
Exactly what changes should be added to the changelog is hard to answer but some general guidance would be any change that you think would be interesting for the community as a whole. Use your best judgement and/or ask other maintainers for advice.
There's a GitHub action available in the repository named [Update changelog](https://github.com/grafana/grafana/blob/main/.github/workflows/update-changelog.yml) that can manually be triggered to re-generate the changelog and release notes for any release.
Exactly what changes should be added to the changelog is hard to answer but here's some general guidance:
- Include any bug fix in general.
- Include any change that you think would be interesting for the community as a whole.
- Skip larger features divided in multiple pull requests since they might go into the release blog post/What's New article.
- Use your best judgement and/or ask other maintainers for advice.
- Including a change in error rather than skipping one that should have been there is better.
- Always keep [Format the pull request title](#format-the-pull-request-title) in mind.
An active decision to include change in changelog/release notes needs to be taken for every pull request. There's a pull request check named **Changelog Check** that will enforce this. By adding/removing labels on the pull request or updating the pull request title/description the check will be re-evaluated.
#### Skip changelog
If you don't want to include your change in changelog/release notes you need to add a label named **no-changelog** to the pull request.
#### Include in changelog/release notes
To include a pull request in the changelog/release notes you need to add a label named `add to changelog` to the pull request. Then additional validation rules is checked:
- Title need to be formatted according to [Format the pull request title](#format-the-pull-request-title)
- Description needs to include a breaking change notice if change is labeled to be a breaking change, see Breaking changes below for more information.
Not complying with above rules can make the **Changelog Check** fail with validation errors.
To include a pull request in the changelog/release notes the general rule of thumb is that a milestone should be assigned and labeled with `add to changelog`.
The changelog/release notes are divided into sections and here's a description of how you make a pull request show up in a certain section.
@@ -118,7 +93,7 @@ If you don't want to backport you need to add a label named **no-backport** to t
#### Backport
If your pull request has changes that need to go into one or several existing release branches you need to backport the changes. Please refer to [Backport PR](/.github/bot.md#backport-pr) for detailed instructions.
If your pull request has changes that need to go into one or several existing release branches you need to backport the changes. Please refer to [Backport PR](.github/bot.md#backport-pr) for detailed instructions.
The general rule of thumb regarding what changes goes into what release is:

View File

@@ -58,100 +58,6 @@ code, plus lets you run each test case in isolation when debugging. Don't use `t
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

View File

@@ -7,15 +7,6 @@ deleteDatasources:
- name: gdev-influxdb2-influxql
- name: gdev-loki-0.3
- name: gdev-loki-0.4
- name: gdev-elasticsearch-v2-metrics
- name: gdev-elasticsearch-v2-logs
- name: gdev-elasticsearch-v5-metrics
- name: gdev-elasticsearch-v5-logs
- name: gdev-elasticsearch-v56-metrics
- name: gdev-elasticsearch-v56-logs
- name: gdev-elasticsearch-v6-metrics
- name: gdev-elasticsearch-v6-logs
- name: gdev-elasticsearch-v6-filebeat
datasources:
- name: gdev-graphite
@@ -39,21 +30,12 @@ datasources:
jsonData:
graphiteVersion: "0.9"
- name: gdev-alertmanager
type: alertmanager
uid: gdev-alertmanager
access: proxy
url: http://localhost:9093
jsonData:
implementation: prometheus
- name: gdev-prometheus
type: prometheus
access: proxy
url: http://localhost:9090
jsonData:
manageAlerts: true
alertmanagerUid: gdev-alertmanager
manageAlerts: false
- name: gdev-slow-prometheus
type: prometheus
@@ -114,7 +96,17 @@ datasources:
tsdbResolution: 1
tsdbVersion: 3
- name: gdev-elasticsearch
- name: gdev-elasticsearch-v2-metrics
type: elasticsearch
access: proxy
database: "[metrics-]YYYY.MM.DD"
url: http://localhost:9200
jsonData:
interval: Daily
timeField: "@timestamp"
esVersion: 2
- name: gdev-elasticsearch-v2-logs
type: elasticsearch
access: proxy
database: "[logs-]YYYY.MM.DD"
@@ -122,9 +114,77 @@ datasources:
jsonData:
interval: Daily
timeField: "@timestamp"
logLevelField: level
logMessageField: line
esVersion: 8.0.0
esVersion: 2
- name: gdev-elasticsearch-v5-metrics
type: elasticsearch
access: proxy
database: "[metrics-]YYYY.MM.DD"
url: http://localhost:10200
jsonData:
interval: Daily
timeField: "@timestamp"
esVersion: 5
- name: gdev-elasticsearch-v5-logs
type: elasticsearch
access: proxy
database: "[logs-]YYYY.MM.DD"
url: http://localhost:10200
jsonData:
interval: Daily
timeField: "@timestamp"
esVersion: 5
- name: gdev-elasticsearch-v56-metrics
type: elasticsearch
access: proxy
database: "[metrics-]YYYY.MM.DD"
url: http://localhost:13200
jsonData:
interval: Daily
timeField: "@timestamp"
esVersion: 56
- name: gdev-elasticsearch-v56-logs
type: elasticsearch
access: proxy
database: "[logs-]YYYY.MM.DD"
url: http://localhost:13200
jsonData:
interval: Daily
timeField: "@timestamp"
esVersion: 56
- name: gdev-elasticsearch-v6-metrics
type: elasticsearch
access: proxy
database: "[metrics-]YYYY.MM.DD"
url: http://localhost:11200
jsonData:
interval: Daily
timeField: "@timestamp"
esVersion: 60
- name: gdev-elasticsearch-v6-logs
type: elasticsearch
access: proxy
database: "[logs-]YYYY.MM.DD"
url: http://localhost:11200
jsonData:
interval: Daily
timeField: "@timestamp"
esVersion: 60
- name: gdev-elasticsearch-v6-filebeat
type: elasticsearch
access: proxy
database: "[filebeat-]YYYY.MM.DD"
url: http://localhost:11200
jsonData:
interval: Daily
timeField: "@timestamp"
esVersion: 60
- name: gdev-elasticsearch-v7-metrics
type: elasticsearch
@@ -135,7 +195,7 @@ datasources:
timeInterval: 10s
interval: Daily
timeField: "@timestamp"
esVersion: 7.10.0
esVersion: 70
- name: gdev-elasticsearch-v7-logs
type: elasticsearch
@@ -145,7 +205,7 @@ datasources:
jsonData:
interval: Daily
timeField: "@timestamp"
esVersion: 7.10.0
esVersion: 70
- name: gdev-elasticsearch-v7-filebeat
type: elasticsearch
@@ -155,7 +215,7 @@ datasources:
jsonData:
interval: Daily
timeField: "@timestamp"
esVersion: 7.10.0
esVersion: 70
timeInterval: "10s"
logMessageField: message
logLevelField: fields.level
@@ -168,7 +228,7 @@ datasources:
jsonData:
interval: Daily
timeField: "@timestamp"
esVersion: 7.10.0
esVersion: 70
timeInterval: "10s"
- name: gdev-mysql

View File

@@ -374,6 +374,17 @@
"title": "Dashboard list",
"type": "dashlist"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 29
},
"id": 30,
"title": "Panel list",
"type": "pluginlist"
},
{
"gridPos": {
"h": 8,

View File

@@ -1,6 +0,0 @@
package dev_dashboards
import "embed"
//go:embed *.json */*.json
var DevDashboardFS embed.FS

View File

@@ -1,84 +0,0 @@
package dev_dashboards
import (
"encoding/json"
"io"
"io/fs"
"path/filepath"
"strings"
"testing"
"cuelang.org/go/cue/errors"
"github.com/stretchr/testify/require"
"github.com/grafana/grafana/pkg/coremodel/dashboard"
"github.com/grafana/grafana/pkg/cuectx"
)
func TestDevenvDashboardValidity(t *testing.T) {
m, err := themaTestableDashboards()
require.NoError(t, err)
cm, err := dashboard.ProvideCoremodel(cuectx.ProvideThemaLibrary())
require.NoError(t, err)
for path, b := range m {
t.Run(path, func(t *testing.T) {
// The path arg here only matters for error output
cv, err := cuectx.JSONtoCUE(path, b)
require.NoError(t, err, "error while decoding dashboard JSON into a CUE value")
_, err = cm.CurrentSchema().Validate(cv)
if err != nil {
// Testify trims errors to short length. We want the full text
errstr := errors.Details(err, nil)
t.Log(errstr)
if strings.Contains(errstr, "null") {
t.Log("validation failure appears to involve nulls - see if scripts/stripnulls.sh has any effect?")
}
t.FailNow()
}
})
}
}
func themaTestableDashboards() (map[string][]byte, error) {
m := make(map[string][]byte)
in := DevDashboardFS
err := fs.WalkDir(in, ".", func(path string, d fs.DirEntry, err error) error {
if err != nil {
return err
}
if d.IsDir() || filepath.Ext(d.Name()) != ".json" {
return nil
}
// nolint:gosec
f, err := in.Open(path)
if err != nil {
return err
}
defer f.Close() // nolint: errcheck
b, err := io.ReadAll(f)
if err != nil {
return err
}
jtree := make(map[string]interface{})
json.Unmarshal(b, &jtree)
if oldschemav, has := jtree["schemaVersion"]; !has || !(oldschemav.(float64) > dashboard.HandoffSchemaVersion-1) {
return nil
}
m[path] = b
return nil
})
if err != nil {
return nil, err
}
return m, nil
}

View File

@@ -0,0 +1,736 @@
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": "-- Grafana --",
"enable": false,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"limit": 100,
"name": "Annotations & Alerts",
"showIn": 0,
"type": "dashboard"
},
{
"datasource": "Elastic 5 Logs",
"enable": false,
"iconColor": "rgba(255, 96, 96, 1)",
"limit": 100,
"name": "test",
"query": "",
"showIn": 0,
"textField": "description",
"type": "alert"
}
]
},
"editable": true,
"gnetId": null,
"graphTooltip": 0,
"iteration": 1591027568655,
"links": [
{
"asDropdown": true,
"icon": "external link",
"tags": ["gdev", "elasticsearch", "datasource-test"],
"title": "Dashboards",
"type": "dashboards"
}
],
"panels": [
{
"aliasColors": {},
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": "gdev-elasticsearch-v2-metrics",
"editable": true,
"error": false,
"fieldConfig": {
"defaults": {
"custom": {}
},
"overrides": []
},
"fill": 1,
"fillGradient": 0,
"grid": {},
"gridPos": {
"h": 7,
"w": 24,
"x": 0,
"y": 0
},
"hiddenSeries": false,
"id": 1,
"legend": {
"alignAsTable": true,
"avg": false,
"current": false,
"max": true,
"min": false,
"rightSide": true,
"show": true,
"total": false,
"values": true
},
"lines": true,
"linewidth": 2,
"links": [],
"nullPointMode": "connected",
"options": {
"dataLinks": []
},
"percentage": false,
"pointradius": 5,
"points": false,
"renderer": "flot",
"seriesOverrides": [],
"spaceLength": 10,
"stack": false,
"steppedLine": false,
"targets": [
{
"bucketAggs": [
{
"field": "@hostname",
"id": "3",
"settings": {
"min_doc_count": 1,
"order": "asc",
"orderBy": "1",
"size": "5"
},
"type": "terms"
},
{
"field": "@timestamp",
"id": "2",
"settings": {
"interval": "auto",
"min_doc_count": 0,
"trimEdges": 0
},
"type": "date_histogram"
}
],
"dsType": "elasticsearch",
"metrics": [
{
"field": "@value",
"id": "1",
"meta": {},
"settings": {},
"type": "max"
}
],
"query": "*",
"refId": "A",
"target": "",
"timeField": "@timestamp"
}
],
"thresholds": [],
"timeFrom": null,
"timeRegions": [],
"timeShift": null,
"title": "Top 5 servers",
"tooltip": {
"msResolution": true,
"shared": true,
"sort": 0,
"value_type": "cumulative"
},
"type": "graph",
"xaxis": {
"buckets": null,
"mode": "time",
"name": null,
"show": true,
"values": []
},
"yaxes": [
{
"format": "short",
"logBase": 1,
"max": null,
"min": null,
"show": true
},
{
"format": "short",
"logBase": 1,
"max": null,
"min": null,
"show": true
}
],
"yaxis": {
"align": false,
"alignLevel": null
}
},
{
"aliasColors": {
"Count": "#6ED0E0"
},
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": "gdev-elasticsearch-v2-metrics",
"editable": true,
"error": false,
"fieldConfig": {
"defaults": {
"custom": {}
},
"overrides": []
},
"fill": 1,
"fillGradient": 0,
"grid": {},
"gridPos": {
"h": 6,
"w": 12,
"x": 0,
"y": 7
},
"hiddenSeries": false,
"id": 2,
"legend": {
"alignAsTable": true,
"avg": true,
"current": false,
"max": false,
"min": false,
"rightSide": true,
"show": true,
"total": false,
"values": true
},
"lines": true,
"linewidth": 2,
"links": [],
"nullPointMode": "connected",
"options": {
"dataLinks": []
},
"percentage": false,
"pointradius": 5,
"points": false,
"renderer": "flot",
"seriesOverrides": [
{
"alias": "Count",
"lines": false,
"yaxis": 2,
"zindex": -1
}
],
"spaceLength": 10,
"stack": false,
"steppedLine": false,
"targets": [
{
"alias": "{{metric}}",
"bucketAggs": [
{
"field": "@timestamp",
"id": "2",
"settings": {
"interval": "5m",
"min_doc_count": 0,
"trimEdges": 0
},
"type": "date_histogram"
}
],
"dsType": "elasticsearch",
"metrics": [
{
"field": "@value",
"id": "1",
"meta": {},
"settings": {
"percents": [25, 50, 75, 95, 99]
},
"type": "percentiles"
}
],
"query": "@metric:cpu",
"refId": "A",
"target": "",
"timeField": "@timestamp"
}
],
"thresholds": [],
"timeFrom": null,
"timeRegions": [],
"timeShift": null,
"title": "Percentiles & Metric filter",
"tooltip": {
"msResolution": false,
"shared": true,
"sort": 0,
"value_type": "cumulative"
},
"type": "graph",
"xaxis": {
"buckets": null,
"mode": "time",
"name": null,
"show": true,
"values": []
},
"yaxes": [
{
"format": "short",
"logBase": 1,
"max": null,
"min": null,
"show": true
},
{
"format": "short",
"logBase": 1,
"max": null,
"min": null,
"show": true
}
],
"yaxis": {
"align": false,
"alignLevel": null
}
},
{
"aliasColors": {
"Count": "#6ED0E0"
},
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": "gdev-elasticsearch-v2-metrics",
"editable": true,
"error": false,
"fieldConfig": {
"defaults": {
"custom": {}
},
"overrides": []
},
"fill": 1,
"fillGradient": 0,
"grid": {},
"gridPos": {
"h": 6,
"w": 12,
"x": 12,
"y": 7
},
"hiddenSeries": false,
"id": 3,
"legend": {
"alignAsTable": true,
"avg": true,
"current": false,
"max": false,
"min": false,
"rightSide": true,
"show": true,
"total": false,
"values": true
},
"lines": true,
"linewidth": 2,
"links": [],
"nullPointMode": "connected",
"options": {
"dataLinks": []
},
"percentage": false,
"pointradius": 5,
"points": false,
"renderer": "flot",
"seriesOverrides": [
{
"alias": "Count",
"lines": false,
"yaxis": 2,
"zindex": -1
}
],
"spaceLength": 10,
"stack": false,
"steppedLine": false,
"targets": [
{
"alias": "{{metric}}",
"bucketAggs": [
{
"field": "@timestamp",
"id": "2",
"settings": {
"interval": "auto",
"min_doc_count": 0,
"trimEdges": 0
},
"type": "date_histogram"
}
],
"dsType": "elasticsearch",
"metrics": [
{
"field": "@value",
"id": "1",
"meta": {
"std_deviation_bounds_lower": true,
"std_deviation_bounds_upper": true
},
"settings": {},
"type": "extended_stats"
}
],
"query": "@metric:cpu",
"refId": "A",
"target": "",
"timeField": "@timestamp"
}
],
"thresholds": [],
"timeFrom": null,
"timeRegions": [],
"timeShift": null,
"title": "Standard dev",
"tooltip": {
"msResolution": true,
"shared": true,
"sort": 0,
"value_type": "cumulative"
},
"type": "graph",
"xaxis": {
"buckets": null,
"mode": "time",
"name": null,
"show": true,
"values": []
},
"yaxes": [
{
"format": "short",
"logBase": 1,
"max": null,
"min": null,
"show": true
},
{
"format": "short",
"logBase": 1,
"max": null,
"min": null,
"show": true
}
],
"yaxis": {
"align": false,
"alignLevel": null
}
},
{
"columns": [
{
"text": "@hostname",
"value": "@hostname"
},
{
"text": "Average",
"value": "Average"
},
{
"text": "Max",
"value": "Max"
},
{
"text": "Sum",
"value": "Sum"
}
],
"datasource": "gdev-elasticsearch-v2-metrics",
"editable": true,
"error": false,
"fieldConfig": {
"defaults": {
"custom": {}
},
"overrides": []
},
"fontSize": "100%",
"gridPos": {
"h": 7,
"w": 24,
"x": 0,
"y": 13
},
"id": 6,
"links": [],
"pageSize": null,
"scroll": true,
"showHeader": true,
"sort": {
"col": 0,
"desc": true
},
"styles": [
{
"align": "auto",
"dateFormat": "YYYY-MM-DD HH:mm:ss",
"pattern": "@timestamp",
"type": "date"
},
{
"align": "auto",
"colorMode": null,
"colors": ["rgba(245, 54, 54, 0.9)", "rgba(237, 129, 40, 0.89)", "rgba(50, 172, 45, 0.97)"],
"dateFormat": "YYYY-MM-DD HH:mm:ss",
"decimals": 2,
"pattern": "/.*/",
"thresholds": [],
"type": "number",
"unit": "short"
}
],
"targets": [
{
"bucketAggs": [
{
"field": "@hostname",
"id": "2",
"settings": {
"min_doc_count": 1,
"order": "asc",
"orderBy": "_term",
"size": "0"
},
"type": "terms"
}
],
"dsType": "elasticsearch",
"metrics": [
{
"field": "@value",
"id": "1",
"meta": {},
"settings": {},
"type": "avg"
},
{
"field": "@value",
"id": "3",
"meta": {},
"settings": {},
"type": "max"
},
{
"field": "@value",
"id": "4",
"meta": {},
"settings": {},
"type": "sum"
}
],
"refId": "B",
"timeField": "@timestamp"
}
],
"title": "ES Metrics",
"transform": "table",
"type": "table-old"
},
{
"columns": [
{
"text": "@timestamp",
"value": "@timestamp"
},
{
"text": "@message",
"value": "@message"
},
{
"text": "tags",
"value": "tags"
},
{
"text": "description",
"value": "description"
}
],
"datasource": "gdev-elasticsearch-v2-logs",
"editable": true,
"error": false,
"fieldConfig": {
"defaults": {
"custom": {}
},
"overrides": []
},
"fontSize": "100%",
"gridPos": {
"h": 7,
"w": 24,
"x": 0,
"y": 20
},
"id": 5,
"links": [],
"pageSize": null,
"scroll": true,
"showHeader": true,
"sort": {
"col": 0,
"desc": true
},
"styles": [
{
"align": "auto",
"dateFormat": "YYYY-MM-DD HH:mm:ss",
"pattern": "@timestamp",
"type": "date"
}
],
"targets": [
{
"bucketAggs": [],
"dsType": "elasticsearch",
"metrics": [
{
"field": "select field",
"id": "1",
"meta": {},
"settings": {
"size": 500
},
"type": "raw_document"
}
],
"refId": "A",
"target": "",
"timeField": "@timestamp"
}
],
"title": "ES Log query",
"transform": "json",
"type": "table-old"
},
{
"circleMaxSize": 30,
"circleMinSize": 2,
"colors": ["rgba(245, 54, 54, 0.9)", "rgba(237, 129, 40, 0.89)", "rgba(50, 172, 45, 0.97)"],
"datasource": "gdev-elasticsearch-v2-metrics",
"decimals": 0,
"esGeoPoint": "@location",
"esMetric": "Average",
"fieldConfig": {
"defaults": {
"custom": {}
},
"overrides": []
},
"gridPos": {
"h": 12,
"w": 24,
"x": 0,
"y": 27
},
"hideEmpty": false,
"hideZero": false,
"id": 8,
"initialZoom": 1,
"links": [],
"locationData": "geohash",
"mapCenter": "(0°, 0°)",
"mapCenterLatitude": 0,
"mapCenterLongitude": 0,
"maxDataPoints": 1,
"mouseWheelZoom": false,
"showLegend": true,
"stickyLabels": false,
"tableQueryOptions": {
"geohashField": "geohash",
"latitudeField": "latitude",
"longitudeField": "longitude",
"metricField": "metric",
"queryType": "geohash"
},
"targets": [
{
"bucketAggs": [
{
"fake": true,
"field": "@location",
"id": "3",
"settings": {
"precision": 2
},
"type": "geohash_grid"
}
],
"metrics": [
{
"field": "@value",
"id": "1",
"meta": {},
"settings": {},
"type": "avg"
}
],
"refId": "A",
"target": "",
"timeField": "@timestamp"
}
],
"thresholds": "0,10",
"title": "World map panel",
"type": "grafana-worldmap-panel",
"unitPlural": "",
"unitSingle": "",
"valueName": "total"
}
],
"schemaVersion": 25,
"style": "dark",
"tags": ["elasticsearch", "gdev", "datasource-test"],
"templating": {
"list": [
{
"datasource": "gdev-elasticsearch-v2-metrics",
"filters": [],
"hide": 0,
"label": "",
"name": "Filters",
"skipUrlSync": false,
"type": "adhoc"
}
]
},
"time": {
"from": "now-30m",
"to": "now"
},
"timepicker": {
"collapse": false,
"enable": true,
"notice": false,
"now": true,
"refresh_intervals": ["5s", "10s", "30s", "1m", "5m", "15m", "30m", "1h", "2h", "1d"],
"status": "Stable",
"time_options": ["5m", "15m", "1h", "6h", "12h", "24h", "2d", "7d", "30d"],
"type": "timepicker"
},
"timezone": "browser",
"title": "Datasource tests - Elasticsearch v2",
"uid": "RlqLq2fiz",
"version": 1
}

View File

@@ -0,0 +1,737 @@
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": "-- Grafana --",
"enable": false,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"limit": 100,
"name": "Annotations & Alerts",
"showIn": 0,
"type": "dashboard"
},
{
"datasource": "Elastic 5 Logs",
"enable": false,
"iconColor": "rgba(255, 96, 96, 1)",
"limit": 100,
"name": "test",
"query": "",
"showIn": 0,
"textField": "description",
"type": "alert"
}
]
},
"editable": true,
"gnetId": null,
"graphTooltip": 0,
"iteration": 1591027589702,
"links": [
{
"asDropdown": true,
"icon": "external link",
"tags": ["gdev", "elasticsearch", "datasource-test"],
"title": "Dashboards",
"type": "dashboards"
}
],
"panels": [
{
"aliasColors": {},
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": "gdev-elasticsearch-v5-metrics",
"editable": true,
"error": false,
"fieldConfig": {
"defaults": {
"custom": {}
},
"overrides": []
},
"fill": 1,
"fillGradient": 0,
"grid": {},
"gridPos": {
"h": 7,
"w": 24,
"x": 0,
"y": 0
},
"hiddenSeries": false,
"id": 1,
"legend": {
"alignAsTable": true,
"avg": false,
"current": false,
"max": true,
"min": false,
"rightSide": true,
"show": true,
"total": false,
"values": true
},
"lines": true,
"linewidth": 2,
"links": [],
"nullPointMode": "connected",
"options": {
"dataLinks": []
},
"percentage": false,
"pointradius": 5,
"points": false,
"renderer": "flot",
"seriesOverrides": [],
"spaceLength": 10,
"stack": false,
"steppedLine": false,
"targets": [
{
"bucketAggs": [
{
"field": "@hostname",
"id": "3",
"settings": {
"min_doc_count": 1,
"order": "asc",
"orderBy": "1",
"size": "5"
},
"type": "terms"
},
{
"field": "@timestamp",
"id": "2",
"settings": {
"interval": "auto",
"min_doc_count": 0,
"trimEdges": 0
},
"type": "date_histogram"
}
],
"dsType": "elasticsearch",
"metrics": [
{
"field": "@value",
"id": "1",
"meta": {},
"settings": {},
"type": "max"
}
],
"query": "*",
"refId": "A",
"target": "",
"timeField": "@timestamp"
}
],
"thresholds": [],
"timeFrom": null,
"timeRegions": [],
"timeShift": null,
"title": "Top 5 servers",
"tooltip": {
"msResolution": true,
"shared": true,
"sort": 0,
"value_type": "cumulative"
},
"type": "graph",
"xaxis": {
"buckets": null,
"mode": "time",
"name": null,
"show": true,
"values": []
},
"yaxes": [
{
"format": "short",
"logBase": 1,
"max": null,
"min": null,
"show": true
},
{
"format": "short",
"logBase": 1,
"max": null,
"min": null,
"show": true
}
],
"yaxis": {
"align": false,
"alignLevel": null
}
},
{
"aliasColors": {
"Count": "#6ED0E0"
},
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": "gdev-elasticsearch-v5-metrics",
"editable": true,
"error": false,
"fieldConfig": {
"defaults": {
"custom": {}
},
"overrides": []
},
"fill": 1,
"fillGradient": 0,
"grid": {},
"gridPos": {
"h": 6,
"w": 12,
"x": 0,
"y": 7
},
"hiddenSeries": false,
"id": 2,
"legend": {
"alignAsTable": true,
"avg": true,
"current": false,
"max": false,
"min": false,
"rightSide": true,
"show": true,
"total": false,
"values": true
},
"lines": true,
"linewidth": 2,
"links": [],
"nullPointMode": "connected",
"options": {
"dataLinks": []
},
"percentage": false,
"pointradius": 5,
"points": false,
"renderer": "flot",
"seriesOverrides": [
{
"alias": "Count",
"lines": false,
"yaxis": 2,
"zindex": -1
}
],
"spaceLength": 10,
"stack": false,
"steppedLine": false,
"targets": [
{
"alias": "{{metric}}",
"bucketAggs": [
{
"field": "@timestamp",
"id": "2",
"settings": {
"interval": "5m",
"min_doc_count": 0,
"trimEdges": 0
},
"type": "date_histogram"
}
],
"dsType": "elasticsearch",
"metrics": [
{
"field": "@value",
"id": "1",
"meta": {},
"settings": {
"percents": [25, 50, 75, 95, 99]
},
"type": "percentiles"
}
],
"query": "@metric:cpu",
"refId": "A",
"target": "",
"timeField": "@timestamp"
}
],
"thresholds": [],
"timeFrom": null,
"timeRegions": [],
"timeShift": null,
"title": "Percentiles & Metric filter",
"tooltip": {
"msResolution": false,
"shared": true,
"sort": 0,
"value_type": "cumulative"
},
"type": "graph",
"xaxis": {
"buckets": null,
"mode": "time",
"name": null,
"show": true,
"values": []
},
"yaxes": [
{
"format": "short",
"logBase": 1,
"max": null,
"min": null,
"show": true
},
{
"format": "short",
"logBase": 1,
"max": null,
"min": null,
"show": true
}
],
"yaxis": {
"align": false,
"alignLevel": null
}
},
{
"aliasColors": {
"Count": "#6ED0E0"
},
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": "gdev-elasticsearch-v5-metrics",
"editable": true,
"error": false,
"fieldConfig": {
"defaults": {
"custom": {}
},
"overrides": []
},
"fill": 1,
"fillGradient": 0,
"grid": {},
"gridPos": {
"h": 6,
"w": 12,
"x": 12,
"y": 7
},
"hiddenSeries": false,
"id": 3,
"legend": {
"alignAsTable": true,
"avg": true,
"current": false,
"max": false,
"min": false,
"rightSide": true,
"show": true,
"total": false,
"values": true
},
"lines": true,
"linewidth": 2,
"links": [],
"nullPointMode": "connected",
"options": {
"dataLinks": []
},
"percentage": false,
"pointradius": 5,
"points": false,
"renderer": "flot",
"seriesOverrides": [
{
"alias": "Count",
"lines": false,
"yaxis": 2,
"zindex": -1
}
],
"spaceLength": 10,
"stack": false,
"steppedLine": false,
"targets": [
{
"alias": "{{metric}}",
"bucketAggs": [
{
"field": "@timestamp",
"id": "2",
"settings": {
"interval": "auto",
"min_doc_count": 0,
"trimEdges": 0
},
"type": "date_histogram"
}
],
"dsType": "elasticsearch",
"metrics": [
{
"field": "@value",
"id": "1",
"meta": {
"std_deviation_bounds_lower": true,
"std_deviation_bounds_upper": true
},
"settings": {},
"type": "extended_stats"
}
],
"query": "@metric:cpu",
"refId": "A",
"target": "",
"timeField": "@timestamp"
}
],
"thresholds": [],
"timeFrom": null,
"timeRegions": [],
"timeShift": null,
"title": "Standard dev",
"tooltip": {
"msResolution": true,
"shared": true,
"sort": 0,
"value_type": "cumulative"
},
"type": "graph",
"xaxis": {
"buckets": null,
"mode": "time",
"name": null,
"show": true,
"values": []
},
"yaxes": [
{
"format": "short",
"logBase": 1,
"max": null,
"min": null,
"show": true
},
{
"format": "short",
"logBase": 1,
"max": null,
"min": null,
"show": true
}
],
"yaxis": {
"align": false,
"alignLevel": null
}
},
{
"columns": [
{
"text": "@hostname",
"value": "@hostname"
},
{
"text": "Average",
"value": "Average"
},
{
"text": "Max",
"value": "Max"
},
{
"text": "Sum",
"value": "Sum"
}
],
"datasource": "gdev-elasticsearch-v5-metrics",
"editable": true,
"error": false,
"fieldConfig": {
"defaults": {
"custom": {}
},
"overrides": []
},
"fontSize": "100%",
"gridPos": {
"h": 7,
"w": 24,
"x": 0,
"y": 13
},
"id": 6,
"links": [],
"pageSize": null,
"scroll": true,
"showHeader": true,
"sort": {
"col": 0,
"desc": true
},
"styles": [
{
"align": "auto",
"dateFormat": "YYYY-MM-DD HH:mm:ss",
"pattern": "@timestamp",
"type": "date"
},
{
"align": "auto",
"colorMode": null,
"colors": ["rgba(245, 54, 54, 0.9)", "rgba(237, 129, 40, 0.89)", "rgba(50, 172, 45, 0.97)"],
"dateFormat": "YYYY-MM-DD HH:mm:ss",
"decimals": 2,
"pattern": "/.*/",
"thresholds": [],
"type": "number",
"unit": "short"
}
],
"targets": [
{
"bucketAggs": [
{
"field": "@hostname",
"id": "2",
"settings": {
"min_doc_count": 1,
"order": "asc",
"orderBy": "_term",
"size": "0"
},
"type": "terms"
}
],
"dsType": "elasticsearch",
"metrics": [
{
"field": "@value",
"id": "1",
"meta": {},
"settings": {},
"type": "avg"
},
{
"field": "@value",
"id": "3",
"meta": {},
"settings": {},
"type": "max"
},
{
"field": "@value",
"id": "4",
"meta": {},
"settings": {},
"type": "sum"
}
],
"refId": "B",
"timeField": "@timestamp"
}
],
"title": "ES Metrics",
"transform": "table",
"type": "table-old"
},
{
"columns": [
{
"text": "@timestamp",
"value": "@timestamp"
},
{
"text": "@message",
"value": "@message"
},
{
"text": "tags",
"value": "tags"
},
{
"text": "description",
"value": "description"
}
],
"datasource": "gdev-elasticsearch-v5-logs",
"editable": true,
"error": false,
"fieldConfig": {
"defaults": {
"custom": {}
},
"overrides": []
},
"fontSize": "100%",
"gridPos": {
"h": 7,
"w": 24,
"x": 0,
"y": 20
},
"id": 5,
"links": [],
"pageSize": null,
"scroll": true,
"showHeader": true,
"sort": {
"col": 0,
"desc": true
},
"styles": [
{
"align": "auto",
"dateFormat": "YYYY-MM-DD HH:mm:ss",
"pattern": "@timestamp",
"type": "date"
}
],
"targets": [
{
"bucketAggs": [],
"dsType": "elasticsearch",
"metrics": [
{
"field": "select field",
"id": "1",
"meta": {},
"settings": {
"size": 500
},
"type": "raw_document"
}
],
"refId": "A",
"target": "",
"timeField": "@timestamp"
}
],
"title": "ES Log query",
"transform": "json",
"type": "table-old"
},
{
"circleMaxSize": 30,
"circleMinSize": 2,
"colors": ["rgba(245, 54, 54, 0.9)", "rgba(237, 129, 40, 0.89)", "rgba(50, 172, 45, 0.97)"],
"datasource": "gdev-elasticsearch-v5-metrics",
"decimals": 0,
"esGeoPoint": "@location",
"esLocationName": "",
"esMetric": "Average",
"fieldConfig": {
"defaults": {
"custom": {}
},
"overrides": []
},
"gridPos": {
"h": 12,
"w": 24,
"x": 0,
"y": 27
},
"hideEmpty": false,
"hideZero": false,
"id": 8,
"initialZoom": 1,
"links": [],
"locationData": "geohash",
"mapCenter": "(0°, 0°)",
"mapCenterLatitude": 0,
"mapCenterLongitude": 0,
"maxDataPoints": 1,
"mouseWheelZoom": false,
"showLegend": true,
"stickyLabels": false,
"tableQueryOptions": {
"geohashField": "geohash",
"latitudeField": "latitude",
"longitudeField": "longitude",
"metricField": "metric",
"queryType": "geohash"
},
"targets": [
{
"bucketAggs": [
{
"fake": true,
"field": "@location",
"id": "3",
"settings": {
"precision": 2
},
"type": "geohash_grid"
}
],
"metrics": [
{
"field": "@value",
"id": "1",
"meta": {},
"settings": {},
"type": "avg"
}
],
"refId": "A",
"target": "",
"timeField": "@timestamp"
}
],
"thresholds": "0,10",
"title": "World map panel",
"type": "grafana-worldmap-panel",
"unitPlural": "",
"unitSingle": "",
"valueName": "total"
}
],
"schemaVersion": 25,
"style": "dark",
"tags": ["elasticsearch", "gdev", "datasource-test"],
"templating": {
"list": [
{
"datasource": "gdev-elasticsearch-v5-metrics",
"filters": [],
"hide": 0,
"label": "",
"name": "Filters",
"skipUrlSync": false,
"type": "adhoc"
}
]
},
"time": {
"from": "now-30m",
"to": "now"
},
"timepicker": {
"collapse": false,
"enable": true,
"notice": false,
"now": true,
"refresh_intervals": ["5s", "10s", "30s", "1m", "5m", "15m", "30m", "1h", "2h", "1d"],
"status": "Stable",
"time_options": ["5m", "15m", "1h", "6h", "12h", "24h", "2d", "7d", "30d"],
"type": "timepicker"
},
"timezone": "browser",
"title": "Datasource tests - Elasticsearch v5",
"uid": "8HjT32Bmz",
"version": 1
}

View File

@@ -0,0 +1,737 @@
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": "-- Grafana --",
"enable": false,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"limit": 100,
"name": "Annotations & Alerts",
"showIn": 0,
"type": "dashboard"
},
{
"datasource": "Elastic 5 Logs",
"enable": false,
"iconColor": "rgba(255, 96, 96, 1)",
"limit": 100,
"name": "test",
"query": "",
"showIn": 0,
"textField": "description",
"type": "alert"
}
]
},
"editable": true,
"gnetId": null,
"graphTooltip": 0,
"iteration": 1591027589702,
"links": [
{
"asDropdown": true,
"icon": "external link",
"tags": ["gdev", "elasticsearch", "datasource-test"],
"title": "Dashboards",
"type": "dashboards"
}
],
"panels": [
{
"aliasColors": {},
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": "gdev-elasticsearch-v5-metrics",
"editable": true,
"error": false,
"fieldConfig": {
"defaults": {
"custom": {}
},
"overrides": []
},
"fill": 1,
"fillGradient": 0,
"grid": {},
"gridPos": {
"h": 7,
"w": 24,
"x": 0,
"y": 0
},
"hiddenSeries": false,
"id": 1,
"legend": {
"alignAsTable": true,
"avg": false,
"current": false,
"max": true,
"min": false,
"rightSide": true,
"show": true,
"total": false,
"values": true
},
"lines": true,
"linewidth": 2,
"links": [],
"nullPointMode": "connected",
"options": {
"dataLinks": []
},
"percentage": false,
"pointradius": 5,
"points": false,
"renderer": "flot",
"seriesOverrides": [],
"spaceLength": 10,
"stack": false,
"steppedLine": false,
"targets": [
{
"bucketAggs": [
{
"field": "@hostname",
"id": "3",
"settings": {
"min_doc_count": 1,
"order": "asc",
"orderBy": "1",
"size": "5"
},
"type": "terms"
},
{
"field": "@timestamp",
"id": "2",
"settings": {
"interval": "auto",
"min_doc_count": 0,
"trimEdges": 0
},
"type": "date_histogram"
}
],
"dsType": "elasticsearch",
"metrics": [
{
"field": "@value",
"id": "1",
"meta": {},
"settings": {},
"type": "max"
}
],
"query": "*",
"refId": "A",
"target": "",
"timeField": "@timestamp"
}
],
"thresholds": [],
"timeFrom": null,
"timeRegions": [],
"timeShift": null,
"title": "Top 5 servers",
"tooltip": {
"msResolution": true,
"shared": true,
"sort": 0,
"value_type": "cumulative"
},
"type": "graph",
"xaxis": {
"buckets": null,
"mode": "time",
"name": null,
"show": true,
"values": []
},
"yaxes": [
{
"format": "short",
"logBase": 1,
"max": null,
"min": null,
"show": true
},
{
"format": "short",
"logBase": 1,
"max": null,
"min": null,
"show": true
}
],
"yaxis": {
"align": false,
"alignLevel": null
}
},
{
"aliasColors": {
"Count": "#6ED0E0"
},
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": "gdev-elasticsearch-v56-metrics",
"editable": true,
"error": false,
"fieldConfig": {
"defaults": {
"custom": {}
},
"overrides": []
},
"fill": 1,
"fillGradient": 0,
"grid": {},
"gridPos": {
"h": 6,
"w": 12,
"x": 0,
"y": 7
},
"hiddenSeries": false,
"id": 2,
"legend": {
"alignAsTable": true,
"avg": true,
"current": false,
"max": false,
"min": false,
"rightSide": true,
"show": true,
"total": false,
"values": true
},
"lines": true,
"linewidth": 2,
"links": [],
"nullPointMode": "connected",
"options": {
"dataLinks": []
},
"percentage": false,
"pointradius": 5,
"points": false,
"renderer": "flot",
"seriesOverrides": [
{
"alias": "Count",
"lines": false,
"yaxis": 2,
"zindex": -1
}
],
"spaceLength": 10,
"stack": false,
"steppedLine": false,
"targets": [
{
"alias": "{{metric}}",
"bucketAggs": [
{
"field": "@timestamp",
"id": "2",
"settings": {
"interval": "5m",
"min_doc_count": 0,
"trimEdges": 0
},
"type": "date_histogram"
}
],
"dsType": "elasticsearch",
"metrics": [
{
"field": "@value",
"id": "1",
"meta": {},
"settings": {
"percents": [25, 50, 75, 95, 99]
},
"type": "percentiles"
}
],
"query": "@metric:cpu",
"refId": "A",
"target": "",
"timeField": "@timestamp"
}
],
"thresholds": [],
"timeFrom": null,
"timeRegions": [],
"timeShift": null,
"title": "Percentiles & Metric filter",
"tooltip": {
"msResolution": false,
"shared": true,
"sort": 0,
"value_type": "cumulative"
},
"type": "graph",
"xaxis": {
"buckets": null,
"mode": "time",
"name": null,
"show": true,
"values": []
},
"yaxes": [
{
"format": "short",
"logBase": 1,
"max": null,
"min": null,
"show": true
},
{
"format": "short",
"logBase": 1,
"max": null,
"min": null,
"show": true
}
],
"yaxis": {
"align": false,
"alignLevel": null
}
},
{
"aliasColors": {
"Count": "#6ED0E0"
},
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": "gdev-elasticsearch-v56-metrics",
"editable": true,
"error": false,
"fieldConfig": {
"defaults": {
"custom": {}
},
"overrides": []
},
"fill": 1,
"fillGradient": 0,
"grid": {},
"gridPos": {
"h": 6,
"w": 12,
"x": 12,
"y": 7
},
"hiddenSeries": false,
"id": 3,
"legend": {
"alignAsTable": true,
"avg": true,
"current": false,
"max": false,
"min": false,
"rightSide": true,
"show": true,
"total": false,
"values": true
},
"lines": true,
"linewidth": 2,
"links": [],
"nullPointMode": "connected",
"options": {
"dataLinks": []
},
"percentage": false,
"pointradius": 5,
"points": false,
"renderer": "flot",
"seriesOverrides": [
{
"alias": "Count",
"lines": false,
"yaxis": 2,
"zindex": -1
}
],
"spaceLength": 10,
"stack": false,
"steppedLine": false,
"targets": [
{
"alias": "{{metric}}",
"bucketAggs": [
{
"field": "@timestamp",
"id": "2",
"settings": {
"interval": "auto",
"min_doc_count": 0,
"trimEdges": 0
},
"type": "date_histogram"
}
],
"dsType": "elasticsearch",
"metrics": [
{
"field": "@value",
"id": "1",
"meta": {
"std_deviation_bounds_lower": true,
"std_deviation_bounds_upper": true
},
"settings": {},
"type": "extended_stats"
}
],
"query": "@metric:cpu",
"refId": "A",
"target": "",
"timeField": "@timestamp"
}
],
"thresholds": [],
"timeFrom": null,
"timeRegions": [],
"timeShift": null,
"title": "Standard dev",
"tooltip": {
"msResolution": true,
"shared": true,
"sort": 0,
"value_type": "cumulative"
},
"type": "graph",
"xaxis": {
"buckets": null,
"mode": "time",
"name": null,
"show": true,
"values": []
},
"yaxes": [
{
"format": "short",
"logBase": 1,
"max": null,
"min": null,
"show": true
},
{
"format": "short",
"logBase": 1,
"max": null,
"min": null,
"show": true
}
],
"yaxis": {
"align": false,
"alignLevel": null
}
},
{
"columns": [
{
"text": "@hostname",
"value": "@hostname"
},
{
"text": "Average",
"value": "Average"
},
{
"text": "Max",
"value": "Max"
},
{
"text": "Sum",
"value": "Sum"
}
],
"datasource": "gdev-elasticsearch-v56-metrics",
"editable": true,
"error": false,
"fieldConfig": {
"defaults": {
"custom": {}
},
"overrides": []
},
"fontSize": "100%",
"gridPos": {
"h": 7,
"w": 24,
"x": 0,
"y": 13
},
"id": 6,
"links": [],
"pageSize": null,
"scroll": true,
"showHeader": true,
"sort": {
"col": 0,
"desc": true
},
"styles": [
{
"align": "auto",
"dateFormat": "YYYY-MM-DD HH:mm:ss",
"pattern": "@timestamp",
"type": "date"
},
{
"align": "auto",
"colorMode": null,
"colors": ["rgba(245, 54, 54, 0.9)", "rgba(237, 129, 40, 0.89)", "rgba(50, 172, 45, 0.97)"],
"dateFormat": "YYYY-MM-DD HH:mm:ss",
"decimals": 2,
"pattern": "/.*/",
"thresholds": [],
"type": "number",
"unit": "short"
}
],
"targets": [
{
"bucketAggs": [
{
"field": "@hostname",
"id": "2",
"settings": {
"min_doc_count": 1,
"order": "asc",
"orderBy": "_term",
"size": "0"
},
"type": "terms"
}
],
"dsType": "elasticsearch",
"metrics": [
{
"field": "@value",
"id": "1",
"meta": {},
"settings": {},
"type": "avg"
},
{
"field": "@value",
"id": "3",
"meta": {},
"settings": {},
"type": "max"
},
{
"field": "@value",
"id": "4",
"meta": {},
"settings": {},
"type": "sum"
}
],
"refId": "B",
"timeField": "@timestamp"
}
],
"title": "ES Metrics",
"transform": "table",
"type": "table-old"
},
{
"columns": [
{
"text": "@timestamp",
"value": "@timestamp"
},
{
"text": "@message",
"value": "@message"
},
{
"text": "tags",
"value": "tags"
},
{
"text": "description",
"value": "description"
}
],
"datasource": "gdev-elasticsearch-v56-logs",
"editable": true,
"error": false,
"fieldConfig": {
"defaults": {
"custom": {}
},
"overrides": []
},
"fontSize": "100%",
"gridPos": {
"h": 7,
"w": 24,
"x": 0,
"y": 20
},
"id": 5,
"links": [],
"pageSize": null,
"scroll": true,
"showHeader": true,
"sort": {
"col": 0,
"desc": true
},
"styles": [
{
"align": "auto",
"dateFormat": "YYYY-MM-DD HH:mm:ss",
"pattern": "@timestamp",
"type": "date"
}
],
"targets": [
{
"bucketAggs": [],
"dsType": "elasticsearch",
"metrics": [
{
"field": "select field",
"id": "1",
"meta": {},
"settings": {
"size": 500
},
"type": "raw_document"
}
],
"refId": "A",
"target": "",
"timeField": "@timestamp"
}
],
"title": "ES Log query",
"transform": "json",
"type": "table-old"
},
{
"circleMaxSize": 30,
"circleMinSize": 2,
"colors": ["rgba(245, 54, 54, 0.9)", "rgba(237, 129, 40, 0.89)", "rgba(50, 172, 45, 0.97)"],
"datasource": "gdev-elasticsearch-v56-metrics",
"decimals": 0,
"esGeoPoint": "@location",
"esLocationName": "",
"esMetric": "Average",
"fieldConfig": {
"defaults": {
"custom": {}
},
"overrides": []
},
"gridPos": {
"h": 12,
"w": 24,
"x": 0,
"y": 27
},
"hideEmpty": false,
"hideZero": false,
"id": 8,
"initialZoom": 1,
"links": [],
"locationData": "geohash",
"mapCenter": "(0°, 0°)",
"mapCenterLatitude": 0,
"mapCenterLongitude": 0,
"maxDataPoints": 1,
"mouseWheelZoom": false,
"showLegend": true,
"stickyLabels": false,
"tableQueryOptions": {
"geohashField": "geohash",
"latitudeField": "latitude",
"longitudeField": "longitude",
"metricField": "metric",
"queryType": "geohash"
},
"targets": [
{
"bucketAggs": [
{
"fake": true,
"field": "@location",
"id": "3",
"settings": {
"precision": 2
},
"type": "geohash_grid"
}
],
"metrics": [
{
"field": "@value",
"id": "1",
"meta": {},
"settings": {},
"type": "avg"
}
],
"refId": "A",
"target": "",
"timeField": "@timestamp"
}
],
"thresholds": "0,10",
"title": "World map panel",
"type": "grafana-worldmap-panel",
"unitPlural": "",
"unitSingle": "",
"valueName": "total"
}
],
"schemaVersion": 25,
"style": "dark",
"tags": ["elasticsearch", "gdev", "datasource-test"],
"templating": {
"list": [
{
"datasource": "gdev-elasticsearch-v56-metrics",
"filters": [],
"hide": 0,
"label": "",
"name": "Filters",
"skipUrlSync": false,
"type": "adhoc"
}
]
},
"time": {
"from": "now-30m",
"to": "now"
},
"timepicker": {
"collapse": false,
"enable": true,
"notice": false,
"now": true,
"refresh_intervals": ["5s", "10s", "30s", "1m", "5m", "15m", "30m", "1h", "2h", "1d"],
"status": "Stable",
"time_options": ["5m", "15m", "1h", "6h", "12h", "24h", "2d", "7d", "30d"],
"type": "timepicker"
},
"timezone": "browser",
"title": "Datasource tests - Elasticsearch v56",
"uid": "8HjT32BmO",
"version": 1
}

View File

@@ -0,0 +1,737 @@
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": "-- Grafana --",
"enable": false,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"limit": 100,
"name": "Annotations & Alerts",
"showIn": 0,
"type": "dashboard"
},
{
"datasource": "gdev-elasticsearch-v6-logs",
"enable": false,
"iconColor": "rgba(255, 96, 96, 1)",
"limit": 100,
"name": "test",
"query": "",
"showIn": 0,
"textField": "description",
"type": "alert"
}
]
},
"editable": true,
"gnetId": null,
"graphTooltip": 0,
"iteration": 1591027529668,
"links": [
{
"asDropdown": true,
"icon": "external link",
"tags": ["gdev", "elasticsearch", "datasource-test"],
"title": "Dashboards",
"type": "dashboards"
}
],
"panels": [
{
"aliasColors": {},
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": "gdev-elasticsearch-v6-metrics",
"editable": true,
"error": false,
"fieldConfig": {
"defaults": {
"custom": {}
},
"overrides": []
},
"fill": 1,
"fillGradient": 0,
"grid": {},
"gridPos": {
"h": 7,
"w": 24,
"x": 0,
"y": 0
},
"hiddenSeries": false,
"id": 1,
"legend": {
"alignAsTable": true,
"avg": false,
"current": false,
"max": true,
"min": false,
"rightSide": true,
"show": true,
"total": false,
"values": true
},
"lines": true,
"linewidth": 2,
"links": [],
"nullPointMode": "connected",
"options": {
"dataLinks": []
},
"percentage": false,
"pointradius": 5,
"points": false,
"renderer": "flot",
"seriesOverrides": [],
"spaceLength": 10,
"stack": false,
"steppedLine": false,
"targets": [
{
"bucketAggs": [
{
"field": "@hostname",
"id": "3",
"settings": {
"min_doc_count": 1,
"order": "asc",
"orderBy": "1",
"size": "5"
},
"type": "terms"
},
{
"field": "@timestamp",
"id": "2",
"settings": {
"interval": "auto",
"min_doc_count": 0,
"trimEdges": 0
},
"type": "date_histogram"
}
],
"dsType": "elasticsearch",
"metrics": [
{
"field": "@value",
"id": "1",
"meta": {},
"settings": {},
"type": "max"
}
],
"query": "*",
"refId": "A",
"target": "",
"timeField": "@timestamp"
}
],
"thresholds": [],
"timeFrom": null,
"timeRegions": [],
"timeShift": null,
"title": "Top 5 servers",
"tooltip": {
"msResolution": true,
"shared": true,
"sort": 0,
"value_type": "cumulative"
},
"type": "graph",
"xaxis": {
"buckets": null,
"mode": "time",
"name": null,
"show": true,
"values": []
},
"yaxes": [
{
"format": "short",
"logBase": 1,
"max": null,
"min": null,
"show": true
},
{
"format": "short",
"logBase": 1,
"max": null,
"min": null,
"show": true
}
],
"yaxis": {
"align": false,
"alignLevel": null
}
},
{
"aliasColors": {
"Count": "#6ED0E0"
},
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": "gdev-elasticsearch-v6-metrics",
"editable": true,
"error": false,
"fieldConfig": {
"defaults": {
"custom": {}
},
"overrides": []
},
"fill": 1,
"fillGradient": 0,
"grid": {},
"gridPos": {
"h": 6,
"w": 12,
"x": 0,
"y": 7
},
"hiddenSeries": false,
"id": 2,
"legend": {
"alignAsTable": true,
"avg": true,
"current": false,
"max": false,
"min": false,
"rightSide": true,
"show": true,
"total": false,
"values": true
},
"lines": true,
"linewidth": 2,
"links": [],
"nullPointMode": "connected",
"options": {
"dataLinks": []
},
"percentage": false,
"pointradius": 5,
"points": false,
"renderer": "flot",
"seriesOverrides": [
{
"alias": "Count",
"lines": false,
"yaxis": 2,
"zindex": -1
}
],
"spaceLength": 10,
"stack": false,
"steppedLine": false,
"targets": [
{
"alias": "{{metric}}",
"bucketAggs": [
{
"field": "@timestamp",
"id": "2",
"settings": {
"interval": "5m",
"min_doc_count": 0,
"trimEdges": 0
},
"type": "date_histogram"
}
],
"dsType": "elasticsearch",
"metrics": [
{
"field": "@value",
"id": "1",
"meta": {},
"settings": {
"percents": [25, 50, 75, 95, 99]
},
"type": "percentiles"
}
],
"query": "@metric:cpu",
"refId": "A",
"target": "",
"timeField": "@timestamp"
}
],
"thresholds": [],
"timeFrom": null,
"timeRegions": [],
"timeShift": null,
"title": "Percentiles & Metric filter",
"tooltip": {
"msResolution": false,
"shared": true,
"sort": 0,
"value_type": "cumulative"
},
"type": "graph",
"xaxis": {
"buckets": null,
"mode": "time",
"name": null,
"show": true,
"values": []
},
"yaxes": [
{
"format": "short",
"logBase": 1,
"max": null,
"min": null,
"show": true
},
{
"format": "short",
"logBase": 1,
"max": null,
"min": null,
"show": true
}
],
"yaxis": {
"align": false,
"alignLevel": null
}
},
{
"aliasColors": {
"Count": "#6ED0E0"
},
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": "gdev-elasticsearch-v6-metrics",
"editable": true,
"error": false,
"fieldConfig": {
"defaults": {
"custom": {}
},
"overrides": []
},
"fill": 1,
"fillGradient": 0,
"grid": {},
"gridPos": {
"h": 6,
"w": 12,
"x": 12,
"y": 7
},
"hiddenSeries": false,
"id": 3,
"legend": {
"alignAsTable": true,
"avg": true,
"current": false,
"max": false,
"min": false,
"rightSide": true,
"show": true,
"total": false,
"values": true
},
"lines": true,
"linewidth": 2,
"links": [],
"nullPointMode": "connected",
"options": {
"dataLinks": []
},
"percentage": false,
"pointradius": 5,
"points": false,
"renderer": "flot",
"seriesOverrides": [
{
"alias": "Count",
"lines": false,
"yaxis": 2,
"zindex": -1
}
],
"spaceLength": 10,
"stack": false,
"steppedLine": false,
"targets": [
{
"alias": "{{metric}}",
"bucketAggs": [
{
"field": "@timestamp",
"id": "2",
"settings": {
"interval": "auto",
"min_doc_count": 0,
"trimEdges": 0
},
"type": "date_histogram"
}
],
"dsType": "elasticsearch",
"metrics": [
{
"field": "@value",
"id": "1",
"meta": {
"std_deviation_bounds_lower": true,
"std_deviation_bounds_upper": true
},
"settings": {},
"type": "extended_stats"
}
],
"query": "@metric:cpu",
"refId": "A",
"target": "",
"timeField": "@timestamp"
}
],
"thresholds": [],
"timeFrom": null,
"timeRegions": [],
"timeShift": null,
"title": "Standard dev",
"tooltip": {
"msResolution": true,
"shared": true,
"sort": 0,
"value_type": "cumulative"
},
"type": "graph",
"xaxis": {
"buckets": null,
"mode": "time",
"name": null,
"show": true,
"values": []
},
"yaxes": [
{
"format": "short",
"logBase": 1,
"max": null,
"min": null,
"show": true
},
{
"format": "short",
"logBase": 1,
"max": null,
"min": null,
"show": true
}
],
"yaxis": {
"align": false,
"alignLevel": null
}
},
{
"columns": [
{
"text": "@hostname",
"value": "@hostname"
},
{
"text": "Average",
"value": "Average"
},
{
"text": "Max",
"value": "Max"
},
{
"text": "Sum",
"value": "Sum"
}
],
"datasource": "gdev-elasticsearch-v6-metrics",
"editable": true,
"error": false,
"fieldConfig": {
"defaults": {
"custom": {}
},
"overrides": []
},
"fontSize": "100%",
"gridPos": {
"h": 7,
"w": 24,
"x": 0,
"y": 13
},
"id": 6,
"links": [],
"pageSize": null,
"scroll": true,
"showHeader": true,
"sort": {
"col": 0,
"desc": true
},
"styles": [
{
"align": "auto",
"dateFormat": "YYYY-MM-DD HH:mm:ss",
"pattern": "@timestamp",
"type": "date"
},
{
"align": "auto",
"colorMode": null,
"colors": ["rgba(245, 54, 54, 0.9)", "rgba(237, 129, 40, 0.89)", "rgba(50, 172, 45, 0.97)"],
"dateFormat": "YYYY-MM-DD HH:mm:ss",
"decimals": 2,
"pattern": "/.*/",
"thresholds": [],
"type": "number",
"unit": "short"
}
],
"targets": [
{
"bucketAggs": [
{
"field": "@hostname",
"id": "2",
"settings": {
"min_doc_count": 1,
"order": "asc",
"orderBy": "_term",
"size": "0"
},
"type": "terms"
}
],
"dsType": "elasticsearch",
"metrics": [
{
"field": "@value",
"id": "1",
"meta": {},
"settings": {},
"type": "avg"
},
{
"field": "@value",
"id": "3",
"meta": {},
"settings": {},
"type": "max"
},
{
"field": "@value",
"id": "4",
"meta": {},
"settings": {},
"type": "sum"
}
],
"refId": "B",
"timeField": "@timestamp"
}
],
"title": "ES Metrics",
"transform": "table",
"type": "table-old"
},
{
"columns": [
{
"text": "@timestamp",
"value": "@timestamp"
},
{
"text": "@message",
"value": "@message"
},
{
"text": "tags",
"value": "tags"
},
{
"text": "description",
"value": "description"
}
],
"datasource": "gdev-elasticsearch-v6-logs",
"editable": true,
"error": false,
"fieldConfig": {
"defaults": {
"custom": {}
},
"overrides": []
},
"fontSize": "100%",
"gridPos": {
"h": 7,
"w": 24,
"x": 0,
"y": 20
},
"id": 5,
"links": [],
"pageSize": null,
"scroll": true,
"showHeader": true,
"sort": {
"col": 0,
"desc": true
},
"styles": [
{
"align": "auto",
"dateFormat": "YYYY-MM-DD HH:mm:ss",
"pattern": "@timestamp",
"type": "date"
}
],
"targets": [
{
"bucketAggs": [],
"dsType": "elasticsearch",
"metrics": [
{
"field": "select field",
"id": "1",
"meta": {},
"settings": {
"size": 500
},
"type": "raw_document"
}
],
"refId": "A",
"target": "",
"timeField": "@timestamp"
}
],
"title": "ES Log query",
"transform": "json",
"type": "table-old"
},
{
"circleMaxSize": 30,
"circleMinSize": 2,
"colors": ["rgba(245, 54, 54, 0.9)", "rgba(237, 129, 40, 0.89)", "rgba(50, 172, 45, 0.97)"],
"datasource": "gdev-elasticsearch-v6-metrics",
"decimals": 0,
"esGeoPoint": "@location",
"esMetric": "Average",
"fieldConfig": {
"defaults": {
"custom": {}
},
"overrides": []
},
"gridPos": {
"h": 12,
"w": 24,
"x": 0,
"y": 27
},
"hideEmpty": false,
"hideZero": false,
"id": 8,
"initialZoom": "1",
"links": [],
"locationData": "geohash",
"mapCenter": "(0°, 0°)",
"mapCenterLatitude": 0,
"mapCenterLongitude": 0,
"maxDataPoints": 1,
"mouseWheelZoom": false,
"showLegend": true,
"stickyLabels": false,
"tableQueryOptions": {
"geohashField": "geohash",
"latitudeField": "latitude",
"longitudeField": "longitude",
"metricField": "metric",
"queryType": "geohash"
},
"targets": [
{
"bucketAggs": [
{
"fake": true,
"field": "@location",
"id": "3",
"settings": {
"precision": 2
},
"type": "geohash_grid"
}
],
"metrics": [
{
"field": "@value",
"id": "1",
"meta": {},
"settings": {},
"type": "avg"
}
],
"refId": "A",
"target": "",
"timeField": "@timestamp"
}
],
"thresholds": "0,10",
"title": "World map panel",
"type": "grafana-worldmap-panel",
"unitPlural": "",
"unitSingle": "",
"valueName": "total"
}
],
"refresh": false,
"schemaVersion": 25,
"style": "dark",
"tags": ["elasticsearch", "gdev", "datasource-test"],
"templating": {
"list": [
{
"datasource": "gdev-elasticsearch-v6-metrics",
"filters": [],
"hide": 0,
"label": "",
"name": "Filters",
"skipUrlSync": false,
"type": "adhoc"
}
]
},
"time": {
"from": "now-1h",
"to": "now"
},
"timepicker": {
"collapse": false,
"enable": true,
"notice": false,
"now": true,
"refresh_intervals": ["5s", "10s", "30s", "1m", "5m", "15m", "30m", "1h", "2h", "1d"],
"status": "Stable",
"time_options": ["5m", "15m", "1h", "6h", "12h", "24h", "2d", "7d", "30d"],
"type": "timepicker"
},
"timezone": "browser",
"title": "Datasource tests - Elasticsearch v6",
"uid": "NF8Pq2Biz",
"version": 1
}

View File

@@ -0,0 +1,241 @@
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": "-- Grafana --",
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations & Alerts",
"type": "dashboard"
}
]
},
"editable": true,
"gnetId": null,
"graphTooltip": 0,
"iteration": 1591027621672,
"links": [
{
"asDropdown": true,
"icon": "external link",
"tags": ["gdev", "elasticsearch", "datasource-test"],
"title": "Dashboards",
"type": "dashboards"
}
],
"panels": [
{
"aliasColors": {
"error": "red"
},
"bars": true,
"dashLength": 10,
"dashes": false,
"datasource": "gdev-elasticsearch-v6-filebeat",
"fieldConfig": {
"defaults": {
"custom": {}
},
"overrides": []
},
"fill": 1,
"fillGradient": 0,
"gridPos": {
"h": 5,
"w": 24,
"x": 0,
"y": 0
},
"hiddenSeries": false,
"id": 4,
"legend": {
"avg": false,
"current": false,
"max": false,
"min": false,
"show": true,
"total": false,
"values": false
},
"lines": false,
"linewidth": 1,
"nullPointMode": "null",
"options": {
"dataLinks": []
},
"percentage": false,
"pointradius": 2,
"points": false,
"renderer": "flot",
"seriesOverrides": [],
"spaceLength": 10,
"stack": true,
"steppedLine": false,
"targets": [
{
"bucketAggs": [
{
"fake": true,
"field": "fields.level",
"id": "3",
"settings": {
"min_doc_count": 1,
"order": "desc",
"orderBy": "_term",
"size": "10"
},
"type": "terms"
},
{
"field": "@timestamp",
"id": "2",
"settings": {
"interval": "5m",
"min_doc_count": 1,
"trimEdges": 0
},
"type": "date_histogram"
}
],
"metrics": [
{
"field": "select field",
"id": "1",
"type": "count"
}
],
"query": "fields.app:grafana",
"refId": "A",
"timeField": "@timestamp"
}
],
"thresholds": [],
"timeFrom": null,
"timeRegions": [],
"timeShift": null,
"title": "Panel Title",
"tooltip": {
"shared": true,
"sort": 0,
"value_type": "individual"
},
"type": "graph",
"xaxis": {
"buckets": null,
"mode": "time",
"name": null,
"show": true,
"values": []
},
"yaxes": [
{
"format": "short",
"label": null,
"logBase": 1,
"max": null,
"min": null,
"show": true
},
{
"format": "short",
"label": null,
"logBase": 1,
"max": null,
"min": null,
"show": true
}
],
"yaxis": {
"align": false,
"alignLevel": null
}
},
{
"datasource": "gdev-elasticsearch-v6-filebeat",
"fieldConfig": {
"defaults": {
"custom": {}
},
"overrides": []
},
"gridPos": {
"h": 22,
"w": 24,
"x": 0,
"y": 5
},
"id": 2,
"links": [],
"options": {
"showLabels": false,
"showTime": true,
"sortOrder": "Descending",
"wrapLogMessage": true
},
"targets": [
{
"bucketAggs": [
{
"$$hashKey": "object:394",
"field": "@timestamp",
"id": "2",
"settings": {
"interval": "auto",
"min_doc_count": 0,
"trimEdges": 0
},
"type": "date_histogram"
}
],
"metrics": [
{
"$$hashKey": "object:359",
"field": "select field",
"id": "1",
"meta": {},
"settings": {},
"type": "logs"
}
],
"query": "fields.app:grafana",
"refId": "A",
"timeField": "@timestamp"
}
],
"timeFrom": null,
"timeShift": null,
"title": "Panel Title",
"type": "logs"
}
],
"schemaVersion": 25,
"style": "dark",
"tags": ["gdev", "elasticsearch", "datasource-test"],
"templating": {
"list": [
{
"datasource": "gdev-elasticsearch-v6-filebeat",
"filters": [],
"hide": 0,
"label": "",
"name": "Filters",
"skipUrlSync": false,
"type": "adhoc"
}
]
},
"time": {
"from": "now-30m",
"to": "now"
},
"timepicker": {
"refresh_intervals": ["5s", "10s", "30s", "1m", "5m", "15m", "30m", "1h", "2h", "1d"],
"time_options": ["5m", "15m", "1h", "6h", "12h", "24h", "2d", "7d", "30d"]
},
"timezone": "",
"title": "Datasource tests - Elasticsearch v6 Filebeat",
"uid": "06tPt4gZz",
"version": 1
}

View File

@@ -16,7 +16,7 @@
"gnetId": null,
"graphTooltip": 0,
"id": null,
"iteration": 1601526910610,
"iteration": 1646409057541,
"links": [
{
"icon": "external link",
@@ -73,6 +73,61 @@
"timeShift": null,
"title": "${custom.text}",
"type": "text"
},
{
"id": 4,
"gridPos": {
"h": 9,
"w": 9,
"x": 12,
"y": 0
},
"type": "stat",
"title": "Panel Title",
"fieldConfig": {
"defaults": {
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
},
"color": {
"mode": "thresholds"
},
"links": [
{
"title": "Var Link",
"url": "/d/vmie2cmWz/bar-gauge-demo?var-custom=$custom"
}
]
},
"overrides": []
},
"options": {
"reduceOptions": {
"values": false,
"calcs": [
"lastNotNull"
],
"fields": ""
},
"orientation": "auto",
"textMode": "auto",
"colorMode": "value",
"graphMode": "area",
"justifyMode": "auto"
},
"pluginVersion": "8.5.0-pre",
"datasource": null
}
],
"schemaVersion": 26,
@@ -112,6 +167,11 @@
"selected": false,
"text": "p3",
"value": "p3"
},
{
"selected": false,
"text": "p4",
"value": "test%25value"
}
],
"query": "p1,p2,p3",

View File

@@ -1,76 +0,0 @@
{
"__inputs": [],
"__elements": [],
"__requires": [
{
"type": "grafana",
"id": "grafana",
"name": "Grafana",
"version": "8.4.0-pre"
},
{
"type": "panel",
"id": "text",
"name": "Text",
"version": ""
}
],
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": "-- Grafana --",
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations & Alerts",
"target": {
"limit": 100,
"matchAny": false,
"tags": [],
"type": "dashboard"
},
"type": "dashboard"
}
]
},
"editable": true,
"fiscalYearStartMonth": 0,
"graphTooltip": 0,
"links": [],
"liveNow": false,
"panels": [
{
"gridPos": {
"h": 9,
"w": 12,
"x": 0,
"y": 0
},
"id": 2,
"options": {
"mode": "markdown",
"content": "VariableUnderTest: $VariableUnderTest"
},
"pluginVersion": "8.4.0-pre",
"title": "Panel Title",
"type": "text"
}
],
"schemaVersion": 35,
"style": "dark",
"tags": [],
"templating": {
"list": []
},
"time": {
"from": "now-6h",
"to": "now"
},
"timepicker": {},
"timezone": "",
"title": "Test variable output",
"uid": "kVi2Gex7z",
"version": 2,
"weekStart": ""
}

View File

@@ -3,10 +3,7 @@
"list": [
{
"builtIn": 1,
"datasource": {
"type": "datasource",
"uid": "grafana"
},
"datasource": "-- Grafana --",
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
@@ -22,7 +19,6 @@
]
},
"editable": true,
"fiscalYearStartMonth": 0,
"graphTooltip": 0,
"links": [
{
@@ -36,7 +32,6 @@
"type": "dashboards"
}
],
"liveNow": false,
"panels": [
{
"datasource": {
@@ -1047,10 +1042,6 @@
"type": "timeseries"
},
{
"datasource": {
"type": "testdata",
"uid": "PD8C576611E62080A"
},
"fieldConfig": {
"defaults": {
"color": {
@@ -1152,10 +1143,6 @@
"type": "timeseries"
},
{
"datasource": {
"type": "testdata",
"uid": "PD8C576611E62080A"
},
"fieldConfig": {
"defaults": {
"color": {
@@ -1235,95 +1222,6 @@
],
"title": "Always show points between gaps",
"type": "timeseries"
},
{
"datasource": {
"type": "testdata",
"uid": "PD8C576611E62080A"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
"drawStyle": "line",
"fillOpacity": 0,
"gradientMode": "none",
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"lineInterpolation": "linear",
"lineStyle": {
"fill": "solid"
},
"lineWidth": 1,
"pointSize": 5,
"scaleDistribution": {
"type": "linear"
},
"showPoints": "never",
"spanNulls": false,
"stacking": {
"group": "A",
"mode": "none"
},
"thresholdsStyle": {
"mode": "off"
}
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green"
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 7,
"x": 7,
"y": 22
},
"id": 16,
"options": {
"legend": {
"calcs": [],
"displayMode": "list",
"placement": "bottom"
},
"tooltip": {
"mode": "single",
"sort": "none"
}
},
"targets": [
{
"datasource": {
"type": "testdata",
"uid": "PD8C576611E62080A"
},
"refId": "A",
"scenarioId": "csv_metric_values",
"stringInput": ",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,60,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,61,,,,,,60,,,,,,,,,,,,,,,,,,61,,,,,,60,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,61,,,,,,60,,,,,,59,,,,,,60,,,,,,,59,,,,,,,,,,,,,,,,,,,,,,,,58,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,57,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,56,,,,,,57,,,,,,56,,,,,,57,,,,,,,,,,,,56,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,55,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,56,,,,,55,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,54,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,53,,,,,54,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,55,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,56,,,,,,,,,,,,,,,,,,55,,,,,,56,,,,,,,,,,,,57,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,56,,,,,,57,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,56,,,,,,,,,,,,57,,,,,,,58,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,57,,,,,,,,,,,,,,,,,,,58,,,,,,59,,,,,,58,,,,,,,,,,,,,,,,,,,,,,,,57,,,,,,58,,,,,,,,,,,,,,,,,,,59,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,60,,,,,,,,,,,,61,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,62,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,61,,,,,,,,,,,,,,,,,,60,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,59,,,,,,60,,,,,,59,,,,,,60,,,,,,,,,,,,,,,,,,,,,,,,,59,,,,,,,,,,,,,,,,,60,,,,,,,,,,,,,59,,,,,,60,,,,,,,,,,,,59,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,58,,,,,,59,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,58,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,57,,,,,,58,,,,,,57,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,56,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,55,,,,,,56,,,,,,55,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,54,,,,,,53,,,,,,,,,,,,,,,,,,,52,,,,,,,,,,,51,,,,,,,,,,,,,,,,,,,,,,,,,52,,,,,,,54,,,,,,55,,,,,,56,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,57,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,58,,,,,,,,,,,,,,,,,,59,,,,,,,,,,,,,,,,,,60,,,,,,,,,,,,61,,,,,,,,,,,,,,,,,,,,,,,,60,,,,,,61,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,62,,,,,,61,,,,,,62,,,,,,61,,,,,,62,,,,,,,,,,,,,,,,,,,63,,,,,,,,,,,,,,,,,,,,,,,,64,,,,,,63,,,,,,64,,,,,,63,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,62,,,,,,,,,,,,,,,,,,,61,,,,,,,,,,,,62,,,,,,,,,,,,,,,,,,,,,,,,,63,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,64,,,,,,,,,,,,63,,,,,,,,,,,,,62,,,,,,,,,,,,,,,,,,,,"
}
],
"title": "Always show points between gaps",
"type": "timeseries"
}
],
"schemaVersion": 33,
@@ -1344,6 +1242,5 @@
"timezone": "",
"title": "Panel Tests - Graph NG - Gaps and Connected",
"uid": "8mmCAF1Mz",
"version": 1,
"weekStart": ""
"version": 2
}

File diff suppressed because it is too large Load Diff

View File

@@ -1,553 +0,0 @@
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": {
"type": "grafana",
"uid": "-- Grafana --"
},
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations & Alerts",
"target": {
"limit": 100,
"matchAny": false,
"tags": [],
"type": "dashboard"
},
"type": "dashboard"
}
]
},
"editable": true,
"fiscalYearStartMonth": 0,
"graphTooltip": 1,
"links": [],
"liveNow": false,
"panels": [
{
"datasource": {
"type": "testdata",
"uid": "PD8C576611E62080A"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
"drawStyle": "points",
"fillOpacity": 0,
"gradientMode": "none",
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"lineInterpolation": "linear",
"lineWidth": 1,
"pointSize": 2,
"scaleDistribution": {
"log": 2,
"type": "log"
},
"showPoints": "auto",
"spanNulls": false,
"stacking": {
"group": "A",
"mode": "none"
},
"thresholdsStyle": {
"mode": "off"
}
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green"
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 14,
"w": 8,
"x": 0,
"y": 0
},
"id": 3,
"options": {
"legend": {
"calcs": [],
"displayMode": "list",
"placement": "bottom"
},
"tooltip": {
"mode": "single",
"sort": "none"
}
},
"pluginVersion": "9.0.0-pre",
"targets": [
{
"datasource": {
"type": "testdata",
"uid": "PD8C576611E62080A"
},
"max": 500000,
"min": 0.01,
"refId": "A",
"scenarioId": "random_walk",
"seriesCount": 2,
"spread": 1000,
"startValue": 0.01
}
],
"title": "Time series",
"type": "timeseries"
},
{
"datasource": {
"type": "datasource",
"uid": "-- Dashboard --"
},
"fieldConfig": {
"defaults": {
"custom": {
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"scaleDistribution": {
"type": "linear"
}
}
},
"overrides": []
},
"gridPos": {
"h": 14,
"w": 8,
"x": 8,
"y": 0
},
"id": 6,
"options": {
"bucket": {
"layout": "auto"
},
"calculate": true,
"calculation": {
"yBuckets": {
"scale": {
"log": 2,
"type": "log"
}
}
},
"cellGap": 1,
"color": {
"exponent": 0.5,
"fill": "dark-orange",
"mode": "scheme",
"scale": "exponential",
"scheme": "Spectral",
"steps": 64
},
"exemplars": {
"color": "rgba(255,0,255,0.7)"
},
"filterValues": {
"le": 1e-9
},
"legend": {
"show": true
},
"mode": "calculate",
"tooltip": {
"show": true,
"yHistogram": false
},
"yAxis": {
"axisPlacement": "left",
"reverse": false
},
"yAxisLabels": "auto",
"yAxisReverse": false
},
"pluginVersion": "9.0.0-pre",
"targets": [
{
"datasource": {
"type": "datasource",
"uid": "-- Dashboard --"
},
"panelId": 3,
"refId": "A"
}
],
"title": "log2",
"type": "heatmap-new"
},
{
"datasource": {
"type": "datasource",
"uid": "-- Dashboard --"
},
"fieldConfig": {
"defaults": {
"custom": {
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"scaleDistribution": {
"type": "linear"
}
}
},
"overrides": []
},
"gridPos": {
"h": 14,
"w": 8,
"x": 16,
"y": 0
},
"id": 7,
"options": {
"bucket": {
"layout": "auto"
},
"calculate": true,
"calculation": {
"yBuckets": {
"scale": {
"log": 2,
"type": "log"
},
"value": "2"
}
},
"cellGap": 1,
"color": {
"exponent": 0.5,
"fill": "dark-orange",
"mode": "scheme",
"scale": "exponential",
"scheme": "Spectral",
"steps": 64
},
"exemplars": {
"color": "rgba(255,0,255,0.7)"
},
"filterValues": {
"le": 1e-9
},
"legend": {
"show": true
},
"mode": "calculate",
"tooltip": {
"show": true,
"yHistogram": false
},
"yAxis": {
"axisPlacement": "left",
"reverse": false
},
"yAxisLabels": "auto",
"yAxisReverse": false
},
"pluginVersion": "9.0.0-pre",
"targets": [
{
"datasource": {
"type": "datasource",
"uid": "-- Dashboard --"
},
"panelId": 3,
"refId": "A"
}
],
"title": "log2 split 2",
"type": "heatmap-new"
},
{
"datasource": {
"type": "datasource",
"uid": "-- Dashboard --"
},
"fieldConfig": {
"defaults": {
"custom": {
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"scaleDistribution": {
"type": "linear"
}
}
},
"overrides": []
},
"gridPos": {
"h": 14,
"w": 8,
"x": 0,
"y": 14
},
"id": 4,
"options": {
"bucket": {
"layout": "auto"
},
"calculate": true,
"cellGap": 1,
"color": {
"exponent": 0.5,
"fill": "dark-orange",
"mode": "scheme",
"scale": "exponential",
"scheme": "Spectral",
"steps": 64
},
"exemplars": {
"color": "rgba(255,0,255,0.7)"
},
"filterValues": {
"le": 1e-9
},
"legend": {
"show": true
},
"mode": "calculate",
"tooltip": {
"show": true,
"yHistogram": false
},
"yAxis": {
"axisPlacement": "left",
"reverse": false
},
"yAxisLabels": "auto",
"yAxisReverse": false
},
"pluginVersion": "9.0.0-pre",
"targets": [
{
"datasource": {
"type": "datasource",
"uid": "-- Dashboard --"
},
"panelId": 3,
"refId": "A"
}
],
"title": "linear",
"type": "heatmap-new"
},
{
"datasource": {
"type": "datasource",
"uid": "-- Dashboard --"
},
"fieldConfig": {
"defaults": {
"custom": {
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"scaleDistribution": {
"type": "linear"
}
}
},
"overrides": []
},
"gridPos": {
"h": 14,
"w": 8,
"x": 8,
"y": 14
},
"id": 5,
"options": {
"bucket": {
"layout": "auto"
},
"calculate": true,
"calculation": {
"yBuckets": {
"scale": {
"log": 10,
"type": "log"
}
}
},
"cellGap": 1,
"color": {
"exponent": 0.5,
"fill": "dark-orange",
"mode": "scheme",
"scale": "exponential",
"scheme": "Spectral",
"steps": 64
},
"exemplars": {
"color": "rgba(255,0,255,0.7)"
},
"filterValues": {
"le": 1e-9
},
"legend": {
"show": true
},
"mode": "calculate",
"tooltip": {
"show": true,
"yHistogram": false
},
"yAxis": {
"axisPlacement": "left",
"reverse": false
},
"yAxisLabels": "auto",
"yAxisReverse": false
},
"pluginVersion": "9.0.0-pre",
"targets": [
{
"datasource": {
"type": "datasource",
"uid": "-- Dashboard --"
},
"panelId": 3,
"refId": "A"
}
],
"title": "log10",
"type": "heatmap-new"
},
{
"datasource": {
"type": "datasource",
"uid": "-- Dashboard --"
},
"fieldConfig": {
"defaults": {
"custom": {
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"scaleDistribution": {
"type": "linear"
}
}
},
"overrides": []
},
"gridPos": {
"h": 14,
"w": 8,
"x": 16,
"y": 14
},
"id": 8,
"options": {
"bucket": {
"layout": "auto"
},
"calculate": true,
"calculation": {
"yBuckets": {
"scale": {
"log": 10,
"type": "log"
},
"value": "2"
}
},
"cellGap": 1,
"color": {
"exponent": 0.5,
"fill": "dark-orange",
"mode": "scheme",
"scale": "exponential",
"scheme": "Spectral",
"steps": 64
},
"exemplars": {
"color": "rgba(255,0,255,0.7)"
},
"filterValues": {
"le": 1e-9
},
"legend": {
"show": true
},
"mode": "calculate",
"tooltip": {
"show": true,
"yHistogram": false
},
"yAxis": {
"axisPlacement": "left",
"reverse": false
},
"yAxisLabels": "auto",
"yAxisReverse": false
},
"pluginVersion": "9.0.0-pre",
"targets": [
{
"datasource": {
"type": "datasource",
"uid": "-- Dashboard --"
},
"panelId": 3,
"refId": "A"
}
],
"title": "log10 split 2",
"type": "heatmap-new"
}
],
"schemaVersion": 36,
"style": "dark",
"tags": ["gdev", "panel-tests", "graph-ng"],
"templating": {
"list": []
},
"time": {
"from": "now-6h",
"to": "now"
},
"timepicker": {},
"timezone": "",
"title": "Heatmap calculate (log)",
"uid": "ZXYQTA97ZZ",
"version": 1,
"weekStart": ""
}

File diff suppressed because one or more lines are too long

View File

@@ -2,6 +2,6 @@
FROM golang:latest
ADD main.go /
WORKDIR /
RUN go mod init alert_webhook_listener && go build -o main .
RUN go build -o main .
EXPOSE 3010
ENTRYPOINT ["/main"]

View File

@@ -1,4 +1,5 @@
alert_webhook_listener:
build: docker/blocks/alert_webhook_listener
network_mode: host
ports:
- "3010:3010"

View File

@@ -1 +0,0 @@
elastic_version=8.2.0

View File

@@ -1,3 +0,0 @@
FROM node:16-alpine
COPY data.js /home/node/data.js

View File

@@ -1,137 +0,0 @@
const http = require('http');
if (process.argv.length !== 3) {
throw new Error('invalid command line: use node sendLogs.js ELASTIC_BASE_URL');
}
const ELASTIC_BASE_URL = process.argv[2];
// helper function, do a http request
async function jsonRequest(data, method, url, expectedStatusCode) {
return new Promise((resolve, reject) => {
const req = http.request(
{
protocol: url.protocol,
host: url.hostname,
port: url.port,
path: `${url.pathname}${url.search}`,
method,
headers: { 'content-type': 'application/json' },
},
(res) => {
if (res.statusCode !== expectedStatusCode) {
reject(new Error(`Invalid response: ${res.statusCode}`));
} else {
resolve();
}
}
);
req.on('error', (err) => reject(err));
req.write(JSON.stringify(data));
req.end();
});
}
// helper function, choose a random element from an array
function chooseRandomElement(items) {
const index = Math.trunc(Math.random() * items.length);
return items[index];
}
// helper function, sleep for a duration
async function sleep(duration) {
return new Promise((resolve) => {
setTimeout(resolve, duration);
});
}
async function elasticSendLogItem(timestamp, item) {
// we need the YYYY.MM.DD format
const timestampText = timestamp.toISOString().slice(0, 10).replace(/-/g, '.');
const url = new URL(ELASTIC_BASE_URL);
url.pathname = `/logs-${timestampText}/_doc`;
await jsonRequest(item, 'POST', url, 201);
console.log(`posted to ${url.toString()}`);
}
async function elasticSetupIndexTemplate() {
const data = {
index_patterns: ['logs-*'],
template: {
mappings: {
properties: {
'@timestamp': {
type: 'date',
},
counter: {
type: 'integer',
},
float: {
type: 'float',
},
level: {
type: 'keyword',
},
label: {
type: 'keyword',
},
location: {
type: 'geo_point',
},
},
},
},
};
const url = new URL(ELASTIC_BASE_URL);
url.pathname = '/_index_template/gdev';
await jsonRequest(data, 'PUT', url, 200);
}
function makeRandomPoint() {
const angle = Math.random() * 2 * Math.PI;
const x = 45 * Math.sin(angle);
const y = 45 * Math.cos(angle);
return y + ', ' + x;
}
function getRandomLogItem(counter, timestamp) {
const randomText = `${Math.trunc(Math.random() * 1000 * 1000 * 1000)}`;
const maybeAnsiText = Math.random() < 0.5 ? 'with ANSI \u001b[31mpart of the text\u001b[0m' : '';
return {
'@timestamp': timestamp.toISOString(),
line: `log text ${maybeAnsiText} [${randomText}]`,
counter: counter.toString(),
float: 100 * Math.random().toString(),
label: chooseRandomElement(['val1', 'val2', 'val3']),
level: chooseRandomElement(['info', 'info', 'error']),
// location: chooseRandomElement(LOCATIONS),
location: makeRandomPoint(),
};
}
async function main() {
await elasticSetupIndexTemplate();
const SLEEP_ANGLE_STEP = Math.PI / 200;
let sleepAngle = 0;
function getNextSineWaveSleepDuration() {
sleepAngle += SLEEP_ANGLE_STEP;
return Math.trunc(1000 * Math.abs(Math.sin(sleepAngle)));
}
for (let step = 0; step < 300; step++) {
await sleep(getNextSineWaveSleepDuration());
const timestamp = new Date();
const item = getRandomLogItem(step + 1, timestamp);
elasticSendLogItem(timestamp, item);
}
}
// when running in docker, we catch the needed stop-signal, to shutdown fast
process.on('SIGTERM', () => {
console.log('shutdown requested');
process.exit(0);
});
main();

View File

@@ -1,24 +1,22 @@
# You need to run 'sysctl -w vm.max_map_count=262144' on the host machine
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:${elastic_version}
elasticsearch-latest:
image: docker.elastic.co/elasticsearch/elasticsearch:8.0.0-beta1
command: elasticsearch
environment:
- "discovery.type=single-node"
- "xpack.license.self_generated.type=basic"
- "xpack.security.enabled=false"
ports:
- "9200:9200"
- "14200:9200"
- "14300:9300"
data:
build: docker/blocks/elastic/data
command: node /home/node/data.js http://elasticsearch:9200
depends_on:
- elasticsearch
# elastic starts slowly, the first couple start of data.js
# might fail, so we auto-restart it on failure.
deploy:
restart_policy:
condition: on-failure
delay: 5s
max_attempts: 20 # should be enough
# TODO: uncomment when https://github.com/grafana/fake-data-gen/pull/20 is merged
# fake-elastic-latest-data:
# image: grafana/fake-data-gen
# links:
# - elasticsearch-latest
# environment:
# FD_SERVER: elasticsearch-latest
# FD_DATASOURCE: elasticsearch8
# FD_PORT: 9200

View File

@@ -0,0 +1,15 @@
elasticsearch2:
image: elasticsearch:2.4.1
command: elasticsearch -Des.network.host=0.0.0.0
ports:
- "9200:9200"
- "9300:9300"
volumes:
- ./docker/blocks/elastic2/elasticsearch.yml:/usr/share/elasticsearch/config/elasticsearch.yml
fake-elastic-data:
image: grafana/fake-data-gen
environment:
FD_SERVER: elasticsearch2
FD_DATASOURCE: elasticsearch
FD_PORT: 9200

Some files were not shown because too many files have changed in this diff Show More