Compare commits

...

69 Commits

Author SHA1 Message Date
Grot (@grafanabot)
82e32447b4 "Release: Updated versions in package to 9.1.0" (#460) 2022-08-16 11:30:13 +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
394 changed files with 10355 additions and 13014 deletions

View File

@@ -8,7 +8,7 @@ exports[`no enzyme tests`] = {
"packages/grafana-ui/src/components/Graph/Graph.test.tsx:1664091255": [
[0, 17, 13, "RegExp match", "2409514259"]
],
"packages/grafana-ui/src/components/Logs/LogRowContextProvider.test.tsx:2719724375": [
"packages/grafana-ui/src/components/Logs/LogRowContextProvider.test.tsx:943686035": [
[0, 17, 13, "RegExp match", "2409514259"]
],
"packages/grafana-ui/src/components/QueryField/QueryField.test.tsx:375894800": [
@@ -1567,8 +1567,7 @@ exports[`better eslint`] = {
[0, 0, 0, "Unexpected any. Specify a different type.", "1"],
[0, 0, 0, "Unexpected any. Specify a different type.", "2"],
[0, 0, 0, "Unexpected any. Specify a different type.", "3"],
[0, 0, 0, "Unexpected any. Specify a different type.", "4"],
[0, 0, 0, "Unexpected any. Specify a different type.", "5"]
[0, 0, 0, "Unexpected any. Specify a different type.", "4"]
],
"packages/grafana-ui/src/components/Logs/LogRowContextProvider.tsx:5381": [
[0, 0, 0, "Do not use any type assertions.", "0"],
@@ -3013,8 +3012,7 @@ exports[`better eslint`] = {
[0, 0, 0, "Unexpected any. Specify a different type.", "0"]
],
"public/app/core/components/SharedPreferences/SharedPreferences.tsx:5381": [
[0, 0, 0, "Do not use any type assertions.", "0"],
[0, 0, 0, "Do not use any type assertions.", "1"]
[0, 0, 0, "Do not use any type assertions.", "0"]
],
"public/app/core/components/TagFilter/TagBadge.tsx:5381": [
[0, 0, 0, "Unexpected any. Specify a different type.", "0"],
@@ -5378,39 +5376,6 @@ exports[`better eslint`] = {
[0, 0, 0, "Do not use any type assertions.", "7"],
[0, 0, 0, "Do not use any type assertions.", "8"]
],
"public/app/features/plugins/sql/components/query-editor-raw/SQLEditor.tsx:5381": [
[0, 0, 0, "Unexpected any. Specify a different type.", "0"],
[0, 0, 0, "Do not use any type assertions.", "1"],
[0, 0, 0, "Do not use any type assertions.", "2"],
[0, 0, 0, "Do not use any type assertions.", "3"],
[0, 0, 0, "Do not use any type assertions.", "4"],
[0, 0, 0, "Do not use any type assertions.", "5"]
],
"public/app/features/plugins/sql/components/visual-query-builder/AwesomeQueryBuilder.tsx:5381": [
[0, 0, 0, "Do not use any type assertions.", "0"],
[0, 0, 0, "Do not use any type assertions.", "1"],
[0, 0, 0, "Unexpected any. Specify a different type.", "2"]
],
"public/app/features/plugins/sql/mocks/Monaco.ts:5381": [
[0, 0, 0, "Unexpected any. Specify a different type.", "0"]
],
"public/app/features/plugins/sql/mocks/queries/singleLineFullQuery.ts:5381": [
[0, 0, 0, "Do not use any type assertions.", "0"]
],
"public/app/features/plugins/sql/standardSql/definition.ts:5381": [
[0, 0, 0, "Unexpected any. Specify a different type.", "0"]
],
"public/app/features/plugins/sql/test-utils/statementPosition.ts:5381": [
[0, 0, 0, "Unexpected any. Specify a different type.", "0"],
[0, 0, 0, "Do not use any type assertions.", "1"],
[0, 0, 0, "Unexpected any. Specify a different type.", "2"],
[0, 0, 0, "Do not use any type assertions.", "3"]
],
"public/app/features/plugins/sql/utils/debugger.ts:5381": [
[0, 0, 0, "Unexpected any. Specify a different type.", "0"],
[0, 0, 0, "Do not use any type assertions.", "1"],
[0, 0, 0, "Unexpected any. Specify a different type.", "2"]
],
"public/app/features/plugins/tests/datasource_srv.test.ts:5381": [
[0, 0, 0, "Unexpected any. Specify a different type.", "0"],
[0, 0, 0, "Unexpected any. Specify a different type.", "1"],
@@ -7615,15 +7580,176 @@ exports[`better eslint`] = {
[0, 0, 0, "Do not use any type assertions.", "1"],
[0, 0, 0, "Do not use any type assertions.", "2"]
],
"public/app/plugins/datasource/mssql/config_ctrl.ts:5381": [
[0, 0, 0, "Unexpected any. Specify a different type.", "0"],
[0, 0, 0, "Unexpected any. Specify a different type.", "1"]
],
"public/app/plugins/datasource/mssql/datasource.ts:5381": [
[0, 0, 0, "Unexpected any. Specify a different type.", "0"],
[0, 0, 0, "Unexpected any. Specify a different type.", "1"],
[0, 0, 0, "Do not use any type assertions.", "2"],
[0, 0, 0, "Unexpected any. Specify a different type.", "3"],
[0, 0, 0, "Unexpected any. Specify a different type.", "4"],
[0, 0, 0, "Unexpected any. Specify a different type.", "5"],
[0, 0, 0, "Unexpected any. Specify a different type.", "6"],
[0, 0, 0, "Unexpected any. Specify a different type.", "7"],
[0, 0, 0, "Do not use any type assertions.", "8"],
[0, 0, 0, "Unexpected any. Specify a different type.", "9"]
],
"public/app/plugins/datasource/mssql/module.ts:5381": [
[0, 0, 0, "Unexpected any. Specify a different type.", "0"],
[0, 0, 0, "Unexpected any. Specify a different type.", "1"]
],
"public/app/plugins/datasource/mssql/query_ctrl.ts:5381": [
[0, 0, 0, "Unexpected any. Specify a different type.", "0"],
[0, 0, 0, "Unexpected any. Specify a different type.", "1"],
[0, 0, 0, "Unexpected any. Specify a different type.", "2"],
[0, 0, 0, "Unexpected any. Specify a different type.", "3"]
],
"public/app/plugins/datasource/mssql/response_parser.ts:5381": [
[0, 0, 0, "Do not use any type assertions.", "0"],
[0, 0, 0, "Unexpected any. Specify a different type.", "1"],
[0, 0, 0, "Do not use any type assertions.", "2"]
],
"public/app/plugins/datasource/mssql/specs/datasource.test.ts:5381": [
[0, 0, 0, "Unexpected any. Specify a different type.", "0"],
[0, 0, 0, "Unexpected any. Specify a different type.", "1"],
[0, 0, 0, "Unexpected any. Specify a different type.", "2"],
[0, 0, 0, "Unexpected any. Specify a different type.", "3"],
[0, 0, 0, "Unexpected any. Specify a different type.", "4"],
[0, 0, 0, "Unexpected any. Specify a different type.", "5"],
[0, 0, 0, "Unexpected any. Specify a different type.", "6"],
[0, 0, 0, "Unexpected any. Specify a different type.", "7"],
[0, 0, 0, "Unexpected any. Specify a different type.", "8"]
],
"public/app/plugins/datasource/mssql/types.ts:5381": [
[0, 0, 0, "Unexpected any. Specify a different type.", "0"],
[0, 0, 0, "Unexpected any. Specify a different type.", "1"],
[0, 0, 0, "Unexpected any. Specify a different type.", "2"],
[0, 0, 0, "Unexpected any. Specify a different type.", "3"],
[0, 0, 0, "Unexpected any. Specify a different type.", "4"],
[0, 0, 0, "Unexpected any. Specify a different type.", "5"]
],
"public/app/plugins/datasource/mysql/datasource.ts:5381": [
[0, 0, 0, "Unexpected any. Specify a different type.", "0"],
[0, 0, 0, "Unexpected any. Specify a different type.", "1"],
[0, 0, 0, "Do not use any type assertions.", "2"],
[0, 0, 0, "Unexpected any. Specify a different type.", "3"],
[0, 0, 0, "Unexpected any. Specify a different type.", "4"],
[0, 0, 0, "Unexpected any. Specify a different type.", "5"],
[0, 0, 0, "Do not use any type assertions.", "6"],
[0, 0, 0, "Unexpected any. Specify a different type.", "7"],
[0, 0, 0, "Unexpected any. Specify a different type.", "8"],
[0, 0, 0, "Unexpected any. Specify a different type.", "9"],
[0, 0, 0, "Unexpected any. Specify a different type.", "10"],
[0, 0, 0, "Unexpected any. Specify a different type.", "11"]
],
"public/app/plugins/datasource/mysql/meta_query.ts:5381": [
[0, 0, 0, "Unexpected any. Specify a different type.", "0"],
[0, 0, 0, "Unexpected any. Specify a different type.", "1"]
],
"public/app/plugins/datasource/mysql/module.ts:5381": [
[0, 0, 0, "Unexpected any. Specify a different type.", "0"],
[0, 0, 0, "Unexpected any. Specify a different type.", "1"],
[0, 0, 0, "Unexpected any. Specify a different type.", "2"]
],
"public/app/plugins/datasource/mysql/mysql_query_model.ts:5381": [
[0, 0, 0, "Unexpected any. Specify a different type.", "0"],
[0, 0, 0, "Unexpected any. Specify a different type.", "1"],
[0, 0, 0, "Unexpected any. Specify a different type.", "2"],
[0, 0, 0, "Unexpected any. Specify a different type.", "3"],
[0, 0, 0, "Unexpected any. Specify a different type.", "4"],
[0, 0, 0, "Unexpected any. Specify a different type.", "5"],
[0, 0, 0, "Unexpected any. Specify a different type.", "6"],
[0, 0, 0, "Unexpected any. Specify a different type.", "7"],
[0, 0, 0, "Unexpected any. Specify a different type.", "8"],
[0, 0, 0, "Unexpected any. Specify a different type.", "9"],
[0, 0, 0, "Unexpected any. Specify a different type.", "10"],
[0, 0, 0, "Unexpected any. Specify a different type.", "11"],
[0, 0, 0, "Unexpected any. Specify a different type.", "12"],
[0, 0, 0, "Unexpected any. Specify a different type.", "13"],
[0, 0, 0, "Unexpected any. Specify a different type.", "14"],
[0, 0, 0, "Unexpected any. Specify a different type.", "15"]
],
"public/app/plugins/datasource/mysql/query_ctrl.ts:5381": [
[0, 0, 0, "Unexpected any. Specify a different type.", "0"],
[0, 0, 0, "Unexpected any. Specify a different type.", "1"],
[0, 0, 0, "Unexpected any. Specify a different type.", "2"],
[0, 0, 0, "Unexpected any. Specify a different type.", "3"],
[0, 0, 0, "Unexpected any. Specify a different type.", "4"],
[0, 0, 0, "Unexpected any. Specify a different type.", "5"],
[0, 0, 0, "Unexpected any. Specify a different type.", "6"],
[0, 0, 0, "Unexpected any. Specify a different type.", "7"],
[0, 0, 0, "Unexpected any. Specify a different type.", "8"],
[0, 0, 0, "Unexpected any. Specify a different type.", "9"],
[0, 0, 0, "Unexpected any. Specify a different type.", "10"],
[0, 0, 0, "Unexpected any. Specify a different type.", "11"],
[0, 0, 0, "Unexpected any. Specify a different type.", "12"],
[0, 0, 0, "Unexpected any. Specify a different type.", "13"],
[0, 0, 0, "Unexpected any. Specify a different type.", "14"],
[0, 0, 0, "Unexpected any. Specify a different type.", "15"],
[0, 0, 0, "Unexpected any. Specify a different type.", "16"],
[0, 0, 0, "Unexpected any. Specify a different type.", "17"],
[0, 0, 0, "Unexpected any. Specify a different type.", "18"],
[0, 0, 0, "Unexpected any. Specify a different type.", "19"],
[0, 0, 0, "Unexpected any. Specify a different type.", "20"],
[0, 0, 0, "Unexpected any. Specify a different type.", "21"],
[0, 0, 0, "Unexpected any. Specify a different type.", "22"],
[0, 0, 0, "Unexpected any. Specify a different type.", "23"],
[0, 0, 0, "Do not use any type assertions.", "24"],
[0, 0, 0, "Do not use any type assertions.", "25"],
[0, 0, 0, "Unexpected any. Specify a different type.", "26"],
[0, 0, 0, "Unexpected any. Specify a different type.", "27"],
[0, 0, 0, "Unexpected any. Specify a different type.", "28"],
[0, 0, 0, "Unexpected any. Specify a different type.", "29"],
[0, 0, 0, "Unexpected any. Specify a different type.", "30"],
[0, 0, 0, "Unexpected any. Specify a different type.", "31"],
[0, 0, 0, "Unexpected any. Specify a different type.", "32"],
[0, 0, 0, "Unexpected any. Specify a different type.", "33"],
[0, 0, 0, "Unexpected any. Specify a different type.", "34"],
[0, 0, 0, "Unexpected any. Specify a different type.", "35"],
[0, 0, 0, "Unexpected any. Specify a different type.", "36"],
[0, 0, 0, "Unexpected any. Specify a different type.", "37"],
[0, 0, 0, "Unexpected any. Specify a different type.", "38"],
[0, 0, 0, "Unexpected any. Specify a different type.", "39"],
[0, 0, 0, "Unexpected any. Specify a different type.", "40"],
[0, 0, 0, "Unexpected any. Specify a different type.", "41"],
[0, 0, 0, "Unexpected any. Specify a different type.", "42"],
[0, 0, 0, "Unexpected any. Specify a different type.", "43"],
[0, 0, 0, "Unexpected any. Specify a different type.", "44"],
[0, 0, 0, "Unexpected any. Specify a different type.", "45"],
[0, 0, 0, "Unexpected any. Specify a different type.", "46"],
[0, 0, 0, "Unexpected any. Specify a different type.", "47"],
[0, 0, 0, "Unexpected any. Specify a different type.", "48"],
[0, 0, 0, "Unexpected any. Specify a different type.", "49"],
[0, 0, 0, "Unexpected any. Specify a different type.", "50"],
[0, 0, 0, "Unexpected any. Specify a different type.", "51"],
[0, 0, 0, "Unexpected any. Specify a different type.", "52"],
[0, 0, 0, "Unexpected any. Specify a different type.", "53"],
[0, 0, 0, "Unexpected any. Specify a different type.", "54"]
],
"public/app/plugins/datasource/mysql/response_parser.ts:5381": [
[0, 0, 0, "Do not use any type assertions.", "0"],
[0, 0, 0, "Unexpected any. Specify a different type.", "1"],
[0, 0, 0, "Do not use any type assertions.", "2"]
],
"public/app/plugins/datasource/mysql/specs/datasource.test.ts:5381": [
[0, 0, 0, "Unexpected any. Specify a different type.", "0"]
[0, 0, 0, "Unexpected any. Specify a different type.", "0"],
[0, 0, 0, "Unexpected any. Specify a different type.", "1"]
],
"public/app/plugins/datasource/mysql/sql_part.ts:5381": [
[0, 0, 0, "Unexpected any. Specify a different type.", "0"],
[0, 0, 0, "Unexpected any. Specify a different type.", "1"],
[0, 0, 0, "Unexpected any. Specify a different type.", "2"],
[0, 0, 0, "Unexpected any. Specify a different type.", "3"]
],
"public/app/plugins/datasource/mysql/types.ts:5381": [
[0, 0, 0, "Unexpected any. Specify a different type.", "0"],
[0, 0, 0, "Unexpected any. Specify a different type.", "1"],
[0, 0, 0, "Unexpected any. Specify a different type.", "2"],
[0, 0, 0, "Unexpected any. Specify a different type.", "3"],
[0, 0, 0, "Unexpected any. Specify a different type.", "4"]
[0, 0, 0, "Unexpected any. Specify a different type.", "4"],
[0, 0, 0, "Unexpected any. Specify a different type.", "5"]
],
"public/app/plugins/datasource/opentsdb/datasource.d.ts:5381": [
[0, 0, 0, "Unexpected any. Specify a different type.", "0"]
@@ -7728,6 +7854,15 @@ exports[`better eslint`] = {
"public/app/plugins/datasource/opentsdb/types.ts:5381": [
[0, 0, 0, "Unexpected any. Specify a different type.", "0"]
],
"public/app/plugins/datasource/postgres/config_ctrl.ts:5381": [
[0, 0, 0, "Unexpected any. Specify a different type.", "0"],
[0, 0, 0, "Unexpected any. Specify a different type.", "1"],
[0, 0, 0, "Unexpected any. Specify a different type.", "2"],
[0, 0, 0, "Unexpected any. Specify a different type.", "3"],
[0, 0, 0, "Unexpected any. Specify a different type.", "4"],
[0, 0, 0, "Unexpected any. Specify a different type.", "5"],
[0, 0, 0, "Unexpected any. Specify a different type.", "6"]
],
"public/app/plugins/datasource/postgres/datasource.test.ts:5381": [
[0, 0, 0, "Unexpected any. Specify a different type.", "0"],
[0, 0, 0, "Unexpected any. Specify a different type.", "1"],
@@ -7748,7 +7883,9 @@ exports[`better eslint`] = {
[0, 0, 0, "Do not use any type assertions.", "11"],
[0, 0, 0, "Unexpected any. Specify a different type.", "12"],
[0, 0, 0, "Unexpected any. Specify a different type.", "13"],
[0, 0, 0, "Unexpected any. Specify a different type.", "14"]
[0, 0, 0, "Unexpected any. Specify a different type.", "14"],
[0, 0, 0, "Unexpected any. Specify a different type.", "15"],
[0, 0, 0, "Unexpected any. Specify a different type.", "16"]
],
"public/app/plugins/datasource/postgres/module.ts:5381": [
[0, 0, 0, "Unexpected any. Specify a different type.", "0"],

View File

@@ -11,11 +11,11 @@ services: []
steps:
- commands:
- echo $DRONE_RUNNER_NAME
image: alpine:3.15
image: alpine:3.15.6
name: identify-runner
- commands:
- mkdir -p bin
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.54/grabpl
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.54-v9.1.x/grabpl
- chmod +x bin/grabpl
image: byrnedo/alpine-curl:0.1.8
name: grabpl
@@ -54,11 +54,11 @@ services: []
steps:
- commands:
- echo $DRONE_RUNNER_NAME
image: alpine:3.15
image: alpine:3.15.6
name: identify-runner
- commands:
- mkdir -p bin
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.54/grabpl
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.54-v9.1.x/grabpl
- chmod +x bin/grabpl
image: byrnedo/alpine-curl:0.1.8
name: grabpl
@@ -137,11 +137,11 @@ services: []
steps:
- commands:
- echo $DRONE_RUNNER_NAME
image: alpine:3.15
image: alpine:3.15.6
name: identify-runner
- commands:
- mkdir -p bin
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.54/grabpl
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.54-v9.1.x/grabpl
- chmod +x bin/grabpl
image: byrnedo/alpine-curl:0.1.8
name: grabpl
@@ -244,11 +244,11 @@ services: []
steps:
- commands:
- echo $DRONE_RUNNER_NAME
image: alpine:3.15
image: alpine:3.15.6
name: identify-runner
- commands:
- mkdir -p bin
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.54/grabpl
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.54-v9.1.x/grabpl
- chmod +x bin/grabpl
image: byrnedo/alpine-curl:0.1.8
name: grabpl
@@ -513,7 +513,7 @@ services:
steps:
- commands:
- mkdir -p bin
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.54/grabpl
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.54-v9.1.x/grabpl
- chmod +x bin/grabpl
image: byrnedo/alpine-curl:0.1.8
name: grabpl
@@ -526,7 +526,7 @@ steps:
name: compile-build-cmd
- commands:
- echo $DRONE_RUNNER_NAME
image: alpine:3.15
image: alpine:3.15.6
name: identify-runner
- commands:
- '# It is required that code generated from Thema/CUE be committed and in sync
@@ -614,13 +614,13 @@ services: []
steps:
- commands:
- mkdir -p bin
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.54/grabpl
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.54-v9.1.x/grabpl
- chmod +x bin/grabpl
image: byrnedo/alpine-curl:0.1.8
name: grabpl
- commands:
- echo $DRONE_RUNNER_NAME
image: alpine:3.15
image: alpine:3.15.6
name: identify-runner
- commands:
- ./bin/grabpl gen-version --build-id ${DRONE_BUILD_NUMBER}
@@ -711,13 +711,13 @@ services: []
steps:
- commands:
- mkdir -p bin
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.54/grabpl
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.54-v9.1.x/grabpl
- chmod +x bin/grabpl
image: byrnedo/alpine-curl:0.1.8
name: grabpl
- commands:
- echo $DRONE_RUNNER_NAME
image: alpine:3.15
image: alpine:3.15.6
name: identify-runner
- commands:
- ./bin/grabpl gen-version --build-id ${DRONE_BUILD_NUMBER}
@@ -803,11 +803,11 @@ services: []
steps:
- commands:
- echo $DRONE_RUNNER_NAME
image: alpine:3.15
image: alpine:3.15.6
name: identify-runner
- commands:
- mkdir -p bin
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.54/grabpl
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.54-v9.1.x/grabpl
- chmod +x bin/grabpl
image: byrnedo/alpine-curl:0.1.8
name: grabpl
@@ -878,11 +878,11 @@ services: []
steps:
- commands:
- echo $DRONE_RUNNER_NAME
image: alpine:3.15
image: alpine:3.15.6
name: identify-runner
- commands:
- mkdir -p bin
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.54/grabpl
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.54-v9.1.x/grabpl
- chmod +x bin/grabpl
image: byrnedo/alpine-curl:0.1.8
name: grabpl
@@ -980,11 +980,11 @@ services: []
steps:
- commands:
- echo $DRONE_RUNNER_NAME
image: alpine:3.15
image: alpine:3.15.6
name: identify-runner
- commands:
- mkdir -p bin
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.54/grabpl
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.54-v9.1.x/grabpl
- chmod +x bin/grabpl
image: byrnedo/alpine-curl:0.1.8
name: grabpl
@@ -1410,7 +1410,7 @@ services:
steps:
- commands:
- mkdir -p bin
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.54/grabpl
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.54-v9.1.x/grabpl
- chmod +x bin/grabpl
image: byrnedo/alpine-curl:0.1.8
name: grabpl
@@ -1423,7 +1423,7 @@ steps:
name: compile-build-cmd
- commands:
- echo $DRONE_RUNNER_NAME
image: alpine:3.15
image: alpine:3.15.6
name: identify-runner
- commands:
- '# It is required that code generated from Thema/CUE be committed and in sync
@@ -1507,7 +1507,7 @@ steps:
name: identify-runner
- commands:
- $$ProgressPreference = "SilentlyContinue"
- Invoke-WebRequest https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.54/windows/grabpl.exe
- Invoke-WebRequest https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.54-v9.1.x/windows/grabpl.exe
-OutFile grabpl.exe
image: grafana/ci-wix:0.1.1
name: windows-init
@@ -1595,7 +1595,7 @@ services: []
steps:
- commands:
- mkdir -p bin
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.54/grabpl
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.54-v9.1.x/grabpl
- chmod +x bin/grabpl
image: byrnedo/alpine-curl:0.1.8
name: grabpl
@@ -1614,7 +1614,7 @@ steps:
name: compile-build-cmd
- commands:
- echo $DRONE_RUNNER_NAME
image: alpine:3.15
image: alpine:3.15.6
name: identify-runner
- commands:
- ./bin/grabpl store-packages --edition oss --gcp-key /tmp/gcpkey.json --build-id
@@ -1689,11 +1689,11 @@ services: []
steps:
- commands:
- echo $DRONE_RUNNER_NAME
image: alpine:3.15
image: alpine:3.15.6
name: identify-runner
- commands:
- mkdir -p bin
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.54/grabpl
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.54-v9.1.x/grabpl
- chmod +x bin/grabpl
image: byrnedo/alpine-curl:0.1.8
name: grabpl
@@ -1994,11 +1994,11 @@ services: []
steps:
- commands:
- echo $DRONE_RUNNER_NAME
image: alpine:3.15
image: alpine:3.15.6
name: identify-runner
- commands:
- mkdir -p bin
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.54/grabpl
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.54-v9.1.x/grabpl
- chmod +x bin/grabpl
image: byrnedo/alpine-curl:0.1.8
name: grabpl
@@ -2140,13 +2140,13 @@ services:
steps:
- commands:
- mkdir -p bin
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.54/grabpl
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.54-v9.1.x/grabpl
- chmod +x bin/grabpl
image: byrnedo/alpine-curl:0.1.8
name: grabpl
- commands:
- echo $DRONE_RUNNER_NAME
image: alpine:3.15
image: alpine:3.15.6
name: identify-runner
- commands:
- '# It is required that code generated from Thema/CUE be committed and in sync
@@ -2234,7 +2234,7 @@ steps:
name: identify-runner
- commands:
- $$ProgressPreference = "SilentlyContinue"
- Invoke-WebRequest https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.54/windows/grabpl.exe
- Invoke-WebRequest https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.54-v9.1.x/windows/grabpl.exe
-OutFile grabpl.exe
image: grafana/ci-wix:0.1.1
name: windows-init
@@ -2293,13 +2293,13 @@ services: []
steps:
- commands:
- mkdir -p bin
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.54/grabpl
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.54-v9.1.x/grabpl
- chmod +x bin/grabpl
image: byrnedo/alpine-curl:0.1.8
name: grabpl
- commands:
- echo $DRONE_RUNNER_NAME
image: alpine:3.15
image: alpine:3.15.6
name: identify-runner
- commands:
- git clone "https://$${GITHUB_TOKEN}@github.com/grafana/grafana-enterprise.git"
@@ -2649,13 +2649,13 @@ services: []
steps:
- commands:
- mkdir -p bin
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.54/grabpl
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.54-v9.1.x/grabpl
- chmod +x bin/grabpl
image: byrnedo/alpine-curl:0.1.8
name: grabpl
- commands:
- echo $DRONE_RUNNER_NAME
image: alpine:3.15
image: alpine:3.15.6
name: identify-runner
- commands:
- git clone "https://$${GITHUB_TOKEN}@github.com/grafana/grafana-enterprise.git"
@@ -2840,13 +2840,13 @@ services:
steps:
- commands:
- mkdir -p bin
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.54/grabpl
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.54-v9.1.x/grabpl
- chmod +x bin/grabpl
image: byrnedo/alpine-curl:0.1.8
name: grabpl
- commands:
- echo $DRONE_RUNNER_NAME
image: alpine:3.15
image: alpine:3.15.6
name: identify-runner
- commands:
- git clone "https://$${GITHUB_TOKEN}@github.com/grafana/grafana-enterprise.git"
@@ -2982,7 +2982,7 @@ steps:
name: identify-runner
- commands:
- $$ProgressPreference = "SilentlyContinue"
- Invoke-WebRequest https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.54/windows/grabpl.exe
- Invoke-WebRequest https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.54-v9.1.x/windows/grabpl.exe
-OutFile grabpl.exe
- git clone "https://$$env:GITHUB_TOKEN@github.com/grafana/grafana-enterprise.git"
- cd grafana-enterprise
@@ -3057,7 +3057,7 @@ services: []
steps:
- commands:
- mkdir -p bin
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.54/grabpl
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.54-v9.1.x/grabpl
- chmod +x bin/grabpl
image: byrnedo/alpine-curl:0.1.8
name: grabpl
@@ -3135,7 +3135,7 @@ services: []
steps:
- commands:
- mkdir -p bin
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.54/grabpl
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.54-v9.1.x/grabpl
- chmod +x bin/grabpl
image: byrnedo/alpine-curl:0.1.8
name: grabpl
@@ -3196,7 +3196,7 @@ services: []
steps:
- commands:
- mkdir -p bin
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.54/grabpl
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.54-v9.1.x/grabpl
- chmod +x bin/grabpl
image: byrnedo/alpine-curl:0.1.8
name: grabpl
@@ -3275,7 +3275,7 @@ services: []
steps:
- commands:
- mkdir -p bin
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.54/grabpl
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.54-v9.1.x/grabpl
- chmod +x bin/grabpl
image: byrnedo/alpine-curl:0.1.8
name: grabpl
@@ -3337,7 +3337,7 @@ services: []
steps:
- commands:
- mkdir -p bin
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.54/grabpl
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.54-v9.1.x/grabpl
- chmod +x bin/grabpl
image: byrnedo/alpine-curl:0.1.8
name: grabpl
@@ -3375,7 +3375,7 @@ services: []
steps:
- commands:
- mkdir -p bin
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.54/grabpl
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.54-v9.1.x/grabpl
- chmod +x bin/grabpl
image: byrnedo/alpine-curl:0.1.8
name: grabpl
@@ -3413,7 +3413,7 @@ services: []
steps:
- commands:
- mkdir -p bin
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.54/grabpl
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.54-v9.1.x/grabpl
- chmod +x bin/grabpl
image: byrnedo/alpine-curl:0.1.8
name: grabpl
@@ -3469,7 +3469,7 @@ services: []
steps:
- commands:
- mkdir -p bin
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.54/grabpl
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.54-v9.1.x/grabpl
- chmod +x bin/grabpl
image: byrnedo/alpine-curl:0.1.8
name: grabpl
@@ -3523,7 +3523,7 @@ services: []
steps:
- commands:
- mkdir -p bin
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.54/grabpl
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.54-v9.1.x/grabpl
- chmod +x bin/grabpl
image: byrnedo/alpine-curl:0.1.8
name: grabpl
@@ -3574,7 +3574,7 @@ services: []
steps:
- commands:
- mkdir -p bin
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.54/grabpl
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.54-v9.1.x/grabpl
- chmod +x bin/grabpl
image: byrnedo/alpine-curl:0.1.8
name: grabpl
@@ -3606,11 +3606,11 @@ services: []
steps:
- commands:
- echo $DRONE_RUNNER_NAME
image: alpine:3.15
image: alpine:3.15.6
name: identify-runner
- commands:
- mkdir -p bin
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.54/grabpl
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.54-v9.1.x/grabpl
- chmod +x bin/grabpl
image: byrnedo/alpine-curl:0.1.8
name: grabpl
@@ -3882,11 +3882,11 @@ services: []
steps:
- commands:
- echo $DRONE_RUNNER_NAME
image: alpine:3.15
image: alpine:3.15.6
name: identify-runner
- commands:
- mkdir -p bin
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.54/grabpl
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.54-v9.1.x/grabpl
- chmod +x bin/grabpl
image: byrnedo/alpine-curl:0.1.8
name: grabpl
@@ -4022,13 +4022,13 @@ services:
steps:
- commands:
- mkdir -p bin
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.54/grabpl
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.54-v9.1.x/grabpl
- chmod +x bin/grabpl
image: byrnedo/alpine-curl:0.1.8
name: grabpl
- commands:
- echo $DRONE_RUNNER_NAME
image: alpine:3.15
image: alpine:3.15.6
name: identify-runner
- commands:
- '# It is required that code generated from Thema/CUE be committed and in sync
@@ -4110,7 +4110,7 @@ steps:
name: identify-runner
- commands:
- $$ProgressPreference = "SilentlyContinue"
- Invoke-WebRequest https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.54/windows/grabpl.exe
- Invoke-WebRequest https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.54-v9.1.x/windows/grabpl.exe
-OutFile grabpl.exe
image: grafana/ci-wix:0.1.1
name: windows-init
@@ -4158,13 +4158,13 @@ services: []
steps:
- commands:
- mkdir -p bin
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.54/grabpl
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.54-v9.1.x/grabpl
- chmod +x bin/grabpl
image: byrnedo/alpine-curl:0.1.8
name: grabpl
- commands:
- echo $DRONE_RUNNER_NAME
image: alpine:3.15
image: alpine:3.15.6
name: identify-runner
- commands:
- git clone "https://$${GITHUB_TOKEN}@github.com/grafana/grafana-enterprise.git"
@@ -4504,13 +4504,13 @@ services: []
steps:
- commands:
- mkdir -p bin
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.54/grabpl
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.54-v9.1.x/grabpl
- chmod +x bin/grabpl
image: byrnedo/alpine-curl:0.1.8
name: grabpl
- commands:
- echo $DRONE_RUNNER_NAME
image: alpine:3.15
image: alpine:3.15.6
name: identify-runner
- commands:
- git clone "https://$${GITHUB_TOKEN}@github.com/grafana/grafana-enterprise.git"
@@ -4686,13 +4686,13 @@ services:
steps:
- commands:
- mkdir -p bin
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.54/grabpl
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.54-v9.1.x/grabpl
- chmod +x bin/grabpl
image: byrnedo/alpine-curl:0.1.8
name: grabpl
- commands:
- echo $DRONE_RUNNER_NAME
image: alpine:3.15
image: alpine:3.15.6
name: identify-runner
- commands:
- git clone "https://$${GITHUB_TOKEN}@github.com/grafana/grafana-enterprise.git"
@@ -4819,7 +4819,7 @@ steps:
name: identify-runner
- commands:
- $$ProgressPreference = "SilentlyContinue"
- Invoke-WebRequest https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.54/windows/grabpl.exe
- Invoke-WebRequest https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.54-v9.1.x/windows/grabpl.exe
-OutFile grabpl.exe
- git clone "https://$$env:GITHUB_TOKEN@github.com/grafana/grafana-enterprise.git"
- cd grafana-enterprise
@@ -5016,6 +5016,6 @@ kind: secret
name: gcp_upload_artifacts_key
---
kind: signature
hmac: 968320e69b8531451dec23ac2d586296616533986c9e9a767410975109220072
hmac: 710e3af4e83d49bce6403c31135075bbd2fbc302b985e0dea201157950805924
...

View File

@@ -2,5 +2,5 @@
# Manual changes might be lost!
integrations:
- vscode
- vim
- vscode

View File

@@ -1,3 +1,232 @@
<!-- 9.1.0-beta1 START -->
# 9.1.0-beta1 (unreleased)
### Features and enhancements
- **API:** Migrate CSRF to service and support additional options. [#48120](https://github.com/grafana/grafana/pull/48120), [@sakjur](https://github.com/sakjur)
- **API:** Move swagger definitions to the handlers and rename operations after them. [#52643](https://github.com/grafana/grafana/pull/52643), [@papagian](https://github.com/papagian)
- **Access Control:** Allow org admins to invite new users. [#52894](https://github.com/grafana/grafana/pull/52894), [@IevaVasiljeva](https://github.com/IevaVasiljeva)
- **AccessControl:** Check dashboards permission for reports. (Enterprise)
- **Alerting:** Add config disabled_labels to disable reserved labels. [#51832](https://github.com/grafana/grafana/pull/51832), [@JacobsonMT](https://github.com/JacobsonMT)
- **Alerting:** Add custom templated title to Wecom notifier. [#51529](https://github.com/grafana/grafana/pull/51529), [@dingweiqings](https://github.com/dingweiqings)
- **Alerting:** Add file provisioning for alert rules. [#51635](https://github.com/grafana/grafana/pull/51635), [@JohnnyQQQQ](https://github.com/JohnnyQQQQ)
- **Alerting:** Add file provisioning for contact points. [#51924](https://github.com/grafana/grafana/pull/51924), [@JohnnyQQQQ](https://github.com/JohnnyQQQQ)
- **Alerting:** Add file provisioning for mute timings. [#52936](https://github.com/grafana/grafana/pull/52936), [@JohnnyQQQQ](https://github.com/JohnnyQQQQ)
- **Alerting:** Add file provisioning for notification policies. [#52877](https://github.com/grafana/grafana/pull/52877), [@JohnnyQQQQ](https://github.com/JohnnyQQQQ)
- **Alerting:** Add file provisioning for text templates. [#52952](https://github.com/grafana/grafana/pull/52952), [@JohnnyQQQQ](https://github.com/JohnnyQQQQ)
- **Alerting:** Add first Grafana reserved label grafana_folder. [#50262](https://github.com/grafana/grafana/pull/50262), [@JacobsonMT](https://github.com/JacobsonMT)
- **Alerting:** Add support for images in Kafka alerts. [#50758](https://github.com/grafana/grafana/pull/50758), [@grobinson-grafana](https://github.com/grobinson-grafana)
- **Alerting:** Add support for images in VictorOps alerts. [#50759](https://github.com/grafana/grafana/pull/50759), [@grobinson-grafana](https://github.com/grobinson-grafana)
- **Alerting:** Adds contact point template syntax highlighting. [#51559](https://github.com/grafana/grafana/pull/51559), [@gillesdemey](https://github.com/gillesdemey)
- **Alerting:** Adds visual tokens for templates. [#51376](https://github.com/grafana/grafana/pull/51376), [@gillesdemey](https://github.com/gillesdemey)
- **Alerting:** Alert rules pagination. [#50612](https://github.com/grafana/grafana/pull/50612), [@konrad147](https://github.com/konrad147)
- **Alerting:** Change **alertScreenshotToken** to **alertImageToken**. [#50771](https://github.com/grafana/grafana/pull/50771), [@grobinson-grafana](https://github.com/grobinson-grafana)
- **Alerting:** Configure alert manager data source as an external AM. [#52081](https://github.com/grafana/grafana/pull/52081), [@konrad147](https://github.com/konrad147)
- **Alerting:** Do not include button in googlechat notification if URL invalid. [#47317](https://github.com/grafana/grafana/pull/47317), [@j6s](https://github.com/j6s)
- **Alerting:** Group alert state history by labels and allow filtering. [#52784](https://github.com/grafana/grafana/pull/52784), [@gillesdemey](https://github.com/gillesdemey)
- **Alerting:** Make ticker to tick at predictable time. [#50197](https://github.com/grafana/grafana/pull/50197), [@yuri-tceretian](https://github.com/yuri-tceretian)
- **Alerting:** Persist rule position in the group. [#50051](https://github.com/grafana/grafana/pull/50051), [@yuri-tceretian](https://github.com/yuri-tceretian)
- **Alerting:** Prevent evaluation if "for" shorter than "evaluate". [#51797](https://github.com/grafana/grafana/pull/51797), [@peterholmberg](https://github.com/peterholmberg)
- **Alerting:** Provisioning UI. [#50776](https://github.com/grafana/grafana/pull/50776), [@gillesdemey](https://github.com/gillesdemey)
- **Alerting:** Rule api to fail update if provisioned rules are affected. [#50835](https://github.com/grafana/grafana/pull/50835), [@yuri-tceretian](https://github.com/yuri-tceretian)
- **Alerting:** Scheduler to drop ticks if a rule's evaluation is too slow. [#48885](https://github.com/grafana/grafana/pull/48885), [@yuri-tceretian](https://github.com/yuri-tceretian)
- **Alerting:** Show evaluation interval global limit warning. [#52942](https://github.com/grafana/grafana/pull/52942), [@konrad147](https://github.com/konrad147)
- **Alerting:** State manager to use tick time to determine stale states. [#50991](https://github.com/grafana/grafana/pull/50991), [@yuri-tceretian](https://github.com/yuri-tceretian)
- **Alerting:** Support for optimistic locking for alert rules. [#50274](https://github.com/grafana/grafana/pull/50274), [@yuri-tceretian](https://github.com/yuri-tceretian)
- **Alerting:** Update RBAC for alert rules to consider access to rule as access to group it belongs. [#49033](https://github.com/grafana/grafana/pull/49033), [@yuri-tceretian](https://github.com/yuri-tceretian)
- **Alerting:** Update default route groupBy to [grafana_folder, alertname]. [#50052](https://github.com/grafana/grafana/pull/50052), [@JacobsonMT](https://github.com/JacobsonMT)
- **Alertmanager:** Adding SigV4 Authentication to Alertmanager Datasource. [#49718](https://github.com/grafana/grafana/pull/49718), [@lewinkedrs](https://github.com/lewinkedrs)
- **Analytics:** Save all view time dates as UTC. (Enterprise)
- **Annotations:** Migrate dashboardId to dashboardUID. [#52588](https://github.com/grafana/grafana/pull/52588), [@lpskdl](https://github.com/lpskdl)
- **Auditing:** Allow users to have more verbose logs. (Enterprise)
- **Auth:** Add lookup params for saml and LDAP sync. (Enterprise)
- **Auth:** Add option for case insensitive login. [#49262](https://github.com/grafana/grafana/pull/49262), [@Jguer](https://github.com/Jguer)
- **Auth:** Case insensitive ids duplicate usagestats. [#50724](https://github.com/grafana/grafana/pull/50724), [@eleijonmarck](https://github.com/eleijonmarck)
- **Auth:** Implement Token URL Auth. [#52578](https://github.com/grafana/grafana/pull/52578), [@Jguer](https://github.com/Jguer)
- **Auth:** Implement Token URL JWT Auth. [#52662](https://github.com/grafana/grafana/pull/52662), [@Jguer](https://github.com/Jguer)
- **Auth:** Lockdown non-editables in frontend when external auth is configured. [#52160](https://github.com/grafana/grafana/pull/52160), [@Jguer](https://github.com/Jguer)
- **Azure Monitor:** Add new dashboard with geo map for app insights test availability. [#52494](https://github.com/grafana/grafana/pull/52494), [@jcolladokuri](https://github.com/jcolladokuri)
- **Azure Monitor:** New template variable editor. [#52594](https://github.com/grafana/grafana/pull/52594), [@andresmgot](https://github.com/andresmgot)
- **Azure Monitor:** Restore Metrics query parameters: subscription, resourceGroup, metricNamespace and resourceName. [#52897](https://github.com/grafana/grafana/pull/52897), [@andresmgot](https://github.com/andresmgot)
- **Chore:** Add dashboard UID as query parameter of Get annotation endpoint. [#52764](https://github.com/grafana/grafana/pull/52764), [@ying-jeanne](https://github.com/ying-jeanne)
- **Chore:** Remove jest-coverage-badges dep from toolkit. [#49883](https://github.com/grafana/grafana/pull/49883), [@zoltanbedi](https://github.com/zoltanbedi)
- **Chore:** Rename dashboardUID to dashboardUIDs in search endpoint and up…. [#52766](https://github.com/grafana/grafana/pull/52766), [@ying-jeanne](https://github.com/ying-jeanne)
- **CloudWatch:** Add default log groups to config page. [#49286](https://github.com/grafana/grafana/pull/49286), [@iwysiu](https://github.com/iwysiu)
- **CommandPalette:** Populate dashboard search when the palette is opened. [#51293](https://github.com/grafana/grafana/pull/51293), [@ryantxu](https://github.com/ryantxu)
- **Core Plugins:** Add support for HTTP logger. [#46578](https://github.com/grafana/grafana/pull/46578), [@toddtreece](https://github.com/toddtreece)
- **Correlations:** Add CreateCorrelation HTTP API. [#51630](https://github.com/grafana/grafana/pull/51630), [@Elfo404](https://github.com/Elfo404)
- **Correlations:** Add DeleteCorrelation HTTP API. [#51801](https://github.com/grafana/grafana/pull/51801), [@Elfo404](https://github.com/Elfo404)
- **Custom branding:** Add UI for setting configuration. (Enterprise)
- **Custom branding:** Add custom branding service (early access). (Enterprise)
- **Data Connections:** Create a new top-level page. [#50018](https://github.com/grafana/grafana/pull/50018), [@leventebalogh](https://github.com/leventebalogh)
- **DataSource:** Allow data source plugins to set query default values. [#49581](https://github.com/grafana/grafana/pull/49581), [@sunker](https://github.com/sunker)
- **Docs:** CSRF add configuration options and documentation for additional headers and origins. [#50473](https://github.com/grafana/grafana/pull/50473), [@eleijonmarck](https://github.com/eleijonmarck)
- **Elasticsearch:** Added `modifyQuery` method to add filters in Explore. [#52313](https://github.com/grafana/grafana/pull/52313), [@svennergr](https://github.com/svennergr)
- **Explore:** Add ability to include tags in trace to metrics queries. [#49433](https://github.com/grafana/grafana/pull/49433), [@connorlindsey](https://github.com/connorlindsey)
- **Explore:** Download and upload service graphs for Tempo. [#50260](https://github.com/grafana/grafana/pull/50260), [@connorlindsey](https://github.com/connorlindsey)
- **Explore:** Make service graph visualization use available vertical space. [#50518](https://github.com/grafana/grafana/pull/50518), [@connorlindsey](https://github.com/connorlindsey)
- **Explore:** Reset Graph overrides if underlying series changes. [#49680](https://github.com/grafana/grafana/pull/49680), [@Elfo404](https://github.com/Elfo404)
- **Explore:** Sort trace process attributes alphabetically. [#51261](https://github.com/grafana/grafana/pull/51261), [@connorlindsey](https://github.com/connorlindsey)
- **Frontend Logging:** Integrate grafana javascript agent. [#50801](https://github.com/grafana/grafana/pull/50801), [@tolzhabayev](https://github.com/tolzhabayev)
- **Geomap:** Add ability to select a data query filter for each layer. [#49966](https://github.com/grafana/grafana/pull/49966), [@mmandrus](https://github.com/mmandrus)
- **Geomap:** Route/path visualization. [#43554](https://github.com/grafana/grafana/pull/43554), [@alexanderzobnin](https://github.com/alexanderzobnin)
- **GeomapPanel:** Add base types to data layer options. [#50053](https://github.com/grafana/grafana/pull/50053), [@drew08t](https://github.com/drew08t)
- **Graph Panel:** Add feature toggle that will allow automatic migration to timeseries panel. [#50631](https://github.com/grafana/grafana/pull/50631), [@ryantxu](https://github.com/ryantxu)
- **Graphite:** Introduce new query types in annotation editor. [#52341](https://github.com/grafana/grafana/pull/52341), [@itsmylife](https://github.com/itsmylife)
- **Infra:** Pass custom headers in resource request. [#51291](https://github.com/grafana/grafana/pull/51291), [@aocenas](https://github.com/aocenas)
- **Insights:** Add RBAC for insights features. (Enterprise)
- **Instrumentation:** Add more buckets to the HTTP request histogram. [#51492](https://github.com/grafana/grafana/pull/51492), [@bergquist](https://github.com/bergquist)
- **Instrumentation:** Collect database connection stats. [#52797](https://github.com/grafana/grafana/pull/52797), [@bergquist](https://github.com/bergquist)
- **Instrumentation:** Convert some metrics to histograms. [#50420](https://github.com/grafana/grafana/pull/50420), [@SuperQ](https://github.com/SuperQ)
- **Jaeger:** Add support for variables. [#50500](https://github.com/grafana/grafana/pull/50500), [@joey-grafana](https://github.com/joey-grafana)
- **LDAP:** Allow specifying LDAP timeout. [#48870](https://github.com/grafana/grafana/pull/48870), [@hannes-256](https://github.com/hannes-256)
- **LibraryPanels:** Require only viewer permissions to use a Library Panel. [#50241](https://github.com/grafana/grafana/pull/50241), [@joshhunt](https://github.com/joshhunt)
- **Licensing:** Usage-based billing reporting enhancements. (Enterprise)
- **Logs:** Handle clicks on legend labels in histogram. [#49931](https://github.com/grafana/grafana/pull/49931), [@gabor](https://github.com/gabor)
- **Logs:** Improve the color for unknown log level. [#52711](https://github.com/grafana/grafana/pull/52711), [@gabor](https://github.com/gabor)
- **Loki/Logs:** Make it possible to copy log values to clipboard. [#50914](https://github.com/grafana/grafana/pull/50914), [@Seyaji](https://github.com/Seyaji)
- **Loki:** Add hint for pipeline error to query builder. [#52134](https://github.com/grafana/grafana/pull/52134), [@ivanahuckova](https://github.com/ivanahuckova)
- **Loki:** Add hints for level-like labels. [#52414](https://github.com/grafana/grafana/pull/52414), [@ivanahuckova](https://github.com/ivanahuckova)
- **Loki:** Add support for IP label and line filter in query builder. [#52658](https://github.com/grafana/grafana/pull/52658), [@ivanahuckova](https://github.com/ivanahuckova)
- **Loki:** Add unwrap with conversion function to builder. [#52639](https://github.com/grafana/grafana/pull/52639), [@ivanahuckova](https://github.com/ivanahuckova)
- **Loki:** Implement hints for query builder. [#51795](https://github.com/grafana/grafana/pull/51795), [@ivanahuckova](https://github.com/ivanahuckova)
- **Loki:** Move explain section to builder mode. [#52879](https://github.com/grafana/grafana/pull/52879), [@ivanahuckova](https://github.com/ivanahuckova)
- **Loki:** Show label options for unwrap operation. [#52810](https://github.com/grafana/grafana/pull/52810), [@ivanahuckova](https://github.com/ivanahuckova)
- **Loki:** Support json parser with expressions in query builder. [#51965](https://github.com/grafana/grafana/pull/51965), [@ivanahuckova](https://github.com/ivanahuckova)
- **Navigation:** Display `Starred` dashboards in the `Navbar`. [#51038](https://github.com/grafana/grafana/pull/51038), [@ashharrison90](https://github.com/ashharrison90)
- **Node Graph Panel:** Add options to configure units and arc colors. [#51057](https://github.com/grafana/grafana/pull/51057), [@connorlindsey](https://github.com/connorlindsey)
- **OAuth:** Allow role mapping from GitHub and GitLab groups. [#52407](https://github.com/grafana/grafana/pull/52407), [@Jguer](https://github.com/Jguer)
- **Opentsdb:** Add tag values into the opentsdb response. [#48672](https://github.com/grafana/grafana/pull/48672), [@xy-man](https://github.com/xy-man)
- **OptionsUI:** UnitPicker now supports isClearable setting. [#51064](https://github.com/grafana/grafana/pull/51064), [@ryantxu](https://github.com/ryantxu)
- **PanelEdit:** Hide multi-/all-select datasource variables in datasource picker. [#52142](https://github.com/grafana/grafana/pull/52142), [@eledobleefe](https://github.com/eledobleefe)
- **Piechart:** Implements series override -> hide in area for the legend or tooltip. [#51297](https://github.com/grafana/grafana/pull/51297), [@daniellee](https://github.com/daniellee)
- **Plugin admin:** Add a page to show where panel plugins are used in dashboards. [#50909](https://github.com/grafana/grafana/pull/50909), [@ryantxu](https://github.com/ryantxu)
- **Plugins:** Add validation for plugin manifest. [#52787](https://github.com/grafana/grafana/pull/52787), [@wbrowne](https://github.com/wbrowne)
- **Prometheus:** Move explain section to builder mode. [#52935](https://github.com/grafana/grafana/pull/52935), [@itsmylife](https://github.com/itsmylife)
- **Prometheus:** Support 1ms resolution intervals. [#44707](https://github.com/grafana/grafana/pull/44707), [@dankeder](https://github.com/dankeder)
- **Prometheus:** Throw error on direct access. [#50162](https://github.com/grafana/grafana/pull/50162), [@aocenas](https://github.com/aocenas)
- **RBAC:** Add RBAC for query caching. (Enterprise)
- **RBAC:** Add access control metadata to folder dtos. [#51158](https://github.com/grafana/grafana/pull/51158), [@kalleep](https://github.com/kalleep)
- **RBAC:** Allow app plugins access restriction. [#51524](https://github.com/grafana/grafana/pull/51524), [@gamab](https://github.com/gamab)
- **RBAC:** Rename alerting roles to match naming convention. [#50504](https://github.com/grafana/grafana/pull/50504), [@gamab](https://github.com/gamab)
- **Report:** Calculate grid height unit dynamically instead use hardcode values. (Enterprise)
- **Reports:** Add created column in report_dashboards. (Enterprise)
- **Reports:** Add dashboard title in all pdf pages. (Enterprise)
- **Reports:** Allow saving draft reports. (Enterprise)
- **Reports:** Multiple dashboards improvements. (Enterprise)
- **SAML :** Support Azure Single Sign Out. (Enterprise)
- **SAML:** Add NameIDFormat in SP metadata. (Enterprise)
- **SAML:** Improve debug logs for saml logout. (Enterprise)
- **SSE:** Add noData type. [#51973](https://github.com/grafana/grafana/pull/51973), [@kylebrandt](https://github.com/kylebrandt)
- **Search:** Filter punctuation and tokenize camel case. [#51165](https://github.com/grafana/grafana/pull/51165), [@FZambia](https://github.com/FZambia)
- **Search:** Sync state on read for HA consistency. [#50152](https://github.com/grafana/grafana/pull/50152), [@FZambia](https://github.com/FZambia)
- **Security:** Choose Lookup params per auth module (CVE-2022-31107). [#52312](https://github.com/grafana/grafana/pull/52312), [@Jguer](https://github.com/Jguer)
- **Service Accounts:** Managed permissions for service accounts. [#51818](https://github.com/grafana/grafana/pull/51818), [@IevaVasiljeva](https://github.com/IevaVasiljeva)
- **Service accounts:** Grafana service accounts are enabled by default. [#51402](https://github.com/grafana/grafana/pull/51402), [@vtorosyan](https://github.com/vtorosyan)
- **ServiceAccounts:** Add Prometheus metrics service. [#51831](https://github.com/grafana/grafana/pull/51831), [@Jguer](https://github.com/Jguer)
- **ServiceAccounts:** Add Service Account Token last used at date. [#51446](https://github.com/grafana/grafana/pull/51446), [@Jguer](https://github.com/Jguer)
- **SharePDF:** Use currently selected variables and time range when generating PDF. (Enterprise)
- **Slider:** Enforce numeric constraints and styling within the text input. [#50905](https://github.com/grafana/grafana/pull/50905), [@drew08t](https://github.com/drew08t)
- **State Timeline:** Enable support for annotations. [#47887](https://github.com/grafana/grafana/pull/47887), [@dprokop](https://github.com/dprokop)
- **Table panel:** Add multiple data links support to Default, Image and JSONView cells. [#51162](https://github.com/grafana/grafana/pull/51162), [@dprokop](https://github.com/dprokop)
- **TeamSync:** Remove LDAP specific example from team sync. [#51368](https://github.com/grafana/grafana/pull/51368), [@Jguer](https://github.com/Jguer)
- **TeamSync:** Support case insensitive matches and wildcard groups. (Enterprise)
- **Tempo:** Add context menu to edges. [#52396](https://github.com/grafana/grafana/pull/52396), [@joey-grafana](https://github.com/joey-grafana)
- **Tempo:** Consider tempo search out of beta and remove beta badge and feature flags. [#50030](https://github.com/grafana/grafana/pull/50030), [@connorlindsey](https://github.com/connorlindsey)
- **Tempo:** Tempo/Prometheus links select ds in new tab (cmd + click). [#52319](https://github.com/grafana/grafana/pull/52319), [@joey-grafana](https://github.com/joey-grafana)
- **Time series panel:** Hide axis when series is hidden from the visualization. [#51432](https://github.com/grafana/grafana/pull/51432), [@dprokop](https://github.com/dprokop)
- **TimeSeries:** Add option for symmetrical y axes (align 0). [#52555](https://github.com/grafana/grafana/pull/52555), [@leeoniya](https://github.com/leeoniya)
- **TimeSeries:** Add option to match axis color to series color. [#51437](https://github.com/grafana/grafana/pull/51437), [@leeoniya](https://github.com/leeoniya)
- **TimeSeries:** Improved constantY rendering parity with Graph (old). [#51401](https://github.com/grafana/grafana/pull/51401), [@leeoniya](https://github.com/leeoniya)
- **Timeseries:** Support multiple timezones in x axis. [#52424](https://github.com/grafana/grafana/pull/52424), [@ryantxu](https://github.com/ryantxu)
- **TopNav:** Adds new feature toggle for upcoming nav. [#51115](https://github.com/grafana/grafana/pull/51115), [@torkelo](https://github.com/torkelo)
- **Traces:** APM table. [#48654](https://github.com/grafana/grafana/pull/48654), [@joey-grafana](https://github.com/joey-grafana)
- **Traces:** Add absolute time to span details. [#50685](https://github.com/grafana/grafana/pull/50685), [@joey-grafana](https://github.com/joey-grafana)
- **Traces:** Add horizontal scroll. [#50278](https://github.com/grafana/grafana/pull/50278), [@joey-grafana](https://github.com/joey-grafana)
- **Traces:** Consistent span colors for service names. [#50782](https://github.com/grafana/grafana/pull/50782), [@joey-grafana](https://github.com/joey-grafana)
- **Traces:** Move towards using OTEL naming conventions. [#51379](https://github.com/grafana/grafana/pull/51379), [@joey-grafana](https://github.com/joey-grafana)
- **Traces:** Span bar label. [#50931](https://github.com/grafana/grafana/pull/50931), [@joey-grafana](https://github.com/joey-grafana)
- **Transformations:** Add standard deviation and variance reducers. [#52769](https://github.com/grafana/grafana/pull/52769), [@ryantxu](https://github.com/ryantxu)
- **Transforms:** Add Join by label transformation. [#52670](https://github.com/grafana/grafana/pull/52670), [@ryantxu](https://github.com/ryantxu)
- **URL:** Encode certain special characters. [#51806](https://github.com/grafana/grafana/pull/51806), [@L-M-K-B](https://github.com/L-M-K-B)
- **ValueMappings:** Make value mapping row focusable. [#52337](https://github.com/grafana/grafana/pull/52337), [@lpskdl](https://github.com/lpskdl)
- **Variables:** Add 'jsonwithoutquote' formatting options for variables, and format of variable supports pipeline. [#51859](https://github.com/grafana/grafana/pull/51859), [@MicroOps-cn](https://github.com/MicroOps-cn)
- **Variables:** Selectively reload panels on URL update. [#51003](https://github.com/grafana/grafana/pull/51003), [@toddtreece](https://github.com/toddtreece)
- **Various Panels:** Add ability to toggle legend with keyboard shortcut. [#52241](https://github.com/grafana/grafana/pull/52241), [@alyssabull](https://github.com/alyssabull)
### Bug fixes
- **API:** Fix failing test by initialising legacy guardian when creating folder scenario. [#50800](https://github.com/grafana/grafana/pull/50800), [@vicmarbev](https://github.com/vicmarbev)
- **Access control:** Show dashboard settings to users who can edit dashboard. [#52532](https://github.com/grafana/grafana/pull/52532), [@IevaVasiljeva](https://github.com/IevaVasiljeva)
- **Alerting:** Fix RegExp matchers in frontend for Silences and other previews. [#51726](https://github.com/grafana/grafana/pull/51726), [@joeblubaugh](https://github.com/joeblubaugh)
- **Alerting:** Fix rule API to accept 0 duration of field `For`. [#50992](https://github.com/grafana/grafana/pull/50992), [@yuri-tceretian](https://github.com/yuri-tceretian)
- **Alerting:** Increase alert rule operation perf by replacing subquery with threshold calculation. [#53069](https://github.com/grafana/grafana/pull/53069), [@alexweav](https://github.com/alexweav)
- **Barchart Panel:** Fix threshold colors changing when data is refreshed. [#52038](https://github.com/grafana/grafana/pull/52038), [@mingozh](https://github.com/mingozh)
- **Dashboard:** Fix iteration property change triggering unsaved changes warning. [#51272](https://github.com/grafana/grafana/pull/51272), [@torkelo](https://github.com/torkelo)
- **Dashboards:** Disable variable pickers for snapshots. [#52827](https://github.com/grafana/grafana/pull/52827), [@joshhunt](https://github.com/joshhunt)
- **Elasticsearch:** Always use fixed_interval. [#50297](https://github.com/grafana/grafana/pull/50297), [@gabor](https://github.com/gabor)
- **Geomap:** Fix tooltip offset bug. [#52627](https://github.com/grafana/grafana/pull/52627), [@drew08t](https://github.com/drew08t)
- **Geomap:** Update with template variable change. [#52007](https://github.com/grafana/grafana/pull/52007), [@drew08t](https://github.com/drew08t)
- **Loki:** Fix adding of multiple label filters when parser. [#52335](https://github.com/grafana/grafana/pull/52335), [@ivanahuckova](https://github.com/ivanahuckova)
- **Loki:** Fix support of ad-hoc filters for specific queries. [#51232](https://github.com/grafana/grafana/pull/51232), [@ivanahuckova](https://github.com/ivanahuckova)
- **Navigation:** Hide `Dashboards`/`Starred items` from navbar when unauthenticated. [#53051](https://github.com/grafana/grafana/pull/53051), [@ashharrison90](https://github.com/ashharrison90)
- **PasswordReset:** Enforce password length check on password reset request. [#51005](https://github.com/grafana/grafana/pull/51005), [@asymness](https://github.com/asymness)
- **Prometheus:** Fix integer overflow in rate interval calculation on 32-bit architectures. [#51508](https://github.com/grafana/grafana/pull/51508), [@andreasgerstmayr](https://github.com/andreasgerstmayr)
- **Search:** Fix indexing - re-index after initial provisioning. [#50959](https://github.com/grafana/grafana/pull/50959), [@FZambia](https://github.com/FZambia)
- **Slider:** Fixes styling of marker dots. [#52678](https://github.com/grafana/grafana/pull/52678), [@torkelo](https://github.com/torkelo)
- **Tracing:** Fix links to traces in Explore. [#50113](https://github.com/grafana/grafana/pull/50113), [@connorlindsey](https://github.com/connorlindsey)
### Breaking changes
Some swagger operations and responses have been renamed to match the respective handler names in order to better highlight their relation.
If you use the Swagger specification for generating code, you have to re-generate it and make the necessary adjustments. Issue [#52643](https://github.com/grafana/grafana/issues/52643)
The following metrics have been converted to histograms:
- grafana_datasource_request_total
- grafana_datasource_request_duration_seconds
- grafana_datasource_response_size_bytes
- grafana_datasource_request_in_flight
- grafana_plugin_request_duration_milliseconds
- grafana_alerting_rule_evaluation_duration_seconds Issue [#50420](https://github.com/grafana/grafana/issues/50420)
In Elasticsearch versions 7.x, to specify the interval-value we used the `interval` property. In Grafana 9.1.0 we switched to use the `fixed_interval` property. This makes it to be the same as in Elasticsearch versions 8.x, also this provides a more consistent experience, `fixed_interval` is a better match to Grafana's time invervals. For most situations this will not cause any visible change to query results. Issue [#50297](https://github.com/grafana/grafana/issues/50297)
### Grafana now reserves alert labels prefixed with `grafana_`
Labels prefixed with `grafana_` are reserved by Grafana for special use. If a manually configured label is added beginning with `grafana_` it may be overwritten in case of collision.
The current list of labels created by Grafana and available for use anywhere manually configured labels are:
| Label | Description |
| -------------- | ----------------------------------------- | --------------------------------------------------------------- |
| grafana_folder | Title of the folder containing the alert. | Issue [#50262](https://github.com/grafana/grafana/issues/50262) |
In Prometheus, browser access mode was deprecated in Grafana 7.4.0 and removed in 9.0.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)
### Plugin development fixes & changes
- **Dropdown:** New dropdown component. [#52684](https://github.com/grafana/grafana/pull/52684), [@torkelo](https://github.com/torkelo)
- **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.1.0-beta1 END -->
<!-- 9.0.6 START -->
# 9.0.6 (2022-08-01)
### Features and enhancements
- **Access Control:** Allow org admins to invite new users to their organization. [#52904](https://github.com/grafana/grafana/pull/52904), [@IevaVasiljeva](https://github.com/IevaVasiljeva)
### Bug fixes
- **Grafana/toolkit:** Fix incorrect image and font generation for plugin builds. [#52927](https://github.com/grafana/grafana/pull/52927), [@academo](https://github.com/academo)
- **Prometheus:** Fix adding of multiple values for regex operator. [#52978](https://github.com/grafana/grafana/pull/52978), [@ivanahuckova](https://github.com/ivanahuckova)
- **UI/Card:** Fix card items always having pointer cursor. [#52809](https://github.com/grafana/grafana/pull/52809), [@gillesdemey](https://github.com/gillesdemey)
<!-- 9.0.6 END -->
<!-- 9.0.5 START -->
# 9.0.5 (2022-07-26)

View File

@@ -39,7 +39,7 @@ RUN go mod verify
RUN make build-go
# Final stage
FROM alpine:3.15
FROM alpine:3.15.6
LABEL maintainer="Grafana team <hello@grafana.com>"
@@ -75,6 +75,7 @@ RUN export GF_GID_NAME=$(getent group $GF_GID | cut -d':' -f1) && \
"$GF_PATHS_PROVISIONING/notifiers" \
"$GF_PATHS_PROVISIONING/plugins" \
"$GF_PATHS_PROVISIONING/access-control" \
"$GF_PATHS_PROVISIONING/alerting" \
"$GF_PATHS_LOGS" \
"$GF_PATHS_PLUGINS" \
"$GF_PATHS_DATA" && \

View File

@@ -68,6 +68,7 @@ RUN mkdir -p "$GF_PATHS_HOME/.aws" && \
"$GF_PATHS_PROVISIONING/notifiers" \
"$GF_PATHS_PROVISIONING/plugins" \
"$GF_PATHS_PROVISIONING/access-control" \
"$GF_PATHS_PROVISIONING/alerting" \
"$GF_PATHS_LOGS" \
"$GF_PATHS_PLUGINS" \
"$GF_PATHS_DATA" && \

View File

@@ -440,6 +440,9 @@ sigv4_auth_enabled = false
# Set to true to enable verbose logging of SigV4 request signing
sigv4_verbose_logging = false
# Set to true to enable Azure authentication option for HTTP-based datasources
azure_auth_enabled = false
#################################### Anonymous Auth ######################
[auth.anonymous]
# enable anonymous access
@@ -652,7 +655,6 @@ managed_identity_client_id =
#################################### Role-based Access Control ###########
[rbac]
enabled = true
# If enabled, cache permissions in a in memory cache (Enterprise only)
permission_cache = true

View File

@@ -440,6 +440,9 @@
# Set to true to enable verbose logging of SigV4 request signing
;sigv4_verbose_logging = false
# Set to true to enable Azure authentication option for HTTP-based datasources.
;azure_auth_enabled = false
#################################### Anonymous Auth ######################
[auth.anonymous]
# enable anonymous access
@@ -635,8 +638,6 @@
#################################### Role-based Access Control ###########
[rbac]
;enabled = true
# If enabled, cache permissions in a in memory cache (Enterprise only)
;permission_cache = true
#################################### SMTP / Emailing ##########################
[smtp]

View File

@@ -19,40 +19,36 @@ keywords:
# Use dashboards
The dashboard UI has the following sections to allow you to customize the presentation of data.
This topic provides an overview of dashboard features and shortcuts, and describes how to use dashboard search.
{{< figure src="/static/img/docs/v50/dashboard_annotated.png" class="no-shadow" width="700px" >}}
## Dashboard feature overview
- **Zoom out time range** (1)
- **Time picker dropdown** (2). Access relative time range options, auto refresh options and set custom absolute time ranges.
- **Refresh option** (3) Click to trigger queries or set auto refresh.
- **Dashboard panel** (4) Click the panel title to open panel menu.
- **Graph legend** (5) Change series colors, y-axis and series visibility directly from the legend.
The dashboard user interface provides a number of features that you can use to customize the presentation of your data.
For more details, see [Dashboard header]({{< relref "#dashboard-header" >}}) and [Dashboard rows]({{< relref "#dashboard-rows" >}}).
The following image and descriptions highlights all dashboards features.
## Dashboard header
{{< figure src="/static/img/docs/v91/dashboard-features/dashboard-features.png" width="700px" >}}
The dashboard header has the following sections.
{{< figure src="/static/img/docs/v50/top_nav_annotated.png" width="450px" >}}
- **Dashboard title** (2): This also opens the dashboard search when clicked.
- **Add panel** (3): Use this option to add a new panel or row to the current dashboard.
- **Star dashboard** (4): Use this option to star (or unstar) the current dashboard. Starred dashboards show up on your own home dashboard and in the navigation bar by default. It is a convenient way to mark Dashboards that you're interested in.
- **Share dashboard** (5): Use this option to share the current dashboard by link or snapshot. You can also export the dashboard definition from the share modal.
- **Save dashboard** (6): Use this option to save the current dashboard using its current name.
- **Settings** (7): Use this option to open dashboard settings. Here you change dashboard name, folder, tags as well as manage variables and annotation queries.
## Dashboard panels
The main building block of dashboard is the panel. You add new panels via the `Add panel` button at the top of the dashboard. This will add view at the top where you can choose if you want to add a new panel, row or library panel. Library panels are panels that can be shared (reused) in many dashboards. You can move panels around by just dragging the panel header. To resize panel use the lower right corner.
## Dashboard rows
A dashboard row is a logical divider within a dashboard. It is used to group panels together. Rows can be collapsed or expanded allowing you to hide parts of the dashboard. Panels inside a collapsed row will not issue any queries.
Use the [repeating rows]({{< relref "../panels/add-panels-dynamically/configure-repeating-rows" >}}) to dynamically create rows based on a template variable.
- **Grafana home** (1): Click the Grafana home icon to be redirected to the home page configured in the Grafana instance.
- **Dashboard title** (2): When you click the dashboard title you can search for dashboard contained in the current folder.
- **Share dashboard** (3): Use this option to share the current dashboard by link or snapshot. You can also export the dashboard definition from the share modal.
- **Add panel** (4): Use this option to add a panel, dashboard row, or library panel to the current dashboard.
- **Dashboard settings** (5): Use this option to change dashboard name, folder, and tags and manage variables and annotation queries.
- **Time picker dropdown** (6): Click to select relative time range options and set custom absolute time ranges.
- **Zoom out time range** (7): Click to zoom out the time range. For more information about how to use time range controls, refer to [Common time range controls](../time-range-controls/#common-time-range-controls).
- **Refresh dashboard** (8): Click to immediately trigger queries and refresh dashboard data.
- **Refresh dashboard time interval** (9): Click to select a dashboard auto refresh time interval.
- **View mode** (10): Click to display the dashboard on a large screen such as a TV or a kiosk. View mode hides irrelevant information such as navigation menus. For more information about view mode, refer to [How to Create Kiosks to Display Dashboards on a TV](https://grafana.com/blog/2019/05/02/grafana-tutorial-how-to-create-kiosks-to-display-dashboards-on-a-tv/).
- **Dashboard panel** (11): The primary building block of a dashboard is the panel. To add a new panel, dashboard row, or library panel, click **Add panel**.
- Library panels can be shared among many dashboards.
- To move a panel, drag the panel header to another location.
- To resize a panel, click and drag the lower right corner of the panel.
- **Graph legend** (12): Change series colors, y-axis and series visibility directly from the legend.
- **Search** (13): Click **Search** to search for dashboards by name or panel title.
- **Dashboard row** (14): A dashboard row is a logical divider within a dashboard that groups panels together.
- Rows can be collapsed or expanded allowing you to hide parts of the dashboard.
- Panels inside a collapsed row do not issue queries.
- Use the [repeating rows]({{< relref "../panels/configure-panel-options/#configure-repeating-rows" >}}) to dynamically create rows based on a template variable.
## Keyboard shortcuts
@@ -66,7 +62,7 @@ Grafana has a number of keyboard shortcuts available. Press `?` or `h` on your k
- `Ctrl+K`: Opens the command palette.
- `Esc`: Exits panel when in fullscreen view or edit mode. Also returns you to the dashboard from dashboard settings.
**Focused Panel**
**Focused panel**
By hovering over a panel with the mouse you can use some shortcuts that will target that panel.
@@ -77,24 +73,13 @@ By hovering over a panel with the mouse you can use some shortcuts that will tar
- `pr`: Remove Panel
- `pl`: Toggle panel legend
## Dashboard Search
## Dashboard search
Dashboards can be searched by the dashboard name, filtered by one (or many) tags or filtered by starred status. The dashboard search is accessed through the dashboard picker, available in the dashboard top nav area. The dashboard search can also be opened by using the shortcut `F`.
You can search for dashboards by dashboard name and by panel title. When you search for dashboards, the system returns all dashboards available within the Grafana instance, even if you do not have permission to view the contents of the dashboard.
{{< figure src="/static/img/docs/v50/dashboard_search_annotated.png" width="700px" >}}
### Search dashboards using dashboard name
1. `Search Bar`: The search bar allows you to enter any string and search both database and file based dashboards in real-time.
1. `Starred`: Here you find all your starred dashboards.
1. `Recent`: Here you find the latest created dashboards.
1. `Folders`: The tags filter allows you to filter the list by dashboard tags.
1. `Root`: The root contains all dashboards that are not placed in a folder.
1. `Tags`: The tags filter allows you to filter the list by dashboard tags.
When using only a keyboard, you can use your keyboard arrow keys to navigate the results, hit enter to open the selected dashboard.
### Find by dashboard name
Begin typing any part of the desired dashboard names in the search bar. Search will return results for any partial string match in real-time, as you type.
Begin typing any part of the dashboard name in the search bar. The search returns results for any partial string match in real-time, as you type.
Dashboard search is:
@@ -102,14 +87,62 @@ Dashboard search is:
- _Not_ case sensitive
- Functional across stored _and_ file based dashboards.
### Filter by Tag(s)
> \*\*Note: You can use your keyboard arrow keys to navigate the results and press `Enter` to open the selected dashboard.
Tags are a great way to organize your dashboards, especially as the number of dashboards grow. Tags can be added and managed in the dashboard `Settings`.
The following image shows the search results when you search using dashboard name.
To filter the dashboard list by tag, click on any tag appearing in the right column. The list may be further filtered by clicking on additional tags:
{{< figure src="/static/img/docs/v91/dashboard-features/search-by-dashboard-name.png" width="700px" >}}
Alternately, to see a list of all available tags, click the tags dropdown menu. All tags will be shown, and when a tag is selected, the dashboard search will be instantly filtered:
### Search dashboards using panel title
When using only a keyboard: `tab` to focus on the _tags_ link, `▼` down arrow key to find a tag and select with the `Enter` key.
You can search for a dashboard by the title of a panel that appears in a dashboard.
If a panel's title matches your search query, the dashboard appears in the search results.
> **Note:** When multiple tags are selected, Grafana will show dashboards that include **all**.
This feature is available by default in Grafana Cloud and in Grafana OSS v9.1 and higher, you access this feature by enabling the `panelTitleSearch` feature toggle.
For more information about enabling panel title search, refer to [Enable the panelTitleSearch feature toggle.](#enable-panelTitleSearch-feature-toggle)
The following image shows the search results when you search using panel title.
{{< figure src="/static/img/docs/v91/dashboard-features/search-by-panel-title.png" width="700px" >}}
#### Enable the panelTitleSearch feature toggle
Complete the following steps to enable the `panelTitleSearch` feature toggle.
**Before you begin:**
- If you are running Grafana Enterprise with RBAC, enable [service accounts]({{< relref "../administration/service-accounts/" >}}).
**To enable the panelTitleSearch feature toggle:**
1. Open the Grafana [configuration file]({{< relref "../setup-grafana/configure-grafana/#configuration-file-location" >}}).
1. Locate the [feature_toggles]({{< relref "../setup-grafana/configure-grafana/#feature_toggles" >}}) section.
1. Add the following parameter to the `feature_toggles` section:
```
[feature_toggles]
# enable features, separated by spaces
enable = dashboardPreviews
```
1. Save your changes and restart the Grafana server.
### Filter dashboard search results by tag(s)
Tags are a great way to organize your dashboards, especially as the number of dashboards grow. You can add and manage tags in dashboard `Settings`.
When you select multiple tags, Grafana shows dashboards that include all selected tags.
To filter dashboard search result by a tag, complete one of the following steps:
- To filter dashboard search results by tag, click a tag that appears in the right column of the search results.
You can continue filtering by clicking additional tags.
- To see a list of all available tags, click the **Filter by tags** dropdown menu and select a tag.
All tags will be shown, and when you select a tag, the dashboard search will be instantly filtered.
> **Note:** When using only a keyboard, press the `tab` key and navigate to the **Filter by tag** drop-down menu, press the down arrow key `` to activate the menu and locate a tag, and press `Enter` to select the tag.

View File

@@ -18,7 +18,9 @@ weight: 999
# Deprecated Application Insights and Insights Analytics
Application Insights and Insights Analytics are two ways to query the same Azure Application Insights data, which can also be queried from Metrics and Logs. In Grafana 8.0, Application Insights and Insights Analytics are deprecated and made read-only in favor of querying this data through Metrics and Logs. Existing queries will continue to work, but you cannot edit them. New panels are not able to use Application Insights or Insights Analytics.
Application Insights and Insights Analytics are two ways to query the same Azure Application Insights data, which can also be queried from Metrics and Logs. In Grafana 8.0, Application Insights and Insights Analytics were deprecated and made read-only in favor of querying this data through Metrics and Logs.
These query methods were completely removed in Grafana 9.0.
Azure Monitor Metrics and Azure Monitor Logs do not use Application Insights API keys, so make sure the data source is configured with an Azure AD app registration that has access to Application Insights.

View File

@@ -54,67 +54,3 @@ Perf
| summarize avg(CounterValue) by bin(TimeGenerated, $__interval), Computer
| order by TimeGenerated asc
```
## Limitations
As of Grafana 9.0, a resource URI is constructed to identify resources using the resource picker. On dashboards created prior to Grafana 9.0, Grafana automatically migrates any queries using the prior resource-picking mechanism to use this method.
Some resource types use nested namespaces and resource names, such as `Microsoft.Storage/storageAccounts/tableServices` and `storageAccount/default`, or `Microsoft.Sql/servers/databases` and `serverName/databaseName`. Such template variables cannot be used because the result could be a malformed resource URI.
### Supported cases
#### Standard namespaces and resource names
```kusto
metricDefinition = $ns
$ns = Microsoft.Compute/virtualMachines
resourceName = $rs
$rs = testvirtualmachine
```
#### Namespaces with a non-templated sub-namespace
```kusto
metricDefinition = $ns/tableServices
$ns = Microsoft.Storage/storageAccounts
resourceName = $rs/default
$rs = storageaccount
```
#### Storage namespaces missing the `default` keyword
```kusto
metricDefinition = $ns/tableServices
$ns = Microsoft.Storage/storageAccounts
resourceName = $rs
$rs = storageaccount
```
#### Namespaces with a templated sub-namespace
```kusto
metricDefinition = $ns/$sns
$ns = Microsoft.Storage/storageAccounts
$sns = tableServices
resourceName = $rs
$rs = storageaccount
```
### Unsupported case
If a dashboard uses this unsupported case, migrate it to one of the [supported cases](#supported-cases).
If a namespace or resource name template variable contains multiple segments, Grafana will construct the resource URI incorrectly because the template variable cannot be appropriately split.
For example:
```kusto
metricDefinition = $ns
resourceName = $rs
$ns = 'Microsoft.Storage/storageAccounts/tableServices'
$rs = 'storageaccount/default'
```
This would result in an incorrect resource URI containing `Microsoft.Storage/storageAccounts/tableServices/storageaccount/default`. However, the correct URI would have the format `Microsoft.Storage/storageAccounts/storageaccount/tableServices/default`.
An appropriate fix would be to update the template variable that does not match a supported case. If the namespace variable `$ns` is of the form `Microsoft.Storage/storageAccounts/tableServices` this could be split into two variables: `$ns1 = Microsoft.Storage/storageAccounts` and `$ns2 = tableServices`. The metric definition would then take the form `$ns1/$ns2` which leads to a correctly formatted URI.

View File

@@ -61,9 +61,9 @@ The new field with the link shown in log details:
## Loki query editor
Loki query editor is separated into 3 distinct modes that you can switch between. See docs for each section below.
Loki query editor is separated into 2 distinct modes that you can switch between. See docs for each section below.
At the top of the editor, select `Run queries` to run a query. Select `Explain | Builder | Code` tabs to switch between the editor modes. If the query editor is in Builder mode, there are additional elements explained in the Builder section.
At the top of the editor, select `Run queries` to run a query. Select `Builder | Code` tabs to switch between the editor modes. If the query editor is in Builder mode, there are additional elements explained in the Builder section.
> **Note:** In Explore, to run Loki queries, select `Run query`.
@@ -107,6 +107,7 @@ In addition to `Run query` button and mode switcher, in builder mode additional
| Name | Description |
| -------------- | --------------------------------------------------------------------------------------------------------------------------------- |
| Query patterns | A list of useful operation patterns that can be used to quickly add multiple operations to your query to achieve a specific goal. |
| Explain | Toggle to show a step by step explanation of all query parts and the operations. |
| Raw query | Toggle to show raw query generated by the builder that will be sent to Loki instance. |
#### Labels selector
@@ -127,14 +128,14 @@ Some operations make sense only in specific order, if adding an operation would
In same cases the query editor can detect which operations would be most appropriate for a selected log stream. In such cases it will show a hint next to the `+ Operations` button. Click on the hint to add the operations to your query.
#### Explain mode
Explain mode helps with understanding the query. It shows a step by step explanation of all query parts and the operations.
#### Raw query
This section is shown only if the `Raw query` switch from the query editor top toolbar is set to `on`. It shows the raw query that will be created and executed by the query editor.
### Explain mode
Explain mode helps with understanding the query. It shows a step by step explanation of all query parts and the operations.
## Querying with Loki
There are two types of LogQL queries:

View File

@@ -101,3 +101,52 @@ Status codes:
Content-Type: application/json
Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk
{
```
JSON body schema:
- **label** A label for the correlation.
- **description** A description for the correlation.
**Example response:**
```http
HTTP/1.1 200
Content-Type: application/json
{
```
Status codes:
- **200** OK
- **401** Unauthorized
- **403** Forbidden, source data source is read-only
- **404** Not found, either source or target data source could not be found
- **500** Internal error
- **label** A label for the correlation.
- **description** A description for the correlation.
**Example response:**
```http
HTTP/1.1 200
Content-Type: application/json
{
"message": "Correlation updated",
"result": {
"description": "Logs to Traces",
"label": "My Label",
"sourceUID": "uyBf2637k",
"targetUID": "PDDA8E780A17E7EF1",
"uid": "J6gn7d31L"
}
}
```
Status codes:
- **200** OK
- **401** Unauthorized
- **403** Forbidden, source data source is read-only
- **404** Not found, either source or target data source could not be found
- **500** Internal error

View File

@@ -0,0 +1,69 @@
RBAC docs
# Glossary
**action** - describes what user is allowed to do; examples: `dashboards:read`, `teams:create`, `datasources:write`.
**scope** - describes which resources user is allowed to apply the action to; examples `dashboards:uid:test_dashboard`, `teams:id:1`, `datasources:*`
**permission** - action + scope;
**role** - a set of permissions; examples: `fixed:dashboards:reader`, `basic:viewer`, `custom:test_role`;
**fixed role** - role that is automatically created by Grafana server and contains the default set of permissions necessary for a common task; examples: `fixed:dashboards:reader`, `fixed:teams:reader` [TODO link to all roles]
**basic role** - role that corresponds to one of legacy Grafana roles (Viewer, Editor, Admin and Grafana Admin); examples: `basic:viewer`, `basic:grafana_admin`
**builtin role (deprecated)** - RBAC alternative to legacy Grafana roles, has now been deprecated and replaced by basic roles;
**custom role** - role that has been created by a user; examples: `custom:team_and_dashboard_admin`;
**managed permission** - permissions that are created by resource permission service;
**resource permission service (aka managed permission service)** - service that allows assigning a set of permissions on a particular resource; examples: dashboard, team and data source resource permission services;
**scope resolution** -
**RBAC filtering** - filtering a set of resources based on user's permissions, and only giving the user information about resources that he has access to;
**RBAC metadata** - a list of permissions that a user has on a resource that can be returned by the API when listing the resource, it is used by frontend;
**RBAC middleware** - authorisation middleware that checks whether the user has the required permissions before calling a function handler;
**Access control provisioning** -
# Style guide
## Scope naming
## Action naming
## Role naming
# Architecture overview
## Building blocks
### Permissions
Most permissions are defined by an action and a scope. **Action** defines what the user is allowed to do (ie, read dashboards, create data sources or delete teams). Most actions correspond to creating, reading, writing or deleting a specific resource, but some of them are funkier, and allow enabling or disabling things, querying etc.
**Scope** specifies a resource or set of resources that the permission applies to. Most of the scopes look like `resource:id` or `resource:uid`. For example, `dashboards:uid:my_dash` or `teams:id:1`. We also support wildcard scopes - `dashboards:uid:*` and `dashboards:*` both apply to all dashboards.
Some permissions don't have a scope. For instance, `users:create` does not require a scope.
[TODO screenshot of the DB table?]
### Roles
Role is a set of permissions.
Confusingly, Grafana's legacy access control also has roles - Viewer, Editor, Admin and Server Admin. They are still used in some parts of code and documentation. They are implemented in a different way than RBAC roles, and should not be confused for RBAC roles.
We have several different types of roles:
- **fixed roles** - hardcoded roles that contain permissions required for common tasks, and that we thought users would find handy. Users are not able to change or delete fixed roles. You can see a full list of them in our public documentation [TODO].
- **custom roles** - roles created by users. Users have a full control over these roles. Custom roles can be created through API or provisioning.
- **basic roles** - RBAC roles corresponding to Grafana's legacy access control roles. They provide a default set of permissions granted to viewers, editors, admins and server admins, and are required for an easy transition from legacy access control to RBAC. Note that basic roles **can** be edited by users (but cannot be deleted). Currently each user needs to have exactly one basic role assigned to them. [TODO check if it's true]
where to check for permissions
# Roadmap

View File

@@ -545,3 +545,26 @@ Here is the result after applying the Series to rows transformation.
## Sort by
This transformation will sort each frame by the configured field, When `reverse` is checked, the values will return in the opposite order.
## Limit
Use this transformation to limit the number of rows displayed.
In the example below, we have the following response from the data source:
| Time | Metric | Value |
| ------------------- | ----------- | ----- |
| 2020-07-07 11:34:20 | Temperature | 25 |
| 2020-07-07 11:34:20 | Humidity | 22 |
| 2020-07-07 10:32:20 | Humidity | 29 |
| 2020-07-07 10:31:22 | Temperature | 22 |
| 2020-07-07 09:30:57 | Humidity | 33 |
| 2020-07-07 09:30:05 | Temperature | 19 |
Here is the result after adding a Limit transformation with a value of '3':
| Time | Metric | Value |
| ------------------- | ----------- | ----- |
| 2020-07-07 11:34:20 | Temperature | 25 |
| 2020-07-07 11:34:20 | Humidity | 22 |
| 2020-07-07 10:32:20 | Humidity | 29 |

View File

@@ -10,6 +10,8 @@ weight: 10000
Here you can find detailed release notes that list everything that is included in every release as well as notices
about deprecations, breaking changes as well as changes that relate to plugin development.
- [Release notes for 9.1.0-beta1]({{< relref "release-notes-9-1-0-beta1" >}})
- [Release notes for 9.0.6]({{< relref "release-notes-9-0-6" >}})
- [Release notes for 9.0.5]({{< relref "release-notes-9-0-5" >}})
- [Release notes for 9.0.4]({{< relref "release-notes-9-0-4" >}})
- [Release notes for 9.0.3]({{< relref "release-notes-9-0-3" >}})

View File

@@ -0,0 +1,217 @@
+++
title = "Release notes for Grafana 9.1.0-beta1"
hide_menu = true
+++
<!-- Auto generated by update changelog github action -->
# Release notes for Grafana 9.1.0-beta1
### Features and enhancements
- **API:** Migrate CSRF to service and support additional options. [#48120](https://github.com/grafana/grafana/pull/48120), [@sakjur](https://github.com/sakjur)
- **API:** Move swagger definitions to the handlers and rename operations after them. [#52643](https://github.com/grafana/grafana/pull/52643), [@papagian](https://github.com/papagian)
- **Access Control:** Allow org admins to invite new users. [#52894](https://github.com/grafana/grafana/pull/52894), [@IevaVasiljeva](https://github.com/IevaVasiljeva)
- **AccessControl:** Check dashboards permission for reports. (Enterprise)
- **Alerting:** Add config disabled_labels to disable reserved labels. [#51832](https://github.com/grafana/grafana/pull/51832), [@JacobsonMT](https://github.com/JacobsonMT)
- **Alerting:** Add custom templated title to Wecom notifier. [#51529](https://github.com/grafana/grafana/pull/51529), [@dingweiqings](https://github.com/dingweiqings)
- **Alerting:** Add file provisioning for alert rules. [#51635](https://github.com/grafana/grafana/pull/51635), [@JohnnyQQQQ](https://github.com/JohnnyQQQQ)
- **Alerting:** Add file provisioning for contact points. [#51924](https://github.com/grafana/grafana/pull/51924), [@JohnnyQQQQ](https://github.com/JohnnyQQQQ)
- **Alerting:** Add file provisioning for mute timings. [#52936](https://github.com/grafana/grafana/pull/52936), [@JohnnyQQQQ](https://github.com/JohnnyQQQQ)
- **Alerting:** Add file provisioning for notification policies. [#52877](https://github.com/grafana/grafana/pull/52877), [@JohnnyQQQQ](https://github.com/JohnnyQQQQ)
- **Alerting:** Add file provisioning for text templates. [#52952](https://github.com/grafana/grafana/pull/52952), [@JohnnyQQQQ](https://github.com/JohnnyQQQQ)
- **Alerting:** Add first Grafana reserved label grafana_folder. [#50262](https://github.com/grafana/grafana/pull/50262), [@JacobsonMT](https://github.com/JacobsonMT)
- **Alerting:** Add support for images in Kafka alerts. [#50758](https://github.com/grafana/grafana/pull/50758), [@grobinson-grafana](https://github.com/grobinson-grafana)
- **Alerting:** Add support for images in VictorOps alerts. [#50759](https://github.com/grafana/grafana/pull/50759), [@grobinson-grafana](https://github.com/grobinson-grafana)
- **Alerting:** Adds contact point template syntax highlighting. [#51559](https://github.com/grafana/grafana/pull/51559), [@gillesdemey](https://github.com/gillesdemey)
- **Alerting:** Adds visual tokens for templates. [#51376](https://github.com/grafana/grafana/pull/51376), [@gillesdemey](https://github.com/gillesdemey)
- **Alerting:** Alert rules pagination. [#50612](https://github.com/grafana/grafana/pull/50612), [@konrad147](https://github.com/konrad147)
- **Alerting:** Change **alertScreenshotToken** to **alertImageToken**. [#50771](https://github.com/grafana/grafana/pull/50771), [@grobinson-grafana](https://github.com/grobinson-grafana)
- **Alerting:** Configure alert manager data source as an external AM. [#52081](https://github.com/grafana/grafana/pull/52081), [@konrad147](https://github.com/konrad147)
- **Alerting:** Do not include button in googlechat notification if URL invalid. [#47317](https://github.com/grafana/grafana/pull/47317), [@j6s](https://github.com/j6s)
- **Alerting:** Group alert state history by labels and allow filtering. [#52784](https://github.com/grafana/grafana/pull/52784), [@gillesdemey](https://github.com/gillesdemey)
- **Alerting:** Make ticker to tick at predictable time. [#50197](https://github.com/grafana/grafana/pull/50197), [@yuri-tceretian](https://github.com/yuri-tceretian)
- **Alerting:** Persist rule position in the group. [#50051](https://github.com/grafana/grafana/pull/50051), [@yuri-tceretian](https://github.com/yuri-tceretian)
- **Alerting:** Prevent evaluation if "for" shorter than "evaluate". [#51797](https://github.com/grafana/grafana/pull/51797), [@peterholmberg](https://github.com/peterholmberg)
- **Alerting:** Provisioning UI. [#50776](https://github.com/grafana/grafana/pull/50776), [@gillesdemey](https://github.com/gillesdemey)
- **Alerting:** Rule api to fail update if provisioned rules are affected. [#50835](https://github.com/grafana/grafana/pull/50835), [@yuri-tceretian](https://github.com/yuri-tceretian)
- **Alerting:** Scheduler to drop ticks if a rule's evaluation is too slow. [#48885](https://github.com/grafana/grafana/pull/48885), [@yuri-tceretian](https://github.com/yuri-tceretian)
- **Alerting:** Show evaluation interval global limit warning. [#52942](https://github.com/grafana/grafana/pull/52942), [@konrad147](https://github.com/konrad147)
- **Alerting:** State manager to use tick time to determine stale states. [#50991](https://github.com/grafana/grafana/pull/50991), [@yuri-tceretian](https://github.com/yuri-tceretian)
- **Alerting:** Support for optimistic locking for alert rules. [#50274](https://github.com/grafana/grafana/pull/50274), [@yuri-tceretian](https://github.com/yuri-tceretian)
- **Alerting:** Update RBAC for alert rules to consider access to rule as access to group it belongs. [#49033](https://github.com/grafana/grafana/pull/49033), [@yuri-tceretian](https://github.com/yuri-tceretian)
- **Alerting:** Update default route groupBy to [grafana_folder, alertname]. [#50052](https://github.com/grafana/grafana/pull/50052), [@JacobsonMT](https://github.com/JacobsonMT)
- **Alertmanager:** Adding SigV4 Authentication to Alertmanager Datasource. [#49718](https://github.com/grafana/grafana/pull/49718), [@lewinkedrs](https://github.com/lewinkedrs)
- **Analytics:** Save all view time dates as UTC. (Enterprise)
- **Annotations:** Migrate dashboardId to dashboardUID. [#52588](https://github.com/grafana/grafana/pull/52588), [@lpskdl](https://github.com/lpskdl)
- **Auditing:** Allow users to have more verbose logs. (Enterprise)
- **Auth:** Add lookup params for saml and LDAP sync. (Enterprise)
- **Auth:** Add option for case insensitive login. [#49262](https://github.com/grafana/grafana/pull/49262), [@Jguer](https://github.com/Jguer)
- **Auth:** Case insensitive ids duplicate usagestats. [#50724](https://github.com/grafana/grafana/pull/50724), [@eleijonmarck](https://github.com/eleijonmarck)
- **Auth:** Implement Token URL Auth. [#52578](https://github.com/grafana/grafana/pull/52578), [@Jguer](https://github.com/Jguer)
- **Auth:** Implement Token URL JWT Auth. [#52662](https://github.com/grafana/grafana/pull/52662), [@Jguer](https://github.com/Jguer)
- **Auth:** Lockdown non-editables in frontend when external auth is configured. [#52160](https://github.com/grafana/grafana/pull/52160), [@Jguer](https://github.com/Jguer)
- **Azure Monitor:** Add new dashboard with geo map for app insights test availability. [#52494](https://github.com/grafana/grafana/pull/52494), [@jcolladokuri](https://github.com/jcolladokuri)
- **Azure Monitor:** New template variable editor. [#52594](https://github.com/grafana/grafana/pull/52594), [@andresmgot](https://github.com/andresmgot)
- **Azure Monitor:** Restore Metrics query parameters: subscription, resourceGroup, metricNamespace and resourceName. [#52897](https://github.com/grafana/grafana/pull/52897), [@andresmgot](https://github.com/andresmgot)
- **Chore:** Add dashboard UID as query parameter of Get annotation endpoint. [#52764](https://github.com/grafana/grafana/pull/52764), [@ying-jeanne](https://github.com/ying-jeanne)
- **Chore:** Remove jest-coverage-badges dep from toolkit. [#49883](https://github.com/grafana/grafana/pull/49883), [@zoltanbedi](https://github.com/zoltanbedi)
- **Chore:** Rename dashboardUID to dashboardUIDs in search endpoint and up…. [#52766](https://github.com/grafana/grafana/pull/52766), [@ying-jeanne](https://github.com/ying-jeanne)
- **CloudWatch:** Add default log groups to config page. [#49286](https://github.com/grafana/grafana/pull/49286), [@iwysiu](https://github.com/iwysiu)
- **CommandPalette:** Populate dashboard search when the palette is opened. [#51293](https://github.com/grafana/grafana/pull/51293), [@ryantxu](https://github.com/ryantxu)
- **Core Plugins:** Add support for HTTP logger. [#46578](https://github.com/grafana/grafana/pull/46578), [@toddtreece](https://github.com/toddtreece)
- **Correlations:** Add CreateCorrelation HTTP API. [#51630](https://github.com/grafana/grafana/pull/51630), [@Elfo404](https://github.com/Elfo404)
- **Correlations:** Add DeleteCorrelation HTTP API. [#51801](https://github.com/grafana/grafana/pull/51801), [@Elfo404](https://github.com/Elfo404)
- **Custom branding:** Add UI for setting configuration. (Enterprise)
- **Custom branding:** Add custom branding service (early access). (Enterprise)
- **Data Connections:** Create a new top-level page. [#50018](https://github.com/grafana/grafana/pull/50018), [@leventebalogh](https://github.com/leventebalogh)
- **DataSource:** Allow data source plugins to set query default values. [#49581](https://github.com/grafana/grafana/pull/49581), [@sunker](https://github.com/sunker)
- **Docs:** CSRF add configuration options and documentation for additional headers and origins. [#50473](https://github.com/grafana/grafana/pull/50473), [@eleijonmarck](https://github.com/eleijonmarck)
- **Elasticsearch:** Added `modifyQuery` method to add filters in Explore. [#52313](https://github.com/grafana/grafana/pull/52313), [@svennergr](https://github.com/svennergr)
- **Explore:** Add ability to include tags in trace to metrics queries. [#49433](https://github.com/grafana/grafana/pull/49433), [@connorlindsey](https://github.com/connorlindsey)
- **Explore:** Download and upload service graphs for Tempo. [#50260](https://github.com/grafana/grafana/pull/50260), [@connorlindsey](https://github.com/connorlindsey)
- **Explore:** Make service graph visualization use available vertical space. [#50518](https://github.com/grafana/grafana/pull/50518), [@connorlindsey](https://github.com/connorlindsey)
- **Explore:** Reset Graph overrides if underlying series changes. [#49680](https://github.com/grafana/grafana/pull/49680), [@Elfo404](https://github.com/Elfo404)
- **Explore:** Sort trace process attributes alphabetically. [#51261](https://github.com/grafana/grafana/pull/51261), [@connorlindsey](https://github.com/connorlindsey)
- **Frontend Logging:** Integrate grafana javascript agent. [#50801](https://github.com/grafana/grafana/pull/50801), [@tolzhabayev](https://github.com/tolzhabayev)
- **Geomap:** Add ability to select a data query filter for each layer. [#49966](https://github.com/grafana/grafana/pull/49966), [@mmandrus](https://github.com/mmandrus)
- **Geomap:** Route/path visualization. [#43554](https://github.com/grafana/grafana/pull/43554), [@alexanderzobnin](https://github.com/alexanderzobnin)
- **GeomapPanel:** Add base types to data layer options. [#50053](https://github.com/grafana/grafana/pull/50053), [@drew08t](https://github.com/drew08t)
- **Graph Panel:** Add feature toggle that will allow automatic migration to timeseries panel. [#50631](https://github.com/grafana/grafana/pull/50631), [@ryantxu](https://github.com/ryantxu)
- **Graphite:** Introduce new query types in annotation editor. [#52341](https://github.com/grafana/grafana/pull/52341), [@itsmylife](https://github.com/itsmylife)
- **Infra:** Pass custom headers in resource request. [#51291](https://github.com/grafana/grafana/pull/51291), [@aocenas](https://github.com/aocenas)
- **Insights:** Add RBAC for insights features. (Enterprise)
- **Instrumentation:** Add more buckets to the HTTP request histogram. [#51492](https://github.com/grafana/grafana/pull/51492), [@bergquist](https://github.com/bergquist)
- **Instrumentation:** Collect database connection stats. [#52797](https://github.com/grafana/grafana/pull/52797), [@bergquist](https://github.com/bergquist)
- **Instrumentation:** Convert some metrics to histograms. [#50420](https://github.com/grafana/grafana/pull/50420), [@SuperQ](https://github.com/SuperQ)
- **Jaeger:** Add support for variables. [#50500](https://github.com/grafana/grafana/pull/50500), [@joey-grafana](https://github.com/joey-grafana)
- **LDAP:** Allow specifying LDAP timeout. [#48870](https://github.com/grafana/grafana/pull/48870), [@hannes-256](https://github.com/hannes-256)
- **LibraryPanels:** Require only viewer permissions to use a Library Panel. [#50241](https://github.com/grafana/grafana/pull/50241), [@joshhunt](https://github.com/joshhunt)
- **Licensing:** Usage-based billing reporting enhancements. (Enterprise)
- **Logs:** Handle clicks on legend labels in histogram. [#49931](https://github.com/grafana/grafana/pull/49931), [@gabor](https://github.com/gabor)
- **Logs:** Improve the color for unknown log level. [#52711](https://github.com/grafana/grafana/pull/52711), [@gabor](https://github.com/gabor)
- **Loki/Logs:** Make it possible to copy log values to clipboard. [#50914](https://github.com/grafana/grafana/pull/50914), [@Seyaji](https://github.com/Seyaji)
- **Loki:** Add hint for pipeline error to query builder. [#52134](https://github.com/grafana/grafana/pull/52134), [@ivanahuckova](https://github.com/ivanahuckova)
- **Loki:** Add hints for level-like labels. [#52414](https://github.com/grafana/grafana/pull/52414), [@ivanahuckova](https://github.com/ivanahuckova)
- **Loki:** Add support for IP label and line filter in query builder. [#52658](https://github.com/grafana/grafana/pull/52658), [@ivanahuckova](https://github.com/ivanahuckova)
- **Loki:** Add unwrap with conversion function to builder. [#52639](https://github.com/grafana/grafana/pull/52639), [@ivanahuckova](https://github.com/ivanahuckova)
- **Loki:** Implement hints for query builder. [#51795](https://github.com/grafana/grafana/pull/51795), [@ivanahuckova](https://github.com/ivanahuckova)
- **Loki:** Move explain section to builder mode. [#52879](https://github.com/grafana/grafana/pull/52879), [@ivanahuckova](https://github.com/ivanahuckova)
- **Loki:** Show label options for unwrap operation. [#52810](https://github.com/grafana/grafana/pull/52810), [@ivanahuckova](https://github.com/ivanahuckova)
- **Loki:** Support json parser with expressions in query builder. [#51965](https://github.com/grafana/grafana/pull/51965), [@ivanahuckova](https://github.com/ivanahuckova)
- **Navigation:** Display `Starred` dashboards in the `Navbar`. [#51038](https://github.com/grafana/grafana/pull/51038), [@ashharrison90](https://github.com/ashharrison90)
- **Node Graph Panel:** Add options to configure units and arc colors. [#51057](https://github.com/grafana/grafana/pull/51057), [@connorlindsey](https://github.com/connorlindsey)
- **OAuth:** Allow role mapping from GitHub and GitLab groups. [#52407](https://github.com/grafana/grafana/pull/52407), [@Jguer](https://github.com/Jguer)
- **Opentsdb:** Add tag values into the opentsdb response. [#48672](https://github.com/grafana/grafana/pull/48672), [@xy-man](https://github.com/xy-man)
- **OptionsUI:** UnitPicker now supports isClearable setting. [#51064](https://github.com/grafana/grafana/pull/51064), [@ryantxu](https://github.com/ryantxu)
- **PanelEdit:** Hide multi-/all-select datasource variables in datasource picker. [#52142](https://github.com/grafana/grafana/pull/52142), [@eledobleefe](https://github.com/eledobleefe)
- **Piechart:** Implements series override -> hide in area for the legend or tooltip. [#51297](https://github.com/grafana/grafana/pull/51297), [@daniellee](https://github.com/daniellee)
- **Plugin admin:** Add a page to show where panel plugins are used in dashboards. [#50909](https://github.com/grafana/grafana/pull/50909), [@ryantxu](https://github.com/ryantxu)
- **Plugins:** Add validation for plugin manifest. [#52787](https://github.com/grafana/grafana/pull/52787), [@wbrowne](https://github.com/wbrowne)
- **Prometheus:** Move explain section to builder mode. [#52935](https://github.com/grafana/grafana/pull/52935), [@itsmylife](https://github.com/itsmylife)
- **Prometheus:** Support 1ms resolution intervals. [#44707](https://github.com/grafana/grafana/pull/44707), [@dankeder](https://github.com/dankeder)
- **Prometheus:** Throw error on direct access. [#50162](https://github.com/grafana/grafana/pull/50162), [@aocenas](https://github.com/aocenas)
- **RBAC:** Add RBAC for query caching. (Enterprise)
- **RBAC:** Add access control metadata to folder dtos. [#51158](https://github.com/grafana/grafana/pull/51158), [@kalleep](https://github.com/kalleep)
- **RBAC:** Allow app plugins access restriction. [#51524](https://github.com/grafana/grafana/pull/51524), [@gamab](https://github.com/gamab)
- **RBAC:** Rename alerting roles to match naming convention. [#50504](https://github.com/grafana/grafana/pull/50504), [@gamab](https://github.com/gamab)
- **Report:** Calculate grid height unit dynamically instead use hardcode values. (Enterprise)
- **Reports:** Add created column in report_dashboards. (Enterprise)
- **Reports:** Add dashboard title in all pdf pages. (Enterprise)
- **Reports:** Allow saving draft reports. (Enterprise)
- **Reports:** Multiple dashboards improvements. (Enterprise)
- **SAML :** Support Azure Single Sign Out. (Enterprise)
- **SAML:** Add NameIDFormat in SP metadata. (Enterprise)
- **SAML:** Improve debug logs for saml logout. (Enterprise)
- **SSE:** Add noData type. [#51973](https://github.com/grafana/grafana/pull/51973), [@kylebrandt](https://github.com/kylebrandt)
- **Search:** Filter punctuation and tokenize camel case. [#51165](https://github.com/grafana/grafana/pull/51165), [@FZambia](https://github.com/FZambia)
- **Search:** Sync state on read for HA consistency. [#50152](https://github.com/grafana/grafana/pull/50152), [@FZambia](https://github.com/FZambia)
- **Security:** Choose Lookup params per auth module (CVE-2022-31107). [#52312](https://github.com/grafana/grafana/pull/52312), [@Jguer](https://github.com/Jguer)
- **Service Accounts:** Managed permissions for service accounts. [#51818](https://github.com/grafana/grafana/pull/51818), [@IevaVasiljeva](https://github.com/IevaVasiljeva)
- **Service accounts:** Grafana service accounts are enabled by default. [#51402](https://github.com/grafana/grafana/pull/51402), [@vtorosyan](https://github.com/vtorosyan)
- **ServiceAccounts:** Add Prometheus metrics service. [#51831](https://github.com/grafana/grafana/pull/51831), [@Jguer](https://github.com/Jguer)
- **ServiceAccounts:** Add Service Account Token last used at date. [#51446](https://github.com/grafana/grafana/pull/51446), [@Jguer](https://github.com/Jguer)
- **SharePDF:** Use currently selected variables and time range when generating PDF. (Enterprise)
- **Slider:** Enforce numeric constraints and styling within the text input. [#50905](https://github.com/grafana/grafana/pull/50905), [@drew08t](https://github.com/drew08t)
- **State Timeline:** Enable support for annotations. [#47887](https://github.com/grafana/grafana/pull/47887), [@dprokop](https://github.com/dprokop)
- **Table panel:** Add multiple data links support to Default, Image and JSONView cells. [#51162](https://github.com/grafana/grafana/pull/51162), [@dprokop](https://github.com/dprokop)
- **TeamSync:** Remove LDAP specific example from team sync. [#51368](https://github.com/grafana/grafana/pull/51368), [@Jguer](https://github.com/Jguer)
- **TeamSync:** Support case insensitive matches and wildcard groups. (Enterprise)
- **Tempo:** Add context menu to edges. [#52396](https://github.com/grafana/grafana/pull/52396), [@joey-grafana](https://github.com/joey-grafana)
- **Tempo:** Consider tempo search out of beta and remove beta badge and feature flags. [#50030](https://github.com/grafana/grafana/pull/50030), [@connorlindsey](https://github.com/connorlindsey)
- **Tempo:** Tempo/Prometheus links select ds in new tab (cmd + click). [#52319](https://github.com/grafana/grafana/pull/52319), [@joey-grafana](https://github.com/joey-grafana)
- **Time series panel:** Hide axis when series is hidden from the visualization. [#51432](https://github.com/grafana/grafana/pull/51432), [@dprokop](https://github.com/dprokop)
- **TimeSeries:** Add option for symmetrical y axes (align 0). [#52555](https://github.com/grafana/grafana/pull/52555), [@leeoniya](https://github.com/leeoniya)
- **TimeSeries:** Add option to match axis color to series color. [#51437](https://github.com/grafana/grafana/pull/51437), [@leeoniya](https://github.com/leeoniya)
- **TimeSeries:** Improved constantY rendering parity with Graph (old). [#51401](https://github.com/grafana/grafana/pull/51401), [@leeoniya](https://github.com/leeoniya)
- **Timeseries:** Support multiple timezones in x axis. [#52424](https://github.com/grafana/grafana/pull/52424), [@ryantxu](https://github.com/ryantxu)
- **TopNav:** Adds new feature toggle for upcoming nav. [#51115](https://github.com/grafana/grafana/pull/51115), [@torkelo](https://github.com/torkelo)
- **Traces:** APM table. [#48654](https://github.com/grafana/grafana/pull/48654), [@joey-grafana](https://github.com/joey-grafana)
- **Traces:** Add absolute time to span details. [#50685](https://github.com/grafana/grafana/pull/50685), [@joey-grafana](https://github.com/joey-grafana)
- **Traces:** Add horizontal scroll. [#50278](https://github.com/grafana/grafana/pull/50278), [@joey-grafana](https://github.com/joey-grafana)
- **Traces:** Consistent span colors for service names. [#50782](https://github.com/grafana/grafana/pull/50782), [@joey-grafana](https://github.com/joey-grafana)
- **Traces:** Move towards using OTEL naming conventions. [#51379](https://github.com/grafana/grafana/pull/51379), [@joey-grafana](https://github.com/joey-grafana)
- **Traces:** Span bar label. [#50931](https://github.com/grafana/grafana/pull/50931), [@joey-grafana](https://github.com/joey-grafana)
- **Transformations:** Add standard deviation and variance reducers. [#52769](https://github.com/grafana/grafana/pull/52769), [@ryantxu](https://github.com/ryantxu)
- **Transforms:** Add Join by label transformation. [#52670](https://github.com/grafana/grafana/pull/52670), [@ryantxu](https://github.com/ryantxu)
- **URL:** Encode certain special characters. [#51806](https://github.com/grafana/grafana/pull/51806), [@L-M-K-B](https://github.com/L-M-K-B)
- **ValueMappings:** Make value mapping row focusable. [#52337](https://github.com/grafana/grafana/pull/52337), [@lpskdl](https://github.com/lpskdl)
- **Variables:** Add 'jsonwithoutquote' formatting options for variables, and format of variable supports pipeline. [#51859](https://github.com/grafana/grafana/pull/51859), [@MicroOps-cn](https://github.com/MicroOps-cn)
- **Variables:** Selectively reload panels on URL update. [#51003](https://github.com/grafana/grafana/pull/51003), [@toddtreece](https://github.com/toddtreece)
- **Various Panels:** Add ability to toggle legend with keyboard shortcut. [#52241](https://github.com/grafana/grafana/pull/52241), [@alyssabull](https://github.com/alyssabull)
### Bug fixes
- **API:** Fix failing test by initialising legacy guardian when creating folder scenario. [#50800](https://github.com/grafana/grafana/pull/50800), [@vicmarbev](https://github.com/vicmarbev)
- **Access control:** Show dashboard settings to users who can edit dashboard. [#52532](https://github.com/grafana/grafana/pull/52532), [@IevaVasiljeva](https://github.com/IevaVasiljeva)
- **Alerting:** Fix RegExp matchers in frontend for Silences and other previews. [#51726](https://github.com/grafana/grafana/pull/51726), [@joeblubaugh](https://github.com/joeblubaugh)
- **Alerting:** Fix rule API to accept 0 duration of field `For`. [#50992](https://github.com/grafana/grafana/pull/50992), [@yuri-tceretian](https://github.com/yuri-tceretian)
- **Alerting:** Increase alert rule operation perf by replacing subquery with threshold calculation. [#53069](https://github.com/grafana/grafana/pull/53069), [@alexweav](https://github.com/alexweav)
- **Barchart Panel:** Fix threshold colors changing when data is refreshed. [#52038](https://github.com/grafana/grafana/pull/52038), [@mingozh](https://github.com/mingozh)
- **Dashboard:** Fix iteration property change triggering unsaved changes warning. [#51272](https://github.com/grafana/grafana/pull/51272), [@torkelo](https://github.com/torkelo)
- **Dashboards:** Disable variable pickers for snapshots. [#52827](https://github.com/grafana/grafana/pull/52827), [@joshhunt](https://github.com/joshhunt)
- **Elasticsearch:** Always use fixed_interval. [#50297](https://github.com/grafana/grafana/pull/50297), [@gabor](https://github.com/gabor)
- **Geomap:** Fix tooltip offset bug. [#52627](https://github.com/grafana/grafana/pull/52627), [@drew08t](https://github.com/drew08t)
- **Geomap:** Update with template variable change. [#52007](https://github.com/grafana/grafana/pull/52007), [@drew08t](https://github.com/drew08t)
- **Loki:** Fix adding of multiple label filters when parser. [#52335](https://github.com/grafana/grafana/pull/52335), [@ivanahuckova](https://github.com/ivanahuckova)
- **Loki:** Fix support of ad-hoc filters for specific queries. [#51232](https://github.com/grafana/grafana/pull/51232), [@ivanahuckova](https://github.com/ivanahuckova)
- **Navigation:** Hide `Dashboards`/`Starred items` from navbar when unauthenticated. [#53051](https://github.com/grafana/grafana/pull/53051), [@ashharrison90](https://github.com/ashharrison90)
- **PasswordReset:** Enforce password length check on password reset request. [#51005](https://github.com/grafana/grafana/pull/51005), [@asymness](https://github.com/asymness)
- **Prometheus:** Fix integer overflow in rate interval calculation on 32-bit architectures. [#51508](https://github.com/grafana/grafana/pull/51508), [@andreasgerstmayr](https://github.com/andreasgerstmayr)
- **Search:** Fix indexing - re-index after initial provisioning. [#50959](https://github.com/grafana/grafana/pull/50959), [@FZambia](https://github.com/FZambia)
- **Slider:** Fixes styling of marker dots. [#52678](https://github.com/grafana/grafana/pull/52678), [@torkelo](https://github.com/torkelo)
- **Tracing:** Fix links to traces in Explore. [#50113](https://github.com/grafana/grafana/pull/50113), [@connorlindsey](https://github.com/connorlindsey)
### Breaking changes
Some swagger operations and responses have been renamed to match the respective handler names in order to better highlight their relation.
If you use the Swagger specification for generating code, you have to re-generate it and make the necessary adjustments. Issue [#52643](https://github.com/grafana/grafana/issues/52643)
The following metrics have been converted to histograms:
- grafana_datasource_request_total
- grafana_datasource_request_duration_seconds
- grafana_datasource_response_size_bytes
- grafana_datasource_request_in_flight
- grafana_plugin_request_duration_milliseconds
- grafana_alerting_rule_evaluation_duration_seconds Issue [#50420](https://github.com/grafana/grafana/issues/50420)
In Elasticsearch versions 7.x, to specify the interval-value we used the `interval` property. In Grafana 9.1.0 we switched to use the `fixed_interval` property. This makes it to be the same as in Elasticsearch versions 8.x, also this provides a more consistent experience, `fixed_interval` is a better match to Grafana's time invervals. For most situations this will not cause any visible change to query results. Issue [#50297](https://github.com/grafana/grafana/issues/50297)
### Grafana now reserves alert labels prefixed with `grafana_`
Labels prefixed with `grafana_` are reserved by Grafana for special use. If a manually configured label is added beginning with `grafana_` it may be overwritten in case of collision.
The current list of labels created by Grafana and available for use anywhere manually configured labels are:
| Label | Description |
| -------------- | ----------------------------------------- | --------------------------------------------------------------- |
| grafana_folder | Title of the folder containing the alert. | Issue [#50262](https://github.com/grafana/grafana/issues/50262) |
In Prometheus, browser access mode was deprecated in Grafana 7.4.0 and removed in 9.0.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)
### Plugin development fixes & changes
- **Dropdown:** New dropdown component. [#52684](https://github.com/grafana/grafana/pull/52684), [@torkelo](https://github.com/torkelo)
- **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)

View File

@@ -1210,7 +1210,7 @@ For more information about the Grafana alerts, refer to [About Grafana Alerting]
### enabled
Enable or disable Grafana Alerting. If enabled, well migrate all your alert rules and notification channels to the new system as alert rules and notification channels you had previously defined will be converted into an Alertmanager configuration. Legacy alerting data is preserved to enable backwards compatibility. If disabled, all your legacy alerting data will be available again, but the data you created using Grafana Alerting will be deleted. Set force_migration=true to avoid deletion of data. The default value is `true`.
Enable or disable Grafana Alerting. If disabled, all your legacy alerting data will be available again, but the data you created using Grafana Alerting will be deleted. Set force_migration=true to avoid deletion of data. The default value is `true`.
Alerting Rules migrated from dashboards and panels will include a link back via the `annotations`.
@@ -1232,11 +1232,11 @@ The interval string is a possibly signed sequence of decimal numbers, followed b
### ha_listen_address
Listen address/hostname and port to receive unified alerting messages for other Grafana instances. The port is used for both TCP and UDP. It is assumed other Grafana instances are also running on the same port. The default value is `0.0.0.0:9094`.
Listen IP address and port to receive unified alerting messages for other Grafana instances. The port is used for both TCP and UDP. It is assumed other Grafana instances are also running on the same port. The default value is `0.0.0.0:9094`.
### ha_advertise_address
Explicit address/hostname and port to advertise other Grafana instances. The port is used for both TCP and UDP.
Explicit IP address and port to advertise other Grafana instances. The port is used for both TCP and UDP.
### ha_peers
@@ -1320,11 +1320,11 @@ For example: `disabled_labels=grafana_folder`
## [alerting]
For more information about the legacy dashboard alerting feature in Grafana, refer to [Alerts overview]({{< relref "../../alerting/" >}}).
For more information about the legacy dashboard alerting feature in Grafana, refer to [the legacy Grafana alerts]({{< relref "https://grafana.com/docs/grafana/v8.5/alerting/old-alerting/" >}}).
### enabled
Set to `false` to [enable Grafana Alerting]({{<relref "#unified_alerting">}}) and to disable legacy alerting engine. to disable Grafana Alerting, set to `true`.
Set to `true` to [enable legacy dashboard alerting]({{<relref "#unified_alerting">}}). The default value is `false`.
### execute_alerts

View File

@@ -65,6 +65,7 @@ as info on deprecations, breaking changes and plugin development read the [relea
## Grafana 9
- [What's new in 9.1]({{< relref "whats-new-in-v9-1/" >}})
- [What's new in 9.0]({{< relref "whats-new-in-v9-0/" >}})
## Grafana 8

View File

@@ -0,0 +1,239 @@
---
_build:
list: false
aliases:
- /docs/grafana/latest/guides/whats-new-in-v9-1/
description: Feature and improvement highlights for Grafana v9.1
keywords:
- grafana
- new
- documentation
- '9.1'
- release notes
title: What's new in Grafana v9.1
weight: -33
---
# What's new in Grafana v9.1
We're excited to announce Grafana v9.1, with a variety of improvements that focus on Grafana's usability, performance, and security.
Read on to learn about new options to share and embed dashboards, search and navigation enhancements, new panel options, and additional authentication features.
You can also find out more about new single sign-on and role-based access control options in Grafana Enterprise, and more.
For details, see the complete [changelog](https://github.com/grafana/grafana/blob/master/CHANGELOG.md).
## OSS
### Auth and security
#### Grafana service accounts are generally available
Service accounts are an evolution in machine access within Grafana.
You can create multiple API tokens per service account with independent expiration dates, and temporarily disable a service account without deleting it.
These benefits make service accounts a more flexible way for Terraform and other apps to authenticate with Grafana.
Service accounts also work with [role-based access control]({{< relref "../enterprise/access-control/" >}}) in [Grafana Enterprise]({{< relref "../enterprise/" >}}).
You can improve security by granting service accounts specific roles to limit the functions they can perform.
Service accounts have been in beta since Grafana v8.5.
During that time, we've improved the UI and migration path from API keys, made it possible to add service accounts to teams, and inherit team permissions.
To learn more about service accounts, see the [documentation]({{< relref "../administration/service-accounts" >}}).
{{< figure src="/static/img/docs/service-accounts/add-service-account-token-9-1.png" max-width="750px" caption="Adding a service account token" >}}
#### JWT URL embedding
You can now easily embed Grafana in other applications by adding a JWT token directly in the Grafana's URL, for example,`https://example.grafana.net/dashboard/uuid?aut_token=<jwt_token>`.
When the JWT token is passed through the request URL to Grafana, Grafana validates and authenticates the token linked to a specific user, allowing access to dashboards which that user can view.
To see JWT URL embedding in action, see the [sample project](https://github.com/grafana/grafana-iframe-oauth-sample).
{{< figure src="/static/img/docs/dashboards/jwt-url-embedding-9-1.png" max-width="750px" caption="A JWT token used to embed Grafana" >}}
#### Organization role mapping for GitHub OAuth2 authentication
You can now use GitHub OAuth2 to map users or teams to specific [Grafana organization roles]({{< relref "../administration/roles-and-permissions/#organization-roles" >}}) by using `role_attribute_path` configuration option.
Grafana will use [JMESPath](https://jmespath.org/examples.html) for path lookup and role mapping.
For more information, see the [documentation]({{< relref "../setup-grafana/configure-security/configure-authentication/github/#map-roles" >}}).
{{< figure src="/static/img/docs/permissions/org-role-mapping-github-9-1.png" max-width="750px" caption="Configuring GitHub OAuth2 authentication with role mapping" >}}
### Search and navigation
#### (Beta) Panel title search and search improvements
We've improved the performance of searching by panel title.
If a panel's title matches your search query, it will be displayed in the search results.
This feature will be rolled out to Grafana Cloud users over the course of several weeks, or can be accessed by enabling the `panelTitleSearch` feature toggle.
Panel title search uses our updated dashboard search approach.
Previously, Grafana used SQL database queries to find dashboards by title.
With the feature toggle enabled, Grafana can build an in-memory index of all dashboards.
To learn more about search in Grafana, see the [documentation]({{< relref "../dashboards/use-dashboards/#dashboard-search" >}}).
{{< figure src="/static/img/docs/dashboards/panel-title-search-9-1.png" max-width="750px" caption="Searching for a panel title" >}}
#### Starred dashboards in the navigation bar
As part of the upcoming improvements to Grafana's navigation, you can now directly access your [starred dashboards]({{< relref "../dashboards/use-dashboards/" >}}) from the navigation bar.
{{< figure src="/static/img/docs/dashboards/starred-dashboards-9-1.png" max-width="750px" caption="Accessing your starred dashboards" >}}
### Panels
#### Heatmap improvements
The beta heatmap announced in version 9.0 is now used throughout Grafana.
Its performance is improved, and it now supports [exemplars]({{< relref "../basics/exemplars/" >}}).
To learn more about the heatmap panel, see the [documentation]({{< relref "../visualizations/heatmap/" >}}).
{{< figure src="/static/img/docs/panels/heatmap-panel-9-1.png" max-width="750px" caption="A heatmap panel" >}}
#### (Beta) Trace to metrics
You can now link metrics queries to your traces.
This feature can be accessed by enabling the `traceToMetrics` feature toggle.
In your tracing datasource configuration, select a metrics datasource, add tags, and write your queries.
Each query appears as a link on each span.
The configured tag values are dynamically added to your metrics queries.
You can link to any metric you'd like.
Metrics for span durations, counts, and errors filtered by service or span are a great starting point.
The metrics generator introduced in Tempo 1.4 pairs extremely well with the trace to metrics feature.
To learn more about the metrics generator, see the [blog post](https://grafana.com/blog/2022/05/02/new-in-grafana-tempo-1.4-introducing-the-metrics-generator/).
{{< figure src="/static/img/docs/panels/trace-to-metrics-9-1.png" max-width="750px" caption="Linking a trace to a metrics query" >}}
#### (Beta) APM table
You can now get Application Performance Management (APM) data with Grafana.
The data is shown in a table in the Tempo datasource under the Service Graph tab.
To access the feature, enable the `tempoApmTable` feature toggle.
To receive the data for the APM table, you must also enable the metrics generator.
The APM table displays rate, errors, and duration (RED) metrics.
To view your top five RED span metrics, use the table summary view.
The span metrics are created using the Tempo [metrics generator](https://grafana.com/blog/2022/05/02/new-in-grafana-tempo-1.4-introducing-the-metrics-generator/).
We also embedded several links directly into the table.
These links direct you to a Prometheus query to further investigate the data.
We also provide a link from the table directly to Tempo search, making it easier for you to investigate your APM metrics.
To learn more about the APM table, see the [documentation]({{< relref "../datasources/tempo/#apm-table" >}}).
{{< figure src="/static/img/docs/panels/apm-table-9-1.png" max-width="750px" caption="An APM table in the Explore view" >}}
### Sharing
#### (Alpha) Public dashboards
Public dashboards are available as an alpha feature that can be enabled with the `publicDashboards` feature toggle.
You can generate a link for dashboards that you'd like to share publicly.
Anyone with the link will be able to access that dashboard, and nothing else.
The public view of a dashboard has a few restrictions:
- Arbitrary queries cannot be run against your datasources through public dashboards.
Public dashboards can only execute the queries stored on the original dashboard.
- The public dashboard is displayed in a read-only kiosk view.
- The time range is fixed to the dashboard default time range.
To learn more, see the [documentation]({{< relref "../dashboards/dashboard-public/" >}}).
#### Provisioning improvements for Grafana Alerting
You can provision your Grafana Alerting resources directly from disk, which is a process you might already follow for your dashboards or data sources.
Grafana Alerting resources are provisioned once when you initially configure Grafana.
Provisioning for Grafana Alerting currently supports these resources:
- Alert rules
- Contact points
- Notification policies
- Mute timings
- Text templates
For more information, see the
[provisioning documentation]({{< relref "../administration/provisioning/" >}}).
## Grafana Enterprise
### Sharing and customization
#### Reporting improvements
Reporting is better in a few specific ways in Grafana version 9.1:
- You can save a draft of a report, in case you need to make a quick update to a dashboard or make other changes before publishing the report.
- Each page of a report PDF includes the dashboard's name, which is useful for multi-page reports.
- You can send the same dashboard in a report multiple times with different time ranges.
For example, you can share last month's numbers as compared to the numbers for this month.
The dashboard uses the same template variables if you attach the dashboard to a report twice.
To learn more about reporting, see the [documentation]({{< relref "../enterprise/reporting/" >}}).
{{< figure src="/static/img/docs/enterprise/reporting-draft-9-1.png" max-width="750px" caption="Saving a report as a draft" >}}
#### (Beta) Configure custom branding in Grafana's UI
Custom branding (previously referred to as whitelabeling) lets you customize parts of Grafana's UI.
You can add links to the footer to your internal documentation, guides, or support, and you can update Grafana's sign-in page, logo, and other graphic elements to reflect your team or company identity.
Previously, you could only configure custom branding in Grafana's configuration files.
Now, you can experiment with customization in Grafana's Admin section in the UI, or customize branding and links using the API.
This is an early-access feature available only to self-managed customers.
{{< figure src="/static/img/docs/enterprise/custom-branding-9-1.png" max-width="750px" caption="Configuring custom branding" >}}
### Authentication and security
#### RBAC for app plugins, usage insights, and query caching
As part of our continued improvements to RBAC, we are rolling out role-based access control (RBAC) across all of Grafana's features.
In v9.1, you can determine which users, teams, and roles can access app plugins like OnCall and Synthetics.
> **Note:** You can't yet define view or edit roles for app plugins.
> For example, you cannot yet grant a user view-only access to OnCall.
> This definition is planned for a future release.
You can also control who can view, edit, or administer dashboard and data source usage insights, as well as data source query caching configuration.
For more details, see the [RBAC documentation]({{< relref "../administration/roles-and-permissions/access-control/" >}}).
{{< figure src="/static/img/docs/enterprise/rbac-app-plugins-9-1.png" max-width="750px" caption="Configuring role-based-access to app plugins" >}}
#### Rotate your database encryption keys using Grafana's API
In Grafana version 9.0, we [revamped]({{< relref "./whats-new-in-v9-0/#envelope-encryption-is-generally-available-and-enabled-by-default" >}}) the method Grafana uses to encrypt secrets, like data source credentials, so that you can rotate encryption keys and integrate with a key management system like Hashicorp Vault, AWS Key Management Service, or Azure Key Vault.
Now, you can rotate keys and re-encrypt secrets via API.
This makes it easier to configure Grafana to be secure while deploying it.
To learn more, see our guide to [configuring database encryption]({{< relref "../setup-grafana/configure-security/configure-database-encryption/#configure-database-encryption" >}}).
#### Audit all actions in Grafana using verbose logging
Auditing logs helps you manage and mitigate activity and meet compliance requirements.
By default, Grafana emits an audit log with every action that changes something (like a user creating or updating a dashboard or updating another user's permissions).
If you want to record all actions on the Grafana server, including GETs and page views, you can now turn on `verbose mode`.
This results in more logs, but it can be useful to debug specific issues or make sure you catch everything happening in Grafana for security or compliance reasons.
To learn more, see the [configuration documentation]({{< relref "../setup-grafana/configure-grafana/enterprise-configuration/#verbose" >}}).
{{< figure src="/static/img/docs/enterprise/verbose-audit-logs-9-1.png" max-width="750px" caption="Verbose audit logging output" >}}
#### See (and don't edit) users synced from SAML, LDAP, and OAuth identity providers
When you synchronize users from a SAML, LDAP, or OAuth provider, some user settings, such as name and email address, are synchronized from your identity provider.
Previously, you could edit those settings in the Grafana UI, but they would revert back.
To make user management clearer, you can now see which settings are synchronized from your identity provider, but you cannot edit those settings.
To learn more about authentication, see the [documentation]({{< relref "../setup-grafana/configure-security/configure-authentication/" >}}).
{{< figure src="/static/img/docs/enterprise/oauth-synced-user-9-1.png" max-width="750px" caption="Non-interactive view of a user synced via OAuth" >}}
#### Support wildcards for LDAP groups in team sync
Team sync lets you set up synchronization between your authentication provider's teams and Grafana teams.
To leverage your existing Active Directory in an efficient way without having to create multiple teams, you can now use wildcards when configuring LDAP groups, so that multiple Active Directory groups can be added at once to a single team.
{{< figure src="/static/img/docs/enterprise/ldap-wildcard-teamsync-9-1.png" max-width="750px" caption="Using wildcard mapping for team sync" >}}
#### Redirect binding support for AzureAD SAML Single Logout
SAML Single Logout allows users to log out from all applications associated with the current IdP (Identity Provider) session established via SAML Single Sign-On (SSO).
To enable integration of more use cases, we have added support for an HTTP-Redirect binding for a Single Logout.

View File

@@ -84,7 +84,7 @@ e2e.scenario({
itName: 'Disable a public dashboard',
addScenarioDataSource: false,
addScenarioDashBoard: false,
skipScenario: false,
skipScenario: true,
scenario: () => {
// Opening a dashboard without template variables
e2e().intercept('/api/ds/query').as('query');

View File

@@ -1,6 +1,8 @@
{
"npmClient": "yarn",
"useWorkspaces": true,
"packages": ["packages/*"],
"version": "9.1.0-pre"
"packages": [
"packages/*"
],
"version": "9.1.0"
}

View File

@@ -3,7 +3,7 @@
"license": "AGPL-3.0-only",
"private": true,
"name": "grafana",
"version": "9.1.0-pre",
"version": "9.1.0",
"repository": "github:grafana/grafana",
"scripts": {
"api-tests": "jest --notify --watch --config=devenv/e2e-api-tests/jest.js",
@@ -87,7 +87,6 @@
"@babel/preset-env": "7.18.9",
"@babel/preset-react": "7.18.6",
"@babel/preset-typescript": "7.18.6",
"@babel/runtime": "7.18.9",
"@betterer/betterer": "5.3.7",
"@betterer/cli": "5.3.7",
"@betterer/eslint": "5.3.7",
@@ -254,6 +253,7 @@
"@grafana/aws-sdk": "0.0.37",
"@grafana/data": "workspace:*",
"@grafana/e2e-selectors": "workspace:*",
"@grafana/experimental": "^0.0.2-canary.32",
"@grafana/google-sdk": "0.0.3",
"@grafana/lezer-logql": "0.0.14",
"@grafana/runtime": "workspace:*",
@@ -352,7 +352,6 @@
"rc-tree": "5.6.6",
"re-resizable": "6.9.9",
"react": "17.0.2",
"react-awesome-query-builder": "^5.1.2",
"react-beautiful-dnd": "13.1.0",
"react-diff-viewer": "^3.1.1",
"react-dom": "17.0.2",
@@ -388,7 +387,6 @@
"semver": "7.3.7",
"slate": "0.47.8",
"slate-plain-serializer": "0.7.10",
"sql-formatter-plus": "^1.3.6",
"symbol-observable": "4.0.0",
"test": "link:./public/test",
"tether-drop": "https://github.com/torkelo/drop",

View File

@@ -2,7 +2,7 @@
"author": "Grafana Labs",
"license": "Apache-2.0",
"name": "@grafana/data",
"version": "9.1.0-pre",
"version": "9.1.0",
"description": "Grafana Data Library",
"keywords": [
"typescript"
@@ -22,7 +22,7 @@
},
"dependencies": {
"@braintree/sanitize-url": "6.0.0",
"@grafana/schema": "9.1.0-pre",
"@grafana/schema": "9.1.0",
"@types/d3-interpolate": "^1.4.0",
"d3-interpolate": "1.4.0",
"date-fns": "2.29.1",

View File

@@ -40,3 +40,17 @@ export class DataSelectEvent extends BusEventWithPayload<DataHoverPayload> {
export class AnnotationChangeEvent extends BusEventWithPayload<Partial<AnnotationEvent>> {
static type = 'annotation-event';
}
// Loaded the first time a dashboard is loaded (not on every render)
export type DashboardLoadedEventPayload<T> = {
dashboardId: string;
orgId?: number;
userId?: number;
grafanaVersion?: string;
queries: Record<string, T[]>;
};
/** @alpha */
export class DashboardLoadedEvent<T> extends BusEventWithPayload<DashboardLoadedEventPayload<T>> {
static type = 'dashboard-loaded';
}

View File

@@ -10,6 +10,7 @@ import { groupByTransformer } from './transformers/groupBy';
import { groupingToMatrixTransformer } from './transformers/groupingToMatrix';
import { histogramTransformer } from './transformers/histogram';
import { labelsToFieldsTransformer } from './transformers/labelsToFields';
import { limitTransformer } from './transformers/limit';
import { mergeTransformer } from './transformers/merge';
import { noopTransformer } from './transformers/noop';
import { orderFieldsTransformer } from './transformers/order';
@@ -45,4 +46,5 @@ export const standardTransformers = {
histogramTransformer,
convertFieldTypeTransformer,
groupingToMatrixTransformer,
limitTransformer,
};

View File

@@ -33,4 +33,5 @@ export enum DataTransformerID {
joinByLabels = 'joinByLabels',
extractFields = 'extractFields',
groupingToMatrix = 'groupingToMatrix',
limit = 'limit',
}

View File

@@ -0,0 +1,104 @@
import { DataTransformerConfig } from '@grafana/data';
import { toDataFrame } from '../../dataframe/processDataFrame';
import { Field, FieldType } from '../../types';
import { mockTransformationsRegistry } from '../../utils/tests/mockTransformationsRegistry';
import { ArrayVector } from '../../vector';
import { transformDataFrame } from '../transformDataFrame';
import { DataTransformerID } from './ids';
import { limitTransformer, LimitTransformerOptions } from './limit';
describe('Limit transformer', () => {
beforeAll(() => {
mockTransformationsRegistry([limitTransformer]);
});
it('should limit the number of items', async () => {
const testSeries = toDataFrame({
name: 'A',
fields: [
{ name: 'time', type: FieldType.time, values: [3000, 4000, 5000, 6000, 7000, 8000] },
{ name: 'message', type: FieldType.string, values: ['one', 'two', 'two', 'three', 'three', 'three'] },
{ name: 'values', type: FieldType.number, values: [1, 2, 2, 3, 3, 3] },
],
});
const cfg: DataTransformerConfig<LimitTransformerOptions> = {
id: DataTransformerID.limit,
options: {
limitField: 3,
},
};
await expect(transformDataFrame([cfg], [testSeries])).toEmitValuesWith((received) => {
const result = received[0];
const expected: Field[] = [
{
name: 'time',
type: FieldType.time,
values: new ArrayVector([3000, 4000, 5000]),
config: {},
},
{
name: 'message',
type: FieldType.string,
values: new ArrayVector(['one', 'two', 'two']),
config: {},
},
{
name: 'values',
type: FieldType.number,
values: new ArrayVector([1, 2, 2]),
config: {},
},
];
expect(result[0].fields).toEqual(expected);
});
});
it('should not limit the number of items if limit > number of items', async () => {
const testSeries = toDataFrame({
name: 'A',
fields: [
{ name: 'time', type: FieldType.time, values: [3000, 4000, 5000, 6000, 7000, 8000] },
{ name: 'message', type: FieldType.string, values: ['one', 'two', 'two', 'three', 'three', 'three'] },
{ name: 'values', type: FieldType.number, values: [1, 2, 2, 3, 3, 3] },
],
});
const cfg: DataTransformerConfig<LimitTransformerOptions> = {
id: DataTransformerID.limit,
options: {
limitField: 7,
},
};
await expect(transformDataFrame([cfg], [testSeries])).toEmitValuesWith((received) => {
const result = received[0];
const expected: Field[] = [
{
name: 'time',
type: FieldType.time,
values: new ArrayVector([3000, 4000, 5000, 6000, 7000, 8000]),
config: {},
},
{
name: 'message',
type: FieldType.string,
values: new ArrayVector(['one', 'two', 'two', 'three', 'three', 'three']),
config: {},
},
{
name: 'values',
type: FieldType.number,
values: new ArrayVector([1, 2, 2, 3, 3, 3]),
config: {},
},
];
expect(result[0].fields).toEqual(expected);
});
});
});

View File

@@ -0,0 +1,45 @@
import { map } from 'rxjs/operators';
import { DataTransformerInfo } from '../../types';
import { ArrayVector } from '../../vector/ArrayVector';
import { DataTransformerID } from './ids';
export interface LimitTransformerOptions {
limitField?: number;
}
const DEFAULT_LIMIT_FIELD = 10;
export const limitTransformer: DataTransformerInfo<LimitTransformerOptions> = {
id: DataTransformerID.limit,
name: 'Limit',
description: 'Limit the number of items to the top N',
defaultOptions: {
limitField: DEFAULT_LIMIT_FIELD,
},
operator: (options) => (source) =>
source.pipe(
map((data) => {
const limitFieldMatch = options.limitField || DEFAULT_LIMIT_FIELD;
return data.map((frame) => {
if (frame.length > limitFieldMatch) {
return {
...frame,
fields: frame.fields.map((f) => {
const vals = f.values.toArray();
return {
...f,
values: new ArrayVector(vals.slice(0, limitFieldMatch)),
};
}),
length: limitFieldMatch,
};
}
return frame;
});
})
),
};

View File

@@ -177,6 +177,7 @@ export interface GrafanaConfig {
profileEnabled: boolean;
ldapEnabled: boolean;
sigV4AuthEnabled: boolean;
azureAuthEnabled: boolean;
samlEnabled: boolean;
autoAssignOrg: boolean;
verifyEmailEnabled: boolean;

View File

@@ -27,7 +27,6 @@ export interface FeatureToggles {
queryOverLive?: boolean;
panelTitleSearch?: boolean;
tempoApmTable?: boolean;
prometheus_azure_auth?: boolean;
prometheusAzureOverrideAudience?: boolean;
influxdbBackendMigration?: boolean;
showFeatureFlagsInUI?: boolean;

View File

@@ -2,7 +2,7 @@
"author": "Grafana Labs",
"license": "Apache-2.0",
"name": "@grafana/e2e-selectors",
"version": "9.1.0-pre",
"version": "9.1.0",
"description": "Grafana End-to-End Test Selectors Library",
"keywords": [
"cli",

View File

@@ -2,7 +2,7 @@
"author": "Grafana Labs",
"license": "Apache-2.0",
"name": "@grafana/e2e",
"version": "9.1.0-pre",
"version": "9.1.0",
"description": "Grafana End-to-End Test Library",
"keywords": [
"cli",
@@ -48,7 +48,7 @@
"@babel/core": "7.18.9",
"@babel/preset-env": "7.18.9",
"@cypress/webpack-preprocessor": "5.12.0",
"@grafana/e2e-selectors": "9.1.0-pre",
"@grafana/e2e-selectors": "9.1.0",
"@grafana/tsconfig": "^1.2.0-rc1",
"@mochajs/json-file-reporter": "^1.2.0",
"babel-loader": "8.2.5",

View File

@@ -2,7 +2,7 @@
"author": "Grafana Labs",
"license": "Apache-2.0",
"name": "@grafana/runtime",
"version": "9.1.0-pre",
"version": "9.1.0",
"description": "Grafana Runtime Library",
"keywords": [
"grafana",
@@ -23,9 +23,9 @@
},
"dependencies": {
"@grafana/agent-web": "^0.4.0",
"@grafana/data": "9.1.0-pre",
"@grafana/e2e-selectors": "9.1.0-pre",
"@grafana/ui": "9.1.0-pre",
"@grafana/data": "9.1.0",
"@grafana/e2e-selectors": "9.1.0",
"@grafana/ui": "9.1.0",
"@sentry/browser": "6.19.7",
"history": "4.10.1",
"lodash": "4.17.21",

View File

@@ -55,6 +55,7 @@ export class GrafanaBootConfig implements GrafanaConfig {
jwtHeaderName = '';
jwtUrlLogin = false;
sigV4AuthEnabled = false;
azureAuthEnabled = false;
samlEnabled = false;
samlName = '';
autoAssignOrg = true;

View File

@@ -2,7 +2,7 @@
"author": "Grafana Labs",
"license": "Apache-2.0",
"name": "@grafana/schema",
"version": "9.1.0-pre",
"version": "9.1.0",
"description": "Grafana Schema Library",
"keywords": [
"typescript"

View File

@@ -1,4 +1,4 @@
FROM alpine:3.15.0
FROM alpine:3.15.6
USER root

View File

@@ -2,7 +2,7 @@
"author": "Grafana Labs",
"license": "Apache-2.0",
"name": "@grafana/toolkit",
"version": "9.1.0-pre",
"version": "9.1.0",
"description": "Grafana Toolkit",
"keywords": [
"grafana",
@@ -38,10 +38,10 @@
"@babel/preset-env": "^7.18.9",
"@babel/preset-react": "^7.18.6",
"@babel/preset-typescript": "^7.18.6",
"@grafana/data": "9.1.0-pre",
"@grafana/data": "9.1.0",
"@grafana/eslint-config": "^4.0.0",
"@grafana/tsconfig": "^1.2.0-rc1",
"@grafana/ui": "9.1.0-pre",
"@grafana/ui": "9.1.0",
"@jest/core": "27.5.1",
"@types/command-exists": "^1.2.0",
"@types/eslint": "8.4.1",

View File

@@ -140,7 +140,7 @@ const packagePluginRunner: TaskRunner<PluginCIOptions> = async ({ signatureType,
if (signatureType) {
manifest.signatureType = signatureType;
}
if (rootUrls) {
if (rootUrls && rootUrls.length > 0) {
rootUrls.forEach(assertRootUrlIsValid);
manifest.rootUrls = rootUrls;
}

View File

@@ -22,7 +22,7 @@ const pluginSignRunner: TaskRunner<PluginSignOptions> = async ({ signatureType,
if (signatureType) {
manifest.signatureType = signatureType;
}
if (rootUrls) {
if (rootUrls && rootUrls.length > 0) {
rootUrls.forEach(assertRootUrlIsValid);
manifest.rootUrls = rootUrls;
}

View File

@@ -2,7 +2,7 @@
"author": "Grafana Labs",
"license": "Apache-2.0",
"name": "@grafana/ui",
"version": "9.1.0-pre",
"version": "9.1.0",
"description": "Grafana Components Library",
"keywords": [
"grafana",
@@ -32,9 +32,9 @@
"dependencies": {
"@emotion/css": "11.9.0",
"@emotion/react": "11.9.3",
"@grafana/data": "9.1.0-pre",
"@grafana/e2e-selectors": "9.1.0-pre",
"@grafana/schema": "9.1.0-pre",
"@grafana/data": "9.1.0",
"@grafana/e2e-selectors": "9.1.0",
"@grafana/schema": "9.1.0",
"@grafana/slate-react": "0.22.10-grafana",
"@monaco-editor/react": "4.3.1",
"@popperjs/core": "2.11.5",

View File

@@ -159,6 +159,10 @@ describe('BarGauge', () => {
it('-30 to 30 and value 30', () => {
expect(getValuePercent(30, -30, 30)).toEqual(1);
});
it('returns 0 if the min, max and value are all the same value', () => {
expect(getValuePercent(25, 25, 25)).toEqual(0);
});
});
describe('Vertical bar', () => {

View File

@@ -430,7 +430,9 @@ export function getCellColor(
}
export function getValuePercent(value: number, minValue: number, maxValue: number): number {
return Math.min((value - minValue) / (maxValue - minValue), 1);
// Need special logic for when minValue === maxValue === value to prevent returning NaN
const valueRatio = Math.min((value - minValue) / (maxValue - minValue), 1);
return isNaN(valueRatio) ? 0 : valueRatio;
}
/**

View File

@@ -10,51 +10,60 @@ import { Input, Props as InputProps } from '../Input/Input';
import { ColorPickerProps } from './ColorPickerPopover';
interface ColorInputProps extends ColorPickerProps, Omit<InputProps, 'color' | 'onChange'> {}
interface ColorInputProps extends ColorPickerProps, Omit<InputProps, 'color' | 'onChange'> {
isClearable?: boolean;
}
const ColorInput = forwardRef<HTMLInputElement, ColorInputProps>(({ color, onChange, ...inputProps }, ref) => {
const [value, setValue] = useState(color);
const [previousColor, setPreviousColor] = useState(color);
// eslint-disable-next-line react-hooks/exhaustive-deps
const updateColor = useMemo(() => debounce(onChange, 100), []);
const ColorInput = forwardRef<HTMLInputElement, ColorInputProps>(
({ color, onChange, isClearable = false, ...inputProps }, ref) => {
const [value, setValue] = useState(color);
const [previousColor, setPreviousColor] = useState(color);
// eslint-disable-next-line react-hooks/exhaustive-deps
const updateColor = useMemo(() => debounce(onChange, 100), []);
useEffect(() => {
const newColor = tinycolor(color);
if (newColor.isValid() && color !== previousColor) {
setValue(newColor.toString());
setPreviousColor(color);
}
}, [color, previousColor]);
useEffect(() => {
const newColor = tinycolor(color);
if (newColor.isValid() && color !== previousColor) {
setValue(newColor.toString());
setPreviousColor(color);
}
}, [color, previousColor]);
const onChangeColor = (event: React.SyntheticEvent<HTMLInputElement>) => {
const newColor = tinycolor(event.currentTarget.value);
const onChangeColor = (event: React.SyntheticEvent<HTMLInputElement>) => {
const { value: colorValue } = event.currentTarget;
setValue(event.currentTarget.value);
setValue(colorValue);
if (colorValue === '' && isClearable) {
updateColor(colorValue);
return;
}
const newColor = tinycolor(colorValue);
if (newColor.isValid()) {
updateColor(newColor.toString());
}
};
if (newColor.isValid()) {
updateColor(newColor.toString());
}
};
const onBlur = () => {
const newColor = tinycolor(value);
const onBlur = () => {
const newColor = tinycolor(value);
if (!newColor.isValid()) {
setValue(color);
}
};
if (!newColor.isValid()) {
setValue(color);
}
};
return (
<Input
{...inputProps}
value={value}
onChange={onChangeColor}
onBlur={onBlur}
addonBefore={<ColorPreview color={color} />}
ref={ref}
/>
);
});
return (
<Input
{...inputProps}
value={value}
onChange={onChangeColor}
onBlur={onBlur}
addonBefore={<ColorPreview color={color} />}
ref={ref}
/>
);
}
);
ColorInput.displayName = 'ColorInput';

View File

@@ -0,0 +1,41 @@
import { render, screen, waitFor } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
import React from 'react';
import { ColorPickerInput } from './ColorPickerInput';
const noop = () => {};
describe('ColorPickerInput', () => {
it('should show color popover on focus', async () => {
render(<ColorPickerInput onChange={noop} />);
expect(screen.queryByTestId('color-popover')).not.toBeInTheDocument();
await userEvent.click(screen.getByRole('textbox'));
expect(screen.getByTestId('color-popover')).toBeInTheDocument();
});
it('should pass correct color to onChange callback', async () => {
const mockOnChange = jest.fn();
render(<ColorPickerInput onChange={mockOnChange} />);
await userEvent.type(screen.getByRole('textbox'), 'rgb(255,255,255)');
await waitFor(() => expect(mockOnChange).toHaveBeenCalledWith('rgb(255, 255, 255)'));
});
it('should not pass invalid color value to onChange callback', async () => {
const mockOnChange = jest.fn();
render(<ColorPickerInput onChange={mockOnChange} />);
await userEvent.type(screen.getByRole('textbox'), 'some text');
screen.getByRole('textbox').blur();
await waitFor(() => expect(mockOnChange).not.toHaveBeenCalled());
expect(screen.getByRole('textbox')).toHaveValue('');
});
it('should be able to reset selected value', async () => {
const mockOnChange = jest.fn();
render(<ColorPickerInput onChange={mockOnChange} value={'rgb(0,0,0)'} />);
// Should show the value in the input
expect(screen.getByDisplayValue('rgb(0,0,0)')).toBeInTheDocument();
await userEvent.clear(screen.getByRole('textbox'));
await waitFor(() => expect(mockOnChange).toHaveBeenCalledWith(''));
expect(screen.getByRole('textbox')).toHaveValue('');
});
});

View File

@@ -53,13 +53,14 @@ export const ColorPickerInput = forwardRef<HTMLInputElement, ColorPickerInputPro
<div className={styles.wrapper}>
{isOpen && (
<RgbaStringColorPicker
data-testid={'color-popover'}
color={currentColor}
onChange={setColor}
className={cx(paletteStyles.root, styles.picker)}
/>
)}
<div onClick={() => setIsOpen(true)}>
<ColorInput {...inputProps} theme={theme} color={currentColor} onChange={setColor} ref={ref} />
<ColorInput {...inputProps} theme={theme} color={currentColor} onChange={setColor} ref={ref} isClearable />
</div>
</div>
</ClickOutsideWrapper>

View File

@@ -4,30 +4,14 @@ import React from 'react';
import { Field, GrafanaTheme2, LogLevel, LogRowModel, MutableDataFrame } from '@grafana/data';
import { LogDetails, Props } from './LogDetails';
import { createLogRow } from './__mocks__/logRow';
const setup = (propOverrides?: Partial<Props>, rowOverrides?: Partial<LogRowModel>) => {
const props: Props = {
theme: {} as GrafanaTheme2,
showDuplicates: false,
wrapLogMessage: false,
row: {
dataFrame: new MutableDataFrame(),
entryFieldIndex: 0,
rowIndex: 0,
logLevel: 'error' as LogLevel,
timeFromNow: '',
timeEpochMs: 1546297200000,
timeEpochNs: '1546297200000000000',
timeLocal: '',
timeUtc: '',
hasAnsi: false,
hasUnescapedContent: false,
entry: '',
raw: '',
uid: '0',
labels: {},
...(rowOverrides || {}),
},
row: createLogRow({ logLevel: LogLevel.error, timeEpochMs: 1546297200000, ...rowOverrides }),
getRows: () => [],
onClickFilterLabel: () => {},
onClickFilterOutLabel: () => {},

View File

@@ -2,9 +2,12 @@ import { mount } from 'enzyme';
import React from 'react';
import { act } from 'react-dom/test-utils';
import { FieldType, LogRowModel, MutableDataFrame, Labels, LogLevel, DataQueryResponse } from '@grafana/data';
import { FieldType, LogRowModel, MutableDataFrame, DataQueryResponse } from '@grafana/data';
import { getRowContexts, LogRowContextProvider } from './LogRowContextProvider';
import { createLogRow } from './__mocks__/logRow';
const row = createLogRow({ entry: '4', timeEpochMs: 4 });
describe('getRowContexts', () => {
describe('when called with a DataFrame and results are returned', () => {
@@ -175,21 +178,3 @@ describe('LogRowContextProvider', () => {
});
});
});
const row: LogRowModel = {
entryFieldIndex: 0,
rowIndex: 0,
dataFrame: new MutableDataFrame(),
entry: '4',
labels: null as any as Labels,
hasAnsi: false,
hasUnescapedContent: false,
raw: '4',
logLevel: LogLevel.info,
timeEpochMs: 4,
timeEpochNs: '4000000',
timeFromNow: '',
timeLocal: '',
timeUtc: '',
uid: '1',
};

View File

@@ -2,13 +2,14 @@ import { render, screen } from '@testing-library/react';
import { range } from 'lodash';
import React from 'react';
import { LogLevel, LogRowModel, LogsDedupStrategy, MutableDataFrame, LogsSortOrder } from '@grafana/data';
import { LogRowModel, LogsDedupStrategy, LogsSortOrder } from '@grafana/data';
import { LogRows, PREVIEW_LIMIT } from './LogRows';
import { createLogRow } from './__mocks__/logRow';
describe('LogRows', () => {
it('renders rows', () => {
const rows: LogRowModel[] = [makeLog({ uid: '1' }), makeLog({ uid: '2' }), makeLog({ uid: '3' })];
const rows: LogRowModel[] = [createLogRow({ uid: '1' }), createLogRow({ uid: '2' }), createLogRow({ uid: '3' })];
render(
<LogRows
logRows={rows}
@@ -29,7 +30,7 @@ describe('LogRows', () => {
});
it('renders rows only limited number of rows first', () => {
const rows: LogRowModel[] = [makeLog({ uid: '1' }), makeLog({ uid: '2' }), makeLog({ uid: '3' })];
const rows: LogRowModel[] = [createLogRow({ uid: '1' }), createLogRow({ uid: '2' }), createLogRow({ uid: '3' })];
jest.useFakeTimers();
const { rerender } = render(
<LogRows
@@ -73,8 +74,8 @@ describe('LogRows', () => {
});
it('renders deduped rows if supplied', () => {
const rows: LogRowModel[] = [makeLog({ uid: '1' }), makeLog({ uid: '2' }), makeLog({ uid: '3' })];
const dedupedRows: LogRowModel[] = [makeLog({ uid: '4' }), makeLog({ uid: '5' })];
const rows: LogRowModel[] = [createLogRow({ uid: '1' }), createLogRow({ uid: '2' }), createLogRow({ uid: '3' })];
const dedupedRows: LogRowModel[] = [createLogRow({ uid: '4' }), createLogRow({ uid: '5' })];
render(
<LogRows
logRows={rows}
@@ -95,7 +96,7 @@ describe('LogRows', () => {
it('renders with default preview limit', () => {
// PREVIEW_LIMIT * 2 is there because otherwise we just render all rows
const rows: LogRowModel[] = range(PREVIEW_LIMIT * 2 + 1).map((num) => makeLog({ uid: num.toString() }));
const rows: LogRowModel[] = range(PREVIEW_LIMIT * 2 + 1).map((num) => createLogRow({ uid: num.toString() }));
render(
<LogRows
logRows={rows}
@@ -115,9 +116,9 @@ describe('LogRows', () => {
it('renders asc ordered rows if order and function supplied', () => {
const rows: LogRowModel[] = [
makeLog({ uid: '1', timeEpochMs: 1 }),
makeLog({ uid: '3', timeEpochMs: 3 }),
makeLog({ uid: '2', timeEpochMs: 2 }),
createLogRow({ uid: '1', timeEpochMs: 1 }),
createLogRow({ uid: '3', timeEpochMs: 3 }),
createLogRow({ uid: '2', timeEpochMs: 2 }),
];
render(
<LogRows
@@ -139,9 +140,9 @@ describe('LogRows', () => {
});
it('renders desc ordered rows if order and function supplied', () => {
const rows: LogRowModel[] = [
makeLog({ uid: '1', timeEpochMs: 1 }),
makeLog({ uid: '3', timeEpochMs: 3 }),
makeLog({ uid: '2', timeEpochMs: 2 }),
createLogRow({ uid: '1', timeEpochMs: 1 }),
createLogRow({ uid: '3', timeEpochMs: 3 }),
createLogRow({ uid: '2', timeEpochMs: 2 }),
];
render(
<LogRows
@@ -162,29 +163,3 @@ describe('LogRows', () => {
expect(screen.queryAllByRole('row').at(2)).toHaveTextContent('log message 1');
});
});
const makeLog = (overrides: Partial<LogRowModel>): LogRowModel => {
const uid = overrides.uid || '1';
const timeEpochMs = overrides.timeEpochMs || 1;
const entry = `log message ${uid}`;
return {
entryFieldIndex: 0,
rowIndex: 0,
// Does not need to be filled with current tests
dataFrame: new MutableDataFrame(),
uid,
logLevel: LogLevel.debug,
entry,
hasAnsi: false,
hasUnescapedContent: false,
labels: {},
raw: entry,
timeFromNow: '',
timeEpochMs,
timeEpochNs: (timeEpochMs * 1000000).toString(),
timeLocal: '',
timeUtc: '',
searchWords: [],
...overrides,
};
};

View File

@@ -0,0 +1,27 @@
import { LogLevel, LogRowModel, MutableDataFrame } from '@grafana/data';
export const createLogRow = (overrides?: Partial<LogRowModel>): LogRowModel => {
const uid = overrides?.uid || '1';
const timeEpochMs = overrides?.timeEpochMs || 1;
const entry = overrides?.entry || `log message ${uid}`;
return {
entryFieldIndex: 0,
rowIndex: 0,
dataFrame: new MutableDataFrame(),
uid,
logLevel: LogLevel.info,
entry,
hasAnsi: false,
hasUnescapedContent: false,
labels: {},
raw: entry,
timeFromNow: '',
timeEpochMs,
timeEpochNs: (timeEpochMs * 1000000).toString(),
timeLocal: '',
timeUtc: '',
searchWords: [],
...overrides,
};
};

View File

@@ -0,0 +1,168 @@
import { ArrayVector, FieldType, MutableDataFrame } from '@grafana/data';
import { createLogRow } from './__mocks__/logRow';
import { getAllFields } from './logParser';
describe('getAllFields', () => {
it('should filter out field with labels name and other type', () => {
const logRow = createLogRow({
entryFieldIndex: 10,
dataFrame: new MutableDataFrame({
refId: 'A',
fields: [
testStringField,
{
name: 'labels',
type: FieldType.other,
config: {},
values: new ArrayVector([{ place: 'luna', source: 'data' }]),
},
],
}),
});
const fields = getAllFields(logRow);
expect(fields.length).toBe(1);
expect(fields.find((field) => field.key === 'labels')).toBe(undefined);
});
it('should not filter out field with labels name and string type', () => {
const logRow = createLogRow({
entryFieldIndex: 10,
dataFrame: new MutableDataFrame({
refId: 'A',
fields: [
testStringField,
{
name: 'labels',
type: FieldType.string,
config: {},
values: new ArrayVector([{ place: 'luna', source: 'data' }]),
},
],
}),
});
const fields = getAllFields(logRow);
expect(fields.length).toBe(2);
expect(fields.find((field) => field.key === 'labels')).not.toBe(undefined);
});
it('should filter out field with id name', () => {
const logRow = createLogRow({
entryFieldIndex: 10,
dataFrame: new MutableDataFrame({
refId: 'A',
fields: [
testStringField,
{
name: 'id',
type: FieldType.string,
config: {},
values: new ArrayVector(['1659620138401000000_8b1f7688_']),
},
],
}),
});
const fields = getAllFields(logRow);
expect(fields.length).toBe(1);
expect(fields.find((field) => field.key === 'id')).toBe(undefined);
});
it('should filter out entry field which is shown as the log message', () => {
const logRow = createLogRow({
entryFieldIndex: 3,
dataFrame: new MutableDataFrame({
refId: 'A',
fields: [
testStringField,
{
name: 'labels',
type: FieldType.other,
config: {},
values: new ArrayVector([{ place: 'luna', source: 'data' }]),
},
{
name: 'Time',
type: FieldType.time,
config: {},
values: new ArrayVector([1659620138401]),
},
{
name: 'Line',
type: FieldType.string,
config: {},
values: new ArrayVector([
'_entry="log text with ANSI \u001b[31mpart of the text\u001b[0m [616951240]" counter=300 float=NaN label=val3 level=info',
]),
},
],
}),
});
const fields = getAllFields(logRow);
expect(fields.find((field) => field.key === 'Line')).toBe(undefined);
});
it('should filter out field with config hidden field', () => {
const testField = { ...testStringField };
testField.config = {
custom: {
hidden: true,
},
};
const logRow = createLogRow({
entryFieldIndex: 10,
dataFrame: new MutableDataFrame({
refId: 'A',
fields: [{ ...testField }],
}),
});
const fields = getAllFields(logRow);
expect(fields.length).toBe(0);
expect(fields.find((field) => field.key === testField.name)).toBe(undefined);
});
it('should filter out field with null values', () => {
const logRow = createLogRow({
entryFieldIndex: 10,
dataFrame: new MutableDataFrame({
refId: 'A',
fields: [{ ...testFieldWithNullValue }],
}),
});
const fields = getAllFields(logRow);
expect(fields.length).toBe(0);
expect(fields.find((field) => field.key === testFieldWithNullValue.name)).toBe(undefined);
});
it('should not filter out field with string values', () => {
const logRow = createLogRow({
entryFieldIndex: 10,
dataFrame: new MutableDataFrame({
refId: 'A',
fields: [{ ...testStringField }],
}),
});
const fields = getAllFields(logRow);
expect(fields.length).toBe(1);
expect(fields.find((field) => field.key === testStringField.name)).not.toBe(undefined);
});
});
const testStringField = {
name: 'test_field_string',
type: FieldType.string,
config: {},
values: new ArrayVector(['abc']),
};
const testFieldWithNullValue = {
name: 'test_field_null',
type: FieldType.string,
config: {},
values: new ArrayVector([null]),
};

View File

@@ -1,6 +1,6 @@
import memoizeOne from 'memoize-one';
import { Field, getParser, LinkModel, LogRowModel } from '@grafana/data';
import { Field, FieldType, getParser, LinkModel, LogRowModel } from '@grafana/data';
import { MAX_CHARACTERS } from './LogRowMessage';
@@ -62,31 +62,18 @@ const parseMessage = memoizeOne((rowEntry): FieldDef[] => {
const getDerivedFields = memoizeOne(
(row: LogRowModel, getFieldLinks?: (field: Field, rowIndex: number) => Array<LinkModel<Field>>): FieldDef[] => {
return (
row.dataFrame.fields
.map((field, index) => ({ ...field, index }))
// Remove Id which we use for react key and entry field which we are showing as the log message. Also remove hidden fields.
.filter(
(field, index) => !('id' === field.name || row.entryFieldIndex === index || field.config.custom?.hidden)
)
// Filter out fields without values. For example in elastic the fields are parsed from the document which can
// have different structure per row and so the dataframe is pretty sparse.
.filter((field) => {
const value = field.values.get(row.rowIndex);
// Not sure exactly what will be the empty value here. And we want to keep 0 as some values can be non
// string.
return value !== null && value !== undefined;
})
.map((field) => {
const links = getFieldLinks ? getFieldLinks(field, row.rowIndex) : [];
return {
key: field.name,
value: field.values.get(row.rowIndex).toString(),
links: links,
fieldIndex: field.index,
};
})
);
return row.dataFrame.fields
.map((field, index) => ({ ...field, index }))
.filter((field, index) => !shouldRemoveField(field, index, row))
.map((field) => {
const links = getFieldLinks ? getFieldLinks(field, row.rowIndex) : [];
return {
key: field.name,
value: field.values.get(row.rowIndex).toString(),
links: links,
fieldIndex: field.index,
};
});
}
);
@@ -99,3 +86,28 @@ function sortFieldsLinkFirst(fieldA: FieldDef, fieldB: FieldDef) {
}
return fieldA.key > fieldB.key ? 1 : fieldA.key < fieldB.key ? -1 : 0;
}
function shouldRemoveField(field: Field, index: number, row: LogRowModel) {
// Remove field if it is:
// "labels" field that is in Loki used to store all labels
if (field.name === 'labels' && field.type === FieldType.other) {
return true;
}
// "id" field which we use for react key
if (field.name === 'id') {
return true;
}
// entry field which we are showing as the log message
if (row.entryFieldIndex === index) {
return true;
}
// hidden field
if (field.config.custom?.hidden) {
return true;
}
// field that has empty value (we want to keep 0 or empty string)
if (field.values.get(row.rowIndex) == null) {
return true;
}
return false;
}

View File

@@ -0,0 +1,13 @@
import { render, screen } from '@testing-library/react';
import React from 'react';
import { PageToolbar } from '..';
describe('PageToolbar', () => {
it('renders left items when title is not set', () => {
const leftItemContent = 'Left Item!';
render(<PageToolbar leftItems={[<div key="left-item">{leftItemContent}</div>]} />);
expect(screen.getByText(leftItemContent)).toBeInTheDocument();
});
});

View File

@@ -61,12 +61,6 @@ export const PageToolbar: FC<Props> = React.memo(
className
);
const leftItemChildren = leftItems?.map((child, index) => (
<div className={styles.leftActionItem} key={index}>
{child}
</div>
));
const titleEl = (
<>
<span className={styles.noLinkTitle}>{title}</span>
@@ -112,22 +106,29 @@ export const PageToolbar: FC<Props> = React.memo(
</>
)}
{title && (
{(title || leftItems?.length) && (
<div className={styles.titleWrapper}>
<h1 className={styles.h1Styles}>
{titleHref ? (
<Link
aria-label="Search dashboard by name"
className={cx(styles.titleText, styles.titleLink)}
href={titleHref}
>
{titleEl}
</Link>
) : (
<div className={styles.titleText}>{titleEl}</div>
)}
</h1>
{leftItemChildren}
{title && (
<h1 className={styles.h1Styles}>
{titleHref ? (
<Link
aria-label="Search dashboard by name"
className={cx(styles.titleText, styles.titleLink)}
href={titleHref}
>
{titleEl}
</Link>
) : (
<div className={styles.titleText}>{titleEl}</div>
)}
</h1>
)}
{leftItems?.map((child, index) => (
<div className={styles.leftActionItem} key={index}>
{child}
</div>
))}
</div>
)}
</nav>

View File

@@ -1,23 +0,0 @@
import { css, cx } from '@emotion/css';
import React from 'react';
import { GrafanaTheme2 } from '@grafana/data';
import { useTheme2, stylesFactory } from '../../themes';
import { Button, ButtonProps } from '../Button';
interface AccessoryButtonProps extends ButtonProps {}
export const AccessoryButton: React.FC<AccessoryButtonProps> = ({ className, ...props }) => {
const theme = useTheme2();
const styles = getButtonStyles(theme);
return <Button {...props} className={cx(className, styles.button)} />;
};
const getButtonStyles = stylesFactory((theme: GrafanaTheme2) => ({
button: css({
paddingLeft: theme.spacing(3 / 2),
paddingRight: theme.spacing(3 / 2),
}),
}));

View File

@@ -1,79 +0,0 @@
import { css } from '@emotion/css';
import React, { ComponentProps } from 'react';
import { GrafanaTheme2 } from '@grafana/data';
import { stylesFactory, useTheme2 } from '../../themes';
import { ReactUtils } from '../../utils';
import { Field } from '../Forms/Field';
import { Icon } from '../Icon/Icon';
import { PopoverContent, Tooltip } from '../Tooltip';
import { Space } from './Space';
interface EditorFieldProps extends ComponentProps<typeof Field> {
label: string;
children: React.ReactElement;
width?: number | string;
optional?: boolean;
tooltip?: PopoverContent;
}
export const EditorField: React.FC<EditorFieldProps> = (props) => {
const { label, optional, tooltip, children, width, ...fieldProps } = props;
const theme = useTheme2();
const styles = getStyles(theme, width);
// Null check for backward compatibility
const childInputId = fieldProps?.htmlFor || ReactUtils?.getChildId(children);
const labelEl = (
<>
<label className={styles.label} htmlFor={childInputId}>
{label}
{optional && <span className={styles.optional}> - optional</span>}
{tooltip && (
<Tooltip placement="top" content={tooltip} theme="info">
<Icon name="info-circle" size="sm" className={styles.icon} />
</Tooltip>
)}
</label>
<Space v={0.5} />
</>
);
return (
<div className={styles.root}>
<Field className={styles.field} label={labelEl} {...fieldProps}>
{children}
</Field>
</div>
);
};
const getStyles = stylesFactory((theme: GrafanaTheme2, width?: number | string) => {
return {
root: css({
minWidth: theme.spacing(width ?? 0),
}),
label: css({
fontSize: 12,
fontWeight: theme.typography.fontWeightMedium,
}),
optional: css({
fontStyle: 'italic',
color: theme.colors.text.secondary,
}),
field: css({
marginBottom: 0, // GrafanaUI/Field has a bottom margin which we must remove
}),
icon: css({
color: theme.colors.text.secondary,
marginLeft: theme.spacing(1),
':hover': {
color: theme.colors.text.primary,
},
}),
};
});

View File

@@ -1,9 +0,0 @@
import React from 'react';
import { Stack } from './Stack';
interface EditorFieldGroupProps {}
export const EditorFieldGroup: React.FC<EditorFieldGroupProps> = ({ children }) => {
return <Stack gap={1}>{children}</Stack>;
};

View File

@@ -1,25 +0,0 @@
import { css } from '@emotion/css';
import React from 'react';
import { GrafanaTheme2 } from '@grafana/data';
import { stylesFactory, useTheme2 } from '../../themes';
interface EditorHeaderProps {}
export const EditorHeader: React.FC<EditorHeaderProps> = ({ children }) => {
const theme = useTheme2();
const styles = getStyles(theme);
return <div className={styles.root}>{children}</div>;
};
const getStyles = stylesFactory((theme: GrafanaTheme2) => ({
root: css({
display: 'flex',
flexWrap: 'wrap',
alignItems: 'center',
gap: theme.spacing(3),
minHeight: theme.spacing(4),
}),
}));

View File

@@ -1,49 +0,0 @@
import React from 'react';
import { Button } from '../Button';
import { Stack } from './Stack';
interface EditorListProps<T> {
items: Array<Partial<T>>;
renderItem: (
item: Partial<T>,
onChangeItem: (item: Partial<T>) => void,
onDeleteItem: () => void
) => React.ReactElement;
onChange: (items: Array<Partial<T>>) => void;
}
export function EditorList<T>({ items, renderItem, onChange }: EditorListProps<T>) {
const onAddItem = () => {
const newItems = [...items, {}];
onChange(newItems);
};
const onChangeItem = (itemIndex: number, newItem: Partial<T>) => {
const newItems = [...items];
newItems[itemIndex] = newItem;
onChange(newItems);
};
const onDeleteItem = (itemIndex: number) => {
const newItems = [...items];
newItems.splice(itemIndex, 1);
onChange(newItems);
};
return (
<Stack>
{items.map((item, index) => (
<div key={index}>
{renderItem(
item,
(newItem) => onChangeItem(index, newItem),
() => onDeleteItem(index)
)}
</div>
))}
<Button onClick={onAddItem} variant="secondary" size="md" icon="plus" aria-label="Add" type="button" />
</Stack>
);
}

View File

@@ -1,30 +0,0 @@
import { css } from '@emotion/css';
import React from 'react';
import { GrafanaTheme2 } from '@grafana/data';
import { useStyles2 } from '../../themes';
import { Stack } from './Stack';
interface EditorRowProps {}
export const EditorRow: React.FC<EditorRowProps> = ({ children }) => {
const styles = useStyles2(getStyles);
return (
<div className={styles.root}>
<Stack gap={2}>{children}</Stack>
</div>
);
};
const getStyles = (theme: GrafanaTheme2) => {
return {
root: css({
padding: theme.spacing(1),
backgroundColor: theme.colors.background.secondary,
borderRadius: theme.shape.borderRadius(1),
}),
};
};

View File

@@ -1,13 +0,0 @@
import React from 'react';
import { Stack } from './Stack';
interface EditorRowsProps {}
export const EditorRows: React.FC<EditorRowsProps> = ({ children }) => {
return (
<Stack gap={0.5} direction="column">
{children}
</Stack>
);
};

View File

@@ -1,25 +0,0 @@
import { css } from '@emotion/css';
import React, { ComponentProps } from 'react';
import { Switch } from '../Switch/Switch';
// Wrapper component around <Switch /> that properly aligns it in <EditorField />
export const EditorSwitch: React.FC<ComponentProps<typeof Switch>> = (props) => {
const styles = getStyles();
return (
<div className={styles.switch}>
<Switch {...props} />
</div>
);
};
const getStyles = () => {
return {
switch: css({
display: 'flex',
alignItems: 'center',
minHeight: 30,
}),
};
};

View File

@@ -1,10 +0,0 @@
import React from 'react';
interface FlexItemProps {
grow?: number;
shrink?: number;
}
export const FlexItem: React.FC<FlexItemProps> = ({ grow, shrink }) => {
return <div style={{ display: 'block', flexGrow: grow, flexShrink: shrink }} />;
};

View File

@@ -1,89 +0,0 @@
import { css, cx } from '@emotion/css';
import React, { useState } from 'react';
import { GroupBase } from 'react-select';
import { GrafanaTheme2 } from '@grafana/data';
import { stylesFactory, useTheme2 } from '../../themes';
import { Select } from '../Select/Select';
import { SelectContainerProps, SelectContainer as BaseSelectContainer } from '../Select/SelectContainer';
import { SelectCommonProps } from '../Select/types';
interface InlineSelectProps<T> extends SelectCommonProps<T> {
label?: string;
}
export function InlineSelect<T>({ label: labelProp, ...props }: InlineSelectProps<T>) {
const theme = useTheme2();
const [id] = useState(() => Math.random().toString(16).slice(2));
const styles = getSelectStyles(theme);
const components = {
SelectContainer,
ValueContainer,
SingleValue: ValueContainer,
};
return (
<div className={styles.root}>
{labelProp && (
<label className={styles.label} htmlFor={id}>
{labelProp}
{':'}&nbsp;
</label>
)}
{/* @ts-ignore */}
<Select openMenuOnFocus inputId={id} {...props} components={components} />
</div>
);
}
const SelectContainer = <Option, isMulti extends boolean, Group extends GroupBase<Option>>(
props: SelectContainerProps<Option, isMulti, Group>
) => {
const { children } = props;
const theme = useTheme2();
const styles = getSelectStyles(theme);
return (
<BaseSelectContainer {...props} className={cx(props.className, styles.container)}>
{children}
</BaseSelectContainer>
);
};
const ValueContainer = <Option, isMulti extends boolean, Group extends GroupBase<Option>>(
props: SelectContainerProps<Option, isMulti, Group>
) => {
const { className, children } = props;
const theme = useTheme2();
const styles = getSelectStyles(theme);
return <div className={cx(className, styles.valueContainer)}>{children}</div>;
};
const getSelectStyles = stylesFactory((theme: GrafanaTheme2) => ({
root: css({
display: 'flex',
fontSize: 12,
alignItems: 'center',
}),
label: css({
color: theme.colors.text.secondary,
whiteSpace: 'nowrap',
}),
container: css({
background: 'none',
borderColor: 'transparent',
}),
valueContainer: css({
display: 'flex',
alignItems: 'center',
flex: 'initial',
color: theme.colors.text.secondary,
fontSize: 12,
}),
}));

View File

@@ -1,54 +0,0 @@
import { css } from '@emotion/css';
import React from 'react';
import { GrafanaTheme2 } from '@grafana/data';
import { stylesFactory, useTheme2 } from '../../themes';
interface InputGroupProps {}
export const InputGroup: React.FC<InputGroupProps> = ({ children }) => {
const theme = useTheme2();
const styles = useStyles(theme);
return <div className={styles.root}>{children}</div>;
};
const useStyles = stylesFactory((theme: GrafanaTheme2) => ({
root: css({
display: 'flex',
// Style the direct children of the component
'> *': {
'&:not(:first-child)': {
// Negative margin hides the double-border on adjacent selects
marginLeft: -1,
},
'&:first-child': {
borderTopRightRadius: 0,
borderBottomRightRadius: 0,
},
'&:last-child': {
borderTopLeftRadius: 0,
borderBottomLeftRadius: 0,
},
'&:not(:first-child):not(:last-child)': {
borderRadius: 0,
},
//
position: 'relative',
zIndex: 1,
'&:hover': {
zIndex: 2,
},
'&:focus-within': {
zIndex: 2,
},
},
}),
}));

View File

@@ -1,40 +0,0 @@
import { css, cx } from '@emotion/css';
import React from 'react';
import { GrafanaTheme2 } from '@grafana/data';
import { stylesFactory, useTheme2 } from '../../themes';
export interface SpaceProps {
v?: number;
h?: number;
layout?: 'block' | 'inline';
}
export const Space = (props: SpaceProps) => {
const theme = useTheme2();
const styles = getStyles(theme, props);
return <span className={cx(styles.wrapper)} />;
};
Space.defaultProps = {
v: 0,
h: 0,
layout: 'block',
};
const getStyles = stylesFactory((theme: GrafanaTheme2, props: SpaceProps) => ({
wrapper: css([
{
paddingRight: theme.spacing(props.h ?? 0),
paddingBottom: theme.spacing(props.v ?? 0),
},
props.layout === 'inline' && {
display: 'inline-block',
},
props.layout === 'block' && {
display: 'block',
},
]),
}));

View File

@@ -1,30 +0,0 @@
import { css } from '@emotion/css';
import React, { CSSProperties } from 'react';
import { GrafanaTheme2 } from '@grafana/data';
import { stylesFactory, useTheme2 } from '../../themes';
interface StackProps {
direction?: CSSProperties['flexDirection'];
alignItems?: CSSProperties['alignItems'];
wrap?: boolean;
gap?: number;
}
export const Stack: React.FC<StackProps> = ({ children, ...props }) => {
const theme = useTheme2();
const styles = useStyles(theme, props);
return <div className={styles.root}>{children}</div>;
};
const useStyles = stylesFactory((theme: GrafanaTheme2, props: StackProps) => ({
root: css({
display: 'flex',
flexDirection: props.direction ?? 'row',
flexWrap: props.wrap ?? true ? 'wrap' : undefined,
alignItems: props.alignItems,
gap: theme.spacing(props.gap ?? 2),
}),
}));

View File

@@ -1,13 +0,0 @@
export { AccessoryButton } from './AccessoryButton';
export { EditorFieldGroup } from './EditorFieldGroup';
export { EditorHeader } from './EditorHeader';
export { EditorField } from './EditorField';
export { EditorRow } from './EditorRow';
export { EditorList } from './EditorList';
export { EditorRows } from './EditorRows';
export { EditorSwitch } from './EditorSwitch';
export { FlexItem } from './FlexItem';
export { Stack } from './Stack';
export { InlineSelect } from './InlineSelect';
export { InputGroup } from './InputGroup';
export { Space } from './Space';

View File

@@ -177,13 +177,13 @@ function getStyles(theme: GrafanaTheme2) {
code {
border: none;
display: inline;
background: ${colorManipulator.darken(tooltipBg, 0.3)};
background: ${colorManipulator.darken(tooltipBg, 0.1)};
color: ${tooltipText};
}
strong,
em {
color: ${colorManipulator.emphasize(tooltipBg)};
pre {
background: ${colorManipulator.darken(tooltipBg, 0.1)};
color: ${tooltipText};
}
a {

View File

@@ -1,6 +1,6 @@
import { css, cx } from '@emotion/css';
import React, { useState, HTMLAttributes, useMemo, useRef, useLayoutEffect } from 'react';
import useWindowSize from 'react-use/lib/useWindowSize';
import { useWindowSize } from 'react-use';
import { Dimensions2D, GrafanaTheme2 } from '@grafana/data';

View File

@@ -267,4 +267,3 @@ export * from './PanelChrome/types';
export { EmotionPerfTest } from './ThemeDemos/EmotionPerfTest';
export { Label as BrowserLabel } from './BrowserLabel/Label';
export { PanelContainer } from './PanelContainer/PanelContainer';
export * from './QueryEditor';

View File

@@ -1,8 +1,10 @@
import { Dispatch, MutableRefObject, SetStateAction } from 'react';
import { CartesianCoords2D } from '@grafana/data';
import { UPlotConfigBuilder } from '@grafana/ui';
import { positionTooltip } from '@grafana/ui/src/components/uPlot/plugins/TooltipPlugin';
import { positionTooltip } from '../plugins/TooltipPlugin';
import { UPlotConfigBuilder } from './UPlotConfigBuilder';
export type HoverEvent = {
xIndex: number;
@@ -16,14 +18,14 @@ type SetupConfigParams = {
onUPlotClick: () => void;
setFocusedSeriesIdx: Dispatch<SetStateAction<number | null>>;
setFocusedPointIdx: Dispatch<SetStateAction<number | null>>;
setCoords: Dispatch<SetStateAction<CartesianCoords2D | null>>;
setCoords: Dispatch<SetStateAction<{ viewport: CartesianCoords2D; canvas: CartesianCoords2D } | null>>;
setHover: Dispatch<SetStateAction<HoverEvent | undefined>>;
isToolTipOpen: MutableRefObject<boolean>;
};
// This applies config hooks to setup tooltip listener. Ideally this could happen in the same `prepConfig` function
// however the GraphNG structures do not allow access to the `setHover` callback
export const setupConfig = ({
export const addTooltipSupport = ({
config,
onUPlotClick,
setFocusedSeriesIdx,
@@ -32,13 +34,37 @@ export const setupConfig = ({
setHover,
isToolTipOpen,
}: SetupConfigParams): UPlotConfigBuilder => {
// Ensure tooltip is closed on config changes
isToolTipOpen.current = false;
const onMouseLeave = () => {
if (!isToolTipOpen.current) {
setCoords(null);
}
};
let ref_parent: HTMLElement | null = null;
let ref_over: HTMLElement | null = null;
config.addHook('init', (u) => {
u.root.parentElement?.addEventListener('click', onUPlotClick);
u.over.addEventListener('mouseleave', () => {
if (!isToolTipOpen.current) {
setCoords(null);
}
});
ref_parent = u.root.parentElement;
ref_over = u.over;
ref_parent?.addEventListener('click', onUPlotClick);
ref_over.addEventListener('mouseleave', onMouseLeave);
});
const clearPopupIfOpened = () => {
if (isToolTipOpen.current) {
setCoords(null);
onUPlotClick();
}
};
config.addHook('drawClear', clearPopupIfOpened);
config.addHook('destroy', () => {
ref_parent?.removeEventListener('click', onUPlotClick);
ref_over?.removeEventListener('mouseleave', onMouseLeave);
clearPopupIfOpened();
});
let rect: DOMRect;
@@ -65,7 +91,7 @@ export const setupConfig = ({
const { x, y } = positionTooltip(u, rect);
if (x !== undefined && y !== undefined && !isToolTipOpen.current) {
setCoords({ x, y });
setCoords({ canvas: { x: u.cursor.left!, y: u.cursor.top! }, viewport: { x, y } });
}
},
u

View File

@@ -1,6 +1,6 @@
{
"name": "@jaegertracing/jaeger-ui-components",
"version": "9.1.0-pre",
"version": "9.1.0",
"main": "src/index.ts",
"types": "src/index.ts",
"license": "Apache-2.0",
@@ -31,10 +31,10 @@
},
"dependencies": {
"@emotion/css": "11.9.0",
"@grafana/data": "9.1.0-pre",
"@grafana/e2e-selectors": "9.1.0-pre",
"@grafana/runtime": "9.1.0-pre",
"@grafana/ui": "9.1.0-pre",
"@grafana/data": "9.1.0",
"@grafana/e2e-selectors": "9.1.0",
"@grafana/runtime": "9.1.0",
"@grafana/ui": "9.1.0",
"chance": "^1.0.10",
"classnames": "^2.2.5",
"combokeys": "^3.0.0",

View File

@@ -52,6 +52,10 @@ case "$1" in
cp /usr/share/grafana/conf/provisioning/access-control/sample.yaml $PROVISIONING_CFG_DIR/access-control/sample.yaml
fi
if [ ! -d $PROVISIONING_CFG_DIR/alerting ]; then
mkdir -p $PROVISIONING_CFG_DIR/alerting
fi
# configuration files should not be modifiable by grafana user, as this can be a security issue
chown -Rh root:$GRAFANA_GROUP /etc/grafana/*
chmod 755 /etc/grafana

View File

@@ -60,6 +60,7 @@ RUN export GF_GID_NAME=$(getent group $GF_GID | cut -d':' -f1) && \
"$GF_PATHS_PROVISIONING/notifiers" \
"$GF_PATHS_PROVISIONING/plugins" \
"$GF_PATHS_PROVISIONING/access-control" \
"$GF_PATHS_PROVISIONING/alerting" \
"$GF_PATHS_LOGS" \
"$GF_PATHS_PLUGINS" \
"$GF_PATHS_DATA" && \

View File

@@ -45,6 +45,7 @@ RUN export GF_GID_NAME=$(getent group $GF_GID | cut -d':' -f1) && \
"$GF_PATHS_PROVISIONING/notifiers" \
"$GF_PATHS_PROVISIONING/plugins" \
"$GF_PATHS_PROVISIONING/access-control" \
"$GF_PATHS_PROVISIONING/alerting" \
"$GF_PATHS_LOGS" \
"$GF_PATHS_PLUGINS" \
"$GF_PATHS_DATA" && \

View File

@@ -66,6 +66,10 @@ if [ $1 -eq 1 ] ; then
cp /usr/share/grafana/conf/provisioning/access-control/sample.yaml $PROVISIONING_CFG_DIR/access-control/sample.yaml
fi
if [ ! -d $PROVISIONING_CFG_DIR/alerting ]; then
mkdir -p $PROVISIONING_CFG_DIR/alerting
fi
# Set user permissions on /var/log/grafana, /var/lib/grafana
mkdir -p /var/log/grafana /var/lib/grafana
chown -R $GRAFANA_USER:$GRAFANA_GROUP /var/log/grafana /var/lib/grafana

View File

@@ -1,6 +1,8 @@
package api
import (
"fmt"
"github.com/grafana/grafana/pkg/models"
"github.com/grafana/grafana/pkg/plugins"
ac "github.com/grafana/grafana/pkg/services/accesscontrol"
@@ -8,6 +10,7 @@ import (
"github.com/grafana/grafana/pkg/services/datasources"
"github.com/grafana/grafana/pkg/services/serviceaccounts"
"github.com/grafana/grafana/pkg/setting"
"github.com/grafana/grafana/pkg/tsdb/grafanads"
)
// API related actions
@@ -98,6 +101,27 @@ func (hs *HTTPServer) declareFixedRoles() error {
Grants: []string{string(models.ROLE_ADMIN)},
}
builtInDatasourceReader := ac.RoleRegistration{
Role: ac.RoleDTO{
Name: "fixed:datasources.builtin:reader",
DisplayName: "Built in data source reader",
Description: "Read and query Grafana's built in test data sources.",
Group: "Data sources",
Permissions: []ac.Permission{
{
Action: datasources.ActionRead,
Scope: fmt.Sprintf("%s%s", datasources.ScopePrefix, grafanads.DatasourceUID),
},
{
Action: datasources.ActionQuery,
Scope: fmt.Sprintf("%s%s", datasources.ScopePrefix, grafanads.DatasourceUID),
},
},
Hidden: true,
},
Grants: []string{string(models.ROLE_VIEWER)},
}
// when running oss or enterprise without a license all users should be able to query data sources
if !hs.License.FeatureEnabled("accesscontrol.enforcement") {
datasourcesReaderRole.Grants = []string{string(models.ROLE_VIEWER)}
@@ -395,7 +419,7 @@ func (hs *HTTPServer) declareFixedRoles() error {
}
return hs.AccessControl.DeclareFixedRoles(
provisioningWriterRole, datasourcesReaderRole, datasourcesWriterRole,
provisioningWriterRole, datasourcesReaderRole, builtInDatasourceReader, datasourcesWriterRole,
datasourcesIdReaderRole, orgReaderRole, orgWriterRole,
orgMaintainerRole, teamsCreatorRole, teamsWriterRole, datasourcesExplorerRole,
annotationsReaderRole, dashboardAnnotationsWriterRole, annotationsWriterRole,

View File

@@ -175,19 +175,20 @@ func (hs *HTTPServer) CreateDashboardSnapshot(c *models.ReqContext) response.Res
//
// Responses:
// 200: getDashboardSnapshotResponse
// 400: badRequestError
// 404: notFoundError
// 500: internalServerError
func (hs *HTTPServer) GetDashboardSnapshot(c *models.ReqContext) response.Response {
key := web.Params(c.Req)[":key"]
if len(key) == 0 {
return response.Error(404, "Snapshot not found", nil)
return response.Error(http.StatusBadRequest, "Empty snapshot key", nil)
}
query := &dashboardsnapshots.GetDashboardSnapshotQuery{Key: key}
err := hs.dashboardsnapshotsService.GetDashboardSnapshot(c.Req.Context(), query)
if err != nil {
return response.Error(500, "Failed to get dashboard snapshot", err)
return response.Err(err)
}
snapshot := query.Result
@@ -265,7 +266,7 @@ func (hs *HTTPServer) DeleteDashboardSnapshotByDeleteKey(c *models.ReqContext) r
query := &dashboardsnapshots.GetDashboardSnapshotQuery{DeleteKey: key}
err := hs.dashboardsnapshotsService.GetDashboardSnapshot(c.Req.Context(), query)
if err != nil {
return response.Error(500, "Failed to get dashboard snapshot", err)
return response.Err(err)
}
if query.Result.External {
@@ -306,7 +307,7 @@ func (hs *HTTPServer) DeleteDashboardSnapshot(c *models.ReqContext) response.Res
err := hs.dashboardsnapshotsService.GetDashboardSnapshot(c.Req.Context(), query)
if err != nil {
return response.Error(500, "Failed to get dashboard snapshot", err)
return response.Err(err)
}
if query.Result == nil {
return response.Error(404, "Failed to get dashboard snapshot", nil)

View File

@@ -1,6 +1,7 @@
package api
import (
"errors"
"fmt"
"net/http"
"net/http/httptest"
@@ -223,3 +224,103 @@ func TestDashboardSnapshotAPIEndpoint_singleSnapshot(t *testing.T) {
}, sqlmock)
})
}
func TestGetDashboardSnapshotNotFound(t *testing.T) {
sqlmock := mockstore.NewSQLStoreMock()
sqlmock.ExpectedTeamsByUser = []*models.TeamDTO{}
setUpSnapshotTest := func(t *testing.T) dashboardsnapshots.Service {
t.Helper()
dashSnapSvc := dashboardsnapshots.NewMockService(t)
dashSnapSvc.
On("GetDashboardSnapshot", mock.Anything, mock.AnythingOfType("*dashboardsnapshots.GetDashboardSnapshotQuery")).
Run(func(args mock.Arguments) {}).
Return(dashboardsnapshots.ErrBaseNotFound.Errorf(""))
return dashSnapSvc
}
loggedInUserScenarioWithRole(t,
"GET /snapshots/{key} should return 404 when the snapshot does not exist", "GET",
"/api/snapshots/12345", "/api/snapshots/:key", models.ROLE_EDITOR, func(sc *scenarioContext) {
d := setUpSnapshotTest(t)
hs := &HTTPServer{dashboardsnapshotsService: d}
sc.handlerFunc = hs.GetDashboardSnapshot
sc.fakeReqWithParams("GET", sc.url, map[string]string{"key": "12345"}).exec()
assert.Equal(t, http.StatusNotFound, sc.resp.Code)
}, sqlmock)
loggedInUserScenarioWithRole(t,
"DELETE /snapshots/{key} should return 404 when the snapshot does not exist", "DELETE",
"/api/snapshots/12345", "/api/snapshots/:key", models.ROLE_EDITOR, func(sc *scenarioContext) {
d := setUpSnapshotTest(t)
hs := &HTTPServer{dashboardsnapshotsService: d}
sc.handlerFunc = hs.DeleteDashboardSnapshot
sc.fakeReqWithParams("DELETE", sc.url, map[string]string{"key": "12345"}).exec()
assert.Equal(t, http.StatusNotFound, sc.resp.Code)
}, sqlmock)
loggedInUserScenarioWithRole(t,
"GET /snapshots-delete/{deleteKey} should return 404 when the snapshot does not exist", "DELETE",
"/api/snapshots-delete/12345", "/api/snapshots-delete/:deleteKey", models.ROLE_EDITOR, func(sc *scenarioContext) {
d := setUpSnapshotTest(t)
hs := &HTTPServer{dashboardsnapshotsService: d}
sc.handlerFunc = hs.DeleteDashboardSnapshotByDeleteKey
sc.fakeReqWithParams("DELETE", sc.url, map[string]string{"deleteKey": "12345"}).exec()
assert.Equal(t, http.StatusNotFound, sc.resp.Code)
}, sqlmock)
}
func TestGetDashboardSnapshotFailure(t *testing.T) {
sqlmock := mockstore.NewSQLStoreMock()
sqlmock.ExpectedTeamsByUser = []*models.TeamDTO{}
setUpSnapshotTest := func(t *testing.T) dashboardsnapshots.Service {
t.Helper()
dashSnapSvc := dashboardsnapshots.NewMockService(t)
dashSnapSvc.
On("GetDashboardSnapshot", mock.Anything, mock.AnythingOfType("*dashboardsnapshots.GetDashboardSnapshotQuery")).
Run(func(args mock.Arguments) {}).
Return(errors.New("something went wrong"))
return dashSnapSvc
}
loggedInUserScenarioWithRole(t,
"GET /snapshots/{key} should return 404 when the snapshot does not exist", "GET",
"/api/snapshots/12345", "/api/snapshots/:key", models.ROLE_EDITOR, func(sc *scenarioContext) {
d := setUpSnapshotTest(t)
hs := &HTTPServer{dashboardsnapshotsService: d}
sc.handlerFunc = hs.GetDashboardSnapshot
sc.fakeReqWithParams("GET", sc.url, map[string]string{"key": "12345"}).exec()
assert.Equal(t, http.StatusInternalServerError, sc.resp.Code)
}, sqlmock)
loggedInUserScenarioWithRole(t,
"DELETE /snapshots/{key} should return 404 when the snapshot does not exist", "DELETE",
"/api/snapshots/12345", "/api/snapshots/:key", models.ROLE_EDITOR, func(sc *scenarioContext) {
d := setUpSnapshotTest(t)
hs := &HTTPServer{dashboardsnapshotsService: d}
sc.handlerFunc = hs.DeleteDashboardSnapshot
sc.fakeReqWithParams("DELETE", sc.url, map[string]string{"key": "12345"}).exec()
assert.Equal(t, http.StatusInternalServerError, sc.resp.Code)
}, sqlmock)
loggedInUserScenarioWithRole(t,
"GET /snapshots-delete/{deleteKey} should return 404 when the snapshot does not exist", "DELETE",
"/api/snapshots-delete/12345", "/api/snapshots-delete/:deleteKey", models.ROLE_EDITOR, func(sc *scenarioContext) {
d := setUpSnapshotTest(t)
hs := &HTTPServer{dashboardsnapshotsService: d}
sc.handlerFunc = hs.DeleteDashboardSnapshotByDeleteKey
sc.fakeReqWithParams("DELETE", sc.url, map[string]string{"deleteKey": "12345"}).exec()
assert.Equal(t, http.StatusInternalServerError, sc.resp.Code)
}, sqlmock)
}

View File

@@ -108,6 +108,7 @@ func (hs *HTTPServer) getFrontendSettingsMap(c *models.ReqContext) (map[string]i
"autoAssignOrg": setting.AutoAssignOrg,
"verifyEmailEnabled": setting.VerifyEmailEnabled,
"sigV4AuthEnabled": setting.SigV4AuthEnabled,
"azureAuthEnabled": setting.AzureAuthEnabled,
"rbacEnabled": hs.Cfg.RBACEnabled,
"rbacBuiltInRoleAssignmentEnabled": hs.Cfg.RBACBuiltInRoleAssignmentEnabled,
"exploreEnabled": setting.ExploreEnabled,

View File

@@ -127,6 +127,20 @@ func executeServer(configFile, homePath, pidFile, packaging string, traceDiagnos
}
}()
defer func() {
// If we've managed to initialize them, this is the last place
// where we're able to log anything that'll end up in Grafana's
// log files.
// Since operators are not always looking at stderr, we'll try
// to log any and all panics that are about to crash Grafana to
// our regular log locations before exiting.
if r := recover(); r != nil {
reason := fmt.Sprintf("%v", r)
clilog.Error("Critical error", "reason", reason, "stackTrace", string(debug.Stack()))
panic(r)
}
}()
if traceDiagnostics.enabled {
fmt.Println("diagnostics: tracing enabled", "file", traceDiagnostics.file)
f, err := os.Create(traceDiagnostics.file)

View File

@@ -66,7 +66,7 @@ func (kv *kvStoreSQL) Set(ctx context.Context, orgId int64, namespace string, ke
item.Updated = time.Now()
if has {
_, err = dbSession.ID(item.Id).Update(&item)
_, err = dbSession.Exec("UPDATE kv_store SET value = ?, updated = ? WHERE id = ?", item.Value, item.Updated, item.Id)
if err != nil {
kv.log.Debug("error updating kvstore value", "orgId", orgId, "namespace", namespace, "key", key, "value", value, "err", err)
} else {

View File

@@ -96,11 +96,11 @@ func (ots *Opentelemetry) parseSettingsOpentelemetry() error {
ots.enabled = noopExporter
ots.address = section.Key("address").MustString("")
ots.propagation = section.Key("propagation").MustString("")
if ots.address != "" {
ots.enabled = jaegerExporter
return nil
}
ots.propagation = section.Key("propagation").MustString("")
section, err = ots.Cfg.Raw.GetSection("tracing.opentelemetry.otlp")
if err != nil {
@@ -234,7 +234,7 @@ func (ots *Opentelemetry) Run(ctx context.Context) error {
}
func (ots *Opentelemetry) Start(ctx context.Context, spanName string, opts ...trace.SpanStartOption) (context.Context, Span) {
ctx, span := ots.tracer.Start(ctx, spanName)
ctx, span := ots.tracer.Start(ctx, spanName, opts...)
opentelemetrySpan := OpentelemetrySpan{
span: span,
}

View File

@@ -73,7 +73,7 @@ func RequestTracing(tracer tracing.Tracer) web.Handler {
rw := res.(web.ResponseWriter)
wireContext := otel.GetTextMapPropagator().Extract(req.Context(), propagation.HeaderCarrier(req.Header))
ctx, span := tracer.Start(req.Context(), fmt.Sprintf("HTTP %s %s", req.Method, req.URL.Path), trace.WithLinks(trace.LinkFromContext(wireContext)))
ctx, span := tracer.Start(wireContext, fmt.Sprintf("HTTP %s %s", req.Method, req.URL.Path), trace.WithLinks(trace.LinkFromContext(wireContext)))
c.Req = req.WithContext(ctx)
c.Next()

View File

@@ -26,8 +26,7 @@ func (s *AccessControlStore) GetUserPermissions(ctx context.Context, query acces
err := s.sql.WithDbSession(ctx, func(sess *sqlstore.DBSession) error {
filter, params := userRolesFilter(query.OrgID, query.UserID, query.Roles)
// TODO: optimize this
q := `SELECT DISTINCT
q := `SELECT
permission.action,
permission.scope
FROM permission
@@ -45,10 +44,6 @@ func (s *AccessControlStore) GetUserPermissions(ctx context.Context, query acces
}
}
q += `
ORDER BY permission.scope
`
if err := sess.SQL(q, params...).Find(&result); err != nil {
return err
}
@@ -61,7 +56,7 @@ func (s *AccessControlStore) GetUserPermissions(ctx context.Context, query acces
func userRolesFilter(orgID, userID int64, roles []string) (string, []interface{}) {
q := `
WHERE role.id IN (
INNER JOIN (
SELECT ur.role_id
FROM user_role AS ur
WHERE ur.user_id = ?
@@ -87,7 +82,7 @@ func userRolesFilter(orgID, userID int64, roles []string) (string, []interface{}
params = append(params, orgID, globalOrgID)
}
q += `)`
q += `) as all_role ON role.id = all_role.role_id`
return q, params
}

View File

@@ -21,6 +21,7 @@ func (s *CorrelationsService) registerAPIEndpoints() {
s.RouteRegister.Group("/api/datasources/uid/:uid/correlations", func(entities routing.RouteRegister) {
entities.Post("/", middleware.ReqSignedIn, authorize(ac.ReqOrgAdmin, ac.EvalPermission(datasources.ActionWrite, uidScope)), routing.Wrap(s.createHandler))
entities.Delete("/:correlationUID", middleware.ReqSignedIn, authorize(ac.ReqOrgAdmin, ac.EvalPermission(datasources.ActionWrite, uidScope)), routing.Wrap(s.deleteHandler))
entities.Patch("/:correlationUID", middleware.ReqSignedIn, authorize(ac.ReqOrgAdmin, ac.EvalPermission(datasources.ActionWrite, uidScope)), routing.Wrap(s.updateHandler))
})
}
@@ -127,3 +128,66 @@ type DeleteCorrelationResponse struct {
// in: body
Body DeleteCorrelationResponseBody `json:"body"`
}
// swagger:route PATCH /datasources/uid/{sourceUID}/correlations/{correlationUID} correlations updateCorrelation
//
// Updates a correlation.
//
// Responses:
// 200: updateCorrelationResponse
// 400: badRequestError
// 401: unauthorisedError
// 403: forbiddenError
// 404: notFoundError
// 500: internalServerError
func (s *CorrelationsService) updateHandler(c *models.ReqContext) response.Response {
cmd := UpdateCorrelationCommand{}
if err := web.Bind(c.Req, &cmd); err != nil {
return response.Error(http.StatusBadRequest, "bad request data", err)
}
cmd.UID = web.Params(c.Req)[":correlationUID"]
cmd.SourceUID = web.Params(c.Req)[":uid"]
cmd.OrgId = c.OrgId
correlation, err := s.UpdateCorrelation(c.Req.Context(), cmd)
if err != nil {
if errors.Is(err, ErrUpdateCorrelationEmptyParams) {
return response.Error(http.StatusBadRequest, "At least one of label, description is required", err)
}
if errors.Is(err, ErrSourceDataSourceDoesNotExists) {
return response.Error(http.StatusNotFound, "Data source not found", err)
}
if errors.Is(err, ErrCorrelationNotFound) {
return response.Error(http.StatusNotFound, "Correlation not found", err)
}
if errors.Is(err, ErrSourceDataSourceReadOnly) {
return response.Error(http.StatusForbidden, "Data source is read only", err)
}
return response.Error(http.StatusInternalServerError, "Failed to update correlation", err)
}
return response.JSON(http.StatusOK, UpdateCorrelationResponseBody{Message: "Correlation updated", Result: correlation})
}
// swagger:parameters updateCorrelation
type UpdateCorrelationParams struct {
// in:path
// required:true
DatasourceUID string `json:"sourceUID"`
// in:path
// required:true
CorrelationUID string `json:"correlationUID"`
// in: body
Body UpdateCorrelationCommand `json:"body"`
}
//swagger:response updateCorrelationResponse
type UpdateCorrelationResponse struct {
// in: body
Body UpdateCorrelationResponseBody `json:"body"`
}

View File

@@ -52,6 +52,10 @@ func (s CorrelationsService) DeleteCorrelation(ctx context.Context, cmd DeleteCo
return s.deleteCorrelation(ctx, cmd)
}
func (s CorrelationsService) UpdateCorrelation(ctx context.Context, cmd UpdateCorrelationCommand) (Correlation, error) {
return s.updateCorrelation(ctx, cmd)
}
func (s CorrelationsService) DeleteCorrelationsBySourceUID(ctx context.Context, cmd DeleteCorrelationsBySourceUIDCommand) error {
return s.deleteCorrelationsBySourceUID(ctx, cmd)
}

View File

@@ -77,6 +77,61 @@ func (s CorrelationsService) deleteCorrelation(ctx context.Context, cmd DeleteCo
})
}
func (s CorrelationsService) updateCorrelation(ctx context.Context, cmd UpdateCorrelationCommand) (Correlation, error) {
correlation := Correlation{
UID: cmd.UID,
SourceUID: cmd.SourceUID,
}
err := s.SQLStore.WithTransactionalDbSession(ctx, func(session *sqlstore.DBSession) error {
query := &datasources.GetDataSourceQuery{
OrgId: cmd.OrgId,
Uid: cmd.SourceUID,
}
if err := s.DataSourceService.GetDataSource(ctx, query); err != nil {
return ErrSourceDataSourceDoesNotExists
}
if query.Result.ReadOnly {
return ErrSourceDataSourceReadOnly
}
if cmd.Label == nil && cmd.Description == nil {
return ErrUpdateCorrelationEmptyParams
}
update := Correlation{}
if cmd.Label != nil {
update.Label = *cmd.Label
session.MustCols("label")
}
if cmd.Description != nil {
update.Description = *cmd.Description
session.MustCols("description")
}
updateCount, err := session.Where("uid = ? AND source_uid = ?", correlation.UID, correlation.SourceUID).Limit(1).Update(update)
if updateCount == 0 {
return ErrCorrelationNotFound
}
if err != nil {
return err
}
found, err := session.Get(&correlation)
if !found {
return ErrCorrelationNotFound
}
return err
})
if err != nil {
return Correlation{}, err
}
return correlation, nil
}
func (s CorrelationsService) deleteCorrelationsBySourceUID(ctx context.Context, cmd DeleteCorrelationsBySourceUIDCommand) error {
return s.SQLStore.WithDbSession(ctx, func(session *sqlstore.DBSession) error {
_, err := session.Delete(&Correlation{SourceUID: cmd.SourceUID})

View File

@@ -9,8 +9,8 @@ var (
ErrSourceDataSourceDoesNotExists = errors.New("source data source does not exist")
ErrTargetDataSourceDoesNotExists = errors.New("target data source does not exist")
ErrCorrelationFailedGenerateUniqueUid = errors.New("failed to generate unique correlation UID")
ErrCorrelationIdentifierNotSet = errors.New("source identifier and org id are needed to be able to edit correlations")
ErrCorrelationNotFound = errors.New("correlation not found")
ErrUpdateCorrelationEmptyParams = errors.New("not enough parameters to edit correlation")
)
// Correlation is the model for correlations definitions
@@ -72,6 +72,28 @@ type DeleteCorrelationCommand struct {
OrgId int64
}
// swagger:model
type UpdateCorrelationResponseBody struct {
Result Correlation `json:"result"`
// example: Correlation updated
Message string `json:"message"`
}
// UpdateCorrelationCommand is the command for updating a correlation
type UpdateCorrelationCommand struct {
// UID of the correlation to be deleted.
UID string `json:"-"`
SourceUID string `json:"-"`
OrgId int64 `json:"-"`
// Optional label identifying the correlation
// example: My label
Label *string `json:"label"`
// Optional description of the correlation
// example: Logs to Traces
Description *string `json:"description"`
}
type DeleteCorrelationsBySourceUIDCommand struct {
SourceUID string
}

View File

@@ -130,6 +130,10 @@ func NewDashboardUIDScopeResolver(db Store) (string, ac.ScopeAttributeResolver)
func resolveDashboardScope(ctx context.Context, db Store, orgID int64, dashboard *models.Dashboard) ([]string, error) {
var folderUID string
if dashboard.FolderId < 0 {
return []string{ScopeDashboardsProvider.GetResourceScopeUID(dashboard.Uid)}, nil
}
if dashboard.FolderId == 0 {
folderUID = ac.GeneralFolderUID
} else {
@@ -139,6 +143,7 @@ func resolveDashboardScope(ctx context.Context, db Store, orgID int64, dashboard
}
folderUID = folder.Uid
}
return []string{
ScopeDashboardsProvider.GetResourceScopeUID(dashboard.Uid),
ScopeFoldersProvider.GetResourceScopeUID(folderUID),

View File

@@ -102,7 +102,7 @@ func (d *DashboardStore) HasEditPermissionInFolders(ctx context.Context, query *
return nil
}
builder := &sqlstore.SQLBuilder{}
builder := sqlstore.NewSqlBuilder(d.sqlStore.Cfg)
builder.Write("SELECT COUNT(dashboard.id) AS count FROM dashboard WHERE dashboard.org_id = ? AND dashboard.is_folder = ?",
query.SignedInUser.OrgId, d.dialect.BooleanStr(true))
builder.WriteDashboardPermissionFilter(query.SignedInUser, models.PERMISSION_EDIT)
@@ -130,7 +130,7 @@ func (d *DashboardStore) HasAdminPermissionInDashboardsOrFolders(ctx context.Con
return nil
}
builder := &sqlstore.SQLBuilder{}
builder := sqlstore.NewSqlBuilder(d.sqlStore.Cfg)
builder.Write("SELECT COUNT(dashboard.id) AS count FROM dashboard WHERE dashboard.org_id = ?", query.SignedInUser.OrgId)
builder.WriteDashboardPermissionFilter(query.SignedInUser, models.PERMISSION_ADMIN)

View File

@@ -91,7 +91,7 @@ func (d *DashboardSnapshotStore) GetDashboardSnapshot(ctx context.Context, query
if err != nil {
return err
} else if !has {
return dashboardsnapshots.ErrDashboardSnapshotNotFound
return dashboardsnapshots.ErrBaseNotFound.Errorf("dashboard snapshot not found")
}
query.Result = &snapshot

View File

@@ -1,8 +1,7 @@
package dashboardsnapshots
import "github.com/grafana/grafana/pkg/services/dashboards"
import (
"github.com/grafana/grafana/pkg/util/errutil"
)
var ErrDashboardSnapshotNotFound = dashboards.DashboardErr{
Reason: "Dashboard snapshot not found",
StatusCode: 404,
}
var ErrBaseNotFound = errutil.NewBase(errutil.StatusNotFound, "dashboardsnapshots.not-found", errutil.WithPublicMessage("Snapshot not found"))

View File

@@ -68,11 +68,6 @@ var (
State: FeatureStateAlpha,
FrontendOnly: true,
},
{
Name: "prometheus_azure_auth",
Description: "Experimental. Azure authentication for Prometheus datasource",
State: FeatureStateBeta,
},
{
Name: "prometheusAzureOverrideAudience",
Description: "Experimental. Allow override default AAD audience for Azure Prometheus endpoint",

View File

@@ -51,10 +51,6 @@ const (
// Show APM table
FlagTempoApmTable = "tempoApmTable"
// FlagPrometheusAzureAuth
// Experimental. Azure authentication for Prometheus datasource
FlagPrometheusAzureAuth = "prometheus_azure_auth"
// FlagPrometheusAzureOverrideAudience
// Experimental. Allow override default AAD audience for Azure Prometheus endpoint
FlagPrometheusAzureOverrideAudience = "prometheusAzureOverrideAudience"

View File

@@ -24,7 +24,6 @@ func TestFeatureToggleFiles(t *testing.T) {
"live-config": true,
"live-pipeline": true,
"live-service-web-worker": true,
"prometheus_azure_auth": true,
}
t.Run("verify files", func(t *testing.T) {

View File

@@ -10,7 +10,6 @@ import (
func TestFeatureUsageStats(t *testing.T) {
featureManagerWithAllFeatures := WithFeatures(
"trimDefaults",
"httpclientprovider_azure_auth",
"database_metrics",
"dashboardPreviews",
"live-config",
@@ -20,13 +19,12 @@ func TestFeatureUsageStats(t *testing.T) {
)
require.Equal(t, map[string]interface{}{
"stats.features.trim_defaults.count": 1,
"stats.features.httpclientprovider_azure_auth.count": 1,
"stats.features.database_metrics.count": 1,
"stats.features.dashboard_previews.count": 1,
"stats.features.live_config.count": 1,
"stats.features.show_feature_flags_in_ui.count": 1,
"stats.features.upper_snake_case.count": 1,
"stats.features.feature_with_a_dot.count": 1,
"stats.features.trim_defaults.count": 1,
"stats.features.database_metrics.count": 1,
"stats.features.dashboard_previews.count": 1,
"stats.features.live_config.count": 1,
"stats.features.show_feature_flags_in_ui.count": 1,
"stats.features.upper_snake_case.count": 1,
"stats.features.feature_with_a_dot.count": 1,
}, featureManagerWithAllFeatures.GetUsageStats(context.Background()))
}

View File

@@ -28,7 +28,12 @@ SELECT DISTINCT
, (SELECT COUNT(connection_id) FROM ` + models.LibraryElementConnectionTableName + ` WHERE element_id = le.id AND kind=1) AS connected_dashboards`
)
const deleteInvalidConnections = "DELETE FROM library_element_connection WHERE connection_id IN (SELECT connection_id as id FROM library_element_connection WHERE element_id=? EXCEPT SELECT id from dashboard)"
const deleteInvalidConnections = `
DELETE FROM library_element_connection
WHERE connection_id IN (
SELECT connection_id as id FROM library_element_connection
WHERE element_id=? AND connection_id NOT IN (SELECT id as connection_id from dashboard)
)`
func getFromLibraryElementDTOWithMeta(dialect migrator.Dialect) string {
user := dialect.Quote("user")
@@ -218,7 +223,7 @@ func (l *LibraryElementService) deleteLibraryElement(c context.Context, signedIn
func getLibraryElements(c context.Context, store *sqlstore.SQLStore, signedInUser *models.SignedInUser, params []Pair) ([]LibraryElementDTO, error) {
libraryElements := make([]LibraryElementWithMeta, 0)
err := store.WithDbSession(c, func(session *sqlstore.DBSession) error {
builder := sqlstore.SQLBuilder{}
builder := sqlstore.NewSqlBuilder(store.Cfg)
builder.Write(selectLibraryElementDTOWithMeta)
builder.Write(", 'General' as folder_name ")
builder.Write(", '' as folder_uid ")
@@ -322,7 +327,7 @@ func (l *LibraryElementService) getAllLibraryElements(c context.Context, signedI
return LibraryElementSearchResult{}, folderFilter.parseError
}
err := l.SQLStore.WithDbSession(c, func(session *sqlstore.DBSession) error {
builder := sqlstore.SQLBuilder{}
builder := sqlstore.NewSqlBuilder(l.Cfg)
if folderFilter.includeGeneralFolder {
builder.Write(selectLibraryElementDTOWithMeta)
builder.Write(", 'General' as folder_name ")
@@ -556,7 +561,7 @@ func (l *LibraryElementService) getConnections(c context.Context, signedInUser *
return err
}
var libraryElementConnections []libraryElementConnectionWithMeta
builder := sqlstore.SQLBuilder{}
builder := sqlstore.NewSqlBuilder(l.Cfg)
builder.Write("SELECT lec.*, u1.login AS created_by_name, u1.email AS created_by_email, dashboard.uid AS connection_uid")
builder.Write(" FROM " + models.LibraryElementConnectionTableName + " AS lec")
builder.Write(" LEFT JOIN " + l.SQLStore.Dialect.Quote("user") + " AS u1 ON lec.created_by = u1.id")
@@ -591,7 +596,7 @@ func (l *LibraryElementService) getConnections(c context.Context, signedInUser *
return connections, err
}
//getElementsForDashboardID gets all elements for a specific dashboard
// getElementsForDashboardID gets all elements for a specific dashboard
func (l *LibraryElementService) getElementsForDashboardID(c context.Context, dashboardID int64) (map[string]LibraryElementDTO, error) {
libraryElementMap := make(map[string]LibraryElementDTO)
err := l.SQLStore.WithDbSession(c, func(session *sqlstore.DBSession) error {
@@ -648,10 +653,6 @@ func (l *LibraryElementService) getElementsForDashboardID(c context.Context, das
// connectElementsToDashboardID adds connections for all elements Library Elements in a Dashboard.
func (l *LibraryElementService) connectElementsToDashboardID(c context.Context, signedInUser *models.SignedInUser, elementUIDs []string, dashboardID int64) error {
if err := l.requireEditPermissionsOnDashboard(c, signedInUser, dashboardID); err != nil {
return err
}
err := l.SQLStore.WithTransactionalDbSession(c, func(session *sqlstore.DBSession) error {
_, err := session.Exec("DELETE FROM "+models.LibraryElementConnectionTableName+" WHERE kind=1 AND connection_id=?", dashboardID)
if err != nil {

View File

@@ -72,17 +72,3 @@ func (l *LibraryElementService) requireViewPermissionsOnFolder(ctx context.Conte
return nil
}
func (l *LibraryElementService) requireEditPermissionsOnDashboard(ctx context.Context, user *models.SignedInUser, dashboardID int64) error {
g := guardian.New(ctx, dashboardID, user.OrgId, user)
canEdit, err := g.CanEdit()
if err != nil {
return err
}
if !canEdit {
return dashboards.ErrDashboardUpdateAccessDenied
}
return nil
}

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