Compare commits

..

186 Commits

Author SHA1 Message Date
Grot (@grafanabot)
f3f9a818c2 "Release: Updated versions in package to 9.1.3" (#490) 2022-09-05 17:59:46 +02:00
Dominik Prokop
6e300048ed 54570 manual backport (#54716) 2022-09-05 17:18:50 +02:00
Grot (@grafanabot)
6f255cb089 LibraryElements: Fix inability to delete library panels under MySQL (#54600) (#54711)
Closes #53456

(cherry picked from commit 65c3ad6721)

Co-authored-by: kay delaney <45561153+kaydelaney@users.noreply.github.com>
2022-09-05 10:29:56 -04:00
Grot (@grafanabot)
d04f3fb2f1 A11y: Make tabs in query history + inspector accessible in Explore (#53773) (#53902)
* refactor: make tabs accesible

* refactor: make content after slider accessible

* refactor: add a comment with todo

(cherry picked from commit f5f93ccd96)

Co-authored-by: Laura Benz <48948963+L-M-K-B@users.noreply.github.com>
2022-09-05 16:22:50 +02:00
Grot (@grafanabot)
05e6b345b6 Explore: Improve a11y of query row collapse button (#53827) (#54149)
* refactor: convert to IconButton

* refactor: adjust attributes

(cherry picked from commit 95ec6f6c0f)

Co-authored-by: Laura Benz <48948963+L-M-K-B@users.noreply.github.com>
2022-09-05 16:22:24 +02:00
Grot (@grafanabot)
8696aea01f GrafanaUI: Fix styles for invalid selects & DataSourcePicker (#53476) (#54321)
* GrafanaUI: fix styles for invalid select & DataSourcePicker

* Apply suggestions from code review

Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>

* fix focus issues & tests

* remove unused import

* TypeScript work in progress

* Move react select props to types.ts

Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
Co-authored-by: eledobleefe <laura.fernandez@grafana.com>
Co-authored-by: joshhunt <josh@trtr.co>
(cherry picked from commit 26524e3ff1)

Co-authored-by: Giordano Ricci <me@giordanoricci.com>
2022-09-05 15:18:44 +01:00
Grot (@grafanabot)
9b816ea945 API: Do not expose user input in datasource error responses (#53483) (#54709)
(cherry picked from commit 950715b255)

Co-authored-by: Sofia Papagiannaki <1632407+papagian@users.noreply.github.com>
2022-09-05 09:24:23 -04:00
Grot (@grafanabot)
25f4599e76 Fix StateTimeline duration bug + add hidden tooltip option (#54697) (#54701)
(cherry picked from commit aee13563ce)

Co-authored-by: Victor Marin <36818606+mdvictor@users.noreply.github.com>
2022-09-05 07:26:05 -04:00
Carl Bergquist
8790142aef Instrumentation: log the total number of db queries per request (#54647) (#54686)
Signed-off-by: bergquist <carl.bergquist@gmail.com>
Co-authored-by: Emil Tullstedt <emil.tullstedt@grafana.com>
Co-authored-by: Dave Henderson <dave.henderson@grafana.com>
(cherry picked from commit 78978048c3)
2022-09-05 11:58:35 +02:00
Jo
4f924a9b97 Add JWT url auth documentation (#54040) (#54689)
* add jwt auth docs

* add appropriate warnings to docs

* remove unimplemented login_token assumptions

* Update conf/sample.ini

(cherry picked from commit 4952b7f22d)
2022-09-05 04:05:01 -04:00
Kim Nylander
6da550f736 [Doc][Tempo] Backport 54120 to v9.1.x (#54675)
* [Doc] Fix broken link in Tempo doc (#54120)

* Fix broken link

* Update docs/sources/datasources/tempo.md

Co-authored-by: Ursula Kallio <ursula.kallio@grafana.com>

Co-authored-by: Ursula Kallio <ursula.kallio@grafana.com>
(cherry picked from commit fe87ffdda0)

# Conflicts:
#	docs/sources/datasources/tempo.md

* Fixed conflicts from merge
2022-09-02 15:16:49 -05:00
Grot (@grafanabot)
563b445185 [DOC] Add APM changes and fix links (#53986) (#54672)
* Add APM changes and fix links

* Apply suggestions from code review

* Update docs/sources/datasources/tempo.md

Co-authored-by: Eve Meelan <81647476+Eve832@users.noreply.github.com>

* Update docs/sources/explore/trace-integration.md

* Prettier update

Co-authored-by: Eve Meelan <81647476+Eve832@users.noreply.github.com>
(cherry picked from commit 45b65cc6c9)

Co-authored-by: Kim Nylander <104772500+knylander-grafana@users.noreply.github.com>
2022-09-02 14:54:32 -05:00
Grot (@grafanabot)
e42f84f87d Histogram: ensure y axis is unit-less (#54667) (#54671)
(cherry picked from commit 8273839539)

Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
2022-09-02 15:05:17 -04:00
Grot (@grafanabot)
c64cecda0c [Doc] Added link to APM dashboard doc for Service graph Tempo data source doc (#53491) (#54406)
* Added link to APM dashboard doc

* Apply suggestions from code review

(cherry picked from commit 101c087fc7)

Co-authored-by: Kim Nylander <104772500+knylander-grafana@users.noreply.github.com>
2022-09-02 13:25:27 -05:00
Grot (@grafanabot)
031580ef3e TimeSeries: fix padding, force 0-100% y range when % stacked (#54197) (#54652)
(cherry picked from commit 28426219ce)

Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
2022-09-02 10:40:58 -04:00
Grot (@grafanabot)
1296582f4b Plugins Catalog: Allow to filter plugins using special characters (#54474) (#54589)
(cherry picked from commit f6827a0518)

Co-authored-by: Murtaza Ahmedi <29052897+murtazaqa@users.noreply.github.com>
2022-09-02 14:07:40 +02:00
Grot (@grafanabot)
b622632291 Alerting: Fix UI bug when setting custom notification policy group by (#54607) (#54610)
Custom values were not being displayed in the multiselect for notification policy `Group by` even though
they were correctly being saved.

(cherry picked from commit d706320d0a)

Co-authored-by: Matthew Jacobson <matthew.jacobson@grafana.com>
2022-09-01 19:19:06 -04:00
Grot (@grafanabot)
11ba65420d Fixed tooltip does not change data when hovering over other datapoints (#54517) (#54595)
(cherry picked from commit d2bdb01092)

Co-authored-by: Victor Marin <36818606+mdvictor@users.noreply.github.com>
2022-09-01 12:10:53 -04:00
Grot (@grafanabot)
019a200107 refactors usage insights topics (#54497) (#54583)
(cherry picked from commit ac12b6d7ff)

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
2022-09-01 08:58:55 -05:00
Grot (@grafanabot)
1080729433 adds video (#54545) (#54581)
(cherry picked from commit 8a23b1fd4f)

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
2022-09-01 08:45:38 -05:00
Karl Persson
8526d2cb71 Correlations: Use correct fallback handlers (#54511) (#54569)
* Correlations: Use correct fallback handlers

* Add signed in middleware to all routes

(cherry picked from commit be6b8d91eb)
2022-09-01 15:08:10 +02:00
Grot (@grafanabot)
4a57bbce32 TestData DB: Fix node graph not showing when the Data type field is set to random (#54298) (#54564)
(cherry picked from commit 610952ca8a)
Co-authored-by: Hamas Shafiq <hamas.shafiq@grafana.com>
2022-09-01 10:28:26 +01:00
Dave Henderson
74734db443 [v9.1.x] Metrics: Fixed grafana_database_conn_* metrics, and added new go_sql_stats_* metrics as eventual replacement (#54540)
Signed-off-by: Dave Henderson <dave.henderson@grafana.com>

Signed-off-by: Dave Henderson <dave.henderson@grafana.com>
2022-08-31 11:32:29 -04:00
Grot (@grafanabot)
fc4bab2463 moves time series up, fixes random relrefs (#54477) (#54539)
(cherry picked from commit e64009fa88)

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
2022-08-31 10:27:15 -05:00
Grot (@grafanabot)
ea4d653cce AppRootPage: Fixes issue navigating between two app plugin pages (#54519) (#54529)
* AppRootPage: Fixes issue where it was not possible to navigate to another plugin

* Externalize react-router

* fixing test

(cherry picked from commit e5fba788d6)

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
2022-08-31 09:50:59 -04:00
Grot (@grafanabot)
2c7c81cb7a Hidden series stay hidden in legend when toggling visibility (#54139) (#54522)
(cherry picked from commit 51e2f57ac9)

Co-authored-by: Victor Marin <36818606+mdvictor@users.noreply.github.com>
2022-08-31 15:42:50 +03:00
Gabriel MABILLE
9ea61eebfd FIX: RBAC prevents deleting empty snapshots (#54385) (#54510)
Co-authored-by: Mihály Gyöngyösi <mgyongyosi@users.noreply.github.com>
Co-authored-by: Emil Tullsted <sakjur@users.noreply.github.com>
(cherry picked from commit c2c319146a)
2022-08-31 09:21:42 +02:00
Grot (@grafanabot)
83805b8b89 Plugins Catalog: Use appSubUrl to generate plugins catalog urls (#54426) (#54433)
* Plugins Catalog: us appSubUrl to generate plugins catalog urls

* add tests for PluginList with app sub url

* remove unnecessary comments

(cherry picked from commit fc348e6279)

Co-authored-by: Esteban Beltran <academo@users.noreply.github.com>
2022-08-31 07:34:33 +02:00
Grot (@grafanabot)
54356ac5b3 Grafana Backend: Establish a database version support policy. (#54374) (#54506)
As stated in the documentation, Grafana will support the versions of our backend database options that are supported by their projects at the time that a Grafana release is issued.

(cherry picked from commit 56369457d4)

Co-authored-by: Joe Blubaugh <joe.blubaugh@grafana.com>
2022-08-31 10:12:56 +08:00
Joan López de la Franca Beltran
ba4dc6e77b ReleaseNotes: Updated changelog and release notes for 8.3.11, 8.4.11, 8.5.11 and 9.0.8 (#54493) (#54498)
* ReleaseNotes: Updated changelog and release notes for 8.3.11, 8.4.11, 8.5.11 and 9.0.8 (#54493)

Co-authored-by: Joan López de la Franca Beltran <joanjan14@gmail.com>
(cherry picked from commit 3a9a145ef7)

Co-authored-by: Grot (@grafanabot) <43478413+grafanabot@users.noreply.github.com>
2022-08-30 21:31:36 +02:00
Grot (@grafanabot)
af18359063 ReleaseNotes: Updated changelog and release notes for 9.1.2 (#54481) (#54483)
(cherry picked from commit ab959f9305)
2022-08-30 13:40:01 -04:00
Grot (@grafanabot)
e39608eb3a "Release: Updated versions in package to 9.1.2" (#54480) 2022-08-30 18:29:31 +01:00
Grot (@grafanabot)
6b805aaac5 removes previously refactored content (#54416) (#54471)
(cherry picked from commit dc2616f833)

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
2022-08-30 11:52:45 -05:00
Grot (@grafanabot)
e5741c82d6 Rendering: Add support for renderer token (#54425) (#54431)
(cherry picked from commit a4f75cc0438712c90b02d24740416f8615e3a0cb)
(cherry picked from commit 6ec06f66b9)

Co-authored-by: Joan López de la Franca Beltran <5459617+joanlopez@users.noreply.github.com>
2022-08-30 11:32:29 +01:00
Polina Boneva
0a4d2bbe3d Add FocusScope to PanelEditor when open in the Dashboard Page so that a11y focus never catches invisible content. (#54400) (#54430)
(cherry picked from commit ef32050508)
2022-08-30 06:04:41 -04:00
Grot (@grafanabot)
ecf7cae554 Azure Monitor: Updated grafana_ds_azuremonitor_dashboard_loaded event, replaced array of queries for stats (#54286) (#54424)
* Replaced array of queries for stats

* Added ds_version prop

* Added ds_version to tests

* Extracted event name to tracking file

* Extracted event to tracking file

* Removed ds_version - useless for core plugin

* Addressed comments

* Added note to event documentation

(cherry picked from commit 711c504b39)

Co-authored-by: Yaelle Chaudy <42030685+yaelleC@users.noreply.github.com>
2022-08-30 11:05:57 +02:00
Grot (@grafanabot)
f5a4e9232f Fix admonition (#54408) (#54412)
(cherry picked from commit fcea9ac913)

Co-authored-by: Matt Dodson <47385188+MattDodsonEnglish@users.noreply.github.com>
2022-08-29 15:45:54 -05:00
Ryan McKinley
344b2ef0bb Docs: add geomap index (#54410) 2022-08-29 13:15:39 -07:00
Grot (@grafanabot)
238db92f69 Geomap: Fix tooltip display (#54245) (#54397)
(cherry picked from commit 07dcb64e38)

Co-authored-by: Adela Almasan <88068998+adela-almasan@users.noreply.github.com>
2022-08-29 11:07:17 -04:00
Grot (@grafanabot)
b4a8496b06 QueryEditorRow: filter data on mount (#54260) (#54392)
This works correctly on initial dashboard load. However, when an action
is taken that triggers a "re-mount", e.g. opening the options pane on
the right side of the page, the `data` prop becomes undefined.

(cherry picked from commit 87375f570d)

Co-authored-by: Adam Simpson <adam@adamsimpson.net>
2022-08-29 10:03:34 -04:00
Grot (@grafanabot)
565969cfcf RBAC: Only display unique permissions in list (#54074) (#54383)
* PermissionList: Only display one row for each user, team or builtin role

(cherry picked from commit c9661a5be1)

Co-authored-by: Karl Persson <kalle.persson@grafana.com>
2022-08-29 06:37:06 -04:00
Grot (@grafanabot)
493c7866a2 RBAC: Display indicator if a permission is inherited (#54080) (#54380)
* RBAC: Add IsInherited property

* PermissionList: Display inherited indicator

(cherry picked from commit cc78486535)

Co-authored-by: Karl Persson <kalle.persson@grafana.com>
2022-08-29 05:29:37 -04:00
Marcus Efraimsson
c8a313c289 Plugins: Remove various custom headers logic (#54146) (#54284)
Removes various custom headers logic sprinkled around in the backend.
It should automatically be applied to outgoing HTTP requests via the
CustomHeadersMiddleware.
This also removes decryption of SecureJSONData to populate custom
headers in ngalert which seemed to have caused a ton of CPU usage.

(cherry picked from commit 87afd9cadc)
2022-08-29 10:21:34 +02:00
Grot (@grafanabot)
200a901829 Alerting: use raw query data in provisioning to bypass interpolation of macros (#54293) (#54357)
(cherry picked from commit a932428057)

Co-authored-by: Jean-Philippe Quéméner <JohnnyQQQQ@users.noreply.github.com>
2022-08-26 18:07:47 -04:00
Grot (@grafanabot)
867c695646 Alerting: add missing yaml tag to mute time struct (#54287) (#54355)
(cherry picked from commit 49b1182f34)

Co-authored-by: Jean-Philippe Quéméner <JohnnyQQQQ@users.noreply.github.com>
2022-08-26 17:41:51 -04:00
Grot (@grafanabot)
34d32edcce Geomap: Local color range for dimensions (#54348) (#54352)
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
(cherry picked from commit 0707d682e0)
2022-08-26 16:56:58 -04:00
Christopher Moyer
a108cc4db9 Docs/refactors manage dashboard topics (#54178) (#54248)
* makes prettier

* refactors manage dashboard topics

* Apply suggestions from code review

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>

* incorporates review feedback

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
(cherry picked from commit 948452034e)
2022-08-26 12:47:53 -05:00
Christopher Moyer
3555aa8abb Docs: refactors and copy edits share dashboard topics (#53972) (#54229)
* refactors and copy edits share dashboard topics

* fixes typo

* incorporates feedback

* completes splitting out reporting and playlists

(cherry picked from commit ca3296da34)
2022-08-26 12:47:39 -05:00
Christopher Moyer
699be1eea8 docs: refactors field value overrides topics (#53849) (#54098)
* refactors field value overrides topics

* Update docs/sources/panels/configure-overrides/index.md

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>

* Update docs/sources/panels/configure-overrides/index.md

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>

* Update docs/sources/panels/configure-overrides/index.md

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>

* Update docs/sources/panels/configure-overrides/index.md

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>

* Update docs/sources/panels/configure-overrides/index.md

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>

* Update docs/sources/panels/configure-overrides/index.md

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>

* Update docs/sources/panels/configure-overrides/index.md

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>

* makes prettier

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
(cherry picked from commit 657e1683d2)
2022-08-26 12:47:28 -05:00
Artur Wierzbicki
108c2575f8 Search: use SQL search as a fallback during bluge's initial indexing (#54095) (#54276)
* Search: use SQL search as a fallback when bluge indexing is ongoing

* Search: lint

* Search: feedback fixes - return an empty frame with a special name

* Search: revert readiness check query type

* Search: remove println

* remove sleep, get coffee

(cherry picked from commit 74158ed66b)
2022-08-26 08:38:15 -07:00
Grot (@grafanabot)
fe7c483b9b elastic: always use millisecond-intervals for alerting (#54157) (#54317)
(cherry picked from commit a58edc9f5e)

Co-authored-by: Gábor Farkas <gabor.farkas@gmail.com>
2022-08-26 08:54:59 -04:00
Grot (@grafanabot)
10c79f020c Dashboard save: Persist details message when navigating through dashboard save drawer's tabs. (#54084) (#54289)
* Dashboard: Fix `changes note` textarea to save draft when going to other tabs

* Do not show Changes tab if there are no changes

* Fix comments

Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
(cherry picked from commit 37fde2eec6)

Co-authored-by: Vadim Beskrovnov <seede1@yandex.ru>
2022-08-26 03:43:38 -07:00
Gábor Farkas
dddf5e510d elastic: use millisecond-intervals (#54202) (#54266)
(cherry picked from commit 448a67ab43)
2022-08-26 09:27:48 +02:00
Grot (@grafanabot)
e326041c82 use metadata endpoint (#53980) (#54241)
(cherry picked from commit c9a3b2d420)

Co-authored-by: Brendan O'Handley <brendan.ohandley@grafana.com>
2022-08-25 14:34:23 -04:00
Grot (@grafanabot)
b7864b3db1 Docs/adds cloud support disclaimer (#54150) (#54252)
* adds cloud support disclaimer to three sections

* starts add cloud disclaimer

* adds disclaimer to JWT and Org sections

* adds final Cloud disclaimer to the Loki data source

(cherry picked from commit 3f0636083d)

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
2022-08-25 13:06:54 -05:00
Grot (@grafanabot)
308d226875 "Release: Updated versions in package to 9.1.1" (#54101) 2022-08-25 09:47:04 +00:00
Grot (@grafanabot)
665da6bc21 [v9.1.x] Build: Use specific nodejs version for levitate pipeline (#54212)
Co-authored-by: Esteban Beltran <academo@users.noreply.github.com>
2022-08-25 05:27:12 -04:00
Dominik Prokop
de4cd984bd [v9.1.x] AdHoc variable: Correctly preselect datasource when provisioning (#54205)
* AdHoc variable: Correctly preselect datasource when provisioning (#54088)

* Adhoc variable: Correctly preselect datasource when provisioning

* Fix test

* Remove data sources from ad hoc variable state in favor of DataSourcePicker

(cherry picked from commit 8eac5706fd)

* Fix merge
2022-08-25 01:41:14 -07:00
Grot (@grafanabot)
e059708aed AzureMonitor: Added ARG query function for template variables (#53059) (#54204)
* Added ARG query functionfor template variables

* removed unused import

* Tweak tests

* Fix tests

* Renamed query function - added 'Azure'

* Revert "Renamed query function - added 'Azure'"

This reverts commit a046bcdd7c.

* Adressed comments

* Fix uncaught error issue

* revert last commit

* Add back errorMessage check

(cherry picked from commit d0d6562f63)

Co-authored-by: Yaelle Chaudy <42030685+yaelleC@users.noreply.github.com>
2022-08-25 10:25:02 +02:00
George Robinson
d941d0ba78 Alerting: Fix saving of screenshots uploaded with a signed url (#53933) (#54147)
The URL of screenshots uploaded to external image storages can be optionally signed, resulting in a long string (800+ chars).

Co-authored-by: Valério Valério <vdv100@gmail.com>
2022-08-25 09:06:59 +01:00
Grot (@grafanabot)
219f7e63cf Fix: Correctly migrate mixed data source targets (#54152) (#54199)
* Failing test case

* Fix mixed datasource targets migration

(cherry picked from commit f9a49aa3ed)

Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
2022-08-25 00:25:56 -07:00
Yuriy Tseretyan
04967f4d8a Alerting: Update rules delete endpoint to handle rules in group (#53790) (#54184)
* update RouteDeleteAlertRules rules to update as a group
* remove expecter from scheduler mock to support variadic function
* create function to check for provisioning status + tests
2022-08-24 16:51:26 -04:00
Grot (@grafanabot)
7002c11006 Alerting: log external alertmanager URLs #54127 (#54177)
(cherry picked from commit 4fad827acd)

Co-authored-by: Santiago <santiagohernandez.1997@gmail.com>
2022-08-24 14:08:34 -04:00
Grot (@grafanabot)
58c41b2e29 Search: Show all dashboards in the folder view (#54163) (#54164)
(cherry picked from commit 94b4f6f459)

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2022-08-24 12:25:29 -04:00
Grot (@grafanabot)
b8aa0760e7 Update whatsNewUrl (#54154) (#54155)
(cherry picked from commit 9be8b0564a)

Co-authored-by: Dimitris Sotirakis <sotirakis.dim@gmail.com>
2022-08-24 18:21:07 +03:00
Dimitris Sotirakis
23e88aa9ca Trigger backend tests on devenv changes (#54137) (#54148)
(cherry picked from commit 50d0581000)
2022-08-24 10:41:29 -04:00
Grot (@grafanabot)
169eeb4ee2 AngularPanels: Fixing changing angular panel options not taking having affect when coming back from panel edit (#54087) (#54132)
(cherry picked from commit 8880cbd7f6)

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
2022-08-24 09:17:36 +02:00
Torkel Ödegaard
6acfbeeaac Docs: Backport 53530 to v9.1.x (#54106) 2022-08-23 18:44:13 +02:00
Grot (@grafanabot)
a95c46e6f1 ReleaseNotes: Updated changelog and release notes for 9.1.1 (#54103) (#54105)
(cherry picked from commit 2eec035c13)
2022-08-23 12:04:38 -04:00
Grot (@grafanabot)
2021f603ed Update effects to avoid retrieving metrics descriptors except on project name update (#54091) (#54100)
(cherry picked from commit 1f17e9a044)

Co-authored-by: Andreas Christou <andreas.christou@grafana.com>
2022-08-23 17:03:25 +01:00
Christopher Moyer
fa506b8327 docs: corrects broken relrefs (#54061) (#54097)
* corrects broken relrefs

* Apply suggestions from code review

Co-authored-by: Eve Meelan <81647476+Eve832@users.noreply.github.com>

Co-authored-by: Eve Meelan <81647476+Eve832@users.noreply.github.com>
(cherry picked from commit c29a2c37c1)
2022-08-23 10:15:13 -05:00
Dimitris Sotirakis
a8855cd7dc Add GCP_KEY secret to the artifacts-page pipeline (#54013) (#54055)
(cherry picked from commit ceb32a7506)
2022-08-23 07:44:12 -05:00
Grot (@grafanabot)
9bea66845a TimeSeries: Fix crash when min >= max in config (#54069) (#54078)
* TimeSeries: fix crash when min === max in config

* stat sparkline, too

* better types

(cherry picked from commit 530dd63ac6)

Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
2022-08-23 04:18:35 -04:00
Grot (@grafanabot)
c041930402 Geomap: Fix geohash editor settings #54058 (#54064)
(cherry picked from commit 13aacf3590)

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2022-08-22 17:23:08 -04:00
Nathan Marrs
0d6d0ed9d0 Geomap: update the layer order in docs (#53749) (#54060)
(cherry picked from commit 4ac87a3b3b)

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2022-08-22 13:40:21 -07:00
Christopher Moyer
9ece1844d9 refactors transformation topics (#53984) (#54059)
* refactors transformation topics (#53984)

(cherry picked from commit 666f84be57)

* removes 9.2 inner join docs
2022-08-22 15:11:43 -05:00
Grot (@grafanabot)
0d949b40ba Heatmap: update heatmap documentation (#52756) (#54057)
Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
(cherry picked from commit dcdf232882)

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2022-08-22 12:35:48 -07:00
Dimitris Sotirakis
7e2d4789e5 Make retrieve and release npm packages allowed to fail (#53191) (#53220)
(cherry picked from commit 1d1fb07124)
2022-08-22 17:49:50 +00:00
Grot (@grafanabot)
543211103c Docs: Fix minor typo (#53590) (#54053)
(cherry picked from commit ad501e770f)

Co-authored-by: ceh <emil@hessman.se>
2022-08-22 18:42:06 +02:00
Grot (@grafanabot)
54caac9518 [v9.1.x] A11y: Fix a11y for toolbar buttons in PanelEditor (#54047)
Co-authored-by: Vadim Beskrovnov <vbeskrovnov@fb.com>
Co-authored-by: Vadim Beskrovnov <seede1@yandex.ru>
2022-08-22 11:28:14 -04:00
Grot (@grafanabot)
f80df9a187 [v9.1.x] Alerting: Fix width of Adaptive Cards in Teams notifications (#54045)
Co-authored-by: George Robinson <george.robinson@grafana.com>
2022-08-22 17:18:08 +02:00
Grot (@grafanabot)
1639dad624 ColorInputPicker: Fix popover in disabled state (#54000) (#54042)
(cherry picked from commit 2caaa7fba2)

Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>
2022-08-22 11:13:12 -04:00
Grot (@grafanabot)
3892a175f5 docs: refactors value mappings topics (#53616) (#54036)
* starts copy edit

* completes refactor and copy edit

(cherry picked from commit 1da4aa25a8)

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
2022-08-22 09:44:03 -05:00
Grot (@grafanabot)
a18df43e65 A11y: do not change the focus when switching between Viz/Suggestions/Library Panels views (#53814) (#54007)
(cherry picked from commit 51d173711f)

Co-authored-by: Polina Boneva <13227501+polibb@users.noreply.github.com>
2022-08-22 17:18:53 +03:00
Grot (@grafanabot)
775ba0a7ee loki: Fix adding refId to rowId (#53932) (#54019)
(cherry picked from commit 395e443932)

Co-authored-by: Gábor Farkas <gabor.farkas@gmail.com>
2022-08-22 07:22:47 -04:00
Grot (@grafanabot)
cbb6b88b7a TablePanel: Fix vertical scrollbar (#53457) (#54015)
* TablePanel: Fix vertical scroll

* Fix vertical scrollbar with virtualized rendering

* betterer

* Refactor prop

(cherry picked from commit cbe4fb4dab)

Co-authored-by: Victor Marin <36818606+mdvictor@users.noreply.github.com>
2022-08-22 06:59:28 -04:00
Grot (@grafanabot)
49c1c2ec0a Grafana-UI: Changes ClipboardButton to always allow copy of multi line content (#53903) (#53929) 2022-08-22 11:50:26 +01:00
Grot (@grafanabot)
85ef08283f Alerting: Fix links in Microsoft Teams notifications (#54003) (#54012)
(cherry picked from commit c960301aa8)

Co-authored-by: George Robinson <george.robinson@grafana.com>
2022-08-22 11:31:34 +01:00
Grot (@grafanabot)
9ac364b7f4 TimePicker: Fixes relative timerange of less than a day not displaying (#54008) 2022-08-22 10:55:08 +01:00
Grot (@grafanabot)
516b1b7d6a Cloud Monitoring: Support SLO burn rate (#53710) (#54001)
(cherry picked from commit 2ff007b266)

Co-authored-by: Takuya Kosugiyama <kuogsi@gmail.com>
2022-08-22 05:17:23 -04:00
Grot (@grafanabot)
31279e8c78 TimeSeries: fix regression with hardMin + hardMax ranging (#53922) (#53976)
(cherry picked from commit d5cc1bfff2)

Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
2022-08-19 12:42:29 -06:00
Grot (@grafanabot)
ba56a4dc12 [v9.1.x] Grafana/schema: Fix plugins API regression. Add back "hidden" in LegendDisplayMode (#53966)
Co-authored-by: Esteban Beltran <academo@users.noreply.github.com>
2022-08-19 11:25:00 -04:00
Grot (@grafanabot)
5409e7a156 [v9.1.x] Timeseries: Revert the timezone(s) property name change back to singular (#53963)
Co-authored-by: Esteban Beltran <academo@users.noreply.github.com>
2022-08-19 11:18:32 -04:00
Grot (@grafanabot)
562d96efda Decimals: Fixes auto decimals to behave the same for positive and negative values (#53960) (#53961) 2022-08-19 15:58:19 +01:00
Grot (@grafanabot)
f82b2fc716 shows example of how and where to enable public dashboards in config.ini (#53904) (#53912)
(cherry picked from commit fb40b80141)

Co-authored-by: owensmallwood <owen.smallwood@grafana.com>
2022-08-18 12:19:24 -06:00
Grot (@grafanabot)
319529f4a4 TimeSeries: Don't show y axis when visualisation is hidden (#53671) (#53895)
* TimeSeries: Don't show y axis when visualisation is hidden

* Update snapshot

* make scale ranger return nulls for minMax when no visible data exists on scale

* drop unneeded change

* remove explicit axis.show

Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
(cherry picked from commit 86de94cbfa)

Co-authored-by: Zoltán Bedi <zoltan.bedi@gmail.com>
2022-08-18 15:46:53 +02:00
Grot (@grafanabot)
389dca97a6 TimeSeries: Fix memory leak on viz re-init caused by KeyboardPlugin (#53891)
(cherry picked from commit 329aab7395)

Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
2022-08-18 08:28:33 -04:00
Grot (@grafanabot)
5b36df325a Update betterer results because of #53806 (#53884) (#53885)
(cherry picked from commit eedc7f1831)

Co-authored-by: Oscar Kilhed <oscar.kilhed@grafana.com>
2022-08-18 12:52:40 +02:00
Grot (@grafanabot)
c800c656bf Revert "BarchartPanel: Fix color from thresholds show incorrectly (#52038)" (#53806) (#53876)
This reverts commit 11c79cd6da.

(cherry picked from commit e877c1da90)

Co-authored-by: Oscar Kilhed <oscar.kilhed@grafana.com>
2022-08-18 12:52:31 +02:00
Grot (@grafanabot)
d0d9f315c9 Fix file extension (#53838) (#53880) 2022-08-18 05:27:47 -04:00
Grot (@grafanabot)
dc9af8d949 Live: fix StreamingDataFrame length on replace action and schema change (#53796) (#53863)
* streaming-data-frame

* add more expect.length in tests

(cherry picked from commit 2a0ae74f96)

Co-authored-by: Artur Wierzbicki <wierzbicki.artur.94@gmail.com>
2022-08-17 17:17:07 -04:00
Grot (@grafanabot)
5a95003f9c updates broken relrefs (#53857) (#53860)
(cherry picked from commit 070393075a)

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
2022-08-17 15:36:14 -05:00
Grot (@grafanabot)
14707ad4b4 Legal: CLA formatting update (#53853) (#53855)
* Formatting

* linter

(cherry picked from commit 59e638acb9)

Co-authored-by: Eve Meelan <81647476+Eve832@users.noreply.github.com>
2022-08-17 14:47:13 -05:00
Grot (@grafanabot)
a0e7ded34f fixes time-series relrefs (#53851) (#53854)
(cherry picked from commit 5cbc579955)

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
2022-08-17 14:37:54 -05:00
Garrett Guillotte
2ae1af8b28 Docs: Publish v9.1.x docs to /latest/ (#53846) 2022-08-17 10:48:33 -07:00
Grot (@grafanabot)
d83c62b939 Alerting: add docs for file provisioning (#53101) (#53848)
(cherry picked from commit 2fef8e6f2c)

Co-authored-by: Jean-Philippe Quéméner <JohnnyQQQQ@users.noreply.github.com>
2022-08-17 13:07:41 -04:00
Daniel Lee
0a71f0fc20 docs: manual backport for what's new for 9.1.0 (#53842)
* Docs: Add 9.1 to What's New index (#53545)

* Docs: Add 9.1 to What's New index

* Docs: Update docs index What's New link

(cherry picked from commit 1f692d4020)

* Docs: Fix link in What's New in 9.1 (#53259)

(cherry picked from commit 25e546ad21)

Co-authored-by: Garrett Guillotte <100453168+gguillotte-grafana@users.noreply.github.com>
2022-08-17 18:17:11 +02:00
Grot (@grafanabot)
f6d7731dc1 Alerting: Fix notifications for Microsoft Teams (#53810) (#53843)
This commit fixes notifications for Microsoft Teams where notifications
would just contain "Card" rather than the title.

(cherry picked from commit 6d69d7acb8)

Co-authored-by: George Robinson <george.robinson@grafana.com>
2022-08-17 17:01:47 +01:00
Grot (@grafanabot)
732daac119 Fix webpack issue (#53666) (#53840)
(cherry picked from commit cace6f06d1)

Co-authored-by: Andreas Christou <andreas.christou@grafana.com>
2022-08-17 11:24:18 -04:00
Grot (@grafanabot)
5242c26b3b [v9.1.x] Alerting: Read group details before saving (#53809)
Co-authored-by: Gilles De Mey <gilles.de.mey@gmail.com>
2022-08-17 13:26:14 +02:00
Grot (@grafanabot)
5116f740ab CloudMonitor: Fix to hide queries when used in conjunction with Expressions (#53537) (#53811)
* Correctly pass all original query parameters on interpolation

* Add datasource tests

- Update props on mock query
- Add mock instance settings
- Add util function to generate template variables
- Add datasource test file
- Correct setting of templateSrv
- Update betterer results

* Simplify test and pass templateSrv appropriately

* Fix lint issue

* Simplify test and add type that supports parital nested objects

* Update test and remove unneeded util function

* Rename to avoid duplicate mock

(cherry picked from commit d4f382892d)

Co-authored-by: Andreas Christou <andreas.christou@grafana.com>
2022-08-17 12:12:10 +01:00
Grot (@grafanabot)
9f5b714e16 TimeRangePicker: Absolute timeranges with timezone (#53763) (#53818)
(cherry picked from commit b5cb7738da)

Co-authored-by: Victor Marin <36818606+mdvictor@users.noreply.github.com>
2022-08-17 07:04:44 -04:00
Grot (@grafanabot)
42cf51b4cb Chore: Ignore type assertions in __mocks__ (#53593) (#53816)
(cherry picked from commit 44ea98b24f)

Co-authored-by: Josh Hunt <joshhunt@users.noreply.github.com>
2022-08-17 07:01:15 -04:00
Grot (@grafanabot)
6aeedb36de Histogram: Fix panel hide when clicking on legend (#53651) (#53813)
(cherry picked from commit 2d391c98d2)

Co-authored-by: Victor Marin <36818606+mdvictor@users.noreply.github.com>
2022-08-17 06:51:54 -04:00
Grot (@grafanabot)
92fd6aaa80 [v9.1.x] Alerting: Hide "no rules" message when we are fetching from data sources (#53807)
Co-authored-by: Gilles De Mey <gilles.de.mey@gmail.com>
2022-08-17 06:07:08 -04:00
Grot (@grafanabot)
e6b6382629 ReleaseNotes: Updated changelog and release notes for 9.1.0 (#53780) (#53784)
(cherry picked from commit 932d1b6650)
2022-08-16 15:57:49 +02:00
Grot (@grafanabot)
2184d6dcf0 "Release: Updated versions in package to 9.1.0" (#53779) 2022-08-16 15:51:58 +02:00
Grot (@grafanabot)
f6755278dc use dash-db type when searching for dashboard (#53607) (#53674)
(cherry picked from commit 0ce89dbcb6)

Co-authored-by: Leo <108552997+lpskdl@users.noreply.github.com>
2022-08-16 14:53:50 +02:00
Grot (@grafanabot)
81afb47ef3 Fix initDashboard bug (#53722) (#53759)
Co-authored-by: Erik Sundell <erik.sundell87@gmail.com>
(cherry picked from commit c8fc840865)

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
2022-08-16 03:42:31 -04:00
Emil Tullstedt
5188243e30 Build: upgrade Alpine images (#53743) (#53748)
(cherry picked from commit a19d82124b)

Co-authored-by: malcolmholmes <42545407+malcolmholmes@users.noreply.github.com>
2022-08-15 19:22:26 +02:00
Grot (@grafanabot)
3820ffd601 GeoMap: Fix tooltip not showing values (#53738) (#53741)
(cherry picked from commit 835562bb68)

Co-authored-by: Zoltán Bedi <zoltan.bedi@gmail.com>
2022-08-15 10:53:50 -04:00
Grot (@grafanabot)
dac7b0e0ac Cloudwatch: update redis metrics (#53618) (#53733)
(cherry picked from commit f39f9eb053)

Co-authored-by: Isabella Siu <Isabella.siu@grafana.com>
2022-08-15 09:56:59 -04:00
Grot (@grafanabot)
189b868712 RBAC: Remove the flag from the config which states that you can disable RBAC (#53730) (#53731)
(cherry picked from commit 962bf8a906)

Co-authored-by: Vardan Torosyan <vardants@gmail.com>
2022-08-15 14:49:13 +02:00
malcolmholmes
f9b75f8b46 Build: update grabpl (#53729)
* Update grabpl (four digit releases)

* Update .drone.yml
2022-08-15 13:25:05 +01:00
idafurjes
b4a0c0458a Tracing: Fix OpenTelemetry Jaeger context propagation (#53269) (#53724)
* fix otel jaeger context propagation

* add back launch.json

* add back launch.json

(cherry picked from commit 806fb8ab7a)

Co-authored-by: zhichli <57812115+zhichli@users.noreply.github.com>
2022-08-15 10:47:08 +02:00
Alexander Weaver
98a36f4005 Alerting: Fix incorrect embedded DTO being returned when handling rule groups (#53702)
* Alerting: Fix incorrect embedded DTO being returned when handling rule groups (#53701)

* Fix DTO embedding when getting/putting alert rule groups

* Drop usage of word 'Domain'

* Rename var as well

(cherry picked from commit f093c249ac)

* Actually fix two casing problems
2022-08-12 17:54:35 -04:00
Grot (@grafanabot)
29ac9e8e58 Fix order-of-magnitude bug in DTO conversion (#53690) (#53696)
(cherry picked from commit ccd41df603)

Co-authored-by: Alexander Weaver <weaver.alex.d@gmail.com>
2022-08-12 16:21:15 -04:00
Yuriy Tseretyan
5fd906f9f9 [9.1.x] Alerting: AlertingProxy to elevate permissions for request forwarded to data proxy when RBAC enabled (#53679)
* fix constants to the ones prior to the refactoring
2022-08-12 13:24:28 -04:00
Grot (@grafanabot)
cb54541c5f Chore: Panic! in the Logs (#53664) (#53669)
(cherry picked from commit cc777e175e)

Co-authored-by: Emil Tullstedt <emil.tullstedt@grafana.com>
2022-08-12 11:42:11 -04:00
Grot (@grafanabot)
e3a54dd3c6 Loki, Prometheus: Fix passing of query with defaults to code mode (#53646) (#53662)
(cherry picked from commit fde5147d71)

Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
2022-08-12 16:56:05 +02:00
Grot (@grafanabot)
82a1095f9e [v9.1.x] Alerting: Adds interval and For to alert rule details (#53610)
Co-authored-by: Gilles De Mey <gilles.de.mey@gmail.com>
2022-08-12 14:54:50 +02:00
Leo
cc4acb719d fixed conflicts (#53538) 2022-08-12 14:26:25 +02:00
Grot (@grafanabot)
6c935d3aa0 ColorPickerInput: Enable input clearing (#53587) (#53650)
* ColorPickerInput: Enable removing selected color

* ColorPickerInput: Add tests

* ColorInput: Add isClearable prop

(cherry picked from commit 7944f3a692)

Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>
2022-08-12 12:29:22 +02:00
Zoltán Bedi
2c7e77b124 Revert SQL data sources migration for 9.1 (#53510)
* Revert "Core code editor/builder components (#52421)"

This reverts commit de956fc3d8.

* Revert "Chore: typos in MySQL/PostgreSQL ConfigurationEditor (#52735)"

This reverts commit 7eabd7c83a.

* Revert "mysql query editor - angular to react (#50343)"

This reverts commit 53933972b6.

* Revert "MSSQL: Migrate to React (#51765)"

This reverts commit 35d98104ad.

* Revert "SQL: Migrate (MS/My/Postgres)SQL configuration pages from Angular to React (#51891)"

This reverts commit 9498ee3d54.

* Revert "SQL: Fix couple of issues in SQLDatasource (#52080)"

This reverts commit 4155dc8eca.

* Revert "sql plugins - angular to react - base sql datasource (#51655)"

This reverts commit fa560d96b6.

* These changes are okay

* These should also be fine + betterer update

* Change these back
2022-08-12 09:36:13 +02:00
Grot (@grafanabot)
1237290a9d RBAC: Fix various ui issues for role picker (#53589) (#53644)
* RolePicker: Check if user has permissions to delegate roles

* UserRolePicker: Require both UserRolsAdd and UserRolesRemove for chaning
roles

* RolePicker: Add option for controlling if roles can be updated to
RolePicker

* UserOrgs: Dont try to fetch roles with wrong permission

* RolePicker: make usage consistent with allowed actions

* RolePickerMenu: Remove unused property

* UserOrgs: Check for correct permission

* UserRolePicker: add apply to controll apply behaviour instand of
updateDisabled

* UserOrgs: Check for correct permission when trying to update roles

* RolePicker: Disable button if no roles or org role can be updated

* RolePicker: Always close on update

* RolePicker: Fix issue with updating immutable value

* ServiceAccountsListItem: Pass correct value to RolePicker

* ServiceAccountCreatePage: Pass correct value

(cherry picked from commit 7e16d5b4b4)

Co-authored-by: Karl Persson <kalle.persson@grafana.com>
2022-08-12 03:35:23 -04:00
Jean-Philippe Quéméner
33afe60b87 Alerting: use duration model for alert rule provisioning api (#53196) (#53637)
(cherry picked from commit 7f0002448d)
2022-08-11 19:49:41 -04:00
Grot (@grafanabot)
ff2f7f2621 Alerting: fetch interval from stored namespace UID (#53195) (#53636)
(cherry picked from commit e14c91d5d4)

Co-authored-by: Jean-Philippe Quéméner <JohnnyQQQQ@users.noreply.github.com>
2022-08-11 19:08:09 -04:00
Grot (@grafanabot)
8c587f177f Alerting: create provisioning dir in docker image (#53594) (#53633)
(cherry picked from commit 8c5f5e7a32)

Co-authored-by: Jean-Philippe Quéméner <JohnnyQQQQ@users.noreply.github.com>
2022-08-11 18:28:07 -04:00
Maria Alexandra
399bad4f72 [v9.1.x] Docs: Update dashboard documentation, including new search (#53050) (#53608)
Co-authored-by: Chris Moyer <chris.moyer@grafana.com>
2022-08-11 11:40:41 -04:00
Grot (@grafanabot)
9300634113 Prometheus: Promote Azure auth flag to configuration (#53447) (#53598)
(cherry picked from commit a31d96d20a)

Co-authored-by: Andres Martinez Gotor <andres.martinez@grafana.com>
2022-08-11 10:30:40 -04:00
Grot (@grafanabot)
4d2005311a Preferences: Use search endpoint to get missing dashboard (#53540) (#53571)
(cherry picked from commit 6423485061)

Co-authored-by: Ivan Ortega Alba <ivanortegaalba@gmail.com>
2022-08-11 15:23:46 +02:00
Grot (@grafanabot)
c1fe453a53 Alerting: Use Adaptive Cards in Teams notifications (#53532) (#53556)
This commit changes the cards in Teams notifications from Office 365
Connector cards to Adaptive Cards to fix an issue where images were not
shown in Teams for desktop and web. Since Office 365 Connector cards
are deprecated, it made sense to move to Adapative Cards and fix this
bug at the same time.

The Adaptive Card messages maintain the design of the Office 365
Connector Card with a number of minor differences:

- In Adaptive Card messages the color of the title is red or green
  depending on the status of the alerts, where as with Office 365
  connector cards there was a colored border at the top of the title

- In Adaptive Card messages the title is bold to make it easier to read
  when the color is red or green

- In Adaptive Card messages the thumbnails for images are medium size
  if there are more than two images, otherwise large size

(cherry picked from commit 5e1d628f21)

Co-authored-by: George Robinson <george.robinson@grafana.com>
2022-08-11 09:44:46 +01:00
Grot (@grafanabot)
18c22f03f7 Datasources: Emit event on dashboard load with queries info (#52052) (#53568)
Co-authored-by: Levente Balogh <balogh.levente.hu@gmail.com>
Co-authored-by: Andres Martinez <andres.martinez@grafana.com>
(cherry picked from commit dfe33a63fb)

Co-authored-by: Yaelle Chaudy <42030685+yaelleC@users.noreply.github.com>
2022-08-11 03:48:37 -04:00
Grot (@grafanabot)
cd0071f183 fix: use type instead of uid to get datasource metadata (#53543) (#53562)
(cherry picked from commit d7556bd189)

Co-authored-by: Levente Balogh <balogh.levente.hu@gmail.com>
2022-08-11 09:38:49 +02:00
Grot (@grafanabot)
aa321e74f6 Alerting: Extend PUT rule-group route to write the entire rule group rather than top-level fields only (#53078) (#53554)
* Wire up to full alert rule struct

* Extract group change detection logic to dedicated file

* GroupDiff -> GroupDelta for consistency

* Calculate deltas and handle backwards compatible requests

* Separate changes and insert/update/delete as needed

* Regenerate files

* Don't touch the DB if there are no changes

* Quota checking, delete unused file

* Mark modified records as provisioned

* Validation + a couple API layer tests

* Address linter errors

* Fix issue with UID assignment and rule creation

* Propagate top level group fields to all rules

* Tests for repeated updates and versioning

* Tests for quota and provenance checks

* Fix linter errors

* Regenerate

* Factor out some shared logic

* Drop unnecessary multiple nilchecks

* Use alternative strategy for rolling UIDs on inserted rules

* Fix tests, add back nilcheck, refresh UIDs during test

* Address feedback

* Add missing nil-check

(cherry picked from commit b198559225)

Co-authored-by: Alexander Weaver <weaver.alex.d@gmail.com>
2022-08-10 17:32:54 -05:00
Grot (@grafanabot)
57e60ffed6 Transform: Add a limit transform (#49291) (#53536)
* Add a limit transform

* Add a limit transform

* Simplify filter code

Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
(cherry picked from commit 7d7890e23c)

Co-authored-by: Josiah (Jay) Goodson <josiah.goodson@gmail.com>
2022-08-10 07:34:54 -07:00
Karl Persson
bb1b145ce8 RBAC: Fix dashboard filter in SQLBuilder (#53379) (#53506)
* Reuse DasbhoardPermissionFilter

*  Use rbac dashboard filter if enabled

(cherry picked from commit aa484a60c9)
2022-08-10 11:58:12 +02:00
Grot (@grafanabot)
8dd2b99c87 Allow empty value in kv_store (#53416) (#53505)
(cherry picked from commit 119ce90234)

Co-authored-by: Selene <selenepinillos@gmail.com>
2022-08-10 05:02:08 -04:00
Grot (@grafanabot)
6d8a345f4c LibraryPanels: Rewrite invalid connection deletion query to be MySQL-friendly (#53460) (#53469)
Closes #53456

(cherry picked from commit f4a5e034b3)

Co-authored-by: kay delaney <45561153+kaydelaney@users.noreply.github.com>
2022-08-09 15:37:17 +01:00
Grot (@grafanabot)
7682ecd285 RBAC: Remove sort and unique values when fetching permissions (#53461) (#53467)
* RBAC: remove sort and unique values for fetching permissions

(cherry picked from commit e4c45c4f98)

Co-authored-by: Karl Persson <kalle.persson@grafana.com>
2022-08-09 10:05:23 -04:00
Grot (@grafanabot)
10aba4d7ed Histogram: Send proper dataframe to PlotLegend (#53284) (#53462)
* Send proper dataframe to PlotLegend

* Update dataFrameFieldIndex for multiple frames

(cherry picked from commit 3893c46976)

Co-authored-by: Victor Marin <36818606+mdvictor@users.noreply.github.com>
2022-08-09 08:53:18 -04:00
Karl Persson
2873e044df Access Control: optimize GetUserPermissions sql (#53279) (#53442)
* Access Control: optimize GetUserPermissions sql

(cherry picked from commit 8f9a372ce2)

Co-authored-by: lai <11598235+unique0lai@users.noreply.github.com>
2022-08-09 11:47:31 +02:00
Grot (@grafanabot)
806b7405aa RBAC: Handle case when folder id is negative (#53438) (#53439)
(cherry picked from commit 592d31e617)

Co-authored-by: Karl Persson <kalle.persson@grafana.com>
2022-08-09 04:26:24 -04:00
Grot (@grafanabot)
712b474226 Prometheus: Remove metadata endpoint (#53428) (#53433)
* remove prom metadata endpoint until we have a fix for detecting versions and implementations

* fix linting issue

(cherry picked from commit 7aeb8b4cdf)

Co-authored-by: Brendan O'Handley <brendan.ohandley@grafana.com>
2022-08-08 18:50:41 -04:00
Grot (@grafanabot)
f27199df88 Graphite Plugin: fix annotation migration regression with ref-ids (#53361) (#53420)
* fix regression with ref-ids

* remove duplicate check for annotations in fix

(cherry picked from commit 85db523dd5)

Co-authored-by: Brendan O'Handley <brendan.ohandley@grafana.com>
2022-08-08 14:22:47 -04:00
Grot (@grafanabot)
89bfade974 Chore: disable flaky e2e test (#53408) (#53413)
* Chore: disable flaky e2e test

(cherry picked from commit 7f43839813)

Co-authored-by: Ezequiel Victorero <evictorero@gmail.com>
2022-08-08 13:55:57 -03:00
Grot (@grafanabot)
a9e628e887 Fix: correct bold, italics, and code color in Panel tooltips (#53380) (#53382)
(cherry picked from commit aee2856907)

Co-authored-by: Josh Hunt <joshhunt@users.noreply.github.com>
2022-08-08 16:21:14 +01:00
Grot (@grafanabot)
d8419d4154 [v9.1.x] Alerting: Fix alert detail layout issue (#53410)
Co-authored-by: Gilles De Mey <gilles.de.mey@gmail.com>
2022-08-08 11:10:56 -04:00
Grot (@grafanabot)
bb687ca965 Loki: Fix showing of unusable labels field in detected fields (#53319) (#53387)
* Loki: Fix showing of labels field in detected fields

* Create reusable createlogRow mock

(cherry picked from commit 84b2498150)

Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
2022-08-08 08:42:13 -04:00
Grot (@grafanabot)
7c7f082cd9 Azure Monitor: Add Network Insights Dashboard (#50362) (#53367)
(cherry picked from commit 42f9a6e67b)

Co-authored-by: Teddy Lin <55064982+Teddy-Lin@users.noreply.github.com>
2022-08-08 10:48:49 +02:00
Grot (@grafanabot)
66a3c0fa7a BarGauge: Show empty bar when value, minValue and maxValue are all equal (#53314) (#53371)
* prevent returning NaN from getValuePercent

* return 0 instead of NaN always

(cherry picked from commit 2fea3f0d9a)

Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2022-08-08 04:29:57 -04:00
Grot (@grafanabot)
f9a0926c59 Geomap: Do not show markers with empty coordinates (#53330) (#53337) 2022-08-05 11:08:12 -06:00
Grot (@grafanabot)
02675223ec Alerting: Remove mention of host name from Alerting HA docs (#53178) (#53345)
(cherry picked from commit 4090e122f8)

Co-authored-by: Yuriy Tseretyan <yuriy.tseretyan@grafana.com>
2022-08-05 08:50:03 -04:00
Grot (@grafanabot)
2cf5329622 Access Control: Set permissions for Grafana's test data source (#53247) (#53334)
* set permissions for Grafana's test data source

* linting

(cherry picked from commit b590c1c60f)

Co-authored-by: Ieva <ieva.vasiljeva@grafana.com>
2022-08-05 03:36:19 -04:00
Grot (@grafanabot)
d62274c4ca Loki: Fix producing correct log volume query for query with comments (#53254) (#53320)
* Loki: Remove comments from log volume query

* Update, add more tests

* Update based on suggestions

* Update

* Update tests to use it.each

(cherry picked from commit bf3fa4a445)

Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
2022-08-04 12:15:51 -04:00
Grot (@grafanabot)
4db402c649 GrafanaUI: Render PageToolbar's leftItems regardless of title's presence (#53285) (#53292)
* Grafana-UI: make PageToolbar render leftItems regardless of title's presence

* simplify test

(cherry picked from commit 1ec9007fe0)

Co-authored-by: Giordano Ricci <me@giordanoricci.com>
2022-08-04 12:38:20 +01:00
Grot (@grafanabot)
4afb108daf Alerting: set dashboard and panel id using annotations in provisioning api (#53221) (#53233)
(cherry picked from commit 54217a2037)

Co-authored-by: Jean-Philippe Quéméner <JohnnyQQQQ@users.noreply.github.com>
2022-08-04 11:59:44 +02:00
Grot (@grafanabot)
b308c331c2 API: Fix snapshot responses (#52998) (#53244)
* API: Fix response status when snapshots are not found

* API: Fix response status when snapshot key is empty

* Apply suggestions from code review

(cherry picked from commit 5fec6cc4f5)

Co-authored-by: Sofia Papagiannaki <1632407+papagian@users.noreply.github.com>
2022-08-04 12:12:34 +03:00
Grot (@grafanabot)
17de328ac8 Alerting: Fix migration (#53253) (#53255)
(cherry picked from commit ae101bf935)

Co-authored-by: Sofia Papagiannaki <1632407+papagian@users.noreply.github.com>
2022-08-03 11:56:55 -04:00
Grot (@grafanabot)
6ba2ecc470 add missing check for root URLs length (#53239) (#53251)
(cherry picked from commit 46b7ca12e1)

Co-authored-by: Will Browne <wbrowne@users.noreply.github.com>
2022-08-03 17:27:53 +02:00
Grot (@grafanabot)
447a2d4d82 Access Control: Fix permission error during dashboard creation flow (#53214) (#53229)
* remove permission check

* remove unneeded function

(cherry picked from commit 610abc2af0)

Co-authored-by: Ieva <ieva.vasiljeva@grafana.com>
2022-08-03 09:54:18 -04:00
Grot (@grafanabot)
b28a11e1b4 check not empty root urls before setting field (#53135) (#53225)
(cherry picked from commit 5523c00b01)

Co-authored-by: Will Browne <wbrowne@users.noreply.github.com>
2022-08-03 15:52:12 +02:00
Grot (@grafanabot)
83e062f4c8 Correlations: Add UpdateCorrelation HTTP API (#52444) (#53224)
* Correlations: add UpdateCorrelation HTTP API

* handle correlation not found

* add tests

* fix lint errors

* add bad request to API spec

* change casing

* fix casing in docs

* fix tests

* update spec

(cherry picked from commit 09c4dbdb9f)

Co-authored-by: Giordano Ricci <me@giordanoricci.com>
2022-08-03 09:35:17 -04:00
Grot (@grafanabot)
6fe808734b RolePicker: Fix RolePicker menu positioning (#53201) (#53216)
Fixes #52800

(cherry picked from commit dc775c7577)

Co-authored-by: Mihály Gyöngyösi <mgyongyosi@users.noreply.github.com>
2022-08-03 15:10:53 +02:00
Grot (@grafanabot)
3489677be1 Search: rename remove search constraints (#53190) (#53217)
(cherry picked from commit f61a97a0ab)

Co-authored-by: Artur Wierzbicki <wierzbicki.artur.94@gmail.com>
2022-08-03 08:55:36 -04:00
Grot (@grafanabot)
99293c5cf2 [v9.1.x] Frontend: Make datalinks works with status history and state timeline (#53202)
* Frontend: Make datalinks work with status history and state timeline (#50226)

* fix datalinks for state and status panels

* Add close button on tooltip

* fix links from all series displayed in tooltip

* Allow annotations creation, tweak UI

* Nits

* Remove unused property

* fix returns made from review

* setupUPlotConfig renamed to addTooltipSupport

Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
Co-authored-by: Victor Marin <victor.marin@grafana.com>
(cherry picked from commit 2054414d37)

* Change var keyword to const (#53206)

Co-authored-by: J-Loup <jloupdef@gmail.com>
Co-authored-by: Victor Marin <36818606+mdvictor@users.noreply.github.com>
2022-08-03 08:00:22 -04:00
Grot (@grafanabot)
f738dad97c Docs: update Alerting configuration (#53169) (#53192)
(cherry picked from commit edbaaf495b)

Co-authored-by: Armand Grillet <2117580+armandgrillet@users.noreply.github.com>
2022-08-03 10:25:23 +01:00
Grot (@grafanabot)
f0aad29a63 [v9.1.x] Alerting: Fix crash when viewing alert group without interval (#53188)
Co-authored-by: Gilles De Mey <gilles.de.mey@gmail.com>
2022-08-03 10:12:54 +02:00
Garrett Guillotte
0015826410 [v9.1.x] Add What's New in Grafana v9.1 (#53175)
* Docs: Add What's New in v9.1 (#53066)

* Docs: Add What's New in v9.1

* Update docs/sources/whatsnew/whats-new-in-v9-1.md

Co-authored-by: Fiona Artiaga <89225282+GrafanaWriter@users.noreply.github.com>

* Docs: Pass CI

* Update docs/sources/whatsnew/whats-new-in-v9-1.md

Co-authored-by: Kim Nylander <104772500+knylander-grafana@users.noreply.github.com>

* Update docs/sources/whatsnew/whats-new-in-v9-1.md

Co-authored-by: Kim Nylander <104772500+knylander-grafana@users.noreply.github.com>

* Update docs/sources/whatsnew/whats-new-in-v9-1.md

Co-authored-by: Kim Nylander <104772500+knylander-grafana@users.noreply.github.com>

* Update docs/sources/whatsnew/whats-new-in-v9-1.md

Co-authored-by: Kim Nylander <104772500+knylander-grafana@users.noreply.github.com>

* Update docs/sources/whatsnew/whats-new-in-v9-1.md

Co-authored-by: Kim Nylander <104772500+knylander-grafana@users.noreply.github.com>

* Update docs/sources/whatsnew/whats-new-in-v9-1.md

Co-authored-by: Kim Nylander <104772500+knylander-grafana@users.noreply.github.com>

* Update docs/sources/whatsnew/whats-new-in-v9-1.md

Co-authored-by: Kim Nylander <104772500+knylander-grafana@users.noreply.github.com>

* Docs: Apply style and semantic linebreak suggestions to 9.1 what's new

* Docs: Pass CI

* Removed reference to AWS SM project that has been pulled from announcement

* Docs: Pass CI

* Docs: Pass CI

Co-authored-by: Fiona Artiaga <89225282+GrafanaWriter@users.noreply.github.com>
Co-authored-by: Kim Nylander <104772500+knylander-grafana@users.noreply.github.com>
Co-authored-by: Tim Levett <tim.levett@grafana.com>

* Docs: Add 9.1 to What's New index

Co-authored-by: Fiona Artiaga <89225282+GrafanaWriter@users.noreply.github.com>
Co-authored-by: Kim Nylander <104772500+knylander-grafana@users.noreply.github.com>
Co-authored-by: Tim Levett <tim.levett@grafana.com>
2022-08-02 13:02:53 -07:00
Yuriy Tseretyan
d330c24c89 [9.1.x] Alerting: Remove user input from error response (#53164)
Co-authored-by: Alexander Weaver <weaver.alex.d@gmail.com>
2022-08-02 14:00:31 -04:00
Grot (@grafanabot)
f4aed50192 Docs: Update explain section in Loki docs (#53107) (#53161)
(cherry picked from commit c4ed5c4d4b)

Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
2022-08-02 11:27:14 -04:00
Ieva
0c8785fe21 backport release notes (#53160)
Co-authored-by: Grot (@grafanabot) <43478413+grafanabot@users.noreply.github.com>
2022-08-02 11:23:09 -04:00
Grot (@grafanabot)
6ca9dc8516 Azure Monitor: Early error if the client secret is not set (#53106) (#53154)
(cherry picked from commit 43955bdebd)

Co-authored-by: Andres Martinez Gotor <andres.martinez@grafana.com>
2022-08-02 11:04:55 -04:00
Grot (@grafanabot)
4f46dcbfdb Docs: Remove limitation for Azure Monitor template variables (#52983) (#53153)
(cherry picked from commit 245af46798)

Co-authored-by: Andres Martinez Gotor <andres.martinez@grafana.com>
2022-08-02 10:58:58 -04:00
Grot (@grafanabot)
27677fa9f3 Azure Monitor: Clarify removed query methods (#52986) (#53143)
(cherry picked from commit 194d0fe33b)

Co-authored-by: Andres Martinez Gotor <andres.martinez@grafana.com>
2022-08-02 10:10:09 -04:00
Grot (@grafanabot)
b9e152fbf8 "Release: Updated versions in package to 9.1.0-beta.1" (#53137) 2022-08-02 09:51:47 -04:00
6903 changed files with 170355 additions and 484839 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -1,4 +1,4 @@
# Auto generated binary variables helper managed by https://github.com/bwplotka/bingo v0.7. DO NOT EDIT.
# Auto generated binary variables helper managed by https://github.com/bwplotka/bingo v0.6. DO NOT EDIT.
# All tools are designed to be build inside $GOBIN.
BINGO_DIR := $(dir $(lastword $(MAKEFILE_LIST)))
GOPATH ?= $(shell go env GOPATH)
@@ -21,35 +21,29 @@ BRA := $(GOBIN)/bra-v0.0.0-20200517080246-1e3013ecaff8
$(BRA): $(BINGO_DIR)/bra.mod
@# Install binary/ries using Go 1.14+ build command. This is using bwplotka/bingo-controlled, separate go module with pinned dependencies.
@echo "(re)installing $(GOBIN)/bra-v0.0.0-20200517080246-1e3013ecaff8"
@cd $(BINGO_DIR) && GOWORK=off $(GO) build -mod=mod -modfile=bra.mod -o=$(GOBIN)/bra-v0.0.0-20200517080246-1e3013ecaff8 "github.com/unknwon/bra"
@cd $(BINGO_DIR) && $(GO) build -mod=mod -modfile=bra.mod -o=$(GOBIN)/bra-v0.0.0-20200517080246-1e3013ecaff8 "github.com/unknwon/bra"
DRONE := $(GOBIN)/drone-v1.5.0
$(DRONE): $(BINGO_DIR)/drone.mod
@# Install binary/ries using Go 1.14+ build command. This is using bwplotka/bingo-controlled, separate go module with pinned dependencies.
@echo "(re)installing $(GOBIN)/drone-v1.5.0"
@cd $(BINGO_DIR) && GOWORK=off $(GO) build -mod=mod -modfile=drone.mod -o=$(GOBIN)/drone-v1.5.0 "github.com/drone/drone-cli/drone"
@cd $(BINGO_DIR) && $(GO) build -mod=mod -modfile=drone.mod -o=$(GOBIN)/drone-v1.5.0 "github.com/drone/drone-cli/drone"
GOLANGCI_LINT := $(GOBIN)/golangci-lint-v1.49.0
$(GOLANGCI_LINT): $(BINGO_DIR)/golangci-lint.mod
@# Install binary/ries using Go 1.14+ build command. This is using bwplotka/bingo-controlled, separate go module with pinned dependencies.
@echo "(re)installing $(GOBIN)/golangci-lint-v1.49.0"
@cd $(BINGO_DIR) && GOWORK=off $(GO) build -mod=mod -modfile=golangci-lint.mod -o=$(GOBIN)/golangci-lint-v1.49.0 "github.com/golangci/golangci-lint/cmd/golangci-lint"
JB := $(GOBIN)/jb-v0.5.1
$(JB): $(BINGO_DIR)/jb.mod
@# Install binary/ries using Go 1.14+ build command. This is using bwplotka/bingo-controlled, separate go module with pinned dependencies.
@echo "(re)installing $(GOBIN)/jb-v0.5.1"
@cd $(BINGO_DIR) && GOWORK=off $(GO) build -mod=mod -modfile=jb.mod -o=$(GOBIN)/jb-v0.5.1 "github.com/jsonnet-bundler/jsonnet-bundler/cmd/jb"
SWAGGER := $(GOBIN)/swagger-v0.30.2
SWAGGER := $(GOBIN)/swagger-v0.29.0
$(SWAGGER): $(BINGO_DIR)/swagger.mod
@# Install binary/ries using Go 1.14+ build command. This is using bwplotka/bingo-controlled, separate go module with pinned dependencies.
@echo "(re)installing $(GOBIN)/swagger-v0.30.2"
@cd $(BINGO_DIR) && GOWORK=off $(GO) build -mod=mod -modfile=swagger.mod -o=$(GOBIN)/swagger-v0.30.2 "github.com/go-swagger/go-swagger/cmd/swagger"
@echo "(re)installing $(GOBIN)/swagger-v0.29.0"
@cd $(BINGO_DIR) && $(GO) build -mod=mod -modfile=swagger.mod -o=$(GOBIN)/swagger-v0.29.0 "github.com/go-swagger/go-swagger/cmd/swagger"
GOLANGCI_LINT := $(GOBIN)/golangci-lint-v1.40.1
$(GOLANGCI_LINT): $(BINGO_DIR)/golangci-lint.mod
@# Install binary/ries using Go 1.14+ build command. This is using bwplotka/bingo-controlled, separate go module with pinned dependencies.
@echo "(re)installing $(GOBIN)/golangci-lint-v1.40.1"
@cd $(BINGO_DIR) && $(GO) build -mod=mod -modfile=golangci-lint.mod -o=$(GOBIN)/golangci-lint-v1.40.1 "github.com/golangci/golangci-lint/cmd/golangci-lint"
WIRE := $(GOBIN)/wire-v0.5.0
$(WIRE): $(BINGO_DIR)/wire.mod
@# Install binary/ries using Go 1.14+ build command. This is using bwplotka/bingo-controlled, separate go module with pinned dependencies.
@echo "(re)installing $(GOBIN)/wire-v0.5.0"
@cd $(BINGO_DIR) && GOWORK=off $(GO) build -mod=mod -modfile=wire.mod -o=$(GOBIN)/wire-v0.5.0 "github.com/google/wire/cmd/wire"
@cd $(BINGO_DIR) && $(GO) build -mod=mod -modfile=wire.mod -o=$(GOBIN)/wire-v0.5.0 "github.com/google/wire/cmd/wire"

View File

@@ -2,6 +2,6 @@ module _ // Auto generated by https://github.com/bwplotka/bingo. DO NOT EDIT
go 1.17
replace golang.org/x/sys => golang.org/x/sys v0.0.0-20220615213510-4f61da869c0c
require github.com/unknwon/bra v0.0.0-20200517080246-1e3013ecaff8
replace golang.org/x/sys => golang.org/x/sys v0.0.0-20220615213510-4f61da869c0c

View File

@@ -1,5 +1,5 @@
module _ // Auto generated by https://github.com/bwplotka/bingo. DO NOT EDIT
go 1.19
go 1.17
require github.com/golangci/golangci-lint v1.49.0 // cmd/golangci-lint
require github.com/golangci/golangci-lint v1.40.1 // cmd/golangci-lint

File diff suppressed because it is too large Load Diff

View File

@@ -1,5 +0,0 @@
module _ // Auto generated by https://github.com/bwplotka/bingo. DO NOT EDIT
go 1.18
require github.com/jsonnet-bundler/jsonnet-bundler v0.5.1 // cmd/jb

View File

@@ -1,50 +0,0 @@
github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751 h1:JYp7IbQjafoB+tBA3gMyHYHrpOtNuDiK/uB5uXxq5wM=
github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc=
github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137 h1:s6gZFSlWYmbqAuRjVTiNNhvNRfY2Wxp9nhfyel4rklc=
github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137/go.mod h1:OMCwj8VM1Kc9e19TLln2VL61YJF0x1XFtfdL4JdbSyE=
github.com/campoy/embedmd v1.0.0/go.mod h1:oxyr9RCiSXg0M3VJ3ks0UGfp98BpSSGr0kpiX3MzVl8=
github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/fatih/color v1.13.0 h1:8LOYc1KYPPmyKMuN8QV2DNRWNbLo6LZ0iLs8+mlH53w=
github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk=
github.com/jsonnet-bundler/jsonnet-bundler v0.5.1 h1:eUd6EA1Qzz73Q4NLNLOrNkMb96+6NTTERbX9lqaxVwk=
github.com/jsonnet-bundler/jsonnet-bundler v0.5.1/go.mod h1:Qrdw/7mOFS2SKCOALKFfEH8gdvXJi8XZjw9g5ilpf4I=
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI=
github.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NBk=
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc=
github.com/mattn/go-colorable v0.1.12 h1:jF+Du6AlPIjs2BiUiQlKOX0rt3SujHxPnksPKZbaA40=
github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4=
github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU=
github.com/mattn/go-isatty v0.0.14 h1:yVuAays6BHfxijgZPzw+3Zlu5yQgKGP2/hcQbHb7S9Y=
github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94=
github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA=
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc=
github.com/rogpeppe/go-internal v1.8.1/go.mod h1:JeRgkft04UBgHMgCIwADu4Pn6Mtm5d4nPKWu0nJ5d+o=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/stretchr/testify v1.7.4/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220615213510-4f61da869c0c h1:aFV+BgZ4svzjfabn8ERpuB4JI4N6/rdy1iusx77G3oU=
golang.org/x/sys v0.0.0-20220615213510-4f61da869c0c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
gopkg.in/alecthomas/kingpin.v2 v2.2.6 h1:jMFz6MfLP0/4fUyZle81rXUoxOBFi19VUFKVDOQfozc=
gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q=
gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI=
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=

View File

@@ -2,4 +2,4 @@ module _ // Auto generated by https://github.com/bwplotka/bingo. DO NOT EDIT
go 1.18
require github.com/go-swagger/go-swagger v0.30.2 // cmd/swagger
require github.com/go-swagger/go-swagger v0.29.0 // cmd/swagger

View File

@@ -1,86 +1,48 @@
github.com/Masterminds/goutils v1.1.1 h1:5nUrii3FMTL5diU80unEVvNevw1nH4+ZV4DSLVJLSYI=
github.com/Masterminds/semver/v3 v3.1.1 h1:hLg3sBzpNErnxhQtUy/mmLR2I9foDujNK030IGemrRc=
github.com/Masterminds/sprig/v3 v3.2.2 h1:17jRggJu518dr3QaafizSXOjKYp94wKfABxUmyxvxX8=
github.com/PuerkitoBio/purell v1.1.1 h1:WEQqlqaGbrPkxLJWfBwQmfEAE1Z7ONdDLqrN38tNFfI=
github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 h1:d+Bc7a5rLufV/sSk/8dngufqelfh6jnri85riMAaF/M=
github.com/asaskevich/govalidator v0.0.0-20210307081110-f21760c49a8d h1:Byv0BzEl3/e6D5CLfI0j/7hiIEtvGVFPCZ7Ei2oq8iQ=
github.com/felixge/httpsnoop v1.0.2 h1:+nS9g82KMXccJ/wp0zyRW9ZBHFETmMGtkk+2CTTrW4o=
github.com/felixge/httpsnoop v1.0.3 h1:s/nj+GCswXYzN5v2DpNMuMQYe+0DDwt5WVCU6CWBdXk=
github.com/fsnotify/fsnotify v1.5.1 h1:mZcQUHVQUQWoPXXtuf9yuEXKudkV2sx1E06UadKWpgI=
github.com/fsnotify/fsnotify v1.5.4 h1:jRbGcIw6P2Meqdwuo0H1p6JVLbL5DHKAKlYndzMwVZI=
github.com/go-openapi/analysis v0.21.2 h1:hXFrOYFHUAMQdu6zwAiKKJHJQ8kqZs1ux/ru1P1wLJU=
github.com/go-openapi/analysis v0.21.4 h1:ZDFLvSNxpDaomuCueM0BlSXxpANBlFYiBvr+GXrvIHc=
github.com/go-openapi/errors v0.20.2 h1:dxy7PGTqEh94zj2E3h1cUmQQWiM1+aeCROfAr02EmK8=
github.com/go-openapi/errors v0.20.3 h1:rz6kiC84sqNQoqrtulzaL/VERgkoCyB6WdEkc2ujzUc=
github.com/go-openapi/inflect v0.19.0 h1:9jCH9scKIbHeV9m12SmPilScz6krDxKRasNNSNPXu/4=
github.com/go-openapi/jsonpointer v0.19.5 h1:gZr+CIYByUqjcgeLXnQu2gHYQC9o73G2XUeOFYEICuY=
github.com/go-openapi/jsonreference v0.19.6 h1:UBIxjkht+AWIgYzCDSv2GN+E/togfwXUJFRTWhl2Jjs=
github.com/go-openapi/jsonreference v0.20.0 h1:MYlu0sBgChmCfJxxUKZ8g1cPWFOB37YSZqewK7OKeyA=
github.com/go-openapi/loads v0.21.0 h1:jYtUO4wwP7psAweisP/MDoOpdzsYEESdoPcsWjHDR68=
github.com/go-openapi/loads v0.21.2 h1:r2a/xFIYeZ4Qd2TnGpWDIQNcP80dIaZgf704za8enro=
github.com/go-openapi/runtime v0.21.1 h1:/KIG00BzA2x2HRStX2tnhbqbQdPcFlkgsYCiNY20FZs=
github.com/go-openapi/runtime v0.24.1 h1:Sml5cgQKGYQHF+M7yYSHaH1eOjvTykrddTE/KtQVjqo=
github.com/go-openapi/spec v0.20.4 h1:O8hJrt0UMnhHcluhIdUgCLRWyM2x7QkBXRvOs7m+O1M=
github.com/go-openapi/spec v0.20.7 h1:1Rlu/ZrOCCob0n+JKKJAWhNWMPW8bOZRg8FJaY+0SKI=
github.com/go-openapi/strfmt v0.21.1 h1:G6s2t5V5kGCHLVbSdZ/6lI8Wm4OzoPFkc3/cjAsKQrM=
github.com/go-openapi/strfmt v0.21.3 h1:xwhj5X6CjXEZZHMWy1zKJxvW9AfHC9pkyUjLvHtKG7o=
github.com/go-openapi/swag v0.19.15 h1:D2NRCBzS9/pEY3gP9Nl8aDqGUcPFrwG2p+CNFrLyrCM=
github.com/go-openapi/swag v0.22.3 h1:yMBqmnQ0gyZvEb/+KzuWZOXgllrXT4SADYbvDaXHv/g=
github.com/go-openapi/validate v0.20.3 h1:GZPPhhKSZrE8HjB4eEkoYAZmoWA4+tCemSgINH1/vKw=
github.com/go-openapi/validate v0.22.0 h1:b0QecH6VslW/TxtpKgzpO1SNG7GU2FsaqKdP1E2T50Y=
github.com/go-stack/stack v1.8.1 h1:ntEHSVwIt7PNXNpgPmVfMrNhLtgjlmnZha2kOpuRiDw=
github.com/go-swagger/go-swagger v0.29.0 h1:z3YoZtLvS1Y8TE/PCat1VypcZxM0IgKLt0NvZxQyNl8=
github.com/go-swagger/go-swagger v0.29.0/go.mod h1:Z4GJzI+bHKKkGB2Ji1rawpi3/ldXX8CkzGIa9HAC5EE=
github.com/go-swagger/go-swagger v0.30.2 h1:23odPUyQZdkNFZZSBJ3mqYYcdh+LnuReEbdWN18OMRo=
github.com/go-swagger/go-swagger v0.30.2/go.mod h1:neDPes8r8PCz2JPvHRDj8BTULLh4VJUt7n6MpQqxhHM=
github.com/google/uuid v1.1.2 h1:EVhdT+1Kseyi1/pUmXKaFxYsDNy9RQYkMWRH68J/W7Y=
github.com/gorilla/handlers v1.5.1 h1:9lRY6j8DEeeBT10CvO9hGW0gmky0BprnvDI5vfhUHH4=
github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4=
github.com/huandu/xstrings v1.3.2 h1:L18LIDzqlW6xN2rEkpdV8+oL/IXWJ1APd+vsdYy4Wdw=
github.com/imdario/mergo v0.3.12 h1:b6R2BslTbIEToALKP7LxUvijTsNI9TAe80pLWN2g/HU=
github.com/jessevdk/go-flags v1.5.0 h1:1jKYvbxEjfUl0fmqTCOfonvskHHXMjBySTLW4y9LFvc=
github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY=
github.com/kr/pretty v0.3.0 h1:WgNl7dwNpEZ6jJ9k1snq4pZsg7DOEN8hP9Xw0Tsjwk0=
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
github.com/magiconair/properties v1.8.5 h1:b6kJs+EmPFMYGkow9GiUyCyOvIwYetYJ3fSaWak/Gls=
github.com/magiconair/properties v1.8.6 h1:5ibWZ6iY0NctNGWo87LalDlEZ6R41TqbbDamhfG/Qzo=
github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0=
github.com/mitchellh/copystructure v1.2.0 h1:vpKXTN4ewci03Vljg/q9QvCGUDttBOGBIa15WveJJGw=
github.com/mitchellh/mapstructure v1.4.3 h1:OVowDSCllw/YjdLkam3/sm7wEtOy59d8ndGgCcyj8cs=
github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY=
github.com/mitchellh/reflectwalk v1.0.2 h1:G2LzWKi524PWgd3mLHV8Y5k7s6XUvT0Gef6zxSIeXaQ=
github.com/oklog/ulid v1.3.1 h1:EGfNDEx6MqHz8B3uNV6QAib1UR2Lm97sHi3ocA6ESJ4=
github.com/pelletier/go-toml v1.9.4 h1:tjENF6MfZAg8e4ZmZTeWaWiT2vXtsoO6+iuOjFhECwM=
github.com/pelletier/go-toml v1.9.5 h1:4yBQzkHv+7BHq2PQUZF3Mx0IYxG7LsP222s7Agd3ve8=
github.com/pelletier/go-toml/v2 v2.0.1 h1:8e3L2cCQzLFi2CR4g7vGFuFxX7Jl1kKX8gW+iV0GUKU=
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
github.com/rogpeppe/go-internal v1.8.1 h1:geMPLpDpQOgVyCg5z5GoRwLHepNdb71NXb67XFkP+Eg=
github.com/rogpeppe/go-internal v1.9.0 h1:73kH8U+JUqXU8lRuOHeVHaa/SZPifC7BkcraZVejAe8=
github.com/shopspring/decimal v1.2.0 h1:abSATXmQEYyShuxI4/vyW3tV1MrKAJzCZ/0zLUXYbsQ=
github.com/spf13/afero v1.8.0 h1:5MmtuhAgYeU6qpa7w7bP0dv6MBYuup0vekhSpSkoq60=
github.com/spf13/afero v1.8.2 h1:xehSyVa0YnHWsJ49JFljMpg1HX19V6NDZ1fkm1Xznbo=
github.com/spf13/cast v1.4.1 h1:s0hze+J0196ZfEMTs80N7UlFt0BDuQ7Q+JDnHiMWKdA=
github.com/spf13/cast v1.5.0 h1:rj3WzYc11XZaIZMPKmwP96zkFEnnAmV8s6XbB2aY32w=
github.com/spf13/jwalterweatherman v1.1.0 h1:ue6voC5bR5F8YxI5S67j9i582FU4Qvo2bmqnqMYADFk=
github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA=
github.com/spf13/viper v1.10.1 h1:nuJZuYpG7gTj/XqiUwg8bA0cp1+M2mC3J4g5luUYBKk=
github.com/spf13/viper v1.12.0 h1:CZ7eSOd3kZoaYDLbXnmzgQI5RlciuXBMA+18HwHRfZQ=
github.com/subosito/gotenv v1.2.0 h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s=
github.com/subosito/gotenv v1.3.0 h1:mjC+YW8QpAdXibNi+vNWgzmgBH4+5l5dCXv8cNysBLI=
github.com/toqueteos/webbrowser v1.2.0 h1:tVP/gpK69Fx+qMJKsLE7TD8LuGWPnEV71wBN9rrstGQ=
go.mongodb.org/mongo-driver v1.8.2 h1:8ssUXufb90ujcIvR6MyE1SchaNj0SFxsakiZgxIyrMk=
go.mongodb.org/mongo-driver v1.10.1 h1:NujsPveKwHaWuKUer/ceo9DzEe7HIj1SlJ6uvXZG0S4=
golang.org/x/crypto v0.0.0-20220829220503-c86fa9a7ed90 h1:Y/gsMcFOcR+6S6f3YeMKl5g+dZMEWqcz5Czj/GWYbkM=
golang.org/x/mod v0.5.1 h1:OJxoQ/rynoF0dcCdI7cLPktw/hR2cueqYfjm43oqK38=
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4 h1:6zppjxzCulZykYSLyVDYbneBfbaBIQPYMevg0bEwv2s=
golang.org/x/net v0.0.0-20220121210141-e204ce36a2ba h1:6u6sik+bn/y7vILcYkK3iwTBWN7WtBvB0+SZswQnbf8=
golang.org/x/sys v0.0.0-20220114195835-da31bd327af9 h1:XfKQ4OlFl8okEOr5UvAqFRVj8pY/4yfcXrddB8qAbU0=
golang.org/x/sys v0.0.0-20220829200755-d48e67d00261 h1:v6hYoSR9T5oet+pMXwUWkbiVqx/63mlHjefrHmxwfeY=
golang.org/x/text v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk=
golang.org/x/tools v0.1.8 h1:P1HhGGuLW4aAclzjtmJdf0mJOjVUZUzOTqkAkWL+l6w=
golang.org/x/tools v0.1.12 h1:VveCTK38A2rkS8ZqFY25HIDFscX5X9OoEhJd3quQmXU=
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE=
gopkg.in/ini.v1 v1.66.3 h1:jRskFVxYaMGAMUbN0UZ7niA9gzL9B49DOqE78vg0k3w=
gopkg.in/ini.v1 v1.66.4 h1:SsAcf+mM7mRZo2nJNGt8mZCjG8ZRaNGMURJw7BsIST4=
gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=

View File

@@ -1,4 +1,4 @@
# Auto generated binary variables helper managed by https://github.com/bwplotka/bingo v0.7. DO NOT EDIT.
# Auto generated binary variables helper managed by https://github.com/bwplotka/bingo v0.6. DO NOT EDIT.
# All tools are designed to be build inside $GOBIN.
# Those variables will work only until 'bingo get' was invoked, or if tools were installed via Makefile's Variables.mk.
GOBIN=${GOBIN:=$(go env GOBIN)}
@@ -12,11 +12,9 @@ BRA="${GOBIN}/bra-v0.0.0-20200517080246-1e3013ecaff8"
DRONE="${GOBIN}/drone-v1.5.0"
GOLANGCI_LINT="${GOBIN}/golangci-lint-v1.49.0"
SWAGGER="${GOBIN}/swagger-v0.29.0"
JB="${GOBIN}/jb-v0.5.1"
SWAGGER="${GOBIN}/swagger-v0.30.2"
GOLANGCI_LINT="${GOBIN}/golangci-lint-v1.40.1"
WIRE="${GOBIN}/wire-v0.5.0"

View File

@@ -1,7 +1,6 @@
[run]
init_cmds = [
["make", "gen-go"],
["make", "gen-jsonnet"],
["GO_BUILD_DEV=1", "make", "build-cli"],
["GO_BUILD_DEV=1", "make", "build-server"],
["./bin/grafana-server", "-packaging=dev", "cfg:app_mode=development"]
@@ -12,14 +11,12 @@ watch_dirs = [
"$WORKDIR/pkg",
"$WORKDIR/public/views",
"$WORKDIR/conf",
"$WORKDIR/devenv/dev-dashboards",
]
watch_exts = [".go", ".ini", ".toml", ".template.html"]
ignore_files = [".*_gen.go"]
build_delay = 1500
cmds = [
["make", "gen-go"],
["make", "gen-jsonnet"],
["GO_BUILD_DEV=1", "make", "build-server"],
["./bin/grafana-server", "-packaging=dev", "cfg:app_mode=development"]
]

View File

@@ -7,8 +7,7 @@
load('scripts/drone/events/pr.star', 'pr_pipelines')
load('scripts/drone/events/main.star', 'main_pipelines')
load('scripts/drone/pipelines/docs.star', 'docs_pipelines')
load('scripts/drone/events/release.star', 'release_pipelines', 'publish_artifacts_pipelines', 'publish_npm_pipelines', 'publish_packages_pipeline', 'artifacts_page_pipeline')
load('scripts/drone/pipelines/publish_images.star', 'publish_image_pipelines_public', 'publish_image_pipelines_security')
load('scripts/drone/events/release.star', 'release_pipelines', 'publish_image_pipelines', 'publish_artifacts_pipelines', 'publish_npm_pipelines', 'publish_packages_pipeline', 'artifacts_page_pipeline')
load('scripts/drone/version.star', 'version_branch_pipelines')
load('scripts/drone/events/cron.star', 'cronjobs')
load('scripts/drone/vault.star', 'secrets')
@@ -16,7 +15,7 @@ load('scripts/drone/vault.star', 'secrets')
def main(ctx):
edition = 'oss'
return pr_pipelines(edition=edition) + main_pipelines(edition=edition) + release_pipelines() + \
publish_image_pipelines_public() + publish_image_pipelines_security() + \
publish_image_pipelines('public') + publish_image_pipelines('security') + \
publish_artifacts_pipelines('security') + publish_artifacts_pipelines('public') + \
publish_npm_pipelines('public') + publish_packages_pipeline() + artifacts_page_pipeline() + \
version_branch_pipelines() + cronjobs(edition=edition) + secrets()

2780
.drone.yml

File diff suppressed because it is too large Load Diff

View File

@@ -1,15 +1,13 @@
{
"extends": ["@grafana/eslint-config"],
"root": true,
"plugins": ["@emotion", "lodash", "jest", "import", "jsx-a11y"],
"plugins": ["@emotion", "lodash", "jest", "import"],
"settings": {
"import/internal-regex": "^(app/)|(@grafana)",
"import/external-module-folders": ["node_modules", ".yarn"]
},
"rules": {
"react/prop-types": "off",
// need to ignore emotion's `css` prop, see https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-unknown-property.md#rule-options
"react/no-unknown-property": ["error", { "ignore": ["css"] }],
"@emotion/jsx-import": "error",
"lodash/import-scope": [2, "member"],
"jest/no-focused-tests": "error",
@@ -20,36 +18,9 @@
"newlines-between": "always",
"alphabetize": { "order": "asc" }
}
],
"no-restricted-imports": [
"error",
{
"paths": [
{
"name": "react-redux",
"importNames": ["useDispatch", "useSelector"],
"message": "Please import from app/types instead."
},
{
"name": "react-i18next",
"importNames": ["Trans", "t"],
"message": "Please import from app/core/internationalization instead"
}
]
}
],
// Use typescript's no-redeclare for compatibility with overrides
"no-redeclare": "off",
"@typescript-eslint/no-redeclare": ["error"]
]
},
"overrides": [
{
"files": ["public/app/features/scenes/**/*.{ts,tsx}"],
"rules": {
"@typescript-eslint/explicit-member-accessibility": ["error", { "accessibility": "explicit" }]
}
},
{
"files": ["packages/grafana-ui/src/components/uPlot/**/*.{ts,tsx}"],
"rules": {
@@ -64,35 +35,6 @@
"react/jsx-uses-react": "off",
"react/react-in-jsx-scope": "off"
}
},
{
"files": ["public/dashboards/scripted*.js"],
"rules": {
"no-redeclare": "error",
"@typescript-eslint/no-redeclare": "off"
}
},
{
"extends": ["plugin:jsx-a11y/recommended"],
"files": ["**/*"],
"excludedFiles": ["**/*.{spec,test}.{ts,tsx}"],
"rules": {
// rules marked "off" are those left in the recommended preset we need to fix
// we should remove the corresponding line and fix them one by one
// any marked "error" contain specific overrides we'll need to keep
"jsx-a11y/click-events-have-key-events": "off",
"jsx-a11y/no-autofocus": [
"error",
{
"ignoreNonDOM": true
}
],
"jsx-a11y/no-static-element-interactions": "off",
"jsx-a11y/label-has-associated-control": [ "error", {
"controlComponents": ["NumberInput"],
"depth": 2
}]
}
}
]
}

83
.github/CODEOWNERS vendored
View File

@@ -11,27 +11,12 @@
# In each subsection folders are ordered first by depth, then alphabetically.
# This should make it easy to add new rules without breaking existing ones.
# Documentation
# Documentation owner: Jita Chatterjee
/docs/ @grafana/docs-squad
/contribute/ @grafana/docs-squad
/docs/sources/developers/plugins/ @grafana/docs-squad @grafana/plugins-platform-frontend @grafana/plugins-platform-backend
/docs/sources/developers/plugins/backend @grafana/docs-squad @grafana/plugins-platform-backend
# Set up, dashboards/visualization, best practices: Chris Moyer
# Alerting: Brenda Muir
/docs/sources/administration/ @Eve832 @GrafanaWriter
/docs/sources/alerting @brendamuir
/docs/sources/best-practices/ @chri2547
/docs/sources/dashboards/ @chri2547
/docs/sources/datasources/ @Eve832 @GrafanaWriter
/docs/sources/enterprise/ @Eve832 @GrafanaWriter
/docs/sources/explore/ @Eve832 @GrafanaWriter
/docs/sources/getting-started/ @chri2547
/docs/sources/old-alerting @brendamuir
/docs/sources/panels/ @chri2547
/docs/sources/release-notes/ @Eve832 @GrafanaWriter
/docs/sources/setup-grafana/ @chri2547
/docs/sources/visualization/ @chri2547
/docs/sources/whatsnew/ @Eve832 @GrafanaWriter
/contribute/ @marcusolsson @grafana/docs-squad
/docs/sources/developers/plugins/ @marcusolsson @grafana/docs-squad @grafana/plugins-platform-frontend @grafana/plugins-platform-backend
/docs/sources/developers/plugins/backend @marcusolsson @grafana/docs-squad @grafana/plugins-platform-backend
/docs/sources/enterprise/ @osg-grafana @grafana/docs-squad
# Backend code
*.go @grafana/backend-platform
@@ -39,16 +24,6 @@ go.mod @grafana/backend-platform
go.sum @grafana/backend-platform
/.bingo @grafana/backend-platform
# Backend code, developers environment
/devenv/docker/blocks/auth @grafana/grafana-authnz-team
# Logs code, developers environment
/devenv/docker/blocks/loki* @grafana/observability-logs
/devenv/docker/blocks/elastic* @grafana/observability-logs
# Performance tests
/devenv/docker/loadtests-ts @grafana/grafana-edge-squad
# Continuous Integration
.drone.yml @grafana/grafana-release-eng
.drone.star @grafana/grafana-release-eng
@@ -65,10 +40,10 @@ go.sum @grafana/backend-platform
/pkg/tsdb/influxdb @grafana/observability-metrics
/pkg/tsdb/elasticsearch @grafana/observability-logs
/pkg/tsdb/graphite @grafana/observability-metrics
/pkg/tsdb/jaeger @grafana/observability-traces-and-profiling
/pkg/tsdb/jaeger @grafana/observability-logs-and-traces
/pkg/tsdb/loki @grafana/observability-logs
/pkg/tsdb/zipkin @grafana/observability-traces-and-profiling
/pkg/tsdb/tempo @grafana/observability-traces-and-profiling
/pkg/tsdb/zipkin @grafana/observability-logs-and-traces
/pkg/tsdb/tempo @grafana/observability-logs-and-traces
# BI backend code
/pkg/tsdb/mysql @grafana/grafana-bi-squad
@@ -83,10 +58,9 @@ go.sum @grafana/backend-platform
/pkg/services/live/ @grafana/grafana-edge-squad
/pkg/services/searchV2/ @grafana/grafana-edge-squad
/pkg/services/store/ @grafana/grafana-edge-squad
/pkg/services/querylibrary/ @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
pkg/tsdb/testdatasource/sims/ @grafana/grafana-edge-squad
# Alerting
/pkg/services/ngalert @grafana/alerting-squad-backend
@@ -104,7 +78,6 @@ go.sum @grafana/backend-platform
/pkg/plugins @grafana/plugins-platform-backend
/pkg/services/datasourceproxy @grafana/plugins-platform-backend
/pkg/services/datasources @grafana/plugins-platform-backend
/pkg/plugins/pfs @grafana/plugins-platform-backend @grafana/grafana-as-code
# Dashboard previews / crawler (behind feature flag)
/pkg/services/thumbs @grafana/grafana-edge-squad
@@ -114,24 +87,19 @@ go.sum @grafana/backend-platform
/contribute/architecture/backend @grafana/backend-platform
/contribute/engineering/backend @grafana/backend-platform
/crowdin.yml @grafana/user-essentials
/public/locales @grafana/user-essentials
/public/app/core/internationalization @grafana/user-essentials
/e2e @grafana/user-essentials
/e2e/cloud-plugins-suite @grafana/cloud-provider-plugins
/packages @grafana/user-essentials @grafana/plugins-platform-frontend @grafana/grafana-bi-squad
/packages/grafana-e2e-selectors @grafana/user-essentials
/packages/grafana-e2e @grafana/user-essentials
/packages/grafana-toolkit @grafana/plugins-platform-frontend
/packages/grafana-ui/.storybook @grafana/plugins-platform-frontend
/packages/grafana-ui/src/components/DateTimePickers @grafana/user-essentials
/packages/grafana-ui/src/components/DateTimePickers @grafana/grafana-bi-squad
/packages/grafana-ui/src/components/GraphNG @grafana/grafana-bi-squad
/packages/grafana-ui/src/components/Logs @grafana/observability-logs
/packages/grafana-ui/src/components/Table @grafana/grafana-bi-squad
/packages/grafana-ui/src/components/TimeSeries @grafana/grafana-bi-squad
/packages/grafana-ui/src/components/uPlot @grafana/grafana-bi-squad
/packages/grafana-ui/src/utils/storybook @grafana/plugins-platform-frontend
/packages/jaeger-ui-components/ @grafana/observability-traces-and-profiling
/packages/jaeger-ui-components/ @grafana/observability-logs-and-traces
/plugins-bundled @grafana/plugins-platform-frontend
# public folder
/public/app/core/components/TimePicker @grafana/grafana-bi-squad
@@ -150,8 +118,7 @@ go.sum @grafana/backend-platform
/public/app/plugins/panel/heatmap @grafana/grafana-bi-squad
/public/app/plugins/panel/histogram @grafana/grafana-bi-squad
/public/app/plugins/panel/logs @grafana/observability-logs
/public/app/plugins/panel/nodeGraph @grafana/observability-traces-and-profiling
/public/app/plugins/panel/traces @grafana/observability-traces-and-profiling
/public/app/plugins/panel/nodeGraph @grafana/observability-logs-and-traces
/public/app/plugins/panel/piechart @grafana/grafana-bi-squad
/public/app/plugins/panel/state-timeline @grafana/grafana-bi-squad
/public/app/plugins/panel/status-history @grafana/grafana-bi-squad
@@ -164,6 +131,8 @@ go.sum @grafana/backend-platform
/scripts/build/release-packages.sh @grafana/plugins-platform-frontend
/scripts/circle-release-next-packages.sh @grafana/plugins-platform-frontend
/scripts/ci-frontend-metrics.sh @grafana/user-essentials @grafana/plugins-platform-frontend @grafana/grafana-bi-squad
/scripts/ci-reference-docs-build.sh @grafana/plugins-platform-frontend
/scripts/ci-reference-docs-lint.sh @grafana/plugins-platform-frontend
/scripts/grunt @grafana/frontend-ops
/scripts/webpack @grafana/frontend-ops
/scripts/generate-a11y-report.sh @grafana/user-essentials
@@ -178,7 +147,7 @@ lerna.json @grafana/frontend-ops
.betterer.results @joshhunt
# @grafana/ui component documentation
*.mdx @grafana/plugins-platform-frontend
*.mdx @marcusolsson @jessover9000 @grafana/plugins-platform-frontend
# Core datasources
/public/app/plugins/datasource/cloudwatch @grafana/aws-plugins
@@ -186,7 +155,7 @@ lerna.json @grafana/frontend-ops
/public/app/plugins/datasource/grafana-azure-monitor-datasource @grafana/cloud-provider-plugins
/public/app/plugins/datasource/graphite @grafana/observability-metrics
/public/app/plugins/datasource/influxdb @grafana/observability-metrics
/public/app/plugins/datasource/jaeger @grafana/observability-traces-and-profiling
/public/app/plugins/datasource/jaeger @grafana/observability-logs-and-traces
/public/app/plugins/datasource/loki @grafana/observability-logs
/public/app/plugins/datasource/mssql @grafana/grafana-bi-squad
/public/app/plugins/datasource/mysql @grafana/grafana-bi-squad
@@ -194,8 +163,8 @@ lerna.json @grafana/frontend-ops
/public/app/plugins/datasource/postgres @grafana/grafana-bi-squad
/public/app/plugins/datasource/prometheus @grafana/observability-metrics
/public/app/plugins/datasource/cloud-monitoring @grafana/cloud-provider-plugins
/public/app/plugins/datasource/zipkin @grafana/observability-traces-and-profiling
/public/app/plugins/datasource/tempo @grafana/observability-traces-and-profiling
/public/app/plugins/datasource/zipkin @grafana/observability-logs-and-traces
/public/app/plugins/datasource/tempo @grafana/observability-logs-and-traces
/public/app/plugins/datasource/alertmanager @grafana/alerting-squad
# Cloud middleware
@@ -214,19 +183,3 @@ lerna.json @grafana/frontend-ops
/pkg/services/oauthtoken @grafana/grafana-authnz-team
/pkg/services/teamguardian @grafana/grafana-authnz-team
/pkg/services/serviceaccounts @grafana/grafana-authnz-team
# Grafana Partnerships Team
/pkg/infra/httpclient/httpclientprovider/sigv4_middleware.go @grafana/grafana-partnerships-team
# Kind system and code generation
embed.go @grafana/grafana-as-code
/kinds/ @grafana/grafana-as-code
/pkg/codegen @grafana/grafana-as-code
/pkg/kindsys @grafana/grafana-as-code
/pkg/kinds/*/*_gen.go @grafana/grafana-as-code
/pkg/registry/corekind @grafana/grafana-as-code
/public/app/plugins/*gen.go @grafana/grafana-as-code
# Specific core kinds
/kinds/raw/ @grafana/grafana-edge-squad
/kinds/structured/dashboard @grafana/dashboards-squad

View File

@@ -14,23 +14,11 @@ Thank you for sending a pull request! Here are some tips:
6. Name your PR as "<FeatureArea>: Describe your change", e.g. Alerting: Prevent race condition. If it's a fix or feature relevant for the changelog describe the user impact in the title. The PR title is used to auto-generate the changelog for issues marked with the "add to changelog" label.
7. If your PR content should be added to the What's New document for the next major or minor release, add the **add to what's new** label to your PR. Note that you should add this label to the main PR that introduces the feature; do not add this label to smaller PRs for the feature.
-->
**What is this feature?**
**What this PR does / why we need it**:
[Add a brief description of what the feature or update does.]
**Why do we need this feature?**
[Add a description of the problem the feature is trying to solve.]
**Who is this feature for?**
[Add information on what kind of user the feature is for.]
**Which issue(s) does this PR fix?**:
**Which issue(s) this PR fixes**:
<!--

View File

@@ -41,7 +41,6 @@
"type":"label",
"name":"bot/no new info",
"action":"close",
"removeLabel":"needs more info",
"comment":"We've closed this issue since it needs more information and hasn't had any activity recently. We can re-open it after you you add more information. To avoid having your issue closed in the future, please read our [CONTRIBUTING](https://github.com/grafana/grafana/blob/main/CONTRIBUTING.md) guidelines.\n\nHappy graphing!"
},
{
@@ -152,7 +151,7 @@
"name":"datasource/Tempo",
"action":"addToProject",
"addToProject":{
"url":"https://github.com/orgs/grafana/projects/221"
"url":"https://github.com/orgs/grafana/projects/110"
}
},
{
@@ -168,7 +167,7 @@
"name":"datasource/Jaeger",
"action":"addToProject",
"addToProject":{
"url":"https://github.com/orgs/grafana/projects/221"
"url":"https://github.com/orgs/grafana/projects/110"
}
},
{
@@ -176,7 +175,7 @@
"name":"datasource/Zipkin",
"action":"addToProject",
"addToProject":{
"url":"https://github.com/orgs/grafana/projects/221"
"url":"https://github.com/orgs/grafana/projects/110"
}
},
{

View File

@@ -16,10 +16,6 @@
"name": "needs_more_info",
"query": "label:\"needs more info\" is:open"
},
{
"name": "triage_needs_confirmation",
"query": "label:\"triage/needs-confirmation\" is:open"
},
{
"name": "unlabeled",
"query": "is:open is:issue no:label"
@@ -27,6 +23,10 @@
{
"name": "open_prs",
"query": "is:open is:pr"
},
{
"name": "milestone_7_4_open",
"query": "is:open is:issue milestone:7.4"
}
]
}

View File

@@ -4,18 +4,29 @@
],
"enabledManagers": ["npm"],
"ignoreDeps": [
"@grafana/slate-react", // should be updated when the `slate` package is updated
"@types/systemjs",
"@types/d3-force", // we should bump this once we move to esm modules
"@types/d3-interpolate", // we should bump this once we move to esm modules
"@types/d3-scale-chromatic", // we should bump this once we move to esm modules
"@types/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
"execa", // we should bump this once we move to esm modules
"history", // we should bump this together with react-router-dom
"@mdx-js/react", // storybook peer-depends on its 1.x version, we should upgrade this when we upgrade storybook
"@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-redux", // react-beautiful-dnd depends on react-redux 7.x, we need to update that one first
"react-router-dom", // we should bump this together with history
"slate",
"slate-plain-serializer",
"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
@@ -43,37 +54,7 @@
"matchPackagePatterns": ["@storybook"],
"extends": ["schedule:monthly"],
"groupName": "Storybook updates"
},
{
"groupName": "React Aria",
"matchPackagePrefixes": [
"@react-aria/",
"@react-stately/"
]
},
{
"groupName": "Moveable",
"matchPackageNames": [
"moveable",
"react-moveable"
]
},
{
"groupName": "Slate",
"matchPackageNames": [
"@types/slate",
"@types/slate-react",
"slate",
"slate-react"
]
},
{
"groupName": "d3",
"matchPackagePrefixes": [
"d3",
"@types/d3"
]
},
}
],
"pin": {
"enabled": false

1
.github/teams.yml vendored
View File

@@ -7,5 +7,4 @@ test:
# Alerting team
area/alerting:
github-board: 52
channel-label: C02B9MXQE0J

View File

@@ -3,8 +3,19 @@ on:
workflow_dispatch:
inputs:
version:
description: 'Needs to match, exactly, the name of a milestone. The version to be released please respect: major.minor.patch or major.minor.patch-beta<number> format. example: 7.4.3 or 7.4.3-beta1'
required: true
default: '7.x.x'
workflow_call:
inputs:
version_call:
description: Needs to match, exactly, the name of a version
required: true
type: string
secrets:
token:
required: true
metricsWriteAPIKey:
required: true
env:
YARN_ENABLE_IMMUTABLE_INSTALLS: false
jobs:
@@ -17,7 +28,7 @@ jobs:
id: regex-match
with:
text: ${{ github.event.inputs.version }}
regex: '^(\d+.\d+).\d+(?:-beta\d+)?$'
regex: '^(\d+.\d+).\d+(?:-beta.\d+)?$'
- uses: actions-ecosystem/action-regex-match@v2.0.2
if: ${{ inputs.version_call != '' }}
id: regex-match-version-call
@@ -29,7 +40,7 @@ jobs:
run: |
echo "The input version format is not correct, please respect:\
major.minor.patch or major.minor.patch-beta.number format. \
example: 7.4.3 or 7.4.3-beta1"
example: 7.4.3 or 7.4.3-beta.1"
exit 1
- name: Validate input version call
if: ${{ inputs.version_call != '' && steps.regex-match-version-call.outputs.match == '' }}
@@ -44,10 +55,10 @@ jobs:
- name: Set intermedia variables
id: intermedia
run: |
echo "short_ref=${GITHUB_REF#refs/*/}" >> $GITHUB_OUTPUT
echo "check_passed=false" >> $GITHUB_OUTPUT
echo "branch_name=v${{steps.regex-match.outputs.group1}}" >> $GITHUB_OUTPUT
echo "branch_exist=$(git ls-remote --heads https://github.com/grafana/grafana.git v${{ steps.regex-match.outputs.group1 }}.x | wc -l)" >> $GITHUB_OUTPUT
echo "::set-output name=short_ref::${GITHUB_REF#refs/*/}"
echo "::set-output name=check_passed::false"
echo "::set-output name=branch_name::v${{steps.regex-match.outputs.group1}}"
echo "::set-output name=branch_exist::$(git ls-remote --heads https://github.com/grafana/grafana.git v${{ steps.regex-match.outputs.group1 }}.x | wc -l)"
- name: Check input version is aligned with branch(main)
if: ${{ github.event.inputs.version != '' && steps.intermedia.outputs.branch_exist == '0' && !contains(steps.intermedia.outputs.short_ref, 'main') }}
@@ -63,13 +74,21 @@ jobs:
repository: "grafana/grafana-github-actions"
path: ./actions
ref: main
- uses: actions/setup-node@v3.5.1
- uses: actions/setup-node@v3.4.0
with:
node-version: '16'
- name: Install Actions
run: npm install --production --prefix ./actions
- name: Run bump version (manually invoked)
- name: Run bump version (manually invoked)
if: ${{ github.event.inputs.version != '' }}
uses: ./actions/bump-version
with:
token: ${{ secrets.GH_BOT_ACCESS_TOKEN }}
metricsWriteAPIKey: ${{ secrets.GRAFANA_MISC_STATS_API_KEY }}
- name: Run bump version (workflow invoked)
if: ${{ inputs.version_call != '' }}
uses: ./actions/bump-version
with:
version_call: ${{ inputs.version_call }}
token: ${{ secrets.token }}
metricsWriteAPIKey: ${{ secrets.metricsWriteAPIKey }}

View File

@@ -14,7 +14,7 @@ on:
jobs:
workflow-call:
uses: grafana/code-coverage/.github/workflows/code-coverage.yml@v0.1.12
uses: grafana/code-coverage/.github/workflows/code-coverage.yml@v0.1.6
with:
frontend-path-regexp: public\/app\/plugins\/datasource\/(grafana-azure-monitor-datasource|cloud-monitoring|cloudwatch)
backend-path-regexp: pkg\/tsdb\/(azuremonitor|cloudmonitoring|cloudwatch)

View File

@@ -6,7 +6,6 @@
name: "CodeQL"
on:
workflow_dispatch:
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:
@@ -40,12 +39,6 @@ jobs:
# a pull request then we can checkout the head.
fetch-depth: 2
- if: matrix.language == 'go'
name: Set go version
uses: actions/setup-go@v3
with:
go-version: '1.19.2'
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
@@ -56,11 +49,5 @@ 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
- if: matrix.language == 'go'
name: Build go files
run: |
go mod verify
make build-go
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2

View File

@@ -1,32 +0,0 @@
# Workflow for skipping the Levitate detection
# (This is needed because workflows that are skipped due to path filtering will show up as pending in Github.
# As this has the same name as the one in detect-breaking-changes-build.yml it will take over in these cases and succeed quickly.)
name: Levitate / Detect breaking changes
on:
pull_request:
paths-ignore:
- "packages/**"
jobs:
detect:
name: Detect breaking changes
runs-on: ubuntu-latest
steps:
- name: Skipping
run: echo "No modifications in the public API (packages/), skipping."
# Build and persist output as a JSON (we need to tell the report workflow that the check has been skipped)
- name: Persisting the check output
run: |
mkdir -p ./levitate
echo "{ \"shouldSkip\": true }" > ./levitate/result.json
# Upload artifact (so it can be used in the more privileged "report" workflow)
- name: Upload check output as artifact
uses: actions/upload-artifact@v3
with:
name: levitate
path: levitate/

View File

@@ -1,12 +1,6 @@
# Only runs if anything under the packages/ directory changes.
# (Otherwise detect-breaking-changes-build-skip.yml takes over)
name: Levitate / Detect breaking changes
on:
pull_request:
paths:
- 'packages/**'
on: pull_request
jobs:
buildPR:
@@ -18,36 +12,34 @@ jobs:
steps:
- uses: actions/checkout@v3
with:
with:
path: './pr'
- uses: actions/setup-node@v3.5.1
- uses: actions/setup-node@v3
with:
node-version: 16.16.0
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT
run: echo "::set-output name=dir::$(yarn config get cacheFolder)"
- name: Restore yarn cache
uses: actions/cache@v3.0.11
uses: actions/cache@v2
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: yarn-cache-folder-${{ hashFiles('**/yarn.lock', '.yarnrc.yml') }}
restore-keys: |
yarn-cache-folder-
- name: Install dependencies
run: yarn install --immutable
- name: Build packages
run: yarn packages:build
- name: Pack packages
run: yarn packages:pack --out ./%s.tgz
- name: Zip built tarballed packages
run: zip -r ./pr_built_packages.zip ./packages/**/*.tgz
- name: Zip built packages
run: zip -r ./pr_built_packages.zip ./packages/**/dist
- name: Upload build output as artifact
uses: actions/upload-artifact@v3
@@ -64,38 +56,35 @@ jobs:
steps:
- uses: actions/checkout@v3
with:
with:
path: './base'
ref: ${{ github.event.pull_request.base.ref }}
- uses: actions/setup-node@v3.5.1
- uses: actions/setup-node@v3
with:
node-version: 16.16.0
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT
run: echo "::set-output name=dir::$(yarn config get cacheFolder)"
- name: Restore yarn cache
uses: actions/cache@v3.0.11
uses: actions/cache@v2
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: yarn-cache-folder-${{ hashFiles('**/yarn.lock', '.yarnrc.yml') }}
restore-keys: |
yarn-cache-folder-
- name: Install dependencies
run: yarn install --immutable
- name: Build packages
run: yarn packages:build
- name: Pack packages
run: yarn packages:pack --out ./%s.tgz
- name: Zip built tarballed packages
run: zip -r ./base_built_packages.zip ./packages/**/*.tgz
- name: Zip built packages
run: zip -r ./base_built_packages.zip ./packages/**/dist
- name: Upload build output as artifact
uses: actions/upload-artifact@v3
@@ -122,12 +111,12 @@ jobs:
uses: actions/download-artifact@v3
with:
name: buildBase
- name: Unzip artifact from pr
run: unzip -j pr_built_packages.zip -d ./pr && rm pr_built_packages.zip
run: unzip pr_built_packages.zip -d ./pr && rm pr_built_packages.zip
- name: Unzip artifact from base
run: unzip -j base_built_packages.zip -d ./base && rm base_built_packages.zip
run: unzip base_built_packages.zip -d ./base && rm base_built_packages.zip
- name: Get link for the Github Action job
id: job
@@ -139,7 +128,7 @@ jobs:
- name: Detect breaking changes
id: breaking-changes
run: ./scripts/check-breaking-changes.sh
run: ./scripts/check-breaking-changes.sh
env:
FORCE_COLOR: 3
GITHUB_JOB_LINK: ${{ steps.job.outputs.link }}
@@ -154,7 +143,7 @@ jobs:
with:
name: levitate
path: levitate/
- name: Exit
run: exit ${{ steps.breaking-changes.outputs.is_breaking }}
shell: bash

View File

@@ -10,13 +10,12 @@ jobs:
name: Report
runs-on: ubuntu-latest
env:
ARTIFACT_NAME: 'levitate' # The name of the artifact that we would like to download
ARTIFACT_FOLDER: '${{ github.workspace }}/tmp' # The name of the folder where we will download the artifact to
ARTIFACT_FOLDER: '${{ github.workspace }}/tmp'
ARTIFACT_NAME: 'levitate'
steps:
- uses: actions/checkout@v3
# Download artifact (as a .zip archive)
- name: 'Download artifact'
uses: actions/github-script@v6
env:
@@ -50,12 +49,9 @@ jobs:
fs.mkdirSync(artifactFolder, { recursive: true });
fs.writeFileSync(`${ artifactFolder }/${ artifactName }.zip`, Buffer.from(download.data));
# Unzip artifact
- name: Unzip artifact
run: unzip "${ARTIFACT_FOLDER}/${ARTIFACT_NAME}.zip" -d "${ARTIFACT_FOLDER}"
# Parse the artifact and register fields as step output variables
# (All fields in the JSON will be available as ${{ steps.levitate-run.outputs.<field-name> }}
- name: Parsing levitate result
uses: actions/github-script@v6
id: levitate-run
@@ -65,15 +61,8 @@ jobs:
const script = require('./.github/workflows/scripts/json-file-to-job-output.js');
await script({ core, filePath });
# Skip - print a message if the "Detect" workflow was skipped
- name: Check if the workflow should be skipped
if: steps.levitate-run.outputs.shouldSkip == 'true'
run: echo "Skipping."
# Check if label exists
- name: Check if "levitate breaking change" label exists
id: does-label-exist
if: steps.levitate-run.outputs.shouldSkip != 'true'
uses: actions/github-script@v6
env:
PR_NUMBER: ${{ github.event.workflow_run.pull_requests[0].number }}
@@ -89,9 +78,8 @@ jobs:
return doesExist ? 1 : 0;
# Comment on the PR
- name: Comment on PR
if: steps.levitate-run.outputs.exit_code == 1 && steps.levitate-run.outputs.shouldSkip != 'true'
if: ${{ steps.levitate-run.outputs.exit_code == 1 }}
uses: marocchino/sticky-pull-request-comment@v2
with:
number: ${{ steps.levitate-run.outputs.pr_number }}
@@ -105,9 +93,8 @@ jobs:
[Console output](${{ steps.levitate-run.outputs.job_link }})
[Read our guideline](https://github.com/grafana/grafana/blob/main/contribute/breaking-changes-guide.md)
# Remove comment from the PR (no more breaking changes)
- name: Remove comment from PR
if: steps.levitate-run.outputs.exit_code == 0 && steps.levitate-run.outputs.shouldSkip != 'true'
- name: Remove comment on PR
if: ${{ steps.levitate-run.outputs.exit_code == 0 }}
uses: marocchino/sticky-pull-request-comment@v2
with:
number: ${{ steps.levitate-run.outputs.pr_number }}
@@ -116,8 +103,8 @@ jobs:
# Posts a notification to Slack if a PR has a breaking change and it did not have a breaking change before
- name: Post to Slack
id: slack
if: steps.levitate-run.outputs.exit_code == 1 && steps.does-label-exist.outputs.result == 0 && steps.levitate-run.outputs.shouldSkip != 'true'
uses: slackapi/slack-github-action@v1.23.0
if: ${{ steps.levitate-run.outputs.exit_code == 1 && steps.does-label-exist.outputs.result == 0 }}
uses: slackapi/slack-github-action@v1.19.0
with:
payload: |
{
@@ -130,9 +117,8 @@ jobs:
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_LEVITATE_WEBHOOK_URL }}
# Add the label
- name: Add "levitate breaking change" label
if: steps.levitate-run.outputs.exit_code == 1 && steps.does-label-exist.outputs.result == 0 && steps.levitate-run.outputs.shouldSkip != 'true'
if: ${{ steps.levitate-run.outputs.exit_code == 1 && steps.does-label-exist.outputs.result == 0 }}
uses: actions/github-script@v6
env:
PR_NUMBER: ${{ steps.levitate-run.outputs.pr_number }}
@@ -146,9 +132,8 @@ jobs:
labels: ['levitate breaking change']
})
# Remove label (no more breaking changes)
- name: Remove "levitate breaking change" label
if: steps.levitate-run.outputs.exit_code == 0 && steps.does-label-exist.outputs.result == 1 && steps.levitate-run.outputs.shouldSkip != 'true'
if: ${{ steps.levitate-run.outputs.exit_code == 0 && steps.does-label-exist.outputs.result == 1 }}
uses: actions/github-script@v6
env:
PR_NUMBER: ${{ steps.levitate-run.outputs.pr_number }}
@@ -162,11 +147,10 @@ jobs:
name: 'levitate breaking change'
})
# Add reviewers
# This is very weird, the actual request goes through (comes back with a 201), but does not assign the team.
# Related issue: https://github.com/renovatebot/renovate/issues/1908
- name: Add "grafana/plugins-platform-frontend" as a reviewer
if: steps.levitate-run.outputs.exit_code && steps.levitate-run.outputs.shouldSkip != 'true'
if: ${{ steps.levitate-run.outputs.exit_code == 1 }}
uses: actions/github-script@v6
env:
PR_NUMBER: ${{ steps.levitate-run.outputs.pr_number }}
@@ -181,9 +165,8 @@ jobs:
team_reviewers: ['grafana/plugins-platform-frontend']
});
# Remove reviewers (no more breaking changes)
- name: Remove "grafana/plugins-platform-frontend" from the list of reviewers
if: steps.levitate-run.outputs.exit_code == 0 && steps.levitate-run.outputs.shouldSkip != 'true'
if: ${{ steps.levitate-run.outputs.exit_code == 0 }}
uses: actions/github-script@v6
env:
PR_NUMBER: ${{ steps.levitate-run.outputs.pr_number }}

View File

@@ -14,37 +14,23 @@ jobs:
- name: "Determine which team to notify"
run: |
# Default to null values.
BOARD="null"
CHANNEL="null"
echo "${{ github.event.label.name }} label added"
export CURRENT_LABEL="${{ github.event.label.name }}" # Enable the use of the label in yq evaluations
# yq is installed by default in ubuntu-latest
if [[ $(yq e 'keys | .[] | select(. == env(CURRENT_LABEL))' teams.yml ) ]]; then
# Check if we have a board set to use.
if [[ $(yq '.[env(CURRENT_LABEL)] | has("github-board")' teams.yml ) == true ]]; then
BOARD=$(yq '.[env(CURRENT_LABEL)].github-board' teams.yml)
echo "Ready to add issue to Grafana board ${BOARD}"
fi
# Check if we have a channel set to notify on comments.
if [[ $(yq '.[env(CURRENT_LABEL)] | has("channel-label")' teams.yml ) == true ]]; then
CHANNEL=$(yq '.[env(CURRENT_LABEL)].channel-label' teams.yml)
echo "Ready to send issue to channel ID ${CHANNEL}"
fi
fi
# set environment for next step
echo "BOARD=${BOARD}" >> $GITHUB_ENV
echo "CHANNEL=${CHANNEL}" >> $GITHUB_ENV
- name: "Add to GitHub board"
if: ${{ env.BOARD != 'null' }}
uses: leonsteinhaeuser/project-beta-automations@v1.3.0
with:
project_id: ${{ env.BOARD }}
organization: grafana
resource_node_id: ${{ github.event.issue.node_id }}
gh_token: ${{ secrets.GITHUB_TOKEN }}
# Debug logging
echo "Ready to send issue to channel ID ${CHANNEL}"
- name: "Prepare payload"
uses: frabert/replace-string-action@v2.0
@@ -57,8 +43,7 @@ jobs:
flags: 'g'
- name: "Send Slack notification"
if: ${{ env.CHANNEL != 'null' }}
uses: slackapi/slack-github-action@v1.23.0
uses: slackapi/slack-github-action@v1.14.0
with:
payload: >
{

View File

@@ -1,17 +0,0 @@
name: Observability Experience test code coverage
on:
pull_request:
paths:
- 'pkg/services/queryhistory/**'
- 'public/app/features/explore/**'
- 'public/app/features/correlations/**'
branches-ignore:
- dependabot/**
- backport-*
jobs:
workflow-call:
uses: grafana/code-coverage/.github/workflows/code-coverage.yml@v0.1.12
with:
frontend-path-regexp: public\/app\/features\/(explore|correlations)
backend-path-regexp: pkg\/services\/(queryhistory)

View File

@@ -1,7 +1,6 @@
name: "CodeQL for PR / go"
on:
workflow_dispatch:
pull_request:
branches: [main]
paths:
@@ -20,21 +19,11 @@ jobs:
# a pull request then we can checkout the head.
fetch-depth: 2
- name: Set go version
uses: actions/setup-go@v3
with:
go-version: '1.19.2'
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: "go"
- name: Build go files
run: |
go mod verify
make build-go
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2

View File

@@ -1,7 +1,6 @@
name: "CodeQL for PR / javascript"
on:
workflow_dispatch:
pull_request:
branches: [main]
paths:

View File

@@ -1,7 +1,6 @@
name: "CodeQL for PR / python"
on:
workflow_dispatch:
pull_request:
branches: [main]
paths:

23
.github/workflows/prepare-release.yml vendored Normal file
View File

@@ -0,0 +1,23 @@
name: Prepare release
on:
workflow_dispatch:
inputs:
version_input:
description: 'The version to be released please respect: major.minor.patch or major.minor.patch-beta<number> format. example: 7.4.3 or 7.4.3-beta1'
required: true
jobs:
call-bump-version:
uses: grafana/grafana/.github/workflows/bump-version.yml@main
with:
version_call: ${{ github.event.inputs.version_input }}
secrets:
token: ${{ secrets.GH_BOT_ACCESS_TOKEN }}
metricsWriteAPIKey: ${{ secrets.GRAFANA_MISC_STATS_API_KEY }}
call-update-changelog:
uses: grafana/grafana/.github/workflows/update-changelog.yml@main
with:
version_call: ${{ github.event.inputs.version_input }}
secrets:
token: ${{ secrets.GH_BOT_ACCESS_TOKEN }}
metricsWriteAPIKey: ${{ secrets.GRAFANA_MISC_STATS_API_KEY }}
needs: call-bump-version

View File

@@ -1,30 +0,0 @@
name: "publish-technical-documentation-next"
on:
push:
branches:
- "main"
paths:
- "docs/sources/**"
- "packages/grafana-*/**"
workflow_dispatch:
jobs:
sync:
runs-on: "ubuntu-latest"
steps:
- name: "Checkout Grafana repo"
uses: "actions/checkout@v3"
- name: "Clone website-sync Action"
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: "Publish to website repository (next)"
uses: "./.github/actions/website-sync"
id: "publish-next"
with:
repository: "grafana/website"
branch: "master"
host: "github.com"
github_pat: "${{ secrets.GH_BOT_ACCESS_TOKEN }}"
source_folder: "docs/sources"
target_folder: "content/docs/grafana/next"

View File

@@ -1,60 +0,0 @@
name: "publish-technical-documentation-release"
on:
push:
branches:
- v[0-9]+.[0-9]+.[0-9]+
tags:
- v[0-9]+.[0-9]+.[0-9]+
paths:
- "docs/sources/**"
- "packages/grafana-*/**"
workflow_dispatch:
jobs:
sync:
runs-on: "ubuntu-latest"
steps:
- name: "Checkout Grafana repo"
uses: "actions/checkout@v3"
with:
fetch-depth: 0
- name: "Checkout Actions library"
uses: "actions/checkout@v3"
with:
repository: "grafana/grafana-github-actions"
path: "./actions"
- name: "Install Actions from library"
run: "npm install --production --prefix ./actions"
- name: "Determine if there is a matching release tag"
id: "has-matching-release-tag"
uses: "./actions/has-matching-release-tag"
with:
ref_name: "${{ github.ref_name }}"
release_tag_regexp: "^v(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)$"
release_branch_regexp: "^v(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.x$"
- name: "Determine technical documentation version"
if: "steps.has-matching-release-tag.outputs.bool == 'true'"
uses: "./actions/docs-target"
id: "target"
with:
ref_name: "${{ github.ref_name }}"
- name: "Clone website-sync Action"
if: "steps.has-matching-release-tag.outputs.bool == 'true'"
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: "Publish to website repository (release)"
if: "steps.has-matching-release-tag.outputs.bool == 'true'"
uses: "./.github/actions/website-sync"
id: "publish-release"
with:
repository: "grafana/website"
branch: "master"
host: "github.com"
github_pat: "${{ secrets.GH_BOT_ACCESS_TOKEN }}"
source_folder: "docs/sources"
target_folder: "content/docs/grafana/${{ steps.target.outputs.target }}"

49
.github/workflows/publish.yml vendored Normal file
View File

@@ -0,0 +1,49 @@
name: publish_docs
on:
push:
branches:
- v9.1.x
paths:
- 'docs/sources/**'
- 'packages/grafana-*/**'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: git clone --single-branch --no-tags --depth 1 -b master https://grafanabot:${{ secrets.GH_BOT_ACCESS_TOKEN }}@github.com/grafana/website-sync ./.github/actions/website-sync
- name: generate-packages-docs
uses: actions/setup-node@v3.4.0
id: generate-docs
with:
node-version: '16'
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn config get cacheFolder)"
- uses: actions/cache@v2.1.7
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
yarn-
- run: yarn install --immutable
- run: ./scripts/ci-reference-docs-build.sh
- name: publish-to-git
uses: ./.github/actions/website-sync
id: publish
with:
repository: grafana/website
branch: master
host: github.com
github_pat: '${{ secrets.GH_BOT_ACCESS_TOKEN }}'
source_folder: docs/sources
target_folder: content/docs/grafana/latest
allow_no_changes: 'true'
- shell: bash
run: |
test -n "${{ steps.publish.outputs.commit_hash }}"
test -n "${{ steps.publish.outputs.working_directory }}"

View File

@@ -1,20 +0,0 @@
name: syft-sbom-ci
on:
release:
types: [created]
jobs:
syft-sbom:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Anchore SBOM Action
uses: anchore/sbom-action@v0.12.0
with:
artifact-name: ${{ github.event.repository.name }}-spdx.json

View File

@@ -7,7 +7,7 @@ jobs:
stale:
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v6
- uses: actions/stale@v5
with:
repo-token: ${{ secrets.GH_BOT_ACCESS_TOKEN }}
# Number of days of inactivity before a stale Issue or Pull Request is closed.

View File

@@ -4,7 +4,18 @@ on:
inputs:
version:
required: true
description: 'Needs to match, exactly, the name of a milestone. The version to be released please respect: major.minor.patch or major.minor.patch-beta<number> format. example: 7.4.3 or 7.4.3-beta1'
description: Needs to match, exactly, the name of a milestone
workflow_call:
inputs:
version_call:
description: Needs to match, exactly, the name of a milestone
required: true
type: string
secrets:
token:
required: true
metricsWriteAPIKey:
required: true
jobs:
main:
runs-on: ubuntu-latest
@@ -17,8 +28,16 @@ jobs:
ref: main
- name: Install Actions
run: npm install --production --prefix ./actions
- name: Run update changelog (manually invoked)
- name: Run update changelog (manually invoked)
if: ${{ github.event.inputs.version != '' }}
uses: ./actions/update-changelog
with:
token: ${{ secrets.GH_BOT_ACCESS_TOKEN }}
metricsWriteAPIKey: ${{ secrets.GRAFANA_MISC_STATS_API_KEY }}
- name: Run update changelog (workflow invoked)
if: ${{ inputs.version_call != '' }}
uses: ./actions/update-changelog
with:
version_call: ${{ inputs.version_call }}
token: ${{ secrets.token }}
metricsWriteAPIKey: ${{ secrets.metricsWriteAPIKey }}

24
.gitignore vendored
View File

@@ -40,8 +40,6 @@ tsconfig.tsbuildinfo
# Enterprise devenv
/devenv/docker/blocks/grafana-enterprise
/devenv/docker/blocks/saml-enterprise
# This is the new place of the block, but I leave the previous here for a while
/devenv/docker/blocks/auth/saml-enterprise
/tmp
tools/phantomjs/phantomjs
@@ -61,7 +59,6 @@ public/css/*.min.css
*.sublime-workspace
*.swp
.idea/
.fleet/
*.iml
*.tmp
.DS_Store
@@ -76,9 +73,7 @@ public/css/*.min.css
# devenv
/devenv/docker-compose.yaml
/devenv/docker-compose.override.yaml
/devenv/.env
/devenv/docker/blocks/tempo/tempo-data/
conf/custom.ini
/conf/provisioning/**/custom.yaml
@@ -123,21 +118,12 @@ pkg/cmd/grafana-server/__debug_bin
/scripts/build/release_publisher/release_publisher
*.patch
!.yarn/patches/*.patch
# Ignoring frontend packages specifics
/packages/grafana-ui/.yarn/.cache
/packages/**/dist
/packages/**/compiled
/packages/**/.rpt2_cache
/packages/**/tsdoc-metadata.json
/packages/**/package.tgz
/packages/grafana-toolkit/sass
## CI places the packages in a different location
/npm-artifacts/*.tgz
# Ignore frontend build manifest
manifest.json
# Ignore go local build dependencies
/scripts/go/bin/**
@@ -170,13 +156,15 @@ compilation-stats.json
# auto generated frontend docs
/docs/sources/packages_api
# wire generated files
**/wire_gen.go
# auto generated Go files
*_gen.go
!pkg/services/featuremgmt/toggles_gen.go
!pkg/coremodel/**/*_gen.go
!pkg/framework/**/*_gen.go
# Auto-generated internationalization files
public/locales/_build/
public/locales/*/*.js
public/locales/*/grafana_old.json
public/locales/**/*.js
deployment_tools_config.json

View File

@@ -1,145 +0,0 @@
[run]
timeout = "10m"
[linters-settings.goconst]
min-len = 5
min-occurrences = 5
[linters-settings.exhaustive]
default-signifies-exhaustive = true
[linters-settings.revive]
ignore-generated-header = false
severity = "warning"
confidence = 3
[linters-settings.depguard]
list-type = "blacklist"
include-go-root = true
packages = ["io/ioutil"]
[[linters-settings.depguard.packages-with-error-message]]
"io/ioutil" = "Deprecated: As of Go 1.16, the same functionality is now provided by package io or package os, and those implementations should be preferred in new code. See the specific function documentation for details."
[linters-settings.gocritic]
enabled-checks = ["ruleguard"]
[linters-settings.gocritic.settings.ruleguard]
rules = "pkg/ruleguard.rules.go"
[linters]
disable-all = true
enable = [
"bodyclose",
"depguard",
"dogsled",
"errcheck",
# "gochecknoinits",
"goconst",
# "gocritic", # Temporarily disabled on 2022-09-09, running into weird bug "ruleguard: execution error: used Run() with an empty rule set; forgot to call Load() first?"
"goimports",
"goprintffuncname",
"gosec",
"gosimple",
"govet",
"ineffassign",
"misspell",
"nakedret",
"rowserrcheck",
"exportloopref",
"staticcheck",
"stylecheck",
"typecheck",
"unconvert",
"unused",
"whitespace",
"gocyclo",
"exhaustive",
"typecheck",
"asciicheck",
"errorlint",
"sqlclosecheck",
"revive",
]
# Disabled linters (might want them later)
# "unparam"
[issues]
exclude-use-default = false
# Enable when appropriate
# Poorly chosen identifier
[[issues.exclude-rules]]
linters = ["stylecheck"]
text = "ST1003"
# Enable when appropriate
# Dot imports that aren't in external test packages are discouraged.
[[issues.exclude-rules]]
linters = ["stylecheck"]
text = "ST1001"
# Enable when appropriate
# strings.Title has been deprecated since Go 1.18 and an alternative has been available since Go 1.0: The rule Title uses for word boundaries does not handle Unicode punctuation properly.
# Use golang.org/x/text/cases instead.
[[issues.exclude-rules]]
linters = ["staticcheck"]
text = "SA1019"
[[issues.exclude-rules]]
linters = ["gosec"]
text = "G108"
[[issues.exclude-rules]]
linters = ["gosec"]
text = "G110"
[[issues.exclude-rules]]
linters = ["gosec"]
text = "G201"
[[issues.exclude-rules]]
linters = ["gosec"]
text = "G202"
[[issues.exclude-rules]]
linters = ["gosec"]
text = "G306"
[[issues.exclude-rules]]
linters = ["gosec"]
text = "401"
[[issues.exclude-rules]]
linters = ["gosec"]
text = "402"
[[issues.exclude-rules]]
linters = ["gosec"]
text = "501"
[[issues.exclude-rules]]
linters = ["gosec"]
text = "404"
[[issues.exclude-rules]]
linters = ["misspell"]
text = "Unknwon` is a misspelling of `Unknown"
[[issues.exclude-rules]]
linters = ["errorlint"]
text = "non-wrapping format verb for fmt.Errorf"
# TODO: Enable
[[issues.exclude-rules]]
linters = ["stylecheck"]
text = "ST1000"
# TODO: Enable
[[issues.exclude-rules]]
linters = ["stylecheck"]
text = "ST1020"
# TODO: Enable
[[issues.exclude-rules]]
linters = ["stylecheck"]
text = "ST1021"

View File

@@ -1,48 +1,3 @@
var dashboardSettings = [
{
url: '${HOST}/d/O6f11TZWk/panel-tests-bar-gauge?orgId=1&editview=settings',
wait: 500,
rootElement: '.main-view',
threshold: 0,
},
{
url: '${HOST}/d/O6f11TZWk/panel-tests-bar-gauge?orgId=1&editview=annotations',
wait: 500,
rootElement: '.main-view',
threshold: 0,
},
{
url: '${HOST}/d/O6f11TZWk/panel-tests-bar-gauge?orgId=1&editview=templating',
wait: 500,
rootElement: '.main-view',
threshold: 0,
},
{
url: '${HOST}/d/O6f11TZWk/panel-tests-bar-gauge?orgId=1&editview=links',
wait: 500,
rootElement: '.main-view',
threshold: 0,
},
{
url: '${HOST}/d/O6f11TZWk/panel-tests-bar-gauge?orgId=1&editview=versions',
wait: 500,
rootElement: '.main-view',
threshold: 0,
},
{
url: '${HOST}/d/O6f11TZWk/panel-tests-bar-gauge?orgId=1&editview=permissions',
wait: 500,
rootElement: '.main-view',
threshold: 9,
},
{
url: '${HOST}/d/O6f11TZWk/panel-tests-bar-gauge?orgId=1&editview=dashboard_json',
wait: 500,
rootElement: '.main-view',
threshold: 2,
},
];
var config = {
defaults: {
concurrency: 1,
@@ -62,7 +17,7 @@ var config = {
url: '${HOST}/login',
wait: 500,
rootElement: '.main-view',
threshold: 13,
threshold: 12,
},
{
url: '${HOST}/login',
@@ -74,7 +29,7 @@ var config = {
"click element button[aria-label='Login button']",
"wait for element [aria-label='Skip change password button'] to be visible",
],
threshold: 14,
threshold: 13,
rootElement: '.main-view',
},
{
@@ -88,7 +43,12 @@ var config = {
rootElement: '.main-view',
threshold: 0,
},
...dashboardSettings,
{
url: '${HOST}/d/O6f11TZWk/panel-tests-bar-gauge?orgId=1&editview=settings',
wait: 500,
rootElement: '.main-view',
threshold: 0,
},
{
url: '${HOST}/?orgId=1&search=open',
wait: 500,
@@ -101,49 +61,49 @@ var config = {
rootElement: '.main-view',
// the unified alerting promotion alert's content contrast is too low
// see https://github.com/grafana/grafana/pull/41829
threshold: 6,
threshold: 4,
},
{
url: '${HOST}/datasources',
wait: 500,
rootElement: '.main-view',
threshold: 1,
threshold: 0,
},
{
url: '${HOST}/org/users',
wait: 500,
rootElement: '.main-view',
threshold: 1,
threshold: 0,
},
{
url: '${HOST}/org/teams',
wait: 500,
rootElement: '.main-view',
threshold: 1,
threshold: 0,
},
{
url: '${HOST}/plugins',
wait: 500,
rootElement: '.main-view',
threshold: 1,
threshold: 0,
},
{
url: '${HOST}/org',
wait: 500,
rootElement: '.main-view',
threshold: 1,
threshold: 0,
},
{
url: '${HOST}/org/apikeys',
wait: 500,
rootElement: '.main-view',
threshold: 4,
threshold: 3,
},
{
url: '${HOST}/dashboards',
wait: 500,
rootElement: '.main-view',
threshold: 1,
threshold: 0,
},
],
};

View File

@@ -1,40 +1,3 @@
var dashboardSettings = [
{
url: '${HOST}/d/O6f11TZWk/panel-tests-bar-gauge?orgId=1&editview=settings',
wait: 500,
rootElement: '.main-view',
},
{
url: '${HOST}/d/O6f11TZWk/panel-tests-bar-gauge?orgId=1&editview=annotations',
wait: 500,
rootElement: '.main-view',
},
{
url: '${HOST}/d/O6f11TZWk/panel-tests-bar-gauge?orgId=1&editview=templating',
wait: 500,
rootElement: '.main-view',
},
{
url: '${HOST}/d/O6f11TZWk/panel-tests-bar-gauge?orgId=1&editview=links',
wait: 500,
rootElement: '.main-view',
},
{
url: '${HOST}/d/O6f11TZWk/panel-tests-bar-gauge?orgId=1&editview=versions',
wait: 500,
rootElement: '.main-view',
},
{
url: '${HOST}/d/O6f11TZWk/panel-tests-bar-gauge?orgId=1&editview=permissions',
wait: 500,
rootElement: '.main-view',
},
{
url: '${HOST}/d/O6f11TZWk/panel-tests-bar-gauge?orgId=1&editview=dashboard_json',
wait: 500,
rootElement: '.main-view',
},
];
var config = {
defaults: {
concurrency: 1,
@@ -76,7 +39,11 @@ var config = {
wait: 500,
rootElement: '.main-view',
},
...dashboardSettings,
{
url: '${HOST}/d/O6f11TZWk/panel-tests-bar-gauge?orgId=1&editview=settings',
wait: 500,
rootElement: '.main-view',
},
{
url: '${HOST}/?orgId=1&search=open',
wait: 500,

View File

@@ -25,8 +25,3 @@ public/locales/**/*.js
# Auto-generated theme files
theme.light.generated.json
theme.dark.generated.json
# Generated Swagger API specs
public/api-spec.json
public/api-merged.json
public/openapi3.json

7
.vscode/launch.json vendored
View File

@@ -11,13 +11,6 @@
"cwd": "${workspaceFolder}",
"args": ["--homepath", "${workspaceFolder}", "--packaging", "dev"]
},
{
"name": "Attach to Chrome",
"port": 9222,
"request": "attach",
"type": "chrome",
"webRoot": "${workspaceFolder}"
},
{
"name": "Debug Jest test",
"type": "node",

File diff suppressed because one or more lines are too long

783
.yarn/releases/yarn-3.2.2.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,13 +1,13 @@
#!/usr/bin/env node
const {existsSync} = require(`fs`);
const {createRequire} = require(`module`);
const {createRequire, createRequireFromPath} = require(`module`);
const {resolve} = require(`path`);
const relPnpApiPath = "../../../../.pnp.cjs";
const absPnpApiPath = resolve(__dirname, relPnpApiPath);
const absRequire = createRequire(absPnpApiPath);
const absRequire = (createRequire || createRequireFromPath)(absPnpApiPath);
if (existsSync(absPnpApiPath)) {
if (!process.versions.pnp) {

View File

@@ -1,13 +1,13 @@
#!/usr/bin/env node
const {existsSync} = require(`fs`);
const {createRequire} = require(`module`);
const {createRequire, createRequireFromPath} = require(`module`);
const {resolve} = require(`path`);
const relPnpApiPath = "../../../../.pnp.cjs";
const absPnpApiPath = resolve(__dirname, relPnpApiPath);
const absRequire = createRequire(absPnpApiPath);
const absRequire = (createRequire || createRequireFromPath)(absPnpApiPath);
if (existsSync(absPnpApiPath)) {
if (!process.versions.pnp) {

View File

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

View File

@@ -1,13 +1,13 @@
#!/usr/bin/env node
const {existsSync} = require(`fs`);
const {createRequire} = require(`module`);
const {createRequire, createRequireFromPath} = require(`module`);
const {resolve} = require(`path`);
const relPnpApiPath = "../../../.pnp.cjs";
const absPnpApiPath = resolve(__dirname, relPnpApiPath);
const absRequire = createRequire(absPnpApiPath);
const absRequire = (createRequire || createRequireFromPath)(absPnpApiPath);
if (existsSync(absPnpApiPath)) {
if (!process.versions.pnp) {

View File

@@ -1,13 +1,13 @@
#!/usr/bin/env node
const {existsSync} = require(`fs`);
const {createRequire} = require(`module`);
const {createRequire, createRequireFromPath} = require(`module`);
const {resolve} = require(`path`);
const relPnpApiPath = "../../../../.pnp.cjs";
const absPnpApiPath = resolve(__dirname, relPnpApiPath);
const absRequire = createRequire(absPnpApiPath);
const absRequire = (createRequire || createRequireFromPath)(absPnpApiPath);
if (existsSync(absPnpApiPath)) {
if (!process.versions.pnp) {

View File

@@ -1,13 +1,13 @@
#!/usr/bin/env node
const {existsSync} = require(`fs`);
const {createRequire} = require(`module`);
const {createRequire, createRequireFromPath} = require(`module`);
const {resolve} = require(`path`);
const relPnpApiPath = "../../../../.pnp.cjs";
const absPnpApiPath = resolve(__dirname, relPnpApiPath);
const absRequire = createRequire(absPnpApiPath);
const absRequire = (createRequire || createRequireFromPath)(absPnpApiPath);
if (existsSync(absPnpApiPath)) {
if (!process.versions.pnp) {

View File

@@ -1,13 +1,13 @@
#!/usr/bin/env node
const {existsSync} = require(`fs`);
const {createRequire} = require(`module`);
const {createRequire, createRequireFromPath} = require(`module`);
const {resolve} = require(`path`);
const relPnpApiPath = "../../../../.pnp.cjs";
const absPnpApiPath = resolve(__dirname, relPnpApiPath);
const absRequire = createRequire(absPnpApiPath);
const absRequire = (createRequire || createRequireFromPath)(absPnpApiPath);
if (existsSync(absPnpApiPath)) {
if (!process.versions.pnp) {

View File

@@ -1,13 +1,13 @@
#!/usr/bin/env node
const {existsSync} = require(`fs`);
const {createRequire} = require(`module`);
const {createRequire, createRequireFromPath} = require(`module`);
const {resolve} = require(`path`);
const relPnpApiPath = "../../../../.pnp.cjs";
const absPnpApiPath = resolve(__dirname, relPnpApiPath);
const absRequire = createRequire(absPnpApiPath);
const absRequire = (createRequire || createRequireFromPath)(absPnpApiPath);
const moduleWrapper = tsserver => {
if (!process.versions.pnp) {

View File

@@ -1,13 +1,13 @@
#!/usr/bin/env node
const {existsSync} = require(`fs`);
const {createRequire} = require(`module`);
const {createRequire, createRequireFromPath} = require(`module`);
const {resolve} = require(`path`);
const relPnpApiPath = "../../../../.pnp.cjs";
const absPnpApiPath = resolve(__dirname, relPnpApiPath);
const absRequire = createRequire(absPnpApiPath);
const absRequire = (createRequire || createRequireFromPath)(absPnpApiPath);
const moduleWrapper = tsserver => {
if (!process.versions.pnp) {

View File

@@ -1,13 +1,13 @@
#!/usr/bin/env node
const {existsSync} = require(`fs`);
const {createRequire} = require(`module`);
const {createRequire, createRequireFromPath} = require(`module`);
const {resolve} = require(`path`);
const relPnpApiPath = "../../../../.pnp.cjs";
const absPnpApiPath = resolve(__dirname, relPnpApiPath);
const absRequire = createRequire(absPnpApiPath);
const absRequire = (createRequire || createRequireFromPath)(absPnpApiPath);
if (existsSync(absPnpApiPath)) {
if (!process.versions.pnp) {

View File

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

View File

@@ -3,39 +3,41 @@ enableTelemetry: false
nodeLinker: pnp
packageExtensions:
'@storybook/addon-docs@6.5.12':
"@grafana/slate-react@0.22.10-grafana":
peerDependencies:
'@babel/core': ^7.0.0
'@storybook/manager-webpack5': 6.5.12
'webpack': 5.74.0
'@storybook/addon-essentials@6.5.12':
slate-react: ">=0.22.0"
"@mdx-js/loader@1.6.22":
peerDependencies:
'@storybook/components': 6.5.12
'@storybook/core-events': 6.5.12
'@storybook/manager-webpack5': 6.5.12
'@storybook/theming': 6.5.12
'@storybook/core-server@6.5.12':
react: 17.0.1
"@storybook/addon-docs@6.4.21":
peerDependencies:
'@babel/core': ^7.0.0
'@storybook/core@6.5.12':
"@storybook/manager-webpack5": 6.4.21
"@storybook/addon-essentials@6.4.21":
peerDependencies:
'@babel/core': ^7.0.0
'@storybook/manager-webpack5': 6.5.12
'@storybook/csf-tools@6.5.12':
"@storybook/components": 6.4.21
"@storybook/core-events": 6.4.21
"@storybook/manager-webpack5": 6.4.21
"@storybook/theming": 6.4.21
"@storybook/core-server@6.4.21":
peerDependencies:
'@babel/core': ^7.0.0
'@storybook/mdx2-csf@0.0.3':
dependencies:
'@babel/types': ^7.14.8
'@storybook/react@6.5.12':
"@babel/core": ^7.0.0
"@storybook/core@6.4.21":
peerDependencies:
'@storybook/manager-webpack5': 6.5.12
'@storybook/addon-knobs@6.4.0':
dependencies:
'@storybook/client-api': '*'
"@babel/core": ^7.0.0
"@storybook/manager-webpack5": 6.4.21
"@storybook/csf-tools@6.4.21":
peerDependencies:
"@babel/core": ^7.0.0
"@storybook/react@6.4.21":
peerDependencies:
"@storybook/manager-webpack5": 6.4.21
doctrine@3.0.0:
dependencies:
assert: 2.0.0
moveable@0.30.0:
dependencies:
"@daybrush/utils": 1.7.0
framework-utils: ^1.1.0
rc-time-picker@3.7.3:
peerDependencies:
react: 17.0.1
@@ -47,19 +49,36 @@ packageExtensions:
react-compat-css-styled@1.0.8:
dependencies:
react-simple-compat: 1.2.2
react-compat-moveable@0.18.0:
dependencies:
"@egjs/agent": ^2.2.1
"@egjs/children-differ": ^1.0.1
"@scena/matrix": 1.1.1
css-to-mat: ^1.0.3
gesto: ^1.9.0
overlap-area: ^1.0.0
react-simple-compat: 1.2.2
peerDependencies:
framework-utils: ^1.1.0
react-docgen-typescript-loader@3.7.2:
peerDependencies:
webpack: 4.41.5
react-icons@2.2.7:
peerDependencies:
prop-types: '*'
prop-types: "*"
react-resizable@3.0.4:
peerDependencies:
react-dom: 17.0.1
"@npmcli/run-script@4.1.3":
dependencies:
which: ^2.0.2
plugins:
- path: .yarn/plugins/@yarnpkg/plugin-typescript.cjs
spec: '@yarnpkg/plugin-typescript'
spec: "@yarnpkg/plugin-typescript"
- path: .yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs
spec: '@yarnpkg/plugin-interactive-tools'
spec: "@yarnpkg/plugin-interactive-tools"
- path: .yarn/plugins/@yarnpkg/plugin-outdated.cjs
spec: 'https://mskelton.dev/yarn-outdated/v2'
spec: "https://mskelton.dev/yarn-outdated/v2"
yarnPath: .yarn/releases/yarn-3.2.4.cjs
yarnPath: .yarn/releases/yarn-3.2.2.cjs

View File

@@ -1,764 +1,3 @@
<!-- 9.3.0 START -->
# 9.3.0 (2022-11-30)
### Features and enhancements
- **Alerting:** Enable interpolation for notification policies in file provisioning. [#58956](https://github.com/grafana/grafana/pull/58956), [@JohnnyQQQQ](https://github.com/JohnnyQQQQ)
- **Azure Monitor Logs:** Avoid warning when the response is empty. [#59211](https://github.com/grafana/grafana/pull/59211), [@andresmgot](https://github.com/andresmgot)
- **Azure Monitor:** Add support to customized routes. [#54829](https://github.com/grafana/grafana/pull/54829), [@ms-hujia](https://github.com/ms-hujia)
- **Canvas:** Add icon value mapping. [#59013](https://github.com/grafana/grafana/pull/59013), [@nmarrs](https://github.com/nmarrs)
- **CloudWatch:** Cross-account querying support. [#59362](https://github.com/grafana/grafana/pull/59362), [@sunker](https://github.com/sunker)
- **Docs:** Update `merge-pull-request.md` regarding backport policies. [#59239](https://github.com/grafana/grafana/pull/59239), [@dsotirakis](https://github.com/dsotirakis)
- **GaugePanel:** Setting the neutral-point of a gauge. [#53989](https://github.com/grafana/grafana/pull/53989), [@sfranzis](https://github.com/sfranzis)
- **Geomap:** Improve location editor. [#58017](https://github.com/grafana/grafana/pull/58017), [@drew08t](https://github.com/drew08t)
- **Internationalization:** Enable internationalization by default. [#59204](https://github.com/grafana/grafana/pull/59204), [@joshhunt](https://github.com/joshhunt)
- **Logs:** Add `Download logs` button to log log-browser. [#55163](https://github.com/grafana/grafana/pull/55163), [@svennergr](https://github.com/svennergr)
- **Loki:** Add `gzip` compression to resource calls. [#59059](https://github.com/grafana/grafana/pull/59059), [@svennergr](https://github.com/svennergr)
- **Loki:** Add improvements to loki label browser. [#59387](https://github.com/grafana/grafana/pull/59387), [@gwdawson](https://github.com/gwdawson)
- **Loki:** Make label browser accessible in query builder. [#58525](https://github.com/grafana/grafana/pull/58525), [@gwdawson](https://github.com/gwdawson)
- **Loki:** Remove raw query toggle. [#59125](https://github.com/grafana/grafana/pull/59125), [@gwdawson](https://github.com/gwdawson)
- **Middleware:** Add CSP Report Only support. [#58074](https://github.com/grafana/grafana/pull/58074), [@jcalisto](https://github.com/jcalisto)
- **Navigation:** Prevent viewer role accessing dashboard creation, import and folder creation. [#58842](https://github.com/grafana/grafana/pull/58842), [@lpskdl](https://github.com/lpskdl)
- **OAuth:** Refactor OAuth parameters handling to support obtaining refresh tokens for Google OAuth. [#58782](https://github.com/grafana/grafana/pull/58782), [@mgyongyosi](https://github.com/mgyongyosi)
- **Oauth:** Display friendly error message when role_attribute_strict=true and no valid role found. [#57818](https://github.com/grafana/grafana/pull/57818), [@kalleep](https://github.com/kalleep)
- **Preferences:** Add confirmation modal when saving org preferences. [#59119](https://github.com/grafana/grafana/pull/59119), [@JoaoSilvaGrafana](https://github.com/JoaoSilvaGrafana)
- **PublicDashboards:** Orphaned public dashboard deletion script added. [#57917](https://github.com/grafana/grafana/pull/57917), [@juanicabanas](https://github.com/juanicabanas)
- **Query Editor:** Hide overflow for long query names. [#58840](https://github.com/grafana/grafana/pull/58840), [@zuchka](https://github.com/zuchka)
- **Reports:** Configurable timezone. (Enterprise)
- **Solo Panel:** Configurable timezone. [#59153](https://github.com/grafana/grafana/pull/59153), [@spinillos](https://github.com/spinillos)
- **TablePanel:** Add support for Count calculation per column or per entire dataset. [#58134](https://github.com/grafana/grafana/pull/58134), [@mdvictor](https://github.com/mdvictor)
- **Tempo:** Send the correct start time when making a TraceQL query. [#59128](https://github.com/grafana/grafana/pull/59128), [@CrypticSignal](https://github.com/CrypticSignal)
- **Various Panels:** Remove beta label from Bar Chart, Candlestick, Histogram, State Timeline, & Status History Panels. [#58557](https://github.com/grafana/grafana/pull/58557), [@codeincarnate](https://github.com/codeincarnate)
### Bug fixes
- **Access Control:** Clear user's permission cache after resource creation. [#59307](https://github.com/grafana/grafana/pull/59307), [@grafanabot](https://github.com/grafanabot)
- **Access Control:** Clear user's permission cache after resource creation. [#59101](https://github.com/grafana/grafana/pull/59101), [@IevaVasiljeva](https://github.com/IevaVasiljeva)
- **Accessibility:** Improve keyboard accessibility in `AnnoListPanel`. [#58971](https://github.com/grafana/grafana/pull/58971), [@ashharrison90](https://github.com/ashharrison90)
- **Accessibility:** Improve keyboard accessibility in `Collapse`. [#59022](https://github.com/grafana/grafana/pull/59022), [@ashharrison90](https://github.com/ashharrison90)
- **Accessibility:** Improve keyboard accessibility in `GettingStarted` panel. [#58966](https://github.com/grafana/grafana/pull/58966), [@ashharrison90](https://github.com/ashharrison90)
- **Accessibility:** Improve keyboard accessibility of `FilterPill`. [#58976](https://github.com/grafana/grafana/pull/58976), [@ashharrison90](https://github.com/ashharrison90)
- **Admin:** Fix broken links to image assets in email templates. [#58729](https://github.com/grafana/grafana/pull/58729), [@zuchka](https://github.com/zuchka)
- **Azure Monitor:** Fix namespace selection for storageaccounts. [#56449](https://github.com/grafana/grafana/pull/56449), [@andresmgot](https://github.com/andresmgot)
- **Calcs:** Fix difference percent in legend. [#59243](https://github.com/grafana/grafana/pull/59243), [@zoltanbedi](https://github.com/zoltanbedi)
- **DataLinks:** Improve Data-Links AutoComplete Logic. [#58934](https://github.com/grafana/grafana/pull/58934), [@zuchka](https://github.com/zuchka)
- **Explore:** Fix a11y issue with logs navigation buttons. [#58944](https://github.com/grafana/grafana/pull/58944), [@Elfo404](https://github.com/Elfo404)
- **Heatmap:** Fix blurry text & rendering. [#59260](https://github.com/grafana/grafana/pull/59260), [@leeoniya](https://github.com/leeoniya)
- **Heatmap:** Fix tooltip y range of top and bottom buckets in calculated heatmaps. [#59172](https://github.com/grafana/grafana/pull/59172), [@leeoniya](https://github.com/leeoniya)
- **Logs:** Fix misalignment of LogRows. [#59279](https://github.com/grafana/grafana/pull/59279), [@svennergr](https://github.com/svennergr)
- **Navigation:** Stop clearing search state when opening a result in a new tab. [#58880](https://github.com/grafana/grafana/pull/58880), [@ashharrison90](https://github.com/ashharrison90)
- **OptionsUI:** SliderValueEditor does not get auto focused on slider change. [#59209](https://github.com/grafana/grafana/pull/59209), [@eledobleefe](https://github.com/eledobleefe)
- **PanelEdit:** Fixes bug with not remembering panel options pane collapse/expand state. [#59265](https://github.com/grafana/grafana/pull/59265), [@torkelo](https://github.com/torkelo)
- **Query Caching:** Skip 207 status codes. (Enterprise)
- **Quota:** Fix failure in store due to missing scope parameters. [#58874](https://github.com/grafana/grafana/pull/58874), [@papagian](https://github.com/papagian)
- **Quota:** Fix failure when checking session limits. [#58865](https://github.com/grafana/grafana/pull/58865), [@papagian](https://github.com/papagian)
- **Reports:** Fix time preview. (Enterprise)
- **StateTimeline:** Prevent label text from overflowing state rects. [#59169](https://github.com/grafana/grafana/pull/59169), [@leeoniya](https://github.com/leeoniya)
- **Tempo:** Fix search table duration unit. [#58642](https://github.com/grafana/grafana/pull/58642), [@joey-grafana](https://github.com/joey-grafana)
- **TraceView:** Fix broken rendering when scrolling in Dashboard panel in Firefox. [#56642](https://github.com/grafana/grafana/pull/56642), [@zdg-github](https://github.com/zdg-github)
### Plugin development fixes & changes
- **GrafanaUI:** Add disabled option for menu items. [#58980](https://github.com/grafana/grafana/pull/58980), [@going-confetti](https://github.com/going-confetti)
<!-- 9.3.0 END -->
<!-- 9.3.0-beta1 START -->
# 9.3.0-beta1 (2022-11-15)
### Features and enhancements
- **Alerting:** Add Alertmanager choice warning. [#55311](https://github.com/grafana/grafana/pull/55311), [@konrad147](https://github.com/konrad147)
- **Alerting:** Add support for linking external images securely - Azure Blob (#1). [#56598](https://github.com/grafana/grafana/pull/56598), [@petr-stupka](https://github.com/petr-stupka)
- **Alerting:** Add threshold expression. [#55102](https://github.com/grafana/grafana/pull/55102), [@gillesdemey](https://github.com/gillesdemey)
- **Alerting:** Add traceability headers for alert queries. [#57127](https://github.com/grafana/grafana/pull/57127), [@alexweav](https://github.com/alexweav)
- **Alerting:** Allow none provenance alert rule creation from provisioning API. [#58410](https://github.com/grafana/grafana/pull/58410), [@alexmobo](https://github.com/alexmobo)
- **Alerting:** Cache result of dashboard ID lookups. [#56587](https://github.com/grafana/grafana/pull/56587), [@alexweav](https://github.com/alexweav)
- **Alerting:** Expressions pipeline redesign. [#54601](https://github.com/grafana/grafana/pull/54601), [@gillesdemey](https://github.com/gillesdemey)
- **Alerting:** Fall back to "range" query type for unified alerting when "both" is specified. [#57288](https://github.com/grafana/grafana/pull/57288), [@gillesdemey](https://github.com/gillesdemey)
- **Alerting:** Implement the Webex notifier. [#58480](https://github.com/grafana/grafana/pull/58480), [@gotjosh](https://github.com/gotjosh)
- **Alerting:** Improve group modal with validation on evaluation interval. [#57830](https://github.com/grafana/grafana/pull/57830), [@soniaAguilarPeiron](https://github.com/soniaAguilarPeiron)
- **Alerting:** Persist annotations from multidimensional rules in batches. [#56575](https://github.com/grafana/grafana/pull/56575), [@alexweav](https://github.com/alexweav)
- **Alerting:** Query time logging. [#57585](https://github.com/grafana/grafana/pull/57585), [@konrad147](https://github.com/konrad147)
- **Alerting:** Remove the alert manager selection from the data source configuration. [#57369](https://github.com/grafana/grafana/pull/57369), [@VikaCep](https://github.com/VikaCep)
- **Alerting:** Remove the alert manager selection from the data source configuration. [#56460](https://github.com/grafana/grafana/pull/56460), [@gitstart](https://github.com/gitstart)
- **Alerting:** Support values in notification templates. [#56457](https://github.com/grafana/grafana/pull/56457), [@grobinson-grafana](https://github.com/grobinson-grafana)
- **Alerting:** Templated URLs for webhook type contact points. [#57296](https://github.com/grafana/grafana/pull/57296), [@santihernandezc](https://github.com/santihernandezc)
- **Annotations:** Disable "Add annotation" button when annotations are disabled. [#57481](https://github.com/grafana/grafana/pull/57481), [@ryantxu](https://github.com/ryantxu)
- **Auth:** Add validation and ingestion of conflict file. [#53014](https://github.com/grafana/grafana/pull/53014), [@eleijonmarck](https://github.com/eleijonmarck)
- **Auth:** Make built-in login configurable. [#46978](https://github.com/grafana/grafana/pull/46978), [@TsotosA](https://github.com/TsotosA)
- **Auth:** Refresh OAuth access_token automatically using the refresh_token. [#56076](https://github.com/grafana/grafana/pull/56076), [@mgyongyosi](https://github.com/mgyongyosi)
- **Auth:** Validate Azure ID token version on login is not v1. [#58088](https://github.com/grafana/grafana/pull/58088), [@Jguer](https://github.com/Jguer)
- **BackendSrv:** Make it possible to pass `options` to `.get|post|patch...` methods. [#51316](https://github.com/grafana/grafana/pull/51316), [@leventebalogh](https://github.com/leventebalogh)
- **Canvas:** Add tabs to inline editor. [#57778](https://github.com/grafana/grafana/pull/57778), [@adela-almasan](https://github.com/adela-almasan)
- **Canvas:** Extend root context menu. [#58097](https://github.com/grafana/grafana/pull/58097), [@adela-almasan](https://github.com/adela-almasan)
- **Chore:** Switch Grafana to using faro libraries. [#58186](https://github.com/grafana/grafana/pull/58186), [@tolzhabayev](https://github.com/tolzhabayev)
- **Chore:** Use strings.ReplaceAll and preallocate containers. [#58483](https://github.com/grafana/grafana/pull/58483), [@sashamelentyev](https://github.com/sashamelentyev)
- **CloudWatch:** Cache resource request responses in the browser. [#57082](https://github.com/grafana/grafana/pull/57082), [@sunker](https://github.com/sunker)
- **Config:** Change jwt config value to be "expect_claims". [#58284](https://github.com/grafana/grafana/pull/58284), [@conorevans](https://github.com/conorevans)
- **Configuration:** Update ssl_mode documentation in sample.ini to match default.ini. [#55138](https://github.com/grafana/grafana/pull/55138), [@alecxvs](https://github.com/alecxvs)
- **Correlations:** Add query editor and target field to settings page. [#55567](https://github.com/grafana/grafana/pull/55567), [@Elfo404](https://github.com/Elfo404)
- **Dashboard:** Record the number of cached queries for usage insights. [#56050](https://github.com/grafana/grafana/pull/56050), [@juanicabanas](https://github.com/juanicabanas)
- **Dashboard:** Record the number of cached queries for usage insights. (Enterprise)
- **Datasources:** Support mixed datasources in a single query. [#56832](https://github.com/grafana/grafana/pull/56832), [@mmandrus](https://github.com/mmandrus)
- **Docs:** Add documentation for Custom Branding on Public Dashboards. [#58090](https://github.com/grafana/grafana/pull/58090), [@leandro-deveikis](https://github.com/leandro-deveikis)
- **Docs:** Add missing documentation for enterprise features. [#56753](https://github.com/grafana/grafana/pull/56753), [@mmandrus](https://github.com/mmandrus)
- **Docs:** Clarify that audit logs are generated only for API requests. [#57521](https://github.com/grafana/grafana/pull/57521), [@spinillos](https://github.com/spinillos)
- **Echo:** Add config option to prevent duplicate page views for GA4. [#57619](https://github.com/grafana/grafana/pull/57619), [@tolzhabayev](https://github.com/tolzhabayev)
- **Elasticsearch:** Add trace to logs functionality. [#58063](https://github.com/grafana/grafana/pull/58063), [@ivanahuckova](https://github.com/ivanahuckova)
- **Elasticsearch:** Reuse http client in the backend. [#55172](https://github.com/grafana/grafana/pull/55172), [@gabor](https://github.com/gabor)
- **Explore:** Add tracesToMetrics span time shift options (#54710). [#55335](https://github.com/grafana/grafana/pull/55335), [@hanjm](https://github.com/hanjm)
- **Explore:** Logs volume histogram: always start Y axis from zero. [#56200](https://github.com/grafana/grafana/pull/56200), [@gabor](https://github.com/gabor)
- **Explore:** Remove explore2Dashboard feature toggle. [#58329](https://github.com/grafana/grafana/pull/58329), [@Elfo404](https://github.com/Elfo404)
- **Explore:** Support fields interpolation in logs panel. [#58426](https://github.com/grafana/grafana/pull/58426), [@ifrost](https://github.com/ifrost)
- **Frontend Routing:** Always render standalone plugin pages using the `<AppRootPage>`. [#57771](https://github.com/grafana/grafana/pull/57771), [@leventebalogh](https://github.com/leventebalogh)
- **GRPC Server:** Add gRPC server service. [#47849](https://github.com/grafana/grafana/pull/47849), [@FZambia](https://github.com/FZambia)
- **Geomap:** Add photo layer. [#57307](https://github.com/grafana/grafana/pull/57307), [@drew08t](https://github.com/drew08t)
- **Geomap:** Upgrade to openlayers 7.x. [#57317](https://github.com/grafana/grafana/pull/57317), [@ryantxu](https://github.com/ryantxu)
- **GrafanaData:** Deprecate logs functions. [#56077](https://github.com/grafana/grafana/pull/56077), [@gabor](https://github.com/gabor)
- **GrafanaData:** Deprecate the LogsParser type. [#56242](https://github.com/grafana/grafana/pull/56242), [@gabor](https://github.com/gabor)
- **Kindsys:** Introduce Kind framework. [#56492](https://github.com/grafana/grafana/pull/56492), [@sdboyer](https://github.com/sdboyer)
- **LDAP:** Add `skip_org_role_sync` configuration option. [#56792](https://github.com/grafana/grafana/pull/56792), [@grafanabot](https://github.com/grafanabot)
- **LDAP:** Add `skip_org_role_sync` configuration option. [#56679](https://github.com/grafana/grafana/pull/56679), [@gamab](https://github.com/gamab)
- **LDAPSync:** Improve performance of sync and make it case insensitive. (Enterprise)
- **LibraryPanels:** Load library panels in the frontend rather than the backend. [#50560](https://github.com/grafana/grafana/pull/50560), [@ryantxu](https://github.com/ryantxu)
- **LogContext:** Add header and close button to modal. [#56283](https://github.com/grafana/grafana/pull/56283), [@svennergr](https://github.com/svennergr)
- **LogContext:** Improve text describing the loglines. [#55475](https://github.com/grafana/grafana/pull/55475), [@svennergr](https://github.com/svennergr)
- **Logs:** Allow collapsing the logs volume histogram. [#52808](https://github.com/grafana/grafana/pull/52808), [@gabor](https://github.com/gabor)
- **Logs:** Center `show context` modal on click. [#55989](https://github.com/grafana/grafana/pull/55989), [@svennergr](https://github.com/svennergr)
- **Logs:** Center `show context` modal on click. [#55405](https://github.com/grafana/grafana/pull/55405), [@svennergr](https://github.com/svennergr)
- **Logs:** Show LogRowMenu also for long logs and wrap-lines turned off. [#56030](https://github.com/grafana/grafana/pull/56030), [@svennergr](https://github.com/svennergr)
- **LogsContext:** Added button to load 10 more log lines. [#55923](https://github.com/grafana/grafana/pull/55923), [@svennergr](https://github.com/svennergr)
- **Loki:** Add case insensitive line contains operation. [#58177](https://github.com/grafana/grafana/pull/58177), [@gwdawson](https://github.com/gwdawson)
- **Loki:** Monaco Query Editor enabled by default. [#58080](https://github.com/grafana/grafana/pull/58080), [@matyax](https://github.com/matyax)
- **Loki:** Redesign and improve query patterns. [#55097](https://github.com/grafana/grafana/pull/55097), [@ivanahuckova](https://github.com/ivanahuckova)
- **Loki:** Rename log browser to label browser. [#58416](https://github.com/grafana/grafana/pull/58416), [@gwdawson](https://github.com/gwdawson)
- **Loki:** Show invalid fields in label filter. [#55751](https://github.com/grafana/grafana/pull/55751), [@ivanahuckova](https://github.com/ivanahuckova)
- **MSSQL:** Add connection timeout setting in configuration page. [#58631](https://github.com/grafana/grafana/pull/58631), [@mdvictor](https://github.com/mdvictor)
- **Navigation:** Add `pluginId` to standalone plugin page NavLinks. [#57769](https://github.com/grafana/grafana/pull/57769), [@leventebalogh](https://github.com/leventebalogh)
- **Navigation:** Expose new props to extend `Page`/`PluginPage`. [#58465](https://github.com/grafana/grafana/pull/58465), [@ashharrison90](https://github.com/ashharrison90)
- **Navtree:** Make it possible to configure standalone plugin pages. [#56393](https://github.com/grafana/grafana/pull/56393), [@leventebalogh](https://github.com/leventebalogh)
- **Node Graph:** Always show context menu. [#56876](https://github.com/grafana/grafana/pull/56876), [@joey-grafana](https://github.com/joey-grafana)
- **Number formatting:** Strip trailing zeros after decimal point when decimals=auto. [#57373](https://github.com/grafana/grafana/pull/57373), [@leeoniya](https://github.com/leeoniya)
- **OAuth:** Feature toggle for access token expiration check and docs. [#58179](https://github.com/grafana/grafana/pull/58179), [@mgyongyosi](https://github.com/mgyongyosi)
- **Opentsdb:** Allow template variables for filter keys. [#57226](https://github.com/grafana/grafana/pull/57226), [@bohandley](https://github.com/bohandley)
- **PanelEdit:** Allow test id to be passed to panel editors. [#55417](https://github.com/grafana/grafana/pull/55417), [@mckn](https://github.com/mckn)
- **Plugins:** Add hook to make it easier to track interactions in plugins. [#56126](https://github.com/grafana/grafana/pull/56126), [@mckn](https://github.com/mckn)
- **Plugins:** Introduce new Flame graph panel. [#56376](https://github.com/grafana/grafana/pull/56376), [@joey-grafana](https://github.com/joey-grafana)
- **Plugins:** Make "README" the default markdown request param. [#58264](https://github.com/grafana/grafana/pull/58264), [@wbrowne](https://github.com/wbrowne)
- **PostgreSQL:** Migrate to React. [#52831](https://github.com/grafana/grafana/pull/52831), [@zoltanbedi](https://github.com/zoltanbedi)
- **Preferences:** Create indices. [#48356](https://github.com/grafana/grafana/pull/48356), [@sakjur](https://github.com/sakjur)
- **Profiling:** Add Phlare and Parca datasources. [#57809](https://github.com/grafana/grafana/pull/57809), [@aocenas](https://github.com/aocenas)
- **Prometheus:** Handle errors and warnings in buffered client. [#58504](https://github.com/grafana/grafana/pull/58504), [@itsmylife](https://github.com/itsmylife)
- **Prometheus:** Make Prometheus streaming parser as default client. [#58365](https://github.com/grafana/grafana/pull/58365), [@itsmylife](https://github.com/itsmylife)
- **Public Dashboards:** Add audit table. [#54508](https://github.com/grafana/grafana/pull/54508), [@jalevin](https://github.com/jalevin)
- **PublicDashboards:** Add PubDash support to Angular panel plugins. [#57293](https://github.com/grafana/grafana/pull/57293), [@mmandrus](https://github.com/mmandrus)
- **PublicDashboards:** Add annotations support. [#56413](https://github.com/grafana/grafana/pull/56413), [@owensmallwood](https://github.com/owensmallwood)
- **PublicDashboards:** Add custom branding for Public Dashboard. (Enterprise)
- **PublicDashboards:** Add delete public dashboard button in public dashboard modal. [#58095](https://github.com/grafana/grafana/pull/58095), [@juanicabanas](https://github.com/juanicabanas)
- **PublicDashboards:** Cached queries column added in public dashboard insight query. (Enterprise)
- **PublicDashboards:** Can toggle annotations in modal. [#57312](https://github.com/grafana/grafana/pull/57312), [@owensmallwood](https://github.com/owensmallwood)
- **PublicDashboards:** Delete public dashboard in public dashboard table. [#57766](https://github.com/grafana/grafana/pull/57766), [@juanicabanas](https://github.com/juanicabanas)
- **PublicDashboards:** Delete public dashboard when dashboard is deleted. [#57291](https://github.com/grafana/grafana/pull/57291), [@juanicabanas](https://github.com/juanicabanas)
- **PublicDashboards:** Extract config of Public Dashboard. [#57788](https://github.com/grafana/grafana/pull/57788), [@leandro-deveikis](https://github.com/leandro-deveikis)
- **PublicDashboards:** Hide top navigation bar. [#56873](https://github.com/grafana/grafana/pull/56873), [@evictorero](https://github.com/evictorero)
- **PublicDashboards:** Make mixed datasource calls concurrently. [#56421](https://github.com/grafana/grafana/pull/56421), [@juanicabanas](https://github.com/juanicabanas)
- **PublicDashboards:** Orphaned public dashboard item list modified. [#58014](https://github.com/grafana/grafana/pull/58014), [@juanicabanas](https://github.com/juanicabanas)
- **PublicDashboards:** Rename PubdashFooter frontend component. [#58137](https://github.com/grafana/grafana/pull/58137), [@leandro-deveikis](https://github.com/leandro-deveikis)
- **PublicDashboards:** Update docs with supported datasources. [#57629](https://github.com/grafana/grafana/pull/57629), [@owensmallwood](https://github.com/owensmallwood)
- **PublicDashboards:** Validate access token. [#57298](https://github.com/grafana/grafana/pull/57298), [@leandro-deveikis](https://github.com/leandro-deveikis)
- **PublicDashboards:** Validate access token not to be duplicated and add retries. [#56755](https://github.com/grafana/grafana/pull/56755), [@juanicabanas](https://github.com/juanicabanas)
- **RBAC:** Improve performance of dashboard filter query. [#56813](https://github.com/grafana/grafana/pull/56813), [@kalleep](https://github.com/kalleep)
- **Rendering:** Add configuration options for `renderKey` lifetime. [#57339](https://github.com/grafana/grafana/pull/57339), [@Willena](https://github.com/Willena)
- **Reports:** Dynamic scale factor per report. (Enterprise)
- **SAML:** Set cookie option SameSite=none and Secure=true. (Enterprise)
- **SQLStore:** Optionally retry queries if sqlite returns database is locked. [#56096](https://github.com/grafana/grafana/pull/56096), [@papagian](https://github.com/papagian)
- **Server:** Make unix socket permission configurable. [#52944](https://github.com/grafana/grafana/pull/52944), [@unknowndevQwQ](https://github.com/unknowndevQwQ)
- **Tempo:** Add start time and end time parameters while querying traces. [#48068](https://github.com/grafana/grafana/pull/48068), [@bikashmishra100](https://github.com/bikashmishra100)
- **TimeSeries:** Render null-bounded points at data edges. [#57798](https://github.com/grafana/grafana/pull/57798), [@leeoniya](https://github.com/leeoniya)
- **Tracing:** Allow trace to logs for OpenSearch. [#58161](https://github.com/grafana/grafana/pull/58161), [@gabor](https://github.com/gabor)
- **Transformers:** PartitionByValues. [#56767](https://github.com/grafana/grafana/pull/56767), [@leeoniya](https://github.com/leeoniya)
- **UsageStats:** Add traces when sending usage stats. [#55474](https://github.com/grafana/grafana/pull/55474), [@sakjur](https://github.com/sakjur)
### Bug fixes
- **Alerting:** Fix mathexp.NoData in ConditionsCmd. [#56812](https://github.com/grafana/grafana/pull/56812), [@grobinson-grafana](https://github.com/grobinson-grafana)
- **BarChart:** Fix coloring from thresholds and value mappings. [#58285](https://github.com/grafana/grafana/pull/58285), [@leeoniya](https://github.com/leeoniya)
- **BarChart:** Fix stacked hover. [#57711](https://github.com/grafana/grafana/pull/57711), [@leeoniya](https://github.com/leeoniya)
- **Explore:** Fix shared crosshair for logs, logsvolume and graph panels. [#57892](https://github.com/grafana/grafana/pull/57892), [@Elfo404](https://github.com/Elfo404)
- **Flame Graph:** Exact search. [#56769](https://github.com/grafana/grafana/pull/56769), [@joey-grafana](https://github.com/joey-grafana)
- **Flame Graph:** Fix for dashboard scrolling. [#56555](https://github.com/grafana/grafana/pull/56555), [@joey-grafana](https://github.com/joey-grafana)
- **LogContext:** Fix scroll behavior in context modal. [#56070](https://github.com/grafana/grafana/pull/56070), [@svennergr](https://github.com/svennergr)
- **Loki:** Fix showing of history of querying in query editor. [#57344](https://github.com/grafana/grafana/pull/57344), [@ivanahuckova](https://github.com/ivanahuckova)
- **OAuth:** Fix misleading warn log related to oauth and increase logged content. [#57336](https://github.com/grafana/grafana/pull/57336), [@Jguer](https://github.com/Jguer)
- **Plugins:** Plugin details page visual alignment issues. [#57729](https://github.com/grafana/grafana/issues/57729)
- **PublicDashboards:** Fix GET public dashboard that doesn't match. [#57571](https://github.com/grafana/grafana/pull/57571), [@juanicabanas](https://github.com/juanicabanas)
- **PublicDashboards:** Fix annotations error for public dashboards. [#57455](https://github.com/grafana/grafana/pull/57455), [@leandro-deveikis](https://github.com/leandro-deveikis)
- **PublicDashboards:** Fix granularity discrepancy between public and original dashboard. [#57129](https://github.com/grafana/grafana/pull/57129), [@guicaulada](https://github.com/guicaulada)
- **PublicDashboards:** Fix granularity issue caused by query caching. (Enterprise)
- **PublicDashboards:** Fix hidden queries execution. (Enterprise)
- **RBAC:** Add primary key to seed_assignment table. [#56540](https://github.com/grafana/grafana/pull/56540), [@kalleep](https://github.com/kalleep)
- **Tempo:** Fix search removing service name from query. [#58630](https://github.com/grafana/grafana/pull/58630), [@joey-grafana](https://github.com/joey-grafana)
- **TimeRangeInput:** Fix clear button type. [#56545](https://github.com/grafana/grafana/pull/56545), [@Clarity-89](https://github.com/Clarity-89)
### Breaking changes
Removes the unused close-milestone command from `@grafana/toolkit`. Issue [#57062](https://github.com/grafana/grafana/issues/57062)
@grafana/toolkit `cherrypick` command was removed. Issue [#56114](https://github.com/grafana/grafana/issues/56114)
`EmotionPerfTest` is no longer exported from the `@grafana/ui` bundle. Issue [#56100](https://github.com/grafana/grafana/issues/56100)
Removing the unused `changelog` command in `@grafana/toolkit`. Issue [#56073](https://github.com/grafana/grafana/issues/56073)
### Deprecations
The interface type `LogsParser` in `grafana-data` is deprecated. Issue [#56242](https://github.com/grafana/grafana/issues/56242)
The following functions and classes related to logs are deprecated in the `grafana-ui` package: `getLogLevel`, `getLogLevelFromKey`, `addLogLevelToSeries`, `LogsParsers`, `calculateFieldStats`, `calculateLogsLabelStats`, `calculateStats`, `getParser`, `sortInAscendingOrder`, `sortInDescendingOrder`, `sortLogsResult`, `sortLogRows`, `checkLogsError`, `escapeUnescapedString`. Issue [#56077](https://github.com/grafana/grafana/issues/56077)
### Plugin development fixes & changes
- **Toolkit:** Deprecate `plugin:update-circleci` command. [#57743](https://github.com/grafana/grafana/pull/57743), [@academo](https://github.com/academo)
- **Toolkit:** Deprecate `plugin:github-publish` command. [#57726](https://github.com/grafana/grafana/pull/57726), [@academo](https://github.com/academo)
- **Toolkit:** Deprecate `plugin:bundle-managed` command and move its functionality to a bash script. [#57719](https://github.com/grafana/grafana/pull/57719), [@academo](https://github.com/academo)
- **Toolkit:** Deprecate and replace toolkit:build with plain yarn scripts. [#57620](https://github.com/grafana/grafana/pull/57620), [@academo](https://github.com/academo)
- **Toolkit:** Deprecate node-version-check command. [#57591](https://github.com/grafana/grafana/pull/57591), [@academo](https://github.com/academo)
- **Toolkit:** Deprecate searchTestData command. [#57589](https://github.com/grafana/grafana/pull/57589), [@academo](https://github.com/academo)
- **Toolkit:** Remove unused close-milestone command. [#57062](https://github.com/grafana/grafana/pull/57062), [@academo](https://github.com/academo)
- **Toolkit:** Remove unused legacy cherrypick command. [#56114](https://github.com/grafana/grafana/pull/56114), [@academo](https://github.com/academo)
- **Grafana UI:** Clean up bundle. [#56100](https://github.com/grafana/grafana/pull/56100), [@jackw](https://github.com/jackw)
- **Toolkit:** Deprecate `component:create` command. [#56086](https://github.com/grafana/grafana/pull/56086), [@academo](https://github.com/academo)
- **Toolkit:** Remove changelog command. [#56073](https://github.com/grafana/grafana/pull/56073), [@gitstart](https://github.com/gitstart)
<!-- 9.3.0-beta1 END -->
<!-- 9.2.4 START -->
# 9.2.4 (2022-11-07)
### Features and enhancements
- **Access Control:** Add an endpoint for setting several managed resource permissions. [#57893](https://github.com/grafana/grafana/pull/57893), [@IevaVasiljeva](https://github.com/IevaVasiljeva)
- **Accessibility:** Increase `Select` placeholder contrast to be WCAG AA compliant. [#58034](https://github.com/grafana/grafana/pull/58034), [@ashharrison90](https://github.com/ashharrison90)
- **Alerting:** Append org ID to alert notification URLs. [#57123](https://github.com/grafana/grafana/pull/57123), [@neel1996](https://github.com/neel1996)
- **Alerting:** Make the Grouped view the default one for Rules. [#58271](https://github.com/grafana/grafana/pull/58271), [@VikaCep](https://github.com/VikaCep)
- **Build:** Remove unnecessary alpine package updates. [#58005](https://github.com/grafana/grafana/pull/58005), [@DanCech](https://github.com/DanCech)
- **Chore:** Upgrade Go to 1.19.3. [#58052](https://github.com/grafana/grafana/pull/58052), [@sakjur](https://github.com/sakjur)
- **Google Cloud Monitoring:** Set frame interval to draw null values. [#57768](https://github.com/grafana/grafana/pull/57768), [@andresmgot](https://github.com/andresmgot)
- **Instrumentation:** Expose when the binary was built as a gauge. [#57951](https://github.com/grafana/grafana/pull/57951), [@bergquist](https://github.com/bergquist)
- **Loki:** Preserve `X-ID-Token` header. [#57878](https://github.com/grafana/grafana/pull/57878), [@siiimooon](https://github.com/siiimooon)
- **Search:** Reduce requests in folder view. [#55876](https://github.com/grafana/grafana/pull/55876), [@mvsousa](https://github.com/mvsousa)
- **TimeSeries:** More thorough detection of negative values for auto-stacking direction. [#57863](https://github.com/grafana/grafana/pull/57863), [@leeoniya](https://github.com/leeoniya)
### Bug fixes
- **Alerting:** Attempt to preserve UID from migrated legacy channel. [#57639](https://github.com/grafana/grafana/pull/57639), [@alexweav](https://github.com/alexweav)
- **Alerting:** Fix response is not returned for invalid Duration in Provisioning API. [#58046](https://github.com/grafana/grafana/pull/58046), [@grobinson-grafana](https://github.com/grobinson-grafana)
- **Alerting:** Fix screenshot is not taken for stale series. [#57982](https://github.com/grafana/grafana/pull/57982), [@grobinson-grafana](https://github.com/grobinson-grafana)
- **Auth:** Fix admins not seeing pending invites. [#58217](https://github.com/grafana/grafana/pull/58217), [@joshhunt](https://github.com/joshhunt)
- **MSSQL/Postgres:** Fix visual query editor filter disappearing. [#58248](https://github.com/grafana/grafana/pull/58248), [@zoltanbedi](https://github.com/zoltanbedi)
- **Tempo:** Fix dropdown issue on tag field focus. [#57616](https://github.com/grafana/grafana/pull/57616), [@xiyu95](https://github.com/xiyu95)
- **Timeseries:** Fix null pointer when matching fill below to field. [#58030](https://github.com/grafana/grafana/pull/58030), [@mdvictor](https://github.com/mdvictor)
### Plugin development fixes & changes
- **Toolkit:** Fix Webpack less-loader config. [#57950](https://github.com/grafana/grafana/pull/57950), [@dessen-xu](https://github.com/dessen-xu)
<!-- 9.2.4 END -->
<!-- 9.2.3 START -->
# 9.2.3 (2022-10-31)
### Features and enhancements
- **Docs:** Add information about DB version support to upgrade guide. [#57643](https://github.com/grafana/grafana/pull/57643), [@joeblubaugh](https://github.com/joeblubaugh)
- **Footer:** Update footer release notes link to Github changelog. [#57871](https://github.com/grafana/grafana/pull/57871), [@joshhunt](https://github.com/joshhunt)
- **Prometheus:** Do not drop errors in streaming parser. [#57698](https://github.com/grafana/grafana/pull/57698), [@kylebrandt](https://github.com/kylebrandt)
- **Prometheus:** Flavor/version configuration. [#57554](https://github.com/grafana/grafana/pull/57554), [@gtk-grafana](https://github.com/gtk-grafana)
- **Prometheus:** Provide label values match parameter API when supported prometheus instance is configured. [#57553](https://github.com/grafana/grafana/pull/57553), [@gtk-grafana](https://github.com/gtk-grafana)
- **Security:** Upgrade x/text to version unaffected by CVE-2022-32149. [#57797](https://github.com/grafana/grafana/pull/57797), [@yong-jie-gong](https://github.com/yong-jie-gong)
### Bug fixes
- **Access control:** Fix a bug with argument order for data source managed permission updates. (Enterprise)
- **Auth:** Fix GF_AUTH_JWT_URL_LOGIN env variable doesn't work. [#57689](https://github.com/grafana/grafana/pull/57689), [@Jguer](https://github.com/Jguer)
- **Live:** Explicitly reply with http 200. [#57428](https://github.com/grafana/grafana/pull/57428), [@sh0rez](https://github.com/sh0rez)
- **Prometheus:** Fix builder operation mode changing multiselect to single select behaviour. [#57780](https://github.com/grafana/grafana/pull/57780), [@itsmylife](https://github.com/itsmylife)
- **Prometheus:** Fix builder operation mode changing multiselect to single select behaviour. [#57493](https://github.com/grafana/grafana/pull/57493), [@yinjialu](https://github.com/yinjialu)
- **Security:** Fix vulnerabilities in webpack loader-utils. [#57533](https://github.com/grafana/grafana/pull/57533), [@jackw](https://github.com/jackw)
<!-- 9.2.3 END -->
<!-- 9.2.2 START -->
# 9.2.2 (2022-10-25)
### Features and enhancements
- **Alerting:** Add support for wecom apiapp. [#55991](https://github.com/grafana/grafana/pull/55991), [@aimuz](https://github.com/aimuz)
- **Canvas:** Improve resource picker initialization. [#57319](https://github.com/grafana/grafana/pull/57319), [@nmarrs](https://github.com/nmarrs)
- **Canvas:** Improve text element readability. [#57371](https://github.com/grafana/grafana/pull/57371), [@adela-almasan](https://github.com/adela-almasan)
- **CloudWatch:** Make sure adoption tracking is done on valid, migrated queries. [#56872](https://github.com/grafana/grafana/pull/56872), [@sunker](https://github.com/sunker)
- **Dashboard:** Alerts user to incorrect tag format for JSON import. [#54657](https://github.com/grafana/grafana/pull/54657), [@iamelDuderino](https://github.com/iamelDuderino)
- **MSSQL:** Support tables from all schemas. [#53099](https://github.com/grafana/grafana/pull/53099), [@zoltanbedi](https://github.com/zoltanbedi)
- **Opentsdb:** Allow template variables for filter keys. [#57226](https://github.com/grafana/grafana/pull/57226), [@bohandley](https://github.com/bohandley)
- **Prometheus:** Provide label values match parameter API when supported prometheus instance is configured. [#56510](https://github.com/grafana/grafana/pull/56510), [@gtk-grafana](https://github.com/gtk-grafana)
- **QueryEditor:** Revert components from grafana-ui. [#57436](https://github.com/grafana/grafana/pull/57436), [@zoltanbedi](https://github.com/zoltanbedi)
- **TeamSync:** Allow team sync when external organization mapping returns no organization role. (Enterprise)
### Bug fixes
- **Browse:** Fix General folder not showing in FolderPicker. [#57156](https://github.com/grafana/grafana/pull/57156), [@eledobleefe](https://github.com/eledobleefe)
- **Elasticsearch:** Fix calculation of trimEdges in alert mode. [#56148](https://github.com/grafana/grafana/pull/56148), [@jorgelbg](https://github.com/jorgelbg)
- **Elasticsearch:** Fix trimEdges delete logic in alert mode. [#56985](https://github.com/grafana/grafana/pull/56985), [@gabor](https://github.com/gabor)
- **GoogleOAuth:** Unlock User Admin UI. [#57350](https://github.com/grafana/grafana/pull/57350), [@gamab](https://github.com/gamab)
- **LogContext:** Fix wrong color of `show context` icon in light theme. [#57427](https://github.com/grafana/grafana/pull/57427), [@svennergr](https://github.com/svennergr)
- **Loki:** Fix adding of adhoc filters to stream selector when query with empty stream selector. [#57280](https://github.com/grafana/grafana/pull/57280), [@ivanahuckova](https://github.com/ivanahuckova)
- **Loki:** Fix double stringified log-lines when copied via Copy button. [#57243](https://github.com/grafana/grafana/pull/57243), [@svennergr](https://github.com/svennergr)
- **Loki:** Fix explain section about $\_\_interval variable. [#57188](https://github.com/grafana/grafana/pull/57188), [@ivanahuckova](https://github.com/ivanahuckova)
- **Loki:** Remove already selected options from next label filter options in builder. [#57187](https://github.com/grafana/grafana/pull/57187), [@ivanahuckova](https://github.com/ivanahuckova)
- **NodeGraph:** Fix rendering issues when values of arc are over 1. [#57460](https://github.com/grafana/grafana/pull/57460), [@aocenas](https://github.com/aocenas)
- **PublicDashboards:** Fix hidden queries execution. [#57194](https://github.com/grafana/grafana/pull/57194), [@juanicabanas](https://github.com/juanicabanas)
- **PublicDashboards:** Fix hidden queries execution. [#57004](https://github.com/grafana/grafana/pull/57004), [@juanicabanas](https://github.com/juanicabanas)
- **Tempo:** Fix Node Graph visualization type in dashboard. [#56931](https://github.com/grafana/grafana/pull/56931), [@CrypticSignal](https://github.com/CrypticSignal)
- **TimeSeries:** Fix stacking when first value is negative zero. [#57257](https://github.com/grafana/grafana/pull/57257), [@zoltanbedi](https://github.com/zoltanbedi)
- **TimeseriesPanel:** Fix variables in data links. [#56729](https://github.com/grafana/grafana/pull/56729), [@mdvictor](https://github.com/mdvictor)
- **User:** Fix externalUserId not being populated. [#57341](https://github.com/grafana/grafana/pull/57341), [@joshhunt](https://github.com/joshhunt)
### Breaking changes
We added some components a bit too early to @grafana/ui in 9.2 so we are moving them back to @grafana/experimental. If you used any of these components
- AccessoryButton
- EditorFieldGroup
- EditorHeader
- EditorField
- EditorRow
- EditorList
- EditorRows
- EditorSwitch
- FlexItem
- Stack
- InlineSelect
- InputGroup
- Space
Please use them from grafana/experimental from now on. Issue [#57436](https://github.com/grafana/grafana/issues/57436)
<!-- 9.2.2 END -->
<!-- 9.2.1 START -->
# 9.2.1 (2022-10-18)
### Features and enhancements
- **Alerting:** Improve notification policies created during migration. [#52071](https://github.com/grafana/grafana/pull/52071), [@JacobsonMT](https://github.com/JacobsonMT)
- **AzureAD:** Add option to force fetch the groups from the Graph API. [#56916](https://github.com/grafana/grafana/pull/56916), [@gamab](https://github.com/gamab)
- **AzureAD:** Add option to force fetch the groups from the Graph API (#56916). [#56947](https://github.com/grafana/grafana/pull/56947), [@gamab](https://github.com/gamab)
- **Docs:** Note end of release notes publication. [#57013](https://github.com/grafana/grafana/pull/57013), [@gguillotte-grafana](https://github.com/gguillotte-grafana)
- **Inspect:** Handle JSON tab crash when the provided object is too big to stringify. [#55939](https://github.com/grafana/grafana/pull/55939), [@TsotosA](https://github.com/TsotosA)
- **TablePanel:** Footer now updates values on column filtering. [#56354](https://github.com/grafana/grafana/pull/56354), [@mdvictor](https://github.com/mdvictor)
### Bug fixes
- **Alerting:** Fix email image embedding on Windows. [#56766](https://github.com/grafana/grafana/pull/56766), [@joeblubaugh](https://github.com/joeblubaugh)
- **Alerting:** Fix mathexp.NoData for ConditionsCmd. [#56816](https://github.com/grafana/grafana/pull/56816), [@grobinson-grafana](https://github.com/grobinson-grafana)
- **Legacy Alerting:** Fix duration calculation when testing a rule. [#56616](https://github.com/grafana/grafana/pull/56616), [@jorgelbg](https://github.com/jorgelbg)
- **Loki:** Propagate additional headers from Grafana to Loki when querying data. [#56896](https://github.com/grafana/grafana/pull/56896), [@alexweav](https://github.com/alexweav)
- **Search:** Sort alphabetically in the folder view, increase the limit of the folder search from 50 to 1000. [#57141](https://github.com/grafana/grafana/pull/57141), [@ArturWierzbicki](https://github.com/ArturWierzbicki)
- **TablePanel:** Fix last table column to be centered. [#56047](https://github.com/grafana/grafana/pull/56047), [@gitstart](https://github.com/gitstart)
### Plugin development fixes & changes
- **Grafana UI:** Export prop types for queryfield, modal and field components. [#57097](https://github.com/grafana/grafana/pull/57097), [@jackw](https://github.com/jackw)
- **Toolkit:** Fix `Cannot use import statement outside...` error in tests. [#57071](https://github.com/grafana/grafana/pull/57071), [@jackw](https://github.com/jackw)
<!-- 9.2.1 END -->
<!-- 9.2.0 START -->
# 9.2.0 (2022-10-11)
### Features and enhancements
- **Alerting:** Add Notification error feedback on contact points view. [#56225](https://github.com/grafana/grafana/pull/56225), [@soniaAguilarPeiron](https://github.com/soniaAguilarPeiron)
- **Alerting:** Allow created by to be manually set when there's no creator for silences. [#55952](https://github.com/grafana/grafana/pull/55952), [@gotjosh](https://github.com/gotjosh)
- **Alerting:** Expose info about notification delivery errors in a new /receivers endpoint. [#55429](https://github.com/grafana/grafana/pull/55429), [@santihernandezc](https://github.com/santihernandezc)
- **Alerting:** Update imported prometheus alertmanager version. [#56228](https://github.com/grafana/grafana/pull/56228), [@joeblubaugh](https://github.com/joeblubaugh)
- **Alerting:** Update imported prometheus alertmanager version. Backport (#56228). [#56430](https://github.com/grafana/grafana/pull/56430), [@joeblubaugh](https://github.com/joeblubaugh)
- **Alerting:** Write and Delete multiple alert instances. [#55350](https://github.com/grafana/grafana/pull/55350), [@joeblubaugh](https://github.com/joeblubaugh)
- **Core:** Implement aria attributes for query rows, improve a11y. [#55563](https://github.com/grafana/grafana/pull/55563), [@L-M-K-B](https://github.com/L-M-K-B)
- **Custom Branding:** Remove custom branding service. (Enterprise)
- **Custom branding:** Remove UI. (Enterprise)
- **DevEnv:** Adds docker block for clickhouse. [#55702](https://github.com/grafana/grafana/pull/55702), [@owensmallwood](https://github.com/owensmallwood)
- **Docker:** removes unneccesary use of edge repo. [#54567](https://github.com/grafana/grafana/pull/54567), [@xlson](https://github.com/xlson)
- **Explore:** Revert split pane resize feature. [#56310](https://github.com/grafana/grafana/pull/56310), [@Elfo404](https://github.com/Elfo404)
- **Frontend:** Make local storage items propagate to different tabs immediately. [#55810](https://github.com/grafana/grafana/pull/55810), [@oscarkilhed](https://github.com/oscarkilhed)
- **PublicDashboards:** Allow disabling an existent public dashboard if it …. [#55778](https://github.com/grafana/grafana/pull/55778), [@evictorero](https://github.com/evictorero)
- **QueryEditorRow:** Only pass error to query editor if panel is not in a loading state. [#56350](https://github.com/grafana/grafana/pull/56350), [@kevinwcyu](https://github.com/kevinwcyu)
- **Reports:** Refresh query variables on time range change. (Enterprise)
- **XYChart:** Beta release. [#55973](https://github.com/grafana/grafana/pull/55973), [@mdvictor](https://github.com/mdvictor)
- **[9.2.x] Alerting:** Start ticker only when scheduler starts (#56339). [#56418](https://github.com/grafana/grafana/pull/56418), [@yuri-tceretian](https://github.com/yuri-tceretian)
### Bug fixes
- **Alerting:** Fix pq: missing FROM-clause for table "a". [#56453](https://github.com/grafana/grafana/pull/56453), [@grobinson-grafana](https://github.com/grobinson-grafana)
- **AzureMonitor:** Correctly update subscriptions value in ARG editor. [#55860](https://github.com/grafana/grafana/pull/55860), [@aangelisc](https://github.com/aangelisc)
- **Chore:** Fix swagger validation failures. (Enterprise)
- **Chore:** Regenerate swagger specification and fix validation failures. [#55750](https://github.com/grafana/grafana/pull/55750), [@joshhunt](https://github.com/joshhunt)
- **Correlations:** Only return correlation for which both source and target datasources exist. [#55454](https://github.com/grafana/grafana/pull/55454), [@Elfo404](https://github.com/Elfo404)
- **Explore:** Prevent panes from disappearing when resizing window in split view. [#55696](https://github.com/grafana/grafana/pull/55696), [@gelicia](https://github.com/gelicia)
- **Links:** Fix opening links from different orgs on the same tab. [#55837](https://github.com/grafana/grafana/pull/55837), [@guicaulada](https://github.com/guicaulada)
- **LogContext:** Fix scroll position in upper context group. [#56370](https://github.com/grafana/grafana/pull/56370), [@svennergr](https://github.com/svennergr)
- **Logs:** Show copy button independently from context. [#55934](https://github.com/grafana/grafana/pull/55934), [@svennergr](https://github.com/svennergr)
- **Loki/Prometheus:** Fix adding of ad hoc filters when jumping from dashboard to explore. [#55915](https://github.com/grafana/grafana/pull/55915), [@ivanahuckova](https://github.com/ivanahuckova)
- **Loki:** Add support for range aggregations with by grouping. [#56184](https://github.com/grafana/grafana/pull/56184), [@ivanahuckova](https://github.com/ivanahuckova)
- **Loki:** Fix label-value escaping in context query. [#56614](https://github.com/grafana/grafana/pull/56614), [@svennergr](https://github.com/svennergr)
- **Loki:** Fix redundant escaping in adhoc filter with regex match. [#56447](https://github.com/grafana/grafana/pull/56447), [@ivanahuckova](https://github.com/ivanahuckova)
- **PanelEdit:** Fixes resize pane border and spacing issues. [#56190](https://github.com/grafana/grafana/pull/56190), [@torkelo](https://github.com/torkelo)
- **PublicDashboards:** Fix dashboard insights query when Public Dashboard feature is enabled. (Enterprise)
- **PublicDashboards:** Fix dashboard insights query when Public Dashboard feature is enabled. (Enterprise)
- **RBAC:** Redirect to /login when forceLogin is set. [#56469](https://github.com/grafana/grafana/pull/56469), [@sakjur](https://github.com/sakjur)
- **SAML:** Fix RelayState generation function. (Enterprise)
- **Security:** Fix CVE-2022-27664. [#55361](https://github.com/grafana/grafana/pull/55361), [@yong-jie-gong](https://github.com/yong-jie-gong)
- **StateTimeline:** Fix tooltip showing erroneously in shared crosshair dashboards. [#55809](https://github.com/grafana/grafana/pull/55809), [@mdvictor](https://github.com/mdvictor)
- **Tempo:** Fix unexpected trimming of leading zeroes in traceID. [#55167](https://github.com/grafana/grafana/pull/55167), [@hanjm](https://github.com/hanjm)
- **Tracing:** Fix bug where errors are not reported to OpenTelemetry. [#55925](https://github.com/grafana/grafana/pull/55925), [@sakjur](https://github.com/sakjur)
<!-- 9.2.0 END -->
<!-- 9.2.0-beta1 START -->
# 9.2.0-beta1 (2022-09-26)
### Features and enhancements
- **AccessControl:** Move GetCacheKey to SignedInUser. [#53591](https://github.com/grafana/grafana/pull/53591), [@mgyongyosi](https://github.com/mgyongyosi)
- **AccessControl:** Move GetCacheKey to SignedInUser. (Enterprise)
- **Admin:** Add support to configure default admin email. [#54363](https://github.com/grafana/grafana/pull/54363), [@mhuangwm](https://github.com/mhuangwm)
- **Admin:** Create/Edit Team/ServiceAccount UI changes. [#53889](https://github.com/grafana/grafana/pull/53889), [@mgyongyosi](https://github.com/mgyongyosi)
- **Alert list panel:** Add view mode "Stat". [#53281](https://github.com/grafana/grafana/pull/53281), [@peterholmberg](https://github.com/peterholmberg)
- **Alerting:** Add alert preview to cloud rules editor. [#54950](https://github.com/grafana/grafana/pull/54950), [@konrad147](https://github.com/konrad147)
- **Alerting:** Add new API endpoint GET /api/v1/ngalert. [#55134](https://github.com/grafana/grafana/pull/55134), [@yuri-tceretian](https://github.com/yuri-tceretian)
- **Alerting:** Add templates autocomplete. [#53655](https://github.com/grafana/grafana/pull/53655), [@konrad147](https://github.com/konrad147)
- **Alerting:** Adds support for editing group details for Grafana managed rules. [#53120](https://github.com/grafana/grafana/pull/53120), [@gillesdemey](https://github.com/gillesdemey)
- **Alerting:** Change default alert state to Error on execution error or timeout. [#55345](https://github.com/grafana/grafana/pull/55345), [@grobinson-grafana](https://github.com/grobinson-grafana)
- **Alerting:** Display alert's 'Created' time in local time instead of UTC. [#54414](https://github.com/grafana/grafana/pull/54414), [@mmusenbr](https://github.com/mmusenbr)
- **Alerting:** Improve Mimir AM interoperability with Grafana. [#53396](https://github.com/grafana/grafana/pull/53396), [@konrad147](https://github.com/konrad147)
- **Alerting:** Improve validation of query and expressions on rule submit. [#53258](https://github.com/grafana/grafana/pull/53258), [@yuri-tceretian](https://github.com/yuri-tceretian)
- **Alerting:** Read group details before saving. [#53586](https://github.com/grafana/grafana/pull/53586), [@gillesdemey](https://github.com/gillesdemey)
- **Alerting:** Resolve stale state. [#49352](https://github.com/grafana/grafana/pull/49352), [@yuri-tceretian](https://github.com/yuri-tceretian)
- **Alerting:** Support for re-ordering alert rules in a group. [#53318](https://github.com/grafana/grafana/pull/53318), [@gillesdemey](https://github.com/gillesdemey)
- **Alerting:** Update embedded Alertmanager v0.24. [#53555](https://github.com/grafana/grafana/pull/53555), [@yuri-tceretian](https://github.com/yuri-tceretian)
- **Alerting:** Update forking request handlers to use the same errors. [#52965](https://github.com/grafana/grafana/pull/52965), [@yuri-tceretian](https://github.com/yuri-tceretian)
- **Alerting:** Write and Delete multiple alert instances. [#52305](https://github.com/grafana/grafana/pull/52305), [@joeblubaugh](https://github.com/joeblubaugh)
- **Annotation:** Optionally allow storing longer annotation tags. [#54754](https://github.com/grafana/grafana/pull/54754), [@papagian](https://github.com/papagian)
- **Auth:** Add SAML common resolutions to cookie issues. [#55395](https://github.com/grafana/grafana/pull/55395), [@Jguer](https://github.com/Jguer)
- **Auth:** Add cli command users-manager for conflict resolution. [#52344](https://github.com/grafana/grafana/pull/52344), [@eleijonmarck](https://github.com/eleijonmarck)
- **Auth:** Add documentation on group overage claims in AzureAD. [#55389](https://github.com/grafana/grafana/pull/55389), [@Jguer](https://github.com/Jguer)
- **Auth:** Extend auth token errors with user ID. [#54633](https://github.com/grafana/grafana/pull/54633), [@IevaVasiljeva](https://github.com/IevaVasiljeva)
- **Auth:** Reduce allocs in permission map. [#55410](https://github.com/grafana/grafana/pull/55410), [@Jguer](https://github.com/Jguer)
- **Auth:** Restore legacy behavior and add deprecation notice for empty org role in oauth. [#55118](https://github.com/grafana/grafana/pull/55118), [@Jguer](https://github.com/Jguer)
- **AzureMonitor:** Automate retrieval of supported Metrics namespaces. [#53203](https://github.com/grafana/grafana/pull/53203), [@aangelisc](https://github.com/aangelisc)
- **Build:** Replace the file-loader loader with asset module in webpack config. [#53088](https://github.com/grafana/grafana/pull/53088), [@academo](https://github.com/academo)
- **Chore:** Group auth docker blocks. [#54274](https://github.com/grafana/grafana/pull/54274), [@linoman](https://github.com/linoman)
- **Chore:** Upgrade Go to 1.19.1. [#54902](https://github.com/grafana/grafana/pull/54902), [@sakjur](https://github.com/sakjur)
- **Cleanup:** Add traces to cleanup jobs. [#55465](https://github.com/grafana/grafana/pull/55465), [@sakjur](https://github.com/sakjur)
- **CloudMonitor:** Remove cloudMonitoringExperimentalUI feature flag. [#55054](https://github.com/grafana/grafana/pull/55054), [@asimpson](https://github.com/asimpson)
- **CloudWatch:** Add AWS/States metrics. [#55427](https://github.com/grafana/grafana/pull/55427), [@jangaraj](https://github.com/jangaraj)
- **CloudWatch:** Add missing AWS/ApiGateway metrics. [#53839](https://github.com/grafana/grafana/pull/53839), [@jangaraj](https://github.com/jangaraj)
- **CloudWatch:** Add missing AWS/Events metrics. [#53831](https://github.com/grafana/grafana/pull/53831), [@jangaraj](https://github.com/jangaraj)
- **CloudWatch:** Enable feature adoption tracking in the plugin. [#54299](https://github.com/grafana/grafana/pull/54299), [@sunker](https://github.com/sunker)
- **CloudWatch:** Log group variable should get all log groups. [#54062](https://github.com/grafana/grafana/pull/54062), [@iwysiu](https://github.com/iwysiu)
- **CloudWatch:** Refactoring - decouple logs and metrics in datasource file. [#55079](https://github.com/grafana/grafana/pull/55079), [@sunker](https://github.com/sunker)
- **Correlations:** Add GetCorrelation(s) HTTP APIs. [#52517](https://github.com/grafana/grafana/pull/52517), [@Elfo404](https://github.com/Elfo404)
- **Custom branding:** Add RBAC (early access). (Enterprise)
- **Custom branding:** Add preview for the settings (early access). (Enterprise)
- **Dashboard:** Support Variables in "Filter by Name" Transformation. [#51804](https://github.com/grafana/grafana/pull/51804), [@Kirchen99](https://github.com/Kirchen99)
- **DashboardQuery:** Expand query options. [#53998](https://github.com/grafana/grafana/pull/53998), [@ryantxu](https://github.com/ryantxu)
- **Docs:** Deprecating packages_api and removing it from our pipelines. [#54473](https://github.com/grafana/grafana/pull/54473), [@tolzhabayev](https://github.com/tolzhabayev)
- **Docs:** Update annotations API docs to include required field. [#52644](https://github.com/grafana/grafana/pull/52644), [@HarryTennent](https://github.com/HarryTennent)
- **Echo:** Add support for Google Analytics 4. [#55446](https://github.com/grafana/grafana/pull/55446), [@joshhunt](https://github.com/joshhunt)
- **Elasticsearch:** Respect time range in ad hoc filters. [#53874](https://github.com/grafana/grafana/pull/53874), [@gabor](https://github.com/gabor)
- **Explore:** Add Mixed Datasource. [#53429](https://github.com/grafana/grafana/pull/53429), [@gelicia](https://github.com/gelicia)
- **Explore:** Add resize to split view, with Min/Max button. [#54420](https://github.com/grafana/grafana/pull/54420), [@gelicia](https://github.com/gelicia)
- **Footer:** Add release notes url to version label. [#52909](https://github.com/grafana/grafana/pull/52909), [@kianelbo](https://github.com/kianelbo)
- **Geomap:** Add Africa, Australia, Oceania, South Asia, and East Asia as initial view options. [#55142](https://github.com/grafana/grafana/pull/55142), [@zuchka](https://github.com/zuchka)
- **Geomap:** Add dynamic initial view options. [#54419](https://github.com/grafana/grafana/pull/54419), [@drew08t](https://github.com/drew08t)
- **Grafana Backend:** Establish a database version support policy. [#54374](https://github.com/grafana/grafana/pull/54374), [@joeblubaugh](https://github.com/joeblubaugh)
- **Grafana UI:** Add implicit submit to TimeRangeForm for A11y. [#52647](https://github.com/grafana/grafana/pull/52647), [@matejkubinec](https://github.com/matejkubinec)
- **Grafana/ui:** Adds all unicons to IconName and script to generate types. [#53820](https://github.com/grafana/grafana/pull/53820), [@academo](https://github.com/academo)
- **GrafanaUI:** Add icon to links on Plugin configuration page. [#55581](https://github.com/grafana/grafana/pull/55581), [@leandro-deveikis](https://github.com/leandro-deveikis)
- **GrafanaUI:** Deprecate logs components. [#55364](https://github.com/grafana/grafana/pull/55364), [@gabor](https://github.com/gabor)
- **GraphPanel:** Panel Description box does not expand to fit markdown table. [#54238](https://github.com/grafana/grafana/pull/54238), [@gitstart](https://github.com/gitstart)
- **Icons:** Move unicons icons to the repository and generate the iconsBundle.js with nodejs. [#53766](https://github.com/grafana/grafana/pull/53766), [@academo](https://github.com/academo)
- **InfluxDB:** Remove browser ('direct' access) mode. [#53529](https://github.com/grafana/grafana/pull/53529), [@obetomuniz](https://github.com/obetomuniz)
- **JWT:** Add support for assigning org roles. [#54277](https://github.com/grafana/grafana/pull/54277), [@nrwiersma](https://github.com/nrwiersma)
- **JWT:** Allow conventional bearer token in Authorization header. [#54821](https://github.com/grafana/grafana/pull/54821), [@nrwiersma](https://github.com/nrwiersma)
- **Live:** Migrate to centrifuge-js v3 (new API and client protocol). [#51977](https://github.com/grafana/grafana/pull/51977), [@FZambia](https://github.com/FZambia)
- Load icons using webpack context instead of react-inlinesvg library. [#53675](https://github.com/grafana/grafana/pull/53675), [@academo](https://github.com/academo)
- **Login:** Allow basic users to reset password when LDAP or Auth Proxy is enabled. [#52331](https://github.com/grafana/grafana/pull/52331), [@krzysdabro](https://github.com/krzysdabro)
- **Login:** Remove single admin team restriction. [#54534](https://github.com/grafana/grafana/pull/54534), [@linoman](https://github.com/linoman)
- **Logs:** Relocate "show context" button, add copy line log button. [#50977](https://github.com/grafana/grafana/pull/50977), [@Seyaji](https://github.com/Seyaji)
- **Loki Query Variables:** Add support to select from existing labels. [#54625](https://github.com/grafana/grafana/pull/54625), [@matyax](https://github.com/matyax)
- **Loki/Prometheus:** Make sections in log/metrics browser resizable. [#54704](https://github.com/grafana/grafana/pull/54704), [@gwdawson](https://github.com/gwdawson)
- **Loki/Prometheus:** Remove beta tag from query builder. [#55150](https://github.com/grafana/grafana/pull/55150), [@ivanahuckova](https://github.com/ivanahuckova)
- **Loki:** Add validation to derived fields url field setting. [#53599](https://github.com/grafana/grafana/pull/53599), [@matyax](https://github.com/matyax)
- **Loki:** Create Variable Query Editor for Loki. [#54102](https://github.com/grafana/grafana/pull/54102), [@matyax](https://github.com/matyax)
- **MSSQL:** Migrate to React. [#51765](https://github.com/grafana/grafana/pull/51765), [@zoltanbedi](https://github.com/zoltanbedi)
- **Metrics:** Instrument requests not matching any handler as `notfound`. [#53949](https://github.com/grafana/grafana/pull/53949), [@bergquist](https://github.com/bergquist)
- **Navigation Bar:** Remove plugins link under Server Admin. [#54386](https://github.com/grafana/grafana/pull/54386), [@academo](https://github.com/academo)
- **Navigation:** Don't round app plugin icon images. [#54543](https://github.com/grafana/grafana/pull/54543), [@joshhunt](https://github.com/joshhunt)
- **OAuth:** Allow assigning Server Admin. [#54780](https://github.com/grafana/grafana/pull/54780), [@Jguer](https://github.com/Jguer)
- **Panel edit:** Run queries when time range changes in table view. [#53111](https://github.com/grafana/grafana/pull/53111), [@axelavargas](https://github.com/axelavargas)
- **Panels:** Add panel debug support helper. [#54678](https://github.com/grafana/grafana/pull/54678), [@ryantxu](https://github.com/ryantxu)
- **Playlists:** Migrate to UIDs and load dashboards in the frontend. [#54125](https://github.com/grafana/grafana/pull/54125), [@ryantxu](https://github.com/ryantxu)
- **Plugins:** Add feature toggles for long running queries. [#54349](https://github.com/grafana/grafana/pull/54349), [@kevinwcyu](https://github.com/kevinwcyu)
- **Plugins:** Add secure JSON fields to plugin setting DTO. [#55313](https://github.com/grafana/grafana/pull/55313), [@wbrowne](https://github.com/wbrowne)
- **Plugins:** Handle app plugin proxy routes per request. [#51835](https://github.com/grafana/grafana/pull/51835), [@marefr](https://github.com/marefr)
- **Plugins:** Use error plane for api/ds/query. [#54750](https://github.com/grafana/grafana/pull/54750), [@wbrowne](https://github.com/wbrowne)
- **Preferences:** Support setting any dashboard as home, not just the starred ones. [#54258](https://github.com/grafana/grafana/pull/54258), [@ryantxu](https://github.com/ryantxu)
- **Prometheus:** Add dashboard uid when tracing header in browsermode. [#53232](https://github.com/grafana/grafana/pull/53232), [@lpskdl](https://github.com/lpskdl)
- **Prometheus:** Throw error on direct access. [#50162](https://github.com/grafana/grafana/pull/50162), [@aocenas](https://github.com/aocenas)
- **Prometheus:** Upgrades http client to 1.30. [#53901](https://github.com/grafana/grafana/pull/53901), [@bergquist](https://github.com/bergquist)
- **Prometheus:** Upgrades the prometheus http client to 1.13. [#47707](https://github.com/grafana/grafana/pull/47707), [@yesoreyeram](https://github.com/yesoreyeram)
- **PublicDashboard:** Add RTK Query with loading and error state. Add MSW dependency for testing. [#55518](https://github.com/grafana/grafana/pull/55518), [@juanicabanas](https://github.com/juanicabanas)
- **PublicDashboards:** Add RBAC to secured endpoints. [#54544](https://github.com/grafana/grafana/pull/54544), [@evictorero](https://github.com/evictorero)
- **PublicDashboards:** Add link to public dashboards docs to sharing modal. [#55186](https://github.com/grafana/grafana/pull/55186), [@guicaulada](https://github.com/guicaulada)
- **PublicDashboards:** Disable form when user does not has permissions. [#54853](https://github.com/grafana/grafana/pull/54853), [@evictorero](https://github.com/evictorero)
- **PublicDashboards:** Dont support exemplars. [#54933](https://github.com/grafana/grafana/pull/54933), [@owensmallwood](https://github.com/owensmallwood)
- **PublicDashboards:** Ignore time range input and changes on public dashboard. [#55412](https://github.com/grafana/grafana/pull/55412), [@guicaulada](https://github.com/guicaulada)
- **PublicDashboards:** Log api layer errors and which datasources fail/succeed. [#55056](https://github.com/grafana/grafana/pull/55056), [@owensmallwood](https://github.com/owensmallwood)
- **PublicDashboards:** Render tag when dashboard meta changes in state. [#55414](https://github.com/grafana/grafana/pull/55414), [@owensmallwood](https://github.com/owensmallwood)
- **PublicDashboards:** Resolve interval for public dashboard data source. [#55489](https://github.com/grafana/grafana/pull/55489), [@guicaulada](https://github.com/guicaulada)
- **PublicDashboards:** Sanitize metadata from public dashboard queries. [#55269](https://github.com/grafana/grafana/pull/55269), [@guicaulada](https://github.com/guicaulada)
- **PublicDashboards:** UI improvements. [#55130](https://github.com/grafana/grafana/pull/55130), [@juanicabanas](https://github.com/juanicabanas)
- **Query editor:** Allow query editors to create new query. [#55028](https://github.com/grafana/grafana/pull/55028), [@ivanahuckova](https://github.com/ivanahuckova)
- **RBAC:** Add cache for oss rbac permissions. [#55098](https://github.com/grafana/grafana/pull/55098), [@kalleep](https://github.com/kalleep)
- **RBAC:** Add endpoints for reading and updating role assignments. (Enterprise)
- **RBAC:** Add permissions to install and configure plugins. [#51829](https://github.com/grafana/grafana/pull/51829), [@gamab](https://github.com/gamab)
- **RBAC:** Display indicator if a permission is inherited. [#54080](https://github.com/grafana/grafana/pull/54080), [@kalleep](https://github.com/kalleep)
- **RBAC:** Only display unique permissions in list. [#54074](https://github.com/grafana/grafana/pull/54074), [@kalleep](https://github.com/kalleep)
- **RBAC:** Refactor delegation check to reduce db queries. (Enterprise)
- **RBAC:** Validate scopes during role creation. (Enterprise)
- **Report:** Keep report data on edit page refresh. (Enterprise)
- **Reports:** Allow CSV only option. (Enterprise)
- **Reports:** Render steps inside ReportPage. (Enterprise)
- **SAML:** Account for all orgs in org_mapping. (Enterprise)
- **SAML:** Add option to skip org role sync. [#55230](https://github.com/grafana/grafana/pull/55230), [@gamab](https://github.com/gamab)
- **SAML:** Add option to skip org role sync. (Enterprise)
- **SAML:** Allow wildcard mapping to add user to all existing orgs. [#55628](https://github.com/grafana/grafana/pull/55628), [@gamab](https://github.com/gamab)
- **SAML:** Do not SAML SLO if user is not SAML authenticated. [#53418](https://github.com/grafana/grafana/pull/53418), [@Jguer](https://github.com/Jguer)
- **SAML:** Improve SAML login flow. (Enterprise)
- **SQL:** Migrate (MS/My/Postgres)SQL configuration pages from Angular to React. [#51891](https://github.com/grafana/grafana/pull/51891), [@oscarkilhed](https://github.com/oscarkilhed)
- **Search:** Migrated impressions to use dashboardUID. [#53090](https://github.com/grafana/grafana/pull/53090), [@lpskdl](https://github.com/lpskdl)
- **Secrets:** Add fallback to secrets kvstore plugin. [#54056](https://github.com/grafana/grafana/pull/54056), [@guicaulada](https://github.com/guicaulada)
- **Secrets:** Convert secret migration to a background service. [#54676](https://github.com/grafana/grafana/pull/54676), [@guicaulada](https://github.com/guicaulada)
- **Secrets:** Implement secrets manager plugin fallback store. [#54496](https://github.com/grafana/grafana/pull/54496), [@guicaulada](https://github.com/guicaulada)
- **Secrets:** Improve error handling for secrets manager plugin. [#54811](https://github.com/grafana/grafana/pull/54811), [@guicaulada](https://github.com/guicaulada)
- **SegmentInput:** Omit allowCustomValue and allowEmptyValue props. [#55352](https://github.com/grafana/grafana/pull/55352), [@timagixe](https://github.com/timagixe)
- **Status History Panel:** Show X-Axis Value in Tooltip. [#54563](https://github.com/grafana/grafana/pull/54563), [@gitstart](https://github.com/gitstart)
- **TeamSync:** Add description to group mapping. (Enterprise)
- **TeamSync:** Prevent team syncing out of orgs mapped by auth method. (Enterprise)
- **Teams:** Add TeamRolePicker to the Create and Edit Team pages. [#53775](https://github.com/grafana/grafana/pull/53775), [@mgyongyosi](https://github.com/mgyongyosi)
- **Tempo:** Set the default query type even if queryType was set to 'clear'. [#53887](https://github.com/grafana/grafana/pull/53887), [@CrypticSignal](https://github.com/CrypticSignal)
- **Tempo:** Wrap the autocomplete value for a tag in double quotes. [#55610](https://github.com/grafana/grafana/pull/55610), [@CrypticSignal](https://github.com/CrypticSignal)
- **TextPanel:** Support code formats. [#53850](https://github.com/grafana/grafana/pull/53850), [@ryantxu](https://github.com/ryantxu)
- **TimeRangePicker:** Absolute timeranges with timezone. [#53763](https://github.com/grafana/grafana/pull/53763), [@mdvictor](https://github.com/mdvictor)
- **TimeSeries:** Support for log scale and negative numbers. [#54812](https://github.com/grafana/grafana/pull/54812), [@leeoniya](https://github.com/leeoniya)
- **TopNav:** Panel edit changes. [#54746](https://github.com/grafana/grafana/pull/54746), [@torkelo](https://github.com/torkelo)
- **Tracing:** Add new [tracing.opentelemetry] custom_attributes config setting. [#54110](https://github.com/grafana/grafana/pull/54110), [@hairyhenderson](https://github.com/hairyhenderson)
- **Transformations:** Add support for an inner join transformation. [#53865](https://github.com/grafana/grafana/pull/53865), [@AlexKaracaoglu](https://github.com/AlexKaracaoglu)
- **Transformers:** Support inner vs outer join. [#53913](https://github.com/grafana/grafana/pull/53913), [@ryantxu](https://github.com/ryantxu)
- **User management:** Use HMAC-SHA256 to generate time limit codes (password reset tokens). [#42334](https://github.com/grafana/grafana/pull/42334), [@andreasgerstmayr](https://github.com/andreasgerstmayr)
- **UsersTable:** Display Disabled flag in Organizations' Users table. [#53656](https://github.com/grafana/grafana/pull/53656), [@mgyongyosi](https://github.com/mgyongyosi)
- **Various Panels:** Add ability to toggle legend with keyboard shortcut. (Enterprise)
### Bug fixes
- **Alerting:** AlertingProxy to elevate permissions for request forwarded to data proxy when RBAC enabled. [#53620](https://github.com/grafana/grafana/pull/53620), [@yuri-tceretian](https://github.com/yuri-tceretian)
- **Auth:** Allow admins to manually change external user's role if `oauth_skip_org_role_update_sync` or saml `skip_org_role_sync` is enabled. [#55182](https://github.com/grafana/grafana/pull/55182), [@Jguer](https://github.com/Jguer)
- **AuthNZ:** Security fixes for CVE-2022-35957 and CVE-2022-36062. [#55503](https://github.com/grafana/grafana/pull/55503), [@IevaVasiljeva](https://github.com/IevaVasiljeva)
- **ContextHandler:** Use standard library style middleware. [#54219](https://github.com/grafana/grafana/pull/54219), [@sakjur](https://github.com/sakjur)
- **ElasticSearch:** Fix lucene formatted variables being wrongly escaped. [#54981](https://github.com/grafana/grafana/pull/54981), [@svennergr](https://github.com/svennergr)
- **FIX:** RBAC prevents deleting empty snapshots. [#54385](https://github.com/grafana/grafana/pull/54385), [@gamab](https://github.com/gamab)
- **Fix:** Adjusting plugin.json schema regex. [#54515](https://github.com/grafana/grafana/pull/54515), [@tolzhabayev](https://github.com/tolzhabayev)
- **Fix:** Wrong swagger meta preventing spec generation. [#54181](https://github.com/grafana/grafana/pull/54181), [@leandro-deveikis](https://github.com/leandro-deveikis)
- **Histogram:** Fix panel hide when clicking on legend. [#53651](https://github.com/grafana/grafana/pull/53651), [@mdvictor](https://github.com/mdvictor)
- **Loki:** Hide loki sample queries from query inspector. [#55158](https://github.com/grafana/grafana/pull/55158), [@ivanahuckova](https://github.com/ivanahuckova)
- **Query Builder:** Fix spelling of "lose" in user visible message. [#53435](https://github.com/grafana/grafana/pull/53435), [@spazm](https://github.com/spazm)
- **RBAC:** Fix resolver issue on wildcard resulting in wrong status code for endpoints. [#54208](https://github.com/grafana/grafana/pull/54208), [@kalleep](https://github.com/kalleep)
- **Reports:** Fix starting value. (Enterprise)
- **StatPanel:** Add padding between horizontal name and value. [#55299](https://github.com/grafana/grafana/pull/55299), [@JoaoSilvaGrafana](https://github.com/JoaoSilvaGrafana)
- **TablePanel:** Fix FooterRow styling for Safari and Firefox. [#55543](https://github.com/grafana/grafana/pull/55543), [@mdvictor](https://github.com/mdvictor)
- **TablePanel:** Fix vertical scrollbar. [#53457](https://github.com/grafana/grafana/pull/53457), [@mdvictor](https://github.com/mdvictor)
- **Tempo:** Fix typo in the tooltip for "Limit". [#53750](https://github.com/grafana/grafana/pull/53750), [@CrypticSignal](https://github.com/CrypticSignal)
- **Transformations:** Fix clearing of transformation select fields. [#53916](https://github.com/grafana/grafana/pull/53916), [@AlexKaracaoglu](https://github.com/AlexKaracaoglu)
- **Various Panels:** Fix Single right-aligned y-axis hiding gridlines. [#54206](https://github.com/grafana/grafana/pull/54206), [@gitstart](https://github.com/gitstart)
### Breaking changes
Dashboards: Remove the ability to open dashboard settings while panel edit is still open. Issue [#54746](https://github.com/grafana/grafana/issues/54746)
In InfluxDB, browser access mode was deprecated in Grafana 8.0.0 and removed in 9.2.0. If you used this mode, please switch to server access mode on the datasource configuration page. Issue [#53529](https://github.com/grafana/grafana/issues/53529)
In Prometheus, browser access mode was deprecated in Grafana 7.4.0 and removed in 9.2.0. If you used this mode, please switch to server access mode on the datasource configuration page. Issue [#50162](https://github.com/grafana/grafana/issues/50162)
Password reset links sent before the upgrade will no longer work and have to be resent. Since the duration of those links are only two hours we decided to not support both token formats. Issue [#42334](https://github.com/grafana/grafana/issues/42334)
### Deprecations
Google Analytics 'Universal Analytics' is deprecated by Google in favor of Google Analytics 4. See [Google's deprecation notice](https://support.google.com/analytics/answer/10089681?hl=en) for more details. After July 2023, Grafana's Google Analytics 'Universal Analytics' integration will be removed, along with the `analytics.google_analytics_ua_id` server config property. Configure Google Analytics 4 using the `analytics.google_analytics_4_id` server config property.
Issue [#55446](https://github.com/grafana/grafana/issues/55446)
The following components and functions related to logs are deprecated in the `grafana-ui` package: `LogLabels`, `LogMessageAnsi`, `LogRows`, `getLogRowStyles`.
Issue [#55364](https://github.com/grafana/grafana/issues/55364)
### Plugin development fixes & changes
- **GrafanaUI:** Add required behavior to Inline Field. [#54867](https://github.com/grafana/grafana/pull/54867), [@gefgu](https://github.com/gefgu)
- **CustomScrollbar:** Add optional scroll indicators to `CustomScrollbar`. [#54705](https://github.com/grafana/grafana/pull/54705), [@ashharrison90](https://github.com/ashharrison90)
- **Build:** Introduce ESM and Treeshaking to NPM package builds. [#51517](https://github.com/grafana/grafana/pull/51517), [@jackw](https://github.com/jackw)
<!-- 9.1.8 START -->
# 9.1.8 (2022-10-11)
### Features and enhancements
- **Alerting:** Update imported prometheus alertmanager version. Backport (#56228). [#56429](https://github.com/grafana/grafana/pull/56429), [@joeblubaugh](https://github.com/joeblubaugh)
- **Chore:** Upgrade Go to 1.19.2. [#56355](https://github.com/grafana/grafana/pull/56355), [@sakjur](https://github.com/sakjur)
### Bug fixes
- **Alerting:** Fix evaluation interval validation. [#56115](https://github.com/grafana/grafana/pull/56115), [@konrad147](https://github.com/konrad147)
- **Alerting:** Fix migration to create rules with group index 1. [#56511](https://github.com/grafana/grafana/pull/56511), [@yuri-tceretian](https://github.com/yuri-tceretian)
- **Alerting:** Fix migration to not add label "alertname". [#56509](https://github.com/grafana/grafana/pull/56509), [@yuri-tceretian](https://github.com/yuri-tceretian)
- **Azure Monitor:** Fix empty Logs response for Alerting. [#56378](https://github.com/grafana/grafana/pull/56378), [@andresmgot](https://github.com/andresmgot)
- **Azure Monitor:** Fix subscription selector when changing data sources. [#56284](https://github.com/grafana/grafana/pull/56284), [@andresmgot](https://github.com/andresmgot)
- **Caching:** Fix wrong memcached setting name in defaults. (Enterprise)
- **Google Cloud Monitoring:** Fix bucket bound for distributions. [#56565](https://github.com/grafana/grafana/pull/56565), [@andresmgot](https://github.com/andresmgot)
<!-- 9.1.8 END -->
<!-- 9.1.7 START -->
# 9.1.7 (2022-10-04)
### Features and enhancements
- **Chore:** Upgrade Go version to 1.19.1 (backport). [#55733](https://github.com/grafana/grafana/pull/55733), [@sakjur](https://github.com/sakjur)
- **CloudWatch:** Add missing AWS/Prometheus metrics. [#54990](https://github.com/grafana/grafana/pull/54990), [@jangaraj](https://github.com/jangaraj)
- **Explore:** Add feature tracking events. [#54514](https://github.com/grafana/grafana/pull/54514), [@L-M-K-B](https://github.com/L-M-K-B)
- **Graphite:** Add error information to graphite queries tracing. [#55249](https://github.com/grafana/grafana/pull/55249), [@jesusvazquez](https://github.com/jesusvazquez)
- **Prometheus:** Restore FromAlert header. [#55255](https://github.com/grafana/grafana/pull/55255), [@kylebrandt](https://github.com/kylebrandt)
- **SAML:** Account for all orgs in org_mapping (#3855). (Enterprise)
- **Search:** Add search index configuration options. [#55525](https://github.com/grafana/grafana/pull/55525), [@ArturWierzbicki](https://github.com/ArturWierzbicki)
- **Thresholds:** Add option for dashed line style. [#55875](https://github.com/grafana/grafana/pull/55875), [@leeoniya](https://github.com/leeoniya)
### Bug fixes
- **Alerting:** Fix default query's data source when no default datasource specified. [#55435](https://github.com/grafana/grafana/pull/55435), [@konrad147](https://github.com/konrad147)
- **Alerting:** Fix mathexp.NoData cannot be reduced. [#55347](https://github.com/grafana/grafana/pull/55347), [@grobinson-grafana](https://github.com/grobinson-grafana)
- **Alerting:** Skip unsupported file types on provisioning. [#55573](https://github.com/grafana/grafana/pull/55573), [@JohnnyQQQQ](https://github.com/JohnnyQQQQ)
- **AzureMonitor:** Ensure resourceURI template variable is migrated. [#56095](https://github.com/grafana/grafana/pull/56095), [@aangelisc](https://github.com/aangelisc)
- **Dashboard:** Fix plugin dashboard save as button. [#55197](https://github.com/grafana/grafana/pull/55197), [@lpskdl](https://github.com/lpskdl)
- **Docs:** Fix decimals: auto docs for panel edit. [#55477](https://github.com/grafana/grafana/pull/55477), [@joshhunt](https://github.com/joshhunt)
- **Fix:** RBAC handle `error no resolver` found. [#55676](https://github.com/grafana/grafana/pull/55676), [@gamab](https://github.com/gamab)
- **Fix:** RBAC handle `error no resolver` found. (Enterprise)
- **LibraryPanelSearch:** Refactor and fix hyphen issue. [#55314](https://github.com/grafana/grafana/pull/55314), [@kaydelaney](https://github.com/kaydelaney)
- **Live:** Fix live streaming with `live-service-web-worker` feature flag enabled. [#55528](https://github.com/grafana/grafana/pull/55528), [@ArturWierzbicki](https://github.com/ArturWierzbicki)
- **QueryField:** Fix wrong cursor position on autocomplete. [#55576](https://github.com/grafana/grafana/pull/55576), [@svennergr](https://github.com/svennergr)
<!-- 9.1.7 END -->
<!-- 9.2.0-beta1 END -->
<!-- 9.1.6 START -->
# 9.1.6 (2022-09-20)
### Features and enhancements
- **Auth:** Trigger auth token cleanup job. (Enterprise)
- **DataSource:** Adding possibility to hide queries from the inspector. [#54892](https://github.com/grafana/grafana/pull/54892), [@mckn](https://github.com/mckn)
- **Inspect:** Hide Actions tab when it is empty. [#55272](https://github.com/grafana/grafana/pull/55272), [@ryantxu](https://github.com/ryantxu)
- **PanelMenu:** Remove hide legend action as it was showing on all panel types. [#54876](https://github.com/grafana/grafana/pull/54876), [@torkelo](https://github.com/torkelo)
- **Provisioning Contact points:** Support disableResolveMessage via YAML. [#54122](https://github.com/grafana/grafana/pull/54122), [@mmusenbr](https://github.com/mmusenbr)
- **PublicDashboards:** Support subpaths when generating pubdash url. [#55204](https://github.com/grafana/grafana/pull/55204), [@owensmallwood](https://github.com/owensmallwood)
### Bug fixes
- **Alerting:** Fix legacy migration crash when rule name is too long. [#55053](https://github.com/grafana/grafana/pull/55053), [@alexweav](https://github.com/alexweav)
- **Alerting:** Fix send resolved notifications. [#54793](https://github.com/grafana/grafana/pull/54793), [@grobinson-grafana](https://github.com/grobinson-grafana)
- **Azure Monitor:** Fix migration issue with MetricDefinitionsQuery template variable query types. [#55262](https://github.com/grafana/grafana/pull/55262), [@yaelleC](https://github.com/yaelleC)
- **Browse:** Hide dashboard actions if user does not have enough permission. [#55218](https://github.com/grafana/grafana/pull/55218), [@lpskdl](https://github.com/lpskdl)
- **ElasticSearch:** Fix dispatching queries at a wrong time. [#55225](https://github.com/grafana/grafana/pull/55225), [@svennergr](https://github.com/svennergr)
- **Panel:** Disable legends when showLegend is false prior to schema v37. [#55126](https://github.com/grafana/grafana/pull/55126), [@ivanortegaalba](https://github.com/ivanortegaalba)
- **Prometheus:** Fix metadata requests for browser access mode. [#55403](https://github.com/grafana/grafana/pull/55403), [@itsmylife](https://github.com/itsmylife)
- **Search:** Avoid requesting all dashboards when in Folder View. [#55169](https://github.com/grafana/grafana/pull/55169), [@JoaoSilvaGrafana](https://github.com/JoaoSilvaGrafana)
- **TablePanel/StatPanel:** Fix values not being visible when background transparent. [#55092](https://github.com/grafana/grafana/pull/55092), [@mdvictor](https://github.com/mdvictor)
<!-- 9.1.6 END -->
<!-- 9.1.5 START -->
# 9.1.5 (2022-09-12)
### Features and enhancements
- **Alerting:** Sanitize invalid label/annotation names for external alertmanagers. [#54537](https://github.com/grafana/grafana/pull/54537), [@JacobsonMT](https://github.com/JacobsonMT)
- **Alerting:** Telegram: Truncate long messages to avoid send error. [#54339](https://github.com/grafana/grafana/pull/54339), [@ZloyDyadka](https://github.com/ZloyDyadka)
- **DisplayProcessor:** Handle reverse-ordered data when auto-showing millis. [#54923](https://github.com/grafana/grafana/pull/54923), [@leeoniya](https://github.com/leeoniya)
- **Heatmap:** Add option to reverse color scheme. [#54365](https://github.com/grafana/grafana/pull/54365), [@leeoniya](https://github.com/leeoniya)
- **PluginLoader:** Alias slate-react as @grafana/slate-react. [#55027](https://github.com/grafana/grafana/pull/55027), [@kaydelaney](https://github.com/kaydelaney)
- **Search:** Add substring matcher, to bring back the old dashboard search behavior. [#54813](https://github.com/grafana/grafana/pull/54813), [@ArturWierzbicki](https://github.com/ArturWierzbicki)
- **Traces:** More visible span colors. [#54513](https://github.com/grafana/grafana/pull/54513), [@joey-grafana](https://github.com/joey-grafana)
### Bug fixes
- **Alerting:** Fix incorrect propagation of org ID and other fields in rule provisioning endpoints. [#54603](https://github.com/grafana/grafana/pull/54603), [@alexweav](https://github.com/alexweav)
- **Alerting:** Resetting the notification policy tree to the default policy will also restore default contact points. [#54608](https://github.com/grafana/grafana/pull/54608), [@alexweav](https://github.com/alexweav)
- **AzureMonitor:** Fix custom namespaces. [#54937](https://github.com/grafana/grafana/pull/54937), [@asimpson](https://github.com/asimpson)
- **AzureMonitor:** Fix issue where custom metric namespaces are not included in the metric namespace list. [#54826](https://github.com/grafana/grafana/pull/54826), [@andresmgot](https://github.com/andresmgot)
- **CloudWatch:** Fix display name of metric and namespace. [#54860](https://github.com/grafana/grafana/pull/54860), [@sunker](https://github.com/sunker)
- **Cloudwatch:** Fix annotation query serialization issue. [#54884](https://github.com/grafana/grafana/pull/54884), [@sunker](https://github.com/sunker)
- **Dashboard:** Fix issue where unsaved changes warning would appear even after save, and not being able to change library panels. [#54706](https://github.com/grafana/grafana/pull/54706), [@torkelo](https://github.com/torkelo)
- **Dashboard:** Hide overflow content for single left pane. [#54882](https://github.com/grafana/grafana/pull/54882), [@lpskdl](https://github.com/lpskdl)
- **Loki:** Fix a bug where adding adhoc filters was not possible. [#54920](https://github.com/grafana/grafana/pull/54920), [@svennergr](https://github.com/svennergr)
- **Reports:** Fix handling expired state. (Enterprise)
<!-- 9.1.5 END -->
<!-- 9.1.4 START -->
# 9.1.4 (2022-09-09)
### Bug fixes
- **GrafanaUI:** Fixes Chrome issue for various query fields. [#54566](https://github.com/grafana/grafana/pull/54566), [@kaydelaney](https://github.com/kaydelaney)
<!-- 9.1.4 END -->
<!-- 9.1.3 START -->
# 9.1.3 (2022-09-05)
### Features and enhancements
- **API:** Do not expose user input in datasource error responses. [#53483](https://github.com/grafana/grafana/pull/53483), [@papagian](https://github.com/papagian)
- **Alerting:** Write and Delete multiple alert instances. [#54072](https://github.com/grafana/grafana/pull/54072), [@joeblubaugh](https://github.com/joeblubaugh)
- **Library Panel:** Allow to delete them when deprecated. [#54662](https://github.com/grafana/grafana/pull/54662), [@ivanortegaalba](https://github.com/ivanortegaalba)
- **Plugins Catalog:** Allow to filter plugins using special characters. [#54474](https://github.com/grafana/grafana/pull/54474), [@murtazaqa](https://github.com/murtazaqa)
### Bug fixes
- **Alerting:** Fix UI bug when setting custom notification policy group by. [#54607](https://github.com/grafana/grafana/pull/54607), [@JacobsonMT](https://github.com/JacobsonMT)
- **AppRootPage:** Fix issue navigating between two app plugin pages. [#54519](https://github.com/grafana/grafana/pull/54519), [@torkelo](https://github.com/torkelo)
- **Correlations:** Use correct fallback handlers. [#54511](https://github.com/grafana/grafana/pull/54511), [@kalleep](https://github.com/kalleep)
- **FIX:** RBAC prevents deleting empty snapshots (#54385). [#54510](https://github.com/grafana/grafana/pull/54510), [@gamab](https://github.com/gamab)
- **LibraryElements:** Fix inability to delete library panels under MySQL. [#54600](https://github.com/grafana/grafana/pull/54600), [@kaydelaney](https://github.com/kaydelaney)
- **Metrics:** fix `grafana_database_conn_*` metrics, and add new `go_sql_stats_*` metrics as eventual replacement. [#54405](https://github.com/grafana/grafana/pull/54405), [@hairyhenderson](https://github.com/hairyhenderson)
- **TestData DB:** Fix node graph not showing when the `Data type` field is set to `random`. [#54298](https://github.com/grafana/grafana/pull/54298), [@CrypticSignal](https://github.com/CrypticSignal)
### Deprecations
The `grafana_database_conn_*` metrics are deprecated, and will be removed in a future version of Grafana. Use the `go_sql_stats_*` metrics instead. Issue [#54405](https://github.com/grafana/grafana/issues/54405)
<!-- 9.1.3 END -->
<!-- 9.1.2 START -->
# 9.1.2 (2022-08-30)
@@ -1090,18 +329,6 @@ In Prometheus, browser access mode was deprecated in Grafana 7.4.0 and removed i
- **Grafana/UI:** Add ColorPickerInput component. [#52222](https://github.com/grafana/grafana/pull/52222), [@Clarity-89](https://github.com/Clarity-89)
- **Plugins:** Validate root URLs when signing private plugins via grafana-toolkit. [#51968](https://github.com/grafana/grafana/pull/51968), [@wbrowne](https://github.com/wbrowne)
<!-- 9.0.9 START -->
# 9.0.9 (2022-09-20)
### Bug fixes
- **AngularPanels:** Fixing changing angular panel options not taking having affect when coming back from panel edit. [#54834](https://github.com/grafana/grafana/pull/54834), [@grafanabot](https://github.com/grafanabot)
- **AuthNZ:** Security fixes for CVE-2022-35957 and CVE-2022-36062. [#55498](https://github.com/grafana/grafana/pull/55498), [@IevaVasiljeva](https://github.com/IevaVasiljeva)
- **FIX:** RBAC prevents deleting empty snapshots (#54385). [#54509](https://github.com/grafana/grafana/pull/54509), [@gamab](https://github.com/gamab)
<!-- 9.0.9 END -->
<!-- 9.0.8 START -->
# 9.0.8 (2022-08-30)
@@ -1834,40 +1061,6 @@ In the Loki data source, for consistency and performance reasons, we changed how
The dependency to [grafana/aws-sdk](https://github.com/grafana/grafana-aws-sdk-react) is moved from [grafana/ui](https://github.com/grafana/grafana/blob/main/packages/grafana-ui/package.json) to the plugin. This means that any plugin that use SIGV4 auth need to pass a SIGV4 editor component as a prop to the `DataSourceHttpSettings` component. Issue [#43559](https://github.com/grafana/grafana/issues/43559)
<!-- 8.5.15 START -->
# 8.5.15 (2022-11-08)
### Features and enhancements
- **Chore:** Upgrade Go to 1.19.2. [#56857](https://github.com/grafana/grafana/pull/56857), [@sakjur](https://github.com/sakjur)
<!-- 8.5.15 END -->
<!-- 8.5.14 START -->
# 8.5.14 (2022-10-11)
### Features and enhancements
- **Access Control:** Allow org admins to invite new users. [#55585](https://github.com/grafana/grafana/pull/55585), [@IevaVasiljeva](https://github.com/IevaVasiljeva)
<!-- 8.5.14 END -->
<!-- 8.5.13 START -->
# 8.5.13 (2022-09-20)
### Features and enhancements
- **Plugins:** Expose @emotion/react to plugins to prevent load failures. [#55297](https://github.com/grafana/grafana/pull/55297), [@jackw](https://github.com/jackw)
### Bug fixes
- **AuthNZ:** Security fixes for CVE-2022-35957 and CVE-2022-36062. [#55495](https://github.com/grafana/grafana/pull/55495), [@IevaVasiljeva](https://github.com/IevaVasiljeva)
<!-- 8.5.13 END -->
<!-- 8.5.11 START -->
# 8.5.11 (2022-08-30)

View File

@@ -15,8 +15,6 @@ You can contribute to Grafana in several ways. Here are some examples:
- Organize meetups and user groups in your local area.
- Help others by answering questions about Grafana.
**Please note:** We do not currently accept contributions for translations. Please do not submit pull requests for messages.po files - they will be rejected.
For more ways to contribute, check out the [Open Source Guides](https://opensource.guide/how-to-contribute/).
### Report bugs

View File

@@ -20,7 +20,7 @@ COPY emails emails
ENV NODE_ENV production
RUN yarn build
FROM golang:1.19.3-alpine3.15 as go-builder
FROM golang:1.17.12-alpine3.15 as go-builder
RUN apk add --no-cache gcc g++ make
@@ -57,6 +57,8 @@ ENV PATH="/usr/share/grafana/bin:$PATH" \
WORKDIR $GF_PATHS_HOME
RUN apk add --no-cache ca-certificates bash tzdata musl-utils
RUN apk add --no-cache openssl ncurses-libs ncurses-terminfo-base --repository=http://dl-cdn.alpinelinux.org/alpine/edge/main
RUN apk upgrade ncurses-libs ncurses-terminfo-base --repository=http://dl-cdn.alpinelinux.org/alpine/edge/main
RUN apk info -vv | sort
COPY conf ./conf

View File

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

View File

@@ -17,14 +17,10 @@ packages/grafana-toolkit/
packages/grafana-ui/
packages/jaeger-ui-components/
packaging/
kinds/
pkg/kinds/
pkg/kindsys/
pkg/registry/corekind/
pkg/coremodel/
pkg/framework/coremodel/
grafana-mixin/
public/app/plugins/datasource/tempo
public/img/icons/solid/
public/img/icons/unicons/
cue/
```
The following directories and their subdirectories are licensed under their original upstream licenses:

View File

@@ -42,32 +42,24 @@ $(MERGED_SPEC_TARGET): $(SPEC_TARGET) $(NGALERT_SPEC_TARGET) $(SWAGGER) ## Merge
# known conflicts DsPermissionType, AddApiKeyCommand, Json, Duration (identical models referenced by both specs)
$(SWAGGER) mixin $(SPEC_TARGET) $(NGALERT_SPEC_TARGET) --ignore-conflicts -o $(MERGED_SPEC_TARGET)
$(SPEC_TARGET): $(SWAGGER) ## Generate API Swagger specification
SWAGGER_GENERATE_EXTENSION=false $(SWAGGER) generate spec -m -w pkg/server -o $(SPEC_TARGET) \
--swagger-api-spec: $(SWAGGER) ## Generate API Swagger specification
SWAGGER_GENERATE_EXTENSION=false $(SWAGGER) generate spec -m -w pkg/server -o public/api-spec.json \
-x "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" \
-x "github.com/prometheus/alertmanager" \
-i pkg/api/swagger_tags.json \
--exclude-tag=alpha
-i pkg/api/swagger_tags.json
swagger-api-spec: gen-go $(SPEC_TARGET) $(MERGED_SPEC_TARGET) validate-api-spec
swagger-api-spec: gen-go --swagger-api-spec $(MERGED_SPEC_TARGET) validate-api-spec
validate-api-spec: $(MERGED_SPEC_TARGET) $(SWAGGER) ## Validate API spec
$(SWAGGER) validate $(<)
clean-api-spec:
rm $(SPEC_TARGET) $(MERGED_SPEC_TARGET) $(OAPI_SPEC_TARGET)
##@ OpenAPI 3
OAPI_SPEC_TARGET = public/openapi3.json
openapi3-gen: swagger-api-spec ## Generates OpenApi 3 specs from the Swagger 2 already generated
$(GO) run scripts/openapi3/openapi3conv.go $(MERGED_SPEC_TARGET) $(OAPI_SPEC_TARGET)
rm $(SPEC_TARGET) $(MERGED_SPEC_TARGET)
##@ Building
gen-cue: ## Do all CUE/Thema code generation
@echo "generate code from .cue files"
go generate ./pkg/plugins/plugindef
go generate ./kinds/gen.go
go generate ./pkg/framework/coremodel
go generate ./public/app/plugins
@@ -75,9 +67,6 @@ gen-go: $(WIRE) gen-cue
@echo "generate go files"
$(WIRE) gen -tags $(WIRE_TAGS) ./pkg/server ./pkg/cmd/grafana-cli/runner
gen-jsonnet:
go generate ./devenv/jsonnet
build-go: $(MERGED_SPEC_TARGET) gen-go ## Build all Go binaries.
@echo "build go files"
$(GO) run build.go $(GO_BUILD_FLAGS) build
@@ -122,13 +111,13 @@ test-go-integration: ## Run integration tests for backend with flags.
test-go-integration-postgres: devenv-postgres ## Run integration tests for postgres backend with flags.
@echo "test backend integration postgres tests"
$(GO) clean -testcache
$(GO) list './pkg/...' | xargs -I {} sh -c 'GRAFANA_TEST_DB=postgres go test -run Integration -covermode=atomic -timeout=2m {}'
$(GO) list './pkg/...' | xargs -I {} sh -c 'GRAFANA_TEST_DB=postgres go test -run Integration -covermode=atomic -timeout=30m {}'
.PHONY: test-go-integration-mysql
test-go-integration-mysql: devenv-mysql ## Run integration tests for mysql backend with flags.
@echo "test backend integration mysql tests"
$(GO) clean -testcache
$(GO) list './pkg/...' | xargs -I {} sh -c 'GRAFANA_TEST_DB=mysql go test -run Integration -covermode=atomic -timeout=2m {}'
$(GO) list './pkg/...' | xargs -I {} sh -c 'GRAFANA_TEST_DB=mysql go test -run Integration -covermode=atomic -timeout=30m {}'
test-js: ## Run tests for frontend.
@echo "test frontend"
@@ -140,7 +129,7 @@ test: test-go test-js ## Run all tests.
golangci-lint: $(GOLANGCI_LINT)
@echo "lint via golangci-lint"
$(GOLANGCI_LINT) run \
--config .golangci.toml \
--config ./conf/.golangci.toml \
$(GO_FILES)
lint-go: golangci-lint ## Run all code checks for backend. You can use GO_FILES to specify exact files to check
@@ -164,7 +153,7 @@ build-docker-full-ubuntu: ## Build Docker image based on Ubuntu for development.
##@ Services
# create docker-compose file with provided sources and start them
# example: make devenv sources=postgres,auth/openldap
# example: make devenv sources=postgres,openldap
ifeq ($(sources),)
devenv:
@printf 'You have to define sources for this command \nexample: make devenv sources=postgres,openldap\n'

View File

@@ -18,7 +18,7 @@ Grafana allows you to query, visualize, alert on and understand your metrics no
## Get started
- [Get Grafana](https://grafana.com/get)
- [Installation guides](https://grafana.com/docs/grafana/latest/setup-grafana/installation/)
- [Installation guides](http://docs.grafana.org/installation/)
Unsure if Grafana is for you? Watch Grafana in action on [play.grafana.org](https://play.grafana.org/)!

38
api-extractor.json Normal file
View File

@@ -0,0 +1,38 @@
{
"$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
"mainEntryPointFilePath": "<projectFolder>/dist/index.d.ts",
"bundledPackages": [],
"compiler": {},
"apiReport": {
"enabled": false
},
"docModel": {
"enabled": true,
"apiJsonFilePath": "<projectFolder>/../../reports/docs/<unscopedPackageName>.api.json"
},
"dtsRollup": {
"enabled": false
},
"tsdocMetadata": {},
"messages": {
"compilerMessageReporting": {
"default": {
"logLevel": "warning"
}
},
"extractorMessageReporting": {
"default": {
"logLevel": "warning"
},
"ae-internal-missing-underscore": {
"logLevel": "none",
"addToApiReportFile": false
}
},
"tsdocMessageReporting": {
"default": {
"logLevel": "warning"
}
}
}
}

134
conf/.golangci.toml Normal file
View File

@@ -0,0 +1,134 @@
[run]
timeout = "10m"
[linters-settings.goconst]
min-len = 5
min-occurrences = 5
[linters-settings.exhaustive]
default-signifies-exhaustive = true
[linters-settings.revive]
ignore-generated-header = false
severity = "warning"
confidence = 3
[linters-settings.gocritic]
enabled-checks = ["ruleguard"]
[linters-settings.gocritic.settings.ruleguard]
rules = "pkg/ruleguard.rules.go"
[linters]
disable-all = true
enable = [
"bodyclose",
"deadcode",
"depguard",
"dogsled",
"errcheck",
# "gochecknoinits",
"goconst",
"gocritic",
"goimports",
"goprintffuncname",
"gosec",
"gosimple",
"govet",
"ineffassign",
"misspell",
"nakedret",
"rowserrcheck",
"exportloopref",
"staticcheck",
"structcheck",
"stylecheck",
"typecheck",
"unconvert",
"unused",
"varcheck",
"whitespace",
"gocyclo",
"exhaustive",
"typecheck",
"asciicheck",
"errorlint",
"sqlclosecheck",
"revive",
]
# Disabled linters (might want them later)
# "unparam"
[issues]
exclude-use-default = false
# Enable when appropriate
# Poorly chosen identifier
[[issues.exclude-rules]]
linters = ["stylecheck"]
text = "ST1003"
# Enable when appropriate
# Dot imports that aren't in external test packages are discouraged.
[[issues.exclude-rules]]
linters = ["stylecheck"]
text = "ST1001"
[[issues.exclude-rules]]
linters = ["gosec"]
text = "G108"
[[issues.exclude-rules]]
linters = ["gosec"]
text = "G110"
[[issues.exclude-rules]]
linters = ["gosec"]
text = "G201"
[[issues.exclude-rules]]
linters = ["gosec"]
text = "G202"
[[issues.exclude-rules]]
linters = ["gosec"]
text = "G306"
[[issues.exclude-rules]]
linters = ["gosec"]
text = "401"
[[issues.exclude-rules]]
linters = ["gosec"]
text = "402"
[[issues.exclude-rules]]
linters = ["gosec"]
text = "501"
[[issues.exclude-rules]]
linters = ["gosec"]
text = "404"
[[issues.exclude-rules]]
linters = ["misspell"]
text = "Unknwon` is a misspelling of `Unknown"
[[issues.exclude-rules]]
linters = ["errorlint"]
text = "non-wrapping format verb for fmt.Errorf"
# TODO: Enable
[[issues.exclude-rules]]
linters = ["stylecheck"]
text = "ST1000"
# TODO: Enable
[[issues.exclude-rules]]
linters = ["stylecheck"]
text = "ST1020"
# TODO: Enable
[[issues.exclude-rules]]
linters = ["stylecheck"]
text = "ST1021"

View File

@@ -66,15 +66,6 @@ enable_gzip = false
cert_file =
cert_key =
# Unix socket gid
# Changing the gid of a file without privileges requires that the target group is in the group of the process and that the process is the file owner
# It is recommended to set the gid as http server user gid
# Not set when the value is -1
socket_gid = -1
# Unix socket mode
socket_mode = 0660
# Unix socket path
socket = /tmp/grafana.sock
@@ -137,12 +128,6 @@ cache_mode = private
# For "mysql" only if migrationLocking feature toggle is set. How many seconds to wait before failing to lock the database for the migrations, default is 0.
locking_attempt_timeout_sec = 0
# For "sqlite" only. How many times to retry query in case of database is locked failures. Default is 0 (disabled).
query_retries = 0
# For "sqlite" only. How many times to retry transaction in case of database is locked failures. Default is 5.
transaction_retries = 5
#################################### Cache server #############################
[remote_cache]
# Either "redis", "memcached" or "database" default is "database"
@@ -227,12 +212,6 @@ check_for_plugin_updates = true
# Google Analytics universal tracking code, only enabled if you specify an id here
google_analytics_ua_id =
# Google Analytics 4 tracking code, only enabled if you specify an id here
google_analytics_4_id =
# When Google Analytics 4 Enhanced event measurement is enabled, we will try to avoid sending duplicate events and let Google Analytics 4 detect navigation changes, etc.
google_analytics_4_send_manual_page_views = false
# Google Tag Manager ID, only enabled if you specify an id here
google_tag_manager_id =
@@ -268,9 +247,6 @@ admin_user = admin
# default admin password, can be changed before first start of grafana, or in profile settings
admin_password = admin
# default admin email, created on startup
admin_email = admin@localhost
# used for signing
secret_key = SW2YcwTIb9zpOOhoPsMm
@@ -427,9 +403,6 @@ hidden_users =
# Login cookie name
login_cookie_name = grafana_session
# Disable usage of Grafana build-in login solution.
disable_login = false
# The maximum lifetime (duration) an authenticated user can be inactive before being required to login at next visit. Default is 7 days (7d). This setting should be expressed as a duration, e.g. 5m (minutes), 6h (hours), 10d (days), 2w (weeks), 1M (month). The lifetime resets at each successful token rotation (token_rotation_interval_minutes).
login_maximum_inactive_lifetime_duration =
@@ -499,7 +472,6 @@ team_ids =
allowed_organizations =
role_attribute_path =
role_attribute_strict = false
allow_assign_grafana_admin = false
#################################### GitLab Auth #########################
[auth.gitlab]
@@ -515,7 +487,6 @@ allowed_domains =
allowed_groups =
role_attribute_path =
role_attribute_strict = false
allow_assign_grafana_admin = false
#################################### Google Auth #########################
[auth.google]
@@ -561,8 +532,6 @@ token_url = https://login.microsoftonline.com/<tenant-id>/oauth2/v2.0/token
allowed_domains =
allowed_groups =
role_attribute_strict = false
allow_assign_grafana_admin = false
force_use_graph_api = false
#################################### Okta OAuth #######################
[auth.okta]
@@ -580,7 +549,6 @@ allowed_domains =
allowed_groups =
role_attribute_path =
role_attribute_strict = false
allow_assign_grafana_admin = false
#################################### Generic OAuth #######################
[auth.generic_oauth]
@@ -614,7 +582,6 @@ tls_client_key =
tls_client_ca =
use_pkce = false
auth_style =
allow_assign_grafana_admin = false
#################################### Basic Auth ##########################
[auth.basic]
@@ -642,20 +609,15 @@ username_claim =
jwk_set_url =
jwk_set_file =
cache_ttl = 60m
expect_claims = {}
expected_claims = {}
key_file =
role_attribute_path =
role_attribute_strict = false
auto_sign_up = false
url_login = false
allow_assign_grafana_admin = false
#################################### Auth LDAP ###########################
[auth.ldap]
enabled = false
config_file = /etc/grafana/ldap.toml
allow_sign_up = true
skip_org_role_sync = false
# LDAP background sync (Enterprise only)
# At 1 am every day
@@ -693,7 +655,7 @@ managed_identity_client_id =
#################################### Role-based Access Control ###########
[rbac]
# If enabled, cache permissions in a in memory cache
# If enabled, cache permissions in a in memory cache (Enterprise only)
permission_cache = true
#################################### SMTP / Emailing #####################
@@ -969,10 +931,6 @@ max_annotations_to_keep =
# Configures the batch size for the annotation clean-up job. This setting is used for dashboard, API, and alert annotations.
cleanupjob_batchsize = 100
# Enforces the maximum allowed length of the tags for any newly introduced annotations. It can be between 500 and 4096 inclusive (which is the respective's column length). Default value is 500.
# Setting it to a higher value would impact performance therefore is not recommended.
tags_length = 500
[annotations.dashboard]
# Dashboard annotations means that annotations are associated with the dashboard they are created on.
@@ -1070,11 +1028,6 @@ zipkin_propagation = false
# Not disabling is the most common setting when using Zipkin elsewhere in your infrastructure.
disable_shared_zipkin_spans = false
[tracing.opentelemetry]
# attributes that will always be included in when creating new spans. ex (key1:value1,key2:value2)
custom_attributes =
[tracing.opentelemetry.jaeger]
# jaeger destination (ex http://localhost:14268/api/traces)
address =
@@ -1121,7 +1074,6 @@ signed_url_expiration =
account_name =
account_key =
container_name =
sas_token_expiration_days =
[external_image_storage.local]
# does not require any configuration
@@ -1137,11 +1089,6 @@ renderer_token = -
# Concurrent render request limit affects when the /render HTTP endpoint is used. Rendering many images at the same time can overload the server,
# which this setting can help protect against by only allowing a certain amount of concurrent requests.
concurrent_render_request_limit = 30
# Determines the lifetime of the render key used by the image renderer to access and render Grafana.
# This setting should be expressed as a duration. Examples: 10s (seconds), 5m (minutes), 2h (hours).
# Default is 5m. This should be more than enough for most deployments.
# Change the value only if image rendering is failing and you see `Failed to get the render key from cache` in Grafana logs.
render_key_lifetime = 5m
[panels]
# here for to support old env variables, can remove after a few months
@@ -1256,7 +1203,20 @@ license_path =
# enable = feature1,feature2
enable =
internationalization = true
# 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
# feature1 = true
# feature2 = false
@@ -1317,29 +1277,3 @@ scheduler_interval =
[storage]
# Allow uploading SVG files without sanitization.
allow_unsanitized_svg_upload = false
#################################### Search ################################################
[search]
# Defines the number of dashboards loaded at once in a batch during a full reindex.
# This is a temporary settings that might be removed in the future.
dashboard_loading_batch_size = 200
# Defines the frequency of a full search reindex.
# This is a temporary settings that might be removed in the future.
full_reindex_interval = 5m
# Defines the frequency of partial index updates based on recent changes such as dashboard updates.
# This is a temporary settings that might be removed in the future.
index_update_interval = 10s
# Move an app plugin referenced by its id (including all its pages) to a specific navigation section
# Dependencies: needs the `topnav` feature to be enabled
# Format: <Plugin ID> = <Section ID> <Sort Weight>
[navigation.app_sections]
# Move a specific app plugin page (referenced by its `path` field) to a specific navigation section
# Format: <Page URL> = <Section ID> <Sort Weight>
[navigation.app_standalone_pages]

View File

@@ -24,8 +24,6 @@ bind_dn = "cn=admin,dc=grafana,dc=org"
# Search user bind password
# If the password contains # or ; you have to wrap it with triple quotes. Ex """#password;"""
bind_password = 'grafana'
# We recommend using variable expansion for the bind_password, for more info https://grafana.com/docs/grafana/latest/setup-grafana/configure-grafana/#variable-expansion
# bind_password = '$__env{LDAP_BIND_PASSWORD}'
# Timeout in seconds (applies to each host specified in the 'host' entry (space separated))
timeout = 10
@@ -60,7 +58,7 @@ org_role = "Admin"
# org_id = 1
[[servers.group_mappings]]
group_dn = "cn=editors,ou=groups,dc=grafana,dc=org"
group_dn = "cn=users,ou=groups,dc=grafana,dc=org"
org_role = "Editor"
[[servers.group_mappings]]

View File

@@ -19,9 +19,9 @@
# # <string, required> action allowed.
# - action: 'users:read'
# #<string> scope it applies to.
# scope: 'global.users:*'
# scope: 'users:*'
# - action: 'users:write'
# scope: 'global.users:*'
# scope: 'users:*'
# - action: 'users:create'
# - name: 'custom:global:users:reader'
# # <bool> overwrite org id and creates a global role.
@@ -42,9 +42,9 @@
# # <list> list of the permissions to add/remove on top of the copied ones.
# permissions:
# - action: 'users:read'
# scope: 'global.users:*'
# scope: 'users:*'
# - action: 'users:write'
# scope: 'global.users:*'
# scope: 'users:*'
# # <string> state of the permission. Defaults to 'present'. If 'absent', the permission will be removed.
# state: absent

View File

@@ -56,7 +56,6 @@ apiVersion: 1
# # <string> state of the alert rule when the query execution
# # fails - possible values: "Error", "Alerting", "OK"
# # default = Alerting
# executionErrorState: Alerting
# # <duration, required> how long the alert condition should be breached before Firing. Before this time has elapsed, the alert is considered to be Pending
# for: 60s
# # <map<string, string>> map of strings to attach arbitrary custom data
@@ -133,7 +132,7 @@ apiVersion: 1
# # <duration> How long to wait before sending a notification about new alerts that
# # are added to a group of alerts for which an initial notification has
# # already been sent. (Usually ~5m or more), default = 5m
# group_interval: 5m
# group_internval: 5m
# # <duration> How long to wait before sending a notification again if it has already
# # been sent successfully for an alert. (Usually ~3h or more), default = 4h
# repeat_interval: 4h

View File

@@ -67,15 +67,6 @@
;cert_file =
;cert_key =
# Unix socket gid
# Changing the gid of a file without privileges requires that the target group is in the group of the process and that the process is the file owner
# It is recommended to set the gid as http server user gid
# Not set when the value is -1
;socket_gid =
# Unix socket mode
;socket_mode =
# Unix socket path
;socket =
@@ -103,8 +94,7 @@
# Example: mysql://user:secret@host:port/database
;url =
# For "postgres", use either "disable", "require" or "verify-full"
# For "mysql", use either "true", "false", or "skip-verify".
# For "postgres" only, either "disable", "require" or "verify-full"
;ssl_mode = disable
# Database drivers may support different transaction isolation levels.
@@ -139,12 +129,6 @@
# For "mysql" only if migrationLocking feature toggle is set. How many seconds to wait before failing to lock the database for the migrations, default is 0.
;locking_attempt_timeout_sec = 0
# For "sqlite" only. How many times to retry query in case of database is locked failures. Default is 0 (disabled).
;query_retries = 0
# For "sqlite" only. How many times to retry transaction in case of database is locked failures. Default is 5.
;transaction_retries = 5
################################### Data sources #########################
[datasources]
# Upper limit of data sources that Grafana will return. This limit is a temporary configuration and it will be deprecated when pagination will be introduced on the list data sources API.
@@ -234,12 +218,6 @@
# Google Analytics universal tracking code, only enabled if you specify an id here
;google_analytics_ua_id =
# Google Analytics 4 tracking code, only enabled if you specify an id here
;google_analytics_4_id =
# When Google Analytics 4 Enhanced event measurement is enabled, we will try to avoid sending duplicate events and let Google Analytics 4 detect navigation changes, etc.
;google_analytics_4_send_manual_page_views = false
# Google Tag Manager ID, only enabled if you specify an id here
;google_tag_manager_id =
@@ -269,9 +247,6 @@
# default admin password, can be changed before first start of grafana, or in profile settings
;admin_password = admin
# default admin email, created on startup
;admin_email = admin@localhost
# used for signing
;secret_key = SW2YcwTIb9zpOOhoPsMm
@@ -428,9 +403,6 @@
# Login cookie name
;login_cookie_name = grafana_session
# Disable usage of Grafana build-in login solution.
;disable_login = false
# The maximum lifetime (duration) an authenticated user can be inactive before being required to login at next visit. Default is 7 days (7d). This setting should be expressed as a duration, e.g. 5m (minutes), 6h (hours), 10d (days), 2w (weeks), 1M (month). The lifetime resets at each successful token rotation.
;login_maximum_inactive_lifetime_duration =
@@ -498,9 +470,6 @@
;allowed_domains =
;team_ids =
;allowed_organizations =
;role_attribute_path =
;role_attribute_strict = false
;allow_assign_grafana_admin = false
#################################### GitLab Auth #########################
[auth.gitlab]
@@ -514,9 +483,6 @@
;api_url = https://gitlab.com/api/v4
;allowed_domains =
;allowed_groups =
;role_attribute_path =
;role_attribute_strict = false
;allow_assign_grafana_admin = false
#################################### Google Auth ##########################
[auth.google]
@@ -553,7 +519,6 @@
;allowed_domains =
;allowed_groups =
;role_attribute_strict = false
;allow_assign_grafana_admin = false
#################################### Okta OAuth #######################
[auth.okta]
@@ -570,7 +535,6 @@
;allowed_groups =
;role_attribute_path =
;role_attribute_strict = false
;allow_assign_grafana_admin = false
#################################### Generic OAuth ##########################
[auth.generic_oauth]
@@ -603,7 +567,6 @@
;tls_client_ca =
;use_pkce = false
;auth_style =
;allow_assign_grafana_admin = false
#################################### Basic Auth ##########################
[auth.basic]
@@ -632,21 +595,16 @@
;jwk_set_url = https://foo.bar/.well-known/jwks.json
;jwk_set_file = /path/to/jwks.json
;cache_ttl = 60m
;expect_claims = {"aud": ["foo", "bar"]}
;expected_claims = {"aud": ["foo", "bar"]}
;key_file = /path/to/key/file
;role_attribute_path =
;role_attribute_strict = false
;auto_sign_up = false
;url_login = false
;allow_assign_grafana_admin = false
#################################### Auth LDAP ##########################
[auth.ldap]
;enabled = false
;config_file = /etc/grafana/ldap.toml
;allow_sign_up = true
# prevent synchronizing ldap users organization roles
;skip_org_role_sync = false
# LDAP background sync (Enterprise only)
# At 1 am every day
@@ -938,10 +896,6 @@
# Configures the batch size for the annotation clean-up job. This setting is used for dashboard, API, and alert annotations.
;cleanupjob_batchsize = 100
# Enforces the maximum allowed length of the tags for any newly introduced annotations. It can be between 500 and 4096 inclusive (which is the respective's column length). Default value is 500.
# Setting it to a higher value would impact performance therefore is not recommended.
;tags_length = 500
[annotations.dashboard]
# Dashboard annotations means that annotations are associated with the dashboard they are created on.
@@ -1039,10 +993,6 @@
# Not disabling is the most common setting when using Zipkin elsewhere in your infrastructure.
;disable_shared_zipkin_spans = false
[tracing.opentelemetry]
# attributes that will always be included in when creating new spans. ex (key1:value1,key2:value2)
;custom_attributes = key1:value1,key2:value2
[tracing.opentelemetry.jaeger]
# jaeger destination (ex http://localhost:14268/api/traces)
; address = http://localhost:14268/api/traces
@@ -1086,7 +1036,6 @@
;account_name =
;account_key =
;container_name =
;sas_token_expiration_days =
[external_image_storage.local]
# does not require any configuration
@@ -1102,11 +1051,6 @@
# Concurrent render request limit affects when the /render HTTP endpoint is used. Rendering many images at the same time can overload the server,
# which this setting can help protect against by only allowing a certain amount of concurrent requests.
;concurrent_render_request_limit = 30
# Determines the lifetime of the render key used by the image renderer to access and render Grafana.
# This setting should be expressed as a duration. Examples: 10s (seconds), 5m (minutes), 2h (hours).
# Default is 5m. This should be more than enough for most deployments.
# Change the value only if image rendering is failing and you see `Failed to get the render key from cache` in Grafana logs.
;render_key_lifetime = 5m
[panels]
# If set to true Grafana will allow script tags in text panels. Not recommended as it enable XSS vulnerabilities.
@@ -1258,14 +1202,3 @@
# Enable or disable loading other base map layers
;enable_custom_baselayers = true
# Move an app plugin referenced by its id (including all its pages) to a specific navigation section
# Dependencies: needs the `topnav` feature to be enabled
[navigation.app_sections]
# The following will move an app plugin with the id of `my-app-id` under the `starred` section
# my-app-id = admin
# Move a specific app plugin page (referenced by its `path` field) to a specific navigation section
[navigation.app_standalone_pages]
# The following will move the page with the path "/a/my-app-id/starred-content" from `my-app-id` to the `starred` section
# /a/my-app-id/starred-content = starred

View File

@@ -11,6 +11,7 @@ This directory contains guides for contributors to the Grafana project.
The `style-guides` directory contains style guides for the Grafana software project and documentation.
- [Backend style guide](style-guides/backend.md) for how to style and format backend functionality and code.
- [Documentation style guide](style-guides/documentation-style-guide.md) for how to style and format documentation.
- [Frontend style guide](style-guides/frontend.md) for how to style and format the user-facing functionality and code.
- [Redux framework](style-guides/redux.md) for designing the Grafana redux framework.
- [Themes style guide](style-guides/themes.md) for designing and updating Grafana themes.

View File

@@ -62,7 +62,7 @@ You can now make SQL queries in any of your [command handlers](communication.md#
```go
func (s *MyService) DeleteDashboard(ctx context.Context, cmd *models.DeleteDashboardCommand) error {
if err := s.SQLStore.WithDbSession(ctx, func(sess *db.Session) error {
if err := s.SQLStore.WithDbSession(ctx, func(sess *sqlstore.DBSession) error {
_, err := sess.Exec("DELETE FROM dashboards WHERE dashboard_id=?", cmd.DashboardID)
return err
})

View File

@@ -29,28 +29,11 @@ Grafana (e.g. `StatusBadRequest` is generally speaking not as relevant
as `StatusInternal`). All available status codes live in the `errutil`
package and have names starting with `Status`.
The messageID is constructed as `<servicename>.<errorIdentifier>` where
The messageID is constructed as `<servicename>.<error-identifier>` where
the `<servicename>` corresponds to the root service directory per
[the package hierarchy](package-hierarchy.md) and `<errorIdentifier>`
is a camelCased short identifier that identifies the specific category
of errors within the service.
Errors should be grouped together (i.e. share `errutil.Base`) based on
their public facing properties, a single messageID should represent a
translatable string and what metadata is carried with it.
_service.MissingRequiredFields_ and _service.MessageTooLong_ are likely
to be two different errors that are both validation failures, as their
user-friendly expansions are likely different. This is the maximization
rule of declaring as many `errutil.Error`s as you need public message
structures.
The other side of this is that even though a login service's
"user is ratelimited", "user does not exist", "wrong username", and
"wrong password" are reasonable errors to separate between internally,
for security reasons the end-user should not be told which particular
error they struck. This means that they should share the same base (such
as _login.Failed_). This is the minimization rule of grouping together
distinct logged errors that provide the same information via the API.
[the package hierarchy](package-hierarchy.md) and `<error-identifier>`
is a short identifier using dashes for word separation that identifies
the specific category of errors within the service.
To set a static message sent to the client when the error occurs, the
`errutil.WithPublicMessage(message string)` option may be appended to
@@ -70,7 +53,7 @@ import (
"example.org/thing"
)
var ErrBaseNotFound = errutil.NewBase(errutil.StatusNotFound, "main.notFound", errutil.WithPublicMessage("Thing not found"))
var ErrBaseNotFound = errutil.NewBase(errutil.StatusNotFound, "main.not-found", errutil.WithPublicMessage("Thing not found"))
func Look(id int) (*Thing, error) {
t, err := thing.GetByID(id)
@@ -82,22 +65,17 @@ func Look(id int) (*Thing, error) {
}
```
Errors consider themselves to be both its `errutil.Base` or
`errutil.Template` and whatever errors it wraps for the purposes of the
`errors.Is` function.
Check out the package and method documentation for
github.com/grafana/grafana/pkg/util/errutil for details on how to
construct and use Grafana style errors. This documentation is
unfortunately not readily available on pkg.go.dev because Grafana is not
fully Go modules compatible, but can be viewed using
[godoc](https://go.dev/cmd/godoc/) from the Grafana directory.
Check out [errutil's GoDocs](https://pkg.go.dev/github.com/grafana/grafana@v0.0.0-20220621133844-0f4fc1290421/pkg/util/errutil)
for details on how to construct and use Grafana style errors.
### Handling errors in the API
API handlers use the `github.com/grafana/grafana/pkg/api/response.Err`
or `github.com/grafana/grafana/pkg/api/response.ErrWithFallback`
(same signature as `response.Error`) function to create responses based
on `errutil.Error`.
function to create responses based on `errutil.Error`s.
Using `response.Err` requires all errors to be Grafana style errors.
> **Note:** (@sakjur 2022-06) `response.Err` requires all errors to be
> `errutil.Error` or it'll be considered an internal server error.
> This is something that should be fixed in the near future to allow
> fallback behavior to make it possible to correctly handle Grafana
> style errors if they're present but allow fallback to a reasonable
> default otherwise.

View File

@@ -19,11 +19,11 @@ package example
type Service struct {
logger log.Logger
cfg *setting.Cfg
sqlStore db.DB
sqlStore *sqlstore.SQLStore
}
// ProvideService provides Service as dependency for other services.
func ProvideService(cfg *setting.Cfg, sqlStore db.DB) (*Service, error) {
func ProvideService(cfg *setting.Cfg, sqlStore *sqlstore.SQLStore) (*Service, error) {
s := &Service{
logger: log.New("service"),
cfg: cfg,
@@ -76,7 +76,7 @@ package server
import (
"github.com/google/wire"
"github.com/grafana/grafana/pkg/example"
"github.com/grafana/grafana/pkg/infra/db"
"github.com/grafana/grafana/pkg/services/sqlstore"
)
var wireBasicSet = wire.NewSet(
@@ -98,7 +98,7 @@ func Initialize(cla setting.CommandLineArgs, opts Options, apiOpts api.ServerOpt
return &Server{}, nil
}
func InitializeForTest(cla setting.CommandLineArgs, opts Options, apiOpts api.ServerOptions, sqlStore db.DB) (*Server, error) {
func InitializeForTest(cla setting.CommandLineArgs, opts Options, apiOpts api.ServerOptions, sqlStore *sqlstore.SQLStore) (*Server, error) {
wire.Build(wireExtsTestSet)
return &Server{}, nil
}

View File

@@ -1,6 +1,6 @@
# Data requests
[BackendSrv](https://github.com/grafana/grafana/blob/main/packages/grafana-runtime/src/services/backendSrv.ts) handles all outgoing HTTP requests from Grafana. This document explains the high-level concepts used by `BackendSrv`.
[BackendSrv](https://grafana.com/docs/grafana/latest/packages_api/runtime/backendsrv) handles all outgoing HTTP requests from Grafana. This document explains the high-level concepts used by `BackendSrv`.
## Canceling requests
@@ -14,7 +14,7 @@ Grafana uses a concept called _request cancellation_ to cancel any ongoing reque
#### Before Grafana 7.2
Before Grafana can cancel any data request, it has to identify that request. Grafana identifies a request using the property `requestId` [passed as options](https://github.com/grafana/grafana/blob/main/packages/grafana-runtime/src/services/backendSrv.ts#L47) when you use [BackendSrv](https://github.com/grafana/grafana/blob/main/packages/grafana-runtime/src/services/backendSrv.ts).
Before Grafana can cancel any data request, it has to identify that request. Grafana identifies a request using the property `requestId` [passed as options](https://github.com/grafana/grafana/blob/main/docs/sources/packages_api/runtime/backendsrvrequest.md) when you use [BackendSrv](https://grafana.com/docs/grafana/latest/packages_api/runtime/backendsrv).
The cancellation logic is as follows:
@@ -23,7 +23,7 @@ The cancellation logic is as follows:
#### After Grafana 7.2
Grafana 7.2 introduced an additional way of canceling requests using [RxJs](https://github.com/ReactiveX/rxjs). To support the new cancellation functionality, the data source needs to use the new `fetch` function in [BackendSrv](https://github.com/grafana/grafana/blob/main/packages/grafana-runtime/src/services/backendSrv.ts).
Grafana 7.2 introduced an additional way of canceling requests using [RxJs](https://github.com/ReactiveX/rxjs). To support the new cancellation functionality, the data source needs to use the new `fetch` function in [BackendSrv](https://grafana.com/docs/grafana/latest/packages_api/runtime/backendsrv).
Migrating the core data sources to the new `fetch` function [is an ongoing process that you can read about in this issue.](https://github.com/grafana/grafana/issues/27222)

View File

@@ -55,9 +55,16 @@ Pull requests that create new UI components or modify existing ones must adhere
- Use the [Grafana theme palette](/contribute/style-guides/themes.md) for styling. It contains colors with good contrast which aids accessibility.
- Use [RTL](https://testing-library.com/docs/dom-testing-library/api-accessibility/) for writing unit tests. It helps to create accessible components.
### Accessibility-specific guidelines
Pull requests that introduce accessibility(a11y) errors:
Pull requests that introduce accessibility(a11y) errors - please refer to the [accessibility guidelines](/contribute/style-guides/accessibility.md).
We use [pa11y-ci](https://github.com/pa11y/pa11y-ci) to collect accessibility errors on [some URLs on the project](https://github.com/grafana/grafana/issues/36555), threshold errors are specified per URL.
If the contribution introduces new a11y errors, our continuous integration will fail, preventing you to merge on the main branch. In those cases there are two alternatives for moving forward:
- Check the error log on the pipeline step `test-a11y-frontend-pr`, identify what was the error, and fix it.
- Locally run the command `yarn test:accessibility-report` that generates an HTML accessibility report, then go to the URL that contains your change, identify the error, and fix it. Keep in mind, a local e2e Grafana instance is going to be running on `http://localhost:3001`.
You can also prevent introducing a11y errors by installing an a11y plugin in your browser, for example, axe DevTools, Accessibility Insights for Web among others.
### Betterer

View File

@@ -149,13 +149,13 @@ go test -covermode=atomic -tags=integration ./pkg/...
To run PostgreSQL and MySQL integration tests locally, you need to start the docker blocks for MySQL and/or PostgreSQL test data sources by running `make devenv sources=mysql_tests,postgres_tests`. When your test data sources are running, you can execute integration tests by running:
```bash
make test-go-integration-mysql
GRAFANA_TEST_DB=mysql go test -covermode=atomic -tags=integration ./pkg/...
```
and/or
```bash
make test-go-integration-postgres
GRAFANA_TEST_DB=postgres go test -covermode=atomic -tags=integration ./pkg/...
```
### Run end-to-end tests

View File

@@ -1,7 +1,235 @@
# Contribute to our documentation
Welcome. We're glad you're here to help make our technical documentation even better.
We provide these guidelines to help our contributors make additions or corrections to our documentation.
For our style guide and writing guidelines, see [Writers' Toolkit](https://grafana.com/docs/writers-toolkit/).
## Welcome
If you're interested in contributing to the Writers' Toolkit, refer to the [Writers' Toolkit](https://github.com/grafana/writers-toolkit) repository.
Welcome. We're glad you're here to help make our technical documentation even better. We develop content that leads our users to success using Grafana products. Technical accuracy is our primary consideration, and we value the use of inclusive language. We regard your feedback as a gift - thanks for reading through these guidelines.
### Intended audience
We write these guidelines for contributors who are interested in improving our technical content.
## Understanding the structure of Grafana documentation
All Grafana Enterprise and OSS documentation is located in the [Grafana open source project](https://github.com/grafana/grafana) GitHub repository: https://github.com/grafana/grafana/tree/main/docs/sources.
- The **sources** directory organizes content by topic areas, for example **administration** and **alerting**.
- Topic directories include an `_index.md` file, which provides an overview of the topic, and optionally includes subtopics that provide more detail.
> The `_index.md` file is required.
### Writing in markdown
We write technical documentation using [Markdown](https://en.wikipedia.org/wiki/Markdown). We've put together a short guide to help you how to structure and format your content.
To access the markdown guide, refer to [Markdown style guide](documentation-markdown-guide.md).
## Ways to contribute
We're thrilled that you are considering contributing to the documentation. You can contribute content in the following ways:
- [Request a change](#request-a-change)
- [Edit a topic](#edit-a-topic)
- [Write a topic](#write-a-topic)
### Request a change
Request a change when you want to make a suggestion about a topic, but don't want to provide an edit that generates a pull request. Requesting a change gives you the freedom to express your ideas without committing language. Your suggestion can reflect a small change to wording or can reflect larger, more substantive changes.
GitHub captures your request as an **Issue** logged against the repository.
Before you begin:
- Create a GitHub account.
To request a change, complete the following steps:
1. While viewing the topic, click **Request a change**.
The Issue title auto-populates with the location of the file about which you are requesting a change.
![Request a change](request-change.png)
2. Enter a change request description.
3. Add the **type/docs** label.
4. Click **Submit new issue**.
### Edit a topic
If you want to recommend a small change, such as suggesting a correction to a topic, you can edit the topic directly in GitHub. You are not required to fork and clone the repo to use this approach.
Other small changes might include:
- Adding steps to a task
- Adding clarifying language to a concept
- Providing an example
Before you begin:
- Create a GitHub account.
To edit a topic, complete the following steps:
1. While viewing the topic you want to edit, click **Edit this page**.
![Edit a topic](edit-file.png)
2. Add your changes to the topic.
3. Scroll to the bottom of the page and enter a branch name.
For example, enter `clarified dashboard panel definition`.
4. Click **Commit**.
GitHub prompts you to create a PR.
5. Complete the prompts provided in the body of the PR.
6. Click **Create pull request**.
### Write a topic
At Grafana Labs, we use the principles of topic-based authoring when we write technical documentation. Topic-based authoring provides guidelines for writing three _types_ of technical documentation: concept, task, and reference. Before you begin writing, establish the topic type you want to write.
#### Understanding topic types
Technical content is divided into three topic types: concept, task, and reference.
- **Concept**: A concept topic explains _what_ a feature (or idea) is, and why it is important.
- **Task**: A task topic explains _how_ to complete an end user procedure in the system. Task topics contain steps.
- **Reference** A reference topic contains lookup information that a user might consult when they complete a task. Documenting a list of values with descriptions is a common form of reference topic.
**Example**
Suppose you are writing content for a site called _Doggie handbook_. You might organize your topics like this:
**Concepts**
- What a dog is
- Brief history of dogs
- Why you might want a dog
- Tasks dogs can be trained to do
**Tasks**
- Feed the dog
- Groom the dog
- Train the dog
**References**
- List of dog equipment you will need
- Table of breeds that includes breed name, size range, short or long hair, and type of dog
#### Prepare your environment
Before you begin writing, we recommend that you fork and clone the Grafana repository so that you can use a text editor locally to create branches, commit your changes, and create a PR.
While this document doesn't include git commands or descriptions of Github operations, you might find these links useful.
- [Install git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git): We store all source code, including documentation, in Git repositories.
- [Fork a repo](https://docs.github.com/en/get-started/quickstart/fork-a-repo): Locate the repo you want to clone, and fork it.
- [Clone a repo](https://docs.github.com/en/repositories/creating-and-managing-repositories/cloning-a-repository): Clone the repository to your local machine.
- [Create a branch](https://git-scm.com/book/en/v2/Git-Branching-Basic-Branching-and-Merging): Before you make change, create a branch. Do not push changes against the `main` branch.
- [Create a PR](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request): After you add, commit, and push your changes, create a PR in Github.
#### Use a documentation template to contribute a topic
We have provided documentation templates that align with each topic type:
- [Concept](templates/doc-concept-template.md)
- [Task](templates/doc-task-template.md)
- [Reference](templates/doc-reference-template.md)
Each template provides additional usage and formatting guidelines. We recommend that you make a copy of whichever template you are using, then add content.
> Remove any unused content before you commit your changes.
#### View a local build
Prior to pushing your changes, you can view a local build of the documentation so that you can review your work.
To view a local build:
1. Install [Docker](https://www.docker.com/products/docker-desktop).
1. Run Docker.
1. Navigate to the **docs** root directory.
1. Run `make build`.
1. Open `localhost:3002` to review your changes.
## Push changes and create a PR
When you are ready for other people to review your work, perform the following tasks.
1. [Add](https://git-scm.com/docs/git-add) your changes, which prepares your content for the next commit.
1. [Commit](https://git-scm.com/docs/git-commit) your changes.
1. [Push](https://git-scm.com/docs/git-push) your changes to Github.
1. [Create a PR](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request) in Github.
The docs build system automatically conducts a series of tests to ensure that the content doesn't conflict with other content in the docs repository.
### Understanding the PR review and approval workflow
When a PR is added to the repo with a label associated with `docs`, it will be reviewed by a member of the technical writing team. Depending on the size of the PR and the priority of other work, the PR will either be immediately reviewed and merged (minor fixes typically follow this pattern) or the PR will be triaged and placed in the backlog of work or moved into further development.
## Join our community
For general discussions on documentation, youre welcome to join the `#docs` channel on our [public Grafana Slack](http://slack.raintank.io) team.
## Reference: Top five writing tips
While we don't provide a comprehensive style guide in this document, here's a few writing tips to help the writing process.
### Consider the audience
Write for an audience that is computer literate and has general technical knowledge, but is not necessarily familiar with Grafana or the finer points of observability.
Pretend you are explaining your topic to a brand new Grafana user or developer.
### Write clear and concise sentences and paragraphs
Use the following sentence structure when you write: _subject_—_verb_—_object_. If you are telling a user to do something, write an imperative sentence. For example “Enter the refresh rate time interval and click Save.”
- You can also start a sentence with an _if_ clause, which positions the condition before the action.
- Limit the number of words in a sentence to 20..
### Use active voice
Active voice makes the performer of the action the subject
of the sentence. When you write in passive voice, the recipient of the action (and not the performer) becomes the subject of the sentence.
Active-voice sentences are more direct and clearly identify _who_ is doing _what_. Not all tasks are completed by a user; sometimes the system can also be a performer (and by extension, the subject of the sentence). When you write in active voice you clearly make that distinction, which results in more engaging and less wordy content.
| Use (active) | Avoid (passive) |
| ----------------------------------------------------- | -------------------------------------------------------------------- |
| After you upgrade the software, restart the computer. | After the software has been upgraded, the computer can be restarted. |
| Click **OK** to save the dashboard. | The dashboard is saved when the **OK** button is clicked. |
| Create a dashboard. | A dashboard is created by you. |
### Avoid obscure non-English words and abbreviations
Users might be unfamiliar with some non-English words and abbreviations such as _per_, _vs_, and _via_. Latin abbreviations in particular, like _i.e._, _e.g._, and _etc._, are vague.
| Use | Dont use |
| ------------ | ----------- |
| through | via |
| that is | i.e. |
| according to | per, as per |
| and so on | etc. |
### Write self-contained topics
Thanks to search engines, every page in the documentation might be a reader's entry point. This means that each page needs to be self-contained and make sense on its own. The reader should not need to read other topics in order to perform the task or understand the concept.
However, try to be helpful and link to related information. Using the _Doggie handbook_ example, the concept topic that explains what dogs can be trained to do might link to the Train the dog task.

View File

@@ -0,0 +1,152 @@
# Markdown style guide
This guide for Markdown style helps keep contributions consistent across all documentation created for Grafana products. Refer to the guide and update its sections as needed when a Subject Matter Expert answers a question on Markdown style, or a decision is made about how to apply Markdown.
## Headers
In Markdown, the number of "#" symbols creates different heading levels, similar to HTML heading levels:
**Example**
- \# is \<h1>.
- \#\# is \<h2>.
- \#\#\# is \<h3>.
Start your document with a single `#` for the title of the page. Add the sub-headings with two `##`.
## Bold and emphasis
- Make text **bold** using two asterisks.
**Example:** It is `**important**` to use GitHub-flavored Markdown emoji consistently.
- Make text `_emphasized_` using single ` _underscores_`. Do not use the single asterisk, it can be easily confused with bold.
**Example:** GitHub-flavored markdown emoji should _only_ appear in specific cases.
## Links and references
Create links to other website by wrapping the display text in square brackets, and the web URL in curved brackets.
\[text to display](www.website.com)
**Example:** For more information on including emoji in GitHub-flavored markdown, refer to the [webfx page on emoji](https://www.webfx.com/tools/emoji-cheat-sheet/) for a list of emoji.
## Block quotes
Include block quotes inside text using right-facing arrows:
**Example**
> Any important information
> about emoji can be separated into
> a blockquote.
## Code blocks
Code blocks written with markdown can show off syntax highlighting specific to different languages. Use three back tics to create a code block:
```
function testNum(a) {
if (a > 0) {
return "positive";
} else {
return "NOT positive";
}
}
```
Write the name of the language after the first set of back tics, no spaces, to show specific syntax highlighting. For example; "\```javascript" produces the following:
```javascript
function testNum(a) {
if (a > 0) {
return 'positive';
} else {
return 'NOT positive';
}
}
```
## Tables
Construct a table by typing the table headings, and separating them with a "|" character. Then, add a second line of dashes ("-") separated by another "|" character. When constructing the table cells, separate each cell data with another "|".
**Example**
Heading one | Heading two
\------------|------------
Cell one data| Cell two data
Will publish as:
| Heading one | Heading two |
| ------------- | ------------- |
| Cell one data | Cell two data |
## Lists
### Numbered lists
To avoid inconsistent list numbering, use repetitive list numbering:
\1. First
\1. Second
\1. Third
The list above will always display as:
1. First
2. Second
3. Third
### Unordered lists
Build a list of points - an unordered or unnumbered list - by using "\-" (hyphen) characters.
**Example**
- First
- Another item
- The last list item
## Images
_Do not_ use image shortcodes at this time.
Include images in a document using the following syntax:
```
![Alt text](link to image, starting with /static/img/docs/ if it is to an internal image "Title of image in sentence case")
```
> **Note:** Alt text does not appear when the user hovers the mouse over the image, but title text does.
**Examples:**
- \!\[Grafana logo](/link/to/grafanalogo/logo.png "Grafana logo")
- \!\[Example](/static/img/docs/folder_name/alert_test_rule.png "Example title")
This follows the format of "!", alt text wrapped in "[]" and the link URL wrapped in "()".
You can also use HTML such as the following:
```
<img src="example.png"
alt="Example image"
style="float: left; margin-right: 5px;" />
```
In most cases, use the markdown syntax rather than the HTML syntax. Only use the HTML if you need to change the image in ways unsupported by Markdown.
## Comments
You can include comments that will not appear in published markdown using the following syntax:
\[comment]: <> (Comment text to display)
The word "comment" wrapped in "[]" followed by a ":", a space, "<>", and then the comment itself wrapped in "()".

Binary file not shown.

After

Width:  |  Height:  |  Size: 182 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 179 KiB

View File

@@ -0,0 +1,42 @@
DELETE THIS LINE: If draft = false, then the document will not be built in the doc site. If the date is earlier than the build date, than the document will not show in the build site. Use these settings to control whether future content is shown in the doc site.
+++
draft = "false"
date = "yyyy-mm-dd"
title = "Title in sentence case"
description = "Description in title case"
keywords = ["grafana", "enter", "keywords", "here"]
type = "docs"
[menu.docs]
name = "Name of topic"
identifier = "identifier"
parent = "menu parent"
weight = 100
+++
# Concept
The title of the concept topic will generally be a noun or a gerund. Examples include Templates, Templating, Dashboards, and panels.
Concepts are topic types for any information that doesn't involve task lists or reference information. Ideally you use concept elements to explain concepts, ideas, overviews, workflows, and the like. In the intro section, this first paragraph or two, you should explain to the user what to expect in this topic or section.
[Permissions overview](https://grafana.com/docs/grafana/latest/permissions/overview/) is an example of a concept topic.
## Idea
Concept topics or sections explain _what_ and _why_. They do not explain _how_. If you are a new user, you might look for concept information to learn about what Grafana is, why it might be useful to you, and what the general workflow is.
## Workflow
Continuing the example in the previous section, here is a sample Grafana workflow.
1. Install Grafana. <link to task for installing Grafana>
1. Set up data sources. <link to data sources concept topic, which links to data source task topics>
1. Create panels. <link to panel concept topic, which links to tasks>
1. Create dashboards. <link to panel concept topic, which links to tasks>
1. Enter queries. <link to query editor concept topic>
1. Add users. <link to user management concept topic, which links to tasks>
1. Create playlists. <link to Playlist topic that contains concept information and tasks>
## Next steps
Concept tasks often link to related information, including _tasks_ related to the concept and _reference_ topics related to the concept.

View File

@@ -0,0 +1,75 @@
DELETE THIS LINE: If draft = false, then the document will not be built in the doc site. If the date is earlier than the build date, than the document will not show in the build site. Use these settings to control whether future content is shown in the doc site.
+++
draft = "false"
date = "yyyy-mm-dd"
title = "Title in sentence case"
description = "Description in title case"
keywords = ["grafana", "enter", "keywords", "here"]
type = "docs"
[menu.docs]
name = "Name of topic"
identifier = "identifier"
parent = "menu parent"
weight = 100
+++
# Reference
The _reference_ topic type is for storing reference information, such as extensive tables, lists, or other information that is used as support for a task. Reference topics are also designed for API information.
Often reference topics are linked from _task_ topics, because they contain information the user needs in order to perform a task.
[Grafana CLI](https://grafana.com/docs/grafana/latest/administration/cli/) is one example of a reference topic.
## Lists
Lists of commands or parameters are often organized in reference topics. The information you need to present will dictate the format.
- They might
- be in
- unordered lists.
[Configuration](https://grafana.com/docs/grafana/latest/installation/configuration/) is an example of lists.
## Tables
If you have a large list of things to store in a table, then you are probably dealing with reference information. Hugo accepts either tables in Markdown or in HTML format, so use whichever is easier for you.
The [Glossary](https://grafana.com/docs/grafana/latest/guides/glossary/) provides an example of reference data in a table.
### Empty markdown table
While you might not need a heading for each table, headings are a good way to chunk information if you have several tables. They also make the content easy to skim. Use headings or intro paragraphs like this one to explain to the reader what the information in the table is used for.
| | | | | | |
| :-- | :-- | :-: | :-: | --: | --: |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
### Empty HTML table
And here is intro text, similar to the paragraph in the previous section. Do not add local styling to the table. The website CSS will take care of that for you.
<table>
<tr>
<th>Firstname</th>
<th>Lastname</th>
<th>Age</th>
</tr>
<tr>
<td>Jill</td>
<td>Smith</td>
<td>50</td>
</tr>
<tr>
<td>Eve</td>
<td>Jackson</td>
<td>94</td>
</tr>
</table>
## API documentation
API documentation is always a reference topic rather than a task topic, but it has its own rules.

View File

@@ -0,0 +1,57 @@
+++
draft = "false"
date = "yyyy-mm-dd"
title = "Title in sentence case"
description = "Description in title case"
keywords = ["grafana", "enter", "keywords", "here"]
type = "docs"
[menu.docs]
name = "Name of topic"
identifier = "identifier"
parent = "menu parent"
weight = 100
+++
# Task
A _task_ topic is intended for a procedure that describes how to accomplish a task. It lists a series of steps that users follow to produce an intended outcome. It tells the reader _how_ to do something. [Install Grafana plugins](https://grafana.com/docs/grafana/latest/plugins/installation/) and [Playlist](https://grafana.com/docs/grafana/latest/reference/playlist/) are examples of task topics. Playlist includes a small amount of concept information in the introduction, which is appropriate.
Always include an introduction of a short paragraph or two to explain what the task is for, perhaps give the reader an idea of what the outcome will be.
In most cases, each topic should only contain one task. If you have several very short, related tasks, then you might combine them into one topic.
In the case of a long task, then you probably won't need any headings except for the h1 at the top of the page.
1. Start with step one.
1. Use second-person imperative tense.
1. Basically, "You, do this" with every sentence.
1. Do not use the third-person "user" for steps you want the reader ("you") to perform.
1. Write steps that contain one action, possibly two related actions, such as copy and paste a thing or save and quit the program.
If a sentence is not telling the reader to do something, then it is not a step. You can use nested images or paragraphs like this one to add information if necessary.
In many cases, you should tell the reader what the outcome should be so that they know when they are done.
## One-step task
Some tasks are so short, they only contain one step.
Write one-step tasks as simple sentences, not as unordered lists or numbered lists.
## Short task
Short tasks can be grouped. How short constitutes "short" is a judgment call based on number of steps and how long individual steps are.
1. Use your judgment.
1. Ask your coworkers or someone on the Comm team for advice if you aren't sure.
## Next steps
If the task you are writing leads naturally to one or more other tasks, then include links after the task to help the reader figure out where to go next.
Thanks to internet search engines, every page in the documentation could be page one. Pretend you are explaining your task to a new Grafana user who just walked in off the street.
## Testing
It is a good practice to have someone else test the task you have written. If they can successfully complete the task using _only_ what the steps you have written, not guessing or using their inherent knowledge, then your task has passed the test. However, it is very common to find you have skipped steps, because _you_ are very familiar with Grafana and the topic you are explaining.
New users or people from other teams are very helpful for these tests.

View File

@@ -1,280 +0,0 @@
# Instrumenting Grafana
Guidance, conventions and best practices for instrumenting Grafana using logs, metrics and traces.
## Logs
Logs are files that record events, warnings and errors as they occur within a software environment. Most logs include contextual information, such as the time an event occurred and which user or endpoint was associated with it.
### Usage
Use the _pkg/infra/log_ package to create a named structured logger. Example:
```go
import (
"fmt"
"github.com/grafana/grafana/pkg/infra/log"
)
logger := log.New("my-logger")
logger.Debug("Debug msg")
logger.Info("Info msg")
logger.Warning("Warning msg")
logger.Error("Error msg", "error", fmt.Errorf("BOOM"))
```
### Naming conventions
Name the logger using lowercase characters, e.g. `log.New("my-logger")` using snake_case or kebab-case styling.
Prefix the logger name with an area name when using different loggers across a feature or related packages, e.g. `log.New("plugin.loader")` and `log.New("plugin.client")`.
Start the log message with a capital letter, e.g. `logger.Info("Hello world")` instead of `logger.Info("hello world")`. The log message should be an identifier for the log entry, avoid parameterization in favor of key-value pairs for additional data.
Prefer using camelCase style when naming log keys, e.g. _remoteAddr_, to be consistent with Go identifiers.
Use the key _error_ when logging Go errors, e.g. `logger.Error("Something failed", "error", fmt.Errorf("BOOM"))`.
### Validate and sanitize input coming from user input
If log messages or key/value pairs originates from user input they **should** be validated and sanitized.
Be **careful** to not expose any sensitive information in log messages e.g. secrets, credentials etc. It's especially easy to do by mistake when including a struct as value.
### Log levels
When to use which log level?
- **Debug:** Informational messages of high frequency and/or less-important messages during normal operations.
- **Info:** Informational messages of low frequency and/or important messages.
- **Warning:** Should in normal cases not be used/needed. If used should be actionable.
- **Error:** Error messages indicating some operation failed (with an error) and the program didn't have a way of handle the error.
### Contextual logging
Use a contextual logger to include additional key/value pairs attached to `context.Context`, e.g. `traceID`, to allow correlating logs with traces and/or correlate logs with a common identifier.
You must [Enable tracing in Grafana](#2-enable-tracing-in-grafana) to get a traceID
Example:
```go
import (
"context"
"fmt"
"github.com/grafana/grafana/pkg/infra/log"
)
var logger = log.New("my-logger")
func doSomething(ctx context.Context) {
ctxLogger := logger.FromContext(ctx)
ctxLogger.Debug("Debug msg")
ctxLogger.Info("Info msg")
ctxLogger.Warning("Warning msg")
ctxLogger.Error("Error msg", "error", fmt.Errorf("BOOM"))
}
```
### Enable certain log levels for certain loggers
During development it's convenient to enable certain log level, e.g. debug, for certain loggers to minimize the generated log output and make it easier to find things. See [[log.filters]](https://grafana.com/docs/grafana/latest/setup-grafana/configure-grafana/#filters) for information how to configure this.
It's also possible to configure multiple loggers:
```ini
[log]
filters = rendering:debug \
; alerting.notifier:debug \
oauth.generic_oauth:debug \
; oauth.okta:debug \
; tsdb.postgres:debug \
; tsdb.mssql:debug \
; provisioning.plugins:debug \
; provisioning:debug \
; provisioning.dashboard:debug \
; provisioning.datasources:debug \
datasources:debug \
data-proxy-log:debug
```
## Metrics
Metrics are quantifiable measurements that reflect the health and performance of applications or infrastructure.
Consider using metrics to provide real-time insight into the state of resources. If you want to know how responsive your application is or identify anomalies that could be early signs of a performance issue, metrics are a key source of visibility.
### Metric types
See [Prometheus metric types](https://prometheus.io/docs/concepts/metric_types/) for a list and description of the different metric types you can use and when to use them.
There are many possible types of metrics that can be tracked. One popular method for defining metrics is the [RED method](https://grafana.com/blog/2018/08/02/the-red-method-how-to-instrument-your-services/).
### Naming conventions
Use the namespace _grafana_ as that would prefix any defined metric names with `grafana_`. This will make it clear for operators that any metric named `grafana_*` belongs to Grafana.
Use snake*case style when naming metrics, e.g. \_http_request_duration_seconds* instead of _httpRequestDurationSeconds_.
Use snake*case style when naming labels, e.g. \_status_code* instead of _statusCode_.
If metric type is a _counter_, name it with a `_total` suffix, e.g. _http_requests_total_.
If metric type is a _histogram_ and you're measuring duration, name it with a `_<unit>` suffix, e.g. _http_request_duration_seconds_.
If metric type is a _gauge_, name it to denote it's a value that can increase and decrease , e.g. _http_request_in_flight_.
### Label values and high cardinality
Be careful with what label values you add/accept. Using/allowing too many label values could result in [high cardinality problems](https://grafana.com/blog/2022/02/15/what-are-cardinality-spikes-and-why-do-they-matter/).
If label values originates from user input they **should** be validated. Use `metricutil.SanitizeLabelName(<label value>`) from _pkg/infra/metrics/metricutil_ package to sanitize label names. Very **important** to only allow a pre-defined set of labels to minimize the risk of high cardinality problems.
Be **careful** to not expose any sensitive information in label values, e.g. secrets, credentials etc.
### Guarantee the existence of metrics
If you want to guarantee the existence of metrics before any observations has happened there's a couple of helper methods available in the _pkg/infra/metrics/metricutil_ package.
### How to collect and visualize metrics locally
1. Start Prometheus
```bash
make devenv sources=prometheus
```
2. Use Grafana Explore or dashboards to query any exported Grafana metrics
## Traces
A distributed trace is data that tracks an application request as it flows through the various parts of an application. The trace records how long it takes each application component to process the request and pass the result to the next component. Traces can also identify which parts of the application trigger an error.
### Usage
Grafana currently supports two tracing implementations, [OpenTelemetry](https://opentelemetry.io/) and [OpenTracing](https://opentracing.io/). OpenTracing is deprecated, but still supported until we remove it. The two different implementations implements the `Tracer` and `Span` interfaces, defined in the _pkg/infra/tracing_ package, which you can use to create traces and spans. To get a hold of a `Tracer` you would need to get it injected as dependency into your service, see [Services](../../architecture/backend/services.md) for more details.
Example:
```go
import (
"fmt"
"github.com/grafana/grafana/pkg/infra/tracing"
"go.opentelemetry.io/otel/attribute"
)
type MyService struct {
tracer tracing.Tracer
}
func ProvideService(tracer tracing.Tracer) *MyService {
return &MyService{
tracer: tracer,
}
}
func (s *MyService) Hello(ctx context.Context, name string) (string, error) {
ctx, span := s.tracer.Start(ctx, "MyService.Hello")
// this make sure the span is marked as finished when this
// method ends to allow the span to be flushed and sent to
// storage backend.
defer span.End()
// Add some event to show Events usage
span.AddEvents(
[]string{"message"},
[]tracing.EventValue{
{Str: "checking name..."},
})
if name == "" {
err := fmt.Errorf("name cannot be empty")
// record err as an exception span event for this span
span.RecordError(err)
return "", err
}
// Add some other event to show Events usage
span.AddEvents(
[]string{"message"},
[]tracing.EventValue{
{Str: "name checked"},
})
// Add attribute to show Attributes usage
span.SetAttributes("my_service.name", name, attribute.Key("my_service.name").String(name))
return fmt.Sprintf("Hello %s", name), nil
}
```
### Naming conventions
Span names should follow the [guidelines from OpenTelemetry](https://opentelemetry.io/docs/reference/specification/trace/api/#span).
| Span Name | Guidance |
| ----------------------- | -------------------------------------------------------- |
| get | Too general |
| get_account/42 | Too specific |
| get_account | Good, and account_id=42 would make a nice Span attribute |
| get_account/{accountId} | Also good (using the “HTTP route”) |
Span attribute and span event attributes should follow the [Attribute naming specification from OpenTelemetry](https://opentelemetry.io/docs/reference/specification/common/attribute-naming/). Good attribute key examples:
- service.version
- http.status_code
See [Trace semantic conventions from OpenTelemetry](https://opentelemetry.io/docs/reference/specification/trace/semantic_conventions/) for additional conventions regarding well-known protocols and operations.
### Span names and high cardinality
Be careful with what span names you add/accept. Using/allowing too many span names could result in high cardinality problems.
### Validate and sanitize input coming from user input
If span names, attribute or event values originates from user input they **should** be validated and sanitized. It's very **important** to only allow a pre-defined set of span names to minimize the risk of high cardinality problems.
Be **careful** to not expose any sensitive information in span names, attribute or event values, e.g. secrets, credentials etc.
### How to collect, visualize and query traces (and correlate logs with traces) locally
#### 1. Start Jaeger
```bash
make devenv sources=jaeger
```
#### 2. Enable tracing in Grafana
To enable tracing in Grafana, you must set the address in your config.ini file
opentelemetry tracing (recommended):
```ini
[tracing.opentelemetry.jaeger]
address = http://localhost:14268/api/traces
```
opentracing tracing (deprecated/not recommended):
```ini
[tracing.jaeger]
address = localhost:6831
```
#### 3. Search/browse collected logs and traces in Grafana Explore
You need provisioned gdev-jaeger and gdev-loki datasources, see [developer dashboard and data sources](https://github.com/grafana/grafana/tree/main/devenv#developer-dashboards-and-data-sources) for setup instructions.
Open Grafana explore and select gdev-loki datasource and use the query `{filename="/var/log/grafana/grafana.log"} | logfmt`.
You can then inspect any log message that includes a `traceID` and from there click on `gdev-jaeger` to split view and inspect the trace in question.
#### 4. Search/browse collected traces in Jaeger UI
You can open http://localhost:16686 to use the Jaeger UI for browsing and searching traces.

View File

@@ -1,87 +1,48 @@
# Internationalization
Grafana uses the [i18next](https://www.i18next.com/) framework for managing translating phrases in the Grafana frontend.
Grafana uses the [LinguiJS](https://github.com/lingui/js-lingui) framework for managing translating phrases in the Grafana frontend.
## tl;dr
**Please note:** We do not currently accept contributions for translations. Please do not submit pull requests for grafana.json files - they will be rejected.
- Use `<Trans i18nKey="search-results.panel-link">Go to {{ pageTitle }}</Trans>` in code to add a translatable phrase
- Translations are stored in JSON files in `public/locales/{locale}/grafana.json`
- Use `<Trans id="search-results.panel-link">Go to {panel.title}</Trans>` in code to add a translatable phrase
- Translations are stored in .po files in `public/locales/{locale}/messages.po`
- If a particular phrase is not available in the a language then it will fall back to English
- To update phrases in English, edit the default phrase in the component's source, then run `yarn i18n:extract`. Do not edit the `en-ES/grafana.json` or update the english phrase in Crowdin
- To update phrases in any translated language, edit the phrase in Crowdin. Do not edit the `{locale}/grafana.json`
## How to add a new translation phrase
### JSX
1. For JSX children, use the `<Trans />` component from `app/core/internationalization` with the `i18nKey`, ensuring it conforms to the guidelines below, with the default english translation. e.g.
1. Use one of `@lingui/macro`'s React components with the `id`, ensuring it conforms to the guidelines below, with the default english translation. e.g.
```jsx
import { Trans } from 'app/core/internationalization';
import { Trans } from @lingui/macro
const SearchTitle = ({ term }) => (
<Trans i18nKey="search-page.results-title">
Results for <em>{{ term }}</em>
const SearchTitle = ({term}) => (
<Trans id="search-page.results-title">
Results for {term}
</Trans>
);
```
Prefer using `<Trans />` for JSX children, and `t()` for props and other javascript usage.
Prefer using the JSX components (compared to the plain javascript functions, see below) where possible for phrases. Many props can (and probably should) be changed to accept the `React.ReactNode` instead of `string` for phrases put into the DOM.
When translating in grafana-ui, use a relative path to import `<Trans />` and `t()` from `src/utils/i18n`.
Note that our tooling must be able to statically analyse the code to extract the phrase, so the `i18nKey` can not be dynamic. e.g. the following will not work:
Note that Lingui must be able to statically analyse the code to extract the phrase, so the `id` can not be dynamic. e.g. the following will not work:
```jsx
const ErrorMessage = ({ id, message }) => <Trans i18nKey={`errors.${id}`}>There was an error: {{ message }}</Trans>;
const ErrorMessage = ({ id, message }) => <Trans id={`errors.${id}`}>There was an error: {message}</Trans>;
```
2. Upon reload, the default English phrase will appear on the page.
3. Before submitting your PR, run the `yarn i18n:extract` command to extract the messages you added into the `grafana.json` file and make them available for translation.
### Plain JS usage
Sometimes you may need to translate a string cannot be represented in JSX, such as `placeholder` props. Use the `t` macro for this.
```jsx
import { t } from "app/core/internationalization"
const placeholder = t('form.username-placeholder','Username');
return <input type="value" placeholder={placeholder}>
```
Interpolating phrases is a bit more verbose. Make sure the placeholders in the string match the values passed in the object - there's no type safety here!
```jsx
const placeholder = t('page.greeting', 'Hello {{ username }}', { username });
```
While the `t` function can technically be used outside of React functions (e.g, in actions/reducers), aim to keep all UI phrases within the React UI functions.
## How to add a new language
1. Add new locale in Crowdin and sync files to repo
1. Grafana OSS Crowdin project -> "dot dot dot" menu in top right -> Target languages
2. Grafana OSS Crowdin project -> Integrations -> Github -> Sync Now
3. If Crowdin's locale code is different from our IETF language tag, add a custom mapping in Project Settings -> Language mapping
2. Update `public/app/core/internationalization/constants.ts` (add new constant, and add to `LOCALES`)
3. Update `public/locales/i18next-parser.config.js` to add the new locale to `locales`
4. Run `yarn i18n:extract` and commit the result
3. Before submitting your PR, run the `yarn i18n:extract` command to extract the messages you added into the `messages.po` file and make them available for translation.
## How translations work in Grafana
Grafana uses the [i18next](https://www.i18next.com/) framework for managing translating phrases in the Grafana frontend. It:
Grafana uses the [LinguiJS](https://github.com/lingui/js-lingui) framework for managing translating phrases in the Grafana frontend. It:
- Marks up phrases within our code for extraction
- Extracts phrases into messages catalogues for translating in external systems
- "Compiles" the catalogues to a format that can be used in the website
- Manages the user's locale and putting the translated phrases in the UI
English phrases remain in our Javascript bundle in the source components (as the `<Trans />` or `t()` default phrase). At runtime, we don't need to load any messages for en-US. If the user's language preference is set to another language, Grafana will load that translations's messages JSON before the initial render.
### Phrase ID naming convention
We set explicit IDs for phrases to make it easier to identify phrases out of context, and to track where they're used. IDs follow a naming scheme that includes _where_ the phrase is used. The exception is the rare case of single reoccuring words like "Cancel", but default to using a feature/phrase specific phrase.
@@ -96,83 +57,137 @@ For components used all over the site, use just two segments:
- `footer.update`
- `navigation.home`
### I18next context
### Top-level provider
We rely on a global i18next singleton (that lives inside the i18next) for storing the i18next config/context.
In [AppWrapper.tsx](/public/app/AppWrapper.tsx) the app is wrapped with `I18nProvider` from `public/app/core/internationalization/index.tsx` where the Lingui instance is created with the user's preferred locale. This sets the appropriate context and allows any component from `@lingui/macro` to use the translations for the user's preferred locale.
### Message format
Lingui uses the [ICU MessageFormat](https://unicode-org.github.io/icu/userguide/format_parse/messages/) for the phrases in the .po catalogues. ICU has special syntax especially for describing plurals across multiple languages. For more details see the [Lingui docs](https://lingui.js.org/ref/message-format.html).
### Plain JS usage
See [Lingui Docs](https://lingui.js.org/ref/macro.html#t) for more details.
Sometimes you may need to translate a string cannot be represented in JSX, such as `placeholder` props. Use the `t` macro for this.
```jsx
import { t } from "@lingui/macro"
const placeholder = t({
id: 'form.username-placeholder',
message: `Username`
});
return <input type="value" placeholder={placeholder}>
```
While the `t` macro can technically be used outside of React functions (e.g, in actions/reducers), aim to keep all UI phrases within the React UI functions.
## Examples
See [i18next](https://www.i18next.com/) and [react-i18next](https://react.i18next.com/) documentation for more details.
See the [Lingui docs](https://lingui.js.org/ref/macro.html#usage) for more details.
### Basic usage
For fixed phrases:
```jsx
import { Trans } from 'app/core/internationalization';
import { Trans } from '@lingui/macro';
<Trans i18nKey="page.greeting">Hello user!</Trans>;
<Trans id="page.greeting">Hello user!</Trans>;
```
To interpolate variables, include it as an object child. It's weird syntax, but Trans will do it's magic to make it work:
You can include variables, just like regular JSX. Prefer using "simple" variables to make the extracted phrase easier to read for translators
```jsx
import { Trans } from 'app/core/internationalization';
import { Trans } from '@lingui/macro';
<Trans i18nKey="page.greeting">Hello {{ name: user.name }}!</Trans>;
// Bad - translators will see: Hello {0}
<Trans id="page.greeting">Hello {user.name}!</Trans>;
// Good - translators will see: Hello {userName}
const userName = user.name;
<Trans i18nKey="page.greeting">Hello {{ userName }}!</Trans>;
<Trans id="page.greeting">Hello {userName}!</Trans>;
```
Variables must be strings (or, must support calling `.toString()`, which we almost never want).
```jsx
import { Trans } from 'app/core/internationalization';
import { Trans } from '@lingui/macro';
// This will not work
const userName = <strong>user.name</strong>;
<Trans i18nKey="page.greeting">Hello {{ userName }}!</Trans>;
<Trans id="page.greeting">Hello {userName}!</Trans>;
// Instead, put the JSX inside the phrase directly
const userName = user.name;
<Trans i18nKey="page.greeting">
Hello <strong>{{ userName }}</strong>!
<Trans id="page.greeting">
Hello <strong>{userName}</strong>!
</Trans>;
```
### React components and HTML tags
Both HTML tags and React components can be included in a phase. The Trans function will handle interpolating it's children properly
Both HTML tags and React components can be included in a phase. The Lingui macro will replace them with placeholder tags for the translators
```js
import { Trans } from "app/core/internationalization"
import { Trans } from "@lingui/macro"
<Trans i18nKey="page.explainer">
const randomVariable = "variable"
<Trans id="page.explainer">
Click <button>here</button> to <a href="https://grafana.com">learn more.</a>
</Trans>
// ↓ is in the grafana.json file like
{
"page": {
"explainer": "Click <0>here</0> to <1>learn more</1>"
}
}
// ↓ is transformed by macros into
<Trans
id="page.explainer"
defaults="Click <0>here</0> to <1>learn more</1>"
components={[
<button />,
<Text />
]}
/>
// ↓ is in the messages.po file like ↓
msgid "page.explainer"
msgstr "Click <0>here</0> to <1>learn more</1>"
```
### Plurals
Plurals require special handling to make sure they can be translating according to the rules of each locale (which may be more complex that you think!). Use the `<Trans />` component, with the `count` prop.
See the [Lingui docs](https://lingui.js.org/ref/macro.html#id1) for more details.
Plurals require special handling to make sure they can be translating according to the rules of each locale (which may be more complex that you think!). Use the `<Plural />` component and specify the plural forms for the default language (English). The message will be extracted into a form where translators can extend it with rules for other locales.
```js
import { Trans } from 'app/core/internationalization';
import { Plural } from "@lingui/macro"
<Trans i18nKey="newMessages" count={messages.length}>
You got {{ count: messages.length }} messages.
</Trans>;
<Plural
id="sharing.shared-with"
value={sharedCount}
none="Not shared with anyone"
one="Shared with one person"
other="Shared with # people"
/>
// ↓ is transformed by macros into ↓
<Trans
id="example.plurals"
values={{ sharedCount }}
defaults="{sharedCount, plural, none {Not shared with anyone}, one {Shared with one person}, other {Shared with # people}"
/>
// sharedCount = 0 -> Not shared with anyone
// sharedCount = 1 -> Shared with one person
// sharedCount = 3 -> Shared with # people
```
Once extracted with `yarn i18n:extract` you will need to manually fill in the grafana.json message catalogues with the additional plural forms. See the [react-i18next docs](https://react.i18next.com/latest/trans-component#plural) for more details.
### Date and time
[Lingui has functions](https://lingui.js.org/ref/core.html#I18n.date) to format dates and times according to the convention to the user's preferred locale, based on the browser [Intl.DateTimeFormat](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat) API. However, as displaying dates and times is fundamental to Grafana, guidelines have not been established for this yet.
## Documentation

View File

@@ -1,77 +0,0 @@
# Accessibility at Grafana
At Grafana we pay special attention to accessibility and that's why it's important that all components are written with it in
mind.
The goal of this document is to list best practices and recommendations when it comes to writing accessible components.
### grafana/ui components
Some grafana/ui components have specific mechanisms built-in that make it easier to write accessible components.
#### Form elements
One of the important accessibility considerations when working with form elements is to make sure form controls are
properly labelled. For that a `label` element has to be associated with the respective form control. One way to
do that is to provide `for` attribute to the label that matches the `id` attribute of the form control.
The form components from grafana/ui provide an easier way to achieve that. The form elements, used inside `Field`
components, will get the `label` properly associated with them given that the element has `id` (in case of `Select` the prop is `inputId`) specified.
As an example, this code
```tsx
<Field label="Name">
<Input id="name" placeholder="Enter a name" />
</Field>
```
will be rendered as (simplified)
```html
<div>
<label for="name"> Name </label>
<input name="name" type="text" id="name" placeholder="Enter a name" value="" />
</div>
```
As long as the form element has a unique `id` attribute specified, it will be automatically accessible when rendered.
### Writing tests with accessibility in mind
We use [React Testing Library](https://testing-library.com/docs/react-testing-library/intro) (RTL) for writing unit tests.
The library is built with accessibility in mind and makes it easier to ensure the written code is accessible to all users.
When querying DOM elements with RTL prefer using `*ByRole` queries as they resemble closely how the users interact
with the page - both using mouse/visual display and assistive technologies.
As a rule of thumb, if code is written with the accessibility concerns in
mind, `*ByRole` queries will be sufficient in most of the cases. There are certainly exceptions here, as not all the elements have defined [ARIA role](https://www.w3.org/TR/html-aria/#docconformance).
As an example, for this code
```tsx
<Field label="Username">
<Input id="username" placeholder="Enter a name" value={'Test'} />
</Field>
```
the test could case be as follows
```tsx
it('has username set', () => {
expect(screen.getByRole('textbox', { name: 'Username' })).toHaveValue('Test');
});
```
Input with type `text` (default type value) has a role of `textbox` and the `name` option is not the name attribute
given to the input elements but their [accessible name](https://www.tpgi.com/what-is-an-accessible-name/), which in this case is the text content of the associated with input label.
### Pull requests that introduce accessibility(a11y) errors:
We use [pa11y-ci](https://github.com/pa11y/pa11y-ci) to collect accessibility errors on [some URLs in the project](https://github.com/grafana/grafana/issues/36555), threshold errors are specified per URL.
If the contribution introduces new a11y errors, our continuous integration will fail, preventing you to merge to the main branch. In those cases there are two alternatives for moving forward:
- Check the error log on the pipeline step `test-a11y-frontend-pr`, identify what was the error, and fix it.
- Locally run the command `yarn test:accessibility-report` that generates an HTML accessibility report, then go to the URL that contains your change, identify the error, and fix it. Keep in mind, a local e2e Grafana instance is going to be running on `http://localhost:3001`.
You can also prevent introducing a11y errors by installing an a11y plugin in your browser, for example, axe DevTools, Accessibility Insights for Web among others.

View File

@@ -40,23 +40,6 @@ The majority of our tests uses [GoConvey](http://goconvey.co/) but that's someth
In the `sqlstore` package we do database operations in tests and while some might say that's not suited for unit tests. We think they are fast enough and provide a lot of value.
### Integration Tests
We run unit and integration tests separately, to help keep our CI pipeline running smoothly and provide a better developer experience.
To properly mark a test as being an integration test, you must format your test function definition as follows, with the function name starting with `TestIntegration` and the check for `testing.Short()`:
```
func TestIntegrationFoo(t *testing.T) {
if testing.Short() {
t.Skip("skipping integration test")
}
// function body
}
```
If you do not follow this convention, your integration test may be run twice or not run at all.
### Assertions
Use respectively [`assert.*`](https://github.com/stretchr/testify#assert-package) functions to make assertions that

View File

@@ -0,0 +1,345 @@
# Documentation style guide
This style guide applies to all documentation created for Grafana products.
For information about how to write technical documentation, refer to the following resources:
- [Google Technical Writing courses](https://developers.google.com/tech-writing)
- [Divio documentation system](https://documentation.divio.com/)
- [Vue writing principles](https://v3.vuejs.org/guide/contributing/writing-guide.html#principles)
## Contributing
The _Documentation style guide_ is a living document. Add to it whenever a style decision is made or a question is answered regarding style, grammar, or word choice.
## Published guides
For all items that are not covered in this guide, refer to the [Google developer documentation style guide](https://developers.google.com/style) and the [Microsoft style guide](https://docs.microsoft.com/en-us/style-guide/welcome/), in that order.
## Spelling
To catch common misspellings, the [codespell](https://github.com/codespell-project/codespell) tool is run for every change.
## Inclusive language
Avoid using charged language.
### Allowing and blocking
When referring to _allowing_ or _blocking_ content or traffic, use a form of _allow_ or _block_:
- (noun) _allowlist_ or _blocklist_
- (verb) _allow_ or _block_
Example: _To **allow** outgoing traffic, add the IP to the **allowlist**._
Avoid _whitelist_ or _blacklist_.
### Primary and secondary
To describe relationships between nodes or processes, there are several options:
- Use _primary_, _main_, or _parent_, instead of _master_.
- Use _secondary_, _replica_, or _child_, instead of _slave_.
Avoid _master_ or _slave_.
## Grafana-specific style
The following guidelines are specific to Grafana documentation. For the most part, these are _guidelines_ are not rigid rules. If you have questions, then please ask in the #docs channel of Grafana Slack.
### General
Per the [Voice and tone](https://developers.google.com/style/tone) section of the Google developer documentation style guide:
> In your documents, aim for a voice and tone that's conversational, friendly, and respectful without being overly colloquial or frivolous; a voice that's casual and natural and approachable, not pedantic or pushy. Try to sound like a knowledgeable friend who understands what the developer wants to do.
- Use active voice:
- Active: Grafana displays the heatmap visualization.
- Passive: The heatmap visualization is displayed.
- Write directly to the reader:
- Use: "After you create a dashboard, you can add a panel to it."
- Avoid: "After you create a dashboard, it is possible to add a panel to it."
- Write in the imperative second person:
- "Click the panel."
- "Close the window."
- Write in present tense:
- Use: "The panel opens."
- Avoid: "The panel will open."
- Do not use an ampersand (&) as an abbreviation for _and_.
- **Exceptions:** If an ampersand is used in the Grafana UI, then match the UI.
- Avoid using internal jargon or slang.
- Do not use two spaces after a period; use one space after a sentence.
- Remove any extra space characters at the end of a paragraph.
- Aim for your sentences to be fewer than 25 words. Instead, use smaller complete phrases or change the format, such as using a list.
- Aim for paragraphs to be three sentences or fewer. Make the text more concise, use more headings, or both.
### File naming conventions
- Files that are displayed in the help system should have names that are all lowercase, no spaces. Use hyphens instead of spaces. Example: glossary.md
- Documentation file names should match the title. **Note:** This only applies to new files at this time. Do not change the names of older files unless directed to do so.
- Internal reference file names should be all uppercase except the file extension. Example: CONTRIBUTING.md
- Image file names should be descriptive and unique. Also, add the software version number that the image applies to or the screenshot was taken in. Example: share-dashboard-link-7-3.png
### Headings
- Write headings in sentence case, not title case.
- This is sentence case
- This is Title Case
- Task topic headings start with a verb.
- Write a query
- Create a dashboard
- Concept and reference topic headings should be nouns or gerunds. Examples: Contributing to docs, Visualizations, Style guide
#### Heading don'ts
- Avoid stacked headings, which is following one heading with another heading.
- Avoid skipping heading levels. For example, an h1 should be followed by an h2 rather than an h3.
- Avoid having just one lower-level heading. For example, h1, h2, h2, h3, h3, h2, h2 is a good order. Do not go h1, h2, h3, h2, h3, h2.
- Avoid using hyphens in headings.
- Do not include parenthetical words like (Important!) in headings.
#### Step-by-step headings
In most cases, headings should not be numbered steps.
However, sometimes we need to use headings as numbered steps. This is mostly in cases where each step is complex or a series of other procedures. For example, in [Getting started with Grafana and Prometheus](https://grafana.com/docs/grafana/latest/getting-started/getting-started-prometheus/).
If that is the case, then use the following format for headings:
##### Step 1. Install the software
##### Step 2. Run the software
### Images
- Preferred format is .png
- File extension should be all lowercase.
- Preferred DPI is 72.
- Assume all graphics will be exclusively viewed on the web.
- Maximum image size is 3840px X 2160px.
- Screenshots should be readable, but not too large.
- _Do not_ use image shortcodes. Follow the guidance in [Markdown style guide](../documentation/documentation-markdown-guide.md#Images).
- Markdown image links are preferred. Only use the HTML image links if you need to style the image in ways unsupported in Markdown.
- When you name a file, follow the [file naming conventions](#file-naming-conventions). Example: image-name-7-3.png
### Unordered lists
Here are a few general rules about unordered lists. For more guidance, refer to [Lists](https://developers.google.com/style/lists) in the [Google developer style guide](https://developers.google.com/style/).
- List items should begin with a capital letter unless there is a strong reason not to. For example, you are listing case-sensitive parameters.
- List items should end with periods if they are complete sentences. If one item in a list ends with a period, then apply periods to all of them.
### Capitalization
- Grafana, Loki, and Prometheus are always capitalized unless part of a code block.
- API names are always Title Case, followed by "API"—for example, "Dashboard Permissions API"
- Abbreviations are always capitalized (such as API, HTTP, ID, JSON, SQL, or URL) unless they are part of a code block.
- Menu and submenu titles always use sentence case: capitalize the first word, and lowercase the rest.
- "Dashboards" when referring to the submenu title.
- "Keyboard shortcuts" when referring to the submenu topic.
- Generic and plural versions are always lowercase.
- Lowercase "dashboard" when referring to a dashboard generally.
- Lowercase "dashboards" when referring to multiple dashboards.
- **Exceptions:** If a term is lowercased in the Grafana UI, then match the UI.
#### Git, GitHub
Git is always capitalized, unless part of a code block. GitHub is the correct spelling and capitalization.
#### Integrations
In general, "integration" is not capitalized. Only capitalize it if it is capitalized in the UI or part of a proper noun, like the name of a specific integration.
The first letter of the name of an integration is always capitalized, even if the original named source is lowercase.
**Examples:**
- MySQL Integration
- CockroachDB Integration
- Etcd Integration
- I installed an integration on my local Grafana.
#### Kubernetes objects
Capitalize Kubernetes objects such as Job, Pod, and StatefulSet when it is clear you are specifically talking about them and not generic jobs, pods, or whatever.
Introduce the object as "Kubernetes XX" on the first usage, then just the object in subsequent uses.
**Example:**
Create the Kubernetes Job and check the logs to retrieve the generated token:
The Job requires the token be submitted as …
### Links and references
When referencing another document, use "Refer to" rather than alternatives such as "See" or "Check out."
Always give the reader some idea of what to expect in the reference. Avoid blind references, such as, "Refer to [this file](link)."
When possible, use the exact title of the page or section you are linking to as the link text.
**Example**
Refer to the [Documentation style guide](documentation-style-guide.md) for information about word usage and capitalization guidelines.
### Notes, tips, cautions, and warnings
Grafana documentation uses notes, tips, cautions, and warnings. Notes are the most common. The format for all of them is indented, bold, sentence case:
```
> **Note:**
```
#### Notes
Notes provide additional information that the user should be extra aware of. For example:
> **Note:** This page describes a feature for Grafana 7.0 beta.
#### Tips
Tips describe alternate or more efficient ways of doing things. Rarely used.
#### Cautions
Cautions warn the user that they should proceed with caution. Use cautions to emphasize the potential downside of a course of action.
> **Caution:** If you turn off authentication requirements, then anyone can access your Grafana instance. This poses a considerable security risk.
#### Warnings
Warnings tell the user not to do something. For example:
> **Warning:** Grafana does not back up your dashboards. If you delete a dashboard, then you might not be able to recover it.
### Command line examples
- Do not assume everyone is using Linux. Make sure instructions include enough information for Windows and Mac users to successfully complete procedures.
- Do not add `$` before commands. Make it easy for users to copy and paste commands.
- **Right:** `sudo yum install grafana`
- **Wrong:** `$ sudo yum install grafana`
- Include `sudo` before commands that require `sudo` to work.
For terminal examples and Grafana configuration, use a `bash` code block:
```bash
sudo yum install grafana
```
For HTTP request/response, use an `http` code block:
```http
GET /api/dashboards/id/1/permissions HTTP/1.1
Accept: application/json
Content-Type: application/json
Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk
```
### Word usage
Grafana products has some words, abbreviations, and terms particular to the Grafana discourse community.
#### changelog
One word, not two.
**Example**
- Read the full changelog.
**Exception:**
- When referring to the file containing the official changelog, use the filename: `CHANGELOG.md`.
#### checkout, check out
Two words if used as a verb, one word if used as a noun.
**Examples**
- Check out these new features!
- Proceed to checkout.
#### data source
Two words, not one.
**Exceptions:**
- "datasource" used as an identifier
- "datasource" in a URL
- Use "data source" instead of "datasource" unless used as an identifier, in code, or as part of a URL.
- Spell out "repository" and avoid the shorter "repo."
- Use "Unix" as the preferred spelling (as opposed to "UNIX", or "unix") when referring to the family of operating systems.
#### display (verb)
_Display_ is a transitive verb, which means it always needs a direct object.
- Correct, active voice: Grafana displays your list of active alarms.
- Correct, but passive voice: Your list of active alarms is displayed.
- Incorrect: The list of active alarms displays.
#### drawer
Do not use. This is developer jargon that refers to a UI panel. Refer to the panel or feature by its proper name.
#### intro, introduction
"Introduction" is the preferred word. Use "intro" if there are space constraints (like on the side menu) or you are specifically trying for a less formal, more conversational tone.
#### metadata
One word, not two.
#### mixin
One word, not two. Also, not hyphenated.
#### open source, open-source
Do not hyphenate when used as an adjective unless the lack of hyphen would cause confusion. For example: _Open source software design is the most open open-source system I can imagine._
Do not hyphenate when it is used as a noun. For example: _Open source is the best way to develop software._
#### plugin, plug in
Two words if used as a verb, one word if used as a noun. Do not use _plug-in_.
**Examples**
- Plug in the appliance.
- Download the plugin.
#### setup, set up
Two words if used as a verb, one word if used as a noun.
**Examples**
- Set up the workspace.
- Initial setup might take five minutes.
#### node_exporter, windows_exporter
When referencing the Prometheus data source exporters, always use "node_exporter" and "windows_exporter" when referring to those tools.
**Correct:** node_exporter, windows_exporter
**Incorrect:** Node Exporter, node exporter, Windows Exporter, Windows exporter, windows exporter.
#### web server
Two words, not one.
**Correct:** web server
**Incorrect:** webserver
### MS SQL Server
Always use "MS SQL" when referring to MS SQL Server application.
Incorrect UI spellings will be corrected in a later version of Grafana.

View File

@@ -166,22 +166,17 @@ interface ModalState {
##### Emotion class names
```typescript
const getStyles = (theme: GrafanaTheme2) => ({
const getStyles = = () => ({
// bad
ElementWrapper: css`...`,
// bad
['element-wrapper']: css`...`,
["element-wrapper"]: css`...`,
// good
elementWrapper: css({
padding: theme.spacing(1, 2),
background: theme.colors.background.secondary,
}),
elementWrapper: css`...`,
});
```
Use hook useStyles2(getStyles) to memoize the styles generation and try to avoid passing props to the the getStyles function and instead compose classes using emotion cx function.
#### Use `ALL_CAPS` for constants.
```typescript

View File

@@ -4,9 +4,26 @@
## Usage
### Basic styling
For styling components, use [Emotion's `css` function](https://emotion.sh/docs/emotion#css).
### Basic styling
```tsx
import React from 'react';
import { css } from '@emotion/css';
const ComponentA = () => (
<div
className={css`
background: red;
`}
>
As red as you can get
</div>
);
```
### Styling with theme
To access the theme in your styles, use the `useStyles` hook. It provides basic memoization and access to the theme object.
@@ -14,35 +31,33 @@ To access the theme in your styles, use the `useStyles` hook. It provides basic
```tsx
import React, { FC } from 'react';
import { GrafanaTheme2 } from '@grafana/data';
import { useStyles2 } from '@grafana/ui';
import { GrafanaTheme } from '@grafana/data';
import { useStyles } from '@grafana/ui';
import { css } from '@emotion/css';
const Foo: FC<FooProps> = () => {
const styles = useStyles2(getStyles);
const styles = useStyles(getStyles);
// Use styles with classNames
return <div className={styles}>...</div>;
};
const getStyles = (theme: GrafanaTheme2) =>
css({
padding: theme.spacing(1, 2), // will result in 8px 16px padding
});
const getStyles = (theme: GrafanaTheme) => css`
padding: ${theme.spacing.md};
`;
```
### Styling complex components
In more complex cases, especially when you need to style multiple DOM elements in one component, or when using styles that depend on properties and/or state you
can have your getStyles function return an object with many class names and use [Emotion's `cx` function](https://emotion.sh/docs/emotion#cx) to compose them.
In more complex cases, especially when you need to style multiple DOM elements in one component, or when using styles that depend on properties and/or state, you should create a helper function that returns an object of styles. This function should also be wrapped in the `stylesFactory` helper function, which will provide basic memoization.
Let's say you need to style a component that has a different background depending on the `isActive` property :
```tsx
import React from 'react';
import { css, cx } from '@emotion/css';
import { GrafanaTheme2 } from '@grafana/data';
import { useStyles2 } from '@grafana/ui';
import { css } from '@emotion/css';
import { GrafanaTheme } from '@grafana/data';
import { selectThemeVariant, stylesFactory, useTheme } from '@grafana/ui';
interface ComponentAProps {
isActive: boolean;
@@ -50,10 +65,10 @@ interface ComponentAProps {
const ComponentA: React.FC<ComponentAProps> = ({ isActive }) => {
const theme = useTheme();
const styles = useStyles2(theme);
const styles = getStyles(theme, isActive);
return (
<div className={cx(styles.wrapper, isActive && styles.active)}>
<div className={styles.wrapper}>
As red as you can get
<i className={styles.icon} />
</div>
@@ -61,20 +76,42 @@ const ComponentA: React.FC<ComponentAProps> = ({ isActive }) => {
};
// Mind, that you can pass multiple arguments, theme included
const getStyles = (theme: GrafanaTheme2) => {
const getStyles = stylesFactory((theme: GrafanaTheme, isActive: boolean) => {
const backgroundColor = isActive ? theme.colors.red : theme.colors.blue;
return {
wrapper: css({
background: theme.colors.background.secondary;
}),
active: css({
background: theme.colors.primary.main,
text: theme.colors.primary.contrastText,
},
icon: css({
fontSize: theme.typography.bodySmall.fontSize;
})
wrapper: css`
background: ${backgroundColor};
`,
icon: css`
font-size: ${theme.typography.size.sm};
`,
};
};
});
```
For more information about themes at Grafana please see the [themes guide](./themes.md).
### Composing class names
For class composition, use [Emotion's `cx` function](https://emotion.sh/docs/emotion#cx).
```tsx
import React from 'react';
import { css, cx } from '@emotion/css';
interface Props {
className?: string;
}
const ComponentA: React.FC<Props> = ({ className }) => {
const finalClassName = cx(
className,
css`
background: red;
`
);
return <div className={finalClassName}>As red as you can ge</div>;
};
```

View File

@@ -25,15 +25,15 @@ import { GrafanaTheme2 } from '@grafana/data';
import { useStyles2 } from '@grafana/ui';
import { css } from '@emotion/css';
function Foo(props: FooProps) {
const styles = useStyles2(getStyles);
// Use styles with className
}
```
const getComponentStyles = (theme: GrafanaTheme2) => css`
padding: ${theme.spacing.md};
`;
const getStyles = (theme: GrafanaTheme2) => css({
padding: theme.spacing(1,2)
});
const Foo: FC<FooProps> = () => {
const styles = useStyles2(getComponentsStyles);
// Use styles with className
};
```
#### Get the theme object
@@ -93,7 +93,7 @@ Example use cases:
| -------------------------- | ------------------------------------------------------------ |
| theme.colors.border.weak | Primary border for panels and panes and other subtle borders |
| theme.colors.border.medium | For stronger borders like inputs |
| theme.colors.border.strong | For even stronger border like hover highlighted border |
| theme.colors.border.strong | For even stronger border like hover highighted border |
### Actions

View File

@@ -1,9 +0,0 @@
files:
- source: /public/locales/en-US/grafana.json
translation: /public/locales/%locale%/%original_file_name%
pull_request_title: 'I18n: Crowdin sync'
pull_request_labels:
- area/internationalization
- no-changelog
- no-backport

View File

@@ -35,7 +35,7 @@ make devenv sources=influxdb,prometheus,elastic5
Some of the blocks support dynamic change of the image version used in the Docker file. The signature looks like this:
```bash
make devenv sources=postgres,auth/openldap,grafana postgres_version=9.2 grafana_version=6.7.0-beta1
make devenv sources=postgres,openldap,grafana postgres_version=9.2 grafana_version=6.7.0-beta1
```
@@ -44,9 +44,6 @@ make devenv sources=postgres,auth/openldap,grafana postgres_version=9.2 grafana_
#### Grafana
The grafana block is pre-configured with the dev-datasources and dashboards.
#### Tempo
The tempo block runs loki and prometheus as well and should not be ran with prometheus as a separate source. You need to install a docker plugin for the self logging to work, without it the container won't start. See https://grafana.com/docs/loki/latest/clients/docker-driver/#installing for installation instructions.
#### Jaeger
Jaeger block runs both Jaeger and Loki container. Loki container sends traces to Jaeger and also logs its own logs into itself so it is possible to setup derived field for traceID from Loki to Jaeger. You need to install a docker plugin for the self logging to work, without it the container won't start. See https://grafana.com/docs/loki/latest/clients/docker-driver/#installing for installation instructions.

View File

@@ -16,10 +16,6 @@ deleteDatasources:
- name: gdev-elasticsearch-v6-metrics
- name: gdev-elasticsearch-v6-logs
- name: gdev-elasticsearch-v6-filebeat
- name: gdev-elasticsearch-v7-metrics
- name: gdev-elasticsearch-v7-logs
- name: gdev-elasticsearch-v7-filebeat
- name: gdev-elasticsearch-v7-metricbeat
datasources:
- name: gdev-graphite
@@ -52,15 +48,12 @@ datasources:
implementation: prometheus
- name: gdev-prometheus
uid: gdev-prometheus
type: prometheus
access: proxy
url: http://localhost:9090
jsonData:
manageAlerts: true
alertmanagerUid: gdev-alertmanager
prometheusType: Prometheus #Cortex | Mimir | Prometheus | Thanos
prometheusVersion: 2.40.0
- name: gdev-slow-prometheus
type: prometheus
@@ -131,30 +124,51 @@ datasources:
timeField: "@timestamp"
logLevelField: level
logMessageField: line
esVersion: 8.1.4
esVersion: 8.0.0
- name: gdev-elasticsearch-filebeat
- name: gdev-elasticsearch-v7-metrics
type: elasticsearch
access: proxy
database: "[filebeat-]YYYY.MM.DD"
url: http://localhost:9200
database: "[metrics-]YYYY.MM.DD"
url: http://localhost:12200
jsonData:
timeInterval: 10s
interval: Daily
timeField: "@timestamp"
esVersion: 7.10.0
- name: gdev-elasticsearch-v7-logs
type: elasticsearch
access: proxy
database: "[logs-]YYYY.MM.DD"
url: http://localhost:12200
jsonData:
interval: Daily
timeField: "@timestamp"
esVersion: 8.1.4
esVersion: 7.10.0
- name: gdev-elasticsearch-v7-filebeat
type: elasticsearch
access: proxy
database: "[filebeat-]YYYY.MM.DD"
url: http://localhost:12200
jsonData:
interval: Daily
timeField: "@timestamp"
esVersion: 7.10.0
timeInterval: "10s"
logMessageField: message
logLevelField: fields.level
- name: gdev-elasticsearch-metricbeat
- name: gdev-elasticsearch-v7-metricbeat
type: elasticsearch
access: proxy
database: "[metricbeat-]YYYY.MM.DD"
url: http://localhost:9200
url: http://localhost:12200
jsonData:
interval: Daily
timeField: "@timestamp"
esVersion: 8.1.4
esVersion: 7.10.0
timeInterval: "10s"
- name: gdev-mysql
@@ -240,15 +254,8 @@ datasources:
- targetUID: gdev-zipkin
label: "Zipkin traces"
description: "Related traces stored in Zipkin"
- targetUID: gdev-prometheus
label: "Logs to metrics"
description: "Related metrics stored in Prometheus"
config:
type: query
target:
expr: "{ job=\"test\" }"
field: "traceID"
jsonData:
something: here
manageAlerts: false
derivedFields:
- name: "traceID"
@@ -278,5 +285,5 @@ datasources:
type: tempo
uid: gdev-tempo
access: proxy
url: http://localhost:3200
url: http://localhost:3101
editable: false

View File

@@ -1,12 +1,6 @@
apiVersion: 1
deleteDatasources:
- name: gdev-elasticsearch-v7-metrics
- name: gdev-elasticsearch-v7-logs
- name: gdev-elasticsearch-v7-metricbeat
- name: gdev-elasticsearch-v7-filebeat
datasources:
- name: gdev-graphite
type: graphite
@@ -67,7 +61,17 @@ datasources:
tsdbResolution: 1
tsdbVersion: 1
- name: gdev-elasticsearch
- name: gdev-elasticsearch-v2-metrics
type: elasticsearch
access: proxy
database: "[metrics-]YYYY.MM.DD"
url: http://elasticsearch:9200
jsonData:
interval: Daily
timeField: "@timestamp"
esVersion: 2
- name: gdev-elasticsearch-v2-logs
type: elasticsearch
access: proxy
database: "[logs-]YYYY.MM.DD"
@@ -75,30 +79,121 @@ datasources:
jsonData:
interval: Daily
timeField: "@timestamp"
esVersion: 8.1.4
esVersion: 2
- name: gdev-elasticsearch-filebeat
- name: gdev-elasticsearch-v5-metrics
type: elasticsearch
access: proxy
database: "[filebeat-]YYYY.MM.DD"
url: http://elasticsearch:9200
database: "[metrics-]YYYY.MM.DD"
url: http://elasticsearch5:9200
jsonData:
interval: Daily
timeField: "@timestamp"
esVersion: 8.1.4
esVersion: 5
- name: gdev-elasticsearch-v5-logs
type: elasticsearch
access: proxy
database: "[logs-]YYYY.MM.DD"
url: http://elasticsearch5:9200
jsonData:
interval: Daily
timeField: "@timestamp"
esVersion: 5
- name: gdev-elasticsearch-v56-metrics
type: elasticsearch
access: proxy
database: "[metrics-]YYYY.MM.DD"
url: http://elasticsearch5:9200
jsonData:
interval: Daily
timeField: "@timestamp"
esVersion: 56
- name: gdev-elasticsearch-v56-logs
type: elasticsearch
access: proxy
database: "[logs-]YYYY.MM.DD"
url: http://elasticsearch5:9200
jsonData:
interval: Daily
timeField: "@timestamp"
esVersion: 56
- name: gdev-elasticsearch-v6-metrics
type: elasticsearch
access: proxy
database: "[metrics-]YYYY.MM.DD"
url: http://elasticsearch6:9200
jsonData:
interval: Daily
timeField: "@timestamp"
esVersion: 60
- name: gdev-elasticsearch-v6-logs
type: elasticsearch
access: proxy
database: "[logs-]YYYY.MM.DD"
url: http://elasticsearch6:9200
jsonData:
interval: Daily
timeField: "@timestamp"
esVersion: 60
- name: gdev-elasticsearch-v6-filebeat
type: elasticsearch
access: proxy
database: "[filebeat-]YYYY.MM.DD"
url: http://elasticsearch6:9200
jsonData:
interval: Daily
timeField: "@timestamp"
esVersion: 60
- name: gdev-elasticsearch-v7-metrics
type: elasticsearch
access: proxy
database: "[metrics-]YYYY.MM.DD"
url: http://elasticsearch7:9200
jsonData:
timeInterval: 10s
interval: Daily
timeField: "@timestamp"
esVersion: 70
- name: gdev-elasticsearch-v7-logs
type: elasticsearch
access: proxy
database: "[logs-]YYYY.MM.DD"
url: http://elasticsearch7:9200
jsonData:
interval: Daily
timeField: "@timestamp"
esVersion: 70
- name: gdev-elasticsearch-v7-filebeat
type: elasticsearch
access: proxy
database: "[filebeat-]YYYY.MM.DD"
url: http://elasticsearch7:9200
jsonData:
interval: Daily
timeField: "@timestamp"
esVersion: 70
timeInterval: "10s"
logMessageField: message
logLevelField: fields.level
- name: gdev-elasticsearch-metricbeat
- name: gdev-elasticsearch-v7-metricbeat
type: elasticsearch
access: proxy
database: "[metricbeat-]YYYY.MM.DD"
url: http://elasticsearch:9200
url: http://elasticsearch7:9200
jsonData:
interval: Daily
timeField: "@timestamp"
esVersion: 8.1.4
esVersion: 70
timeInterval: "10s"
- name: gdev-mysql

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