Compare commits

...

2853 Commits

Author SHA1 Message Date
Timur Olzhabayev
fd67ab151d fix(dashboard version service): add DashboardUID to query and respons… (#63821)
fix(dashboard version service): add DashboardUID to query and responses (#60800)

* fix(dashboard version service): add DashboardUID to query and responses

The DashboardUID was not populated in the response from Get and ListDashboardVersions. This adds the DashboardUID to the Get query (it was already in List) and populated the DashboardUID in the returned DashboardVersionDTOs.

(cherry picked from commit 42be0e106f)

Co-authored-by: Kristin Laemmert <mildwonkey@users.noreply.github.com>
2023-02-27 16:07:24 -06:00
Grot (@grafanabot)
27a6d700f8 [v9.4.x] InfluxDB: Fix getting empty response when querying fields with retention policy (#63671)
InfluxDB: Fix getting empty response when querying fields with retention policy (#63669)

Revert "InfluxDB: Send retention policy with InfluxQL queries if its been specified. (#62149)"

This reverts commit a5a85e0398.

(cherry picked from commit ffed779879)

Co-authored-by: ismail simsek <ismailsimsek09@gmail.com>
(cherry picked from commit 3e30c2024c)
2023-02-23 13:58:53 -06:00
Grot (@grafanabot)
fcd658359c [v9.4.x] InfluxDB datasource: Query variable breaks trying to interpolate __interval (#63685)
InfluxDB ds: Query variable breaks trying to interpolate `__interval` (#63682)

(cherry picked from commit ca4cd85504)

Co-authored-by: Ivan Ortega Alba <ivanortegaalba@gmail.com>
(cherry picked from commit 30f3f63bd6)
2023-02-23 13:57:45 -06:00
Grot (@grafanabot)
3d99babd0f Release: Bump version to 9.4.1 (#773)
"Release: Updated versions in package to 9.4.1"
2023-02-23 07:56:57 +01:00
Grot (@grafanabot)
1ffc7860e6 [v9.4.x] MSSQL Datasource: Revert functions within macros change (#63598)
MSSQL Datasource: Revert functions within macros change (#63592)

* Revert functions within macros change
* Add tests for function and macro for mssql
* Remove macro support tests

---------

Co-authored-by: Oscar Kilhed <oscar.kilhed@grafana.com>
(cherry picked from commit 356e2e1933)

Co-authored-by: Kyle Cunningham <codeincarnate@users.noreply.github.com>
2023-02-23 07:43:27 +01:00
Horst Gutmann
955b931756 [9.4.x] CI: Running Redis integration tests without grabpl (#63028) (#63074)
This restores some changes from
https://github.com/grafana/grafana/pull/61920 that were accidentally
deleted.

(cherry picked from commit 2804acd264)
2023-02-21 07:56:25 +01:00
Grot (@grafanabot)
afb449e8a1 [v9.4.x] Fix MSSQL queries failing because of bad interpolation (#63172)
Fix MSSQL queries failing because of bad interpolation (#63167)

fix failing mssql queries

(cherry picked from commit 62b078e4e4)

Co-authored-by: Victor Marin <36818606+mdvictor@users.noreply.github.com>
2023-02-21 07:23:25 +01:00
Grot (@grafanabot)
3bf22fcb21 [v9.4.x] SAML: Update library (fix single logout) (#62933)
SAML: Update library (fix single logout) (#62880)

* SAML: update library (fix single logout)

* Run go mod tidy

(cherry picked from commit 5205cfb11c)

Co-authored-by: Alexander Zobnin <alexanderzobnin@gmail.com>
(cherry picked from commit 8e9fb8cf93)
2023-02-06 10:41:47 +02:00
Grot (@grafanabot)
8ad6df8266 [v9.4.x] TraceView: Add key and url escaping of json tag values (#761)
TraceView: Add key and url escaping of json tag values (#751)

(cherry picked from commit 8b53b448bc24fbfc4492ce1f4e2b1708218f70b7)

Co-authored-by: Andrej Ocenas <mr.ocenas@gmail.com>
2023-02-03 11:53:22 -06:00
Grot (@grafanabot)
a6370342b0 [v9.4.x] Geomap: Sanitize the attribution string (#755)
Geomap: Sanitize the attribution string (#745)

* SAML: Update grafana/saml library (#691)

Co-authored-by: jguer <joao.guerreiro@grafana.com>

* SVG: Add dompurify preprocessor step (#698)

* add sanitized SVG component

* add sanitize

* Fix frontend build

* Remove unnecessary yarn.lock changes

* Fix formatting

* Re-add yarn.lock message as I guess it is needed

---------

Co-authored-by: dsotirakis <dimitrios.sotirakis@grafana.com>
Co-authored-by: jguer <joao.guerreiro@grafana.com>
Co-authored-by: nmarrs <nathanielmarrs@gmail.com>
Co-authored-by: Drew Slobodnjak <60050885+drew08t@users.noreply.github.com>
(cherry picked from commit 37b4af7ffacfc24d5f24d190356a9ef32d99aa6f)

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2023-02-03 11:53:22 -06:00
Grot (@grafanabot)
6895e75f70 [v9.4.x] Canvas: Support color themes for arrows (#62896)
Canvas: Support color themes for arrows (#62829)

(cherry picked from commit db953c9a9c)

Co-authored-by: Drew Slobodnjak <60050885+drew08t@users.noreply.github.com>
2023-02-03 12:47:27 -05:00
Grot (@grafanabot)
4f826bc76c [v9.4.x] Canvas: Improve anchor UX (#62898)
Canvas: Improve anchor UX (#62409)

Co-authored-by: nmarrs <nathanielmarrs@gmail.com>
(cherry picked from commit bbb572e73f)

Co-authored-by: Drew Slobodnjak <60050885+drew08t@users.noreply.github.com>
2023-02-03 12:09:51 -05:00
Grot (@grafanabot)
efaf4f5e09 [v9.4.x] Canvas: Update server element design (#62897)
Canvas: Update server element design (#62832)

(cherry picked from commit 43ce077133)

Co-authored-by: Drew Slobodnjak <60050885+drew08t@users.noreply.github.com>
2023-02-03 12:07:29 -05:00
Grot (@grafanabot)
907381ed5c [v9.4.x] MSSQL: Add support for macro function calls (#62890)
MSSQL: Add support for macro function calls (#62742)

* MSSQL: Add support for macro function calls

* Add tests

(cherry picked from commit 9fc3b360a4)

Co-authored-by: Victor Marin <36818606+mdvictor@users.noreply.github.com>
2023-02-03 11:03:24 -05:00
Grot (@grafanabot)
8c9cb8e839 [v9.4.x] PanelChrome: Implement hover header (#62875)
PanelChrome: Implement hover header (#61774)

Closes #59078

Co-authored-by: polinaboneva <polina.boneva@grafana.com>
Co-authored-by: Ivan Ortega <ivanortegaalba@gmail.com>
Co-authored-by: Alexandra Vargas <alexa1866@gmail.com>
(cherry picked from commit 40ec4ef5b8)

Co-authored-by: kay delaney <45561153+kaydelaney@users.noreply.github.com>
2023-02-03 15:30:08 +00:00
Grot (@grafanabot)
028cc7e72b [v9.4.x] Navigation: move Connections plugin to be just after apps (#62871)
Navigation: move Connections plugin to be just after apps (#62801)

move connections plugin to be just after apps

(cherry picked from commit c819e95687)

Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2023-02-03 09:06:18 -05:00
Grot (@grafanabot)
00555606d5 [v9.4.x] Search: Fix not being able to clear sort value (#62869)
Search: Fix not being able to clear sort value (#62557)

* user essentials mob! 🔱

lastFile:public/app/features/search/state/SearchStateManager.ts

* user essentials mob! 🔱

lastFile:public/app/features/search/page/components/ActionRow.tsx

* user essentials mob! 🔱

* remove searchSort state from localStorage when cleared

---------

Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
Co-authored-by: Joao Silva <joao.silva@grafana.com>
(cherry picked from commit f8809eef59)

Co-authored-by: Josh Hunt <joshhunt@users.noreply.github.com>
2023-02-03 08:51:47 -05:00
Grot (@grafanabot)
9cf5b4eb9e [v9.4.x] Tempo: Fix span name being dropped from the query (#62846)
Tempo: Fix span name being dropped from the query (#62257)

(cherry picked from commit c3b476e1dc)

Co-authored-by: Hamas Shafiq <hamas.shafiq@grafana.com>
2023-02-03 05:34:09 -05:00
Grot (@grafanabot)
8637518540 [v9.4.x] Added pageZoomLevel option to image renderer setup documentation (#62842)
Added pageZoomLevel option to image renderer setup documentation (#59472)

* Added pageZoomLevel option to image renderer setup

* Update _index.md

* Update docs/sources/setup-grafana/image-rendering/_index.md

* chore: prettier run in docs

---------

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
(cherry picked from commit 8b017f5aa4)

Co-authored-by: Gabriel Goller <gabrielgoller123@gmail.com>
2023-02-03 10:25:14 +01:00
Grot (@grafanabot)
0c27df8b8c [v9.4.x] Alerting docs: updates to alert rules docs for 9.4 (#62810)
Alerting docs: updates to alert rules docs for 9.4 (#62744)

* Alerting docs: updates to alert rules docs for 9.4

* Adds updates to oncall contact point and pause alerts

* Adds view read-only query update 9.4

(cherry picked from commit d19803a0f0)

Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com>
2023-02-03 07:17:00 +00:00
Grot (@grafanabot)
8fd1547edb [v9.4.x] Alerting: Add label query parameters to state history endpoint (#62835)
Alerting: Add label query parameters to state history endpoint (#62831)

* Allow equality-only matching of arbitrary labels via query params

* Pre-initialize map

(cherry picked from commit 9eeea8f5ea)

Co-authored-by: Alexander Weaver <weaver.alex.d@gmail.com>
2023-02-02 23:14:16 +00:00
Alexander Weaver
21f204d35a Alerting: implement loki query for alert state history (#62833)
Alerting: implement loki query for alert state history (#61992)

* Alerting: implement loki query for alert state history

* extract selector building

* add unit tests for selector creation

* backup

* give selectors their own type

* build dataframe

* add some tests

* small changes after manual testing

* use struct client

* golint

* more golint

* Make RuleUID optional for Loki implementation

* Drop initial assumption that we only have one series

* Pare down to three columns, fix timestamp overflows, improve failure cases in loki responses

* Embed structred log lines in the dataframe as objects rather than json strings

* Include state history label filter

* Remove dead code

---------

Co-authored-by: Jean-Philippe Quéméner <JohnnyQQQQ@users.noreply.github.com>
2023-02-02 16:56:26 -06:00
Grot (@grafanabot)
84da688400 [v9.4.x] Alerting: Pause dash alerts on migration (#62830)
Alerting: Pause dash alerts on migration (#62798)

* Alerting: Pause dash alerts on migration

(cherry picked from commit f49efa6e27)

Co-authored-by: George Robinson <george.robinson@grafana.com>
2023-02-02 22:07:06 +00:00
Grot (@grafanabot)
b742567ade [v9.4.x] Alerting: Fix template validation in provisioning api (#62825)
Alerting: Fix template validation in provisioning api (#62530)

* Alerting: Fix template validation in provisioning api

Fix issue where provisioning API accepts a malformed template having extra
text outside of definition block and template name matching definition name.

(cherry picked from commit f9ec16e74f)

Co-authored-by: Matthew Jacobson <matthew.jacobson@grafana.com>
2023-02-02 20:45:21 +00:00
Grot (@grafanabot)
385b15bf69 [v9.4.x] Alerting: Add static label to all state history entries (#62819)
Alerting: Add static label to all state history entries (#62817)

* Add static label to all state history entries

* Separate label and value visually

(cherry picked from commit 647f73ddc5)

Co-authored-by: Alexander Weaver <weaver.alex.d@gmail.com>
2023-02-02 14:00:09 -06:00
Grot (@grafanabot)
94ec932d29 [v9.4.x] Docs: corrects incorrect redirect and fixes link (#62820)
Docs: corrects incorrect redirect and fixes link (#62815)

corrects incorrect redirect and fixes link

(cherry picked from commit 060e0a4d18)

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
2023-02-02 13:52:26 -06:00
Grot (@grafanabot)
2525b30803 [v9.4.x] Alerting: Add endpoint for querying state history (#62813)
Alerting: Add endpoint for querying state history (#62166)

* Define endpoint and generate

* Wire up and register endpoint

* Cleanup, define authorization

* Forgot the leading slash

* Wire up query and SignedInUser

* Wire up timerange query params

* Add todo for label queries

* Drop comment

* Update path to rules subtree

(cherry picked from commit 6ad1cfef38)

Co-authored-by: Alexander Weaver <weaver.alex.d@gmail.com>
2023-02-02 12:32:30 -06:00
Grot (@grafanabot)
324964b86b [v9.4.x] Alerting: Usability adjustments to Loki representation of state history values (#62811)
Alerting: Usability adjustments to Loki representation of state history values (#62643)

* Extract label merge, add test file

* Extract error/NoData to first class fields, remove a layer from values

* Include dashUID and panelID as line-level fields

* Drop unnecessary object receiver

* Add tests for stream building

* Drop NoData field from log lines

(cherry picked from commit 9fa28c11c5)

Co-authored-by: Alexander Weaver <weaver.alex.d@gmail.com>
2023-02-02 11:15:51 -06:00
Grot (@grafanabot)
d31f932800 [v9.4.x] Auth: Rotate token patch (#62782)
Auth: Rotate token patch (#62676)

* Use singleflight.Group

* Align tests

* Cleanup

(cherry picked from commit 7c1d9769ca)

Co-authored-by: Misi <mgyongyosi@users.noreply.github.com>
2023-02-02 18:05:38 +01:00
Grot (@grafanabot)
363171b182 [v9.4.x] Alerting: Pass yaml as a query param in export request (#62806)
Alerting: Pass yaml as a query param in export request (#62751)

* Set YAML as default value for exporting alert rules

* use YAML format for rule list export

Co-authored-by: Sonia Aguilar <33540275+soniaAguilarPeiron@users.noreply.github.com>

* lint

* Add new format query param to swagger+docs

* Fix broken test

---------

Co-authored-by: Gilles De Mey <gilles.de.mey@gmail.com>
Co-authored-by: Matt Jacobson <matthew.jacobson@grafana.com>
(cherry picked from commit 753c84f825)

Co-authored-by: Sonia Aguilar <33540275+soniaAguilarPeiron@users.noreply.github.com>
2023-02-02 17:29:21 +01:00
Alexander Weaver
32e3cd7cbc Alerting: Refactor away a layer of indirection around the goroutine in Loki state history (#62802)
Alerting: Refactor away a layer of indirection around the goroutine in Loki state history (#62644)

Inline recordStreamsAsync in loki backend
2023-02-02 10:14:47 -06:00
Grot (@grafanabot)
2a223cbea2 [v9.4.x] Tempo: TraceQL syntax highlighting improvements (#62803)
Tempo: TraceQL syntax highlighting improvements (#62349)

* Better syntax highlighting for durations, floats and right-hand-side tags

* Remove hex rule in TraceQL syntax highlighting

(cherry picked from commit 60f2433a0f)

Co-authored-by: Andre Pereira <adrapereira@gmail.com>
2023-02-02 16:03:25 +00:00
Grot (@grafanabot)
c7a182e9d5 [v9.4.x] Tempo: Trace to logs update image (#62804)
Tempo: Trace to logs update image (#62796)

(cherry picked from commit 99a16d27c1)

Co-authored-by: Andrej Ocenas <mr.ocenas@gmail.com>
2023-02-02 17:02:43 +01:00
Grot (@grafanabot)
d8f757cb8c [v9.4.x] Tempo: Inject status and status.code for tags autocomplete (#62800)
Tempo: Inject status and status.code for tags autocomplete (#62794)

* Tempo: Inject status for v2 and status.code for v1 in the tags list for autocomplete

* Small comment fix

(cherry picked from commit b78af0b0f0)

Co-authored-by: Andre Pereira <adrapereira@gmail.com>
2023-02-02 15:53:17 +00:00
Grot (@grafanabot)
bfe6b520d7 [v9.4.x] Tempo: Update docs for trace to logs functionality (#62793)
Tempo: Update docs for trace to logs functionality (#62338)

(cherry picked from commit 1aae808723)

Co-authored-by: Andrej Ocenas <mr.ocenas@gmail.com>
2023-02-02 16:52:24 +01:00
Grot (@grafanabot)
190c3aad58 [v9.4.x] Plugins: Prefer to use the data source UID when querying (#62789)
Plugins: Prefer to use the data source UID when querying (#62776)

(cherry picked from commit 68862ce3e8)

Co-authored-by: Andres Martinez Gotor <andres.martinez@grafana.com>
2023-02-02 15:02:06 +00:00
Grot (@grafanabot)
022abcb47d [v9.4.x] SQLStore: Fix folder migration for MySQL < 5.7 (#62786)
SQLStore: Fix folder migration for MySQL < 5.7 (#62521)

* Nested folders: Do not skip integration tests

* SQLStore: Fix folder migration

It reduces the length of the title column to be equal with the respective
dashboard column.

(cherry picked from commit 4eaff63eda)

Co-authored-by: Sofia Papagiannaki <1632407+papagian@users.noreply.github.com>
2023-02-02 14:40:51 +00:00
Horst Gutmann
5b305cb696 [9.4.x] CI: Allow other modules to register build sub-commands (PR #62741) (#62774)
CI: Allow other modules to register build sub-commands (#62741)

* Allow other modules to register build sub-commands

* CI: Fix retries on artifacts-page clone

* Fix linting errors

* Fix golint issues

* Update to grabpl 3.0.21

(cherry picked from commit 312ea59e6d)
2023-02-02 15:14:41 +01:00
Grot (@grafanabot)
a03069fb08 [v9.4.x] Alerting: Set YAML as default value for exporting alert rules (#62770)
Alerting: Set YAML as default value for exporting alert rules (#62760)

Set YAML as default value for exporting alert rules

(cherry picked from commit 517e614661)

Co-authored-by: Sonia Aguilar <33540275+soniaAguilarPeiron@users.noreply.github.com>
2023-02-02 13:42:44 +01:00
Grot (@grafanabot)
0413fea8d2 [v9.4.x] Heatmap: Support heatmap rows with non-timeseries X axis (#62733)
Heatmap: Support heatmap rows with non-timeseries X axis (#60929)

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

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2023-02-02 12:27:09 +01:00
Grot (@grafanabot)
30081ca04b [v9.4.x] Nested Folder: Fix for SQLite not to overwrite the parent on restarts (#62756)
Nested Folder: Fix for SQLite not to overwrite the parent on restarts (#62709)

Nested Folder: Fix for SQLite not to overwrite the arent on restarts

(cherry picked from commit adaf82ffb7)

Co-authored-by: Sofia Papagiannaki <1632407+papagian@users.noreply.github.com>
2023-02-02 10:26:55 +00:00
Grot (@grafanabot)
53a1e5b7e6 [v9.4.x] Fix/60084/save and test (#62750)
Fix: Save and test error message does not persist across datasource instance settings anymore

(cherry picked from commit ce50168b70)

Co-authored-by: Timur Olzhabayev <timur.olzhabayev@grafana.com>
2023-02-02 09:01:07 +00:00
Grot (@grafanabot)
29cc5f9c62 [v9.4.x] Elasticsearch: Fix consistent label order in alerting (#62743)
Elasticsearch: Fix consistent label order in alerting (#62497)

elasticsearch: backend: sort label-values
(cherry picked from commit d9fd807375)

Co-authored-by: Gábor Farkas <gabor.farkas@gmail.com>
2023-02-02 08:22:56 +00:00
Grot (@grafanabot)
b485d1cde9 [v9.4.x] Cloudwatch: Fix log group variable interpolation (#62713)
Cloudwatch: Fix log group variable interpolation (#62640)

(cherry picked from commit 1f09508d8c)

Co-authored-by: Isabella Siu <Isabella.siu@grafana.com>
2023-02-01 13:52:52 -05:00
Grot (@grafanabot)
045c2d4e59 [v9.4.x] docs: fix broken elasticsearch metrics play link (#62719)
docs: fix broken elasticsearch metrics play link (#62715)

fix broken elastic search play link

(cherry picked from commit 1225e8d6d8)

Co-authored-by: Isabel <76437239+imatwawana@users.noreply.github.com>
2023-02-01 12:05:00 -06:00
Grot (@grafanabot)
654af9a48d [v9.4.x] Explore: Fix graph not updating when changing config (#62706)
Explore: Fix graph not updating when changing config (#62473)

* Explore: Fix graph not updating when changing config

* move useStructureRev to a seprate hook and add specific tests

(cherry picked from commit 6b6b733229)

Co-authored-by: Giordano Ricci <me@giordanoricci.com>
2023-02-01 17:02:20 +00:00
Grot (@grafanabot)
5bb58c5172 [v9.4.x] Alerting docs: adds declare incident (#62710)
Alerting docs: adds declare incident (#62681)

* Alerting docs: adds declare incident

* adds alert detail view option

(cherry picked from commit 9d07b77532)

Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com>
2023-02-01 16:59:26 +00:00
Grot (@grafanabot)
42b9c898bf [v9.4.x] Search: Fix alignment of checkbox in folder view (#62708) 2023-02-01 16:44:11 +00:00
Grot (@grafanabot)
795c86b045 [v9.4.x] Tempo: Remove tempoApmTable feature flag (#62702)
Tempo: Remove tempoApmTable feature flag (#62499)

Remove tempoApmTable feature flag

(cherry picked from commit 5e1506dea0)

Co-authored-by: Andre Pereira <adrapereira@gmail.com>
2023-02-01 16:15:58 +00:00
Grot (@grafanabot)
5d5e7f97e9 [v9.4.x] Navigation: wrap dashboard settings actions in ToolbarButtonRow for responsiveness (#62692)
Navigation: wrap dashboard settings actions in `ToolbarButtonRow` for responsiveness (#62475)

wrap dashboard actions in toolbarbuttonrow for responsiveness

(cherry picked from commit 0a780d978e)

Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2023-02-01 15:14:49 +00:00
Grot (@grafanabot)
c8cf18d8f6 [v9.4.x] Alerting: hide "silence" button for external AM setups (#62691)
Co-authored-by: Gilles De Mey <gilles.de.mey@gmail.com>
2023-02-01 15:10:51 +00:00
Grot (@grafanabot)
70e4499f83 [v9.4.x] Loki: Fix label filter expression treating int as string (#62687)
Loki: Fix label filter expression treating int as string (#62496)

* fix: label filter expression treats int as string

* refactor: labelFilterRenderer

* test: add tests to labelFilterRenderer

* refactor: use backticks based on the operator not the value

* test: labelFilterRenderer uses the correct value type based on the operator

* test: use it.every rather than having multiple repetitive tests

(cherry picked from commit 42f8f5a9ea)

Co-authored-by: Gareth Dawson <gareth.dawson@grafana.com>
2023-02-01 14:52:46 +00:00
Grot (@grafanabot)
2e251a2b20 [v9.4.x] Alerting: Add support for "normal" as state filter in rule search (#62679)
Co-authored-by: Gilles De Mey <gilles.de.mey@gmail.com>
2023-02-01 15:05:51 +01:00
Grot (@grafanabot)
cdec4eb6ab [v9.4.x] Alerting: Add Copy action to templates table (#62683)
Alerting: Add Copy action to templates table (#62135)

* Add duplicate action to templates table

Co-authored-by: Virginia Cepeda <virginia.cepeda@grafana.com>

* Move duplicate icon, and remove provenance when rendering TemplateForm

* Create generic generateCopiedName method to avoid duplication and use it also in the CloneRuleEditor

* Use 'Copy' for duplicating templates and cloning alert rules

* Improve updating the template content with new unique define values when copying

Co-authored-by: Konrad Lalik <konradlalik@gmail.com>

* Fix typo

---------

Co-authored-by: Virginia Cepeda <virginia.cepeda@grafana.com>
Co-authored-by: Konrad Lalik <konradlalik@gmail.com>
(cherry picked from commit 151e57df70)

Co-authored-by: Sonia Aguilar <33540275+soniaAguilarPeiron@users.noreply.github.com>
2023-02-01 14:57:12 +01:00
Grot (@grafanabot)
71a18da270 [v9.4.x] Command palette: section styling tweaks (#62682)
Command palette: section styling tweaks (#62671)

section styling tweaks

(cherry picked from commit 8d7e7693f2)

Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2023-02-01 13:12:55 +00:00
Grot (@grafanabot)
40354c6b40 [v9.4.x] Alerting: Allow alert rule pausing from API (#62675)
Alerting: Allow alert rule pausing from API (#62326)

* Add is_paused attr to the POST alert rule group endpoint

* Add is_paused to alerting API POST alert rule group

* Fixed tests

* Add is_paused to alerting gettable endpoints

* Fix integration tests

* Alerting: allow to pause existing rules (#62401)

* Display Pause Rule switch in Editing Rule form

* add isPaused property to form interface and dto

* map isPaused prop with is_paused value from DTO

Also update test snapshots

* Append '(Paused)' text on alert list state column when appropriate

* Change Switch styles according to discussion with UX

Also adding a tooltip with info what this means

* Adjust styles

* Fix alignment and isPaused type definition

Co-authored-by: gillesdemey <gilles.de.mey@gmail.com>

* Fix test

* Fix test

* Fix RuleList test

---------

Co-authored-by: gillesdemey <gilles.de.mey@gmail.com>

* wip

* Fix tests and add comments to clarify AlertRuleWithOptionals

* Fix one more test

* Fix tests

* Fix typo in comment

* Fix alert rule(s) cannot be paused via API

* Add integration tests for alerting api pausing flow

* Remove duplicated integration test

---------

Co-authored-by: Virginia Cepeda <virginia.cepeda@grafana.com>
Co-authored-by: gillesdemey <gilles.de.mey@gmail.com>
Co-authored-by: George Robinson <george.robinson@grafana.com>
(cherry picked from commit 53945afedf)

Co-authored-by: Alex Moreno <alexander.moreno@grafana.com>
2023-02-01 12:33:24 +00:00
Grot (@grafanabot)
68fb4da24a [v9.4.x] Alerting: Show 'start typing' message in evaluation group folder in case of empty options. (#62665)
Alerting: Show 'start typing' message in evaluation group folder in case of empty options. (#62611)

Show start typing message in evaluation group folder in case of empty options

(cherry picked from commit c0865c863d)

Co-authored-by: Sonia Aguilar <33540275+soniaAguilarPeiron@users.noreply.github.com>
2023-02-01 11:30:55 +00:00
Grot (@grafanabot)
89f9081658 [v9.4.x] CI: Replace grafana/grafana-oss with grafana-oss when publishing to dockerhub repo (#62653)
CI: Replace `grafana/grafana-oss` with `grafana-oss` when publishing to dockerhub repo (#62651)

Replace grafana/grafana-oss with grafana-oss

(cherry picked from commit 1a5b54cff3)

Co-authored-by: Dimitris Sotirakis <dimitrios.sotirakis@grafana.com>
2023-02-01 12:26:17 +02:00
Grot (@grafanabot)
84d2814f7c [v9.4.x] PanelChrome: Adds display mode to support transparent option (#62654)
PanelChrome: Adds display mode to support transparent option (#62647)

* PanelChrome: Add transparent displayMode

* Remove comment

* Fixes to storybook and new example

* no background on TitleItem

---------

Co-authored-by: polinaboneva <polina.boneva@grafana.com>
(cherry picked from commit 533c8e4b7a)

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
2023-02-01 10:05:53 +00:00
Andreas Christou
193b671246 [v9.4.x] TemplateVariables: Fix custom variable function support (#62509) (#62573)
TemplateVariables: Fix custom variable function support (#62509)

Validate query values

(cherry picked from commit 3ac97dd396)

# Conflicts:
#	public/app/features/query/state/runRequest.ts
2023-02-01 10:25:03 +01:00
Grot (@grafanabot)
2bb672a7de [v9.4.x] Geomap: Ensure options work while in table view (#62635)
Geomap: Ensure options work while in table view (#62632)

(cherry picked from commit cf6952a963)

Co-authored-by: Drew Slobodnjak <60050885+drew08t@users.noreply.github.com>
2023-01-31 15:31:54 -08:00
Grot (@grafanabot)
c156621981 [v9.4.x] Transforms: Fix schema definition (#62623)
Transforms: Fix schema definition (#62619)

(cherry picked from commit 4186871390)

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2023-01-31 15:31:28 -08:00
Grot (@grafanabot)
9a8983e8e9 [v9.4.x] Alerting: Fix handling of special floating-point cases when writing observed values to annotations (#62637)
Alerting: Fix handling of special floating-point cases when writing observed values to annotations (#61074)

* Fix json serialization of state values

* Simplify two of the tests

* Fix linter complaint

* Don't return error if we fail to look up dashboard, just log it and move on

* Address linter complaint

(cherry picked from commit 03f3fbec0d)

Co-authored-by: Alexander Weaver <weaver.alex.d@gmail.com>
2023-01-31 21:51:52 +00:00
Grot (@grafanabot)
4bdfc2d926 [v9.4.x] Expressions: Fixes the issue showing expressions editor (#62622)
Expressions: Fixes the issue showing expressions editor (#62510)

* Use suggested value for uid

* update the snapshot

* use __expr__

* replace all -100 with __expr__

* update snapshot

* more changes

* revert redundant change

* Use expr.DatasourceUID where it's possible

* generate files

(cherry picked from commit 91221bc436)

Co-authored-by: ismail simsek <ismailsimsek09@gmail.com>
2023-01-31 18:10:13 +00:00
Grot (@grafanabot)
bd9707e8f3 [v9.4.x] Use requires_buildifier build tag to avoid needing buildifier locally (#62621)
Use requires_buildifier build tag to avoid needing buildifier locally (#62597)

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
(cherry picked from commit fdb1a47ca2)

Co-authored-by: Jack Baldry <jack.baldry@grafana.com>
2023-01-31 18:03:03 +00:00
Grot (@grafanabot)
3023a43d4f [v9.4.x] TestData: Remove references to TestData "DB" (#62613)
TestData: Remove references to TestData "DB" (#62603)

* remove refs testdatadb

* fix trailing semi-colon

* remove pluginName completely

(cherry picked from commit e7bfc4e749)

Co-authored-by: Will Browne <wbrowne@users.noreply.github.com>
2023-01-31 18:02:42 +00:00
Grot (@grafanabot)
41b0393140 [v9.4.x] Transformations: Selectively apply transformation to queries (#62615)
Transformations: Selectively apply transformation to queries (#61735)

(cherry picked from commit bba80b6c7a)

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2023-01-31 09:48:18 -08:00
Grot (@grafanabot)
90a4c84bc2 [v9.4.x] MySQL: Quote identifiers that include special characters (#62618)
MySQL: Quote identifiers that include special characters (#61135)

* SQL: toRawSQL required and escape table

* Fix autocomplete for MySQL

* Change the way we escape for builder

* Rework escape ident to be smart instead

* Fix A11y for alias

* Add first e2e test

* Add test for code editor

* Add doc

* Review comments

* Move functions to sqlUtil

(cherry picked from commit 62c30dea4d)

Co-authored-by: Zoltán Bedi <zoltan.bedi@gmail.com>
2023-01-31 17:26:44 +00:00
Grot (@grafanabot)
6749e8667d [v9.4.x] TopNav: Fix right padding on signin link (#62606)
TopNav: Fix right padding on signin link (#62537)

* TopNav: Fix right padding on signin link

* revert yarn lock

* Update package.json

* Update

(cherry picked from commit c0f0c3d485)

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
2023-01-31 16:31:45 +00:00
Grot (@grafanabot)
9727346e63 [v9.4.x] CI: Add artifacts publish build command (#62503)
CI: Add `artifacts publish` build command (#62445)

* CI: Add `artifacts publish` build command

* Lint release.star

(cherry picked from commit f23be415c5)

Co-authored-by: Horst Gutmann <horst.gutmann@grafana.com>
2023-01-31 16:29:34 +01:00
Grot (@grafanabot)
3683b7a5ff [v9.4.x] Alerting: Validate that tags are 100 characters or less (#62593)
Co-authored-by: Gilles De Mey <gilles.de.mey@gmail.com>
Co-authored-by: George Robinson <george.robinson@grafana.com>
2023-01-31 14:41:06 +00:00
Grot (@grafanabot)
f9ca726290 [v9.4.x] Navigation: add event tracking for dashboard save as events (#62588)
Navigation: add event tracking for dashboard save as events (#62568)

* add event tracking for dashboard save as events

* emit a grafana_dashboard_copied event instead

(cherry picked from commit 029253d5f6)

Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2023-01-31 14:01:08 +00:00
Grot (@grafanabot)
15ec06b593 [v9.4.x] Azure Monitor: Return query error for metrics (#62577)
Azure Monitor: Return query error for metrics (#62570)

(cherry picked from commit 13f8ea2656)

Co-authored-by: Andres Martinez Gotor <andres.martinez@grafana.com>
2023-01-31 14:41:21 +01:00
Grot (@grafanabot)
953d9db30d [v9.4.x] Azure Monitor: Fix selection when using a search term (#62572)
Azure Monitor: Fix selection when using a search term (#62562)

(cherry picked from commit a0c3dcb8c6)

Co-authored-by: Andres Martinez Gotor <andres.martinez@grafana.com>
2023-01-31 13:29:59 +00:00
Grot (@grafanabot)
a7b9dcdce8 [v9.4.x] Navigation: add event tracking for navigation elements (#62583)
Navigation: add event tracking for navigation elements (#62563)

add user tracking for navigation elements

(cherry picked from commit 77a186879d)

Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2023-01-31 13:13:34 +00:00
Grot (@grafanabot)
76f3ed3c3f [v9.4.x] AzureMonitor: Fix dimension migration (#62579)
AzureMonitor: Fix dimension migration (#62485)

Remove unneeded properties post migration

(cherry picked from commit f77853f91e)

Co-authored-by: Andreas Christou <andreas.christou@grafana.com>
2023-01-31 13:11:18 +00:00
Grot (@grafanabot)
2ad87ce213 [v9.4.x] Plugins: Fix circular reference in customOptions leading to MarshalJSON errors (#62565)
Plugins: Fix circular reference in customOptions leading to MarshalJSON errors (#62328)

* Plugins: test ds.JsonData.MarshalJSON()

* CustomOptions: copy to avoid cyclic marshal

(cherry picked from commit c41f97029e)

Co-authored-by: Yasir Ekinci <ekinci.yasir@gmail.com>
2023-01-31 13:29:23 +01:00
Grot (@grafanabot)
cc5b3c11c4 [v9.4.x] Login: Fix panic when UpsertUser is called without ReqContext (#62555)
Login: Fix panic when UpsertUser is called without ReqContext (#62539)

(cherry picked from commit b1151dd118)

Co-authored-by: Emil Tullstedt <emil.tullstedt@grafana.com>
2023-01-31 12:25:11 +01:00
Grot (@grafanabot)
20731672ed [v9.4.x] Chore: Update latest.json to 9.4.0-beta1 (#62560)
Chore: Update latest.json to 9.4.0-beta1 (#62556)

Chore: update latest.json to 9.4.0-beta1
(cherry picked from commit ef7716d6b3)

Co-authored-by: Dimitris Sotirakis <dimitrios.sotirakis@grafana.com>
2023-01-31 13:00:57 +02:00
Grot (@grafanabot)
f9ec04bbb7 [v9.4.x] PanelChrome: Styling issues (#62550)
PanelChrome: Styling issues  (#62466)

* all panel icons are 16x16 in size; allow ToolbarButton to have its icon size set from outside;

* use TitleItem for streaming too, so that the style of focus-visible is the same

* allow menu icon to be visible when panel is focused

* remove some styling of title icons in panel header

* panel alert notices are too big

* PanelHeaderNotice: Fix styling issue with background and hover when
feature toggle is not enable

---------

Co-authored-by: Alexandra Vargas <alexa1866@gmail.com>
(cherry picked from commit d48a8fd227)

Co-authored-by: Polina Boneva <13227501+polibb@users.noreply.github.com>
2023-01-31 12:39:56 +02:00
Grot (@grafanabot)
0e6d038934 Release: Bump version to 9.4.0 (#62554)
"Release: Updated versions in package to 9.4.0"
2023-01-31 12:07:54 +02:00
Grot (@grafanabot)
b8c6ff611d [v9.4.x] Plugins: Update migration guide for 9.4/forwarded headers (#62549)
Plugins: Update migration guide for 9.4/forwarded headers (#62505)

Update plugin migration guide in regards to v9.4 and forwarding
of headers in grafana-plugin-sdk-go.

(cherry picked from commit 6c02c7079f)

Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
2023-01-31 10:55:56 +01:00
Grot (@grafanabot)
ecfd92ed30 [v9.4.x] Navigation: Sign in button now works correctly when served under a sub path (#62548)
Navigation: Sign in button now works correctly when served under a sub path (#62504)

make sure getUrlForPartial always includes the basePath + unit tests

(cherry picked from commit fd2641a542)

Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2023-01-31 09:36:37 +00:00
Grot (@grafanabot)
8eb9971797 [v9.4.x] Azure Monitor: Docs update for multiple resources (#62543)
Azure Monitor: Docs update for multiple resources (#62454)

(cherry picked from commit d3897b612f)

Co-authored-by: Andres Martinez Gotor <andres.martinez@grafana.com>
2023-01-31 09:56:45 +01:00
Grot (@grafanabot)
c567e690ad [v9.4.x] Alerting: Clarify PagerDuty integrationKey format (#62513)
Alerting: Clarify PagerDuty integrationKey format (#62463)

**What is this feature?**

Simply a documentation update.

**Why do we need this feature?**

Clarify the doc, so people don't waste time integrating the wrong key,
e.g. #8979, #9036, https://community.librenms.org/t/19013

**Who is this feature for?**

Developers doing a PagerDuty integration.

(cherry picked from commit a7c4872bcd)

Co-authored-by: Andre Miras <AndreMiras@users.noreply.github.com>
2023-01-31 08:56:14 +00:00
Grot (@grafanabot)
acf1b1285b [v9.4.x] Canvas: Update connection info on element rename (#62536) 2023-01-31 04:44:52 +00:00
Grot (@grafanabot)
3d65500a4f [v9.4.x] Alerting: Allow separate read and write path URLs for Loki state history (#62528)
Alerting: Allow separate read and write path URLs for Loki state history (#62268)

Extract config parsing and add tests

(cherry picked from commit e7ace4ed62)

Co-authored-by: Alexander Weaver <weaver.alex.d@gmail.com>
2023-01-30 17:01:53 -06:00
Grot (@grafanabot)
589284778a [v9.4.x] Canvas: Connections positioning ux improvements (#62525)
Canvas: Connections positioning ux improvements (#62516)

(cherry picked from commit a92c081a33)

Co-authored-by: Adela Almasan <88068998+adela-almasan@users.noreply.github.com>
2023-01-30 13:59:51 -08:00
Grot (@grafanabot)
b9e989cbf2 [v9.4.x] Geomap: Maintain consistent control styling (#62522)
Geomap: Maintain consistent control styling (#62518)

Co-authored-by: nmarrs <nathanielmarrs@gmail.com>
(cherry picked from commit bf2cf76cad)

Co-authored-by: Drew Slobodnjak <60050885+drew08t@users.noreply.github.com>
2023-01-30 13:35:54 -08:00
Grot (@grafanabot)
f39c46a1b5 [v9.4.x] Alerting: Configurable externalLabels for Loki state history (#62517)
Alerting: Configurable externalLabels for Loki state history (#62404)

* Add config option for external labels

* Remove redundant nilcheck

(cherry picked from commit b4682fe3cb)

Co-authored-by: Alexander Weaver <weaver.alex.d@gmail.com>
2023-01-30 15:34:40 -06:00
Grot (@grafanabot)
48bd8ebe92 [v9.4.x] Consider y coord when determining bottom collision (#62506)
Consider y coord when determining bottom collision (#62403)

(cherry picked from commit b6f477ae03)

Co-authored-by: Kristina <kristina.durivage@grafana.com>
2023-01-30 17:01:53 +00:00
Grot (@grafanabot)
34524d6dfa [v9.4.x] Azure Monitor: Enable multiple resource queries (#62502)
Azure Monitor: Enable multiple resource queries (#62467)

(cherry picked from commit 6d230d95eb)

Co-authored-by: Andres Martinez Gotor <andres.martinez@grafana.com>
2023-01-30 17:55:06 +01:00
Grot (@grafanabot)
6e861b19fa [v9.4.x] Alerting: allow to pause existing rules (#62491)
Co-authored-by: gillesdemey <gilles.de.mey@gmail.com>
Co-authored-by: Virginia Cepeda <virginia.cepeda@grafana.com>
2023-01-30 17:21:27 +01:00
Grot (@grafanabot)
26f7b8ee65 [v9.4.x] Alerting: Add Rule UID and Clone button to the rule details page (#62487)
Co-authored-by: Konrad Lalik <konrad.lalik@grafana.com>
2023-01-30 11:16:47 -05:00
Grot (@grafanabot)
04dd4e7f7c [v9.4.x] Alerting: Allow pausing alerts from provisioning (#62492)
Alerting: Allow pausing alerts from provisioning (#62263)

* Allow pausing alerts from provisioning

* Update swagger

* Add IsPaused to provision export endpoints

* Add pause field in sample.yml

* Add exception for reset state in first loop iteration of scheduler if rule is paused

* Update provision definition and swagger docs

* Fix provisioning export tests

* Suggestion: Simplify if condition

* Add more context to a comment

(cherry picked from commit 7a465f42a6)

Co-authored-by: Alex Moreno <alexander.moreno@grafana.com>
2023-01-30 17:01:37 +01:00
Grot (@grafanabot)
992e5d72ff [v9.4.x] Docs: Update wording / text and copy (#62490)
Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com>
Co-authored-by: Gilles De Mey <gilles.de.mey@gmail.com>
2023-01-30 15:46:25 +00:00
Grot (@grafanabot)
1b0f5f0a81 Release: Bump version to 9.4.0-beta1 (#62465)
"Release: Updated versions in package to 9.4.0-beta1"
2023-01-30 14:47:22 +02:00
Oscar Kilhed
e3bfc67d7b FileDropzone: Display max file size (#62334) 2023-01-30 12:17:30 +01:00
Oscar Kilhed
0bfdc42ffe Grafana DS: Limit dropzone to spreadsheet filetypes (#62329)
* Grafana DS: Limit dropzone to spreadsheet filetypes
2023-01-30 12:17:01 +01:00
renovate[bot]
355dc66bd9 Update dependency react-highlight-words to v0.20.0 (#62351)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2023-01-30 11:03:39 +00:00
Eric Leijonmarck
a232e7ceca Auth: Add skip_org_role_sync for Okta (#62106)
* WIP

* Update pkg/services/login/authinfo.go

* fix: merge

* change order to internal last

* adds: docs

* add: configuration for defaults and sample

* Update docs/sources/setup-grafana/configure-grafana/_index.md

Co-authored-by: Jo <joao.guerreiro@grafana.com>

* Update docs/sources/setup-grafana/configure-grafana/_index.md

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>

---------

Co-authored-by: Jo <joao.guerreiro@grafana.com>
Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
2023-01-30 10:54:14 +00:00
Sven Grossmann
d7026900bd LokiContext: Add feature tracking (#62344)
* add feature tracking to LokiContextUi

* only depend on `row.uid`

Co-authored-by: Gábor Farkas <gabor.farkas@gmail.com>

---------

Co-authored-by: Gábor Farkas <gabor.farkas@gmail.com>
2023-01-30 11:30:39 +01:00
Kyle Cunningham
38d7168921 Time Series Panel: Fix legend text selection in Firefox (#60809)
Add user-select property to legend items.
2023-01-30 11:18:07 +01:00
Sofia Papagiannaki
a502a2d1f8 Nested folders: Enable folder migration (#61936) 2023-01-30 10:17:40 +00:00
Sven Grossmann
7eb01b1813 MultiSelect: Fix actionMeta not available in onChange callback (#62339)
add `ActionMeta` to `onChange` callback
2023-01-30 11:17:02 +01:00
Sonia Aguilar
d44f250aea Alerting: Add export button for exporting all alert rules in alert list view (#62416)
* Add export button for exporting all alert rules in alert list view

* Add RBAC for export button

* Use provisioningPermissions.read in getRulesAccess method instead of directly using AccessControlAction.AlertingProvisioningRead
2023-01-30 11:13:08 +01:00
Ida Štambuk
a9d44aa795 Datasources: Add support for getDetDefaultQuery in variable editor (#62026)
+Cloudwatch implementation
2023-01-30 10:58:43 +01:00
Sven Grossmann
ae8c61c0b2 Logs: Fix stats not being updated when log results change (#62317)
update stats in logdetails
2023-01-30 10:54:20 +01:00
Josh Hunt
d51e7ec7ef Preferences: Add theme preference to match system theme (#61986)
* user essentials mob! 🔱

lastFile:pkg/api/preferences.go

* user essentials mob! 🔱

* user essentials mob! 🔱

lastFile:packages/grafana-data/src/types/config.ts

* user essentials mob! 🔱

lastFile:public/app/core/services/echo/utils.test.ts

* user essentials mob! 🔱

* user essentials mob! 🔱

lastFile:public/views/index-template.html

* user essentials mob! 🔱

* Restore currentUser.lightTheme for backwards compat

* fix types

* Apply suggestions from code review

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>

* cleanup

* cleanup

---------

Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
Co-authored-by: Joao Silva <joao.silva@grafana.com>
Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
2023-01-30 10:51:51 +01:00
Andres Martinez Gotor
be7b90bbd1 Azure Monitor: Add info about multiple resource selection (#62327) 2023-01-30 10:49:57 +01:00
Andres Martinez Gotor
bed1bb1a73 Azure Monitor: Allow to specify a region when listing resources (#62306)
* Azure Monitor: Allow to specify a region when listing resources

* Add region template variable to e2e tests
2023-01-30 10:49:20 +01:00
Torkel Ödegaard
dae9808602 AppPlugins: Remove unused rootNav parameter (#62440) 2023-01-30 10:30:01 +01:00
Jack Baldry
8379a5338c CI: Lint starlark files with buildifier (#59157)
* Add verify-starlark build action that returns an error for starlark files with lint

Relies on `buildifier` tool.

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

* Add verify_starlark_step to PR pipeline

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

* Manually fetch buildifier in curl_image until a new build_image is created

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

* Format with buildifier

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

* Remove all unused variables retaining one unused function

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

* Use snake_case for variable

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

* Replace deprecated dictionary concatenation with .update() method

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

* Start adding docstrings for all modules and functions

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

* Prefer os.WriteFile as ioutil.WriteFile has been deprecated since go 1.16

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

* Attempt to document the behavior of the init_enterprise_step

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

* Document test_backend pipeline

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

* Document enterprise_downstream_step

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

* Document the pipeline utility function

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

* Document publish_images_step

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

* Document publish_images_steps

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

* Document enterprise2_pipelines function

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

* Add tags table for Starlark files.

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

* Document test_frontend

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

* Document windows function

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

* Add docstrings to verifystarlark functions

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

* Refactor error handling to be more clear and document complex behavior

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

* Split errors into execution errors and verification errors

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

* Document all other library functions

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

* Add local variables to TAGS

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

* Add blank line between all Args and Returns sections

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

* Fix new linting errors

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

* Lint new Starlark files

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

* Correct buildifier binary mv

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

* Document the need to set nofile ulimit to at least 2048

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

* Update build-container to include buildifier

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

* Ensure buildifier binary is executable

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

* Fix valid content test

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

* Simply return execution error

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

* Only check files rather than fixing them

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

* Use updated build-container with executable buildifier

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

* Test that context cancellation stops execution

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

* Simplify error handling

Return execution errors that short circuit WalkDir rather than
separately tracking that error.

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

* Remove fetching of buildifier binary now that it is in the build-container

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

* Use build image in verify-starlark step

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

* Use semver tag

The image is the same but uses a semver tag to make it clearer that
this is a forward upgrade from the old version.

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

* Use node 18 image with buildifier

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

---------

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
2023-01-30 09:27:11 +00:00
Serge Zaitsev
907e2a840e Chore: Fix goimports grouping (#62429)
* fix goimports ordering

* fix goimports order
2023-01-30 09:57:50 +01:00
Serge Zaitsev
d6d4097567 Chore: Fix goimports grouping in alerting (#62424)
* fix goimports

* fix goimports order
2023-01-30 09:55:35 +01:00
Serge Zaitsev
0bf4093005 Chore: Fix goimports grouping (#62428)
* fix goimports order

* fix goimports order
2023-01-30 08:50:27 +00:00
Serge Zaitsev
f8ec35e643 Chore: Fix goimports grouping (#62427)
* fix goimports order

* fix goimports order
2023-01-30 09:38:51 +01:00
Serge Zaitsev
7dbd2cd139 Chore: Fix goimports grouping (#62426)
fix goimports ordering
2023-01-30 09:34:18 +01:00
Serge Zaitsev
f531074d89 Chore: Fix goimports grouping in pkg/infra (#62421)
* fix goimports

* fix goimports order
2023-01-30 08:32:25 +00:00
Serge Zaitsev
aebcecf538 Chore: Fix goimports grouping in other backend platform packages (#62422)
* fix goimports

* fix goimports order

* fix goimports order

* fix goimports order

* fix goimports order

* fix goimports order
2023-01-30 08:26:42 +00:00
Sven Grossmann
da7065d3dc LokiContext: Fix wrong queries being run when reopened (#62353)
* fix wrong query being run when reopened

* fix typo

Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>

* and test for `onClose`

* rename functions

---------

Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
2023-01-30 09:26:27 +01:00
Jan Garaj
2ff715cb7a CloudWatch: Add missing AWS/DX metric (#62405) 2023-01-30 09:26:14 +01:00
Serge Zaitsev
e2d49ea17f Chore: Fix goimports grouping (#62423)
* fix goimports

* fix goimports order
2023-01-30 08:25:58 +00:00
Serge Zaitsev
bc2813ef06 Chore: Fix goimports grouping in pkg/services (#62420)
* fix goimports

* fix goimports order
2023-01-30 08:21:27 +00:00
Serge Zaitsev
324310abbc Chore: Fix goimports grouping in pkg/api (#62419)
* fix goimports

* fix goimports order
2023-01-30 08:18:26 +00:00
Levente Balogh
9b2abe7613 Datasources: Extend properties for the datasource-test tracking event (#62292)
chore: extend properties for the test datasource tracking event
2023-01-30 08:29:13 +01:00
Ryan McKinley
0d2a786816 Schema: Add schema for library panels (#62169) 2023-01-30 04:14:12 +00:00
Gilles De Mey
13159d03ba Alerting: Use optional chaining for accessing frames (#61814) 2023-01-28 18:39:23 +01:00
Sarah Zinger
82e8ad8a0f Cloudwatch: Set CloudwatchCrossAccountQuery feature to stable (#62348)
* Cloudwatch: Set CloudwatchCrossAccountQuery feature to stable

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
2023-01-27 16:46:08 -05:00
Yuri Tseretyan
0c4671e31f Alerting: Update historian to ignore transitions from Normal Paused and Updated (#62267) 2023-01-27 16:26:22 -05:00
Josh Hunt
6c990b461e SupportBundles: Feature flag + access control navtree item (#62337)
* SupportBundles: Feature flag + access control navtree item

* remove translation
2023-01-27 20:04:04 +00:00
Drew Slobodnjak
07dc994765 Canvas: Anchor highlight persistance (#62364)
* Canvas: Anchor highlight persistance

* Update public/app/plugins/panel/canvas/ConnectionAnchors.tsx

Co-authored-by: Nathan Marrs  <nathanielmarrs@gmail.com>

* Fix CONNECTION_ANCHOR_ALT dependencies

* Simplify anchor type assertion logic

* Ensure that anchor highlight is reset when anchors are hidden

* Add helpful comment on return bool of function

---------

Co-authored-by: Nathan Marrs  <nathanielmarrs@gmail.com>
2023-01-27 11:35:57 -08:00
Isabel
290f23a50b docs: clarify note re export dashboard as PDF (#62398)
clarify note re export dashboard as PDF

Update note under Export dashboard as PDF to indicate that it's only available on Enterprise and Cloud, as well as which version of Enterprise it's available on.
2023-01-27 13:31:55 -06:00
gotjosh
3c616da83f Alerting: Refactor metrics/ngalert.go into seperate files (#62362)
* Alerting: Refactor metrics/ngalert.go into seperate files
2023-01-27 18:49:49 +00:00
Kristin Laemmert
9256a520a4 chore: move user_auth models to (mostly) login service (#62269)
* chore: move user_auth models to (mostly) login service
2023-01-27 13:36:54 -05:00
Jack Baldry
4563111180 Move Grafana tutorials from grafana/tutorials repository (#62309)
* Add Grafana tutorials originally from tutorials repository

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

* Replace tutorials/step shortcode with ordinary headings

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

* Fix typos reported by codespell

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

* Fix doc-validator linting and run prettier

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

* Specify version in tutorials lookup as non-rendered pages do not have a relative permalink used to infer the version

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

* Use latest version

Ensures CI passes and only breaks one website build as the backport to
v9.3.x will solve the missing "latest" pages on publishing.

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

---------

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
2023-01-27 17:53:50 +00:00
Gareth Dawson
b2c8126e6e Loki: Show query size approximation (#62109)
* feat: make api request to /loki/api/v1/index/stats

* fix: add /index/stats to callResource valid urls

* feat: make call to getQueryStats when the query changes

* feat: render user tooltip displaying the estimated value for processed data

* fix: add new props to component tests

* test: add tests for query size estimation

* fix: disable error message on request failure

* refactor: add suggestions from code review

* refactor: only pass required query string
2023-01-27 17:32:53 +00:00
Galen Kistler
5ad7cca9d4 Prometheus: Fix "-Instant" string showing up in prometheus instant query UI (#62265)
Add string constant and make sure to remove from name before outputting to frontend
2023-01-27 10:40:12 -06:00
Matthew Jacobson
c006df375a Alerting: Create endpoints for exporting in provisioning file format (#58623)
This adds provisioning endpoints for downloading alert rules and alert rule groups in a 
format that is compatible with file provisioning. Each endpoint supports both json and 
yaml response types via Accept header as well as a query parameter 
download=true/false that will set Content-Disposition to recommend initiating a download 
or inline display.

This also makes some package changes to keep structs with potential to drift closer 
together. Eventually, other alerting file structs should also move into this new file 
package, but the rest require some refactoring that is out of scope for this PR.
2023-01-27 11:39:16 -05:00
Ivana Huckova
d5294eb8fa Explore: Implement feature toggle for logs sample (#62291)
* Explore: Implement feature toggle for logs sample

* Run pkg/services/featuremgmt/toggles_gen_test.go

* Remove boolean

* Update copy
2023-01-27 17:30:25 +01:00
Ashley Harrison
1ef7cfda3f Navigation: more command palette tweaks (#62286)
* update placeholder text, only create search keybindings if topNavCommandPalette is disabled

* make search input wider
2023-01-27 16:21:48 +00:00
Josh Hunt
305209f4be CommandPalette: Render dashboard + nav actions as links (#62315)
* CommandPalette: Render links as links!

* Update public/app/features/commandPalette/KBarResults.tsx

Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>

* Apply suggestions from code review

Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>

* fix ellipsis showing

---------

Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2023-01-27 16:10:05 +00:00
renovate[bot]
7f5ed9f59d Update dependency rc-tooltip to v5.3.1 (#62341)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-01-27 15:48:06 +00:00
Dominik Prokop
d4015602ca Dashboard schema: Update default value for timezone (#62340) 2023-01-27 15:43:13 +00:00
Ieva
1865205d68 Benchmarks for searchv2 (#60730)
* bench-test

* cleanup

* more simplification

* fix tests

* correct wrong argument ordering & use constant

* fix issues with tests setup

* add benchmark results

* reuse Gabriel's concurrent setup code

* correct error logs for ac benchmarks
2023-01-27 15:42:08 +00:00
Ivana Huckova
d0e95f8c95 Loki: Add X-Query-Tags header for logs sample and data sample (#62333) 2023-01-27 16:41:40 +01:00
Levente Balogh
9453bec819 FileDropzone: Revert introducing a new prop (#62324) 2023-01-27 16:40:54 +01:00
Andres Martinez Gotor
317ef1de86 Azure Monitor: Add variable function to list regions (#62297) 2023-01-27 16:29:05 +01:00
Gábor Farkas
88119ad6c3 Elasticsearch: Support nested aggregation (#62301)
* Add nested query support

* Add nested support for alerts

* update nested aggregation

* cleanup types

* Add nested integration test

* Move aggdef to nested

* fixed merge conflict

* fixed lint warning

* mark nested-mode experimental

---------

Co-authored-by: Ethan Gallant <ethan@ziax.com>
Co-authored-by: Ethan J. Gallant <ethan.gallant@acquia.com>
2023-01-27 16:18:36 +01:00
Ezequiel Victorero
d5433a488a Chore: Update code owners of public dashboards (#62332) 2023-01-27 12:17:18 -03:00
Dominik Prokop
83199c4bf5 Dashboard schema: Review and mature timezone property (#62090)
* Review and mature timezone property of Dashboard kind

* Update timezone type
2023-01-27 07:13:33 -08:00
Eric Leijonmarck
5531e22f46 Auth: Add disable of team sync for JWT Authentication (#62191)
* fix: disable team sync for JWT Authentication

* add: comment to test

* change test to conform to new expected behavior

* fix: spelling

* formatting
2023-01-27 16:05:25 +01:00
Sven Grossmann
df2db3bb23 LogContext: Fix setting wrong height for ElasticSearch (#62330)
fix wrong height for elastic
2023-01-27 15:41:16 +01:00
Andreas Christou
5bdfbd93a5 Bump code coverage version (#62322)
* Bump code coverage version

* Update codeowners to include aws-plugins

* Bump version further
2023-01-27 14:33:48 +00:00
Ezequiel Victorero
a128944471 PublicDashboards: moved tokens service and new repository method (#61806) 2023-01-27 11:20:22 -03:00
Sriram
89ef62f163 Chore: Removed unused grafana-plugin-ci images (#62219)
removed unused grafana-plugin-ci images
2023-01-27 14:19:42 +00:00
Andre Pereira
afd39c18ba Explore: Refactor trace view and move to core (#61938)
* Move TraceView to core grafana

* Remove unused code

* yarn install

* Remove jaeger-ui-components from CODEOWNERS and other tools

* Type fixes

* yarn install

* Remove mock that we no longer need

* Fix merge conflicts

* Re-add Apache license for trace view components

* Use an exclamation-circle instead of triangle to denote errors

* Remove eslint disables and update betterer results instead
2023-01-27 14:13:17 +00:00
Sven Grossmann
7c02d9bb8a Logs: Add experimental support to display a datasource custom UI in LogContext (#62189)
* add loki contextfilter component

* add `getLogRowContextUi` support to DataSourceAPI

* add `runContextQuery` to LogRowContextProvider

* pass `getRowContextUi` to `LogRowContext`

* adapt LogRowContext to show datasource ui

* implement LogRowContextUi in Loki

* add `logsContextDatasourceUi` feature flag

* change state to `Alpha`

* disable the feature if `logsContextDatasourceUi` is not set

* don't fetch labels in the constructor

* adjust to right height

* remove unnecessary eslint disable

* add test for LokiContextUi

* move code down in datasource.ts

* rename `refresh` to `runContextQuery`

* update datasource tests

* don't update if `updateFilter` fn changes

* organized imports in datasource.test.ts

* don't trigger on intialization changes

* change tag to `experimental`

* move `getLogRowContextUi` to props
2023-01-27 15:12:01 +01:00
Giuseppe Guerra
af1e2d68da Plugins: Allow loading panel plugins from a CDN (#59096)
* POC: Plugins CDN reverse proxy

* CDN proxy POC: changed env var names

* Add authorization: false for /public path in frontend plugin loader

* Moved CDN settings to Cfg, add some comments

* Fix error 500 in asset fetch if plugin is not using CDN

* Fix EnterpriseLicensePath declared twice

* Fix linter complaining about whitespaces

* Plugins CDN: Skip signature verification for CDN plugins

* Plugins CDN: Skip manifest and signature check for cdn plugins

* Plugins: use IsValid() and IsInternal() rather than equality checks

* Plugins CDN: remove comment

* Plugins CDN: Fix seeker can't seek when serving plugins from local fs

* Plugins CDN: add back error codes in getLocalPluginAssets

* Plugins CDN: call asset.Close() rather than asset.readSeekCloser.Close()

* Plugins CDN: Fix panic in JsonApiErr when errorMessageCoder wraps a nil error

* Plugins CDN: Add error handling to proxyCDNPluginAsset

* Plugins CDN: replace errorMessageCoder with errutil

* Plugins CDN POC: expose cdn plugin paths to frontend for system.js

* Plugins CDN: Fix cdn plugins showing as unsigned in frontend

* WIP: Add support for formatted URL

* Fix missing cdnPluginsBaseURLs in GrafanaConfig

* Plugins CDN: Remove reverse proxy mode and reverse proxy references

* Plugins CDN: Simplify asset serving logic

* Plugins CDN: sanitize redirect path

* Plugins CDN: Removed unused pluginAsset type

* Plugins CDN: Removed system.js changes

* Plugins CDN: Return different system.js baseURL and module for cdn plugins

* Plugins CDN: Ensure CDN is disabled for non-external plugins

* lint

* Plugins CDN: serve images and screenshots from CDN, refactoring

* Lint

* Plugins CDN: Fix URLs for system.js (baseUrl and module)

* Plugins CDN: Add more tests for RelativeURLForSystemJS

* Plugins CDN: Iterate only on apps when preloading

* Plugins CDN: Refactoring

* Plugins CDN: Add comments to url_constructor.go

* Plugins CDN: Update defaultHGPluginsCDNBaseURL

* Plugins CDN: undo extract meta from system js config

* refactor(plugins): migrate systemjs css plugin to typescript

* feat(plugins): introduce systemjs cdn loader plugin

* feat(plugins): add systemjs load type

* Plugins CDN: Removed RelativeURLForSystemJS

* Plugins CDN: Log backend redirect hits along with plugin info

* Plugins CDN: Add pluginsCDNBasePath to getFrontendSettingsMap

* feat(plugins): introduce cdn loading for angular plugins

* refactor(plugins): move systemjs cache buster into systemjsplugins directory

* Plugins CDN: Rename pluginsCDNBasePath to pluginsCDNBaseURL

* refactor(plugins): introduce pluginsCDNBaseURL to the frontend

* Plugins CDN: Renamed "cdn base path" to "cdn url template" in backend

* Plugins CDN: lint

* merge with main

* Instrumentation: Add prometheus counter for backend hits, log from Info to Warn

* Config: Changed key from plugins_cdn.url to plugins.plugins_cdn_base_url

* CDN: Add backend tests

* Lint: goimports

* Default CDN URL to empty string,

* Do not use CDN in setImages and module if the url template is empty

* CDN: Backend: Add test for frontend settings

* CDN: Do not log missing module.js warn if plugin is being loaded from CDN

* CDN: Add backend test for CDN plugin loader

* Removed 'cdn' signature level, switch to 'valid'

* Fix pfs.TestParseTreeTestdata for cdn plugin testdata dir

* Fix TestLoader_Load

* Fix gocyclo complexity of loadPlugins

* Plugins CDN: Moved prometheus metric to api package, removed asset_path label

* Fix missing  in config

* Changes after review

* Add pluginscdn.Service

* Fix tests

* Refactoring

* Moved all remaining CDN checks inside pluginscdn.Service

* CDN url constructor: Renamed stringURLFor to stringPath

* CDN: Moved asset URL functionality to assetpath service

* CDN: Renamed HasCDN() to IsEnabled()

* CDN: Replace assert with require

* CDN: Changes after review

* Assetpath: Handle url.Parse error

* Fix plugin_resource_test

* CDN: Change fallback redirect from 302 to 307

* goimports

* Fix tests

* Switch to contextmodel.ReqContext in plugins.go

Co-authored-by: Will Browne <will.browne@grafana.com>
Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com>
2023-01-27 15:08:17 +01:00
Karl Persson
c931b8031e SearchV2: Set correct batch limit when loading dashboards (#62314)
SearchV2: Set correct limit
2023-01-27 14:40:04 +01:00
Joey Tawadrous
591501ef3f Traces: Upgraded feature tracking (#62181)
Upgraded feature tracking
2023-01-27 13:33:27 +00:00
Eric Leijonmarck
27f0c9c70f Auth: Doc change url for getting JWT (#62319)
docs: change url for getting JWT
2023-01-27 14:26:35 +01:00
renovate[bot]
847a5ab195 Update dependency rc-slider to v10.1.0 (#62302)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-01-27 13:23:31 +00:00
Armand Grillet
f0a88e0609 Add SQLite performance limitation with alerting (#62296) 2023-01-27 14:22:47 +01:00
Gilles De Mey
54ff88463c Alerting: remove link to Grafana University (#62318) 2023-01-27 08:21:47 -05:00
Yaelle Chaudy
3281eb9223 [Navigation] Add user events for quick actions/dashboard actions (#62220)
Add fe events for quick actions/dashboard actions
2023-01-27 14:11:17 +01:00
Jack Westbrook
2f46317a2a Packages: Don't error if npm-artifacts directory already exists (#62303)
fix(packages): dont error if npm-artifacts directory already exists
2023-01-27 14:06:43 +01:00
Leon Sorokin
52955d88a7 TimeSeries: Fix log y scale when min/max settings don't land on divisors (#60768) 2023-01-27 05:52:01 -07:00
Oscar Kilhed
6bfd21ef0a FileDropzone: make a nicer looking error message when file size is exceeded (#62290)
* FileDropzone: make a nicer looking error message when file size is exceeded
2023-01-27 12:42:47 +00:00
George Robinson
b6db1ed524 Revert "Alerting: Add is_paused attr to the POST alert rule group endpoint" (#62310)
Revert "Alerting: Add is_paused attr to the POST alert rule group endpoint (#62253)"

This reverts commit 3ccafe3a5a.
2023-01-27 13:41:36 +01:00
Victor Marin
846acd28ff StateTimeline: Show correct legend label when value mappings set (#62282)
* StateTimeline: Show correct legend label when value mappings set

* Add test dashboard for thresholds and value mappings

* run stripnulls.sh
2023-01-27 14:30:42 +02:00
Torkel Ödegaard
bfcf936c38 QueryEditorRows: Remove double callback from onDataSourceChange (#62172)
* QueryEditorRows: Remove double callbacked from onDataSourceChange

* A few more updates

* Updated
2023-01-27 13:30:12 +01:00
renovate[bot]
1a28650aab Update dependency @testing-library/dom to v8.20.0 (#61677)
* Update dependency @testing-library/dom to v8.20.0

* do some lockfile surgery

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2023-01-27 12:28:09 +00:00
Ieva
eb9ef34272 RBAC: Permission check performance improvements for the new search (#60729)
* Add checker and update the resource filter function for new search

* Add tests for checker

* small fixes

* handle location for panels correctly

* clean up checker code and extend the tests for it

* more fixes, but tests don't quite work yet

* a small change to return error

* cleanup

* more simplification

* fix tests

* correct wrong argument ordering & use constant

* Apply suggestions from code review

Co-authored-by: Artur Wierzbicki <artur.wierzbicki@grafana.com>

* import

* check general folder from permission checker function

* handle root folder aka general folder properly

* update tests

* clean up

* lint

* add fix from main

Co-authored-by: Karl Persson <kalle.persson@grafana.com>
Co-authored-by: Artur Wierzbicki <artur.wierzbicki@grafana.com>
2023-01-27 12:12:30 +00:00
Oscar Kilhed
dab3fac01b Grafana DS: Fix dropzone showing upload file even if there is a file (#62200)
* Grafana DS: Fix dropzone showing upload file even if there is a file
2023-01-27 11:51:10 +00:00
Josh Hunt
960307e938 Search: Remember sorting preference between visits (#62248)
Search: Remember sort option between uses
2023-01-27 11:00:28 +00:00
Torkel Ödegaard
4deb10888e Revert "Transforms: Add join by fields" (#62278) 2023-01-27 11:58:18 +01:00
renovate[bot]
3d4cf06246 Update dependency rc-drawer to v6.1.2 (#62294)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-01-27 10:54:45 +00:00
Victor Marin
1464dd4095 Re-add RowHeight option to StatusHistory (#62293) 2023-01-27 12:52:32 +02:00
Josh Hunt
70f109526a Search: Store only search value in state, not the whole selectable value (#62228)
* Search: Store only search value in state, not the whole selectable value

* type sort to undefined-able
2023-01-27 10:50:48 +00:00
Andres Martinez Gotor
6292a41b24 Azure Monitor: Allow multi-value variables (#62238) 2023-01-27 11:40:49 +01:00
Karl Persson
3447ad2602 AuthN: support priority for post auth and post login hooks (#62208)
* AuthN: store post auth hooks in a priority list and update registration
function to take a priority

* AuthN: store post login hooks in a priority list and update registration function to take a priority

* AuthN: Change priority for sync user
2023-01-27 11:40:12 +01:00
renovate[bot]
14185ba819 Update d3 to v3 (#58315)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-01-27 11:19:35 +01:00
Joey Tawadrous
02098c1568 Tempo: Update docs and default Tempo metrics query (#62185)
Update docs and default tempo metrics query
2023-01-27 10:03:52 +00:00
Alex Moreno
3ccafe3a5a Alerting: Add is_paused attr to the POST alert rule group endpoint (#62253)
Add is_paused attr to the POST alert rule group endpoint
2023-01-27 10:50:06 +01:00
Levente Balogh
83ff974b86 Datasources: Add the props for the "add datasource" event (#62227)
chore: pass editLink to the add datasource user event
2023-01-27 10:47:18 +01:00
Jack Baldry
a54d18c1f5 Revert "Add Grafana tutorials originally from tutorials repository" (#62283)
Revert "Add Grafana tutorials originally from tutorials repository (#62124)"

This reverts commit f98ad926ac.
2023-01-27 09:25:57 +00:00
Ben Sully
5ff94e528b API: don't re-add /api suffix to grafana.com API URL (#62280)
The old GrafanaComURL setting didn't have the /api suffix so needed it
adding on by the proxy director, but the new GrafanaComAPIURL setting is
assumed to already point directly to the API and doesn't need an
additional suffix.

This is the only place in the codebase that GrafanaComAPIURL is used.
2023-01-27 10:20:55 +01:00
Jack Baldry
f98ad926ac Add Grafana tutorials originally from tutorials repository (#62124)
* Add Grafana tutorials originally from tutorials repository

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

* Replace tutorials/step shortcode with ordinary headings

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

* Fix typos reported by codespell

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

* Fix doc-validator linting and run prettier

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
2023-01-27 09:14:24 +00:00
Yuri Tseretyan
05bf241952 Alerting: Update state manager to return StateTransitions when Delete or Reset (#62264)
* update Delete and Reset methods to return state transitions

this will be used by notifier code to decide whether alert needs to be sent or not.

* update scheduler to provide reason to delete states and use transitions

* update FromAlertsStateToStoppedAlert to accept StateTransition and filter by old state

* fixup

* fix tests
2023-01-27 09:46:21 +01:00
Jack Baldry
6706f08ecd Replace grafana/docs-squad with more specific group grafana/docs-grafana (#62174) 2023-01-27 08:27:36 +00:00
Leon Sorokin
4c45dea71d Chore: uPlot 1.6.24 (#62279) 2023-01-27 02:12:19 -06:00
idafurjes
6c5a573772 Chore: Move ReqContext to contexthandler service (#62102)
* Chore: Move ReqContext to contexthandler service

* Rename package to contextmodel

* Generate ngalert files

* Remove unused imports
2023-01-27 08:50:36 +01:00
Matthew Jacobson
8379a29b53 Alerting: Improve comments on alert table migration immutability (#62161)
* Alerting: Improve comments around alert migration immutability

* Reunite alerting config history migrations
2023-01-26 16:13:08 -05:00
Guilherme Caulada
9a25a03e49 Tests: Add boilerplate code to support e2e tests on enterprise (#61959)
* Add e2e boilerplate for enterprise tests

* Remove enterprise symlink file

* Add tsconfig to e2e extensions folder and gitignore

* Update run-suite to use extensions folder

* Remove unnecessary tsconfig file

* Update e2e enterprise paths on gitignore

* Copy symlinked e2e enterprise files on run-suite

* Add cleanup command to run-suite

* Improve cleanup and setup for enterprise e2e tests

* Update e2e path for enterprise tests on gitignore

* Support to run different e2e tests for each license
2023-01-26 18:04:13 -03:00
Brett Buddin
a5a85e0398 InfluxDB: Send retention policy with InfluxQL queries if its been specified. (#62149)
* InfluxDB: Send retention policy with InfluQL queries if it's been specified.

In InfluxDB v2, due to technical limitations of the InfluxDB v1
compatibility layer, retention policies in a query (e.g. "<retention
policy>.<measurement_name>") aren't honored and must be specified in the
URL query parameter `rp` to be applied. Grafana doesn't send this query
parameter which results in all queries resolving to the default
retention policy when querying InfluxDB v2 servers using InfluxQL.

This addresses the issue by sending the `rp` query parameter for queries
that have specified a retention policy in the `target` given to
`runExploreQuery`.

The outcomes are:

1. InfluxQL queries executed against InfluxDB v2 databases will have the
   necessary retention policy information for queries like `SHOW FIELD
   KEYS FROM measurement` to function correctly.
2. InfluxQL queries executed against InfluxDB v1 databases will be
   unaffected, because this `rp` query parameter is unsupported there.

You can read more about the rentention policy mapping behavior of
InfluxDB v2 in our documentation:

- https://docs.influxdata.com/influxdb/v2.6/reference/api/influxdb-1x/dbrp/#when-querying-data
- https://docs.influxdata.com/influxdb/v2.6/reference/api/influxdb-1x/query/#query-a-non-default-retention-policy

* Use the ? operator

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

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2023-01-26 19:14:02 +01:00
brendamuir
a273c232a1 Alerting: fix default template link (#62251) 2023-01-26 17:45:09 +00:00
Alex Moreno
531b439cf1 Alerting: Add alert pausing feature (#60734)
* Add field in alert_rule model, add state to alert_instance model, and state to eval

* Remove paused state from eval package

* Skip paused alert rules in scheduler

* Add migration to add is_paused field to alert_rule table

* Convert to postable alerts only if not normal, pernding, or paused

* Handle paused eval results in state manager

* Add Paused state to eval package

* Add paused alerts logic in scheduler

* Skip alert on scheduler

* Remove paused status from eval package

* Apply suggestions from code review

Co-authored-by: George Robinson <george.robinson@grafana.com>

* Remove state

* Rethink schedule and manager for paused alerts

* Change return to continue

* Remove unused var

* Rethink alert pausing

* Paused alerts storing annotations

* Only add one state transition

* Revert boolean method renaming refactor

* Revert take image refactor

* Make registry errors public

* Revert method extraction for getting a folder title

* Revert variable renaming refactor

* Undo unnecessary changes

* Revert changes in test

* Remove IsPause check in PatchPartiLAlertRule function

* Use SetNormal to set state

* Fix text by returning to old behaviour on alert rule deletion

* Add test in schedule_unit_test.go to test ticks with paused alerts

* Add coment to clarify usage of context.Background()

* Add comment to clarify resetStateByRuleUID method usage

* Move rule get to a more limited scope

* Update pkg/services/ngalert/schedule/schedule.go

Co-authored-by: George Robinson <george.robinson@grafana.com>

* rum gofmt on pkg/services/ngalert/schedule/schedule.go

* Remove defer cancel for context

* Update pkg/services/ngalert/models/instance_test.go

Co-authored-by: Santiago <santiagohernandez.1997@gmail.com>

* Update pkg/services/ngalert/models/testing.go

Co-authored-by: Santiago <santiagohernandez.1997@gmail.com>

* Update pkg/services/ngalert/schedule/schedule_unit_test.go

Co-authored-by: Santiago <santiagohernandez.1997@gmail.com>

* Update pkg/services/ngalert/schedule/schedule_unit_test.go

Co-authored-by: Santiago <santiagohernandez.1997@gmail.com>

* Update pkg/services/ngalert/models/instance_test.go

Co-authored-by: Santiago <santiagohernandez.1997@gmail.com>

* skip scheduler rule state clean up on paused alert rule

* Update pkg/services/ngalert/schedule/schedule.go

Co-authored-by: Santiago <santiagohernandez.1997@gmail.com>

* Fix mock in test

* Add (hopefully) final suggestions

* Use error channel from recordAnnotationsSync to cancel context

* Run make gen-cue

* Place pause alert check in channel update after version check

* Reduce branching un update channel select

* Add if for error and move code inside if in state manager ResetStateByRuleUID

* Add reason to logs

* Update pkg/services/ngalert/schedule/schedule.go

Co-authored-by: George Robinson <george.robinson@grafana.com>

* Do not delete alert rule routine, just exit on eval if is paused

* Reduce branching and create-close a channel to avoid deadlocks

* Separate state deletion and state reset (includes history saving)

* Add current pause state in rule route in scheduler

* Split clearState and bring errCh closer to RecordStatesAsync call

* Change rule to ruleMeta in RecordStatesAsync

* copy state to be able to modify it

* Add timeout to context creation

* Shorten the timeout

* Use resetState is rule is paused and deleteState if rule is not paused

* Remove Empty state reason

* Save every rule change in historian

* Add tests for DeleteStateByRuleUID and ResetStateByRuleUID

* Remove useless line

* Remove outdated comment

Co-authored-by: George Robinson <george.robinson@grafana.com>
Co-authored-by: Santiago <santiagohernandez.1997@gmail.com>
Co-authored-by: Armand Grillet <2117580+armandgrillet@users.noreply.github.com>
2023-01-26 18:29:10 +01:00
Andrej Ocenas
039b30b1ea NodeGraph: Schema for panel options (#62121) 2023-01-26 18:02:41 +01:00
renovate[bot]
caaf7be2f2 Update dependency immutable to v4.2.2 (#62202)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-01-26 16:57:10 +00:00
Ashley Harrison
a344c88a01 Chore: don't create the npm-artifacts dir since yarn packages:pack does this… (#62246)
* don't create the npm-artifacts dir since yarn packages:pack does this already

* fix an any to trigger a canary build
2023-01-26 16:41:08 +00:00
Jo
284ca4eab4 AuthN: JWT remove unnecessary if (#62233)
remove unnecessary if
2023-01-26 17:32:20 +01:00
Jack Westbrook
5050822b9a Fix: NPM Package publishing (#62243)
* move packed packages to npm-artifacts dir

* remove unnecessary any to trigger canary build

* update canary script to create dir only if it does not exist

Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2023-01-26 16:18:05 +00:00
Matias Chomicki
641a7182e3 Loki Docker Devenv: Fix undefined variable in error message (#62242)
fix(loki-docker-devenv): fix undefined variable in error message
2023-01-26 16:15:11 +00:00
Gábor Farkas
16b816972b Elasticsearch: Deprecate raw document mode (#62236)
elasticsearch: deprecate raw-document-mode
2023-01-26 16:05:37 +00:00
Ivana Huckova
07bc2c32e9 Explore: Add feature tracking for split open in logs sample (#62241)
Explore: Add tracking for split open in logs sample
2023-01-26 15:53:19 +00:00
Sven Grossmann
01e6a0b4df Codeowners: Assign logs files to @grafana/observability-logs (#62239)
assign "logs" files to logs squad
2023-01-26 16:50:56 +01:00
Andrej Ocenas
a414b07991 Tempo: Trace to logs custom query with interpolation (#61702) 2023-01-26 16:37:16 +01:00
Dimitris Sotirakis
931dcda559 Chore: Update latest.json to 9.3.6 (#62235)
Chore: update latest.json to 9.3.6
2023-01-26 17:33:45 +02:00
Will Browne
42732539ed TestData: Introduce schema types (#62130)
* schematize data query

* add the stuff you dingus

* feat(testdatasource): add scenario to generated types

* use generated testdata query in frontend

* update code owners

* Add path exception for testdata datasource

* use specific numeric data types

* fix test

* fix e2e smoketest

* add test data query type

* use test data query type

* fix betterer

* Fix typo

* move to experimental

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

Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com>
Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
Co-authored-by: sam boyer <sdboyer@grafana.com>
Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>
2023-01-26 15:31:34 +00:00
Grot (@grafanabot)
0cd14091c4 Changelog: Updated changelog for 9.3.6 (#62231) 2023-01-26 17:25:21 +02:00
Ivana Huckova
8246fc64fa Explore: Trigger logs sample only when user click to see it (#62226)
LogSamples: Trigger log samples on user action
2023-01-26 16:23:13 +01:00
Jo
4bcd3b41ec Server: Remove unused services (#62015)
remove unused entries

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

Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com>
2023-01-26 16:13:22 +01:00
Sonia Aguilar
8bbef70363 Alerting: Fix recording rules being shown in the rules table on edit group modal (#62171)
* Fix recording rules being shown in the rules table on edit group modal

* Show no alerts message when there is not some non-recording rules and add tests

* Move specific mock constants to the test file
2023-01-26 16:11:29 +01:00
Ivana Huckova
ea1fcbb866 Explore: Add feature to open log sample in split view (#62097)
* Add tests

* Implement split open to see logs functionality

* Fix imports in test

* Update packages/grafana-data/src/types/logs.ts

Co-authored-by: Matias Chomicki <matyax@gmail.com>

* Update packages/grafana-data/src/types/logs.ts

Co-authored-by: Matias Chomicki <matyax@gmail.com>

* Update default scneario to throw error

* Exit early in getSupplementaryQuery

* Update public/app/features/explore/LogsSamplePanel.tsx

Co-authored-by: Matias Chomicki <matyax@gmail.com>
2023-01-26 16:06:10 +01:00
Ieva
5e1dc22f88 Chore: fix builds on main (#62218)
fix builds
2023-01-26 14:39:52 +00:00
Jack Baldry
f4be855e30 Update doc-validator to latest release (#62170)
* Update doc-validator to latest release

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

* Skip image validation

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
2023-01-26 14:29:26 +00:00
ying-jeanne
2eaa3fb4d2 [Xorm] remove oracle driver + unused function (#62125)
[Xorm] Some more clean up
2023-01-26 22:24:11 +08:00
Levente Balogh
995e2715ad Navigation: Fix finding the active nav item for plugins (#62123)
fix: look for the active page under children first
2023-01-26 14:10:09 +00:00
lean.dev
75ffbe422b Snapshots: Add new snapshot configuration to documentation (#62110)
* Add new snapshot configuration to documentation
Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
2023-01-26 11:06:35 -03:00
Ezequiel Victorero
354f6d9e23 Schema: Create PublicDashboard core kind (#62155) 2023-01-26 10:51:00 -03:00
Kristin Laemmert
e8b8a9e276 chore: move dashboard_acl models into dashboard service (#62151) 2023-01-26 08:46:30 -05:00
Eric Leijonmarck
c5cb5be3cc Auth: Fix catch both both ErrInvalidAPIKey for context with APIKey (#62193)
* fix: capture both ErrInvalidAPIKey

* rename of variable
2023-01-26 14:42:50 +01:00
lean.dev
7d8ec6199d Snapshots: Add snapshot enable config (#61587)
* Add config to remove Snapshot functionality (frontend is hidden and validation in the backend)
* Add test cases
* Remove unused mock on the test
* Moving Snapshot config from globar variables to settings.Cfg
* Removing warnings on code
2023-01-26 10:28:11 -03:00
renovate[bot]
928e2c9c9e Update dependency glob to v8.1.0 (#62186)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-01-26 13:24:35 +00:00
gotjosh
0bfe150928 Alerting: Fix Test Receivers when settings are non-strings (#62156)
* Alerting: Fix Test Receivers when settings are non-strings

As part of the Alerting extraction, we want to make sure we don't have circular depedencies. As such, I had to move `PostableGrafanaReceiver` to a new struct in `grafana/alerting` called `GrafanaReceiver`.

`PostableGrafanaReceiver` has an attribute called `Settings` that uses a Grafana-propietary struct called `RawMessage`, this struct shadows `json.RawMessage`.

When I created `GrafanaReceiver`, I turned settings into a `map[string]string` thinking all settings would end up as strings. This was a mistake, and this test proves that it doesn't work, and breaks the API.
2023-01-26 12:54:03 +00:00
Konrad Lalik
e8dd01df35 Alerting: Alert rules search improvements (#61398)
Co-authored-by: Gilles De Mey <gilles.de.mey@gmail.com>
2023-01-26 13:44:14 +01:00
Karl Persson
94dca85b30 Auth: Fix error check (#62192) 2023-01-26 12:35:08 +00:00
Virginia Cepeda
a20d1eec32 Alerting: validate alert condition on saving rule (#61958)
* Validate alert condition on saving rule

* Remove unused const
2023-01-26 09:27:08 -03:00
Ludovic Viaud
bfbc8c3c4f Transforms: Add join by fields (#61322) 2023-01-26 13:10:05 +01:00
Ashley Harrison
f7d92ab841 Navigation: only show the img for a section root if both img and icon are present (#62127)
only show an img for a section root if both img and icon are present
2023-01-26 12:07:43 +00:00
Ashley Harrison
a77c342764 Navigation: Add keyboard shortcut to search input (#62116)
* Show shortcut

* add icon to search bar, make same changes in search modal

* rename to modKey

Co-authored-by: joshhunt <josh@trtr.co>
2023-01-26 12:07:32 +00:00
Jack Westbrook
8f06784449 Chore: Bump d3-color to 3.1.0 (#61609)
* chore(d3-color): resolve all copies to 3.1.0 to fix vulnerability

* chore(yarn): fix resolution version

* chore(jest): compile d3-color from esm to cjs

* chore(d3): bump d3 to latest, set jest config to transpile es modules

* chore: bump visx packages to resolve d3-color to latest

* chore(jest): add missing es modules to config

* chore(storybook): prevent storybook config failure due to nested esm imports

* chore(storybook): use a direct path to avoid es modules breaking config build

* build(sass): use esbuild to generate sass theme vars for esm deps

* chore: clean up swc dependencies

* revert: remove debug console.log breaking tests
2023-01-26 13:02:22 +01:00
Ludovic Viaud
a3d93febd7 Transforms: Keep refId for labelsTopFields (#61916) 2023-01-26 12:55:13 +01:00
Andreas Christou
18465bc04f Bump code-coverage workflow version (#62182) 2023-01-26 11:04:00 +00:00
Josh Hunt
43828e829b Chore: Script to generate betterer issue summary (#61857)
* wip

* finish script

* limit by message

* fix filter message

* Add template

* improve template

* codeowners devdep
2023-01-26 10:48:33 +00:00
Ashley Harrison
64352e8d08 Chore: Move to node 18 again (#62079)
move to node 18 again
2023-01-26 10:19:39 +00:00
Torkel Ödegaard
9f7ddf1f0b QueryEditorRow: Fixes issue loading query editor when data source variable selected (#61927)
* QueryEditorRow: Fixes issue loading query editor when data source variable selected

* Fix func name

* Removed wait

* restore waiting for with better check

* restore waiting for with better check
2023-01-26 11:07:17 +01:00
Ashley Harrison
a3b396854a Navigation: Command palette topnav tweaks (#61991)
stylings tweaks to command palette
2023-01-26 10:03:16 +00:00
Joan López de la Franca Beltran
c4e067d49d Encryption: Cache new DEKs (only) after a caution period (#60664)
* Encryption: Cache new DEKs (only) after commit

* Fix typo

* Update secrets manager tests with new failing case

* Update secrets manager tests with new clarifications (comments)

* Correct broken method calls

* Unify methods

* Cache data keys only after a caution period

* Caution period for data keys caching only for encrypt ops
2023-01-26 10:54:31 +01:00
Dimitris Sotirakis
3a442610d2 Packages: Fix upload-packages case for Enterprise2 mode (#61772)
* Add corner case for Enterprise2

* Add versionMode corner case

* Fix lint

* Refactor

* Add tests

* Remove break

* Fix lint

* Return error instead of panicing

* Fix lint
2023-01-26 11:52:15 +02:00
Karl Persson
95ea4bad6f AuthN: Rebuild Authenticate so we only have to call it once in context handler (#61705)
* API: Add reqSignedIn to router groups

* AuthN: Add fall through in context handler

* AuthN: Add IsAnonymous field

* AuthN: add priority to context aware clients

* ContextHandler: Add comment

* AuthN: Add a simple priority queue

* AuthN: Add Name to client interface

* AuthN: register clients with function

* AuthN: update mock and fake to implement interface

* AuthN: rewrite test without reflection

* AuthN: add comment

* AuthN: fix queue insert

* AuthN: rewrite tests

* AuthN: make the queue generic so we can reuse it for hooks

* ContextHandler: Add fixme for auth headers

* AuthN: remove unused variable

* AuthN: use multierror

* AuthN: write proper tests for queue

* AuthN: Add queue item that can store the value and priority

Co-authored-by: Jo <joao.guerreiro@grafana.com>
2023-01-26 10:50:44 +01:00
Armand Grillet
95f052bbd1 Add handleGrafanaManagedAlerts jsonData (#61874)
* Add handleGrafanaManagedAlerts jsonData

* Update following feedback
2023-01-26 10:48:51 +01:00
Dominik Prokop
b9a1d8e5f9 Dashboard schema: Review and mature refresh property (#62104)
* Review and mature refresh property

* Update type

* Update report
2023-01-26 01:45:12 -08:00
Joey Tawadrous
1423f15b0d Tempo: Update column width for Loki search (#61924)
Update col widths
2023-01-26 09:35:44 +00:00
Victor Marin
ab7a4e5f28 Fix Barchart legend calcs when stacking is percent (#61449)
* Fix Barchart legend calcs when stacking is percent

* doc change

* Refactor + tests
2023-01-26 11:34:57 +02:00
George Robinson
a7eab8e46e Alerting: Support context.Context in Loki interface (#61979)
This commit adds support for canceleable contexts in the Loki
interface.
2023-01-26 09:31:20 +00:00
Ashley Harrison
e6e560e3ed Dropdown: Make escape close a dropdown (#62098)
* make escape close a dropdown

* make tab close the dropdown
2023-01-26 09:23:53 +00:00
Sofia Papagiannaki
cd27562c76 Access control: Modify dashboard/folder resolvers so that return also the inherited scopes (#62025)
* Access Control: Add folder service dependency to the dashboard/folder resolvers

* Expose the function fetching parents to folder interface

* Add generic prepend utility

* Modify dashboard resolvers to return inherited scopes
2023-01-26 10:21:10 +02:00
Torkel Ödegaard
8e3d22ca7a Chore: Fixes cleanNeedle regex to be more specific (#61967)
* Chore: Fixes code sec warning for frontend regex

* Update text.ts

* Update text.ts
2023-01-26 09:08:15 +01:00
Victor Marin
6a93c77082 Refactor state timeline/status history to cue model and refactor TimelineChart component (#61631)
* Adapt state timeline to scuemata

* Refactor status history to cue model

* Refactor

* Refactor TimelineChart as a core component

* wip

* Change as per CR

Co-authored-by: sam boyer <sdboyer@grafana.com>
2023-01-26 07:03:59 +00:00
Nathan Marrs
6c9174a766 Canvas: Fix connection anchors for svg elements (#61895) 2023-01-25 16:32:04 -08:00
Ryan McKinley
46c828c2d8 EntityAPI: Rename references from kind to family (#62044) 2023-01-25 23:42:04 +00:00
Oscar Kilhed
f3aa058886 XY Panel: Add and use schema for XY Panel configuration (#62148)
* Add schema for XYChart

* Minor cleanup

* remove unessecary fields from ScatterFieldConfigVeneer, and cleaning up more

* Fix counts

Co-authored-by: sam boyer <sdboyer@grafana.com>
2023-01-25 22:29:07 +00:00
Alexander Weaver
eb1293ebb1 Alerting: Re-generate swagger definitions (#62154)
Regenerate swagger, add body binding so parameters work
2023-01-25 15:01:42 -06:00
sam boyer
4a1d418157 Kindsys: Simpler PascalCase name handling (#62150) 2023-01-25 20:29:10 +00:00
Ryan McKinley
402345ac08 Chore: Fix dashboard service after refactor (#62153)
merge refactoring sequence
2023-01-25 19:52:01 +00:00
Ryan McKinley
4965cf2eda k8s: add feature toggle and stub to save dashboards k8s (#62053) 2023-01-25 11:10:16 -08:00
Ryan McKinley
a0405912a8 Preferences: Add preferences kind and remove unused navbar settings (#59621) 2023-01-25 11:00:32 -08:00
Nathan Marrs
8b574e22b5 SVG: Add dompurify preprocessor step (#62143)
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2023-01-25 10:37:29 -08:00
Kristin Laemmert
dd147a3c31 chore: move entity models into entity store service (#62145) 2023-01-25 12:43:22 -05:00
Alexander Weaver
046a9bb7c1 Alerting: Copy rule definitions into state history (#62032)
* Copy rules instead of accepting pointer

* Deep-copy the rule, for even more guarantees

* Create struct just for needed fields

* Move RuleMeta to historian/model package, iron out package dependencies

* Move tests for dash ID parsing to model package along with code
2023-01-25 11:29:57 -06:00
Hamas Shafiq
1f55a54543 Tempo: Create separate functions for querying the v1/v2 API for tag values (#61998) 2023-01-25 17:12:59 +00:00
Gabriel MABILLE
f99523048a Schema: Covering service accounts Core Kind (#62091)
* Adding service accounts schema

Co-authored-by: Eric Leijonmarck <eric.leijonmarck@gmail.com>

* Change metadata field

Co-authored-by: Eric Leijonmarck <eric.leijonmarck@gmail.com>

* Merging the two DTOs into one schema

Co-authored-by: Eric Leijonmarck <eric.leijonmarck@gmail.com>

* Eric dedup things

Co-authored-by: Eric Leijonmarck <eric.leijonmarck@gmail.com>

* Add optional to teams/created/updated

Co-authored-by: Eric Leijonmarck <eric.leijonmarck@gmail.com>

* Lower case the OrgId

Co-authored-by: Eric Leijonmarck <eric.leijonmarck@gmail.com>

Co-authored-by: Eric Leijonmarck <eric.leijonmarck@gmail.com>
2023-01-25 18:07:00 +01:00
Selene
3c073b00ec Schema: Fix interfaces with blank spaces (#62144)
Fixes interfaces with blank spaces
2023-01-25 17:03:46 +00:00
Taewoo K
069dc2d357 add export customHeadersSettings component (#62131) 2023-01-25 11:32:35 -05:00
Polina Boneva
08806924d8 [Chore] Add unit tests to PanelChrome component (#61695)
* PanelChrome: test loadingState and status

* add some tests

* fix error-related tests

* clean up

* fix tests

* pass aria-label from PanelChrome to ToolbarButton

* add prop comments and clean up
2023-01-25 18:29:53 +02:00
renovate[bot]
4dafdcbdc4 Update dependency fork-ts-checker-webpack-plugin to v7.3.0 (#62129)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-01-25 16:27:55 +00:00
Yuri Tseretyan
e2899dd6bd Docs: Update expression documentation to mention no data (#61934)
Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
2023-01-25 11:17:09 -05:00
Stephanie Hingtgen
0a1f31814a Plugins: add UI for more supported datasources with secure socks proxy feature toggle (#61962) 2023-01-25 08:39:17 -07:00
Dan Cech
0c8a2bbfd5 copy .github folder into golang build container since we rely on codeowners (#62122)
* copy .github folder into golang build container since we rely on codeowners

* remove .github for .dockerignore
2023-01-25 10:31:16 -05:00
Kristin Laemmert
7c27c866f6 chore: update folder model (json tags) to match previous model (#62117)
chore: update folder model to match previous model
2023-01-25 10:04:08 -05:00
ying-jeanne
b0b2b72290 [API Split] Move star api inside of packages (#61987)
move star api inside of packages
2023-01-25 14:58:54 +00:00
Isabella Siu
7c85db5bfa CloudWatch Logs: Set default logs query and disable button when empty (#61956) 2023-01-25 09:39:42 -05:00
juanicabanas
e46aa2e4e6 PublicDashboards: Footer alignment fix for Firefox browser (#62108)
footer x axis aligment fixed
2023-01-25 11:30:42 -03:00
Eric Leijonmarck
6bd11e0ebf Auth: Add skip_org_role_sync setting for github (#61673)
* add: skip_org_role_sync setting for github

* fix: frontend

* rearranged tests

* refactor: assignGrafanaAdmin skip also

* Add: tests for allowGrafanaAdmin

- both for the case when both settings are set and the setting for only
  allowGrafanaAdmin

* Apply suggestions from code review

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>

* Update docs/sources/setup-grafana/configure-grafana/_index.md

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>

* Update pkg/login/social/github_oauth.go

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

* added vairable inside scope

* Update docs/sources/setup-grafana/configure-security/configure-authentication/github/index.md

* Update docs/sources/setup-grafana/configure-security/configure-authentication/github/index.md

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
Co-authored-by: Ieva <ieva.vasiljeva@grafana.com>
2023-01-25 15:16:08 +01:00
idafurjes
529e6c379f Chore: Remove Result field from dashboard snapshot mode (#62089)
Chore: Remove Result field from dashboard snapshot mode;
2023-01-25 15:09:44 +01:00
Kyle Brandt
13de1afcbe API: Change how Cache-Control and related headers are set (#62021)
- change Cache-Control from no-cache to no-store
- do not set (and remove if set) older Pragma/Expires
2023-01-25 09:09:27 -05:00
Timur Olzhabayev
0d7e303809 Chore: Keeping the list of plugin executable complete (#60840)
* Keeping the list of executable complete

* Update pkg/plugins/storage/fs.go

Co-authored-by: Will Browne <wbrowne@users.noreply.github.com>

Co-authored-by: Will Browne <wbrowne@users.noreply.github.com>
2023-01-25 14:07:59 +00:00
Alexa V
85bf098fdb Dashboard schema: Review and mature fiscalYearStartMonth property (#62105) 2023-01-25 13:28:13 +00:00
Ben Sully
bd4e3f0d16 API: Correctly use new grafana_com.api_url setting in /api/gnet proxy (#60893)
During the review of the initial PR adding this (#59506) I removed
a new global variable from the setting package, but forgot to update
the reference to the new setting, so the API URL wasn't actually
being used. This PR updates the proxy endpoint to use the API
URL correctly.

Aside: I'm not a huge fan of how the error is being ignored when parsing
the URL, but I think that should be addressed in a separate PR if anyone
has a suggestion for how we should handle it. (Should we check that the
URL is valid when parsing config?)
2023-01-25 15:23:18 +02:00
renovate[bot]
c3cc236b56 Update dependency eslint to v8.32.0 (#61894)
* Update dependency eslint to v8.32.0

* update sdk

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2023-01-25 12:55:00 +00:00
Eric Leijonmarck
143ee0c49f Auth: Add skip_org_role_sync to GitLab OAuth (#62055)
* Auth: Add skip_org_role_sync to GitLab OAuth

- add: tests
- docs added

* Update pkg/login/social/gitlab_oauth.go

Co-authored-by: Karl Persson <kalle.persson@grafana.com>

* fix: for import

Co-authored-by: Karl Persson <kalle.persson@grafana.com>
2023-01-25 13:39:54 +01:00
Dominik Prokop
5f6616ff3e Dashboard schema: Review and mature graphTooltip property (#62082)
* Review and mature graphTooltip property of Dashboard kind

* Review
2023-01-25 03:40:53 -08:00
renovate[bot]
a6f0b69d6f Update dependency eslint-plugin-jest to v27.2.1 (#61523)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-01-25 11:34:35 +00:00
Will Browne
eb1fed7929 Plugins: Add plugin resource tests (#62014)
* remove plugin context from response

* remove integration test indicator
2023-01-25 10:45:52 +00:00
gotjosh
bbf7c0a147 Update alerting to the latest main (#62003) 2023-01-25 10:06:36 +00:00
Dimitris Sotirakis
b2b48398d0 Chore: update latest.json to 9.3.4 (#62080) 2023-01-25 11:57:18 +02:00
Grot (@grafanabot)
e05fc9212a Changelog: Updated changelog for 8.5.20 (#62073) 2023-01-25 10:44:12 +01:00
Torkel Ödegaard
504fec46d2 CommandPalette: Design tweaks and design fixes (#61971)
* Command palette design tweaks start

* Fix some item styling issues

* Updated placeholder

* Style fixes

* Fix gradient border pos issue, and heading padding

* Fix header top margin

* Restore padding

* Update

* Change to md modal
2023-01-25 10:38:33 +01:00
idafurjes
b54b80f473 Chore: Remove Result from dashboard models (#61997)
* Chore: Remove Result from dashboard models

* Fix lint tests

* Fix dashboard service tests

* Fix API tests

* Remove commented out code

* Chore: Merge main - cleanup
2023-01-25 10:36:26 +01:00
Grot (@grafanabot)
8c3e4487ba Changelog: Updated changelog for 9.3.4 (#62067) 2023-01-25 11:30:59 +02:00
Grot (@grafanabot)
87023c85cb Changelog: Updated changelog for 9.2.10 (#62066)
* Changelog: Updated changelog for 9.2.10

* Update CHANGELOG.md

* Update CHANGELOG.md

Co-authored-by: Horst Gutmann <horst.gutmann@grafana.com>
2023-01-25 10:26:30 +01:00
Sonia Aguilar
dbdd135298 Alerting: Fix recording rules showing alert notification information. (#61988)
* Fix recording rules form steps not showing alert information

* Fix docs about creating cloud and recording rules

* Update docs with suggested changes
2023-01-25 08:26:51 +00:00
Shirley
cd86758a35 CloudWatch: Use grafana-aws-sdk v0.12.0 (#62007) 2023-01-25 09:22:33 +01:00
Esteban Beltran
cebd71cc36 Docs: Update publish a plugin FAQ to cover more common questions (#62001) 2023-01-25 08:19:32 +00:00
idafurjes
421976e919 Chore: Remove folders from models pkg (#61853) 2023-01-25 09:14:32 +01:00
Adela Almasan
6bf1d06dba Canvas: Update scene and panel when entering panel view mode (#62043) 2023-01-24 18:41:08 -06:00
owensmallwood
dd597c3a1e PublicDashboards: Adds middleware for email sharing (#61950)
adds Share field to PublicDashboard model
2023-01-24 18:23:39 -06:00
Aashish Illa
fbfb79afce Explore: Changed references to DataQuery and DataSourceRef (#62034) 2023-01-24 15:11:00 -06:00
Christopher Moyer
0f93548ac4 Docs: corrects broken link to v9.0 docs (#62035)
corrects broken link to v9.0 docs
2023-01-24 14:32:14 -06:00
sam boyer
af1a264f85 dashboards: Mark dashboards team as kind owner (#62013)
* dashboards: Mark dashboards team as kind owner

* Update .github/CODEOWNERS

Co-authored-by: Ivan Ortega Alba <ivanortegaalba@gmail.com>

Co-authored-by: Ivan Ortega Alba <ivanortegaalba@gmail.com>
2023-01-24 15:07:17 -05:00
Hamas Shafiq
76e1946bd7 Tempo: [TraceQL] Do not override the status tag name (#62030) 2023-01-24 19:21:48 +00:00
Ivana Huckova
a0921f2e88 Explore: Implement logs sample in Explore (#61864)
* Implement log samples

* Explore: Implement logs sample panel

* Log samples: Add documentation

* Update docs

* Add info for log sample

* Fix label

* Update

* Default to true

* Fix copy in test

* Update public/app/features/explore/LogsSamplePanel.tsx

Co-authored-by: Sven Grossmann <sven.grossmann@grafana.com>

* Use timeZone from grafana/schema

* Rename data props to queryResponse

* Unify name to logs sample

* Remove redundant optional parameters in LogsSamplePanel

* Make intervalMs parameter optional in dataFrameToLogsModel and remove undefined argument when not needed

* Fix incorrect position of copy log line button

* Update public/app/core/logsModel.ts

Co-authored-by: Sven Grossmann <sven.grossmann@grafana.com>

Co-authored-by: Sven Grossmann <sven.grossmann@grafana.com>
2023-01-24 19:10:27 +01:00
Santiago
e5920c211e Chore: Fix random indices for slices in test files (#61884)
* Fix random indices for slices in test files

* Empty commit
2023-01-24 15:07:37 -03:00
Kristina
6ab79c4fba Explore: Be sure time range key bindings are mounted after clear (#61892)
* Add list of bindings for updating on change

* Revert "Add list of bindings for updating on change"

This reverts commit 092707371d.

* Clear keybindings before component render
2023-01-24 11:12:09 -06:00
Tania
3324be6fda Docs: Fix schema attributes formatting in schema docs (#62016)
Docs: Fix schema attributes formatting
2023-01-24 17:53:22 +01:00
Alex Khomenko
8e94eab9ff Schema: Move known shared types into the common (#61875)
* Setup shared types

* Expand field types

* Fix array type

* Add QueryResultMeta

* Add QueryResultBase

* Add DataFrameJSON

* Add DataSourcePluginMeta

* Update QueryResultMetaStat

* Add plugin cue and veneers

* Rexport dupliate types to fix errors

* Fix export

* Update types

* Remove data frame/plugin types

* Cleanup types

* Remove redundant type

* Remove data frame related types
2023-01-24 16:45:28 +00:00
Chris Marchbanks
f85d072c17 Datasources: Fix Proxy by UID Failing for UIDs with a Hyphen (#61723)
Fix Proxy by UID Failing for UIDs with a Hyphen

Hyphens are allowed in short IDs but not picked up by the
proxyPathRegexp. This caused the end of the uid to be proxied as part of
the path to the backing datasource which would usually cause a 404.
2023-01-24 17:15:52 +01:00
George Robinson
239d94205a Alerting: Return chan <-error for #61811 (#61858) 2023-01-24 15:41:38 +00:00
Levente Balogh
cc502bbfbd Connections: update the style of the cards (#61989) 2023-01-24 16:22:46 +01:00
Will Browne
958eea2f78 Plugins: Add backend target to instrumentation (#61980)
* add target

* fix test
2023-01-24 16:18:34 +01:00
Joan López de la Franca Beltran
6e126596e0 Kindsys: Include CODEOWNERS to Kinds report (#61978)
* Kindsys: Include CODEOWNERS to Kinds report

* Sort CODEOWNERS for the sake of reproducibility

* Fix linter complains
2023-01-24 15:53:01 +01:00
Josh Hunt
32ff95bde3 CommandPalette: Fix feature flag (#62000) 2023-01-24 15:52:12 +01:00
Andres Martinez Gotor
3e73ba5460 Azure Monitor: Adapt Advanced component to multiple resources (#61981) 2023-01-24 15:44:48 +01:00
Christopher Moyer
12a4a83c77 Docs: prose and format updates (#61720)
* wording and format updates

* corrects typo
2023-01-24 08:15:09 -06:00
Isabella Siu
814e485dd3 CloudWatch: Prevent log groups from being removed on query change (#61891) 2023-01-24 09:05:41 -05:00
Andres Martinez Gotor
d54cda62a3 Add debug option for Golang tests in vscode (#61983) 2023-01-24 14:44:44 +01:00
Josh Hunt
88347caf5f Navigation: Open command palette from search box (#61667)
* Reduce size of topnav search 'input' to 1/5th of the width, min width 200px

* Open command palette on topnav search box click

* Rename component

* fix comment

* feature flag the change

* update feature flag description
2023-01-24 12:41:09 +00:00
ying-jeanne
ec171bcad5 [xorm] Clean up xorm dialect & cascade (#61969)
clean up xorm dialect
2023-01-24 19:57:33 +08:00
Alex Khomenko
18e0a060e6 AlertGroups: Generate models.gen.ts from models.cue (#61227)
* AlertGroups: Generate models.gen.ts from models.cue

* Update structure

* Update report

* Fix filenames

* Add missing file
2023-01-24 13:46:35 +02:00
Oscar Kilhed
6c9d9a2db5 Table panel: Use link elements instead of div elements with on click events to aid with keyboard accessibility (#59393)
* TablePanel: fix image of image cell overflowing table cell when a data link is added
2023-01-24 12:42:40 +01:00
Andre Pereira
81c35560a8 Chore: Update the tempo devenv with the latest Tempo config changes (#61622)
* Update the tempo devenv with the latest Tempo config changes

* Remove some settings to instead use the default values

* Pin the Tempo image to the current latest version

Co-authored-by: Hamas Shafiq <hamas.shafiq@grafana.com>
2023-01-24 11:08:40 +00:00
Zoltán Bedi
4167214e35 Panel edit: Add feature to drag & drop spreadsheet files to the grafana datasource (#60586)
Co-authored-by: Oscar Kilhed <oscar.kilhed@grafana.com>
Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
Co-authored-by: Adela Almasan <adela.almasan@grafana.com>
2023-01-24 10:43:44 +01:00
Ashley Harrison
92a750a732 Chore: convert last test to RTL and remove Enzyme references (#61918)
convert last test to RTL and remove enzyme references
2023-01-24 09:20:47 +00:00
Joan López de la Franca Beltran
479da46a9e Kindsys: Include @grafanamaturity counts to Kinds report (#61911)
* Kindsys: Include @grafanamaturity counts to Kinds report

* Replace reflect.DeepEqual with regular (in)equality op

* Move reference check to its use (inline)

* Fix linter complains
2023-01-24 09:37:32 +01:00
Torkel Ödegaard
7c786c11e3 Home: Fixes breadcrumb for custom home dashboard (#61499)
* Home: Fixes breadcrumb for custom home dashboard

* restore using home page cfg setting
2023-01-24 09:33:12 +01:00
Torkel Ödegaard
38d3d1c02b Profile: Rename profile page from preferences to profile (#61777)
* Rename preferences to Profile

* Fixed tests and ran i18 extract
2023-01-24 09:32:49 +01:00
Sofia Papagiannaki
e5e8bb4dea Chore: Use same JSON tag casing everywhere for parent UID (#61935)
Chore: Use same JSON tag casing everywhere for parent UID
2023-01-24 10:20:28 +02:00
Sonia Aguilar
3b73b16245 Alerting: Add maxdatapoints in alert rule form (#61904)
Add maxdatapoints in alert rule form
2023-01-24 09:16:21 +01:00
Timur Olzhabayev
7ebbd01688 Linking criteria and adding file and env variables access (#61830)
* Linking criteria and adding file and env variables access

* Formatting

* Update docs/sources/developers/plugins/publish-a-plugin.md

Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>

Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
2023-01-24 07:37:56 +00:00
Joan López de la Franca Beltran
c621693db0 Kindsys: Include generated-code links to Kinds report (#61910)
* Kindsys: Include generated-code links to Kinds report

* Apply feedback suggestions
2023-01-24 01:47:42 +00:00
Selene
6f26333e96 Chore: Add cuefix hook (#61941)
* Add cue

* Add fix-cue target

* Add pre-commit hook

* fixup! Add fix-cue target

* Update the cue version

* Add datasources and panels folders

* Update cue files

Co-authored-by: Tania B <yalyna.ts@gmail.com>
2023-01-23 20:36:46 -05:00
Adela Almasan
f5743ea9ac Canvas: Improve arrow positioning when border is present (#61961) 2023-01-23 18:38:04 -06:00
Brendan O'Handley
1181d06b1b Graphite: Have metric name type query variable use metric render endpoint (#61730)
* have metric name query var use metric render endpoint

* add documentation for new query types
2023-01-23 18:13:22 -05:00
Alex Khomenko
3006a457f2 Geomap panel: Generate types (#61636) 2023-01-23 15:12:56 -08:00
Alexander Weaver
7ccc845187 Alerting: Push state history entries to Loki (#61724)
* Implement push endpoint

* Drop duplicated struct

* Genericize auth/tenant headers and improve logging in error case

* Flesh out the data model

* Drop dead code

* Drop log line entirely

* Drop unused arg

* Rename a few type manipulation functions

* Extract label keys as constants

* Improve logs when loki responds with error

* Inline lokiRepresentation function
2023-01-23 16:31:03 -06:00
jeremybanzhaf
3146740d82 Docs: Update index.md to not escape dollar sign (#61694)
Update index.md to not escape dollar sign

the backslash is useful in json files, but not where most users will see it
2023-01-23 15:57:11 -06:00
juanicabanas
949857f3b1 PublicDashboards: Footer position fix (#61954) 2023-01-23 17:30:20 -03:00
juanicabanas
9b5e396be2 PublicDashboards: Checkboxes list refactor (#61947) 2023-01-23 17:23:23 -03:00
Kristin Laemmert
fe27acc3a9 chore: move validations model into the validations service (#61953) 2023-01-23 15:10:14 -05:00
sam boyer
17aaf9f0d3 panels: Remove redundant import package from cue defs (#61949) 2023-01-23 14:28:44 -05:00
sam boyer
856abe1281 Kindsys: Add Ptr func (#61948) 2023-01-23 14:27:33 -05:00
Kristin Laemmert
6e9eb0d931 chore: move plugins models into pluginsettings svc (#61944) 2023-01-23 13:56:20 -05:00
sam boyer
48b620231e Kindsys: Unique names for composable kind TS types (#61928)
* Kindsys: Unique names for composable kind TS types

* Update all TS imports
2023-01-23 18:03:44 +00:00
juanicabanas
7875fadd31 GrafanaUI: Checkbox description fix (#61929) 2023-01-23 14:50:19 -03:00
Ashley Harrison
6b53f927b2 Navigation: truncate landing page descriptions to 3 lines (#61925)
* truncate landing page descriptions to 3 lines

* use correct css prop names
2023-01-23 17:07:36 +00:00
Joe Elliott
3eb065339f Tempo Datasource: Correct TraceQL docs link (#61931)
* correct link

Signed-off-by: Joe Elliott <number101010@gmail.com>

* lint

Signed-off-by: Joe Elliott <number101010@gmail.com>

Signed-off-by: Joe Elliott <number101010@gmail.com>
2023-01-23 16:59:55 +00:00
Kristin Laemmert
857649e30b chore: move models/licensing into licensing service (#61878) 2023-01-23 11:53:43 -05:00
Adela Almasan
50faeba07e Canvas: Connection heads not rendering consistently (#61887) 2023-01-23 10:51:55 -06:00
Denis Limarev
812c90ec69 Perfomance: Add preallocation for some slices (#61632) 2023-01-23 17:44:27 +01:00
Jo
46cbf9d24c SAML: Update deps (#61906) 2023-01-23 16:24:59 +00:00
Jo
1037ef28a9 SupportBundles: Access control guards (#61914)
* rename routes and fix access control for support bundles

* AccessControl: Hide menu if not authorized

* AccessControl: Add AC guards for create and delete

* lint
2023-01-23 16:23:20 +00:00
Sven Grossmann
c5610450b2 Elasticsearch: Fix failing requests when using SigV4 (#61923)
fix setting of `es` servicename
2023-01-23 16:43:55 +01:00
Hamas Shafiq
5eca966f45 Tempo: [TraceQL] Integrate the new tag values API (#61637)
* Tempo: [TraceQL] Integrate the new tag values API

* Use the exact string entered in the spanset

* Update a test & add a new test

* Empty commit
2023-01-23 15:39:56 +00:00
Joan López de la Franca Beltran
afef0c926c Loki: Push support for multi-tenancy mode (#60866)
* Loki: Add multitenancy support for the HTTP client

* Loki: Support to push with multitenancy mode

* Apply feedback suggestions
2023-01-23 16:24:22 +01:00
Gareth Dawson
35c7bbef57 Loki: Add ingester to the devenv loki config (#61844)
feat: update loki config
2023-01-23 15:09:57 +00:00
Horst Gutmann
739fcf1796 CI: Remove grabpl integration-tests (#61920)
These tests can also be run without it.
2023-01-23 16:00:31 +01:00
sam boyer
8ddedf475b Kindsys: Remove reference to DecoderCompactor (#61922) 2023-01-23 14:44:24 +00:00
Selene
1e5eae5fca Chore: Remove DecoderCompactor() (#61706)
* Remove ApplyFunc and set NoOptionalPointers to true

* Update go mod
2023-01-23 09:00:34 -05:00
sam boyer
f62f3cb0e9 Kindsys: Generate plugin Go types under a kinds/ dir (#61899)
Kindsys: Generate plugin Go types under kinds/
2023-01-23 08:56:00 -05:00
Kristin Laemmert
40feee0d17 chore: move alert-related models (#61716)
* chore: move alert notification models into the alerting service (alerting/models)
2023-01-23 08:19:25 -05:00
Joan López de la Franca Beltran
2b0de82aa9 SQLStore: Add test for nested transactions events (#60500)
* SQLStore: Add test for nested transactions events

* Replace fmt.Print* with t.Log*

* Add different test cases
2023-01-23 14:17:56 +01:00
Levente Balogh
4def287e62 Connections: Show the Dashboards tab under DataSource settings (#61841)
* fix: use the correct URL for editing datasource dashboards

* feat: show the Datasource/Dashboards page under Connections as well

* refactor: remove unnecessary `useNavModel()` utility

* feat: add a utility for creating the nav-model for DS settings tabs

* refactor: use nav-model crating utility in Edit Datasource
2023-01-23 13:25:42 +01:00
Andreas Christou
590d1f8a7d AzureMonitor: Move DefaultSubscriptions field to separate component (#61633)
* Move DefaultSubscriptions field to separate component

- Add separate component
- Update CredentialsForm
- Update tests
- Remove redundant test

* Remove defaultSubscriptionId

- Update MonitorConfig to appropriately set subscriptionId
- Update DefaultSubscription component to make use of JsonData
- Remove references to defaultSubscriptionId
- Update tests
- Update mockInstanceSettings for flexibility

* Review

- Add DefaultSubscription test and remove component from AzureCredentialsForm test
- Remove onCredentialsChange from DefaultSubscription
- Set subscription as a part of onSubscriptionChange
2023-01-23 12:19:48 +00:00
Sofia Papagiannaki
c7a7ebd3e0 Chore: Drop search service dependency from folder service (#61789)
* Chore: Drop search service dependency from folder service
2023-01-23 14:09:09 +02:00
Gábor Farkas
bedd0b311a elastic: improve error-messages, first step, tests only (#61847) 2023-01-23 12:46:52 +01:00
Jack Westbrook
3a7623753b Build: Replace babel-loader with esbuild-loader (#57837)
* build(webpack): replace babel-loader with esbuild-loader

* build(webpack): add esbuild minifier to production builds

* Wip

* Removed ngInject and replaced with manual inject params

* chore: bump esbuild to 0.15.13

* Fixed angular issues

* build(frontend): update esbuild to 0.16.16

* chore(webpack): support browserslist for esbuild

* build(esbuild): unify versions of esbuild to 0.16.17 and esbuild-loader to 2.21.0

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
2023-01-23 12:15:05 +01:00
Will Browne
59ef144e9e Plugins: Add file permission error check when attempting to verify plugin signature (#61860)
add permission err check
2023-01-23 12:01:10 +01:00
Karl Persson
50608db59a AuthN: Add interface and function to operate on clients that supports redirects (#61905) 2023-01-23 11:54:38 +01:00
Alexa V
db51e963de PanelChrome: Allow panel to be dragged if set as draggable from the outside (#61698) 2023-01-23 10:38:38 +00:00
Horst Gutmann
e32cd6d4ff CI: Add artifacts npm commands from grabpl (#61908) 2023-01-23 11:32:51 +01:00
gotjosh
0be920e61c Alerting: Remove unused code after importing from grafana/alerting (#61869)
* Alerting: Remove unused code after importing from grafana/alerting
2023-01-23 10:30:10 +00:00
Torkel Ödegaard
cd99bfec68 TopNav: Fixes breadcrumb issues and title for apps when topnav is disabled (#61835) 2023-01-23 11:03:28 +01:00
Torkel Ödegaard
97fc6c4eb4 Apps: Use plugin description as nav node subtitle (#61549) 2023-01-23 11:02:05 +01:00
Karl Persson
0942e0a815 RBAC: Rewrite data source api tests (#61783)
RBAC: Rewrite datasource rbac api tests
2023-01-23 10:54:29 +01:00
Ashley Harrison
253f9657cb Navigation: Change collapse icon + behaviour (#61496)
* adjust positioning and switch icon

* hide collapse button unless collapsed/focused

* use Button instead of IconButton
2023-01-23 09:30:28 +00:00
Ashley Harrison
a26bae45e1 Navigation: clean up colors in section nav (#61240)
* clean up colors in section nav

* just underline on hover/focus
2023-01-23 09:26:26 +00:00
Jack Westbrook
f0f3032edc Chore: Patch bump QS (#60508)
chore(yarn): patch bump qs to resolve dependabot alerts
2023-01-23 09:05:29 +00:00
Victor Marin
e6aaabed4d Docs: Update visualization and barchart panels (#61474)
* Update docs

* Regen cue model for barchart

* Fix docs

* models.cue renamed to composable_panelcfg.cue

* Rename 'Bar' to 'x-axis' in options UI

* run gen-cue
2023-01-23 10:49:41 +02:00
Jack Westbrook
1a97c79978 Chore: Bump Terser related dependencies (#60506)
chore(yarn): refresh lock file for all dependencies of terser
2023-01-23 08:47:48 +00:00
Ivan Ortega Alba
5bfe098b0a test: use deterministic timestamp to compare snapshots (#61670) 2023-01-23 09:44:10 +01:00
Tania
5f93e67419 Codegen: Generate docs for composable kinds (#61719)
* Generate docs for composable kinds

* Fix getting the kind schema

* Generate composable kinds docs

* Add disclaimer to the generated docs

* Change docs disclaimer
2023-01-22 18:58:49 -05:00
Nathan Marrs
65127d4913 Canvas: Update readme with link to docs (#61812) 2023-01-20 21:22:56 -08:00
Ryan McKinley
624e5dbed2 EntityAPI: Save nested summary info in the SQL database (#61732) 2023-01-21 00:00:17 +00:00
Adela Almasan
c4090c579d Canvas: Rectangle render error (#61883) 2023-01-20 15:29:37 -06:00
Adam Simpson
92936d3a72 Chore: update @grafana/experimental to 1.1.0 (#61820)
The main goal is to bring in changes that address a11y issue #56561.

This also fixes any ts errors.
2023-01-20 20:06:51 +00:00
Kristin Laemmert
cd08f2575a chore: move jwt models into auth/jwt (#61862)
* chore: move jwt models into auth/jwt
2023-01-20 13:11:06 -05:00
Matt Dodson
fb6df56464 Docs: rewrite data source intro (#61639)
* Docs: rewrite data source intro

- Include more than just "databases", which was overly narrow
- Try to make doc a "TL;DR" of the essential information

* docs, link data source to build plugin task

* Reduce jargon and sentence length

* Link out to different features

* Data source, docs turn examples into list

And trim language

* Better phrasing to introduce query editor

Old way implied that Grafana provides all query editors,
which isn't true of custom plugins.

* use relref for in-repo anchor

* remove double "in"

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

* Simplify list

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

* Restructure intro, clarify plugins and their URLs

* Add and configure

It's sometimes both.

* Apply suggestions from code review

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>

* makes prettier

Co-authored-by: Eve Meelan <81647476+Eve832@users.noreply.github.com>
Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
Co-authored-by: Chris Moyer <chris.moyer@grafana.com>
2023-01-20 11:36:12 -06:00
Kyle Brandt
5bb38293d2 SSE/Prom: Undo empty frame change that triggers 500s in SSE (#61871)
added in https://github.com/grafana/grafana/pull/61643
2023-01-20 17:32:14 +00:00
Jo
7a9793ec0e SupportBundles: Fix collector typos and change defaults (#61850)
fix collector typos and change defaults
2023-01-20 16:33:29 +00:00
Adela Almasan
cef15873d6 Canvas: Add tooltip for data links (#61648) 2023-01-20 16:26:51 +00:00
Selene
c1251311d0 Chore: Fix cue imports when we don't use an alias (#61795)
Fix cue imports when we don't use an alias
2023-01-20 17:04:44 +01:00
Andres Martinez Gotor
b1efd911c1 AzureMonitor: Fix feature flag (#61863) 2023-01-20 15:29:23 +00:00
Matias Chomicki
87f8e7e223 Query Builder: Fix max width of input component to prevent overflows (#61798)
* fix(auto-size-input): return maxWidth when realWidth exceeds limit

* fix(query-builder): sex madWidth for simple editor component

* fix(auto-size-input): add unit test
2023-01-20 15:25:01 +00:00
Yuri Tseretyan
c0913ce718 SSE: Fix math expression to support NoData results (#61721)
* update perFloat to support NoData
* update union to correctly handle no-data
2023-01-20 09:53:03 -05:00
zsrv
d0cf7ff8e9 Docs: Use the correct name for the feedback_links_enabled option (#61825)
Also updates the description to be more in line with the style conventions.
2023-01-20 08:33:54 -06:00
idafurjes
68445a7c77 Chore: Remove dashboard ACL from models (#61749)
* Remove dashboard ACL from models

* Remove unused comment
2023-01-20 14:58:47 +01:00
Ivana Huckova
c106c7700b Explore: Create DataSourceWithSupplementaryQueriesSupport interface to support log volume and samples (#61298)
* Create DataSourceWithLogsSampleSupport check and move to 1 place

* Add new SupplementaryQueryType

* Add and change utility functions for loading, storing ancd checking supp queries

* Add logic to redux for processing of new type of supp query

* Implement queryLogsSample used to run samples queries

* Fix tests to include also Log samples

* Add tests

* Temporarily, default to false

* Change comment

* Fix lint error

* Refactor handling of supplementary queries in query.ts

* Fix looping over array

* Remove changes for any => unknowns as in utils.ts

* Fix logic

* Fix incorrect imports after function was moved to different file

* Migrate old log volume key

* Update public/app/features/explore/utils/supplementaryQueries.ts

Co-authored-by: Piotr Jamróz <pm.jamroz@gmail.com>

* Refactor to use DataSourceWithSupplementaryQueriesSupport

* Refactor, improve tests,  change internal API

* Update packages/grafana-data/src/types/logs.ts

Co-authored-by: Piotr Jamróz <pm.jamroz@gmail.com>

* Add deprecation for DataSourceWithLogsVolumeSupport, but still support it

* Update comment with correct new issue

Co-authored-by: Piotr Jamróz <pm.jamroz@gmail.com>
2023-01-20 14:20:49 +01:00
Joey Tawadrous
e517cc0cea Flame graph: Search with uFuzzy (#61748) 2023-01-20 12:57:31 +00:00
Torkel Ödegaard
ce879ac8e1 Explore: Keyboard shortcut to go to explore (#61837) 2023-01-20 13:54:58 +01:00
Armand Grillet
a960b55a99 Update link to provisioning docs (#61840)
Update links to provisioning docs
2023-01-20 12:55:27 +01:00
Andres Martinez Gotor
d4e0e75c0c Azure Monitor: Fix frame display name with multiple resources (#61750) 2023-01-20 12:20:01 +01:00
Ruud van der Weijde
b44df6c8d1 ElasticSearch: Improve ES error handling message (#61471)
Look for 'caused_by.reason' in ES error response

When the ES response does not contain `reason` or `root_cause[0].reason`
is empty, there is no information for the user to know what is going
wrong.

An example of the error message after this change:
```
Failed to evaluate queries and expressions: failed to execute query A: Trying to create too many buckets. Must be less than or equal to: [65536] but this number of buckets was exceeded. This limit can be set by changing the [search.max_buckets] cluster level setting.
```

Related to https://github.com/grafana/grafana/issues/61246
2023-01-20 11:46:31 +01:00
Andres Martinez Gotor
3e86a1b3d9 Azure Monitor: Implement logic to allow multiple selection (#61740) 2023-01-20 11:19:31 +01:00
Ivana Huckova
46722679b5 Elasticsearch: Fix creating of span link with no tags (#61753)
Elasticsearch: Fix create span link if no tags
2023-01-20 10:52:33 +01:00
sam boyer
3b3059c9ce Kindsys: Unify plugins, pfs with kind framework (#61192)
* New pfs impl

* Reached codegen parity with old system

* Update all models.cue inputs

* Rename all models.cue files

* Remove unused prefixfs

* Changes Queries->DataQuery schema interface

* Recodegen

* All tests passing, nearly good now

* Add SchemaInterface to kindsys props

* Add pascal name deriver

* Relocate plugin cue files again

* Clarify use of injected fields

* Remove unnecessary aliasing

* Move DataQuery into mudball

* Allow forcing ExpandReferences on go type generation

* Move DataQuery def into kindsys, add generator to copy it to common

* Fix copy generator to replace package name correctly

* Fix duplicate type, test failure

* Fix linting issues
2023-01-20 09:41:35 +00:00
Sven Grossmann
6a7cbeae6c Logs: Adjust documentation for new log details (#61311)
* update doc

* fix capitalisation and formatting of headings

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>

* fix capitalisation and formatting

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
2023-01-20 10:16:50 +01:00
Jo
caae4fd034 SupportBundles: Add config enablement (#61776)
* wip

* implement role middleware drop

* remove not implement feature

* change grants based on config

* Update pkg/services/supportbundles/supportbundlesimpl/models.go

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

Co-authored-by: Ieva <ieva.vasiljeva@grafana.com>
2023-01-20 08:59:15 +00:00
renovate[bot]
9faab75668 Update dependency eslint-plugin-jsx-a11y to v6.7.1 (#61525)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-01-20 09:13:24 +01:00
Levente Balogh
9d4e940097 Connections: Don't use gridSize directly in styling (#61684)
refactor: don't use gridSize directly
2023-01-20 09:01:51 +01:00
Usman Ahmad
6c6c0f5402 Update _index.md (#61662)
* Update _index.md

The troubleshooting page was missing how to send dashboard panels for debugging so added it here.

* Update docs/sources/troubleshooting/_index.md

* Update docs/sources/troubleshooting/_index.md

* removed empty lines

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
Co-authored-by: Chris Moyer <chris.moyer@grafana.com>
2023-01-20 04:10:28 +00:00
Julien Duchesne
efb98bcb99 Packaging: Use base64 key (#61802)
The tools in this repo need base64 but not in most other tools. I had to revert the change I made to the key
I created another key for base64 that we can use here
Follow-up to https://github.com/grafana/grafana/pull/61784
2023-01-19 15:03:19 -07:00
Isabel
9223fe5ca8 update adding new panel wording (#61817)
updated adding new panel wording
2023-01-19 13:45:07 -08:00
Ryan McKinley
c315946a91 SearchV2: Fix star query when no stars exist (#61726) 2023-01-19 21:37:06 +00:00
Gilles De Mey
845128dde9 Alerting: Swap templates and contact points places (#61808)
Alerting: swap templates and contact points places
2023-01-19 21:51:45 +01:00
gotjosh
511dab3b4b Update grafana/alerting to the latest main (#61810)
* Update `grafana/alerting` to the latest main

Also updates prometheus-alertmanager since we use that one directly for some structs.
2023-01-19 20:44:49 +00:00
Drew Slobodnjak
f1bb108ae5 Geomap: Update readme to include doc link (#61258) 2023-01-19 12:27:45 -08:00
Drew Slobodnjak
516bdddcb5 Canvas: Add server element (#61104)
Co-authored-by: nmarrs <nathanielmarrs@gmail.com>
2023-01-19 12:03:17 -08:00
Erik Sundell
78184f37c4 Cloudwatch: Restructure languages in plugin root (#61490)
Co-authored-by: Isabella Siu <isabella.siu@grafana.com>
2023-01-19 14:04:28 -05:00
Adela Almasan
da7bf56c03 Canvas: Inconsistent border behavior (#61794) 2023-01-19 12:43:22 -06:00
Jo
e2ec219f6a SecretScan: Remove placeholder image and polish errors (#61785)
* remove placeholder image

* improve http client options

* add http clients options for webhook notifier

* ensure http is only used in dev mode

* cleanup errors
2023-01-19 18:33:27 +01:00
tonypowa
ed076adde5 ISSUE_TRIAGE.md: update (#60299)
* updated section #2

- added current bug issue template bullet points to # Bug reports subsection
- updated enhancement requests' subsection by adding info regarding GH discussions
- added link to WCAG criteria in Accessibility issues subsection
- linked Support requests' subsection  to section  # 3 Categorizing an issue/#support-requests subsection

* made changes as suggested

* updated sections 2, 3, 5

updating as discussed with Natalia
included feedback by Melori

* updated flowchart

* reupdated flowchart

* resolved pending comments

* run prettier command on triage doc
2023-01-19 18:21:36 +01:00
idafurjes
8cbcdf1c26 Remove live.go from models (#61742)
* Remove live.go from models

* Change Id to ID

* Add xorm tags
2023-01-19 18:10:40 +01:00
Sofia Papagiannaki
c104cc7020 Chore: Split folder store and dashboard store interfaces (#61655)
* update folder store mock

* Split folder store and dashboard store interfaces
2023-01-19 18:38:07 +02:00
Sonia Aguilar
a6102105af Alerting: Fix QueryAndExpressionStep not using the right query (#61738)
Fix QueryAndExpressionStep not using the right query
2023-01-19 17:33:32 +01:00
Stephanie Hingtgen
3b718a3e8f Plugins: enable the plugin sdk to get the json data for all datasources (#61729) 2023-01-19 08:49:45 -07:00
Julien Duchesne
be4c969337 Use new GPG key when publishing (#61784)
The old key is revoked: https://grafana.com/blog/2023/01/12/grafana-labs-update-regarding-circleci-security-updates/
But it's added as a manual Drone repo secret
This switches to the new gpg key that's also used to publish to apt.grafana.com
2023-01-19 15:30:05 +00:00
Andrej Ocenas
d8273eeb6b Parca: Use client dependency from buf.dev instead of generated sources (#60969) 2023-01-19 16:26:00 +01:00
Andreas Christou
d50f206677 AzureMonitor: Correctly select template variable values in E2E (#61780)
Correctly select values
2023-01-19 15:21:25 +00:00
linoman
56c2755b3b Fix JWT claims request (#61650)
* Fix JWT claims request

* Add test scenarios for missing config options
2023-01-19 16:03:09 +01:00
Hamas Shafiq
f28a437eb2 Chore: No longer refer to Node Graph as being in beta (#61775) 2023-01-19 14:56:39 +00:00
Alexander Zobnin
60ef88c918 SAML: Support auto login (#61685)
* SAML: Support auto login

* Add individual auto_login option for each OAuth provider

* Docs: Describe new auto_login option

* Minor refactor
2023-01-19 15:53:02 +01:00
Ieva
06350ed887 RBAC: remove the usage of access control mock from preference tests (#61709)
remove the usage of access control mock from preference tests
2023-01-19 14:43:00 +00:00
Torkel Ödegaard
70c17f212f DashList: Use blue link color on hover instead underline (#61282)
* Use blue on hover

* Updated

* Updated
2023-01-19 15:22:11 +01:00
Torkel Ödegaard
9b82e65b7a TablePanel: Refactor to functional component and move add ad hoc filter action to PanelContext (#61360)
* FieldOptions: Add filterable as registry added field item

* Refactor to functional component, move ad hoc filter to PanelStateWrapper

* review tweaks
2023-01-19 14:03:13 +01:00
Ivan Ortega Alba
29f8722c91 PanelChrome: Allow hovering on description when status error is visible (#61757) 2023-01-19 14:01:36 +01:00
Karl Persson
c5c34ed95e RBAC: Rewrite provisioning rbac tests (#61752)
* RBAC: Rewrite rbac provisioning api tests
2023-01-19 13:49:57 +01:00
Sven Grossmann
fd70f6034f Logs: Lines with long words do not break properly (#61707)
really break anywhere
2023-01-19 12:56:44 +01:00
Sven Grossmann
dd8f95a201 Elasticsearch: Fix toggle-settings are not shown correctly (#61751)
* changed `checked` propery to `value`

* revert changing the prop in the event
2023-01-19 12:32:02 +01:00
Alexa V
134ca6bb8f [Panel] Extract styling duplication in new TitleItem component (#61625) 2023-01-19 11:03:56 +00:00
Karl Persson
f38e2856d8 RBAC: Rewrite admin api test setup to not use mocked access control (#61741)
* RBAC: Rewrite admin api test setup to not use mocked access control
2023-01-19 11:36:44 +01:00
Artur Wierzbicki
c4ef47a70e Chore: update CODEOWNERS for edge & multitenancy squads (#61672)
update codeowners
2023-01-19 14:16:14 +04:00
Karl Persson
f5397a7c31 RBAC: Rewrite ldap rbac tests (#61743) 2023-01-19 11:09:26 +01:00
Alexander Weaver
c10713ea76 Alerting: Create query interface for state history along with annotation-based implementation (#61646) 2023-01-19 10:45:31 +01:00
idafurjes
cacc55ba06 Chore: Remove live from models (#61711) 2023-01-19 10:03:14 +01:00
Eric Leijonmarck
0d42edddbf Auth: Add skip_org_role_sync setting to OAuth integration Google (#61572)
* WIP

* Add: skip_org_role_sync for Google OAuth

- add setting for frontend
- add read of config
- add config to sample and default

* add: docs

* spelling

* Update pkg/login/social/social.go

* Apply suggestions from code review

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>

* Update docs/sources/setup-grafana/configure-grafana/_index.md

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>

* removed unnessecary line

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
2023-01-19 09:54:22 +01:00
yusuf-multhan
50df85189c Variables: Allow user to filter values in dropdown using white space (#60622)
Fix #60589
2023-01-19 09:53:14 +01:00
Andres Martinez Gotor
6d9e082f27 Azure Monitor: Adapt ResourceField to multiple resources (#61618) 2023-01-19 09:46:07 +01:00
Sven Grossmann
faf07716ee Loki: Use tsdb index in devenv (#61737)
update loki config to use new TSDB
2023-01-19 09:29:09 +01:00
ismail simsek
29c8ce12a0 Prometheus: Fix handling errors in streaming client (#61643)
* Return errors from data parsing

* Better error handling

* Fix the tests

* When there is no frame add empty frame to get metadata attached to it

* Fix tests

* Update testdata
2023-01-18 22:30:15 +01:00
Yuri Tseretyan
2c46f46d37 Alerting: Rule evaluator to get cached data source info (#61305)
do not skip cache when get data source info
2023-01-18 14:25:11 -05:00
Jean-Philippe Quéméner
44b11d3228 Alerting: support basic auth for the state history loki client (#61696) 2023-01-18 20:24:40 +01:00
Hamas Shafiq
7f4b2fcb9c Chore: Convert VirtualizedTraceView.test.tsx to RTL (#61589)
* Chore: Convert VirtualizedTraceView.test.tsx to RTL

* Don't need to change shared component

Co-authored-by: André Pereira <adrapereira@gmail.com>
2023-01-18 18:13:26 +00:00
Yuri Tseretyan
5e8866ed5a SSE: DSNode to parse only one response (#61644)
* do not iterate through responses
* log type of the response in all exit cases
2023-01-18 13:06:10 -05:00
owensmallwood
593e8ae17c PublicDashboards: Page to request access to protected pubdash (#61329)
Adds page to request pubdash access via email
2023-01-18 11:57:34 -06:00
sam boyer
492bdbd585 Kindsys: Rename mudball to common schemas, allow multiple input cue files (#61703)
* kindsys: Rename mudball to common schemas

* Update all core plugin imports

* Add missed table types

* Remove invalid JSON comment

* Remove coremodel dir from codeowners
2023-01-18 17:40:22 +00:00
Yuri Tseretyan
ef6d73e575 SSE: Resample command to support NoData (#61708)
* add test for nil value
2023-01-18 12:39:38 -05:00
George Robinson
d4256b352d Docs: Rename Message templates to Notification templates (#59477)
This commit renames "Message templates" to "Notification templates"
in the user interface as it suggests that these templates cannot
be used to template anything other than the message. However, message
templates are much more general and can be used to template other fields
too such as the subject of an email, or the title of a Slack message.
2023-01-18 17:26:34 +00:00
Will Browne
c54aa18cd8 Plugins: Add tailored interface for plugins licensing needs (#61045)
* tailored licensing service

* appease linter

* fix

* retrigger
2023-01-18 18:02:54 +01:00
sam boyer
61d8ab71a3 Dashboards: Promote dashboard kind to experimental maturity (#61693) 2023-01-18 11:36:35 -05:00
Ezequiel Victorero
5fb4a7f3b6 PublicDashboards: add timeSettingsEnabled on saving a public dashboard (#61701) 2023-01-18 16:03:41 +00:00
Sofia Papagiannaki
4b634fadcf Chore: Fix Swagger and OpenAPI specifications (#61669)
* Add go-swagger annotations for route

* Re-generate Swagger and OpenAPI specs
2023-01-18 17:49:07 +02:00
Sofia Papagiannaki
b80c9bb974 Chore: Drop dashboard service dependency from folder service (#61614)
* Chore: Drop dashboard dependency from folder service
2023-01-18 17:47:59 +02:00
Christian Simon
a1f2d0e205 Prometheus: Reduce allocations parsing exemplars (#58959)
* Prometheus: Reduce allocations parsing exemplars

This reduces allocations for parsing exemplars.

name            old time/op    new time/op    delta
ExemplarJson-8    24.7ms ±15%    17.6ms ± 2%  -28.72%  (p=0.008 n=5+5)

name            old alloc/op   new alloc/op   delta
ExemplarJson-8    4.70MB ± 0%    3.58MB ± 0%  -23.79%  (p=0.008 n=5+5)

name            old allocs/op  new allocs/op  delta
ExemplarJson-8     72.6k ± 0%     69.1k ± 0%   -4.81%  (p=0.008 n=5+5)

* Ensure pairs is reset
2023-01-18 16:42:22 +01:00
Alexander Zobnin
1fdd3767f1 RBAC: Add permission to get usage report preview (#61570)
* AccessControl: Protect usage report preview endpoint

* Fix role display name

* Change action name

* Fix imports
2023-01-18 16:07:36 +01:00
Josh Hunt
959c89793f Chore: eslint rule for preventing e2e selectors in aria-label (#59731)
* Create eslint plugin/rule for catching e2e selectors in aria-label

* Add no-aria-label-e2e-selectors to betterer

* chore: skip levitate for the `grafana-eslint-rules` package

* Fix rule

* Add readme

* Add Apache 2 license

* Typecheck using @typescript-eslint/utils

* actually export the rule

Co-authored-by: Levente Balogh <balogh.levente.hu@gmail.com>
2023-01-18 15:02:35 +00:00
Eric Leijonmarck
bedd2304d1 Auth: Fix disable/remove duplicate user entries metrics for performance reasons (#61675)
* fix: remove metrics from duplicate user entries

* fix: disable metrics collection for authinfo

* fix: initifine goroutine loop that happened

* removed: metrics
2023-01-18 16:01:47 +01:00
Serge Zaitsev
fa36591380 Chore: Remove mockstore and use dbtest instead (#61629)
* remove mockstore and use dbtest instead

* fix wire

* remove unused expected fields

* fix more tests in alerting

* fix api tests
2023-01-18 16:01:25 +01:00
Matias Chomicki
89e77d072f Loki Query Builder: Fix bug parsing range params (#61678)
feat(loki-query-builder): fix bug parsing range params
2023-01-18 15:54:18 +01:00
Leonard Gram
d042c0b30b Docs: Renderer token (#59560)
* Docs: renderer token

* Apply suggestions from code review

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>

* Update docs/sources/setup-grafana/image-rendering/_index.md

* Update docs/sources/setup-grafana/configure-grafana/_index.md

* makes prettier

Co-authored-by: Joan López de la Franca Beltran <joanjan14@gmail.com>
Co-authored-by: Joan López de la Franca Beltran <5459617+joanlopez@users.noreply.github.com>
Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
Co-authored-by: Chris Moyer <chris.moyer@grafana.com>
2023-01-18 15:38:16 +01:00
Levente Balogh
4ef82dc73f Connections: Show a "No access" modal if the user has no permissions (#61397)
* feat: add a new modal for displaying no-access info

* feat(CardGrid): add an onClick handler for items

* feat: open a no-access modal when clicking on a connection in the catlog

* feat: update permissions

Open a "No access" modal when the user clicks a connection type but has no permissions creating a datasource out of it

* test: add tests for opening the No Access modal

* test: fix the user permissions in tests

* Wip

* Revert "Wip"

This reverts commit 7f080c7f77.
2023-01-18 15:34:23 +01:00
Hamas Shafiq
58a86133af Chore: Convert ListView/index.test.tsx to RTL (#61590)
* Chore: Convert ListView/index.test.tsx to RTL

* Update .better.results

Co-authored-by: André Pereira <adrapereira@gmail.com>
2023-01-18 14:10:31 +00:00
juanicabanas
18e8d1e28d PublicDashboards: Time range settings (#61585) 2023-01-18 10:54:19 -03:00
Karl Persson
1454b1b40a Reqcontext: Add methods to write responses bases on errutil.Error (#60889)
* ReqContext: Add methods to reqcontext used to handle errutil.Error

* ReqContext: Pass all public field in response from errutil.Error
2023-01-18 14:29:23 +01:00
linoman
4d095547f8 Auth: Implement skip org role sync for jwt (#61647)
* Add new config option

* Add frontend control

* Condition new auth broker with config option

* Condition old auth broker with config option

Co-authored-by: Jo <joao.guerreiro@grafana.com>
Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com>
2023-01-18 13:59:50 +01:00
Niklas
3debfd0ca7 Transformations: Extract JSON Paths (#59400)
* Added new extractJSONPath transformer
Co-authored-by: Galen <galen.kistler@grafana.com>
2023-01-18 06:59:20 -06:00
idafurjes
b573b19ca3 Chore: Remove dashboards from models pkg (#61578)
* Copy dashboard models to dashboard pkg

* Use some models from current pkg instead of models

* Adjust api pkg

* Adjust pkg services

* Fix lint

* Chore: Remove dashboards models

* Remove dashboards from models pkg

* Fix lint in tests

* Fix lint in tests 2

* Fix for import in auth

* Remove newline

* Revert unused fix
2023-01-18 13:52:41 +01:00
Karl Persson
db0be6bc95 RBAC: fix wildcard check (#61666)
RBAC: break correct loop
2023-01-18 13:19:09 +01:00
Konrad Lalik
9256ca371d Alerting: Landing page v2 (#61600) 2023-01-18 12:40:09 +01:00
Jo
ecafb4dd15 Auth forwarding: Pass tokens without refresh (#61634)
* return only tokens from oauth

* feedback
2023-01-18 10:50:35 +00:00
Sofia Papagiannaki
f25d5199c5 Chore: Fix folder service tests (#61659)
* Chore: Fix folder service tests
2023-01-18 12:22:23 +02:00
Karl Persson
412d80b498 AuthN: Add post auth hook for oauth token refresh (#61608)
* AuthN: rename package to sync

* AuthN: rename sync files

* Ouath: Add mock for OauthTokenService

* AuthN: Implement access token refresh hook

* AuthN: remove feature check from hook

* AuthN: register post auth hook for oauth token refresh
2023-01-18 10:47:09 +01:00
Levente Balogh
29119a7d08 UI/Alert: Infer the role property based on the severity (#61242)
* feat(UI/Alert): add two new optional properties: 'ariaLabel' and 'role'

* docs(UI/Alert): add some docs to the props

* feat: infer the role based on the severity

* fix: stop overriding props

* fix: fix a test depending on the wrong alert role
2023-01-18 10:16:41 +01:00
Sven Grossmann
6c566a391d Loki: Use queries maxLines if configured, even if it is zero (#61652)
* user `query.maxLines` even if it is zero

* remove unnecessary comment
2023-01-18 10:14:42 +01:00
Sven Grossmann
a5d577eca1 Logs: Make no logs found text more visible in Explore (#61651)
* move scan buttons up

* update test
2023-01-18 09:52:18 +01:00
Brendan O'Handley
872df59de5 Prometheus: Kickstart your query, formerly query patterns (#60718)
* add query pattern prom types

* rebase main

* update docs

replace query patterns with kick start your query

* update docs, remove raw query from prom docs

Raw query toggle was removed from the code

* add binary query pattern to query patterns

* add aria labels for accessibility

* fix tests

* apply/create a query pattern behavior if anything exists in the query editor

* fix tests

* rebase main
2023-01-17 20:04:50 -05:00
Santiago
b5fa9e3501 Chore: Fix "manger" typo (#61649)
fix mangers -> managers
2023-01-17 23:13:27 +00:00
Leon Sorokin
7e7daf48f4 Transforms: make partitionByValues create field labels by default (#61255) 2023-01-17 14:56:23 -06:00
Karl Persson
05a683d462 SupportBundles: Fix list response when we don't have any bundles yet (#61619)
* SupportBundles: Return empty slice instead of nil when there are no
support bundles
2023-01-17 21:04:12 +01:00
Alexander Weaver
1ac89ea040 Alerting: Add client configuration for remote Loki historian backend and test connection (#61114)
* Create loki client type and ping method

* Expose TestConnection on client

* Configure and ping Loki URL

* Close response body reader if present

* Add 30 second timeout

* Remove duplicate close
2023-01-17 13:58:52 -06:00
Kristin Laemmert
f6e3252c00 chore: move notifications models into notifications service (#61638) 2023-01-17 14:47:31 -05:00
Erik Sundell
8c826cd785 Cloudwatch: Cleanup resource api (#61465)
Co-authored-by: Isabella Siu <isabella.siu@grafana.com>
2023-01-17 14:27:53 -05:00
Matthew Jacobson
23e05373a7 Alerting: Fix flaky TestIntegrationUpdateAlertRules (#61641)
Prevents random OrgID=0 in test alert generation causing invalid alert rule.
2023-01-17 19:09:46 +00:00
owensmallwood
3fe81b3c3f PublicDashboards: Add share column to public dashboards table (#61102)
Adds share column to public dashboards table
2023-01-17 12:18:12 -06:00
Kristina
6ed7c77516 Explore: Add correlation variables for interpolation (#61008)
* Add correlation variables for interpolation

* Change to only look at relevant field

* Add links ignoring correlation check, add tests

* Add variables for all fields in dataframe, add tests for it, simplify URL expect
2023-01-17 11:12:37 -06:00
Torkel Ödegaard
70f2b01525 Scenes: Cleanups and simplify (#61579)
* Remove use of Scene / Embedded scene

* Use DashboardScene

* Update scenes package

* Updated scenes

* Updated DashboardScene

* Updates

* Updates
2023-01-17 18:02:46 +01:00
Alexander Zobnin
354342ab26 Support Bundles: Improve creating bundle UX (#61611)
* Support Bundles: Improve creating bundle UX

* Refactor create bundle page

* Fix typo

* Don't show loading indicaror after deleting bundle
2023-01-17 17:50:14 +01:00
Alexander Weaver
4f1bdc0607 Alerting: Skip flaky test in TestIntegrationUpdateAlertRules (#61627)
* Skip flaky test

* Add comment
2023-01-17 10:39:16 -06:00
Josh Hunt
daf171820c CommandPalette: Improve section header styling (#61584)
* Add border between command palette sections

* make breadcrumbs secondary text color

* Improve comments
2023-01-17 17:34:40 +01:00
Torkel Ödegaard
8620909006 Table: Fixes broken link styles after recent cell options PR (#61582)
* Table: Fixes broken link styles after recent cell options PR

* Share migration and fix bar gauge as well

* Remove unused import

* Review fixes

* Fixed test

Co-authored-by: Kyle Cunningham <kyle@codeincarnate.com>
2023-01-17 17:08:23 +01:00
Laura Fernández
bb7410aa09 Search: Fix empty folder message showing when by starred dashboards (#61610) 2023-01-17 16:35:54 +01:00
Joey Tawadrous
4076933e66 Traces: extra feature tracking (#61348)
* grafana_traces_service_graph_size

* grafana_traces_trace_view_find_next_prev_clicked

* grafana_traces_trace_view_scroll_to_top_clicked

* grafana_traces_cheatsheet_clicked
2023-01-17 14:43:28 +00:00
ismail simsek
6dcc94ecb2 Prometheus: Add default editor configuration (#61510)
* Add default editor option in Prometheus configuration

* Small readability improvement
2023-01-17 15:39:15 +01:00
Ana Ivanov
24ef778f4d Connect Data: Make search bar sticky (#61529) 2023-01-17 16:13:05 +02:00
ismail simsek
67c02f660a Influxdb: Remove backend migration feature toggle (#61308)
* Remove influxdbBackendMigration feature toggle

* Remove code blocks related to influxdbBackendMigration feature toggle

* Fix annotations

* Remove commented lines

* Fix unit tests
2023-01-17 15:11:26 +01:00
Serge Zaitsev
efed0151f8 Chore: Remove pkg/models/stats.go (#61613)
* remove pkg/models/stats.go

* rename models package in tests
2023-01-17 14:17:54 +01:00
Andres Martinez Gotor
1b86a49622 AzureMonitor: Adapt ResourcePicker and Advanced components to multiple resources (#61605) 2023-01-17 14:11:11 +01:00
Oscar Kilhed
004705a10b Table Panel: Fix image of image cell overflowing table cell when a data link is added. (#59392)
* TablePanel: fix image of image cell overflowing table cell when a data link is added

* Fix image cell and gauge panel in respective places instead
2023-01-17 14:05:58 +01:00
Karl Persson
766fa4e7d5 AuthN: Add last seen sync hooks for user and api keys (#61571)
* AUthN: Add last seen sync hooks for user / service account and move api
key last seen to own hook

* ContextHandler: only run sync for last seen if auth.Service is not
enabled
2023-01-17 13:50:58 +01:00
Hamas Shafiq
ac25913f53 Chore: Convert TimelineViewingLayer.test.tsx to RTL (#61056) 2023-01-17 12:35:36 +00:00
Denis Limarev
e6dee8a723 Perfomance: Preallocate slices (#61580) 2023-01-17 11:50:17 +00:00
Andre Pereira
d2a5b9b289 Tempo: Trace View - Search bar to absolute position instead of sticky (#61324)
* Trace View: Search bar to absolute position instead of sticky

* Fix search bar position to the inside of the trace view panel
2023-01-17 11:42:56 +00:00
Vicky Lee
e7271ee3f1 chore: update CODEOWNERS for Cloud Provider Plugins to Partner Plugins renaming (#61575)
* chore: update CODEOWNERS for Cloud Provider Plugins to Partner Plugins renaming

* chore: update CODEOWNERS for Cloud Provider Plugins to Partner Plugins renaming

* trigger build
2023-01-17 11:16:18 +00:00
Selene
68f1bfa471 Chore: Update ast to dst (#61469)
* Update ast to dst

* Sort imports

* Update thema

* Update pkg/codegen/util_go.go

Co-authored-by: sam boyer <sdboyer@grafana.com>

* Move DecoderCompactor into ApplyFuncs

* Remove unnecessary file

* Use dst decorator

* Downgrade parca-dev library

Co-authored-by: sam boyer <sdboyer@grafana.com>
2023-01-17 11:58:08 +01:00
Jo
9e097c531d SupportBundles: Build tars in memory (#61581)
* build tar in memory

* match tag
2023-01-17 11:39:59 +01:00
Alex Moreno
be72e570cf Fix documentation for notification policy object_matchers (#61602)
* Fix documentation

* Fix grammar

* Update docs/sources/alerting/set-up/provision-alerting-resources/file-provisioning/index.md

Co-authored-by: George Robinson <george.robinson@grafana.com>

Co-authored-by: George Robinson <george.robinson@grafana.com>
2023-01-17 11:37:56 +01:00
Ieva
cd363cb037 RBAC: remove access control mock from org quota tests (#61574)
* remove ac mock from org quota tests

* fix incorrect expected status code and swap tests to make setup easier

* remove empty line
2023-01-17 10:33:01 +00:00
Sonia Aguilar
04b5e6ed9e Alerting: Fix group select not being filled by selected folder when creating alert from panel (#61577)
Add fetchRulerRulesIfNotFetchedYet fetching when results are an empty object
2023-01-17 11:16:54 +01:00
Ieva
9a8c798bae Docs: add missing plugin roles, actions and scope (#61182)
* add missing plugin roles, actions and scope

* Update docs/sources/administration/roles-and-permissions/access-control/custom-role-actions-scopes/index.md

Co-authored-by: Alyssa Wada <101596687+alyssawada@users.noreply.github.com>

* Update docs/sources/administration/roles-and-permissions/access-control/custom-role-actions-scopes/index.md

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

* Apply suggestions from code review

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

Co-authored-by: Alyssa Wada <101596687+alyssawada@users.noreply.github.com>
Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com>
2023-01-17 10:03:31 +00:00
Ieva
f44bc0dd6b RBAC: use scope reduction for user permission listing (#61583)
use scope reduction for user permission listing
2023-01-17 09:58:40 +00:00
Victor Marin
b5383b7d05 Barchart: Fix erroneous tooltip value (#61455)
Fix Barchart tooltip value issue
2023-01-17 11:30:30 +02:00
Karl Persson
b44b6fc5c6 AuthN: Add auth proxy client (#61555)
* AuthN: set up boilerplate for proxy client

* AuthN: Implement Test for proxy client

* AuthN: parse accept list in constructor

* AuthN: add proxy client interface

* AuthN: handle error

* AuthN: Implement the proxy client interface for ldap

* AuthN: change reciever name

* AuthN: add grafana as a proxy client

* AuthN: for error returned

* AuthN: add tests for grafana proxy auth

* AuthN: swap order of grafan and ldap auth

* AuthN: Parse additional proxy headers in proxy client and pass down
2023-01-17 10:07:46 +01:00
Torkel Ödegaard
c1d3b59643 PanelChrome: Simplify props and code a bit (#61595)
* PanelChrome: Simplify props and code a bit

* Don't set a default empty array for leftItems so we can know user has set it

* fix 'this' is undefined

* add storybook examples of statusMessage; remove SB examples of loadingState === Error; simplify loadingState checks in PanelChrome;

Co-authored-by: polinaboneva <polina.boneva@grafana.com>
2023-01-17 09:52:14 +01:00
Gareth Dawson
54fd1b634f Loki: Show configured log line limit (#61291)
* feat: show configured line limit

* test: correct failing test

* refactor: update variable names

* fix: ui renders the wrong value given a falsy value

* refactor: use nullish coalescing operator
2023-01-17 08:45:23 +00:00
Karl Persson
2324597d8d AuthN: Perform login with authn.Service (#61466)
* AuthN: Create password client wrapper and use that on in basic auth
client

* AuthN: fix basic auth client test

* AuthN: Add tests for form authentication

* API: Inject authn service

* Login: If authnService feature flag is enabled use authn login

* Login: Handle token creation errors
2023-01-17 09:11:45 +01:00
Selene
0d70eb18ac Dashboards: Add org_id in dashboards query (#61542)
* Add org_id in dashboards query

* Update OrgID

* Remove unused orgid
2023-01-16 21:59:43 +01:00
Josh Hunt
665f85cd7e CommandPalette: Minor usability improvements (#61567) 2023-01-16 18:33:46 +00:00
Andreas Christou
f135c6cbf1 Cloudmonitor: Refactor query builder (#61410)
* Reset filters when service is changed

* Update to reset any query props

* Reset query properties on metric change

* Update tests

* Refresh labels on panel time update

* Review

* Refactor VisualMetricsQueryEditor

- Move any Metrics functionality to VisualMetricsQueryEditor
- Update tests
- Expose timeSrv from datasource
- Update getLabels to make use of provided timeRange

* Review
2023-01-16 17:57:12 +00:00
Torkel Ödegaard
021eda7aad Scenes: Skip instance of check as it it does not work for apps (#61576)
* Scenes: Skip instance of check as it it does not work for apps

* remove logging
2023-01-16 18:01:31 +01:00
Andres Martinez Gotor
7a026d90e9 AzureMonitor: Set multiple resources for Logs (#61545) 2023-01-16 17:47:27 +01:00
Jo
6fec8fda39 AuthN: Clean errors in user/org sync (#61560)
* clean errors in user/org sync

* lower logging level for non 5xx errors
2023-01-16 16:37:04 +00:00
Sven Grossmann
82d8b2036f Logs: Add possibility to download logs in JSON format (#61394)
* add implementation of `logRowsToReadableJson`

* add test for logRowsToReadableJson

* add json, txt download buttons

* changed downloadmenu to `Menu`

* set closed state when menu closes

* removed unused css

* removed unused imports

* remove isOpen state

* remove unused import

* add tests

* remove untouched file
2023-01-16 17:20:19 +01:00
Alexa V
0eeeeef08b PanelChrome: Refactor and refine items next to title (#60514)
Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
Co-authored-by: Polina Boneva <13227501+polibb@users.noreply.github.com>
Co-authored-by: polinaboneva <polina.boneva@grafana.com>
2023-01-16 15:56:39 +00:00
Gareth Dawson
8ae4b9060b Elastic: Change elastic version 8.0+ to be more accurate (#61379)
fix: change elastic version 8.0+ to be more accurate
2023-01-16 15:54:40 +00:00
Esteban Beltran
4454d5eb49 Build: Fix eslint in file (#61568) 2023-01-16 15:42:02 +00:00
idafurjes
7c2522c477 Chore: Move dashboard models to dashboard pkg (#61458)
* Copy dashboard models to dashboard pkg

* Use some models from current pkg instead of models

* Adjust api pkg

* Adjust pkg services

* Fix lint
2023-01-16 16:33:55 +01:00
Eric Leijonmarck
07bbc0716c Auth: Fix correct error for updateapikey in context handler (#61544)
* fix: correct error for updateapikey

* refactor: send the correct err forward

* update: based on review
2023-01-16 15:16:06 +01:00
Alexander Zobnin
997105c20d Config: Support JSON list syntax (#61288)
* Config: Separate lists either by spaces or by commas.

* Simplify space separation

* use separate function for the config strings

* Change behavior only if string contains quotes

* add test for invalid string

* Use JSON list syntax

* ignore leading spaces when process list

* Add notes about using JSON lists into the docs

* Fix typo

* Apply suggestions from code review

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
2023-01-16 16:03:20 +03:00
Tania
045a12047f Codegen: Generate per-kind reference docs (#60416)
* Add docs generator

* Add json-to-md conversion

* Fix lint issues

* Remove check for kind type

* Disable prettier for generated docs

* Use schema ref names as identifiers for links & headers

* Display the default value (if so) in the description

* Undo 'draft:false' introduced by mistake

* Update pkg/codegen/jenny_docs.go

Co-authored-by: Jack Baldry <jack.baldry@grafana.com>

* Undraft and unlist kinds documentation  (#61476)

* Support running containers without root daemon

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

* Use section shortcode to automatically list child pages

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

* Undraft and unlist kinds documentation

This page and child pages are directly accessible but are not listed
in the table of contents.

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

* Add docs-preview to browse drafted pages

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

* Replace end of line and pipe characters in table codegen

* Remove draft status from generated docs

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
Co-authored-by: Joan López de la Franca Beltran <joanjan14@gmail.com>
Co-authored-by: Jack Baldry <jack.baldry@grafana.com>
Co-authored-by: Robert Horvath <robert.horvath@grafana.com>
2023-01-16 13:55:40 +01:00
bobemoe
59df361087 Public Dashboards: Docs: add ENV method to enable (#60412)
Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
2023-01-16 09:26:05 -03:00
Eric Leijonmarck
c5e74ee607 Auth: Add skip_org_role_sync for AzureAD OAuth (#60322)
* [WIP] Auth: add backend skipOrgRoleSync to AzureAD OAuth

- add: skipOrgRoleSync
- rename: skipOrgRoleSync to skipOrgRoleSyncBase (to make it clear that
  it is the base version of SocialBase)
- add: tests for skipOrgRoleSync in AzureAD

TODO:
- [ ] frontend changes

* add: docs

* refactor: remove role from basicinfo

* add: settings for grafanacom

* add: settigns for frontend

* add: logic for azureAD user skip org role

* add: docs for skip_org_role_sync

* refactor: docs a bit

* add: tests for userinfo

* refactor: to only extract if skiporgrolesync false

* refactor: based on review comments

* Update docs/sources/setup-grafana/configure-grafana/_index.md

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>

* Update docs/sources/setup-grafana/configure-grafana/_index.md

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
2023-01-16 13:16:01 +01:00
Matias Chomicki
7e505ea49c Loki Autocomplete: Suggest only possible labels for unwrap (#61411)
* feat(loki-autocomplete): filter valid labels for unwrap autocomplete suggestions

* refactor(unwrap): reuse new function in builder
2023-01-16 13:07:02 +01:00
Serge Zaitsev
7e51eac740 Chore: Remove unused models (#61533)
* Chore: Remove unused models

* put AuthModuleConversion back
2023-01-16 12:52:55 +01:00
renovate[bot]
0d513224af Update dependency @lezer/lr to v1.3.1 (#61341)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-01-16 12:46:42 +01:00
Jo
be3b81fecd AuthN: Readd user protection service to user sync (#61534)
* add user protection service to user sync

* fix tests
2023-01-16 11:15:14 +00:00
Jo
dcfeab2c73 AuthN: User Quota (#61540)
* remove reqContext from quota checks in login

* add guards for nil ScopeParams
2023-01-16 11:54:15 +01:00
Andres Martinez Gotor
a4c2237d16 AzureMonitor: Add region to the resource info (#61504) 2023-01-16 11:26:56 +01:00
Hamas Shafiq
1b6c0d9752 Chore: Convert ViewingLayer.test.tsx to RTL (#61358) 2023-01-16 10:25:47 +00:00
Victor Marin
43ca4e0bc7 Fix Barchart legend aligning right when orientation is horizontal (#61451) 2023-01-16 12:09:20 +02:00
Misi
b8b08ea292 Auth: Add sub claim check to JWT Auth pre-checks (#61417)
* Auth: Add sub claim check to JWT Auth pre-checks

* Add #nosec annotation to the test tokens
2023-01-16 10:50:34 +01:00
Andres Martinez Gotor
e481673b77 AzureMonitor: Use list of resources for metrics (#61485) 2023-01-16 09:49:35 +01:00
Torkel Ödegaard
8f37295b02 Scenes: Panel repeater change (#61302)
* Update scene panel repeater by change in scenes package

* Use latest scenes package

* Fix package.json

* lock update

* Fix lock

Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
2023-01-14 09:30:43 +01:00
Yuri Tseretyan
9d57b1c72e Alerting: Do not persist noop transition from Normal state. (#61201)
* add feature flag `alertingNoNormalState`
* update instance database to support exclusion of state in list operation
* do not save normal state and delete transitions to normal
* update get methods to filter out normal state
2023-01-13 18:29:29 -05:00
Yuri Tseretyan
12d27edb52 Alerting: Update alerting package rerefence to the last commit (#61515) 2023-01-13 17:28:44 -06:00
Ghazanfar
d553a016cc Alerting: UI changes required to support v3 and Auth in Kafka Contact Point (#61123) 2023-01-13 17:45:43 -05:00
Alexander Weaver
b289b8ac6e Alerting: Set error annotation on EvaluationError regardless of underlying error type (#61506)
Set error annotation regardless of underlying error type
2023-01-13 13:58:02 -06:00
Erik Sundell
432cdbade4 Cloudwatch: Add support for template variables in new log group picker (#61243) 2023-01-13 14:03:08 -05:00
Timur Olzhabayev
b34377a0ef Chore: Making community support owners of issue triage doc (#61323)
Making community support owners of issue triage doc
2023-01-13 19:29:09 +01:00
Joey Tawadrous
483ca71621 Docs: Update trace to logs docs (#61099)
* Extend trace to logs docs

* Update docs text

* Update trace to logs tag types format

* adjusts formatting of unorderedlist

* adjusts formatting, adds intro to table

* Update docs/sources/datasources/zipkin/_index.md

Co-authored-by: Joey Tawadrous <90795735+joey-grafana@users.noreply.github.com>

* added table intros

Co-authored-by: Chris Moyer <chris.moyer@grafana.com>
Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
2023-01-13 11:22:34 -06:00
Brendan O'Handley
6be341d505 Prometheus: Add query tracking (#61004)
* merge fix

* remove comments from debugging
2023-01-13 12:13:52 -05:00
gotjosh
e7cd6eb13c Alerting: Use alerting.GrafanaAlertmanager instead of initialising Alertmanager components directly (#61230)
* Alerting: Use `alerting.GrafanaAlertmanager` instead of initialising Alertmanager components directly
2023-01-13 12:54:38 -04:00
Joey Tawadrous
58c4c95e92 Tempo: dashboard feature tracking (#61210)
* grafana_tempo_dashboard_loaded

* Update version

* Updates

* Added more tracking stats + updates
2023-01-13 16:31:44 +00:00
Robby Milo
98cadb3aa0 update docs docker image reference (#61269)
* update docs docker image
* remove command
2023-01-13 17:19:23 +01:00
Sven Grossmann
5fe23b4964 Loki: Track obfuscated query (#61325)
* obfuscate query

* also conver numbers and comments

* query obfuscation: simplify obfuscation and keep some identifiers

* Query obfuscation: replace placeholder string with node name

Co-authored-by: Matias Chomicki <matyax@gmail.com>
2023-01-13 16:16:47 +00:00
Ryan McKinley
ce3a96abec Search: Auto focus input elements (#61443) 2023-01-13 16:01:47 +00:00
Brendan O'Handley
370272e57e Documentation: Update prometheus getting started doc (#60803)
* update prom getting started doc

* fix md

* Update docs/sources/getting-started/get-started-grafana-prometheus.md

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>

* Update docs/sources/getting-started/get-started-grafana-prometheus.md

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>

* Update docs/sources/getting-started/get-started-grafana-prometheus.md

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>

* Update docs/sources/getting-started/get-started-grafana-prometheus.md

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>

* Update docs/sources/getting-started/get-started-grafana-prometheus.md

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>

* Update docs/sources/getting-started/get-started-grafana-prometheus.md

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>

* Update docs/sources/getting-started/get-started-grafana-prometheus.md

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>

* update doc with image

* use multiple tasks template structure from writers toolkit

* fix image title

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
2023-01-13 10:38:20 -05:00
Alex Khomenko
3569045dfc Admin: Update the order of nav items (#61497)
* Admin: Change order of the nav items

* Admin: Update order
2023-01-13 17:27:26 +02:00
Michael Mandrus
9dc081e629 SMTP: Update SMTP TemplatesPatterns to do an 'or' filter instead of 'and' (#61421)
update template path parsing to use 'or' logic instead of 'and'
2023-01-13 10:24:22 -05:00
renovate[bot]
2cadcd5aeb Update dependency eslint-config-prettier to v8.6.0 (#61413)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-01-13 14:55:08 +00:00
TaitChan
a1d33c63c8 Internationalization: Translate page headers and Search dashboard actions (#60727)
* Fix: PageHeader & PageHeaderTabs & NavBarItem & DashboardActions & PanelMenu is displayed in default_language (#60719)

* I18N: update strings (#60719)

Co-authored-by: TaitChan <1441645821@qq.coom>
2023-01-13 14:33:42 +00:00
Gábor Farkas
ed88401a58 logs: json/logfmt-detection, simplify code (#61492)
* logs: json/logfmt: simplify code

* remove obsolete comment

Co-authored-by: Sven Grossmann <sven.grossmann@grafana.com>

Co-authored-by: Sven Grossmann <sven.grossmann@grafana.com>
2023-01-13 14:33:18 +00:00
Josh Hunt
9b10f6c7dd CommandPalette: Fix long dashboard names freezing the browser (#61278)
* CommandPalette: Use custom useMatches to avoid perf issues with long names

* wip start to multi search

* use search permutations, and do substring match if search is over 25 chars

* update ufuzzy

* don't permute query if greater than 5 words
2023-01-13 14:16:16 +00:00
gotjosh
8f72893076 Alerting: Document not supporting inhibition rules (#61313)
* Alerting: Document not supporting inhibition rules

* Update docs/sources/alerting/manage-notifications/create-silence.md

Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com>

* Update docs/sources/alerting/manage-notifications/alertmanager.md

Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com>

Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com>
2023-01-13 15:06:06 +01:00
Joey Tawadrous
2b6a5e2b3d Tracing: Span link feature tracking (#61022)
* Span link feature tracking

* Update interaction name
2023-01-13 14:02:25 +00:00
Jan Garaj
28dbbe9f5f CloudWatch: Add CloudWatchSynthetics dimension (#60832) 2023-01-13 14:56:29 +01:00
Sven Grossmann
b3f28dea71 Logs: Change detected to selected label (#61487)
change `detected` to `selected`
2023-01-13 13:36:45 +00:00
Sven Grossmann
b816538e09 Loki: Fix misaligned derived fields settings (#61475)
* fix loki datasource settings

* remove unnecessary spacing

* remove unused import
2023-01-13 14:25:03 +01:00
Gábor Farkas
117874176d logs: removed unused code (#61484) 2023-01-13 14:11:57 +01:00
Sonia Aguilar
fb5a033282 Alerting: use SupportedPlugin.OnCall detecting OnCall types as a single source of truth (#61473)
Use SupportedPlugin.OnCall detecting OnCall types as a single source of truth
2023-01-13 13:34:39 +01:00
Ashley Harrison
da969e7d48 Command Palette: don't register dashboards as actions in the command palette (#61271)
* don't register dashboards as actions in the command palette

* create ActionImpls in RenderResults, memoize some array creation

* extract dashboard results out into separate hook

* remove unnecessary memoization from useActions

* move useDashboardResults into dashboardActions
2023-01-13 11:41:23 +00:00
Jack Baldry
017d4f2cbb Pin doc-validator image version to allow repository to opt in to breaking changes (#61456)
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
2023-01-13 11:40:30 +00:00
Ryan Cole
37a0afe136 Docs: Fix links to default_template.go in alert template reference file (#61340)
Docs: Fix links to `default_template.go` alert template reference file
2023-01-13 11:32:45 +00:00
Andres Martinez Gotor
f6e735cd29 AzureMonitor: Keep resource in the URL for single requests (#61414) 2023-01-13 12:30:45 +01:00
renovate[bot]
55ec0c1c49 Update dependency chrome-remote-interface to v0.32.0 (#61448)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-01-13 11:05:26 +00:00
renovate[bot]
be04096366 Update dependency core-js to v3.27.1 (#61342)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-01-13 12:03:24 +01:00
Joao Silva
cdd0a2d228 Navigation: Add close button to dashboard settings (#61366) 2023-01-13 11:50:35 +01:00
Andriy
2baf967ff1 fix: Fix flattening queries with null values (#61380) 2023-01-13 10:37:29 +01:00
Torkel Ödegaard
a5eb858d53 PanelChrome: Slight design improvements to menu button (#61399)
* PanelChrome: Slight design improvements to menu button

* Switch to narrow ToolbarButton

* Updated test

* removed unused import
2023-01-13 10:35:02 +01:00
Ieva
e543c10e25 RBAC: Remove RBAC mock from plugin installation tests (#61416)
remove ac mock from plugin installation tests
2023-01-13 09:34:20 +00:00
Karl Persson
0d572ff2ce AuthN: Add check for disabled identities (#61382)
* AuthN: return error if identity is disabled

* AuthN: Remove isDisabled check in client

* AuthN: Format imports
2023-01-13 10:28:50 +01:00
Karl Persson
b5255ebfdf RBAC: Update org rbac tests to not use mocked access control (#61211)
* API: Rewrite legacy access control and rbac tests for current org
endpoint

* API: Rewrite legacy and rbac endpoint tests for update current and
target org

* API: rewrite access control tests for create org

* API: Rewrite delete org api access control tests

* API: rewrite search org access control tests to not use mocked access
control

* API: Rewrite get org and get org by name access control tests to not use
mocked access control


Co-authored-by: Ieva <ieva.vasiljeva@grafana.com>
2023-01-13 10:22:32 +01:00
Armand Grillet
331fa686e0 Preferences: Changed 'Edit profile' to 'Profile' (#61376)
* Changed 'Edit profile' to 'Profile'

The profile is not always editable, e.g. when it is synec via OAuth,
and all the other sections of the preferences are titled without a
verb.

* Fix frontend test
2023-01-13 09:59:11 +01:00
idafurjes
490a787d9d Chore: Move tem member models to team pkg (#61294)
* Chore: Move tem member models to team pkg

* Fix test lint
2023-01-13 09:43:38 +01:00
Levente Balogh
b8aaf85fdc Levitate: Only run against the main branch (#61401)
chore: only run Levitate against the main branch
2023-01-13 09:43:09 +01:00
renovate[bot]
db894ac383 Update dependency eslint to v8.31.0 (#61412)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-01-13 09:04:53 +01:00
KonH
4421b31b66 Loki/Prometheus: Change signature - return non-reference from ReadPrometheusStyleResult (#57209)
* Change signature - return non-reference from ReadPrometheusStyleResult

Related to https://github.com/grafana/grafana/issues/52430

* Fix invalid reference usage

* Potential fix for test data

* Remove additional ref usage

* Revert "Potential fix for test data"

This reverts commit 94ed588ab3.

* Commit changed test data

* Revert unwanted conflict resolution

* Add additional condition to track empty responses

* Setup valid empty response

* Re-introduce changes reverted by merge
2023-01-13 09:00:39 +01:00
Alex Khomenko
078f2d4481 Admin: Remove navigation subheaders (#61344)
* Admin: Remove navigation subheaders

* Admin: Fix tests
2023-01-13 08:32:09 +02:00
Yuri Tseretyan
8e4922f02f Chore: Update alerting to the head of the main (#61437) 2023-01-12 22:35:19 -05:00
Nathan Marrs
b1a24232e4 Canvas: Add support for basic arrows (#57561)
Co-authored-by: Ryan McKinley <ryan.mckinley@grafana.com>
Co-authored-by: Adela Almasan <adela.almasan@grafana.com>
Co-authored-by: Drew Slobodnjak <drew.slobodnjak@grafana.com>
2023-01-13 02:38:00 +00:00
Ryan McKinley
0c20fe0ac9 EntityAPI: Include folder support and watch API stubs (#61338) 2023-01-13 00:39:36 +00:00
Ryan McKinley
da3f02d81b Schema: Add TimeZone to mudball (#61003) 2023-01-12 14:54:02 -08:00
Brendan O'Handley
245a589336 Angular: Remove ngInject from influxdb and graphite (#61251)
remove ngInject from datasources
2023-01-12 17:14:18 -05:00
Giordano Ricci
1e33e56dbd Explore: Unsync time ranges when a pane is closed (#61369)
* Explore: Unsync time ranges when a pane is closed

* remove unintentional import
2023-01-12 20:59:35 +00:00
Piotr Jamróz
e8ef0395b1 Glue: Hide run queries button in Correlations Page (#61039)
* Hide run queries button in Correlations Page when showing Loki and Prometheus editors

* Use more semantic selectors

Co-authored-by: Giordano Ricci <me@giordanoricci.com>

* Use more semantic selectors

Co-authored-by: Giordano Ricci <me@giordanoricci.com>

* Post-merge fix (remove duplicate)

Co-authored-by: Giordano Ricci <me@giordanoricci.com>
2023-01-12 21:14:55 +01:00
gotjosh
49ae1bbe63 Introduce AlertingConfiguration that implements alerting.Configuration (#61427)
* Introduce `AlertingConfiguration` that implements `alerting.Configuration`
2023-01-12 16:03:07 -04:00
gotjosh
fd6f107ded Alerting Unification: Use the errors from grafana/alerting in Alerts (#61425) 2023-01-12 15:23:34 -04:00
Sonia Aguilar
24c3c3a0ef Alerting: Use pluginBridge to check if plugin is installed (#61356)
* Use getPluginSettings (/api/plugins//settings) to check if plugin is installed

* Use usePluginBridge hook instead of getPluginSettings to check if plugin is installed
2023-01-12 19:52:36 +01:00
gotjosh
ddb85ad6ad Use the ClusterPeer interface from grafana/alerting (#61409)
* Use the Cluster interface from grafana/alerting
2023-01-12 14:47:22 -04:00
Artur Wierzbicki
23dbc916e8 Live: Fix Subscription to the channel already exists live streaming error (#61406)
#60570: Fix `subscription to the channel already exists`
2023-01-12 21:55:01 +04:00
Gilles De Mey
6b620c79e0 Alerting: Fix flakey silence test (#61395) 2023-01-12 14:32:25 -03:00
chrisharbro
447e56b557 Fix typos (#61318)
Redis was called Rediss twice, this was the source of some confusion.
2023-01-12 10:31:55 -06:00
gotjosh
2d1faae0b5 Alerting Unification: Use alerting.MaintenanceOptions to configure silences and nflog (#61384) 2023-01-12 12:31:38 -04:00
Andres Martinez Gotor
9055e1993d AzureMonitor: API support for multiple resources (#61315) 2023-01-12 17:25:13 +01:00
gotjosh
6822298953 Update grafana/alerting to the latest main (#61407) 2023-01-12 11:56:32 -04:00
Gábor Farkas
57425234c9 elastic: backend: removed unused time-field (#61362)
* elastic: backend: removed unused time-field

* improve comment formatting

Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>

Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
2023-01-12 15:52:32 +00:00
Eric Leijonmarck
91322bebb5 Auth: Add skip_org_role_sync setting for GrafanaCom (#60553)
* add frontend settings and setting for grafanacom

* removed println

* add skip-org-role-sync on login

* add deprecation notice for this field

* remove println

* remove newline

* change and renamed variables

* fix for reconfiguring the settings for grafanacom

* add documentationf or grafanacom setup

* WIP tests

* added tests

* Update docs/sources/setup-grafana/configure-security/configure-authentication/grafana-com/index.md

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>

* Update docs/sources/setup-grafana/configure-security/configure-authentication/grafana-com/index.md

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>

* Update docs/sources/setup-grafana/configure-security/configure-authentication/grafana-com/index.md

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>

* Update docs/sources/setup-grafana/configure-security/configure-authentication/grafana-com/index.md

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>

* Update docs/sources/setup-grafana/configure-security/configure-authentication/grafana-com/index.md

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>

* Update docs/sources/setup-grafana/configure-security/configure-authentication/grafana-com/index.md

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>

* Update docs/sources/setup-grafana/configure-security/configure-authentication/grafana-com/index.md

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>

* Update docs/sources/setup-grafana/configure-security/configure-authentication/grafana-com/index.md

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>

* updated steps

* Update docs/sources/setup-grafana/configure-security/configure-authentication/grafana-com/index.md

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>

* Update docs/sources/setup-grafana/configure-security/configure-authentication/grafana-com/index.md

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>

* doc: updated the docs to reflect what happens to grafana.com users

* Update docs/sources/setup-grafana/configure-grafana/_index.md

Co-authored-by: Jo <joao.guerreiro@grafana.com>

* Update docs/sources/setup-grafana/configure-security/configure-authentication/grafana-com/index.md

Co-authored-by: Jo <joao.guerreiro@grafana.com>

* Update docs/sources/setup-grafana/configure-security/configure-authentication/grafana-com/index.md

Co-authored-by: Jo <joao.guerreiro@grafana.com>

* add blankline

* rephrase of doc improvements for explaing of the settings

* Update docs/sources/setup-grafana/configure-grafana/_index.md

Co-authored-by: Jo <joao.guerreiro@grafana.com>

* add frontend setting for grafanacom.

* WIP tests

* refactor docs

* frontend to adhere to skipping org role sync for GrafanaCom users

* update docs to reflect desired behavior

* tests: added test for skip and nonskip

* Update docs/sources/setup-grafana/configure-grafana/_index.md

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

* Update docs/sources/setup-grafana/configure-grafana/_index.md

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

* Update docs/sources/setup-grafana/configure-grafana/_index.md

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

* Update docs/sources/setup-grafana/configure-grafana/_index.md

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

* Update docs/sources/setup-grafana/configure-grafana/_index.md

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

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
Co-authored-by: Jo <joao.guerreiro@grafana.com>
Co-authored-by: Ieva <ieva.vasiljeva@grafana.com>
2023-01-12 16:44:08 +01:00
Ron D
e7b8b82c14 Correct invalid groups_attribute_path option + added details for nested groups (#61202)
* Correct invalid groups_attribute_path option + added details for nested groups

* Update docs/sources/setup-grafana/configure-security/configure-authentication/keycloak/index.md

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>

* linting

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
Co-authored-by: IevaVasiljeva <ieva.vasiljeva@grafana.com>
2023-01-12 14:41:30 +00:00
Ieva
bc75ee1392 Docs: OnCall role and action definitions (#61175)
* OnCall role and action definitions

* change verbs from write to update or edit

* Update docs/sources/administration/roles-and-permissions/access-control/rbac-fixed-basic-role-definitions/index.md

Co-authored-by: Joey Orlando <joseph.t.orlando@gmail.com>
2023-01-12 08:40:19 -06:00
malcolmholmes
3a1cf11055 Schema: Fix iterator for MajorsOrX (#61363) 2023-01-12 09:39:23 -05:00
Jack Westbrook
46228813e4 Chore: Refresh yarn lock file (#61385)
chore(yarn): refresh lock file
2023-01-12 14:37:43 +00:00
Ieva
37859668e6 Chore: update lockfile (#61381)
update lockfile
2023-01-12 14:31:59 +00:00
Gilles De Mey
11a8628381 Alerting: Improve incident button (#61372) 2023-01-12 15:30:31 +01:00
gotjosh
39e429a14b Alerting Unification: Use the errors from grafana/alerting in Silences (#61334) 2023-01-12 10:03:49 -04:00
Karl Persson
3e8857acb8 AuthN: Post login hooks (#61287)
* AuthN: add the ability to register post login hooks

* AuthN: add a guard for the user id

* AuthN: Add helper to create external user info from identity

* AuthN: Pass auth request to password clients

* AuthN: set auth module and username in metadata
2023-01-12 15:02:04 +01:00
Jack Westbrook
4b13a5a9ab Chore: Bump loader-utils to 2.0.4 and 3.2.1 (#60505)
chore: patch bump loader-utils to 2.0.4 and 3.2.1
2023-01-12 14:42:37 +01:00
Gareth Dawson
51c30ba22d Elastic: Remove experimental tag from v8.0+ (#61359)
* docs: remove experimental tag from v8.0+

* feat: remove experimental description from es version config
2023-01-12 12:23:31 +00:00
Andre Pereira
62633ba4a7 Tempo - Replace slate with monaco editor in search tags field (#61168)
* Recreate the tempo search tags field with monaco editor instead of slate

* Remove test file no longer needed
2023-01-12 12:06:28 +00:00
Kyle Cunningham
80e7f54166 Table Panel: Refactor Cell Options to Allow for Options per Cell Type (#59363)
* Update table data structure schema.

* Update table panel configuration options for new structure

* Fix TS errors from refactor

* Separate background and gauge display modes

* Remove the now used Bar Gauge display from the mud

* Fix types up

* Reorganize data structures

* Fix type issues.

* Start stubbing necessary code.

* Continue implementing option refactor

* Change category for cell type selection.

* Consolidate cell options

* Fix various typing issues

* Clean up dead code

* Stub handling display mode changes

* Make subOption editor dynamic

* Setup interface for sub-option editor props

* Remove unused imports

* Remove console.log call

* Persist display mode changes, stub sub options change, update comments.

* Make sure updates from cells are persisted

* Persist sub-option changes

* Update BarGaugeCell to take into account new settings.

* Add deprecated field back

* Remove unecessary options in configuration

* Update default cell to accept new settings

* Make sure color text display works

* Add deprecated property notice

* Use constant as opposed to string

* Make sure we name globally namespaced things uniquely

* Update to use unique name

* Use union type with discriminator.

* Simplify types and operation

* Update type definitons

* Update types

* Update property names in cells

* Remove React.FC usage

* Update option editor signature

* Update options structure

* Change variable name

* Fix "Color Text" display

* Remove debug statement

* Make sure we remain backwards compatible with display mode.

* Add migration for configuration.

* Export BarGaugeDisplayMode from grafana-ui

* Update import

* Fix bar gauge and dashboard migrator tests

* Fix potential undefined references causing test failures

* Fix another potential reference error in DefaultCell

* Try to fix breaking change detection.

* Cache setting changes

* Make sure we return with onChange invocation

* Fixed migrating overrides

* Fix a number of review comments

* Simplify option editors

* Fix unused imports

* Fill out comments for types

* Actually use defaultPanelConfig for editor default

* Move TableCellEditorProps alongside TableCellOptionEditor

* Update docs for table panel

* Also make sure we remove TableCellEditorProps from model file

* Stub migration tests

* Add tests for default config migration

* Add basic overrides test

* Flesh out tests a bit more

* Add inspect to same category as cell editor

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
2023-01-12 18:42:57 +07:00
Jan Garaj
d5da42bbbc CloudWatch: Add RDS dimension (#61027) 2023-01-12 11:47:12 +01:00
Sonia Aguilar
f2d4e24710 Alerting: improve FolderPicker and Evaluation Group Select for Huge lists (#61221)
* Add AsyncVirtualizedSelect component in grafana-ui

* Slice FolderPicker results to 1k and virtualize list using AsyncVirtualizedSelect

* Group list in alert form: Use AsyncSelect and slice results to 1000

* Virtualize and slice always in FolderPicker: set default sliceResults value and let consumers change this value

* Always slice results in FolderPicker

* Limit folder results setting the limit in the api call instead slicing in the FE

* Remove warning about the limit in the Select label
2023-01-12 11:45:03 +01:00
Laura Benz
9400ccf478 Glue: Validate target query in correlations page (#57245)
* feat: add draft version of validate button

* feat: add some styling and basics

* temp: intermediate result

* refactor: solve TODOs

* refactor: replace string in state

* refactor: replace error message style

* refactor: set validate state on change in ds

* refactor: add QueryRunner

* refactor: add QueryRunner

* temp: temporary status

* Emit PanelData to check if the query is valid

* refactor: clean up

* refactor: improve a11y of error message and adjust test

* Remove deprecated property call, change equality

* refactor: add changes from code review

* refactor: remove memory leak

* refactor: replace query runner

* refactor: adjust error handling

* refactor: move testing to related unit test

* refactor: clean up test for QueryEditorField

* refactor: clean up test for CorrelationsPage

* refactor: repair test

* refactor: clean up

* refactor: add refId in order avoid errors when running Loki queries

* refactor: replace buildQueryTransaction + set query to invalid if query is empty

* refactor: add empty query value to test cases

* refactor: end handleValidation after setIsValidQuery()

* refactor: refactor test

* refactor: fix last two tests

* refactor: modify validation

* refactor: add happy path

* refactor: clean up

* refactor: clean up tests (not final)

* refactor: further clean up

* refactor: add condition for failing

* refactor: finish clean up

* refactor: changes from code review

* refactor: add response state to condition

Co-authored-by: Piotr Jamróz <pm.jamroz@gmail.com>

* refactor: fix prettier issue

* refactor: remove unused return

* refactor: replace change in queryAnalytics.ts

* refactor: remove correlations from query analytics

* refactor: remove unnecessary test preparation

* refactor: revert changes from commit 4997327

Co-authored-by: Piotr Jamróz <pm.jamroz@gmail.com>
Co-authored-by: Kristina Durivage <kristina.durivage@grafana.com>
2023-01-12 11:43:40 +01:00
ismail simsek
321acca59f Prometheus: Send separate queries when the query type both selected (#60928)
Send separate queries when the query type both selected
2023-01-12 11:23:29 +01:00
Jan Garaj
056d5df285 CloudWatch: Add MaxProvisionedTableReadCapacityUtilization AWS/DynamoDB metric name (#60829) 2023-01-12 11:07:25 +01:00
Matias Chomicki
c506df3809 Log Row Context: disable false a11y postive (#61312)
Chore: disable false a11y postive
2023-01-12 10:06:54 +00:00
Sven Grossmann
9fa98dbbca Logs: Fix alginment of meta items (#61349)
fix items to be center
2023-01-12 10:42:28 +01:00
linoman
8ba5f59fb7 Promote openldap-mac (#61332)
* Replace `openldap` with `openldap-mac`

* Rename all references for `openldap-mac`

* Rename prepopulated users with first names
2023-01-12 10:20:01 +01:00
ying-jeanne
7339dbc090 Chore: Refectory of shorturl service, move models into service (#61295)
Chore: refectory of shorturl service, move models into service
2023-01-12 17:13:47 +08:00
Polina Boneva
84eb275c8d PanelChrome: Menu is wrapped in a render prop for full outside control (#60537)
* setup menu as a render prop sent down from PanelStateWrapper to PanelChrome

* let the Dropdown take care of opening the menu in PanelChrome

* menu and leftItems are on the right side of the header together

* add storybook examples with menu

* menu does not need to be a callback because it's opened in a Dropdown anyway

* pass down to getPanelMenu whether or not data is streaming atm

* stop loading data as well as streaming from menu

* override menu's style where needed

* reduce snapshot matching in tests
2023-01-12 11:10:09 +02:00
gotjosh
f85a948214 Alerting Unification: Use the State interface from the alerting package (#61333) 2023-01-11 19:50:45 -04:00
Torkel Ödegaard
7eaa95729c PluginsList: Improve layout for smaller screens (#61234)
* PluginsList: Improve layout for smaller screens

* fix test

* not sure if this will fix it

* fix
2023-01-11 23:14:57 +01:00
Ezequiel Victorero
34a865ebf0 PublicDashboards: remove publicDashboardUID from insights event request (#60649) 2023-01-11 18:25:18 -03:00
Christopher Moyer
b3272fe62c Docs: clarifies table view (#61320)
* clarifies table view

* Update docs/sources/panels-visualizations/panel-editor-overview/index.md

Co-authored-by: Sarah Zinger <sarah.zinger@grafana.com>

Co-authored-by: Sarah Zinger <sarah.zinger@grafana.com>
2023-01-11 14:32:23 -06:00
Sven Grossmann
5b2184c485 Logs: Unify detected fields and labels in Log Details (#60448)
* removed js-fields

* added buttons

* rename detectedField to field

* removed unused things from `logParser.ts`

* improve comment

* wip

* better way for statistics

* better hide-stats button

* update tests

* updated tests and var names

* made props optional again

* fix padding

* fix unused import

* removed test

* close elements

* renamed `LogRowMessageDetectedFields` to `LogRowMessageDisplayedFields`

* add active style to menu button

* changed comment in logParser

* updated ToolbarButton colors

* rename `Data Links` to `Links`

* fix stats button being wrongly highlighted
2023-01-11 19:20:11 +01:00
MeanMina
8bab6d3658 Change token for parent project action (#61314) 2023-01-11 17:03:59 +00:00
Denis Limarev
90badc8729 Performance: Add preallocation for some slices (#59593) 2023-01-11 18:03:37 +01:00
Ivana Huckova
8bda8b8272 Log volume: Fix functionality if query has multiple comments (#61306)
* Log volume: Fix functionality if query has comments

* Add additional test
2023-01-11 16:21:02 +00:00
Yuri Tseretyan
b4e1e1871f Alerting: Fix evaluation timeout (#61303) 2023-01-11 10:52:54 -05:00
Guilherme Caulada
1a9b6873e6 Store: Add mock for system users to be used in tests (#61245)
Add mock for system users to be used in tests
2023-01-11 11:50:22 -03:00
Sonia Aguilar
f7ae909324 Alerting: Fix General folder being added in alerting FolderPicker (#61277)
Fix General folder being added in alerting FolderPicker
2023-01-11 15:35:47 +01:00
ying-jeanne
6c6a970f56 [Chore] Remove health check that is not used (#61283) 2023-01-11 22:07:28 +08:00
Todd Treece
19ca93d5ce Prometheus: Fix concurrency issue with exemplar sampler initialization (#61281) 2023-01-11 08:27:47 -05:00
idafurjes
f2ffce4351 Chore: Move team models to models pkg (#61262)
* Chore: Move team models to models pkg

* Fix ACL tests

* More ACL tests

* Change Id to ID in conflict user command test

* Remove team from models

* Fix ac test lint
2023-01-11 14:20:09 +01:00
Carl Bergquist
672b1711b0 Instrumentation: measure time until plugin request (#61279)
Signed-off-by: bergquist <carl.bergquist@gmail.com>
2023-01-11 13:19:06 +00:00
Marcus Andersson
b633d5395d Bugfix: Prevent previous query editor to set default values when changing data source (#60218)
* Fixed issue where the query editor of the previous ds sets default values on query passed to the query editor of the next ds.

* Fixed issue with changing data source for query in Alerting.

* Will apply default values from DS if available.

* Fix failing tests.

* fixed spell error.

* reverted getDefaultQuery call so it can be added in a separate PR.
2023-01-11 14:06:33 +01:00
Ludovic Viaud
67cad49570 Prometheus: Grafana global variables in PromQL should not raise errors (#60461) 2023-01-11 13:12:03 +01:00
Gilles De Mey
909ec67c56 Alerting: Declare incident from a firing alert (#61178) 2023-01-11 11:52:20 +00:00
Gilles De Mey
db6d0464e9 Alerting: revert #60728 (#61222) 2023-01-11 12:37:11 +01:00
Jack Baldry
87ccf10ffe Update publishing workflows to use PATs with fine-grained access control (#61098)
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
2023-01-11 10:53:26 +00:00
Levente Balogh
8b290bba55 Connections: Update redirect alert message (#61152)
* fix(Alert): don't add padding to content when there is no title

* Feat(Connections): update the style and wording of the redirect alert

* fix(UI/Alert): more resilient check for has title
2023-01-11 11:41:19 +01:00
Levente Balogh
6b2394eff1 Connections: Make "Connect data" a section title (#61144)
* Wip

* Fix: change tests to cater for the new scenario

* feat(Connections): redirect to "Your connections / Datasources" if cannot admin plugins
2023-01-11 11:40:21 +01:00
Emil Tullstedt
fc47e0d35e Docs: Update curl example to use --user for basic auth (#61226) 2023-01-11 11:18:26 +01:00
Emil Tullstedt
649b50055c Chore: Move all backend contribution documents to a single directory (#61140) 2023-01-11 11:16:52 +01:00
Sean Dague
4de0149bd9 OAuth: Support pagination for GitHub orgs (#58648)
* Support pagination for github orgs

* fix unused variable

* Increase initial page to 100 per the way teams work
2023-01-11 09:52:17 +01:00
George Robinson
fa9f1c3a52 Docs: Re-order nav for Manage your alert notifications (#60897) 2023-01-11 08:44:01 +00:00
Alex Moreno
3db08d4e36 Add object_matchers example (#61235)
* Add object_matchers example

* Use better terminology
2023-01-11 09:43:42 +01:00
Alexander Weaver
499fdf1ae4 Docs: Unified Alerting is now compatible with AWS Aurora (#61001)
Remove line that aurora is incompatible
2023-01-11 08:43:18 +00:00
Victor Marin
2cf628e37a BarChart: Highlight bars option for easier interaction (#60530)
* Add bar highlighter plugin to BarChart

* refactor feature

* Horizontal bars can also be hovered

* Tooltip mode UI reflects settings when stacked and bar highlight toggled

* rename variables

* override tooltip option + zIndex on hover box

* change option desc and simplify condition
2023-01-11 10:30:01 +02:00
ying-jeanne
f9daf61e96 [Bug] Fix xorm dependency on yaml v2 2.2.3 (#61183)
fix xorm dependency on yaml v2 2.2.3
2023-01-11 08:08:28 +00:00
Erik Sundell
c72ab21096 Cloudwatch: Refactor log group fields request (#60909)
* cloudwatch/log-group-fields-refactor

* remove not used code

* remove empty line

* fix broken test

* add tests

* Update pkg/tsdb/cloudwatch/routes/log_group_fields_test.go

Co-authored-by: Isabella Siu <Isabella.siu@grafana.com>

* pr feedback

Co-authored-by: Isabella Siu <Isabella.siu@grafana.com>
2023-01-11 08:12:58 +01:00
Matthew Jacobson
63ba3ccb58 Alerting: Improve legacy migration to include send reminder & frequency (#60275)
* Alerting: Improve legacy migration to include send reminder & frequency

Legacy channel frequency is migrated to the channel's migrated route's
repeat interval if send reminder is true. If send reminder is false, we
pseudo-disable the repeat interval by setting it to a large value (1y).

If there were no default channels, the root notification policy is still
created with the default 4h repeat interval.
2023-01-10 23:01:43 -05:00
Leon Sorokin
be1c5e13d5 DataFrame: Add explicit histogram frame type (panel & transforms) (#61195) 2023-01-10 17:42:45 -06:00
Yuri Tseretyan
86b5fbbf60 Alerting: Introduce state manager config structure (#61249) 2023-01-10 16:26:15 -05:00
Hamas Shafiq
bc3ce5760b Chore: Convert TimelineColumnResizer.test.tsx to RTL (#61156) 2023-01-10 21:24:51 +00:00
George Robinson
2a291afbae Alerting: Use consts from alerting package (#61241) 2023-01-10 19:59:13 +00:00
juanicabanas
2505f112f5 PublicDashboards: A unique page for public dashboards (#60744)
Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
2023-01-10 14:50:37 -03:00
George Robinson
d19d8c6625 Alerting: Update Alerting and Alertmanager to v0.25.1 (#61233)
Update Alerting and Alertmanager to v0.25.1
2023-01-10 16:17:07 +00:00
Emil Tullstedt
67661c2535 Fix: Use an existing Dockerfile for the Go image (#61158) 2023-01-10 17:11:43 +01:00
Jo
5f6f1a7d07 Devenv: Update to keycloak 20 (#61174)
update to keycloak 20
2023-01-10 16:50:53 +01:00
Christopher Moyer
205457ae5e Docs: removed unsupported versions; reordered (#61112)
removed unsupported versions; reordered
2023-01-10 09:29:32 -06:00
Adela Almasan
a2bd85963c Canvas: Update element(s) selection after action (#61204) 2023-01-10 09:26:53 -06:00
Virginia Cepeda
3b2ec752fb Alerting: change context parameter type (#61197)
Change boolean value to string as the Faro API doesn't accept boolean types for the entries of the context object
2023-01-10 12:17:11 -03:00
Ludovic Viaud
220ee3d1d4 Prometheus: Disabled inputs when settings are read-only (#60354) 2023-01-10 16:13:42 +01:00
Josh Hunt
5d725d22ad CommandPalette: Search for dashboards using API (#61090)
* CommandPalette: Search for dashboards using API

* Fix ordering of dashboards

* Put recent + search dashboards in root list, refactor actions into hook

* limit recent dashboards to 5

* search debounce to 200ms

* update priorities

* extract i18n
2023-01-10 14:59:32 +00:00
Kat Yang
9a14a7db03 Chore: Remove star model duplicates (#61191) 2023-01-10 09:56:33 -05:00
Timur Olzhabayev
320266ae63 Chore: Introduce codeowners validator (#60818) 2023-01-10 15:40:00 +01:00
Gareth Dawson
4bfcc14c18 Docs: Update loki query editor documentation (#61223)
* feat: update list of toolbar features

* fix: update image to display new label browser
2023-01-10 14:31:22 +00:00
Hamas Shafiq
2af79535bc Chore: Fix flaky test in SpanGraph/index.test.tsx (#61009) 2023-01-10 14:23:00 +00:00
Cyril Tovena
ad1813da27 Phlare: Update client code to use v0.1.2 API. (#60941)
* Depends on Phlare API instead of copying the code

* Rollback the breaking change from the API version
2023-01-10 14:16:45 +00:00
Jo
0c8ad80575 Authn: JWT client (#61157)
* add jwt client

* alias JWT verifier

* debug implementation

* add tests for jwt client

* add constant for JWT module

* Feedback

Co-authored-by: Kalle Persson <kalle.persson@grafana.com>
Co-authored-by: Mihály Gyöngyösi <mgyongyosi@users.noreply.github.com>

Co-authored-by: Kalle Persson <kalle.persson@grafana.com>
Co-authored-by: Mihály Gyöngyösi <mgyongyosi@users.noreply.github.com>
2023-01-10 15:08:52 +01:00
Karl Persson
2de72c1c39 AuthN: Login (#61225)
* AuthN: Add function to login auth request
2023-01-10 14:55:27 +01:00
Matias Chomicki
ef9a71f483 Loki Autocomplete: Improve handling of trailing spaces in queries (#61184)
* Loki Autocomplete: improve handling of trailing spaces in the query

* Monaco Field: rename resizing handler function

* Fix typo

Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>

Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
2023-01-10 14:38:22 +01:00
Karl Persson
c5f77b6a46 AuthN: Set LookupTokenErr and fall through in case of error (#61217)
ContextHandler: Set LookupTokenErr and fall through in case of error
during authentication
2023-01-10 14:36:02 +01:00
Grafana I18n Bot
e88687cfa2 I18n: Crowdin sync (#61119)
* New translations grafana.json (Spanish)

* New translations grafana.json (Spanish)

* New translations grafana.json (German)

* New translations grafana.json (French)
2023-01-10 12:37:37 +00:00
Gareth Dawson
bbd7cb42a1 Docs: Remove redundant text about raw query toggle (#61161)
docs: remove redundant text about raw query toggle
2023-01-10 12:36:37 +00:00
Gareth Dawson
114c8b64aa Loki: Rename "explain" toggle to "explain query" (#61150)
* feat: rename explain toggle to explain query

* test: correct failing test for explain toggle

* docs: update documentation on explain query toggle

* fix: update capitalization
2023-01-10 12:35:12 +00:00
Andre Pereira
bda13a1b5d Explore: Expand table height to show sub-tables (#60359)
* Expand table height to show sub-tables when there isn't enough space

* Fix after merge
2023-01-10 11:58:49 +00:00
Dominik Prokop
5dbbaab3f1 Scenes: Use @grafana/scenes (#60972)
* Use @grafana/scenes WIP

* Use @grafana/scenes package

* Use released @grafana/scenes

* Fix template_srv test
2023-01-10 03:30:53 -08:00
George Robinson
35ad9e23ce Docs: Update weights for Customize notifications without changing the order of pages (#60898) 2023-01-10 11:07:00 +00:00
Joao Silva
86e2eb744c Navigation: Add Cancel button to New folder page (#61188) 2023-01-10 11:44:24 +01:00
Ashley Harrison
4e00fbbd7f Navigation: Allow overriding icons in nav settings (#61160)
expose k6 icon, allow overriding icon in nav settings, override connections + k6
2023-01-10 10:29:07 +00:00
Joao Silva
84ebee026c Navigation: Add Cancel button to Import dashboard page (#61187) 2023-01-10 11:25:27 +01:00
Ivana Huckova
256f640e19 Elasticsearch: Refactor processQuery to make it more readable (#61145)
* WIP: Simplify process query logic

* WIP: Simplify process query logic

* Simplify

* fix lint
2023-01-10 10:49:43 +01:00
Misi
b3a44649ce RolePicker: Align groupHeader to the list items horizontally (#61060)
RolePicker: align groupHeader to the list items horizontally
2023-01-10 10:43:02 +01:00
Torkel Ödegaard
b5b13975d6 Dashlist: Design tweak to dashlist items (#60140) 2023-01-10 10:41:29 +01:00
Torkel Ödegaard
a277d504a2 Table: Improve data link text style (#60811)
Table: Change data link text style
2023-01-10 07:48:53 +01:00
Leon Sorokin
a1609230f8 TimeSeries: Fix y-axis Yes/No and On/Off boolean units (#61207) 2023-01-09 23:04:50 -07:00
Yuri Tseretyan
da18c89e91 Alerting: Scheduler to call DeleteAlertRule once when it stops deleted rules (#61189)
scheduler to call DeleteAlertRule once when it stops deleted rules
2023-01-09 14:39:32 -05:00
Zoltán Bedi
6e41e898eb Candlestick: Fix showing hidden legend values (#60971)
Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
2023-01-09 13:28:10 -06:00
Torkel Ödegaard
9cdcbab2fc Explore: Remove unnessary scroll on split pane (#61064)
* Explore: Remove unnessary scroll on split pane

* set overflow to auto

Co-authored-by: Giordano Ricci <me@giordanoricci.com>
2023-01-09 19:55:38 +01:00
Virginia Cepeda
7604360622 Alerting: Add info to alert rule creation metric (#61105)
Add extra info to alert rule creation metrics
2023-01-09 15:27:02 -03:00
Virginia Cepeda
115218b1ff Alerting: only track events for survey if user is not new (#61005)
* Only track events data if user is not new

To know this we evaluate the creation date to be older than two weeks

* Address PR comments
2023-01-09 14:41:03 -03:00
Ivana Huckova
ddc8beda07 Logs volume: Refactor (#60998)
* Rename log volume in redux to supp query to make it more generic

* Change enabled query to queries

* Small spell fix StoreSuppQueryDataProviderAction -> storeSuppQueryDataProviderAction

* WIP

* Improve

* WIP

* Rename

* Move to 1

* Small updates

* Use enum

* Unify naming

* Use SUPP_QUERY_TYPES instead of Object.keys()

* Move SuppQueryType to types/explore

* Rename suppQuery to supportingQuery

* Rename SUPP_QUERY_TYPES to SUPPORTING_QUERY_TYPES

* Rename supporting to supplementary 🙈

* Remove suppQueryData && suppQueryData.data[0] check as it is redundant

* Update public/app/features/explore/state/query.ts

Co-authored-by: Piotr Jamróz <pm.jamroz@gmail.com>

* Update public/app/features/explore/state/query.ts

Co-authored-by: Piotr Jamróz <pm.jamroz@gmail.com>

* Fix naming of SupplementaryQuery interface

Co-authored-by: Piotr Jamróz <pm.jamroz@gmail.com>
2023-01-09 18:33:48 +01:00
Adela Almasan
26a3c864f3 Canvas: Min-width for inline editor (#61176) 2023-01-09 11:24:12 -06:00
George Robinson
402dc5e4d6 Alerting: Redo refactoring from reverted fix in #56812 (#61051)
This pull request re-applies the refactoring of ConditionsCmd from a
reverted fix #56812 for mathexp.noData. It does not add the fix, or
tests for the fix, because those were added in #56816. We use the
additional test coverage added in #56816 and #58650 to avoid the
reoccurrence of regressions that caused us to revert #56812 the
first time.
2023-01-09 17:01:19 +00:00
Sven Grossmann
b1a8e4f2b8 Logs: Add usage tracking to new download-logs button (#61177)
* add usage tracking to new download-logs buttom

* changed 'dimension' to 'area'
2023-01-09 17:25:19 +01:00
Taewoo K
7db284cfcb remove splunk plugin from legacyRunner check (#60979) 2023-01-09 16:52:14 +01:00
Karl Persson
a49892c9ac AuthN: Refactor basic auth client to support multiple password auth (#61153)
* AuthN: add interface for password clients

* AuthN: Extract grafana password client

* AuthN: Rewrite basic client tests

* AuthN: Add Ldap client and rename method of PasswordClient

* AuthN: Configure multiple password clients

* AuthN: create ldap service and add tests
2023-01-09 16:40:29 +01:00
Erik Sundell
c3378aff8b Cloudwatch: Use new log group picker also for non cross-account queries (#60913)
* use new log group picker also for non cross-account queries

* cleanup and add comment

* remove not used code

* remove not used test

* add error message when trying to set log groups before saving

* fix bugs from pr feedback

* add more tests

* fix broken test
2023-01-09 16:30:21 +01:00
Yuri Tseretyan
2b61fb6e4a Test Datasource: do not use global random (#61116) 2023-01-09 10:08:58 -05:00
Andres Martinez Gotor
9c46aca897 AzureMonitor: Fix dashboard json style (#61163) 2023-01-09 10:01:54 -05:00
Yuri Tseretyan
9f503a261a Traces: Create span when a new session is opened (#61115) 2023-01-09 09:41:15 -05:00
Yuri Tseretyan
e7b17cde47 Traces: Fix timestamp for database query traces (#61109) 2023-01-09 09:40:55 -05:00
idafurjes
7dcb502b33 Chore: Remove org model duplicates (#61025)
Remove org model duplicates
2023-01-09 14:39:53 +01:00
Karl Persson
68b43a24e2 RBAC: dashboard permission filter (#60582)
* PermissionFilter: Handle all search type and only check one action for dashboards

* PermissionFilter: Still handle multiple action but take short cut when
only one action is required
2023-01-09 14:38:57 +01:00
John Martins
a22672c496 AzureMonitor: Update app insights links in curated dashboards (#57306) 2023-01-09 12:59:37 +01:00
John Martins
ea3d204eea AzureMonitor: Alphabetically sorted variables (#56577) 2023-01-09 12:51:26 +01:00
Karl Persson
3b08946fd3 RBAC: Update org invite rbac tests to not used mocked access control (#61141) 2023-01-09 12:23:24 +01:00
ismail simsek
6a68fbb495 Influxdb: Improve filtering (#60994)
* Add createOptionPosition props to SelectBase

* Show create option in the beginning of the list

* Show only matched template variables

* Fix the test

* Remove redundant check
2023-01-09 11:37:25 +01:00
Karl Persson
e0c7ef3481 RBAC: Rewrite rbac annotations test (#61036)
* API: Rewrite annotation rbac tests to not use mocked access control

* API: rewrite mass deletion rbac tests
2023-01-09 09:59:14 +01:00
Sven Grossmann
5ad95a2952 Loki: Fix tracking of queries_with_changed_line_limit_count (#60091)
* change line limit tracking

* updated test
2023-01-09 09:54:57 +01:00
Alexander Zobnin
f1b5014efd Preferences: Add pagination to org configuration page (#60896)
* Add auth labels and access control metadata to org users search results

* Fix search result JSON model

* Org users: Use API for pagination

* Fix default page size

* Refactor: UsersListPage to functional component

* Refactor: update UsersTable component code style

* Add pagination to the /orgs/{org_id}/users endpoint

* Use pagination on the AdminEditOrgPage

* Add /orgs/{org_id}/users/search endpoint to prevent breaking API

* Use existing search store method

* Remove unnecessary error

* Remove unused

* Add query param to search endpoint

* Fix endpoint docs

* Minor refactor

* Fix number of pages calculation

* Use SearchOrgUsers for all org users methods

* Refactor: GetOrgUsers as a service method

* Minor refactor: rename orgId => orgID

* Fix integration tests

* Fix tests
2023-01-09 11:54:33 +03:00
Yuri Tseretyan
d44de7f20a Annotations: AddMany to not open session if nothing to save (#61117) 2023-01-06 21:23:46 -05:00
Yuri Tseretyan
48f1db63ff Alerting: Add support for tracing to alerting scheduler (#61057) 2023-01-06 21:21:43 -05:00
Ryan McKinley
a3e341f24b Inspect: Refactor InspectJSONTab to FC (#61106) 2023-01-06 18:14:20 -05:00
Adela Almasan
9799ac252b Canvas: Update context menu actions for multiple elements selected (#61108) 2023-01-06 15:59:41 -06:00
Alexander Weaver
eb960d9725 Alerting: Add un-documented toggle for changing state history backend, add shells for remote loki and sql (#61072)
* Add toggle for state history backend and shells

* Extract some shared logic and add tests
2023-01-06 12:06:01 -06:00
Daniel Lee
cd04f4e564 docs: update 9.0 upgrade instructions (#59223)
* docs: draft for 9.0 upgrade instructions

* docs: linting

* Add links and explanations for RBAC GA release

Co-authored-by: Vardan Torosyan <vardants@gmail.com>
2023-01-06 18:53:19 +01:00
sam boyer
4db3b2fd5c Kindsys: Remove defs, Slot->SchemaInterface (#61069)
* kindsys: Remove defs, Slot->SchemaInterface

* Remove excess file

* Fix up tests

* Regenerate kinds report

* Final bits of cleanup

* Stop complaining, linter

* Update pkg/kindsys/kindcat_composable.cue

Co-authored-by: Tania <yalyna.ts@gmail.com>

Co-authored-by: Tania <yalyna.ts@gmail.com>
2023-01-06 12:37:32 -05:00
Jo
c2ad447f8c AuthN: Document identity and add missing fields (#61094)
* add missing fields in identity

* add description of Identity fields
2023-01-06 15:58:02 +00:00
Giordano Ricci
19c8f45a4b QueryHistory: Add tracking for copy query button (#61042)
* QueryHistory: Add tracking for copy query button

* add datasources to payload
2023-01-06 14:24:53 +00:00
Giordano Ricci
fafae26068 GrafanaUI: Fix vercal slider handle positioning (#61088) 2023-01-06 14:24:35 +00:00
Torkel Ödegaard
f71bfd88c5 DataSourceList: Build a dashboard button to open new dashboard in panel edit with data source already set (#60532)
* New dashboard with preset data source

* Updates

* use replace instead

* Tests: fix failing tests

* Chore: add UID to the error message

Co-authored-by: Levente Balogh <balogh.levente.hu@gmail.com>
2023-01-06 09:21:40 -05:00
Sofia Papagiannaki
e2ed42c2a3 Nested folders: Do not expose the sequential ID from the folder store (#60702)
* Nested folders: Do not expose the sequential ID from the folder store
2023-01-06 16:04:17 +02:00
Esteban Beltran
9c0d830e26 Docs: Add source code url field description in publish a plugin documentation (#61080) 2023-01-06 13:28:51 +01:00
Torkel Ödegaard
349b39c909 SupportBundles: Fixes sentance casing (#61055) 2023-01-06 10:53:08 +00:00
Kyle Cunningham
5cad1e924e Chore: Change TimePicker owner to User Essentials (#61084)
Change TimePicker owner to user essentials
2023-01-06 05:35:46 -05:00
Gareth Dawson
93fe3faed5 Loki: Fix code editor not correctly responding to window resize (#61061)
* fix: code editor not correctly responding to window resize

* trigger build
2023-01-06 10:17:20 +00:00
Sven Grossmann
ece0c121a5 Logs: Fix line not being selectable in Firefox (#61081)
fix log line not being selectable
2023-01-06 11:15:12 +01:00
Ivana Huckova
30424a8618 Elasticsearch: Return error if invalid query (#61044)
* Elasticsearch: Return error if invalid query

* Add test

* Fix query in test
2023-01-06 11:14:17 +01:00
Jack Baldry
410b23c3d9 Use preferred package header for generated code (#61059)
* Use preferred package header for generated code

> To convey to humans and machine tools that code is generated, generated source should have a line that matches the following regular expression (in Go syntax):
> `^// Code generated .* DO NOT EDIT\.$`

https://pkg.go.dev/cmd/go#hdr-Generate_Go_files_by_processing_source

Co-authored-by: sam boyer <sdboyer@grafana.com>
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

* Regenerate files with updated header

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
Co-authored-by: sam boyer <sdboyer@grafana.com>
2023-01-06 04:57:45 -05:00
mikkancso
18f5f763a9 Connections: Align permissions for Connections page (#60725)
* protect /connection url paths with permissions

These permissions match the original ones at /datasources and /plugins

* add Connections section to navtree only if user has permissions

This commit works only when the easystart plugin is not present.
I'll see what I can do when it is present in the next commit(s).

* update datasources page permissions

The datasources page have Explore buttons on datasource entries,
therefore it makes sense to show this page for those, who can't edit or
create datasources but have explore permissions.
This applies for the traditional Editor role.

* DataSourcesList: link to edit page only if has right to write

If the user doesn't have rights to write datasources, then it's better
to not create a link from cards to the edit page. This way they won't
see the configuration of the data sources either, which is a desirable
outcome.

Also, I moved the query for DataSourcesExplore permission out from the
DataSourcesListView component in the DataSourcesList component, next to
the other permission queries - for the sake of consistency.

* fix permissions for connect data

This way it matches the permissions of the "Plugins" page.

* fix applinks test
2023-01-06 03:11:27 -05:00
idafurjes
d1c9b308bc Chore: Move tempuser model to tempuser package (#61024)
* Move tempuser model to tempuser package

* Add xorm tags for ID
2023-01-06 09:02:05 +01:00
mikkancso
8e8f498674 Connections: Add redirect notice for datasources and plugins pages (#61037)
* add redirect notice for datasources and plugins pages

* do not depend on the internal implementation of Alert

The deleted css piece was problematic because it relied on the internals
of Alert.
If we don't remove that padding, then the Alert looks a bit off, so I
added some title to the Alert to look better.

This way the Connections LinkButton is not vertically aligned to the
center, but this is the closest we can get to the designed alert without
doing hacks and reimplementing the Alert component.
2023-01-06 09:00:29 +01:00
Levente Balogh
fc0e3d6c14 Connections: use the "adjust-circle" icon as a logo (#61046)
* feat: add a new icon called 'adjust-circle'

* feat(Connetions): use the `adjust-circle` logo
2023-01-06 07:31:49 +01:00
Giordano Ricci
122be161f9 Datasource Onboarding: add tracking (#60918)
* Datasource Onboarding: add tracking

* remove unused var

* set ds logo alt text to empty screenn and remove presentation role

* run i18n:extract

* Revert "run i18n:extract"

This reverts commit 5313ac9661.
2023-01-05 22:27:43 +00:00
Giordano Ricci
dfed7e59a5 Explore: move items out of topnav & use canvas variant for toolbar buttons (#60630)
* Explore: remove topnav

* PageToolbar: fix left items margin when no title or page icon is set

* add missing key prop & fix tests

* use canvas variant in live logs

* avoid rendering empty space

* fix test

* avoid disabling split resize button when live tailing

* minor touchups

* Update packages/grafana-ui/src/components/PageLayout/PageToolbar.tsx

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

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
2023-01-05 22:26:58 +00:00
Adela Almasan
97e25d70e7 Canvas: Improve placement when adding an element via context menu (#61071) 2023-01-05 16:09:04 -06:00
Joan López de la Franca Beltran
dc20b776bb Kindsys: New schema for Kinds report (#61034)
* New (desired) report output

* Kinds: New schema for kinds report

* Update report.json

* Sort dimension items
2023-01-05 22:48:13 +01:00
Karl Persson
cdd7392f68 AuthN: Make client params part of the identity (#61050)
* AuthN: Change client params to be a return value of authenticate

* AuthN: move client params to be part of the identity
2023-01-05 20:17:41 +01:00
Karl Persson
183397194a RBAC: rewrite team member api test to not use mock (#61040)
* RBAC: rewrite team member api test to not use mock
2023-01-05 20:08:07 +01:00
linoman
7582e77d25 Add reference to Google OAuth docs (#61048) 2023-01-05 20:04:04 +01:00
Selene
8f29450594 Kindsys: Remove Raw kind category (#60992)
* Remove Raw references

* Remove more raws

* Re-generate files

* Remove raw folder from veneer

* Fix import

* Fix lint

* Bring back raw folder in grafana-schema

* Another lint

* Remove use of "Structured" word in kinds

* Delete unused function and remove some structured words

* Bunch more removals of structured name

Co-authored-by: sam boyer <sdboyer@grafana.com>
2023-01-05 13:54:42 -05:00
Galen Kistler
db369fc5b2 Prometheus: instant results ux improvements rudderstack events (#60990)
* add rudderstack events for new interactive elements
2023-01-05 12:52:59 -06:00
Ryan McKinley
0f3b4e02a0 Dashboards: Support drag+drop to import dashboard (#61017) 2023-01-05 12:52:37 -06:00
Alexander Weaver
8c3a5f6da0 Alerting: Allow state history to be disabled through configuration (#61006)
* Add configuration option for if state history should be enabled

* Inject no-op when history is disabled
2023-01-05 12:21:07 -06:00
Ryan McKinley
48fbe51d37 Chore: Avoid FC in canvas elements and dimension editors (#61014) 2023-01-05 09:55:55 -08:00
Torkel Ödegaard
bd90a6e1be Transformations: Add context parameter to transformDataFrame and operators (#60694)
* Transformations: Add context parameter to transformDataFrame and operators

* Remove unused queries prop

* Fixed test

* Fixed test
2023-01-05 17:34:09 +01:00
Gabriel MABILLE
6da850a2f2 RBAC: Add function to reduce permissions (#58197)
* RBAC: Add function to reduce permissions

* Make names readable

Co-authored-by: Jguer <joao.guerreiro@grafana.com>

* Remove copy pasted comment

* Nit.

Co-authored-by: Jguer <joao.guerreiro@grafana.com>
Co-authored-by: Mihaly Gyongyosi <mgyongyosi@users.noreply.github.com>
2023-01-05 16:32:13 +00:00
Jo
a460d50781 CodeOwners: Update authnz components (#60985)
update authnz codeowners
2023-01-05 17:23:36 +01:00
George Robinson
9af7adef76 Alerting: Support customizable timeout for screenshots (#60981)
This commit adds a customizable timeout for screenshots called
capture_timeout. The default value is 10 seconds, and the maximum
value is 30 seconds. This timeout should be less than the minimum
Interval of all Evaluation Groups to avoid back pressure on alert
rule evaluation.
2023-01-05 16:07:46 +00:00
Gareth Dawson
bd9cce2866 Loki: Add hints for query filters (#60293)
* add hint for label filter

* add hint for line filter

* add feature tracking for hints click

* fix failing tests

* add tests for new query builder hints

* update hint labels

* fix: hint continues to render after adding operation

* add missing title property to hints

* make use of isQueryWithParser and remove isQueryWithLogFmt

* refactor isQueryWithLabelFilter

* always render label operation, even if incomplete

* suggestion

* fix oversight in feature tracking name on hint click

* update query hint label

* improvements

* add missing test for ADD_NO_PIPELINE_ERROR
2023-01-05 13:56:31 +00:00
Jo
fc0926f8fb SupportBundles: Recover from Bundler panics gracefully (#60995)
bundler panics should not crash Grafana
2023-01-05 14:23:35 +01:00
Ashley Harrison
a9e39a108c RelativeTimeRangePicker: correctly trap focus in overlay (#60984)
* correctly trap focus in relativetimerangepicker overlay

* add underlay

Co-authored-by: Michael Mandrus <michael.mandrus@grafana.com>
2023-01-05 11:35:47 +00:00
Ivana Huckova
772e8cbf60 Elasticsearch: Use interval provided by data request in backend (#60480)
* Elasticsearch: Remove interval caulation and use interval provises by grafana

* Remove redundant code

* Adjust snapshot tests

* Update test

* Fix lint
2023-01-05 12:26:27 +01:00
Ryan McKinley
8b50c60342 TextPanel: Refactor to functional component (#60885) 2023-01-05 02:08:00 -08:00
Polina Boneva
3f1908464d PanelChrome: Implement Panel header with error, loading, and streaming data status (#60147)
* dashboards squad mob! 🔱

lastFile:packages/grafana-ui/src/components/LoadingBar/LoadingBar.tsx

* dashboards squad mob! 🔱

* dashboards squad mob! 🔱

lastFile:packages/grafana-ui/src/components/LoadingBar/LoadingBar.tsx

* user essentials mob! 🔱

* create grafana/ui LoadingBar and set it up in Storybook

* Remove test changes on PanelChrome

* Fix mdx page reference

* dashboards squad mob! 🔱

lastFile:public/api-merged.json

* dashboards squad mob! 🔱

* dashboards squad mob! 🔱

* dashboards squad mob! 🔱

* dashboards squad mob! 🔱

lastFile:public/app/features/dashboard/dashgrid/PanelHeader/PanelHeaderState.tsx

* Implemented basic draft of panel header states. Using ToolbarButton instead of IconButton.

* use 'warning' styled Button in ToolbarButton

* make LoadingBar a simple JSX Element; do not use containerWidth; have a wrapper around the loading bar itself;

* fix wrapper around LoadingBar: willChange css prop makes performance of rerendering better

* States: Render general panel query error states and render notices next
to the title

* add streaming to PanelChrome if data is streaming instead of loading

* PanelHeaderState with its own state 'mode'

* clean up useEffect

* notices have their own square space in the size of the panel header

* clean up

* minor fixes

* moving the LoadingBar to core

* LoadingBar is not in grafana/ui

* always have a place for the loading bar in the PanelChrome, otherwise it moves everything when appearing;

remove titleItemsNodes for now - in later development

make no changes to Notice component, not part of this PR

* Revert "moving the LoadingBar to core"

This reverts commit 11f0f4ff2f.

* do not use internal comment as it doesn't do anything

* integrate LoadingBar in PanelChrome from grafana/ui directly

* fix deprecated leftItems comment

* Modify annimation to 1 second

* remove comments

* remove streaming stopped UI because we cannot know when the streaming has stopped

* skip unnecessary test for now

* no point in removing hoverHeader now, even though it's not yet implemented

* small fixes

* error state of the data in a panel is positioned in PanelChrome itself, not in PanelHeaderState

* Fixed loading state jitter

* remove warning state as we have none of it

* streaming cannot be stopped from the icon

* explicit content container width and height

* explicit content container width and height

* edit deprecated comment

* fix LoadingBar to be relative to width of panel; remove explicit width and height on content strict

* no warning state of the data

* status of the panel data given directly to PanelChrome, not a node

* clean up

* clean up console log

Co-authored-by: kay delaney <45561153+kaydelaney@users.noreply.github.com>

* panel title design fits typography h6 styles; render error status only if error or error message are passed to PanelChrome

* add storybook examples; prepare PanelChrome for hoverHeader because this will be a breaking change and it will affect how the storybook example shows up

* show storybook example for streaming panel with title because that's the condition for having a header

* override margin-bottom: 0.45em of h6

Co-authored-by: Alexandra Vargas <alexa1866@gmail.com>
Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
Co-authored-by: kay delaney <45561153+kaydelaney@users.noreply.github.com>
2023-01-05 11:48:11 +02:00
Adela Almasan
88a8cba6b0 Canvas: Save element placement (#61007) 2023-01-04 18:29:01 -05:00
Ieva
9334582022 RBAC: move RBAC + OnCall feature toggle to beta state (#60991)
* move RBAC + OnCall feature toggle to beta state

* move accessControlOnCall to the correct section in the docs
2023-01-04 17:52:08 +01:00
Galen Kistler
0e265245eb Prometheus: New instant query results view in Explore (#60479)
Add new default instant query UI option for prometheus users in Explore.

Co-authored-by: Beto Muniz <contato@betomuniz.com>
Co-authored-by: Giordano Ricci <me@giordanoricci.com>
2023-01-04 10:46:03 -06:00
Alexander Weaver
0e7640475f Alerting: Store alertmanager configuration history in a separate table in the database (#60492)
* Update config store to split between active and history tables

* Migrations to fix up indexes

* Implement migration from old format to new

* Move add migrations call

* Delete duplicated rows

* Explicitly map fields

* Quote the column name because it's a reserved word

* Lift migrations to top

* Use XORM for nearly everything, avoid any non trivial raw SQL

* Touch up indexes and zero out IDs on move

* Drop TODO that's already completed

* Fix assignment of IDs
2023-01-04 10:43:26 -06:00
Jo
c74d86ca27 SupportBundles: Move support bundles to services (#60986)
* move support bundles to services

* update CODEOWNERS
2023-01-04 17:33:18 +01:00
Andre Pereira
298576c6a1 Tempo: Fix service graph when tempoApmTable is enabled (#60975)
Fix query variables breaking the generated query for the APM service graph
2023-01-04 16:18:41 +00:00
Alexander Weaver
1381fb6dfc Annotations: Fix EpochEnd being zero for Alert-generated annotations (#60931)
* Revert linter suggestion

* Re-add nolint

* Work in terms of pointer rather than copy

* Add tests covering validation

* Add comment
2023-01-04 10:16:54 -06:00
Josh Hunt
0aeee7f265 Chore: Automatically add crowdin PRs to User Essentials board (#60912)
* Chore: Automatically add crowdin PRs to User Essentials board

* ci
2023-01-04 15:47:45 +00:00
Josh Hunt
a26d4c90b2 I18N: Fail i18n:extract on warnings + update strings (#60949)
* I18N: Fail i18n:extract on warnings

* I18N: Fix onboarding page title

* extract all strings

* move t reassign outside of function
2023-01-04 15:28:07 +00:00
Karl Persson
d572ccdb2a AuthN: tune logging (#60917)
* AuthN: remove comment

* AuthN: Only start trace if valid authentication client is used
2023-01-04 16:25:42 +01:00
idafurjes
bb35f37b66 Chore: Delete org model duplicates (#60940)
* Delete org model duplicates

* Fix lint

* Move OrgDetailsDTO to org pkg
2023-01-04 16:20:26 +01:00
Stephanie Hingtgen
39b8d3a182 Plugins: add UI for secure socks proxy feature toggle (#60750) 2023-01-04 20:47:27 +05:30
Jo
9633b5c69c SupportBundles: Improve UX (#60964)
implement of easy frontend fixes for bundle list
2023-01-04 16:11:02 +01:00
Jo
a226903ec6 AuthN: Add session client (#60894)
* add basic session client

* populate UserToken in ReqContext

* token rotation as a post auth hook

* fixed in context handler

* add session token rotation

* add session token tests

* use namespacedID constructor
2023-01-04 16:10:43 +01:00
Ashley Harrison
ebb34560a4 Navigation: use "Home" instead of "Grafana" as the default Breadcrumb text (#60973)
* use Home instead of Grafana as the default Breadcrumb text

* use translated text
2023-01-04 15:02:30 +00:00
Ashley Harrison
7005b7bf8a Navigation: Update e2e tests to work with topnav (#60910)
* turn on topnav toggle in e2e tests

* fix variable e2e tests

* fix remaining tests + remove some hardcoded waits

* speculative fixes

* wait for error to disappear

* use new selector, turn toggle back off
2023-01-04 14:59:53 +00:00
Yuri Tseretyan
4d989860fb Alerting: Fix conversion of alert state from db state during manager warmup (#60933) 2023-01-04 09:40:04 -05:00
Ashley Harrison
8149efc729 Chore: group visx updates together (#60895)
group visx updates together
2023-01-04 14:32:57 +00:00
Gábor Farkas
12c4098bcd elastic: backend: handle naming bucket_scripts (#60460) 2023-01-04 15:26:57 +01:00
Domas
72d257ed4f PanelRenderer: fix error when variable replacement is used (#60968)
fix panel renderer when using replace
2023-01-04 16:20:44 +02:00
Sonia Aguilar
4ae0382415 Alerting: Add pagination in group modal alert table (#60868)
Add pagination in group modal alert table
2023-01-04 14:48:34 +01:00
Ivan Ortega Alba
d0f6a3a4ca Scene: Dashboard loader supports transformations & unit tests (#60855)
* Scene: use transformations for panel queries

* refactor: Clean up DashboardLoader class

* test: Add unit tests for creators

* test: Ensure the row herarchy is properly replicated

* test: Ensure the URLSync is initialized

* refactor: Use fixture to create panels
2023-01-04 08:29:22 -05:00
Galen Kistler
6ab6d661e2 Dashboard: .txt file extension is not supported in /dashboard/import file upload (#59760)
remove typo, allow txt file upload
2023-01-04 07:16:23 -06:00
Karl Persson
da24a9d74e AuthN: Add render auth client (#60914)
* AuthN: Add boilderplate for render auth client

* AuthN: Implement test function for render auth client

* AuthN: Implement Authenticate for render arender auth client

* ContextHandler: Perform render auth if flag is enabled
2023-01-04 13:48:00 +01:00
Joao Silva
220175cab9 A11y: Improve accessibility of ColorPickerInput (#60923) 2023-01-04 13:19:41 +01:00
Alex Khomenko
c68603a573 Teams: Use generated TS types (#60618)
* Teams: Use generated TS types

* Teams: Update types usage

* Teams: Update types import

* Teams: Move metadata to mock function

* Teams: Move TeamDTO to types

* Update kind
2023-01-04 14:08:03 +02:00
melGL
fc91baa2f8 Alerting Docs: Clarify feature flag for Grafana Cloud users (#57637)
Docs: Clarify feature flag for Grafana Cloud

Images in Alerts requires a feature flag for hosted Grafana instances. This change directs users to contact Support for access to this feature.
2023-01-04 10:57:58 +00:00
Andrej Ocenas
85d8d9c00b Phlare: Add devenv block (#60911)
Add Phlare devenv block
2023-01-04 11:29:45 +01:00
Jack Baldry
1516aa2762 Remove packages path from branch filter (#60128)
That directory is no longer used in published docs and causes this
workflow to fail when changes only affect the packages directory.

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
2023-01-04 10:18:44 +00:00
mikkancso
0adcdae325 Connections: Show only data source plugins on Connect Data page (#60523)
show only data source plugins on connect data page

We intended to show only data source plugins on this page, but this
filter was missing until now.
2023-01-04 10:45:50 +01:00
Erik Sundell
bd09e88e50 Cloudwatch: Refactor log group model (#60873)
* refactor log group query model

* update deprecated comment

* refactor test
2023-01-04 10:07:03 +01:00
Alexander Weaver
b88b8bc291 Alerting: Fix missing dashboard/panelID links in annotations (#60926)
Assign thru ref
2023-01-03 14:12:27 -06:00
owensmallwood
f0ee3ac80a PublicDashboards: Enterprise email sharing feature flag (#60644)
adds feature flag for pubdash email sharing
2023-01-03 13:45:15 -06:00
Galen Kistler
4ed0cc7d18 Prometheus: Code editor - upgrade /series API endpoints to use label/values and /labels for supported prometheus clients (#59576)
* Allow prometheus code editor API to use new prometheus API calls for supported data source clients.
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2023-01-03 12:38:11 -06:00
Hamas Shafiq
0dffbcbca7 Chore: Refactor the root of the TraceTimelineViewer folder to TS (#59748) 2023-01-03 15:45:28 +00:00
Grafana I18n Bot
9d767b78d4 I18n: Crowdin sync (#59571)
* Update source file grafana.json

* New translations grafana.json (French)

* New translations grafana.json (Spanish)

* New translations grafana.json (German)

* New translations grafana.json (Chinese Simplified)
2023-01-03 14:45:10 +00:00
idafurjes
325f7a789e Chore: Delete duplicate models for user (#60906)
* Delete duplicate models for user

* Use new models in some tests

* Add auth model conversion back
2023-01-03 15:25:35 +01:00
Hamas Shafiq
355f513718 Chore: Refactor the TraceTimelineViewer/TimelineHeaderRow folder to TypeScript (#60351) 2023-01-03 13:36:50 +00:00
Will Browne
9aed364898 Plugins: Fix plugin query help markdown (#60485)
* refactor(pluginhelp): rewrite as functional component with useAsync

* mimic old behaviour

* feat(pluginhelp): display message if backend returned an empty string

Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com>
2023-01-03 14:20:27 +01:00
Hamas Shafiq
eb2a9d132a Chore: Convert SpanGraph/index.test.tsx to RTL (#60200) 2023-01-03 13:01:02 +00:00
mikkancso
899b035087 Connections: Update datasource details url (#60521)
update datasource details url

My ultimate goal is to make the cloud-onboarding plugin link to
datasource details page inside Connections.
I tried to do that, so that it linked to
`/connections/connect-data/datasources/:id`, but it didn't work. Details
below:

We have a problem with the datasources details page url:
If the plugin is not present, then the
`/connections/connect-data/datasources/:id` url is finely served by Grafana.
However, when the plugin is present, we register a Route entry like this:
`<Route exact=false path='/connections/connect-data' component={AppPlugin} />`
And this entry will be higher in the routes list than the datasources Route.
This means that every path under `/connections/connect-data` will be served
by the plugin. That's why exact is false. Otherwise the plugin couldn't
serve integrations details at `connect-data/infrastructure/:id`.
So `exact=false` is needed.

What can we do?
1. Put Grafana's Connection routes higher in the list of routes.
2. Find a different URL for datasources details page

Unfortunately, we can't do 1., because:
Routes roughly look like this (in this order):
- exact: false, path: connections/connect-data, component: AppPlugin
- exact: false, path: connections/your-connections/infrastructure,
    component: AppPlugin
- exact: false, path: connections, component: Connections
So if a request comes for `/connections` or `/connections/your-connections`
or `/connections/your-connections/datasources`, it will be served by
Connections.

Therefore, we can't really put the route for Connections higher in the list
of routes, because then it will match all routes beginning with
`/connections`, and the plugin's routes will have no effect.

So the only alternative left is to find another path :/

Since we set the DataSourceDetailsPage's navId explicitly to
`connections-connect-data`, the breadcrumbs will continue to show the
data source page as a child item of the Connect Data page :)
2023-01-03 13:57:16 +01:00
Alex Khomenko
b1573104d4 Schema: Use the latest cuetsy version (#60696)
* Schema: Use the latest cuetsy version

* Schema: Update Permission

* Use latest cuetsy
2023-01-03 14:10:32 +02:00
Sonia Aguilar
f22286df3f Alerting: Fix missing edit/delete/copy link in alert view (#60874)
Fix missing edit/delete/copy link in alert view
2023-01-03 13:08:14 +01:00
Andre Pereira
44afad2ce4 Tempo: TraceQL autocomplete feature tracking (#60876)
* Track usages of completion items in TraceQL query editor

* Change back traceID reportInteraction() name to avoid breaking dashboards

* Filter out TAG_VALUE labels from feature tracking to avoid exposing sensitive data
2023-01-03 10:43:11 +00:00
Joao Silva
993ab2587e A11y: Fix accessibility in menu icon on small screens (#60844) 2023-01-03 11:40:25 +01:00
Joey Tawadrous
b8618723d0 Phlare: Transition from LogQL/PromQL to Phlare should keep the query (#60217)
* Transition from LogQL/PromQL to Phlare keeps the query

* Tests
2023-01-03 10:25:16 +00:00
Erik Sundell
5bceff971d CloudWatch: Decrease log group picker viewport size (#60891)
decreasing viewport height
2023-01-03 11:22:55 +01:00
renovate[bot]
5576a4488d Update dependency @visx/event to v2.17.0 (#60717)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-01-03 10:22:33 +00:00
renovate[bot]
978d49ea51 Update dependency @babel/plugin-proposal-optional-chaining to v7.20.7 (#60716)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-01-03 10:10:44 +00:00
Jo
ba9decfd04 Devenv: Add SAML authentik devenv (#60881)
* add SAML support to authentik devenv

* update authentik image

* mark SAML as done
2023-01-03 10:06:24 +00:00
Karl Persson
9fbb29c588 AuthN: Add client to perform basic authentication (#60877)
* AuthN: Add basic auth client boilerplate

* AuthN: Implement test function for basic auth client

* AuthN: Implement the authentication method for basic auth

* AuthN: Add tests for basic auth authentication

* ContextHandler: perform basic auth authentication through authn service
if feature toggle is enabled

* AuthN: Add providers for sync services and pass required dependencies
2023-01-03 10:23:38 +01:00
Erik Sundell
b3540b5f46 Cloudwatch: Add feedback labels to log groups selector (#60619)
* add max item text

* add tests

* add selected log groups counter label

* cleanup

* fix styling in selector fields

* remove unused imports

* move selected log groups to a new component

* add confirm dialog

* remove not used import

* set max logs groups to 6

* add margin bottom
2023-01-03 09:56:01 +01:00
Jo
e1ea5490b3 Devenv: Remove abandoned environment (#60882)
chore: remove abandoned environment
2023-01-03 09:30:59 +01:00
sam boyer
7fd1d5cef0 Codegen: Add support for optional maps (#60883) 2023-01-03 09:12:48 +02:00
Timur Olzhabayev
3ceb3edcb9 Docs: Updating plugin publishing docs (#60853)
* Updating pluign publishing docs

* Update docs/sources/developers/plugins/publish-a-plugin.md

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>

* Update docs/sources/developers/plugins/publish-a-plugin.md

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
2023-01-02 17:09:36 +01:00
Karl Persson
5b4e1ee6fc Oauth: Remove extra decoding of redirect url (#60875)
Oauth: remove extra decoding of redirect cookie url
2023-01-02 16:45:45 +01:00
Andre Pereira
950f357175 Tempo: TraceQL editor bug fixes (#60414)
* Set width of common columns between trace and span rows

* Better syntax highlighting for non string constants

* Apply variables to traceql query

* Fix test
2023-01-02 14:23:50 +00:00
Timur Olzhabayev
b179ac91a2 Docs: Removing outdated plugin_dev doc (#60849)
* Removing outdated plugin dev doc

* Update docs/sources/developers/plugins/legacy/_index.md

Co-authored-by: Karen Germond <110922559+karengermond@users.noreply.github.com>

Co-authored-by: Karen Germond <110922559+karengermond@users.noreply.github.com>
2023-01-02 15:20:13 +01:00
Dominik Prokop
4446d500a4 grafana/data: Deprecate kbn.regexEscape and move to grafana/data (#60869)
grafana/data: Deprecate kbn.regexEscape and move escapeRegex to grafana/data
2023-01-02 05:57:55 -08:00
Dominik Prokop
831e7697ae grafana/data: Move useFieldOverrides from core (#60817)
* grafana/data: Move useFieldOverrides from core

* Update packages/grafana-data/src/field/fieldOverrides.ts

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

* Review

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
2023-01-02 02:27:48 -08:00
Erik Sundell
6e89421544 CloudWatch: Add macro for resolving period in SEARCH expressions (#60435)
* interpolate macro in the backend

* refactor logger in cloudwatch query

* revert added metrics

* add docs

* apply pr feedback

* fix broken test

* fix spelling
2023-01-02 09:08:31 +01:00
Michael Mandrus
09c759b36c Graphite: Fix bug in wildcard queries to Graphite plugin (#60549)
* commit something that works, need to figure out scoping issues

* clean up now that I know about addressable values
2022-12-30 13:53:42 -05:00
Todd Treece
73d5aa4878 Prometheus: Refactor exemplar sampler (#60278) 2022-12-30 13:04:35 -05:00
ying-jeanne
ce8512ace7 [xorm] Change interface to become an interface (#60838)
[xorm] change interface to become an interface
2022-12-30 13:58:10 +00:00
MeanMina
dcb106aec0 CODEOWNERS: to rename Observability Experience (#60820)
Update CODEOWNERS to rename Observability Experience
2022-12-30 09:23:02 +00:00
Matthew Jacobson
570b62091c Alerting: Prevent uid collision in migration when db is case-insensitive (#60494)
* Alerting: Prevent short uid collision in legacy migration when db is case-insensitive

Two factors come into play that cause sporadic uid conflicts during legacy alert migration:
- MySQL and MySQL-compatible backends use case-insensitive collation.
- Our short uid generator is not a uniform RNG and generates uids in such a way that generations in quick succession have a higher probability of creating similar uids.

Normally we would be guaranteed unique short uid generation, however if the source alphabet contains
duplicate characters (for example, if we use case-insensitive comparison) this guarantee is void.

Generating even ~1000 uids in quick succession is nearly guaranteed to create a case-insensitive
duplicate.
2022-12-29 15:15:29 -05:00
Giordano Ricci
9ff3bf4849 Explore: Use Datasource Onboarding page when visiting without any datasource set up (#60399)
* allow DatasourceOnboarding title and cta text customization

* Explore: use Datasource Onboarding page when visiting without any datasource set up

* move & rename DatasourceOnboarding

* Rename component
2022-12-29 15:38:40 +00:00
ismail simsek
15d32546ea Prometheus: Fix Instant query time calculation (#60815)
* Use single point in time instead of doing time range calculation

* Comment update
2022-12-29 16:32:08 +01:00
Sandro
ab1777e7a6 Remove accidential code block (#60712) 2022-12-29 08:19:59 -06:00
Dominik Prokop
c3c4a57c79 grafana/data: Move getPanelOptionsWithDefaults from core (#60813)
* grafana/data: Move getPanelOptionsWithDefaults from core

* Add internal comments
2022-12-29 05:48:22 -08:00
Dominik Prokop
168afa99d1 Scenes / DashboardsLoader: Add variables migration (#60226)
* VizPanel - add variables dependencies definition

* Migrate variables to scene variables

* Constant variable migration

* Update test

* Lint fix
2022-12-29 05:34:22 -08:00
Karen Germond
53d3a810dd Fix https://github.com/grafana/grafana/issues/60772 -- typo in alerting-rules-edit-mimir-loki-namespace-group (#60796)
Fix https://github.com/grafana/grafana/issues/60772
2022-12-29 07:03:58 -06:00
Emil Tullstedt
bf574e98c8 Chore: Upgrade Go to 1.19.4 (#60794) 2022-12-29 13:03:56 +01:00
Joan López de la Franca Beltran
329fedb55d Codegen: Fix mudball gen (#60812)
* Codegen: Fix mudball gen

* Fix Go build tags annotations
2022-12-29 12:48:27 +01:00
Dominik Prokop
370aa9f6ea Runtime: Expose panel plugin import utils (#60799)
* Runtime: Expose plugin import utils

* Review

* Fix
2022-12-29 00:45:50 -08:00
Ivan Ortega Alba
7de81ca673 test: Fix Jest reporter (#60810) 2022-12-29 03:14:09 -05:00
ying-jeanne
a3a0c01301 [xorm] Remove some unused functions && mssql related logics (#60788)
* remove some unused functions

* more

* put back the pakcage replace
2022-12-28 22:23:25 -05:00
Torkel Ödegaard
497ce81867 Table: Refactoring state handling for expanded rows (#60791)
* Table: Refactoring state handling for expanded rows

* Simplify row expander

* remove console.log

* review fixes

* Simplify hook name

* fixed test
2022-12-28 19:37:17 +01:00
Torkel Ödegaard
14c2209b33 TopNav: Fixes the invite user page navId / missing section nav and design of user list page (#60701) 2022-12-28 19:29:42 +01:00
Dominik Prokop
78d7f11b8e grafana/data: Move data frames processing functions from core (#60795) 2022-12-28 07:59:45 -08:00
Dominik Prokop
aa0936127d Runtime: Expose runRequest function (#60793) 2022-12-28 06:28:12 -08:00
Kristin Laemmert
b356526ebe chore(dashboard version service): remove user table join from store implementations (#60779)
chore (dashboardversion service): remove (one) join from store implementations

We return the userID from the dashboardservice store; the service (or api) layer can use that to get the user's login when needed.
2022-12-28 07:59:10 -05:00
Kristin Laemmert
6e9419ea80 chore(dashboard version service): make method sigs more consistent (#60736)
The DashboardVersion struct is the database object; the DashboardVersionDTO is the object that should be sent to the API layer.

In the future I'd like to move DashboardVersion to dashverimpl and un-export it, but there are a few places that Insert directly into that table, not all of which are test fixtures, so that should wait until we clean up at least the DashboardService's use of it.
2022-12-27 11:17:24 -05:00
ying-jeanne
29276581d2 [xorm] Remove cache from xorm (#60770)
[xorm] remove cache from xorm
2022-12-27 10:48:49 -05:00
Emil Tullstedt
88323a30b7 Logging: Fix running tests multiple times (#60559)
- Create new ctxLogProviders for each scenario to support
go test -count=n for n>1. Currently, it just kept adding providers for
every new run, which would make it add way more key-value pairs to
the provider than necessary.

- Adding a helper method to the scenario to make it easier to set up tests
for logging and easier to read the tests. I also flattened the test file, to
reduce the complexity of each test function.
2022-12-27 16:42:03 +01:00
Dominik Prokop
9b7418ec17 Revert "Chore: Update typescript to 4.9.3 (#60538)" (#60774)
This reverts commit 51f5334748.
2022-12-27 06:30:52 -08:00
Ivan Ortega Alba
0d65063d0b Jest: Add logger to print test results in Loki friendly format (#59672) 2022-12-27 12:06:06 +01:00
Torkel Ödegaard
591c86e31d Scene: Consolidate layout props on a layout prop (formerly named size) (#60437)
* Initial prop rename changes

* Updates

* Rename layout to placement

* Fix

* Fixed test

Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
2022-12-27 09:05:06 +01:00
ying-jeanne
12c292fd44 [Bug] Fix annotations update/patch (#60385)
* fix annotations update/patch

* verify that when update doesn't contain data, we will not update data
2022-12-26 09:53:52 -05:00
ying-jeanne
746c7839dc [xorm] Remove some unused functionalities from engine (#60763)
remove some unused functionalities from engine
2022-12-26 22:39:21 +08:00
ying-jeanne
77b3520b47 [xorm] remove mssql as driver (#60760)
* Remove mssql driver

* reput the go.mod

* add back xorm and remove mssql
2022-12-26 06:01:51 -05:00
ying-jeanne
33dbbbad6b [xorm] Rmove engine group (#60761) 2022-12-26 05:32:51 -05:00
ying-jeanne
572e5a76ef [xorm] add xorm as package into grafana (#60678)
* add xorm and xorm/core as package

* remove mssql and oracle as driver

* fix some typo

* remove unittest

* remove some cache

* restore the removed part

* remove logfile
2022-12-26 17:45:21 +08:00
Dan Cech
9c4051bfa1 Switch grafana server command to use urfave/cli/v2 (#60684)
* switch grafana server to use urfave/cli/v2

* autocomplete support

* lint fix
2022-12-24 22:33:18 -05:00
Victor Marin
9bd6e471e4 BarChart: Clear tooltip when cursor exits bar (#60617) 2022-12-23 13:00:52 -06:00
Leon Sorokin
b439fd56d8 Heatmap: Fix bottom bucket range in tooltip (#60562)
Co-authored-by: nmarrs <nathanielmarrs@gmail.com>
2022-12-23 12:56:07 -06:00
Nathan Marrs
8b200d74b9 Geomap: Fix datalink UX regression (#60739) 2022-12-23 10:48:01 -08:00
Nathan Marrs
283cdc184e Barchart: Fix tooltip erroneous header (#60741) 2022-12-23 13:42:53 -05:00
Andres Martinez Gotor
7a679db08b Azure Monitor: Add current value to editor options (#60726) 2022-12-23 18:43:43 +01:00
yusuf-multhan
bb5ac924ae Folder: Folder name update redirects to desired location, for grafana served with subpath (#60721) 2022-12-23 17:29:41 +01:00
Gilles De Mey
f72cbc16ad Alerting: Warn about missing contact-point in notification policy (#60728)
* initial simplistic version
still need to figure out what to do with child policies

* adds test
2022-12-23 14:54:57 +01:00
Serge Zaitsev
1d12dda7db Chore: Update CODEOWNERS (#60724)
* Chore: Update CODEOWNERS

* remove comment
2022-12-23 08:46:17 -05:00
Andreas Christou
f319a5f740 CloudMonitor: Add adoption metrics (#60706)
* Add adoption metrics for Cloud Monitoring

- Add metrics to track each query type (MQL/Time Series Query, Builder/Time Series Filter, SLO, Annotation)

* Remove hidden fields and account for pre 9.4 queries

* Simplify object
2022-12-23 07:01:29 -05:00
ismail simsek
76e822af39 Prometheus: Fix exemplar popover overflow (#60189)
Add popover modifiers to fix overflow issue
2022-12-23 10:14:46 +01:00
Yuri Tseretyan
33e4a93e36 Revert "Chore: Add static UID to test datasource to devenv provisioning file" (#60714)
Revert "Chore: Add static UID to test datasource to devenv provisioning file (#60707)"

This reverts commit 4e2bd63572.
2022-12-23 07:58:47 +01:00
Santiago
05c9af5110 Extract custom template functions (#60695)
extract custom template functions and export the FuncMap
2022-12-22 17:31:40 -03:00
Yuri Tseretyan
4e2bd63572 Chore: Add static UID to test datasource to devenv provisioning file (#60707) 2022-12-22 14:57:01 -05:00
Andres Martinez Gotor
eb757ee15e Azure Monitor: Fix behavior for nested template variables (#60697) 2022-12-22 17:31:05 +01:00
Andreas Christou
c34aa05548 grafana/e2e: Add ability to customise scenario config (#60646)
* Add ability to retry e2e test scenarios

* Add wait and remove retries

* Revert retry logic and elaborate on 15s wait time

* No need to update datasource name now
2022-12-22 11:07:49 -05:00
juanicabanas
9c3ddda99b PublicDashboards: Revert Time range setting added (#60698)
Revert "PublicDashboards: Time range setting added (#60487)"

This reverts commit 6f609dbced.
2022-12-22 12:31:54 -03:00
Gilles De Mey
e9fe9baf66 Alerting: Improve threshold displays (#60046) 2022-12-22 16:28:17 +01:00
Kristina
58716de073 Fix Explore URL generator (#60653) 2022-12-22 16:23:30 +01:00
Ivana Huckova
c289cd136c Elasticsearch: Fix adding of adhoc filters when jumping to explore (#60691)
* Elasticsearch: Fix adding of adhoc filters when jumping to explore

* Change NOT operator to - as it is preffered solution
2022-12-22 16:06:30 +01:00
Sven Grossmann
9f9bf4650d Loki: Fix missing parameters on Query Builder operations (#60677)
* add missing mandatory params

* improve naming

* change let to const
2022-12-22 15:31:41 +01:00
Yuri Tseretyan
f990be58cb Alerting: Use all notifiers from alerting repository (#60655) 2022-12-22 09:27:18 -05:00
Kristin Laemmert
542cccaecc flapflapflapflap - "organization not found" is really annoying (#60628)
flapflapflapflap
2022-12-22 09:14:09 -05:00
Ivana Huckova
a1ef3d77f2 Elasticsearch: Use constants for default values and types (#60673) 2022-12-22 15:08:15 +01:00
Dimitris Sotirakis
658414a025 CI: Update grabpl to v3.0.20 (#60670)
Update grabpl to v3.0.20
2022-12-22 14:51:43 +01:00
Sven Grossmann
01c4783c0b Logs: Fix height of logs component when used with topnav (#60669)
fix height for topNav
2022-12-22 14:43:02 +01:00
Sonia Aguilar
22ad487c4b Use queryFn instead of query to be able to catch errors in onCall req… (#60685)
Use queryFn instead of query to be able to catch errors in onCall request
2022-12-22 14:30:27 +01:00
Elthariel
9ce1cd9ddf Docs: Add implementation key in data source table (#59494)
* Add `implementation` key in data source table

The implementation field that seems to be used by the alertmanager data source config wasn't documentated

* Align | of table

Co-authored-by: Armand Grillet <2117580+armandgrillet@users.noreply.github.com>
2022-12-22 07:41:32 -05:00
Andres Martinez Gotor
f8cc45f5bd Azure Monitor: Fix metric metadata retrieval based on template variables (#60674) 2022-12-22 13:33:54 +01:00
sam boyer
b8253ac3b9 deps: Update thema, use CUE fork (#60496)
* deps: Update thema, use CUE fork

* Remove superfluous openapi-codegen output

* Update thema again to catch cuetsy changes

* Rerun codegen with latest

* Latest thema, removes cuetsy update

* Latest of cuetsy

* Update type usage

* One last cuetsy rollback

* Update playlist summary tests

* More lint fixes

* Remove TS veneer changes for VariableHide

Co-authored-by: Clarity-89 <homes89@ukr.net>
2022-12-22 07:20:02 -05:00
Andres Martinez Gotor
9d64e7cedc Docs: Update Azure Monitor config parameters (#60577) 2022-12-22 11:56:14 +01:00
Dimitris Sotirakis
21a017e185 Lint: Fix lint-frontend step error (#60671)
yarn run prettier:write
2022-12-22 10:50:20 +00:00
Giedrius Statkevičius
0485cf34cd Plugins: Pass through dashboard/contextual HTTP headers to plugins/datasources (#60301)
`X-Dashboard-Uid`, `X-Datasource-Uid`, `X-Grafana-Org-Id`, `X-Panel-Id` are very useful headers set
by Grafana front-end that we would like to see on the data source as
well. This is so that it would be possible to pinpoint from where slow
queries are coming in Mimir/Thanos/Cortex/etc., for example. Relevant
Mimir code lines:
0a94f26203/pkg/frontend/transport/handler.go (L182-L184)

Tested manually that with these changes the headers are visible.
2022-12-22 11:15:00 +01:00
sam boyer
b28a208926 kindsys: Move code ownership of CustomStructured to apps platform team (#60497)
kindsys: Separate code ownership of CustomStructured
2022-12-22 10:20:25 +02:00
Torkel Ödegaard
c6db57c7d0 Scene: Exploring typed scene panels (#58168)
* Scene: Exploring typed scene panels

* Updated

* minor rename
2022-12-22 08:19:43 +01:00
Eve Meelan
c7671b6d1d Add copyright notice (#60658)
* Create copyright

* add copyright notice
2022-12-21 14:21:13 -08:00
Yuri Tseretyan
03cd7f0295 Chore: Add mysqld exporter to devenv (#55773)
Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
2022-12-21 16:10:55 -05:00
Kevin Minehart
dc00f6dbe3 CI: add log for branch deletion (#60647)
* add log for branch deletion
* return an err when branch deletion fails
2022-12-21 19:27:49 +00:00
Ashley Harrison
a16ca209fb Segment: Individual segments are now keyboard accessible (#60555)
use <button> for keyboard accessibility
2022-12-21 17:26:18 +00:00
Andreas Christou
0367036108 AzureMonitor: E2E update (#60624)
* Wait for locations call to complete

* Update drone to run cloud suite on tests update
2022-12-21 16:42:24 +00:00
Andreas Christou
2e4bc200f5 AzureMonitor: Correctly set filter values in portal URL (#60627)
* Correctly set filter values in portal URL

* Refactor to include dimensions as a part of AzureMonitor query

* Correctly set splitting value in URL

- Add type for dimension filters object

* Update tests

* Don't test dimensions
2022-12-21 16:30:17 +00:00
Gilles De Mey
cb1ca92419 Alerting: re-enable recording rule editor test (#60639) 2022-12-21 13:12:44 -03:00
Andreas Christou
f3f043e097 AzureMonitor: Set Logs portal URL from resource URI (#60583)
Set URL based off of resource URI
2022-12-21 15:46:31 +00:00
Gilles De Mey
16c6f223ba TimeSeriesPanel: Allow threshold indicators without change handler (#60575) 2022-12-21 16:18:35 +01:00
Ashley Harrison
44232569a8 ToolbarButtonRow: Overflow button now toggles visibility correctly (#60635)
* only close the overlay if we're interacting with something other than the overflow button/the overlay itself

* use a ref instead of a test id
2022-12-21 15:01:39 +00:00
Giordano Ricci
e723021e13 Explore: Re-initialize graph when number of series to show changes (#60499) 2022-12-21 15:01:26 +01:00
Giordano Ricci
838cbf22da Chore: remove various type assertions in Explore (#60501) 2022-12-21 15:01:03 +01:00
Sonia Aguilar
e219e2a834 Alerting: Recognise & change UI for OnCall notification policy + contact point (#60259)
* Identify and show onCall contact points with a badge in case the plugin is installed

* Add onCall logo for onCall contact points Badge

* Refactor and make Grafana App Receiver type more generic, not only for onCall type

* Show onCall notification policy in the specific routing table with special onCall badge

* Fix tests

* Move onCall badge to the type column in contact points view table

* Fix typos and remove onCallIntegrations from tagTypes in alertingApi

* Fetch only local plugins instead of all (external are not needed) and don't fetch plugin details

* Use directly useGetOnCallIntegrationsQuery and more PR review suggestions

* Move onCall contact point to the top in the drop-down,  in the notification policy view

* Add PR review requested changes
2022-12-21 14:46:55 +01:00
Matias Chomicki
c537d3699c Logs A11y: Support keyboard interactions with log lines (#60561)
* Logs A11y: Support keyboard interactions with log lines

* LogRowMessage: specify text align

Co-authored-by: Sven Grossmann <sven.grossmann@grafana.com>

Co-authored-by: Sven Grossmann <sven.grossmann@grafana.com>
2022-12-21 13:45:47 +00:00
Kristin Laemmert
c90756eef5 feat(grafana-cli): allow configuring admin ID for reset-admin-password (#60603)
* feat(grafana-cli): add a flag to control the admin user's ID for reset-admin-password

Since this is now more permissive, I've also added validation that the requested user is an admin.

* slight refactor to support testing
2022-12-21 08:24:33 -05:00
Joao Silva
bf541ee3d1 DatasourceList: Fixes using sub path on datasources URL (#59597) 2022-12-21 14:21:04 +01:00
Dominik Prokop
70dd5b42ce DataLinks: Allow providing a dynamic data link builder (#60452) 2022-12-21 05:09:31 -08:00
Kristina
0adb00b692 Explore: Use new icons for split pane resizing (#60391)
* Add icons, use them for split pane resizing

* Change icons

* Apply scale to child div

* Use fancier logic for displaying icon

* Remove color fill on icon

* Change icons, remove scale

* Change icons and logic
2022-12-21 07:07:05 -06:00
Ashley Harrison
78e12b140e TimePicker accessibility: remove stopPropagation from everywhere (#60404)
* remove stopPropagation from everywhere

* improve keyboard a11y in DateTimePicker
2022-12-21 13:04:47 +00:00
Sergey Kostrukov
96b7fb15de Plugins: Fix parsing of Azure settings for plugins (#60611)
Fix parsing of Azure settings for plugins
2022-12-21 13:37:33 +01:00
Marcus Efraimsson
c35c689a96 Plugins: Automatically forward plugin request HTTP headers in outgoing HTTP requests (#60417)
Automatically forward core plugin request HTTP headers in outgoing HTTP requests. 
Core datasource plugin authors don't have to specifically handle forwarding of HTTP 
headers, e.g. do not have to "hardcode" the header-names in the datasource plugin, 
if not having custom needs.

Fixes #57065
2022-12-21 13:25:58 +01:00
Armand Grillet
aaab477594 Use new link for templating docs (#60615) 2022-12-21 13:10:08 +01:00
Andres Martinez Gotor
733dbe0163 Azure Monitor: Remove references to Germany cloud (#60588) 2022-12-21 11:51:57 +01:00
renovate[bot]
2533b44cb6 Update dependency eslint to v8.30.0 (#60606)
* Update dependency eslint to v8.30.0

* update eslint sdk

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2022-12-21 10:51:38 +00:00
George Robinson
1a442de094 Docs: Rephrase opening sentence for Customize notifications (#60560) 2022-12-21 10:51:02 +00:00
Ashley Harrison
793a3f8d32 Accessibility: clean up VisualizationSuggestions (#60557)
clean up VisualizationSuggestions
2022-12-21 10:40:25 +00:00
Josh Hunt
51f5334748 Chore: Update typescript to 4.9.3 (#60538)
* Update typescript to 4.9.3

* Update from typescript changes
2022-12-21 10:25:29 +00:00
renovate[bot]
0e1700bcd3 Update dependency @cypress/webpack-preprocessor to v5.16.0 (#60605)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-12-21 10:22:10 +00:00
Jo
c6263ccabb SupportBundles: Add runtime information to basic info (#60616)
add extra basic info
2022-12-21 10:40:40 +01:00
Jo
d3031202b6 SupportBundles: Do not allow multiple collectors with the same UID (#60581)
* unexport service methods

* fix typos

* make constants

* do not allow double register of support bundle collectors

* fix get collectors response
2022-12-21 10:15:01 +01:00
Alexander Zobnin
5ef545d290 Role picker: Refactor menu components (#60584)
* Simplify underlying components

* Move state management deeper to RoleMenuGroupsSection component

* Get rid of some unnecessary props passing

* Reduce number of unnecessary re-renders

* Simplify state
2022-12-21 11:59:12 +03:00
Christopher Moyer
3d8890453f docs: corrects broken links (#60594)
correct broken links
2022-12-21 08:44:23 +00:00
Yuri Tseretyan
dc2ca80f4d Alerting: Refactor email notifier (#60602)
* refactor email to not use simplejson

* add tests

* split integration test and unit test + more unit-tests

* Remove outdated comment

Co-authored-by: Armand Grillet <2117580+armandgrillet@users.noreply.github.com>
2022-12-21 02:03:15 -05:00
Santiago
d070032065 Alerting: Fix incorrect links/aliases to template docs (#60597) 2022-12-20 22:38:01 +01:00
hugofqt
8adb16b662 Transformations: Grouping to matrix empty value option (#55591)
* feat: grouping matrix transformer empty value

Allow grouping matrix data transformer to define the value used when the matrix entry is not defined

* fix: grouping to matrix empty value test

* remove balel width for empty value text

Co-authored-by: bohandley <brendan.ohandley@gmail.com>
2022-12-20 15:25:55 -05:00
Karl Persson
c4b4baea2a AuthN: set org id for authentication request in service (#60528)
* AuthN: Replicate functionallity to get org id for request

* Authn: parse org id for the request and populate the auth request with
it

* AuthN: add simple mock for client to use in test

* AuthN: add tests to verify that authentication is called with correct
org id

* AuthN: Add ClientParams to mock

* AuthN: Fix flaky org id selection
2022-12-20 21:18:48 +01:00
Nicholas Auger
17696f8dec Removing hardcoded Cloud CTA in favor of a programmatic from website (#60179)
* Removing hardcoded Cloud CTA in favor of a programmatic from website

* makes prettier

Co-authored-by: Chris Moyer <chris.moyer@grafana.com>
2022-12-20 13:58:59 -06:00
Yuri Tseretyan
4a3097f52a Alerting: Update Discord receiver to use encoding/json to build a webhook message + truncate long message (#60592)
* replace simplejson with models
* truncate too long messages

Co-authored-by: Santiago <santiagohernandez.1997@gmail.com>
2022-12-20 14:20:42 -05:00
Yuri Tseretyan
aaa55b4252 Alerting: Update Kafka receiver to use encoding/json to build messages (#60593)
Co-authored-by: Santiago <santiagohernandez.1997@gmail.com>
2022-12-20 14:20:09 -05:00
Ivan Ortega Alba
3e52d5e72b Fix: Report E2E result stack trace (#60596) 2022-12-20 20:36:18 +02:00
brendamuir
620cc52863 Fixes Alertmanager links (#60591) 2022-12-20 17:09:34 +00:00
Yuri Tseretyan
a0bf62cc9e Alerting: Update receivers to use app version from factory config (#60585) 2022-12-20 11:23:10 -05:00
Sofia Papagiannaki
4df78cebc2 Nested Folders: Unify folder services (#60390)
* Nested Folders: Unify folder services
2022-12-20 17:38:09 +02:00
Konrad Lalik
53d1f4e50b Alerting: Add landing page (#59050)
Co-authored-by: Gilles De Mey <gilles.de.mey@gmail.com>
2022-12-20 16:21:56 +01:00
Andres Martinez Gotor
10cfc27397 AzureMonitor: Update SDK version (#60372) 2022-12-20 16:20:31 +01:00
Yuri Tseretyan
ec45c9c990 Alerting: update dingding, discord, googlechat, kafka, line notifiers to use encoding/json to parse settings (#60542)
also, rename Content to Message to match JSON name for Discord and GoogleChat
2022-12-20 09:46:13 -05:00
Andres Martinez Gotor
76e23a9fef Azure Monitor: Fix config editor style (#60563) 2022-12-20 15:44:02 +01:00
Andres Martinez Gotor
7db8d031d3 Azure Monitor: Fix health check for empty default subscription (#60569) 2022-12-20 15:32:22 +01:00
Christopher Moyer
b5834fd6d3 docs: fixes links (#60541)
fixes links
2022-12-20 08:18:56 -06:00
Kristin Laemmert
06ec8ad185 chore(docs): remove warning about (resolved) bug (#60539)
chore: remove warning about now-resolved bug
2022-12-20 09:05:15 -05:00
sam boyer
f86abf096d schema: Use generated dashboard model in frontend (#55769)
Co-authored-by: Ivan Ortega <ivanortegaalba@gmail.com>
Co-authored-by: Josh Hunt <joshhunt@users.noreply.github.com>
Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
Co-authored-by: polinaboneva <polina.boneva@grafana.com>
2022-12-20 15:04:14 +01:00
Jo
a553040441 Authn: Refactor user sync and org sync as post auth hooks (#60504)
* add user sync

* add org user sync

* add client params

* merge remaining conflicts

* remove change to report.go

* update comments

* add basic tests for user ID population

* add tests for auth ID find

* add tests for user sync create and update

* add tests for orgsync

* satisfy lint

* add userID guards
2022-12-20 08:59:05 -05:00
Karl Persson
1b1a14b6f6 ContextHandler: Get token from req context when performing rotation (#60533)
ContextHandler: get token from req context when performing end of
request rotation
2022-12-20 14:41:26 +01:00
Christian Segundo
707198227c Auth: Log a more useful msg if no OAuth provider configured (#56722)
Log a useful msg if no oauth provider configured

When a user doesn't configure an OAuth provider and uses auto login, Grafana logs a misleading message indicating that he has multiple providers configured.
2022-12-20 14:35:43 +01:00
Ashley Harrison
ba6d2f2a82 Chore: improve some more types (#60476)
* improve some more types

* fixes

Co-authored-by: Zoltán Bedi <zoltan.bedi@gmail.com>
2022-12-20 13:07:57 +00:00
Sofia Papagiannaki
55b014974d Nested folders: Refactor folder update (#60323)
* Nested folders: Refactor folder update

* Apply suggestions from code review
2022-12-20 15:00:33 +02:00
George Robinson
5d4e35c3d5 Docs: Fix links in Using Go's templating language (#60564) 2022-12-20 12:30:43 +00:00
Andres Martinez Gotor
4d693863c0 GoogleCloudMonitoring: Adapt frontend to the new API format (#60173)
* GoogleCloudMonitoring: Migrate queries to the new format

* Refactor Aligment and AligmentFunction components (#60235)

* Adapt CloudMonitoringDatasource and CloudMonitoringAnnotationSupport (#60177)

* Fix: avoid migration for new queries (#60375)

* Move preprocessor handling to the backend (#60383)

* Other fixes and new function (#60411)

* Adapt components to the new API (#60451)

* Split metrics query type in time series list and query (#60475)

* Clean up metricQuery references (#60478)

* More bug fixes (#60525)
2022-12-20 12:47:49 +01:00
Alexander Zobnin
f6f140c412 Role picker: Fix handling groups with the same name (#60535)
* Role picker: split components into separate files

* Role picker: fix selection groups with the same name
2022-12-20 13:43:48 +03:00
Jo
2c7410c87d Admin: Add support bundles (#60536)
* Add support bundles

Co-authored-by: ievaVasiljeva <ieva.vasiljeva@grafana.com>
Co-authored-by: Kalle Persson <kalle.persson@grafana.com>

* tweak code owners

* rename and lint frontend

* lint

* fix backend lint

* register feature flag

* add feature toggle. fix small backend issues

Co-authored-by: ievaVasiljeva <ieva.vasiljeva@grafana.com>
Co-authored-by: Kalle Persson <kalle.persson@grafana.com>
2022-12-20 11:13:37 +01:00
Alexander Zobnin
6e2b148745 Role picker: Split components into separate files (#60519) 2022-12-20 13:05:37 +03:00
Yuri Tseretyan
35090c376c Alerting: Replace VictorOps receiver with the one from alerting repository (#60543)
* replace victorops with one from alerting

* update other usages
2022-12-20 10:55:41 +01:00
George Robinson
d7b555c405 Docs: Remove old message templates documentation (#60548) 2022-12-20 08:23:42 +00:00
juanicabanas
11a2a28ef5 PublicDashboards: Remove unnecessary css style in Audit Table (#60546)
unncessary global style filter-table removed
2022-12-20 02:31:18 +03:00
Alexander Weaver
ca3f8ba6f4 Alerting: Refactor alertmanager notifier to use encoding/json to parse settings instead of simplejson (#55507)
* replace basic auth header with method call

Co-authored-by: Yuri Tseretyan <yuriy.tseretyan@grafana.com>
2022-12-19 15:12:49 -05:00
Gareth Dawson
90185bea00 Loki: Change format of query builder hints (#60228)
* change format of query builder hints

* fix tests

* add hint property on query actions

* revert changes to prometheus hints

* respond to feedback

* fix failing tests

* trigger drone

Co-authored-by: Matias Chomicki <matyax@gmail.com>
2022-12-19 16:28:46 +00:00
Dimitris Sotirakis
158502572e CI: Add aws-marketplace pipeline (#60484)
* Add aws marketplace automation

# Conflicts:
#	.drone.yml

* Fix secret paths

# Conflicts:
#	.drone.yml

* Add docker socket

# Conflicts:
#	.drone.yml

# Conflicts:
#	.drone.yml

* s/enterprise2/enterprise

* Add dependency on the enterprise docker publish

# Conflicts:
#	.drone.yml

* Replace testing args with prod args

# Conflicts:
#	.drone.yml

* Fix path

# Conflicts:
#	.drone.yml
2022-12-19 11:25:48 -05:00
Zoltán Bedi
c25fe34ac0 SQL Datasources: Use health check for config test (#59867)
* SQL Datasources: Use health check for config test

* Remove unnecessary test

* Fix test errors

* Revert mysql go driver update

* Use transform query error

* Use TransformQueryError from sql_engine
2022-12-19 17:17:52 +01:00
Jo
77786f236a RBAC: Fix DeleteUserPermissions not being called on Upsert org sync (#60531)
* fix DeleteUserPermissions not being called on RemoveOrgUser

* do not error out of auth flow

* fix test missing service
2022-12-19 11:10:31 -05:00
Matias Chomicki
dbff9b4b97 CI: Enable coverage report for Elasticsearch (#60513) 2022-12-19 17:04:05 +01:00
Yuri Tseretyan
f0cabe14d5 Alerting: import Grafana alerting package and update usages (#60490)
* update remaining notifiers to use alerting package
2022-12-19 10:53:58 -05:00
Ashley Harrison
9b21375d78 Chore: remove @storybook/addon-knobs package (#60524)
remove @storybook/addon-knobs package
2022-12-19 15:35:32 +00:00
Dimitris Sotirakis
a1c2093b53 CI: Remove enterprise2 bits from enterprise pipelines (#60459)
Remove enterprise2 bits from enterprise pipelines
2022-12-19 17:30:49 +02:00
George Robinson
f6aea16894 Docs: Templating notifications (#60109)
* Docs: Templating notifications

* Feedback

* More feedback

* Edit template notifications

* More edits

* Fix typo

Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com>
Co-authored-by: Armand Grillet <2117580+armandgrillet@users.noreply.github.com>
2022-12-19 15:01:18 +00:00
Ludovic Viaud
f67b8fe0dc Prometheus: Create feature flag to disable exemplar sampling (#60105)
:Fix rebase
2022-12-19 16:00:15 +01:00
Andriy
bce33eeb85 Add plugin spellcheck docs (#60512) 2022-12-19 15:59:34 +01:00
renovate[bot]
4f7920da06 Update dependency @testing-library/dom to v8.19.0 (#51151)
* Update dependency @testing-library/dom to v8.19.0

* refresh lockfile

* fix unit tests

* Revert "fix unit tests"

This reverts commit eb40f3207a.

* Revert "refresh lockfile"

This reverts commit c0cd5822da.

* ensure a consistent version of @testing-library/dom

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2022-12-19 14:44:46 +00:00
juanicabanas
6f609dbced PublicDashboards: Time range setting added (#60487)
Time range added for public dashboard: 

- Enable/Disable switch added in public dashboard configuration.
- Time range picker shown in public dashboard for viewer user
2022-12-19 17:38:37 +03:00
Gareth Dawson
65f7b93e6b Loki: Add format explanation to regex operations (#60518)
* change explain messages for regex operations

* update explain messages to use the more accurate RE2
2022-12-19 14:32:51 +00:00
KristianGrafana
da6f4067f7 Docs: add Grafana security hardening (#58973)
* Docs: add Grafana security hardening

* Apply suggestions from code review

Changed grammar and typos based on feedback.

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>

* Move configure-security-hardening.md file to new directory to comply with Hugo.

* Linting with Prettier

* Apply suggestions from code review

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
2022-12-19 08:31:07 -06:00
Sonia Aguilar
a812818457 Alerting: Show unknown badge instead of Error in group rule modal in case of Mimir unknown interval (#60515)
* Show unknown badge instead of Error in group rule modal in case of  Mimir unknown interval

* Use red Badge with xclamation-circle icon in case of Error in ForBadge

* Fix typo
2022-12-19 15:22:08 +01:00
Giordano Ricci
785c857ec7 QueryHistory: prevent query history tests from failing if the suite is rerun (#60462)
remove all queries from query history after running suite
2022-12-19 14:21:00 +00:00
Ludovic Viaud
645262d4a2 Prometheus: Remove promQueryBuilder feature flag (#60153) 2022-12-19 14:52:06 +01:00
Erik Sundell
e6b5c2655a Cloudwatch: Improve log group selector styling (#60370)
* add space between search field and result table

* add margin between checkbox and log group

* add space between result table and bottom buttons

* revert modal always open

* use secondary variant for cancel button

* fix spacing between selected log groups
2022-12-19 13:48:36 +01:00
Ludovic Viaud
4346a91dee Prometheus: Remove timeSeriesQuery query type (#60466) 2022-12-19 13:16:30 +01:00
Gilles De Mey
1f41dd5df2 Docs: Remove beta mention for expression queries (#60251) 2022-12-19 13:09:08 +01:00
Gilles De Mey
68b044fb7c RelativeTimeRangePicker: Don't respond to submit event when nested in a form element (#60495) 2022-12-19 13:08:33 +01:00
Will Browne
48b33ab521 Plugins: Unsigned chromium file should not invalidate signature for Renderer plugin (#59104)
* Plugins: Unsigned chromium file should not invalidate signature for Renderer plugin

* fix test

* re-work solution
2022-12-19 12:46:27 +01:00
Dimitris Sotirakis
02fbb1cd8f Chore: Remove unused config fields (#60393)
Remove unused config fields
2022-12-19 13:08:43 +02:00
Ashley Harrison
bc3d1fdd2a Command Palette: Correctly clear button styles when changing theme (#60511)
add topnav feature toggle to new theme created when using 'c t'
2022-12-19 10:59:28 +00:00
Armand Grillet
9941dfc2b6 Update the Alerting HA docs (#60292)
* Update the Alerting HA docs

* Update docs/sources/alerting/set-up/configure-high-availability/_index.md

Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com>

* Update docs/sources/alerting/set-up/configure-high-availability/_index.md

Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com>

* Update docs/sources/alerting/set-up/configure-high-availability/_index.md

Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com>

* Update docs/sources/alerting/set-up/configure-high-availability/_index.md

Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com>

* Update docs/sources/alerting/set-up/configure-high-availability/_index.md

Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com>

* Update HA introduction paragraph

* Apply prettier

Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com>
2022-12-19 11:49:42 +01:00
renovate[bot]
1b860a4074 Update dependency rc-cascader to v3.8.0 (#60489)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-12-19 10:09:57 +00:00
renovate[bot]
76ce83be52 Update dependency prettier to v2.8.1 (#60483)
* Update dependency prettier to v2.8.1

* update prettier sdk

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2022-12-19 04:57:34 -05:00
Jack Baldry
97f01c0d1a Apply linting advice from doc-validator tool (#59606)
* Apply linting advice from doc-validator tool

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

* Prettier

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
2022-12-19 09:49:44 +00:00
Jack Westbrook
f3f9697914 Storybook: Bump dark-mode addon to 2.0.4 and remove patch (#60384)
chore(storybook): bump dark-mode addon to 2.0.4 and remove patch
2022-12-19 10:43:21 +01:00
renovate[bot]
271dbbb552 Update dependency msw to v0.49.2 (#60482)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-12-19 09:42:43 +00:00
Ashley Harrison
3c399ed943 Accessibility: Render gauge as a button when onClick is provided (#60396)
render gauge as a button when onClick is provided
2022-12-19 09:40:45 +00:00
Sofia Papagiannaki
b1ef5ab320 Nested Folders: Support listing nested folder children (#58566)
* Nested Folders: Support listing nested folder children

* Filter out subfolders with no permissions

* Apply suggestion from code review
2022-12-19 10:52:04 +02:00
Karl Persson
0743c4eb87 ServiceAccount: Rewrite the api test to use fakes (#60441)
* RBAC: Add fake for permissions service

* ServiceAccount: Rewrite create api tests

* ServiceAccount: Rewrite api delete tests

* ServiceAccount: Rewrite api test for RetriveServiceAccount

* ServiceAccount: Refactor UpdateServiceAccount api test

* ServiceAccount: Refactor CreateToken api test

* ServiceAccount: refactor delete token api tests

* ServiceAccount: rewrite list tokens api test

* Remove test helper that is not used any more

* ServiceAccount: remove unused test helpers
2022-12-19 09:27:52 +01:00
Karl Persson
2e53a58bc3 Authn: Add client for api keys (#60339)
* AuthN: Add functionallity to test if auth client should be used

* AuthN: Add bolierplate client for api keys and register it

* AuthN: Add tests for api key client

* Inject service

* AuthN: Update client names

* ContextHandler: Set authn service

* AuthN: Implement authentication for api key client

* ContextHandler: Use authn service for api keys if flag is enabled

* AuthN: refactor authentication method to return additional value to
indicate if client could perform authentication

* update prefixes

* Add namespaced id to identity

* AuthN: Expand the Identity struct to include required fields from signed
in user

* Add error for disabled service account

* Add function to write error response based on errutil.Error

* Add error to log

* Return errors based on errutil.Error

* pass error

* update log message

* Fix namespaced ids

* Add tests

* Lint
2022-12-19 09:22:11 +01:00
sam boyer
cc4d18f626 kindsys: Include composable kinds and planned maturity in report (#60477)
kindsys: Include composable kinds + planned maturity
2022-12-19 09:14:51 +01:00
Yuri Tseretyan
92d12fdefa Alerting: Remove fake secret service in tests (#60488) 2022-12-16 15:01:41 -05:00
Yuri Tseretyan
9ad45aedcf Alerting: replace usage of simplejson to json.RawMessage in NotificationChannelConfig (#60423)
* introduce alias for json.RawMessage with name RawMessage. This is needed to keep raw JSON and implement a marshaler for YAML, which does not seem to be used but there are tests that fail.
* replace usage of simplejson with RawMessage in NotificationChannelConfig
* remove usage of simplejson in tests
* change migration code to convert simplejson to raw message
2022-12-16 13:01:06 -05:00
Ivana Huckova
09bb4423d2 Elasticsearch: Fix pipeline aggregation queries in backend to pass frontend tests (#60337)
* Elasticsearch: Fix pipeline aggregation queries in backend

* Update

* Update lint

* Update pkg/tsdb/elasticsearch/time_series_query.go

* Fix lint

* Fix merge
2022-12-16 17:45:43 +01:00
Kristin Laemmert
cc007e9727 chore: sqlstore cleanup (#60415)
* chore: remove unused test helper from sqlstore

TimeNow() is no longer used in any tests in this package.

* chore: move sqlstore.SQLBuilder to the infra/db package

This required some minor refactoring; we need to be a little more explicit about passing around the dialect and engine. On the other hand, that's a few fewer uses of the `dialect` global constant!

* chore: move UserDeletions into the only package using it

* cleanup around moving sqlbuilder

* remove dialect and sqlog global vars

* rename userDeletions to serviceAccountDeletions
2022-12-16 11:09:06 -05:00
Ivana Huckova
d332dab3ec Elasticsearch: Refactor parse query (#60440)
* Refactor parse query to functions

* Move parsing to new file

* Create empty result variable and use it when returning early

* Fix linting

* Revert "Create empty result variable and use it when returning early"

This reverts commit 36a503f66e.
2022-12-16 16:30:36 +01:00
Kristin Laemmert
e4a877b123 chore: attempt to fix flapping "organization not found" tests (#60418)
we live in hope!
2022-12-16 10:10:59 -05:00
Alexander Weaver
91bd1cdb41 Revert "Alerting: Store alertmanager configuration history in a separate table in the database" (#60470)
Revert "Alerting: Store alertmanager configuration history in a separate table in the database (#60197)"

This reverts commit ec80f38c34.
2022-12-16 10:07:44 -05:00
Ludovic Viaud
63df11b729 Prometheus: Hide query section when empty (#60304) 2022-12-16 15:09:47 +01:00
linoman
25d7c591cf Auth: Add plugin roles to RolePicker (#59667)
* Add `RoleMenuGroupsSection` component

* Add plugin roles data structures

* Use `RoleMenuGroupsSection` for rendering roles

Co-authored-by: Alexander Zobnin <alexanderzobnin@gmail.com>
2022-12-16 14:41:09 +01:00
Gilles De Mey
1da7bf7f60 Alerting: Increase test timeout (#60445) 2022-12-16 12:41:38 +01:00
Alex Moreno
174c61b949 Alerting: Set Dashboard and Panel IDs on rule group replacement (#60374)
* Set Dashboard and Panel IDs on rule group replacement

* fix comments and abbreviate test variable name

* Update pkg/services/ngalert/provisioning/alert_rules.go

Co-authored-by: Jean-Philippe Quéméner <JohnnyQQQQ@users.noreply.github.com>

Co-authored-by: Jean-Philippe Quéméner <JohnnyQQQQ@users.noreply.github.com>
2022-12-16 11:47:25 +01:00
Levente Balogh
689f30623a Levitate: Fix typo in CI workflow scripts (#60438)
Fix: Typo in a Levitate CI script
2022-12-16 05:21:46 -05:00
Fionera
055c3b7332 Prometheus: Add POST support to client (#60243)
* Prometheus: Add POST support to client

* Prometheus: Revert client test change from 1c503908
2022-12-16 11:15:19 +01:00
renovate[bot]
fe0d34c408 Update dependency mini-css-extract-plugin to v2.7.2 (#60421)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-12-16 10:03:09 +00:00
mikkancso
e4d4eacd36 Connections: Render a landing page for pages without actual content (#60369)
* render a landing page for pages without actual content

To be consistent with other pages in Grafana

* update tests
2022-12-16 11:00:35 +01:00
Ashley Harrison
9bbc2c4cbb Chore: fix some typings in @grafana/data (#60009)
fix some typings in @grafana/data
2022-12-16 09:59:00 +00:00
renovate[bot]
2e3c4a7626 Update dependency mocha to v10.2.0 (#60422)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-12-16 09:58:27 +00:00
renovate[bot]
4d16cf05ec Update dependency esbuild to v0.16.7 (#60326)
* Update dependency esbuild to v0.16.7

* chore(packages): bump rollup-esbuild-plugin to 5.0.0

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com>
2022-12-16 04:48:59 -05:00
Alexander Weaver
ec80f38c34 Alerting: Store alertmanager configuration history in a separate table in the database (#60197)
* Update config store to split between active and history tables

* Migrations to fix up indexes

* Implement migration from old format to new

* Move add migrations call

* Delete duplicated rows

* Explicitly map fields

* Quote the column name because it's a reserved word

* Lift migrations to top
2022-12-15 17:35:00 -06:00
Grot (@grafanabot)
dcd30f9b5d Changelog: Updated changelog for 9.3.2 (#60428) 2022-12-15 22:48:45 +00:00
Galen Kistler
f7bd85d7f4 Prometheus: Updating editor value on Monaco's onDidChangeContent performance issues (#60191)
debounce slow function that is running on each keystroke
2022-12-15 14:15:57 -06:00
Andreas Christou
5fd8d515be Bump code coverage versions (#60419) 2022-12-15 14:32:19 -05:00
Matias Chomicki
c7c7cad4ba Workflows: include Loki to OX code coverage workflow (#60341) 2022-12-15 20:15:31 +01:00
Drew Slobodnjak
5c7f77e402 Geomap: Add color gradients to route layer (#59062)
* Geomap: Add color gradients to route layer

* Add support for all color schemes

* Address PR feedback: remove ! from verified object

* Add arrow support and simplify color functions

* Simplify and clean-up code

* Remove line width slider and drive width by size

* Drive arrow size based on size

* Allow arrows for fixed color

* Add gdev dashboard

* Use square line caps only when arrows are active

* Apply size to width for fixed color and size

* Handle arrows when size and color are fixed

* Add tags to gdev dashboard

* Fix null error in backend test for gdev dashboard

Co-authored-by: nmarrs <nathanielmarrs@gmail.com>
2022-12-15 09:54:08 -08:00
Hamas Shafiq
3dc74bd74b Chore: Refactor TickLabels.test.js to TypeScript (#59956) 2022-12-15 17:11:17 +00:00
Sonia Aguilar
1f871d1dff Alerting: Add refactoring todo for getting rid of '+ Add new' option in drop-downs (#60405) 2022-12-15 11:24:58 -05:00
Giuseppe Guerra
92c01e416e Prometheus: Fix X-Id-Token and X-ID-Token sent to Prometheus in query requests (#60342)
* Prometheus: Use Set rather than map assignment in sdkHeaderToHttpHeader
Fixes #59940

* Prometheus: Add TestPrometheusCanonicalHeaders
2022-12-15 17:18:38 +01:00
Yuri Tseretyan
6637333748 Alerting: refactor notifiers to use package specific Logger interface (#60361)
* introduce Logger interface local to channles + implementaton that wraps the Grafana logger
* make NewFactoryConfig accept LoggerFactory
* add logger field to FactoryConfig
* update usages of log.Logger to internal interface
2022-12-15 11:10:31 -05:00
Torkel Ödegaard
0fb9987d12 TablePanel: Improve and align table styles with the rest of Grafana (#60365)
* TablePanel: Improve and align table styles with rest of Grafana

* Fixing footer styles
2022-12-15 16:45:00 +01:00
renovate[bot]
8b5ad5824a Update dependency eslint to v8.29.0 (#60328)
* Update dependency eslint to v8.29.0

* update sdk version

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2022-12-15 10:02:55 -05:00
renovate[bot]
da0054ae07 Update dependency lint-staged to v13.1.0 (#60381)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-12-15 14:50:31 +00:00
Dominik Prokop
44ce67aef5 SceneDataTransformer: Update data state regardless of loading state (#60394)
SceneDataTransformer: useconsumed data when loading state is different than Done
2022-12-15 06:45:46 -08:00
Sofia Papagiannaki
11d8bcbea9 Guardian: Introduce additional constructors (#59577)
* Guardian: Use dashboard UID instead of ID

* Apply suggestions from code review

Introduce several guardian constructors and each time use
the most appropriate one.
2022-12-15 16:34:17 +02:00
Marcus Efraimsson
6478d0a5ef Plugins: Forward user header (X-Grafana-User) in backend plugin requests (#58646)
Grafana would forward the X-Grafana-User header to backend plugin request when 
dataproxy.send_user_header is enabled. In addition, X-Grafana-User will be automatically
forwarded in outgoing HTTP requests for core/builtin HTTP datasources. 
Use grafana-plugin-sdk-go v0.147.0.

Fixes #47734

Co-authored-by: Will Browne <wbrowne@users.noreply.github.com>
2022-12-15 15:28:25 +01:00
Josh Hunt
ecf83a6df9 Search: Fix report search usage from throwing in console (#60382) 2022-12-15 13:58:20 +00:00
Ezequiel Victorero
8d5b19bc61 PublicDashboards: support time range selection on the backend (#60203) 2022-12-15 10:44:33 -03:00
Erik Sundell
6928ad2949 Cloudwatch: Add run query button (#60089)
* refactor header

* split left and right header actions

* cleanup

* fix broken tests

* move MetricsQueryEditor tests to QueryEditor tests

* fix mock imports

* remove no longer used onRunQuery func

* move run queries button

* apply defaults also when changing query type

* remove not used prop
2022-12-15 14:29:57 +01:00
Dominik Prokop
66c076f24e Scenes: Add support for transformations (#60329)
* Add support for transformations

* Add tests for data transformers

* Provide replace function to transformations

* Unsubscribe from existing transformations stream if new data comes in
2022-12-15 04:56:29 -08:00
Ashley Harrison
b2da0d22af Navigation: show section toggle if there are any react children (#60336)
show section toggle if there are children
2022-12-15 12:41:46 +00:00
Gábor Farkas
3cfeac9c5a elastic: enabled more tests (#60331) 2022-12-15 07:40:41 -05:00
Konrad Lalik
384322dc14 Alerting: Access query details of provisioned alerts (#59626)
Co-authored-by: Gilles De Mey <gilles.de.mey@gmail.com>
2022-12-15 13:33:41 +01:00
Emil Tullstedt
b7fc837c35 Chore: Upgrade golangci-lint to v1.50.1 (#60379) 2022-12-15 12:58:48 +01:00
Sofia Papagiannaki
efd827fd65 Chore: Trigger backend lint on bingo updates (#60380)
Chore: Trigger backend lind on bingo updates
2022-12-15 06:48:00 -05:00
Shirley
06a2943cb6 Cloudwatch: Refactor logs query field (#59503)
* Refactor LogsQueryField to function component (#59503)
2022-12-15 10:54:05 +01:00
Ida Štambuk
3ef440b30a Cloudwatch: Increase label width in Config Editor (#60333)
* Increase cloudwatch config label width
2022-12-15 10:51:23 +01:00
Neil Fordyce
b0874d8059 DataProxy: Populate X-Grafana-Referer header (#60040)
* ProxyUtil: Populate X-Grafana-Referer header

* ProxyUtil: Move Referer/Origin header removal

So that the removal and setting X-Grafana-Referer logic applies to all
proxied requests and not just datasource proxy.

* ProxyUtil: Test to guard against multiline headers

* ProxyUtil: Explicitly check injected header isn't parsed
2022-12-15 10:08:10 +01:00
Matias Chomicki
5dfa59884e Loki Query Editor: Update history items with successive queries (#60327)
feat(loki-monaco-autocomplete): add support to update history with successive queries
2022-12-15 10:03:05 +01:00
Sven Grossmann
ae05c6180c Loki/ES: Add further items to query tracking (#60347)
* add more tracking to queries from ES and Loki

* improve tracking elasticsearch

* update type assertion

* remove unused import
2022-12-15 09:59:50 +01:00
Marcus Andersson
d0a68b266c Bugfix: Attach correct link to "levitate detect breaking changes"-message included in PR (#60220)
* Fixed so we link to the proper job and step.

* Fixed according to feedback.

* Added check_suite to the job link
2022-12-15 09:56:23 +01:00
Dimitris Sotirakis
f73cdc5e80 Metadata: Move and rename genversions.go and genversions_test.go (#60315)
* Move and rename genversions.go and tests

* Fix lint - bring back cli.Exit

* Move package.json and fix tests

* Add necessary env vars for promote event
2022-12-15 03:51:11 -05:00
mikkancso
edb86d4bf3 DataSources: fix DataSourceAddButton component (#60176)
* fix DataSourceAddButton component

This component implicitly returned `false` when `canCreateDataSource`
was false, and that way it didn't qualify as a function component.
We fixed it to explicitly return null in this case.

* DataSourceAddButton: update function signature

This is more consistent with other code in this codebase.
2022-12-15 09:25:03 +01:00
Sonia Aguilar
171cd60480 Alerting: Enable editing evaluation interval in alert form when creating a new group (#60083)
* Enable editing evaluation interval in alert form when creating a new group

* Disable group when no folder selected and focus on group when clicking add new

* Improve group selector showing interval as a description for each option

* Fix evaluate every input and label aligment

* Fix columns width in EditRuleGroupModal rules table

* Reduce amount of space in the evaluation behaviour section
2022-12-15 08:28:47 +01:00
Torkel Ödegaard
79ffb699ee Revert "TablePanel: Improve and align table styles with rest of Grafana"
This reverts commit 1e28ee41cc.
2022-12-15 07:15:35 +01:00
Torkel Ödegaard
1e28ee41cc TablePanel: Improve and align table styles with rest of Grafana 2022-12-15 07:14:17 +01:00
Yuri Tseretyan
0e7c95a4d2 Alerting: Remove reference to global models package in channels package (#60358)
* remove intermediate struct to create Base struct
* fix alertmanager
2022-12-14 16:21:55 -05:00
George Robinson
342b0f3668 Alerting: Rename contact point type to receiver in the user interface (#59589)
This commit renames contact point type to integration in the user interface
as "New contact point type" suggests that you are creating a new type,
when instead you are just creating a new integration of a pre-determined type,
such as email or Slack. You can also have two or more integrations of the same
type, something which is not apparent from the current text.

This change will also make it easier to explain the difference between
a contact point integration, and how to configure an integration of a certain type,
such as email.
2022-12-14 20:50:36 +00:00
renovate[bot]
9d3c1f0cbd Update dependency @leeoniya/ufuzzy to v0.9.0 (#60302)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-12-14 14:03:23 -06:00
Sven Grossmann
386faf5958 OpenSearch: Use aoss servicename if OpenSearch is configured as serverless (#60344)
* Use `aoss` if opensearch is configured as `serverless`
2022-12-14 20:22:26 +01:00
Kristina
5a7f38053b Remove explore compact URLs (#59686)
* Remove explore compact URLs

* Remove two explore link builders that create compact URLs

* Fix merge conflict
2022-12-14 12:57:53 -06:00
Kim Nylander
d3afe9e85c [DOC] Add link to access policies (#60352)
* Add link to access policies

* Apply suggestions from code review

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
2022-12-14 10:45:44 -08:00
Yuri Tseretyan
de008005ce Alerting: isolate ImageStore in notify package (#60353) 2022-12-14 13:20:20 -05:00
Brendan O'Handley
286af5a53b Transformations: Fix bug in convert fields boolean to number (#60277)
* fix bug in convert fields boolean to number

* check for string outside of loop
2022-12-14 13:00:10 -05:00
Brendan O'Handley
d5d07894b1 Graphite: bug fix, strip white space from queries before comparing them (#60133)
strip white space from queries before comparing them
2022-12-14 11:39:29 -05:00
Matias Chomicki
4be99c56f6 Loki Query Editor: Autocompletion and suggestions improvements (unwrap, parser, extracted labels) (#59103)
* Chore: refactor test to improve internal categorization of scenarios

* feat(loki-monaco-unwrap): add unwrap situation support

* Chore: remove redundant path from aggregation situation

* feat(loki-monaco-unwrap): add unwrap suggestions

* feat(loki-monaco-autocomplete): rename IN_DURATION and add missing tests

* feat(loki-monaco-autocomplete): detect parser and line filter

* feat(loki-monaco-autocomplete): optionally suggest line filters and parsers

* feat(loki-monaco-autocomplete): improve suggestions and update completions tests

* feat(loki-monaco-autocomplete): allow for multiple line filters suggestions

* Chore: update situations test

* Chore: add test case for AFTER_UNWRAP completion

* feat(loki-monaco-autocomplete): use logs query instead of labels for data sample

* Chore: improve getParser function name and add tests

* Chore: update test mock data

* Update public/app/plugins/datasource/loki/components/monaco-query-field/monaco-completion-provider/situation.test.ts

Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>

* feat(loki-monaco-autocomplete): improve after unwrap detection

* feat(loki-monaco-autocomplete): remove leftover parser detection

* Chore: completely remove parser suggestion exclusion implementation

It was correct to have more than one parser, so we don't need to exclude parsers if one is present.

Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
2022-12-14 11:37:08 -05:00
MeanMina
3605103e28 Chore: New workflow to add and update epic issue into parent project (#59909)
* Create issue-add-to-parent-project.yml

Tested in https://github.com/grafana/github-actions-testrepo/blob/main/.github/workflows/issue-add-to-parent-project.yml

* Rename issue-add-to-parent-project

Rename issue-add-to-parent-project and update to make it clear it's Platform UX specific for now.

* Add action trigger on closed epics

Update epic-add-to-platform-ux-parent-project.yml to add action trigger on closed alongside the others and fix typo.
2022-12-14 11:27:59 -05:00
ying-jeanne
b059296cb0 [nested folder]Add circular reference detection in create nested folder (#60163)
* add circulic reference detection in create neste folder

* redeclare mock

* add log for getHeight when depassing limit
2022-12-14 11:07:55 -05:00
Yuri Tseretyan
7c3ab4a715 Alerting: Remove dependency on Grafana notifications package in alerting notifiers (#60271)
* create sender service interface and bridge to grafana notifier service
* update notifiers to use local sender interface
2022-12-14 10:59:37 -05:00
Yuri Tseretyan
07b5043222 Alerting: Add support for settings parse_mode and disable_notifications to Telegram reciever (#60198) 2022-12-14 10:44:39 -05:00
Andreas Christou
c81df0dec0 AzureMonitor: Add custom header support to Azure Monitor (#60269)
* Add integration test for Azure Monitor

- Add Azure Monitor to datasource types
- Update instance creation to correctly set HTTP client options
- Combine custom azure headers and custom grafana headers on HTTP client creation
- Update HTTP client tests

* Test custom azure headers
2022-12-14 15:09:11 +00:00
Virginia Cepeda
e3805e1309 Alerting: Track events for rule creation/abortion (#59912)
* Track events for rule creation/abortion

These events will be sent to Rudderstack using the EchoSrv in order to be consumed from Intercom

* Change method names and send user_id

* Track validation errors

* Only track errors for rule creation
2022-12-14 11:50:15 -03:00
Yuri Tseretyan
ad09feed83 Alerting: rule backtesting API (#57318)
* Implement backtesting engine that can process regular rule specification (with queries to datasource) as well as special kind of rules that have data frame instead of query.
* declare a new API endpoint and model
* add feature toggle `alertingBacktesting`
2022-12-14 09:44:14 -05:00
Josh Hunt
258696409d Dashboards: Fix 'Make Editable' button not working in Dashboard Settings (#60306)
* Dashboards: Fix 'Make Editable' button not working in Dashboard Settings

* comment
2022-12-14 14:24:09 +00:00
renovate[bot]
ac93c5321b Update dependency centrifuge to v3.1.0 (#60303)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-12-14 14:10:19 +00:00
Josh Hunt
af719888d6 Chore: Remove any type assertion in PanelQueryRunner (#60096) 2022-12-14 14:07:22 +00:00
Sven Grossmann
6f64dd533f Devenv: Add back loki-promtail (#60282)
* add back loki-promtail

* update README

* add MacOS note
2022-12-14 15:02:12 +01:00
Ida Štambuk
30e2de89ec Chore: Update code-coverage version to 0.1.13 (#59545)
Update code-coverage version to 0.1.13
2022-12-14 14:44:51 +01:00
Josh Hunt
495fceeeef Dashboards: Wrap MakeEditable in the new Page layout (#60311)
Wrap MakeEditable in the new Page layout
2022-12-14 13:32:29 +00:00
Leo
c75ed8fa69 Accessibility: Improved keyboard accessibility in BigValue (#59830)
use appropriate elements when rendering BigValue
2022-12-14 14:28:44 +01:00
Ashley Harrison
3a5c3b517c Navigation: conditionally use actions in DataSourceListPage (#60300)
* conditionally use actions in DataSourceListPage

* fix unit tests
2022-12-14 13:19:29 +00:00
Ivana Huckova
70e34e7f32 Elasticsearch: Fix defaulting to time field if no field is specified in aggregation (#60238)
* Elasticsearch: Add test for using timeField from datasource when not specified in query

* Add default to timefield

* Merge fix
2022-12-14 14:19:03 +01:00
Ivana Huckova
d3ef86bd90 Elasticsearch: Add query building for log queries (#60182)
* Elasticsearch: Fix ordering in raw_document and add logic for raw_data

* Add comments

* Fix raw data request to use correct timefield

* Fix linting

* Add raw data as metric type

* Fix linting

* Elasticsearch: Add defaults for log query

* Add higlight

* Fix lint

* Add snapshot test

* Implement correct query for logs

* Update

* Adjust naming and comments

* Fix lint

* Remove ifs
2022-12-14 13:56:09 +01:00
Emil Tullstedt
3188a8288e Settings: Update reference to go-kit/log (#60309)
Introduced after last update to #59732.
2022-12-14 12:48:09 +00:00
Matias Chomicki
2c1b65021d feat(loki-query-autocomplete): suggest unique history items (#60262) 2022-12-14 07:43:06 -05:00
Josh Hunt
9a41277ecd Dashboards: Show error when data source is missing (#60099)
Return caught exceptions to panel as error state
2022-12-14 12:37:31 +00:00
juanicabanas
666f69ca14 PublicDashboards: Add react-hook-form for Public Dashboard modal (#60249) 2022-12-14 09:12:09 -03:00
Kyle Brandt
55d2d872ec Chore: Missed deprecations due to overly broad lint exclusion (#59732) 2022-12-14 12:32:45 +01:00
Ida Štambuk
cea5e6589d Cloudwatch: Define and use getDefaultquery instead of calling onChange on mount (#60221)
* Implement getDefaultQuery for cloudwatch logs and metrics

* Fix bug with query reference in queryMigrations and replace tests

* Move migrate functions to /migrations, remove onChange from LogsQueryField

* [EMPTY] Retry CI

* Fix naming
2022-12-14 12:21:36 +01:00
renovate[bot]
6fcea37638 Update dependency @react-types/shared to v3.16.0 (#60265)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-12-14 11:03:54 +00:00
Ieva
6aa5a79cad Access control: endpoint for searching single user permissions (#59669)
* initial commit

* clean up

* fix a bug and add tests

* more tests

* undo some unintended changes

* undo some unintended changes

* linting

* PR feedback - add user ID to search options

* simplify the query

* Apply suggestions from code review

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

* remove unneeded formatting changes

Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com>
2022-12-14 10:53:25 +00:00
Esteban Beltran
d9d94ebc56 Toolkit: Deprecate all plugin related commands (#60290) 2022-12-14 11:10:05 +01:00
renovate[bot]
a75829a5f7 Update dependency @wojtekmaj/enzyme-adapter-react-17 to v0.8.0 (#60270)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-12-14 10:05:07 +00:00
Joey Tawadrous
bf8814749e Traces: Fix for multiple $__tags in trace to metrics (#59641)
* Fix interpolation of multiple  in query

* Add another  to test case
2022-12-14 09:51:43 +00:00
Ashley Harrison
bb2ecb1468 Influx: Query segment menus now position correctly near the bottom of the screen (#60087)
* only open the menu once options are loaded for better positioning

* use !loadState.loading instead of Boolean(loadState.value)
2022-12-14 09:51:04 +00:00
ms-hujia
5010765115 Azure Monitor: Propagate the error when failed to get datasource instance (#60210)
Propagate the error when failed to get instance
2022-12-14 10:36:41 +01:00
Andres Martinez Gotor
b4e76e75b1 AzureMonitor: Fix filter query for empty queryType (#60252) 2022-12-14 09:54:19 +01:00
Misi
6d8bf5ac01 LDAP: Disable user in case it has been removed from LDAP directory (#60231)
* Fix login flow

* Align test

* Fix comments

* Improve test
2022-12-14 03:41:51 -05:00
renovate[bot]
ed28324233 Update dependency @types/react-calendar to v3.9.0 (#60266)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-12-14 09:12:22 +01:00
Leon Sorokin
e0eacf1b04 StateTimeline: Fix negative infinity legend/tooltip from thresholds (#60279) 2022-12-13 21:56:59 -08:00
Ryan McKinley
4064fa51c6 Export: move export page to a full page (not view on storage) (#60263)
Co-authored-by: nmarrs <nathanielmarrs@gmail.com>
2022-12-13 19:40:20 -08:00
Alexander Weaver
821614fb43 Alerting: Align notifier truncation and logging with prometheus/alertmanager (#59339)
* Move truncation code to util to mirror upstream

* Resolve merge conflicts

* Align logging of alert key

* Update tests and fix field passing bug

* Remove superfluous newline in test now that we trim whitespace

* Uptake minor log changes from upstream
2022-12-13 19:50:24 -06:00
Isabella Siu
d6bb2a7493 Cloudwatch: Fix deeplink with default region (#60260)
Cloudwatch: fix deeplink with default region
2022-12-13 15:24:28 -05:00
Misi
7bb5200cc2 Devenv: OpenLDAP-Mac improvements (#60229)
* Use groupOfUniqueNames and uniqueMember

* Update README.md
2022-12-13 18:20:37 +01:00
Matias Chomicki
58a41af3f3 Loki Query Editor: Add support to display query parsing errors to users (#59427)
* feat(loki-query-validation): validation proof of concept

* feat(loki-query-validation): refactor and properly display the error portion

* feat(loki-query-validation): add support for multi-line queries

* feat(loki-query-validation): improve display of linting errors to users

* feat(loki-query-validation): add unit tests

* Chore: remove unused import

* wip

* Revert "wip"

This reverts commit 44896f7fa2d33251033f8c37776f4d6f2f43787d.

* Revert "Revert "wip""

This reverts commit f7889f49a6b0bdc5a4b677e9bbb8c62ea3cccb74.

* feat(loki-query-validation): parse original and interpolated query for better validation feedback

* feat(loki-query-validation): refactor interpolated query validation support

* feat(loki-query-validation): improve validation for interpolated queries
2022-12-13 12:07:59 -05:00
renovate[bot]
c2dcf78fac Update dependency @react-types/button to v3.7.0 (#60241)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-12-13 16:04:03 +00:00
Ryan McKinley
cf055ab4ec k8s: Add a dev only feature flag and simple service to get a client (#60204) 2022-12-13 07:41:16 -08:00
Sven Grossmann
ebd728a99a Logs: Fix Logs Pagination Button styling (#60219)
use css class rather css strings
2022-12-13 16:23:16 +01:00
Laura Fernández
5f4435b693 GLDS: Update icons in Storybook (#60183) 2022-12-13 16:17:55 +01:00
renovate[bot]
d08d1e6f0f Update dependency @opentelemetry/semantic-conventions to v1.8.0 (#60230)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-12-13 14:59:26 +00:00
Ashley Harrison
535c4576f7 Command Palette: Fix not being able to type if triggered whilst another modal is open (#59728)
handle command palette in the same way as other modals
2022-12-13 14:44:32 +00:00
Ashley Harrison
c801f030fb Navigation: use the branding menu logo in topnav (#60227)
use the branding menu logo in topnav
2022-12-13 14:44:18 +00:00
Domas
c2cea076ee Chore: Add deprecation warnings for Sentry (#60165) 2022-12-13 16:41:42 +02:00
Dan Cech
fe3ae49cce Backend: Consistently use context RemoteAddr function to determine remote address. (#60201)
consistently use context RemoteAddr function to determine remote address
2022-12-13 09:33:05 -05:00
Ashley Harrison
4e7a316903 TimePicker: Fix time picker selection (#60104)
fix time picker selection
2022-12-13 14:11:15 +00:00
Gabriel MABILLE
109df85cae RBAC: Add benchmarks to search all users given a specific permission (#59980)
* RBAC: Add benchmarks to search all users given a specific permission

* Add missing time

* Inline benchmarks

* Make bench setup memory efficient

* fix user id

* comment

* Ran 10K_10k and got a better time this time

* change comment to pass linting

* change comment to pass linting

* Update pkg/services/accesscontrol/acimpl/service_bench_test.go

Co-authored-by: Ieva <ieva.vasiljeva@grafana.com>
2022-12-13 09:07:15 -05:00
Dimitris Sotirakis
be0e4ab179 Enterprise checks: Update pull request check regexp for enterprise (#60234)
Update pull request check regexp for enterprise
2022-12-13 08:01:20 -06:00
Eric Leijonmarck
371d7850a5 Auth: Service account store refactor (#58961)
* refactor: renaming of files from database to store

* refactor: make service account store private

- moves store interface to manager package
- adds an interface to the ProvideAPI constructor
- refactors tests to use the store when necessary
- adds mocks for the new interface implementations in the tests package

* wip

* refactor: make fakestore in service

* wip

* wip

* wip

* working tests

* trailing whitespaces

* Update pkg/services/serviceaccounts/api/api.go

* Update pkg/services/serviceaccounts/tests/common.go

* Update pkg/services/serviceaccounts/tests/common.go

* refactor: doc string for retriever

* fix import unused

* remove: serviceaccount from featuretoggle

* added: back legacy serviceaccounts feature toggle

* added: docs

* refactor: make query for the SearchQuery

* add: validation of service input fields

* add validation
2022-12-13 14:56:10 +01:00
renovate[bot]
13adaddfaa Update babel monorepo (#60208)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-12-13 13:52:47 +00:00
Shirley
db145774d3 CloudWatch: Fix logs insights deeplink (#59906)
* CloudWatch: Add arns to log insights button

* start test

* convert to function component

* add tests

Co-authored-by: Erik Sundell <erik.sundell87@gmail.com>
2022-12-13 14:50:39 +01:00
Dominik Prokop
239888f229 Snapshots: Build snapshot originalUrl on the backend (#60232)
* Snapshots: Fix originalUrl spoof security issue

* Store relative URL only & validate UID

* use existing modal management tools

* Dummy commit to nudge CI

* Remove unused hooks file

* Fix import after backport

* Backport fixes

Co-authored-by: kay delaney <kay@grafana.com>
2022-12-13 05:48:54 -08:00
Emil Tullstedt
f864be5024 Chore: Deny gopkg.in/yaml.v2 (#60187) 2022-12-13 14:31:04 +01:00
Andre Pereira
209b1848b8 Tempo: Merge Trace ID and TraceQL tabs (#60180)
* Remove TraceID tab when TraceQL is enabled. Use TraceQL editor to query for trace IDs by checking whether the content is an hex only string

* Highlight valid trace IDs in traceql editor

* Update trace and span links to use TraceQL tab when feature flag is enabled

* Remove traceqlEditor feature flag.

* Remove traceId query type from Tempo and replace it with traceQl
2022-12-13 08:27:45 -05:00
Ashley Harrison
75a11e92b2 Dropdown: Menu now closes correctly when selecting options on touch devices (#60181)
update the version of react-popper-tooltip in @grafana/ui
2022-12-13 13:23:46 +00:00
Gábor Farkas
5633843f76 Elasticsearch: backend: do not set name for time-fields (#60169)
elastic: backend: improve field-naming
2022-12-13 13:19:03 +01:00
Ivana Huckova
0973501233 Elasticsearch: Add query building for raw data and raw document queries to backend (#59741)
* Elasticsearch: Fix ordering in raw_document and add logic for raw_data

* Add comments

* Fix raw data request to use correct timefield

* Fix linting

* Add raw data as metric type

* Fix linting

* Hopefully fix lint
2022-12-13 13:11:44 +01:00
renovate[bot]
d571376e8f Update dependency @kusto/monaco-kusto to v5.3.6 (#60151)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-12-13 13:04:34 +01:00
Torkel Ödegaard
58feee0b53 TopNav: Align profile button with search bar toggle (#60212) 2022-12-13 12:50:57 +01:00
Gareth Dawson
1b1f2475c2 Loki: Set custom width for modals in the loki query editor (#59714)
* set custom width for modals in the loki query editor

* convert unit from px to vw

* add media query for smaller devices

* use theme breakpoints instead of @media
2022-12-13 11:09:30 +00:00
Dimitris Sotirakis
6d339d94dc Chore: Remove %w and err from print line (#60215)
Remove %w and err
2022-12-13 05:56:34 -05:00
Alexander Weaver
e97b43cd58 Alerting: Add provisioning endpoint to fetch all rules (#59989)
* Domain layer api for fetching all rules

* Add endpoint for getting all rules
2022-12-13 11:54:08 +01:00
Hamas Shafiq
d6bd3c4fb6 Chore: Refactor trace-generators.js to TypeScript (#59431) 2022-12-13 10:38:00 +00:00
Hamas Shafiq
eaf96081d2 Chore: Refactor scroll-page.test.js to TypeScript (#59617) 2022-12-13 10:17:28 +00:00
Serge Zaitsev
af7d293eaf Chore: Remove Store interface and use db.DB instead (#60160)
* Chore: Remove Store interface and use db.DB instead

* use old-style session exec
2022-12-13 11:03:36 +01:00
Joey Tawadrous
4c4bc3bd32 Phlare: Reset flame graph after query is run (#59609)
Reset flame graph after query is run
2022-12-13 09:40:38 +00:00
Zoltán Bedi
d65899de7b SQL Datasources: Move database setting to jsonData (#58649)
* Datasource settings: Add deprecation notice for database field

* SQL Datasources: Migrate from settings.database to settings.jsonData.database

* Check jsonData first

* Remove comment from docs
2022-12-13 09:56:52 +01:00
Torkel Ödegaard
ac19b920f1 Explore: Fixes explore page height and margin issues (#59865) 2022-12-13 08:22:33 +01:00
Torkel Ödegaard
ef46761b9a Scene: Variables and All value support (#59635)
* Working on the all value

* Support for custom allValue

* Fixes

* More progress

* Progress

* Updated

* Fixed issue with multi and All value

* Clarified tests
2022-12-13 08:20:09 +01:00
owensmallwood
d2f9d7f39b Public Dashboards: Dont make annotations request when access token is falsey (#60202)
dont make annotations request when access token is falsey
2022-12-12 15:52:49 -06:00
Yuri Tseretyan
46e86300cb Alerting: add support for placeholder to text area generated for contact points (#60193) 2022-12-12 13:42:30 -05:00
renovate[bot]
47551c742b Update Moveable (#60021)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: nmarrs <nathanielmarrs@gmail.com>
2022-12-12 10:07:44 -08:00
Alexander Weaver
595e623c28 Alerting: Additional tests for the config store (#60130)
Additional tests for the config store
2022-12-12 11:11:18 -06:00
Hamas Shafiq
dfed68feed Chore: Refactor packages/jaeger-ui-components/src/TraceTimelineViewer/SpanDetail to TS (#59850) 2022-12-12 17:08:01 +00:00
ismail simsek
5424ec4157 Prometheus: Remove buffered client and feature toggle related to it (#59898)
* Remove prometheus buffered client and feature toggle related to it

* Remove redundant pieces

* Clean the integration test
2022-12-12 18:05:55 +01:00
Sven Grossmann
8356df081d Loki/Prometheus: Fix wrong queries executed in split view (#60172)
* add context to monaco editors
2022-12-12 17:50:00 +01:00
Gilles De Mey
88e988f8b5 Alerting: Adds TODO list (#60166) 2022-12-12 17:49:23 +01:00
Yuri Tseretyan
df7f636759 Alerting: Fix slack receiver to close file descriptors when they're not needed anymore (#60178) 2022-12-12 11:19:02 -05:00
Gareth Dawson
22736cc93b Loki: Update feature tracking for label browser (#59295)
* update feature tracking names

* track when label browser is opened

* remove old feature tracking

* report interaction on modal close

* update

* fix type error

* revert changes to modal

* revert changes to modal

* remove close method from report interaction

* remove close type for grafana_loki_log_browser_closed

* nit pick

* add closeType to grafana_loki_label_browser_closed
2022-12-12 15:35:29 +00:00
Ashley Harrison
39a4ba4396 Navigation: Fix some missing pages in admin section (#60143)
* add stats and licensing under admin -> general when topnav is enabled

* add ldap to users and access

* use ID instead of Id

* add enterprise licensing node
2022-12-12 15:23:49 +00:00
Polina Boneva
be57419540 Grafana/ui: Create new LoadingBar component (#59508)
* dashboards squad mob! 🔱

lastFile:packages/grafana-ui/src/components/LoadingBar/LoadingBar.tsx

* dashboards squad mob! 🔱

* dashboards squad mob! 🔱

lastFile:packages/grafana-ui/src/components/LoadingBar/LoadingBar.tsx

* user essentials mob! 🔱

* create grafana/ui LoadingBar and set it up in Storybook

* Remove test changes on PanelChrome

* Fix mdx page reference

* make LoadingBar a simple JSX Element; do not use containerWidth; have a wrapper around the loading bar itself;

* fix wrapper around LoadingBar: willChange css prop makes performance of rerendering better

* moving the LoadingBar to core

* Revert "moving the LoadingBar to core"

This reverts commit 11f0f4ff2f.

* do not use internal comment as it doesn't do anything

* Modify annimation to 1 second

Co-authored-by: Alexandra Vargas <alexa1866@gmail.com>
2022-12-12 17:16:03 +02:00
Yuri Tseretyan
4374966987 Alerting: Replace hardcoded <no value> to [no value] in label expansion (#60129)
* replace hardcoded <no value> to [no value] in label expansion
2022-12-12 10:12:30 -05:00
Gábor Farkas
3172d8dd9b elastic: response parser: simplify code (#59782)
elastic: simplify code
2022-12-12 16:00:15 +01:00
renovate[bot]
0ab5ea0843 Update dependency @opentelemetry/api to v1.3.0 (#60152)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-12-12 14:59:22 +00:00
Josh Hunt
45d1cfa172 Datasources Fix formatting for SQL data sources permissions disclaimer (#60155)
Chore: Fix formatting for sql datasources permissions disclaimer
2022-12-12 14:56:30 +00:00
Dimitris Sotirakis
e9cf8fa751 CI: Add automation for github assets publishing (#59491)
* Add github.star

# Conflicts:
#	.drone.star
#	.drone.yml

* Make step depend on fetch images

# Conflicts:
#	.drone.yml

* artifacts -> path

# Conflicts:
#	.drone.yml

* Add github token

# Conflicts:
#	.drone.yml

* Fix custom path

# Conflicts:
#	.drone.yml

* Add case where path is absent

# Conflicts:
#	.drone.yml

* Add GH_REGISTRY secret

# Conflicts:
#	.drone.yml
2022-12-12 09:51:27 -05:00
Hamas Shafiq
583aafbbd8 Tempo: Fix TraceQL autocomplete issues (#60058) (#60125) 2022-12-12 14:49:18 +00:00
Joan López de la Franca Beltran
61cd9eeb24 Kinds: Generate JSON report (#59742)
* Kinds: Generate JSON report

* Kinds: Add Validate/Write support for JSON report

* Kinds: Report format

* Kinds: Report new line

* Kinds: Use kindsys.SomeKindMeta to generate the report

* Move kinds report generation to the end

* Re-structure kinds report JSON output

* Make prettier to ignore kinds json report

* Minor on kinds report generation

* Fix toggles_gen test
2022-12-12 15:47:19 +01:00
Ashley Harrison
8e77a42741 Chore: run toggles_gen_test.go to fix backend test (#60164)
run toggles_gen_test.go
2022-12-12 14:33:46 +00:00
Hamas Shafiq
7c5555d67f Chore: Refactor DraggableManager.test.js to TypeScript (#59966) 2022-12-12 14:25:51 +00:00
Dominik Prokop
089ec1d94e Scenes: Use DataSourceRef only in the query variable type (#60157) 2022-12-12 09:19:28 -05:00
Ashley Harrison
a09d9d68a8 Chore: fix glob pattern in renovate config (#60146)
fix glob pattern
2022-12-12 14:19:14 +00:00
Connor Lindsey
8fe9969826 PanelRenderer: Interpolate variables in applyFieldOverrides (#59844)
Update PanelRenderer to interpolate variables in applyFieldOverrides
2022-12-12 07:18:47 -07:00
Galen Kistler
b0f8e803a1 Prometheus: Fix exception being thrown when toggling visibility in explore (#60159)
fix error being thrown when frameIndex is out of bounds of dataframe
2022-12-12 07:44:15 -06:00
Gilles De Mey
b71ae13b63 Alerting: Adds evaluation interval to group view (#59974) 2022-12-12 13:53:18 +01:00
Ashley Harrison
97fa63d14d TimeZonePicker: Scroll menu correctly when using keyboard controls (#60008)
pass innerRef to TimeZoneOption so the menu scrolls properly
2022-12-12 12:30:02 +00:00
Konrad Lalik
d7b4a017d2 Alerting: Fix RelativeTimeRangePicker (#60016) 2022-12-12 13:27:02 +01:00
Dominik Prokop
1758ddd457 Scenes: Add query variable support (#59553)
* WIP first attempt to query variable

* regex issue repro demo

* Refresh variable on time range change if refresh specified

* Instantiate variable runner when updating query variable options

* Simplify runners getTarget interface

* Fix issue with variable ot being updated correctly after other variable changed

* Add templateSrv.replace compatibility with query variable

* QueryVariable: use datasource variable as source

* use proper format

* Make sure variables set is correctly updated when query variable errors

* Do not destruct scopedVars when using sceneGraph.interpolate in templateSrv

* Add support for Legacy variables (metricFindQuery)

* Review

* Fix lint

* Test: Add unit for datasource by variable

* test: Add unit for datasource as var

* query: delegate interpolation to datasourceSrv

* Cleanup

Co-authored-by: Ivan Ortega <ivanortegaalba@gmail.com>
2022-12-12 04:01:27 -08:00
Hamas Shafiq
712e23ac50 Chore: Refactor packages/jaeger-ui-components/src/utils to TypeScript (#59979) 2022-12-12 11:31:53 +00:00
renovate[bot]
e24ff033ce Update dependency @grafana/eslint-config to v5.1.0 (#60116)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-12-12 11:23:49 +00:00
renovate[bot]
b365eb0022 Update babel monorepo (#60115)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-12-12 10:21:14 +00:00
Marcus Efraimsson
7bf7308ea5 Plugins: Remove connection/hop-by-hop request/response headers for call resource (#60077)
Removes request/response connection/hop headers for call resource in similar 
manner as Go's reverse proxy functions. Also removes Prometheus datasource 
custom call resource header manipulation in regards to hop-by-hop headers.

Fixes #60076
Ref #58646

Co-authored-by: Will Browne <wbrowne@users.noreply.github.com>
2022-12-12 10:27:53 +01:00
Dominik Prokop
b58cecc788 Scenes: Basics for rendering scenes as an embedded page (#60098)
* Basics for rendering scenes as an embedded page

* Render submenu in embedded scene

* EmbeddedScene alternative for embedding within Grafana page
2022-12-12 01:25:28 -08:00
Joe Blubaugh
1a8d0e2736 Alerting: Speed up unit and integration tests. (#60067)
This change marks tests in the `sender` package that use an external
process as integration tests instead of unit tests. This speeds up the
package's unit tests by about 20 seconds.

This change also reduces the number of alert instances in the `store`
package's bulk write integration test from 20_000 to 10_000. This is
still enough to exercise the bulk-write code but speeds up the package
tests from about 250s to 130s.

Put together, integration tests go to about 160s while also speeding up
unit tests by 20s.
2022-12-12 14:21:06 +08:00
Torkel Ödegaard
50c4430661 PanelEditor: Fixes issue where panel edit would show the panel plugin options of the previous edit panel (#59861)
* PanelEditor: Fixes issues with panel edit state cleanup

* Removed console log

* Fixed test
2022-12-11 09:57:49 +01:00
xdavidwu
5d6bdc60b1 HeatmapPanel: Fix typo in variable naming (#57326) 2022-12-09 21:07:12 -06:00
matt abrams
ca3c4bb50f Docs: Fix OSS typo (#60131)
fix OSS typo
2022-12-09 13:04:24 -10:00
Leon Sorokin
8317bf5def BarChart: Fix value mappings (#60066) 2022-12-09 12:52:34 -05:00
Jack Baldry
6f9ee7acf9 Fix branch filter for release workflows (#59963)
Ensures the workflow is run on every push to all version branches.

This was thought to be working because it was tested with a manual
dispatch, however, that trigger does not consider filters and was not
an accurate test.

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
2022-12-09 13:52:06 -04:00
Alexander Weaver
3bdffc92cf Alerting: Create alertmanager config history table (#60103)
Create config history table
2022-12-09 11:42:40 -06:00
Leon Sorokin
435ada45c5 TimeSeries: Better y-axis ticks for IEC units (#59984) 2022-12-09 10:25:44 -07:00
Jack Baldry
c1c48dd610 Use relative aliases for all non-current Grafana aliases (#60062)
* Use relative aliases for all non-current Grafana aliases

Prevents non-latest documentation "stealing" the page away from latest
and through permanent redirects for latest pages that no longer exist.

The redirected pages are indexed by search engines but our robots.txt
forbids them crawling the non-latest page.

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

* Remove aliases from shared pages

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

* Rewrite all current latest aliases to be next

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

* Fix typo in latest alias

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

* Remove all current page aliases

find docs/sources -type f -name '*.md' -exec sed -z -i 's#\n *- /docs/grafana/next/[^\n]*\n#\n#' {} \;
find docs/sources -type f -name '*.md' -exec sed -Ez -i 's#\n((aliases:\n *-)|aliases:\n)#\n\2#' {} \;

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

* Prettier

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
2022-12-09 12:36:04 -04:00
Ashley Harrison
1497ad4760 TimePicker: Prevent TimePicker overflowing viewport on small screens (#59808)
* render timepicker in a modal style on small screens

* remove top: -1

* apply styles

* prevent bug where selecting a relative range wouldn't apply if the absolute ranges were expanded

* Revert "prevent bug where selecting a relative range wouldn't apply if the absolute ranges were expanded"

This reverts commit 7090443c12.
2022-12-09 15:02:26 +00:00
renovate[bot]
90ece9d1f3 Update Yarn to v3.3.0 (#60022)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-12-09 14:14:32 +00:00
Ashley Harrison
a589929c92 Navigation: Prevent app crash when importing a dashboard with a uid of home (#59874)
* change home id to be more unique, refactor so that home circular reference is never created

* prefix starred dashboards

* update reducer
2022-12-09 12:54:00 +00:00
Andreas Christou
4730be8842 AzureMonitor: Add error indicating potential configuration issue on Resource Picker (#60041)
* Add error indicating potential configuration issue

- Update test

* Update error

- Lint update
2022-12-09 13:50:01 +01:00
Ludovic Viaud
07d6b632b5 Remove PromExploreQueryEditor and PromQueryEditor (#60020)
Remove Prom editor
2022-12-09 12:56:47 +01:00
Sonia Aguilar
cf342f1933 Alerting: Reduce number of scroll bars in rule group modal (#59725)
Reduce number of scroll bars in rule group modal
2022-12-09 12:31:42 +01:00
Sofia Papagiannaki
341d7b01ee Login: Fix failure to login a new user via an external provider if quota are enabled (#60015)
* Login: Fix failure to login a new user via an external provider if quota are enabled
2022-12-09 12:30:27 +01:00
Josh Hunt
6280780e0c TimeRangePicker: Fix recent ranges not showing all items (#59836)
* Fix not all recently used time ranges showing

* Refactor time picker history to store simpler json objects

* Don't store duplicate items

* update todo tests:

* Add tests for TimePickerWithHistory

* better fix for focus scope issues in test
2022-12-09 11:28:57 +00:00
Ashley Harrison
0c9aed905a Chore: normalize monaco colors to hex string (#59784)
normalize monaco colors to hex string
2022-12-09 10:07:32 +00:00
Manoj Vivek
10c2bdea3e Parca: Logo image fixed with theme agnostic colors (#59835) 2022-12-09 11:01:39 +01:00
Ashley Harrison
c91c828c46 Renovate: use rebaseWhen: conflicted to try to speed up renovate runs (#60028) 2022-12-09 09:45:38 +00:00
Esteban Beltran
a7a2c0f373 Linting: Speed up betterer by sharing eslint instances by groups (#60019) 2022-12-09 09:18:19 +01:00
Kim Nylander
a6e8f651ac [DOC] Change AWS to Google Cloud Monitoring (#60065)
Change AWS to GCP
2022-12-09 08:07:34 +00:00
Artur Wierzbicki
4893acaeb4 EntityAPI: disable integration tests (#60073)
disable entity api int tests
2022-12-09 02:50:13 -05:00
Marcus Efraimsson
2db8ed9441 Chore: All tests under pkg/tests should be integration tests (#59521)
* Chore: All tests under pkg/tests should be integrationtests

* run alerting integration tests only for sqlite
2022-12-09 08:11:56 +01:00
Victor Marin
896cb9ddce Fix index out of range in regenerateLinksSupplier (#60011) 2022-12-09 09:09:29 +02:00
Galen Kistler
e85763065c Prometheus: Exemplar optimization (#60055)
replace inefficient forEach
2022-12-08 15:20:27 -06:00
Galen Kistler
dfc15163da Prometheus: Fix exemplar fill color to match series color in time series. (#59908)
* Implementing new optional color property to ExemplarMarker component 
* Refactor some changes from #59743
2022-12-08 14:15:05 -06:00
George Robinson
76601f3ae7 Alerting: Better define how we set states (#59977)
This commit better defines how we set states in resultNormal,
resultAlerting, resultError and resultNoData. It changes the existing
code to call methods such as SetAlerting, SetPending, SetNormal,
SetError and NoData instead of assigning values to each individual field
whenever the state is changed. This should make it easier to understand
what fields should be set for which states and avoid cases where states are
missing, or have additional unexpected fields.
2022-12-08 20:12:13 +00:00
Ryan McKinley
b2c4af16d7 Git: Update experimental workflow POC (#60049) 2022-12-08 13:57:33 -05:00
ismail simsek
29d2f86955 Update heatmap exemplar popover styles (#59988)
* Put traceID on top

* Update exemplar popover styles

* Remove console.log

* Make exemplar header opt-in via optional prop

Co-authored-by: nmarrs <nathanielmarrs@gmail.com>
2022-12-08 19:55:39 +01:00
Yuri Tseretyan
a83268db7b Alerting: skip flaky test RuleEditor recording rules.can create a new cloud recording rule (#60044) 2022-12-08 13:09:45 -05:00
Galen Kistler
f37997aec0 Prometheus: Add traceID link to heatmap exemplar popover (#60039)
* Add traceID link to heatmap exemplar popover
* Render links for each field individually

Co-authored-by: ismail simsek <ismailsimsek09@gmail.com>
2022-12-08 12:02:17 -06:00
ismail simsek
551a2ac9ec Prometheus: Tweak query builder select component (#59749)
* Have consistent color for operators

* Add more operators and reorder them to align with dashboard filters
2022-12-08 18:52:27 +01:00
Galen Kistler
22f828300d Prometheus: Fix exemplars not respecting corresponding series display status. (#59743)
* Exemplar filtering when series are toggled in legend UI
2022-12-08 11:46:00 -06:00
Dominik Prokop
6f930f4836 Panel Edit: Fix data links edit icons being off screen when provided title is too long (#59829)
* Fix data links edit icons being off screen

* Remove unused imports

* Review
2022-12-08 09:32:22 -08:00
renovate[bot]
dedf292228 Update dependency @reduxjs/toolkit to v1.9.0 (#58247)
* Update dependency @reduxjs/toolkit to v1.9.0

* fix types on mockToolkitActionCreator

* Fix external AM selector tests

* timeout added in shared public dashboard test

* Revert "timeout added in shared public dashboard test"

This reverts commit 205c295192.

* update to @reduxjs/toolkit@1.9.1

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
Co-authored-by: Konrad Lalik <konrad.lalik@grafana.com>
Co-authored-by: Juan Cabanas <juan.cabanas@grafana.com>
2022-12-08 17:27:38 +00:00
Yuri Tseretyan
316870c658 Alerting: PagerDuty receiver to let user configure fields Source, Client and Client URL (#59895)
* add support for source field
* add client_url
* use real host name for source placeholder
2022-12-08 11:49:27 -05:00
Armand Grillet
64ccbf0a98 Update docs regarding Grafana as an alert receiver (#59938)
* Update docs regarding Grafana as an alert receiver

* Add link to AM docs
2022-12-08 17:31:59 +01:00
Ashley Harrison
a3681a3353 Command Palette: Links now work when grafana is served under a subpath (#60033)
strip base when pushing urls to locationService
2022-12-08 15:00:07 +00:00
Joe Blubaugh
e6743a7e9a Alerting: Use the QuotaTargetSrv instead of the QuotaTarget in quota check (#60026)
Before this change, the alerting provisioning system incorrectly used
the QuotaTarget to check if alerting's request quota had been reached.
The quota service requires the QuotaTargetSrv, which is what's
registered with the service at startup time. This is leading to errors
in the provisioning system.
2022-12-08 22:34:46 +08:00
Sofia Papagiannaki
e7b25baf46 Chore: Fix failing feature toggle test (#60030) 2022-12-08 16:24:01 +02:00
Ludovic Viaud
694dc60724 Prometheus: Add traceID field on top of the exemplar popover (#59920)
Prioritize trace link
2022-12-08 14:53:07 +01:00
ying-jeanne
1131bac5da [Nested Folder] Block move operation that could introduce more than 8 level of depth,… (#59832)
* block move operation that could introduce more than 8 level of depth, forbid circular reference

* move getHeight to store, mock store in service

* fix linter
2022-12-08 08:49:17 -05:00
Jo
9094153b30 Fix feature toggle test main (#60024)
fix feature toggle test
2022-12-08 14:26:18 +01:00
Ivana Huckova
3c9ccd4512 Loki: Usage for queries not from dashboards (#60017)
Loki: Usage for queries not from dashboars
2022-12-08 13:04:05 +01:00
Ivana Huckova
e2077e9659 Dashboard: Run requests with correct app type (#60010)
Dashboard: Run quries with correct core app
2022-12-08 11:52:28 +01:00
Ivana Huckova
4b56493789 Elasticsearch: Add tracking for plugin adoption stats (#59954)
* Elasticsearch: Add tracking

* Update public/app/plugins/datasource/elasticsearch/tracking.ts

Co-authored-by: Sven Grossmann <sven.grossmann@grafana.com>

* Update public/app/plugins/datasource/elasticsearch/tracking.ts

Co-authored-by: Sven Grossmann <sven.grossmann@grafana.com>

* Update public/app/plugins/datasource/elasticsearch/tracking.ts

Co-authored-by: Sven Grossmann <sven.grossmann@grafana.com>

* Refactor getLineLimit

* Update public/app/plugins/datasource/elasticsearch/tracking.ts

Co-authored-by: Sven Grossmann <sven.grossmann@grafana.com>

* Update public/app/plugins/datasource/elasticsearch/tracking.ts

Co-authored-by: Sven Grossmann <sven.grossmann@grafana.com>

* Update not tracking for volume queries

Co-authored-by: Sven Grossmann <sven.grossmann@grafana.com>
2022-12-08 11:28:40 +01:00
Yuri Tseretyan
c5ee4e4ae1 Alerting: Improve rule validation to check if rule uses backend datasources (#58986)
* validate if rule uses backend datasources

* add backend datasource to test

* fix tests

* another forgotten import

* remove unused var
2022-12-08 10:44:02 +01:00
Andriy
75cceec62c chore: update go version to 1.19.4 in plugin ci images (#59978) 2022-12-08 10:11:31 +01:00
Ivana Huckova
601df109af Loki: Remove annotation, context and volume tracking (#59962)
* Loki: Remove annotation and context tracking

* Implement log volume
2022-12-08 10:05:11 +01:00
kay delaney
955bf55c6a Datasource Onboarding: Create initial data source onboarding page (#58795) 2022-12-07 23:29:38 +00:00
Daniel Lee
74167b4d44 UsageInsights: Record events for Explore queries (#59931)
* usageinsights: record events for Explore queries

* usageinsights: make the source field optional

It is not logical to have it for an event like the dashboard-view

* usageinsights: add comment to Explore test

Explain why we are reversing a previous decision
2022-12-07 21:19:35 +01:00
Kevin Minehart
69ffce4c42 CI: add a quick test, set enterprise2 when the enterprise2 flag is added (#59967)
* add a quick test, set enterprise2 when the enterprise2 flag is added

Co-authored-by: Dave Henderson <dave.henderson@grafana.com>
2022-12-07 13:52:16 -05:00
Kristin Laemmert
ceb3d8d295 feature (user service): Add a validation check after the user record is created in the sqlstore. (#59968)
Add a validation check after the user record is created in the sqlstore.
2022-12-07 12:33:40 -05:00
Shirley
5c08f03512 CloudWatch: Fix deeplinks to still be able to pass log group names (#59809)
Co-authored-by: Erik Sundell <erik.sundell87@gmail.com>
2022-12-07 11:40:15 -05:00
Christopher Moyer
a4c884e808 Docs: corrects relref (#59970)
correct relref
2022-12-07 10:37:08 -06:00
Kristin Laemmert
70fbf47022 chore: remove CreateUser from sqlstore & replace with userService.CreateUserForTests (#59910) 2022-12-07 11:03:22 -05:00
Ryan McKinley
d036225f7b Chore: get user from appcontext rather than store utility (#59926)
user from appcontext
2022-12-07 07:38:23 -08:00
Shirley
e8ed79873a CloudWatch: return silently in case of missing log groups or incomplete query (#59701)
* Remove defaultLogGroups check in filterQuery
2022-12-07 16:37:35 +01:00
Andreas Christou
43afb85056 CloudMonitor: Improve detail of MQL series labels (#59747)
* Improve consistency between MQL and builder queries

* Review

* Review and fix test
2022-12-07 15:32:54 +00:00
Ivana Huckova
1aa94165d9 Loki: Do not track samples (#59960) 2022-12-07 16:24:22 +01:00
Sonia Aguilar
55055d0b9b Alerting: Fix RuleEditor flaky test for existing grafana managed alert (#59780)
* Fix RuleEditor flaky test for existing grafana managed alert

* Fix RuleEditor flaky test for creating a new grafana managed alert

* Fix tests for cloud rules

* Split tests for different rule types

* Move common clickSelectOption method to helpers

* Remove from RuleEditorCloudRules.test.tsx  a repeated cloud rule test

* Move existing grafana rule test case to a new file

* Split RuleEditorCloudRules test: move checking only allowed data sources test case to a new test file

* Re-use common ui const

* Re-use renderRuleEditor method

* Create getDiscoverFeaturesMock to reduce code
2022-12-07 16:15:33 +01:00
Jo
d833031726 ServiceAccounts: Do not display warnings about secret scanner when scanner is disabled (#59952)
ServiceAccounts: Fix warnings about secret scanner when scanner is disabled
2022-12-07 14:49:28 +01:00
Carl Bergquist
a5ace56be8 Plugins: Add username to datasource plugin logging (#59893)
Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
Signed-off-by: bergquist <carl.bergquist@gmail.com>
2022-12-07 13:15:42 +01:00
Carl Bergquist
1b676d0d49 Contexthandler: Add uname as response header (#59930)
Signed-off-by: bergquist <carl.bergquist@gmail.com>
2022-12-07 13:14:53 +01:00
Torkel Ödegaard
7b58fb3a20 Scenes: Fix flaky scenes time range test (#59900)
* Scenes: Fix flaky scenes time range test

* Update public/app/features/scenes/core/SceneTimeRange.test.tsx
2022-12-07 11:52:35 +01:00
Polina Boneva
db1e19fe86 Dashboard: Making a dashboard editable does not allow resizing of panels (#59255)
* DashboardGrid should rerender ReactGridLayout when mutable dashboard updates

* add missing prop to test
2022-12-07 12:46:10 +02:00
George Robinson
6359dab040 Alerting: Change resultError in preparation for supporting ForError duration (#59894) 2022-12-07 10:45:56 +00:00
Ashley Harrison
5d0029c647 Navigation: handle case where navIndex is undefined (#59826)
handle case where navIndex is undefined
2022-12-07 10:16:55 +00:00
Ashley Harrison
2b3c86d201 Chore: Remove unused/deprecated @types definitions (#59888)
* remove @types/rc-tree, @types/classnames

* remove @types/rc-time-picker

* remove @types/reselect

* remove @types/testing-library__react-hooks

* only include known package.json's
2022-12-07 10:10:59 +00:00
Hamas Shafiq
dd406e887b Chore: Refactor packages/jaeger-ui-components/src/TraceTimelineViewer/ListView to TS (#59873) 2022-12-07 10:01:20 +00:00
Jo
df4f0343e5 Auth: Session cache [main] (#59935)
* Auth: Session cache [v9.2.x] (#59907)

* add cache wrapper

only cache token if not to rotate

Co-authored-by: Kalle Persson <kalle.persson@grafana.com>

anticipate next rotation

Co-authored-by: ievaVasiljeva <ieva.vasiljeva@grafana.com>
Co-authored-by: Kalle Persson <kalle.persson@grafana.com>
Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com>
(cherry picked from commit 07a4b2343d59cb593ad128355e1d9217ba493700)

* FeatureToggle: for storing sessions in a Remote Cache

Co-authored-by: ievaVasiljeva <ieva.vasiljeva@grafana.com>
(cherry picked from commit b8a8c15148)

* use feature flag for session cache

* ensure ttl is minimum 1 second

Co-authored-by: ievaVasiljeva <ieva.vasiljeva@grafana.com>
Co-authored-by: Kalle Persson <kalle.persson@grafana.com>
Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com>

* ensure 2 ttl window to prevent caching of tokens near rotation

Co-authored-by: Kalle Persson <kalle.persson@grafana.com>

* fix description of toggle

Co-authored-by: gamab <gabi.mabs@gmail.com>
Co-authored-by: ievaVasiljeva <ieva.vasiljeva@grafana.com>
Co-authored-by: Kalle Persson <kalle.persson@grafana.com>
Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com>
(cherry picked from commit 2919588a82)

* fix broken quota test
2022-12-07 10:55:48 +01:00
Ivana Huckova
13acddd605 Elasticsearch: Fix adding correct min_doc_count to all aggregation types in backend implementation (#59713)
* Elasticsearch: Fix adding correct min_doc_count to all aggregation types in backend implementation

* Update snapshot tests

* Fix linting
2022-12-07 09:47:31 +01:00
Conor Evans
dce7f50d59 CloudWatch: Fix - make sure dimensions are propagated to alert query editor (#58281)
* fix(unified-alerting/cloudwatch): propagate dimensions to alert

Signed-off-by: Conor Evans <coevans@tcd.ie>

* add unit test

Signed-off-by: Conor Evans <coevans@tcd.ie>
Co-authored-by: Erik Sundell <erik.sundell87@gmail.com>
2022-12-07 09:42:04 +01:00
Dimitris Sotirakis
0801fce23c CI: Move verify-storybook command from grabpl (#59928)
* Move verify-storybook from grabpl

* Remove zerolog
2022-12-07 09:56:15 +02:00
Dan Cech
440d8a3d88 Build: Drone starlark file cleanup (#59919)
* format drone starlark files with black

* clean up unused params

* more simplification

* more cleanup

* more cleanup
2022-12-07 09:13:57 +02:00
Sven Grossmann
d0eeff2fa0 Loki: Add tracking of executed queries (#59887)
* add query tracking

* add app

* add comment

* use `reportInteraction` not `console.log`

* add test to `queryUtils`

* organize imports

* add datasource tests

* change `metrics` to `metric`

Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>

* change `parseToArray` to `parseToNodeNamesArray`

Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
2022-12-06 15:54:20 -05:00
Serge Zaitsev
43f40e6c7c Chore: Replace yaml.v2 with yaml.v3 (#59897)
* replace yaml.v2 with yaml.v3

* fix a few tests due to the yaml.v3 api changes

* and another goconvey mistake in tests
2022-12-06 21:17:17 +01:00
Ivana Huckova
fdc3adb2c9 Loki: Add tracking for on dashboard load (#59914)
Loki: Add on dashboard load tracking
2022-12-06 21:15:55 +01:00
Artur Wierzbicki
9e349bf9b0 EntityStore: support filtering by labels (#59905)
* label filtering

* filtering in sql

* filtering in sql group by

* label is unique - no need for distinct

* capitalize

* fix capitalization
2022-12-06 23:21:12 +04:00
George Robinson
3c249e1b99 Fix incorrect start time for DatasourceError alerts (#59903) 2022-12-06 18:44:06 +00:00
Matias Chomicki
7e339decfe JavaScript Unit Tests: Enable shouldFailOnLog only for CI environments (#59901)
Tests: enable shouldFailOnLog only for CI environments
2022-12-06 19:38:55 +01:00
Yuri Tseretyan
abb49d96b5 Alerting: update state manager to return StateTransition instead of State (#58867)
* improve test for stale states
* update state manager return StateTransition
* update scheduler to accept state transitions
2022-12-06 13:07:39 -05:00
Yuri Tseretyan
a85adeed96 Alerting: Update state history service to filter states transitions (#58863)
* rename the method to better reflect its behavior
* make historian filter transition on itself
* call historian with all changes
2022-12-06 12:33:15 -05:00
Torkel Ödegaard
18d09cd3fe PanelEdit: Fixes broken panel edit splitter logic (#59859)
* Alt panel edit fix

* fix fix
2022-12-06 18:21:03 +01:00
Dimitris Sotirakis
bc5badbcd8 CI: Add enterprise2 flag to unblock enterprise2 image deployments (#59904)
Add hacky flag to unblock enterprise2
2022-12-06 18:42:11 +02:00
Dan Cech
1dbc22d18b Build: don't remove grafana-server and grafana-cli binaries from deb and rpm packages (#59890)
* don't remove grafana-server and grafana-cli binaries from /usr/share/grafana/bin in deb and rpm packages

* don't add config overrides in /usr/sbin/grafana-server
2022-12-06 10:36:43 -05:00
Serge Zaitsev
f1fb202284 Chore: Add encryption codec to the remote cache (#59871)
* add encryption codec to the remote cache

* change config files too

* fix test constructor

* pass codec into the test cache
2022-12-06 15:12:27 +01:00
Hamas Shafiq
2ff6ae65df Chore: Refactor the packages/jaeger-ui-components/src/TracePageHeader folder to TS (#59722) 2022-12-06 13:13:15 +00:00
Hamas Shafiq
982005152a Chore: Refactor ScrollManager.test.js to TypeScript (#58661) 2022-12-06 13:03:37 +00:00
Sofia Papagiannaki
4259b6bf58 API: Fix delete user failure due to quota not enabled (#59875) 2022-12-06 15:02:01 +02:00
Serge Zaitsev
3978502d83 Chore: Remote cache key prefix (#59838)
* attempt to implement a remote cache key prefix

* add a test for the prefix store

* oh, linter
2022-12-06 13:20:49 +01:00
Sven Grossmann
932349b5ab Loki: Fix wrongly escaped label values when using LabelFilter (#59812)
* change backticks to quotes

* add unescaping to `addFilterAsLabelFilter`

* fix removal of wrong quotes

* change unescape order
2022-12-06 12:30:03 +01:00
Dimitris Sotirakis
78ef55eb06 CI: Add enterprise2 mode in versions.go (#59851)
Add enterprise2 mode
2022-12-05 15:03:47 -06:00
sam boyer
46143b0764 kindsys: Change "Meta" to "Properties" (#59852) 2022-12-05 14:48:47 -05:00
Kyle Brandt
4e0f95dc31 Chore: Update SDK to v0.145.0 with TimeSeriesMulti Constant (#59729) 2022-12-05 12:48:10 -05:00
Yuri Tseretyan
eeb57cd520 Alerting: Refactor PagerDuty and OpsGenie notifiers to use encoding/json to parse settings (#58925)
* update pagerduty and opsgenie to deserialize settings using standard JSON library
* update pagerduty truncation to use a function from Alertamanger package
* update opsgenie to use payload model (same as in Alertmanager)
2022-12-05 11:38:50 -05:00
Ashley Harrison
46adfb596d Command Palette: Maintain page state when changing theme (#59787)
* use same function as the change theme keybindings

* rename toggleTheme service to just theme
2022-12-05 16:12:56 +00:00
Andrej Ocenas
c6840cfdec Tempo: Fix traceQL suggestions for tag names with dots (#59736) 2022-12-05 17:05:22 +01:00
Yuri Tseretyan
866aea0db2 Alerting: fix UI element for PagerDuty's severity field configuration (#58927)
* make severity a regular text field
* add logs + fallback to critical if empty
2022-12-05 11:02:20 -05:00
Christopher Moyer
5240905f05 docs: fixes broken link and spelling error (#59828)
fixes broken link and spelling error
2022-12-05 10:00:20 -06:00
Ivana Huckova
e356a56741 Elasticsearch: Fix removing of empty settings from query in backend implementation (#59704)
* Elasticsearch: Fix removing of empty settings from query in backend implementation

* Update

* Update

* Update pkg/tsdb/elasticsearch/time_series_query.go

Co-authored-by: Gábor Farkas <gabor.farkas@gmail.com>

Co-authored-by: Gábor Farkas <gabor.farkas@gmail.com>
2022-12-05 16:06:55 +01:00
Ida Štambuk
3544250baf Accessibility: Make QueryEditorHelp examples keyboard interactive (#59355)
* Cloudwatch: A11y - Make example log keyboard interactive

* Change all cheat sheets to buttons

* Make suggestions block
2022-12-05 16:03:24 +01:00
Dimitris Sotirakis
7deaeb0f9e CI: Add identify-runner step for publish images (#59827)
Add missing identify-runner step
2022-12-05 09:49:33 -05:00
Erik Sundell
32309a8373 Datasource: Fix - apply default query also to queries in new panels (#59625)
* apply default query also to new panels

* add comment

* add tests
2022-12-05 15:44:04 +01:00
Andreas Christou
b4cf711a74 Package: @grafana/e2e updates (#59723)
E2E package updates

- Update addDashboard flow to work with latest grafana
- Update viewport configuration to ensure components aren't hidden
2022-12-05 13:49:25 +00:00
Garrett Guillotte
0bdee8757b Docs: Document Prometheus-Alertmanager integration settings (#57043)
* Docs: Document Prometheus AM integration settings

* Update docs/sources/datasources/alertmanager/_index.md

Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com>

Co-authored-by: Armand Grillet <2117580+armandgrillet@users.noreply.github.com>
Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com>
2022-12-05 14:01:12 +01:00
brendamuir
5c9d1a4706 Delete broken links in notifications doc (#59785)
* Delete broken links in notifications doc

* changes descendents to children

* deletes broken alertmanager link
2022-12-05 12:53:14 +01:00
Gábor Farkas
b8b2de1ac4 elastic: remove unused debug-code (#59712)
* elastic: remove unused debug-code

* removed unused structs
2022-12-05 04:21:15 -05:00
Galdin Raphael
bf85bf9b7a Docs: Fix typo in docs for the mssql datasource (#59253)
Fix typo
2022-12-04 15:23:23 +01:00
Alexander Weaver
9977c7ea43 Alerting: Simplify scheduler configuration and remove dependency on Grafana-wide settings (#59735)
* Make scheduler not depend directly on grafana-wide settings

* Re-add missing interval
2022-12-02 16:02:07 -06:00
Jack Baldry
e7bdcb4ba8 Restrict workflow to grafana/grafana repository (#59740)
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
2022-12-02 15:29:57 -05:00
ismail simsek
ba2e226ba9 Prometheus: Send time range params when requesting labels (#59648)
* Send time range params when requesting labels

* Update public/app/plugins/datasource/prometheus/datasource.tsx

Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>

* Send params when calling values too

Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
2022-12-02 19:11:34 +01:00
Christopher Moyer
ece8609e7c Docs: removes email templating (#59745)
removes email templating
2022-12-02 12:01:01 -06:00
Christopher Moyer
cc575d2341 Docs: updates based on customer feedbak (#59720)
updates based on customer feedbak
2022-12-02 11:43:55 -06:00
Jo
6762aaba56 SAML: Add teamsync details and example (#59624)
doc: saml fixes
2022-12-02 17:04:59 +01:00
Karl Persson
22be025284 Auth: Add anonymous authn client (#59637)
* Authn: Add Client interface and Reqeust and Identity structures

* Authn: Implement Authenticate method in service

* Authn: Add tracing

* Authn: Add logger

* AuthN: Implement Anonymous client
2022-12-02 15:10:03 +01:00
Andreas Christou
c52d4e2a64 AzureMonitor: Automate location retrieval (#59602)
* Automate location retrieval

- Add function to retrieve provider information
- Add function to retrieve subscription locations
- Add parsers for each function
- Add types
- Update resourcePickerData with new functions
- Remove old location metadata file

* Improve types

- Add types for responses
- Use correct name parameter
- Update response parser (parseProvider unnecessary)

* Fix tests

- Add necessary mocks

* Fix logic and ensure maps are consistent

* Add tests

* Review

* Lint issue
2022-12-02 13:23:15 +00:00
Sonia Aguilar
020b9960c8 Alerting: Move modal buttons before the rules table (#59703)
Move modal buttons before the rules table
2022-12-02 13:51:01 +01:00
Will Browne
76233f9997 Plugins: Unexport PluginDir field from PluginDTO (#59190)
* unexport pluginDir from dto

* more err checks

* tidy

* fix tests

* fix dboard file tests

* fix import

* fix tests

* apply PR feedback

* combine interfaces

* fix logs and clean up test

* filepath clean

* use fs.File

* rm explicit type
2022-12-02 13:46:55 +01:00
Karl Persson
6d1bcd9f40 DataSourcePermissions: Handle licensing properly for ds permissions (#59694)
* RBAC: add viewer grand if dspermissions enforcement is not enabled

* RBAC: Change permissions based on role prefix

* RBAC: Add option to for permission service to add a license middleware

* RBAC: Remove actions from query struct
2022-12-02 13:19:14 +01:00
Andres Martinez Gotor
a7d4bbf024 AzureMonitor: Fix bad request when setting dimensions (#59700) 2022-12-02 13:17:11 +01:00
Andres Martinez Gotor
231b5b587c AzureMonitor: Fix panic from empty response in ARG (#59691)
AzureMonitor: Avoid panic from empty response in ARG
2022-12-02 13:14:48 +01:00
Joao Silva
7b47021d19 A11y: Remove unnecessary onClick from LegendSeriesItem (#59671) 2022-12-02 12:10:21 +01:00
Torkel Ödegaard
069c99fba3 Themes: Re-init graph on theme change (#59690)
Re-init graph on theme change
2022-12-02 11:55:18 +01:00
Zoltán Bedi
5712b05330 Datasource settings: Add deprecation notice for database field (#58647)
* Datasource settings: Add deprecation notice for database field

* Revert store.go change
2022-12-02 11:40:33 +01:00
Shirley
1c5a3a7d2c CloudWatch: Create deeplinks from log group ARNs (#59646) 2022-12-02 11:25:34 +01:00
Torkel Ödegaard
37c118b7dd Table: Fixes row border style not showing and colored rows blending together (#59660)
* Table: Fixex row border style not showing and colored rows blending together

* Updated
2022-12-02 10:54:06 +01:00
George Robinson
ec1d93c8ab Alerting: Upload images to Slack via files.upload (#59163)
This commit makes a number of changes to how images work in Slack
notifications.

It adds support for uploading images to Slack via the files.upload
API when the contact point has a token. Images are no longer linked
via a URL if a token is present.

Each image uploaded to Slack is posted as a reply to the original
notification. Up to maxImagesPerThreadTs images can be posted as
replies before a final message is sent with:

  There are no images than can be shown here. To see the panels for
  all firing and resolved alerts please check Grafana

Incoming Webhooks cannot upload files via files.upload and so webhooks
require the image to be uploaded to cloud storage and linked via URL.
2022-12-02 09:41:24 +00:00
George Robinson
311e1e56f2 Docs: Reference Alertmanagers in Notifications docs and move Alertmanager docs (#59673) 2022-12-02 09:41:01 +00:00
George Robinson
4073d044c1 Docs: Consolidate Templating labels and annotations docs into a single page (#59685) 2022-12-02 09:40:48 +00:00
Ashley Harrison
2ac235eaff Chore: remove preloading roboto font (#59664)
remove preloading roboto font
2022-12-02 09:30:47 +00:00
Ashley Harrison
11a32bddbb Accessibility: Add the correct role to the modal backdrop (#59572)
add the correct role to the modal backdrop
2022-12-02 09:30:30 +00:00
Erik Sundell
fde9a5d112 Cloudwatch: Backend cleanup (#59663)
* cleanup cloudwatch.go

* streamline interface naming

* use utility func

* rename test utils file

* move util function to where they are used

* move dtos to models

* split integration tests from the rest

* Update pkg/tsdb/cloudwatch/cloudwatch.go

Co-authored-by: Isabella Siu <Isabella.siu@grafana.com>

* refactor error codes aggregation

* move error messages to models

Co-authored-by: Isabella Siu <Isabella.siu@grafana.com>
2022-12-02 10:21:46 +01:00
Shirley
ada0c771ef CloudWatch: Return with error message for empty logs query string (#59584) 2022-12-02 10:01:01 +01:00
Michael Mandrus
8152b0e1ef Pubdash: Verify affected rows count in database 'create' call (#59591)
* make create call consistent with update and delete

* use appropriate error type

* update log statements

* update error log for 0 affected rows
2022-12-02 02:46:35 -05:00
Marcus Andersson
7f92f1df00 Schema: Refactor plugin code generation (#58901)
* wip

* wip

* almost there..

* wip - change so it can run.

* treelist is working.

* support CODEGEN_VERIFY env variable

* use log.fatal

* comment out old PluginTreeList code generation

* cleanup

* rename corelist package files

* fix makefile

* move pkg/codegen/pluggen.go to pkg/plugins/codegen

* copy and refactor files to pkg/plugins/codegen

* use pkg/plugins/codegen instead of pkg/codegen for core plugins code gen

* remove unneeded files

* remove unused code to resolve linting errors

* adapters first hack

* added flattener

* add back ignore build tags to go generate file

* cleaned up the code a bit.

* seems to work, needs to do some refactoring of the GoTypesJenns and TSTypesJenny.

* one more step, going to get upstream changes in this branch.

* working but need to run import tmpl in jenny_schemapath to have the proper imports.

* added header to generated files.

* added missing jenny.

* preventing plugins with multiple decls/schemas to insert multiple lines in corelist.

* fixed so we use Slot type from kindsys to detect if its group.

* adding a go jenny that only runs if the plugin has a backend.

* added version object to generated ts.

* generating the ts types with the same output as prior to this refactoring.

* removed code that is replaced by the jenny pattern.

* removed the go code that isn't used anymore.

* removed some more unused code and renamed pluggen to util_ts

* fixed linting issue.

* removed unused vars.

* use a jenny list postprocessor for header injection

* moved decl and decl_parser to pfs.

* removed the pre-pended header in the gotypes jenny since it is done in the postprocess.

* moved decl to pfs.

* removed unused template.

Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
2022-12-02 08:22:28 +01:00
Michael Mandrus
0c560b8b0d Graphite: Process multiple queries to Graphite plugin (#59608)
* make create call consistent with update and delete

* send multiple targets to graphite and correlate the responses with the requests

* make create call consistent with update and delete

* send multiple targets to graphite and correlate the responses with the requests

* Revert "make create call consistent with update and delete"

This reverts commit 26b6463bd6.

* refactor query -> target parsing and fix unit tests

* add additional validations and more unit tests

* change error statement to warn
2022-12-01 18:05:44 -05:00
Leon Sorokin
e1e858323a TimeSeries: Fix rendering when zooming to time ranges between datapoints (#59444) 2022-12-01 16:01:35 -07:00
malcolmholmes
7d043e1930 Chore: update latest.json to 9.3.1 (#59682) 2022-12-01 21:19:47 +00:00
Grot (@grafanabot)
9c742fd0c7 Changelog: Updated changelog for 9.3.1 (#59677) 2022-12-01 21:01:13 +00:00
Brendan O'Handley
f9ef0eb414 Dataplane: Deprecate timeseries-many in favor of timeseries-multi (#59070)
* deprecate timeseries-many in favor of timeseries-multi

* deprecate timeseries-many, do not just remove it

* undo changes to jsonc files

* update deprecation message

* return TimeSeriesMulti for prepareTimeSeries transformer
2022-12-01 15:27:31 -05:00
Sasha Melentyev
f0adc69ada Chore: Change fmt.Errorf to errors.New when there is no formatting required (#58600)
Signed-off-by: Sasha Melentyev <sasha@melentyev.io>
2022-12-01 20:51:12 +01:00
Ryan McKinley
fb98a97efa EntityStore: Move slug+folder to summary metadata (#59620) 2022-12-01 14:45:08 -05:00
Marcus Efraimsson
6dbe3b555f Plugins: Refactor forward of cookies, OAuth token and header modifications by introducing client middlewares (#58132)
Adding support for backend plugin client middlewares. This allows headers in outgoing 
backend plugin and HTTP requests to be modified using client middlewares.

The following client middlewares added:
Forward cookies: Will forward incoming HTTP request Cookies to outgoing plugins.Client 
and HTTP requests if the datasource has enabled forwarding of cookies (keepCookies).
Forward OAuth token: Will set OAuth token headers on outgoing plugins.Client and HTTP 
requests if the datasource has enabled Forward OAuth Identity (oauthPassThru).
Clear auth headers: Will clear any outgoing HTTP headers that was part of the incoming 
HTTP request and used when authenticating to Grafana.
The current suggested way to register client middlewares is to have a separate package, 
pluginsintegration, responsible for bootstrap/instantiate the backend plugin client with 
middlewares and/or longer term bootstrap/instantiate plugin management. 

Fixes #54135
Related to #47734
Related to #57870
Related to #41623
Related to #57065
2022-12-01 19:08:36 +01:00
Ben Sully
632ca67e3f Add a separate grafana.com API URL setting (#59506)
The GrafanaComURL setting is currently used in two places:

- the /api/gnet endpoint, which proxies all requests to the URL
  configured in GrafanaComURL
- OAuth logins using grafana.com, where the auth URL, token URL and
  redirect URL are all configured to use the GrafanaComURL.

This has worked fine until now because almost all Grafana instances have
just used the default value, https://grafana.com. However, we now have a
few different grafana.com's, some of which are behind IAP. The IAP
causes the /api/gnet proxy to fail because the required cookies are not
present in the request (how could they be?). Setting the
[grafana_net.url] setting to an internal-only URL improves the situation
slightly - the proxy works again just fine - but breaks any OAuth logins
using grafana.com, because the user must be redirected to a publicly
accessible URL.

This commit adds an additional setting, `[grafana_com.api_url]`,
which can be used to tell Grafana to use the new API URL when proxying
requests to the grafana.com API, while still using the existing
`GrafanaComURL` setting for other things.

The setting will fall back to the GrafanaComURL setting + "/api" if unset.
2022-12-01 18:06:12 +01:00
Ryan McKinley
b537acab49 FeatureFlags: enable i18n flag in the registry (#59662) 2022-12-01 08:27:52 -08:00
Tania
16fec64690 Schema: Add Team structured core kind (#59242)
* Add Team kind

* Minor changes

* Use ToMedatata annotation

Co-authored-by: sam boyer <sdboyer@grafana.com>

* Use ToMedatata annotation

Co-authored-by: sam boyer <sdboyer@grafana.com>

* Use ToMedatata annotation

Co-authored-by: sam boyer <sdboyer@grafana.com>

* Use ToMedatata annotation

Co-authored-by: sam boyer <sdboyer@grafana.com>

* Update comments

* Add created and updated fields

* Make orgId required

* Use int64 for datetime

Co-authored-by: sam boyer <sdboyer@grafana.com>
2022-12-01 17:08:54 +01:00
Dan Cech
c4bb9d637e Build: Unify custom dockerfiles, fix missing semicolon (#59615)
* unify custom dockerfiles, fix missing semicolon

* tweak verbiage

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>

* update example description

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
2022-12-01 11:08:31 -05:00
Gilles De Mey
c3a8590fe5 Alerting: Reduce number of buildinfo calls (#59319) 2022-12-01 11:05:28 -05:00
Ashley Harrison
94c5be8dfb Navigation: Remember expanded sections in megamenu (#59661)
use local storage to remember which sections of megamenu are expanded
2022-12-01 16:04:36 +00:00
owensmallwood
97e81ecbde PublicDashboards: Modal warns when using unsupported datasources (#58926)
Adds warning to pubdash modal when dashboard uses datasources not supported by pubdash
2022-12-01 10:02:10 -06:00
Konrad Lalik
d2c129fbac Alerting: Add alert rule cloning action (#59200)
Co-authored-by: Gilles De Mey <gilles.de.mey@gmail.com>
2022-12-01 16:21:54 +01:00
Serge Zaitsev
b3284a8330 Chore: Make getUserOrgList private to sqlstore (#59654)
* make getUserOrgList private in sqlstore

* make other identifiers private
2022-12-01 15:46:42 +01:00
Ezequiel Victorero
c6cf774ac5 PublicDashboards: add time picker enabled column (#59324) 2022-12-01 11:37:08 -03:00
Christopher Moyer
3a9d4cc688 Docs: removes dashboard images (#59619)
* removes dashboard images

* removes explore and developer docs screenshots
2022-12-01 08:32:25 -06:00
Leo
d9f697b41e Accessibility: Improved keyboard accessibility in BarGauge (#59382)
* Accessibility: Improved keyboard accessibility in BarGauge

* use appropriate elements when rendering bargauge

* added space for focus-visible outline border

* Revert "added space for focus-visible outline border"

This reverts commit 9b83fa3a0b.
2022-12-01 14:45:56 +01:00
Joao Silva
379cde3a72 FolderPicker: Fixes issue with typing to search for folder (#59434) 2022-12-01 13:34:07 +01:00
Ashley Harrison
dab83c6855 Theme: Use Inter font by default (#59544)
* Switch to using Inter font by default

* run toggles_gen_test
2022-12-01 11:59:37 +00:00
Joey Tawadrous
0209cde7e0 Tracing: Add keyboard accessibility to SpanDetailRow (#59412)
SpanDetailRow keyboard accessibility
2022-12-01 11:23:33 +00:00
Andres Martinez Gotor
0d4fd305c4 GoogleCloudMonitoring: Refactor parseResponse (#59595)
* GoogleCloudMonitoring: Remove duplicated code from buildDeepLink (#59600)
2022-12-01 12:09:30 +01:00
Ivana Huckova
a2ed586576 Elasticsearch: Migrate frontend query builder tests to backend (#59578)
* WIP: Migrated first batch of tests

* Migrate more tests

* Migrate rest of the tests

* Update comments

* Update

* Update

* Remove newline
2022-12-01 12:09:12 +01:00
Esteban Beltran
0a9b238d39 Build: Adds a fallback script to fix package.json main and types fields before packaging (#59628) 2022-12-01 11:34:52 +01:00
Sofia Papagiannaki
798a8ceb9c Nested folders: Fix delete (#59627)
* Fix deleting subfolder

It used to fail with beause of missing signed in user

* Add logging

* fixup

* Fail request if deleting nested folder has failed

Before we only used to log the error

* Fix failing test

During failed nested folder creation
call the dashboard store deletion instead of the service one.
2022-12-01 05:27:40 -05:00
George Robinson
8ed2426e8e Docs: Improve documentation for notifications (#59504) 2022-12-01 09:57:45 +00:00
Ashley Harrison
a958b0be44 Accessibility: Use button instead of div in ColorPicker story (#59581)
use button instead of div in colorpicker story
2022-12-01 09:26:58 +00:00
Gábor Farkas
51d7231595 elastic: added more backend tests, copied from the frontend code (#59423) 2022-12-01 04:06:39 -05:00
Torkel Ödegaard
5281cff94d Variables: Url sync for MultiValueVariable (#59371)
* Initial take on variable url sync

* Url sync is working

* Fixing test
2022-12-01 09:48:26 +01:00
Gabriel MABILLE
8e929163a8 RBAC: Add config option to reset basic roles on start up (#59598)
* RBAC: add config option to reset basic roles on start up

Co-authored-by: Jguer <joao.guerreiro@grafana.com>

* Update docs

Co-authored-by: Jguer <joao.guerreiro@grafana.com>

* Add to sample.ini as well

Co-authored-by: Jguer <joao.guerreiro@grafana.com>

Co-authored-by: Jguer <joao.guerreiro@grafana.com>
2022-12-01 09:41:40 +01:00
Artur Wierzbicki
009d65b794 Add query library behind dev-mode-only feature flag (#55947)
Co-authored-by: nmarrs <nathanielmarrs@gmail.com>
Co-authored-by: Adela Almasan <adela.almasan@grafana.com>
Co-authored-by: drew08t <drew08@gmail.com>
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2022-11-30 15:33:40 -08:00
Ryan McKinley
14a080ec12 EntityStore: Rename ObjectStore to EntityStore (part 2) (#59616) 2022-11-30 17:52:15 -05:00
Christopher Moyer
ab40f8b8a3 Docs: removes screenshots (#59514)
removes screenshots
2022-11-30 16:04:15 -06:00
Mitch Seaman
240c77bb42 Add feature toggles to docs (#59483) 2022-11-30 16:50:20 -05:00
Ryan McKinley
5dc7b01f9d EntityStore: Rename ObjectStore to EntityStore (part 1) (#59613) 2022-11-30 13:42:42 -08:00
Ryan McKinley
b0b74337f1 Chore: fix go.mod and slugify after merge (#59611) 2022-11-30 16:16:57 -05:00
Ryan McKinley
b4b843be66 ObjectStore: Replace path model with folder, uid, and slug model (#59452) 2022-11-30 12:10:35 -08:00
Serge Zaitsev
5f3291be03 Chore: remove GetTeamByUser (#59604)
here goes some unused code
2022-11-30 20:02:31 +01:00
Hamas Shafiq
5073839f8f Chore: Refactor span.js, trace.js & trace.fixture.js to TypeScript (#58006) 2022-11-30 18:09:08 +00:00
Leo
ce630b2dc5 Folder: Fix top folder creation (#59422)
fix top folder creation
2022-11-30 18:51:14 +01:00
Josh Hunt
93eb8cb51d CommandPalette: Add actions for entire Nav tree (#58138)
* wip for exposing full nav tree in command palatte

* Expose whole nav tree in command palette

* give search an icon

* comments

* remove unused index variable

* navigate to parents

* include image icons

* comment
2022-11-30 12:34:25 -05:00
Joey Tawadrous
b12b5ed92f Remove fire text in Phlare ds (#59484)
* Renames

* Rename to phlareql

* Go renames
2022-11-30 17:22:47 +00:00
João Calisto
bba42b113c Middleware: Add Custom Headers to HTTP responses (#59018)
* Middleware: Add Custom Headers to HTTP responses

* Update docs/sources/setup-grafana/configure-grafana/_index.md

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>

* Update conf/defaults.ini

Co-authored-by: Dave Henderson <dave.henderson@grafana.com>

* Update conf/sample.ini

Co-authored-by: Dave Henderson <dave.henderson@grafana.com>

* Update _index.md

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
Co-authored-by: Dave Henderson <dave.henderson@grafana.com>
2022-11-30 17:12:34 +00:00
Serge Zaitsev
9cdb6b07c7 Chore: Move stats service into a standalone packge from sqlstore (#59574)
* move original stats service into a separate package

* add stats service to wire

* move GetAdminStats

* switch to using stats.Service

* add missing package

* fix api tests
2022-11-30 18:11:07 +01:00
Jack Baldry
a343defe64 Fix release_branch_regexp (#59590)
Apparently the non-capturing group was incorrect.

I verified the logic in a branch in grafana-github-actions:
https://github.com/grafana/grafana-github-actions/compare/jdb/2022-11-prove-grafana-regexp-behaves-correctly?expand=1

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
2022-11-30 12:37:03 -04:00
Andres Martinez Gotor
2e64ea652e GoogleCloudMonitoring: Refactor SLO queries (#59421)
* GoogleCloudMonitoring: Refactor metricType input

* Remove preprocessor in favor of secondary inputs

* GoogleCloudMonitoring: Refactor SLO queries

* GoogleCloudMonitoring: Refactor util functions (#59482)

* GoogleCloudMonitoring: Remove unnecessary util functions

* GoogleCloudMonitoring: Refactor run function (#59505)
2022-11-30 17:23:05 +01:00
idafurjes
4ec08c4317 Chore: Delete DeleteUserInSession from sqlstore (#59275)
* Remove DeleteUser from sqlstore

* Use Delete instead of DeleteUser

* Remove unused method

* Remove DeleteUserSession from sqlstore

* Add fake for DeleteUseraccessControl

* Use user service, add fakes to tests

* Add comments to sqlstore

* Correct typo

* Add quota service initialisation

* Add config to acimpl initialisation

* Add routing to initialisation

* Making user provideStore private

* Use InTransaction instead of session

* Add cfg to userimpl

* Fix lint

* Make ProvideStore public again - enterprise tests

* Fix back ProvideStore to public

* Wrap merge user in transaction

* Delete DeleteUserAccessControl use DeleteUSerPermissions instead

* Add feature mgmt into acimpl

* DeleteUserAccessControl from ac database

* Remove case insensitive clause
2022-11-30 17:19:28 +01:00
Ryan McKinley
5b71a16acf Slugify: Replace gosimple/slug with a simple function (#59517) 2022-11-30 11:12:56 -05:00
Ashley Harrison
000de83eb4 Accessibility: Improve a11y in DataLinkSuggestions (#59569)
DataLinkSuggestions: Add role + ignore keyboard lint rule
2022-11-30 15:58:10 +00:00
Kevin Minehart
76a586195a Packaging: Use rpm-digest sha256 when creating rpm packages (#59510)
* Use rpm-digest sha256 when creating rpm packages

* only append this argument with rpm builds
2022-11-30 09:35:02 -06:00
Joey Tawadrous
3b53fdb53a Trace View: Disallow a span colour that is the same or looks similar to previous colour (#58146)
* Disallow sequential spans with the same color

* Disallow same prev color and similar color

* Tests

* Remove assignemnt
2022-11-30 15:14:58 +00:00
Jack Baldry
6d6cb0a478 Remove dependency on test job (#59575)
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
2022-11-30 11:13:46 -04:00
Torkel Ödegaard
6625147e74 PanelEdit: Fixes alignment issue with collapse button (#59414)
* PanelEdit: Fixes alignment issue with collapse button

* Fix
2022-11-30 15:06:32 +00:00
Robby Milo
d4d4e05bcb remove _build param from whatsnew (#59236)
* remove `_build` param from whatsnew

* Update whats-new-in-v9-3.md
2022-11-30 09:06:11 -06:00
Gabriel MABILLE
bf49c20050 RBAC: Add an endpoint to list all user permissions (#57644)
* RBAC: Add an endpoint to see all user permissions

Co-authored-by: Joey Orlando <joey.orlando@grafana.com>

* Fix mock

* Add feature flag

* Fix merging

* Return normal permissions instead of simplified ones

* Fix test

* Fix tests

* Fix tests

* Create benchtests

* Split function to get basic roles

* Comments

* Reorg

* Add two more tests to the bench

* bench comment

* Re-ran the test

* Rename GetUsersPermissions to SearchUsersPermissions and prepare search options

* Remove from model unused struct

* Start adding option to get permissions by Action+Scope

* Wrong import

* Action and Scope

* slightly tweak users permissions actionPrefix query param validation logic

* Fix xor check

* Lint

* Account for suggeston

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

* Add search

* Remove comment on global scope

* use union all and update test to make it run on all dbs

* Fix MySQL needs a space

* Account for suggestion.

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

Co-authored-by: Joey Orlando <joey.orlando@grafana.com>
Co-authored-by: Joey Orlando <joseph.t.orlando@gmail.com>
Co-authored-by: ievaVasiljeva <ieva.vasiljeva@grafana.com>
2022-11-30 15:38:49 +01:00
Jo
fee50be1bb Sessions: Remove invalid session cookie if it's invalid/expired/missing (#59556)
only remove invalid session cookie if it's invalid/expired/missing
2022-11-30 15:33:19 +01:00
Jack Baldry
10a83714c8 Automate docs publishing steps (#59550)
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
2022-11-30 10:04:23 -04:00
idafurjes
d6275c58dd Remove GetSignedInUserWithCacheCtx and GetSignedInUser from sqlstore (#59551)
* Remove GetSignedInUserWithCacheCtx and GetSignedInUser from sqlstore

* Delete removed method from test
2022-11-30 14:28:51 +01:00
Will Browne
0fca3cf9dd Datasources: Use context logger in cache service (#59547) 2022-11-30 14:25:04 +01:00
Alex Khomenko
c3d13a0e2f Admin: Combine org and admin user pages (#59365)
* Admin: Add unified users page

* Admin: Combine admin and org components

* Admin: Add combined route

* Admin: Show combined page in nav

* Admin: Update translation

* Admin: Update description

* Admin: Update description on backend

* Admin: Update translations

* Admin: Use dynamic imports
2022-11-30 15:24:53 +02:00
Gabriel MABILLE
32a498e04f RBAC: Validate plugin app access permission targets the plugin (#59468)
* RBAC: Validate plugin app access permission targets the plugin

* Fix service test
2022-11-30 13:55:07 +01:00
Laura Fernández
ddc3706f19 Accessibility: Increase badge constrast to be WCAG AA compliant (#59531) 2022-11-30 13:20:59 +01:00
Hamas Shafiq
0b42b2f790 Chore: Refactor TracePageHeader.test.js to TypeScript (#59256) 2022-11-30 07:08:02 -05:00
Dimitris Sotirakis
ba0b2dfa1a Security: Fix XSS in runbook URL (#59540)
Fix XSS in runbook URL

Co-authored-by: George Robinson <george.robinson@grafana.com>
2022-11-30 12:37:16 +02:00
renovate[bot]
701d1b135e Update dependency rc-drawer to v6 (#58237)
* Update dependency rc-drawer to v6

* updates for rc-drawer v6

* move aria-label to an inner child to fix e2e tests

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2022-11-30 10:30:06 +00:00
Ashley Harrison
eaa4d19ed0 Navigation: Move k6 to top-level, rename to "Performance testing" (#59481)
Move k6 to top-level, rename to "Performance testing"
2022-11-30 10:27:41 +00:00
sam boyer
695cb06c77 deps: Remove effectless go.mod replace statements (#58882) 2022-11-30 11:24:51 +01:00
Hamas Shafiq
749eb9ed19 Chore: Delete UiFindInput.test.js (#59228) 2022-11-30 10:12:36 +00:00
Dimitris Sotirakis
d11c1ee646 Chore: Update latest.json to 9.3.0 (#59538)
Chore: update latest.json to 9.3.0
2022-11-30 04:52:36 -05:00
Grot (@grafanabot)
005d0f852f Changelog: Updated changelog for 9.3.0 (#59533) 2022-11-30 11:30:06 +02:00
Karl Persson
6aaf36776b RBAC: Handle edge case where there is duplicated acl entries for a role on a single dashboard (#58079)
* RBAC: Handle edge case where there is duplicated acl entries for a role
on a single dashboard
2022-11-30 10:29:21 +01:00
Gabriel MABILLE
5bb99775bb Fix: Unlocking the UI for AuthProxy users (#59507)
Unlocking the UI for AuthProxy users

Co-authored-by: Eric Leijonmarck <eric.leijonmarck@gmail.com>

Co-authored-by: Eric Leijonmarck <eric.leijonmarck@gmail.com>
2022-11-30 09:53:00 +01:00
Jack Westbrook
207b2993b2 Plugins Catalog: Only allow admins to access plugins catalog (#57101)
* feat(plugins-catalog): only allow admins to access plugins catalog routes

* add backend check

* fix(plugins-catalog): update route role access to include server admins

Co-authored-by: Will Browne <will.browne@grafana.com>
2022-11-30 09:41:28 +01:00
mikkancso
c72322874d Connections: Update "Your connections/Data sources" page (#58589)
* navtree.go: update Data sources title and subtitle

* DataSourceList: move add button to header

* DataSourcesList: add buttons to items

The action buttons are added inside `<Card.Tags>` so that they end up at
the right end of the card, as it was designed.

The "Build a Dashboard" button's functionality is not defined yet.

* DataSourcesListHeader: add sort picker

* fix css

* tests: look for the updated "Add new data source" text

* tests: use an async test method to verify component updates are wrapped in an act()

* update e2e selector for add data source button

* fix DataSourceList{,Page} tests

* add comment for en dash character

* simplify sorting

* add link to Build a Dashboard button

* fix test

* test build a dashboard and explore buttons

* test sorting data source elements

* DataSourceAddButton: hide button when user has no permission

* PageActionBar: remove unneeded '?'

* DataSourcesList: hide explore button if user has no permission

* DataSourcesListPage.test: make setup prop explicit

* DataSourcesList: use theme.spacing

* datasources: assure explore url includes appSubUrl

* fix tests and add test case for missing permissions

Co-authored-by: Levente Balogh <balogh.levente.hu@gmail.com>
2022-11-30 09:41:01 +01:00
Grot (@grafanabot)
312dbc979e Changelog: Updated changelog for 9.2.7 (#59525) 2022-11-30 10:36:11 +02:00
Stephanie Hingtgen
6805c951e9 Plugins: add option to proxy ds connections through a secure socks proxy (#59254)
* Plugins: add feature to proxy data source connections
2022-11-29 23:50:59 -06:00
Leon Sorokin
122f0d947e BarChart: when horiz, allow rotation and skipping of y tick labels (#59354) 2022-11-29 21:46:39 -05:00
sam boyer
ce0bdb2cd9 kindsys: Fix loading on windows (#59519) 2022-11-29 19:01:45 -05:00
Christopher Moyer
823a40bc85 Docs: What's New content for v9.3 (#57991)
* initial content for What's New 9.3

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

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

* makes prettier

* docs: add conflict cli tool

* remoed the conflict users tool in favor of not having it completely out yet

* Adds note about pubdash annotations support in 9.3-beta notes

* puts audit table photo back in right section

* Docs: Add OAuth improvements to what's new in 9.3 (#58756)

* Add OAuth improvements to what's new in v9.3

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

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>

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

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

Co-authored-by: Mitch Seaman <mjseaman@users.noreply.github.com>
Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>

* Docs: Add conflict cli tool (#58827)

docs: add conflict cli tool

* docs: add Terraform updates for What's New in Grafana 9.3 (#58858)

* Terraform updates for Grafana 9.3

* Remove empty line

* linting

* Docs: Update OAuth improvements section of what's new in 9.3  (#59045)

Update OAuth improvement docs for 9.3

* fix incorrect version number

* Adds Alerting whats new entries

* Add edge squad 9.3 whats new information

* Docs: Update whats-new 9.3 with auth related news (#59093)

* LDAP role mapping improvements

* RBAC list token's permissions

* Azure force_use_graph_api

* Reorder

* LDAP uniformize

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

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

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

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

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

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

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

* adds new nav and new language to what's new

* Add report zoom to What's New in 9.3 (#59345)

* Add report zoom to What's New in 9.3

Still needs a link to docs, a double-check on the name of the feature toggle, and a screenshot.

* Update whats-new-in-v9-3.md

* Apply suggestions from code review

* makes prettier

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
Co-authored-by: Chris Moyer <chris.moyer@grafana.com>

* add report zoom image

* fix typo

* fix link to upload images in template description

* Copy edits

* copy and format updates

* Apply suggestions from code review

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

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

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

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

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>

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

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>

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

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>

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

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>

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

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>

* Fix prettier

* Update whats-new-in-v9-3.md

* update nav wording

* Screenshots for navigation and internazionalization

* adds alerting images

* fixes path to new nav and localization screenshots

Co-authored-by: eleijonmarck <eric.leijonmarck@gmail.com>
Co-authored-by: Owen Smallwood <owen.smallwood@grafana.com>
Co-authored-by: Misi <mgyongyosi@users.noreply.github.com>
Co-authored-by: Mitch Seaman <mjseaman@users.noreply.github.com>
Co-authored-by: Ieva <ieva.vasiljeva@grafana.com>
Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com>
Co-authored-by: nmarrs <nathanielmarrs@gmail.com>
Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com>
Co-authored-by: Mitchel Seaman <mitchel.seaman@gmail.com>
Co-authored-by: Zsofia <97596715+zsofiakomaromigrafana@users.noreply.github.com>
2022-11-29 17:06:55 -06:00
Andrej Ocenas
038c97f31c TestDatasource: Add scenario for generating trace data (#59299) 2022-11-29 22:50:01 +01:00
Alexander Weaver
1481ace528 Alerting: Fix swallowing of errors when attaching images to notifications (#59432)
* Break out image logic and add logging

* Attach alert log context to image attachment

* Fix capitalization
2022-11-29 13:18:47 -06:00
Kevin Minehart
a77d95807c Store: skip flaky test in the store service (#59443)
skip flaky test
2022-11-29 17:54:20 +00:00
Josh Hunt
b2fdf46820 Docs: Minor improvements to Preferences documentation (#59498)
Small improvements to Preferences documentation
2022-11-29 17:21:07 +00:00
Sonia Aguilar
1020e33409 Add discord as a possible receiver in cloud rules (#59366) 2022-11-29 17:23:21 +01:00
Giordano Ricci
dc918f7e91 Grafana UI: Add experimental InteractiveTable component (#58223)
* wip

* move table

* refine example

* move to experimental

* add row expansion example

* add expanded row to kitchen sink

* add column prop docs

* add props docs

* remove useless example

* WIP

* use unique id per row & proper aria attrs for expander

* add custom cell rendering example

* Remove multisort

* rename shrink to disableGrow

* move isTruthy type guard to @grafana/data

* add missing prop from TableData interface

* make column id required

* fix correlations table

* expand on docs

* remove leftover comment

* rename to InteractiveTable

* add some tests

* add expansion tests

* fix tests

* revert unneeded changes

* remove extra header rule
2022-11-29 16:18:55 +00:00
Ashley Harrison
191ca1df86 Chore: some type fixes (#59030)
some type fixes
2022-11-29 15:52:08 +00:00
Emil Tullstedt
f485f8a8f8 Chore: Upgrade Go dependencies (#59501) 2022-11-29 16:37:45 +01:00
linoman
6cc56311d9 Auth: Display id Provider label in orgs/users view (#58033)
* Add frontend test

* Add frontend label component

* Adjust backend tests

* Retrieve auth IDP labels for users at org/users.

Co-authored-by: Misi <mgyongyosi@users.noreply.github.com>
Co-authored-by: Kalle <kalleep@users.noreply.github.com>
Co-authored-by: Jo <Jguer@users.noreply.github.com>
2022-11-29 15:20:28 +01:00
Galen Kistler
5b7ef92399 Prometheus: Remove raw query toggle (#59069)
* remove the raw query option toggle from the prometheus query builder
2022-11-29 08:12:46 -06:00
Gareth Dawson
6b5ebf2b4b Loki: Add improvements to loki label browser (#59387)
* improvements

* refactor label browser modal

* feat(label-browser-modal): fetch labels on modal open

* apply suggestions

* check for log labels after languageProvider start

Co-authored-by: Matias Chomicki <matyax@gmail.com>
2022-11-29 14:07:34 +00:00
Josh Hunt
37c14bd6bd Internationalization: Preferences documentation (#59203)
* I18n: Preferences documentation

* Update docs/sources/setup-grafana/configure-grafana/_index.md

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>

* Update docs/sources/administration/organization-preferences/index.md

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

* remove api spec

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
Co-authored-by: Ursula Kallio <ursula.kallio@grafana.com>
2022-11-29 14:02:11 +00:00
Torkel Ödegaard
1395436dce Scenes: Url sync (#59154)
* Scene url sync

* muu

* Progress

* Time range stuff

* Progress

* Progress

* Adding tests

* Rennamed interface

* broken test

* handling of unique url keys

* Fixing isuse with unique key mapping and depth

* Testing grid row expand sync

* Updates

* Switched from Map to Object

* Now arrays work

* Update public/app/features/scenes/core/types.ts

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

* Update public/app/features/scenes/core/SceneTimeRange.tsx

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

* Update public/app/features/scenes/core/SceneObjectBase.tsx

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

Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
2022-11-29 14:49:26 +01:00
George Robinson
c8c1499cd0 Docs: Add docs for labels with dots (#59352) 2022-11-29 13:15:48 +00:00
Levente Balogh
778fb07464 Plugins: Make the Plugin Details page reusable (#58741)
* refactor(PluginDetails): use react-router hooks instead of props

* Wip

* refactor: remove unnecessary constant

* feat: use the original plugin details page under connections

* chore: use better wording in the not-found warning

Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com>

* chore: use the renderer utility everywhere in the test

* chore: don't show a title while loading a plugin

Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com>
2022-11-29 13:45:03 +01:00
Ashley Harrison
5e53582bb1 Navigation: change apps icon to differentiate from dashboards (#59476)
change apps icon to differentiate from dashboards
2022-11-29 12:02:58 +00:00
Andres Martinez Gotor
6127409ab3 GoogleCloudMonitoring: Refactor metricType input (#59369)
* GoogleCloudMonitoring: Refactor metricType input

* Remove preprocessor in favor of secondary inputs (#59384)
2022-11-29 12:39:45 +01:00
Ashley Harrison
5011b259c7 Chore: ignore eslint rules in Dropdown/TopNavBarMenu (#59385)
ignore eslint rules in dropdown/topnavbarmenu
2022-11-29 11:13:21 +00:00
Torkel Ödegaard
fd39417db5 VizPanel: Fixes sizing issues (#59456) 2022-11-29 11:02:47 +01:00
Ivan Ortega Alba
3417125553 Reporter: add logger E2E results to be queried by Loki (#58839)
Co-authored-by: dsotirakis <dimitrios.sotirakis@grafana.com>
2022-11-29 10:59:12 +01:00
Karl Persson
17ec4089dc Features: Add aplha feature toggle for authn service (#59469)
* Features: Add aplha feature toggle for authn service

* AuthN: Add service boilerplate

* Set authnz-team as codeowners of authn service
2022-11-29 10:57:47 +01:00
Eric Leijonmarck
8a0e0584ba Auth: Add caseinsensitive check for ingestion command (#59129)
add: check for caseinsensitive configuration and have that on during ingestion
2022-11-29 09:56:51 +00:00
Karl Persson
a4a5307722 Login: Remove CreateUser from LoginService (#59464)
* LoginService: remove create user and use user.Service instead

* Fix tests
2022-11-29 10:20:44 +01:00
Piotr Jamróz
454c8841a4 Glue: Show data links only for fully interpolated correlations (#59052)
* Create data link filters for Explore

* Add comments and make the code more explicit
2022-11-29 10:09:38 +01:00
Serge Zaitsev
57fbe264ea Chore: Remove CreateOrg from alerting and use orgStore instead (#59440) 2022-11-29 09:59:03 +01:00
Sofia Papagiannaki
933879a347 Chore: Delete accidentally committed test database (#59238) 2022-11-29 10:33:43 +02:00
Gabriel MABILLE
d279b6d7b0 Fix: Allow creating snapshot with no dashboard id (#58669) 2022-11-29 09:29:27 +01:00
Kyle Cunningham
839465ae44 Various Panels: Remove beta label from Bar Chart, Candlestick, Histogram, State Timeline, & Status History Panels (#58557)
* Remove beta label from numerous panels.

* Update backend snapshot to fix test

Co-authored-by: nmarrs <nathanielmarrs@gmail.com>
2022-11-29 14:26:05 +07:00
Zoltán Bedi
71e4a8261d SQL Datasources: Fix annotation migration (#59438) 2022-11-29 07:56:59 +01:00
George Robinson
110fdf4da9 Alerting: Fix ConditionsCmd behavior when last is No Data (#58953) 2022-11-28 21:56:22 +00:00
Dan Cech
7436872dab Build: Unified dockerfile for all builds (#59173)
* unified dockerfile for all builds

* update builder

* include docker commands and output in logs

* quiet docker build

* quiet gsutil
2022-11-28 16:18:53 -05:00
Dan Cech
3377575788 fix pr-commands.json by removing trailing comma (#59437) 2022-11-28 15:19:01 -05:00
Kevin Minehart
5995824f0c CI: Use the git event payload rather than github context to populate the source SHA in the enterprise downstream test (#59435)
* test

* I guess the pull_request event doesn't include the 'sha' item
2022-11-28 20:49:20 +01:00
Dan Cech
9fec54df2d Build: Streamline and sync dockerfiles (#58101)
* streamline and sync dockerfiles

* improve go dependency cacheability

* unify alpine and ubuntu Dockerfiles

* include glibc support in locally-built alpine images
2022-11-28 14:43:42 -05:00
Brendan O'Handley
84ec35a4ad Transformations: Convert fields transform fix, convert strings with commas to numbers (#59074)
convert strings with commas to numbers
2022-11-28 13:16:02 -05:00
Kevin Minehart
560b595ef2 CI: change regex to accomodate new branching stategy in enterprise (#59429)
change regex to accomodate new branching stategy in enterprise
2022-11-28 13:09:10 -05:00
Ivana Huckova
d6dd86d273 Elasticsearch: Run explore queries trough backend if feature toggle enabled (#59394) 2022-11-28 17:26:45 +01:00
Andre Pereira
8dbde1b921 Tempo: TraceQL table and editor (#59313)
* Tempo: Add the ability to show/hide the Span column in the table when using TraceQL

* Add optional chaining

* Update tests

* Show subcols in a subtable

* Add more space for the subtable

* Remove unused import

* Better expander icon. Improved the subtable styling. Integrated with real data

* Fix expanding the wrong index when table already has an expanded row

* ⚠️ Hack ⚠️ - Fix table links

* Link to spans

* Tempo: [TraceQL] Don't wrap the autocomplete vals for the status tag in quotes

* TraceQL result table improvements and fixes

* Include span name in the subtable

* Loop through data only if it is not nullish

* Integrate traceql with sub-tables

* Added booleans as keywords. Make query editor multiline

* Make date format consistent between trace and span

* Reset expanded indexes when data or subdata change

* Dynamic attributes by trace

* Fix test. Cleanup and refactor

* Tiny refactor

Co-authored-by: Hamas Shafiq <hamas.shafiq@grafana.com>
Co-authored-by: Andrej Ocenas <mr.ocenas@gmail.com>
2022-11-28 16:13:03 +00:00
Sonia Aguilar
a5c58e46f2 Fix Silence table grid layout (#59415) 2022-11-28 17:10:39 +01:00
Sofia Papagiannaki
8ab7ca45cd Nested folder: Fix for PostgreSQL (#59405)
* Nested Folders: Fix PostgreSQL LastInsertId failure

* Fix children sorting

* Fix store tests
2022-11-28 17:48:44 +02:00
Kevin Minehart
b3b7cba0fe CI: add source_sha option to enterprise-pr-check action (#59314)
* add source_sha option to enterprise-pr-check action

* Add git hash to enterprise check branch
2022-11-28 09:44:23 -06:00
Michael Mandrus
40d87d9d40 Datasources: Refactor mixed datasource support to improve concurrency and error handling (#58163)
* recover from panic inside mixed ds query loop

* remove accidental commit

* add messages from panics and errors to the query response

* refactor based on PR comments

* quick update to unit test to verify mixed errors and successes

* reduce concurrency limit
2022-11-28 10:21:54 -05:00
Victor Marin
958aadd54a Table docs (#59395)
* Table docs

* Update docs/sources/panels-visualizations/visualizations/table/index.md

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
2022-11-28 10:10:54 -05:00
George Robinson
0af3515e95 Docs: Improve docs for images in notifications (#59033) 2022-11-28 14:11:00 +00:00
George Robinson
e7316ff13f Docs: Improve Labels and annotations docs (#59325)
This commit makes a number of changes to the docs for Labels and
annotations.

 1. It changes the order in which Labels and annotations are mentioned
    from Annotations and labels to Labels and annotations as this is
    the order shown in the UI when creating and editing alert rules.
    It is also the order in the Prometheus documentation.

 2. It changes most of the documentation explaining what labels and
    annotations are and the differences between them. It also adds
    some paragraphs on Custom Labels.
2022-11-28 14:09:02 +00:00
Andrej Ocenas
e033775264 NodeGraph: Allow usage with single dataframe (#58448) 2022-11-28 15:03:00 +01:00
Gábor Farkas
f1dfaa784a elastic: add more backend tests (#59312)
* elastic: added backend snapshot tests

* linter fixes
2022-11-28 14:59:57 +01:00
idafurjes
a7b2943dd1 Chore: Delete SetUsingOrg from sqlstore (#59276)
* Chore: Delete SetUsingOrg drom sqlstore

* Adjust test

* Move test to dashboards

* Move test
2022-11-28 14:59:40 +01:00
Joey Tawadrous
ae8acf178b Add flame graph, Phlare and Parca to code owners file (#58328)
Update codeowners file for flame graph, Phlare and Parca
2022-11-28 12:52:00 +00:00
Will Browne
8a09fd3257 Plugins: Fix app child config func typo (#59386)
fix func typo
2022-11-28 13:43:14 +01:00
Kyle Brandt
5623b5afaf SSE: Make sure to forward headers, user and cookies/OAuth token (#58897)
Fixes #58793 and Fixes https://github.com/grafana/azure-data-explorer-datasource/issues/513

Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
2022-11-28 07:40:06 -05:00
Joey Tawadrous
ba37516690 Add Phlare and Parca to commands file (#58330)
Update github commands file
2022-11-28 12:29:28 +00:00
Leon Sorokin
13d5ad2ce2 BarChart: fix hover overlay for hz stacked (#59359) 2022-11-28 06:29:00 -06:00
Josh Hunt
b0e886840d Internationalization: Add language preference analytics (#59230)
* Report change languange

* clean defaults.ini

* Add language to rudderstand user identify call

* undo changes not intended
2022-11-28 07:11:55 -05:00
Denis Limarev
b814c66c1d Perfomance: add preallocation for some slices (#59263)
add preallocation for some slices
2022-11-28 13:10:24 +01:00
Erik Sundell
254577ba56 CloudWatch: Cross-account querying support (#59362)
* Lattice: Point to private prerelease of aws-sdk-go (#515)

* point to private prerelease of aws-sdk-go

* fix build issue

* Lattice: Adding a feature toggle (#549)

* Adding a feature toggle for lattice

* Change name of feature toggle

* Lattice: List accounts (#543)

* Separate layers

* Introduce testify/mock library

Co-authored-by: Shirley Leu <4163034+fridgepoet@users.noreply.github.com>

* point to version that includes metric api changes (#574)

* add accounts component (#575)

* Test refactor: remove unneeded clientFactoryMock (#581)

* Lattice: Add monitoring badge (#576)

* add monitoring badge

* fix tests

* solve conflict

* Lattice: Add dynamic label for account display name (#579)

* Build: Automatically sync lattice-main with OSS

* Lattice: Point to private prerelease of aws-sdk-go (#515)

* point to private prerelease of aws-sdk-go

* fix build issue

* Lattice: Adding a feature toggle (#549)

* Adding a feature toggle for lattice

* Change name of feature toggle

* Lattice: List accounts (#543)

* Separate layers

* Introduce testify/mock library

Co-authored-by: Shirley Leu <4163034+fridgepoet@users.noreply.github.com>

* point to version that includes metric api changes (#574)

* add accounts component (#575)

* Test refactor: remove unneeded clientFactoryMock (#581)

* Lattice: Add monitoring badge (#576)

* add monitoring badge

* fix tests

* solve conflict

* add account label

Co-authored-by: Shirley Leu <4163034+fridgepoet@users.noreply.github.com>
Co-authored-by: Sarah Zinger <sarah.zinger@grafana.com>

* fix import

* solve merge related problem

* add account info (#608)

* add back namespaces handler

* Lattice: Parse account id and return it to frontend (#609)

* parse account id and return to frontend

* fix route test

* only show badge when feature toggle is enabled (#615)

* Lattice: Refactor resource response type and return account (#613)

* refactor resource response type

* remove not used file.

* go lint

* fix tests

* remove commented code

* Lattice: Use account as input when listing metric names and dimensions (#611)

* use account in resource requests

* add account to response

* revert accountInfo to accountId

* PR feedback

* unit test account in list metrics response

* remove not used asserts

* don't assert on response that is not relevant to the test

* removed dupe test

* pr feedback

* rename request package (#626)

* Lattice: Move account component and add tooltip (#630)

* move accounts component to the top of metric stat editor

* add tooltip

* CloudWatch: add account to GetMetricData queries (#627)

* Add AccountId to metric stat query

* Lattice: Account variable support  (#625)

* add variable support in accounts component

* add account variable query type

* update variables

* interpolate variable before its sent to backend

* handle variable change in hooks

* remove not used import

* Update public/app/plugins/datasource/cloudwatch/components/Account.tsx

Co-authored-by: Sarah Zinger <sarah.zinger@grafana.com>

* Update public/app/plugins/datasource/cloudwatch/hooks.ts

Co-authored-by: Sarah Zinger <sarah.zinger@grafana.com>

* add one more unit test

Co-authored-by: Sarah Zinger <sarah.zinger@grafana.com>

* cleanup (#629)

* Set account Id according to crossAccountQuerying feature flag in backend (#632)

* CloudWatch: Change spelling of feature-toggle (#634)

* Lattice Logs (#631)

* Lattice Logs

* Fixes after CR

* Lattice: Bug: fix dimension keys request (#644)

* fix dimension keys

* fix lint

* more lint

* CloudWatch: Add tests for QueryData with AccountId (#637)

* Update from breaking change (#645)

* Update from breaking change

* Remove extra interface and methods

Co-authored-by: Shirley Leu <4163034+fridgepoet@users.noreply.github.com>

* CloudWatch: Add business logic layer for getting log groups (#642)



Co-authored-by: Sarah Zinger <sarah.zinger@grafana.com>

* Lattice: Fix - unset account id in region change handler (#646)

* move reset of account to region change handler

* fix broken test

* Lattice: Add account id to metric stat query deep link (#656)

add account id to metric stat link

* CloudWatch: Add new log groups handler for cross-account querying (#643)

* Lattice: Add feature tracking (#660)

* add tracking for account id prescense in metrics query

* also check feature toggle

* fix broken test

* CloudWatch: Add route for DescribeLogGroups for cross-account querying (#647)

Co-authored-by: Erik Sundell <erik.sundell87@gmail.com>

* Lattice: Handle account id default value (#662)

* make sure right type is returned

* set right default values

* Suggestions to lattice changes (#663)

* Change ListMetricsWithPageLimit response to slice of non-pointers

* Change GetAccountsForCurrentUserOrRole response to be not pointer

* Clean test Cleanup calls in test

* Remove CloudWatchAPI as part of mock

* Resolve conflicts

* Add Latest SDK (#672)

* add tooltip (#674)

* Docs: Add documentation for CloudWatch cross account querying (#676)

* wip docs

* change wordings

* add sections about metrics and logs

* change from monitoring to observability

* Update docs/sources/datasources/aws-cloudwatch/_index.md

Co-authored-by: Sarah Zinger <sarah.zinger@grafana.com>

* Update docs/sources/datasources/aws-cloudwatch/query-editor/index.md

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

* Update docs/sources/datasources/aws-cloudwatch/query-editor/index.md

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

* Update docs/sources/datasources/aws-cloudwatch/query-editor/index.md

Co-authored-by: Sarah Zinger <sarah.zinger@grafana.com>

* Update docs/sources/datasources/aws-cloudwatch/query-editor/index.md

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

* apply pr feedback

* fix file name

* more pr feedback

* pr feedback

Co-authored-by: Sarah Zinger <sarah.zinger@grafana.com>
Co-authored-by: Fiona Artiaga <89225282+GrafanaWriter@users.noreply.github.com>

* use latest version of the aws-sdk-go

* Fix tests' mock response type

* Remove change in Azure Monitor

Co-authored-by: Sarah Zinger <sarah.zinger@grafana.com>
Co-authored-by: Shirley Leu <4163034+fridgepoet@users.noreply.github.com>
Co-authored-by: Fiona Artiaga <89225282+GrafanaWriter@users.noreply.github.com>
2022-11-28 12:39:12 +01:00
Serge Zaitsev
5b861faec3 Chore: Reduce the usage of sqlstore.createorg and use orgservice instead (#59356)
* remove legacy createorg from org service

* remove another createorg from orgimpl

* remove createorg from api pref tests

* remove createorg from api org tests

* fix tests

* remove createorg from annotations test

* remove createorg from team tests

* remove createorg from service accounts

* remove createorg from accesscontrol tests

* remove createorg from provisioning

* Use quotaservice from sc.hs
2022-11-28 12:05:46 +01:00
Selene
92e3ee7d89 StatsColelctor: Check if result is nil before set the metrics (#59372)
Check if result is nil before set the metrics
2022-11-28 05:40:49 -05:00
Andres Martinez Gotor
64143ea7d0 GoogleCloudMonitoring: Refactor types (#58644) 2022-11-28 09:17:01 +01:00
Victor Marin
16af756d50 TablePanel: Add support for Count calculation per column or per entire dataset (#58134)
* WIP

* TablePanel: Add support for Count calculation per column or per entire dataset

* refactor

* refactor

* refactor + fixes

* refactor + tests

* Docs and cue model fix
2022-11-28 10:16:35 +02:00
Gábor Farkas
7ba86dc1dc Elastic: always return DataFrames from the datasource's query method (#58636)
* elastic: response parsing: convert TableModel to DataFrame

* elastic: response parsing: convert JSONDocumentData to DataFrame

* elastic: response parsing: convert TimeSeries to DataFrame

* elastic: unit tests: type fixes

* elastic: fixed unit test
2022-11-28 08:57:56 +01:00
Torkel Ödegaard
f3f1c5aa32 Scene: Fixes infinite update loop (#59306)
* Scene: Fixes infinite update loop

* fixed lint issue
2022-11-25 14:20:56 +01:00
Ivana Huckova
28c390bc90 Loki: Fix adhoc parsing if multiple stream selectors and some empty (#58658) 2022-11-25 14:00:48 +01:00
Gilles De Mey
49f91721ec Alerting: fix "no permissions" alert flashing (#59300) 2022-11-24 19:58:02 +01:00
Sofia Papagiannaki
f5c41ea497 Nested Folders: More API fixes (#59316)
* Nested Folder: Fix create, use camel case for JSON properties

* Fix get parents if the folder does not exist

* Add store test for get parents
2022-11-24 13:28:53 -05:00
Timur Olzhabayev
5a3f0e8696 Docs: Updating sign plugin docs (#59322)
Updating sign plugin docs
2022-11-24 19:00:33 +01:00
Laura Fernández
45d3125919 OptionsUI: SliderValueEditor does not get auto focused on slider change (#59209) 2022-11-24 18:21:33 +01:00
Zoltán Bedi
220295d26f SQL: Return no data response when no rows returned (#59121) 2022-11-24 18:01:05 +01:00
Matias Chomicki
ff87a2641f Loki Variable Query Editor: Improve stream selector tooltip text (#59311)
* feat(loki-variable-query-editor): improve stream selector tooltip text

* Chore: improve sample stream selector

* Chore: update sample stream selector in tooltip

* Chore: add example of interpolated stream selector
2022-11-24 11:41:02 -05:00
Zoltán Bedi
58fd0a8b44 Calcs: Fix difference percent in legend (#59243) 2022-11-24 16:23:13 +01:00
Torkel Ödegaard
d76638338d PanelEdit: Fixes bug with not remembering panel options pane collapse/expand state (#59265) 2022-11-24 16:03:26 +01:00
Ieva
a8bae3f0b0 Access Control: Clear user's permission cache after resource creation (#59101)
* refresh user's permission cache after resource creation

* clear the cache instead of reloading the permissions

* don't error if can't clear cache

* fix tests

* fix tests again
2022-11-24 14:38:55 +00:00
Karl Persson
a53f57cc43 Navigation: Support rbac for new dashboard, import dashboard and new folder (#59303)
RBAC: Support rbac for new dashboard, import dashboard and new folder
page
2022-11-24 15:25:51 +01:00
Kevin Minehart
45c759eb59 CI: Make the downstream enterprise test a check instead of comments (#59071) 2022-11-24 08:17:12 -06:00
Tania
76372a240c Storage: Add system users service (#57767)
* Storage: Add access for reporting

* reporting upload user per org

* add some basic comments

* Move reporting storage to enterprise

* add comments

Co-authored-by: Artur Wierzbicki <artur.wierzbicki@grafana.com>
2022-11-24 15:15:32 +01:00
renovate[bot]
e84a01e870 Update jest monorepo to v29 (#58261)
* Update jest monorepo to v29

* update snapshots + wrap test in act

* fix linting errors: jest.mocked now defaults to deep mocking

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2022-11-24 14:00:41 +00:00
Sofia Papagiannaki
8e6d343981 Nested Folders: Some API fixes (#59298)
* Nested Folders: Fix API responses

* Fix panic during deletions

* Add test
2022-11-24 08:59:47 -05:00
Ivan Ortega Alba
1a6b46e98d Scenes: Add support for Datasource variables (#59147) 2022-11-24 13:53:31 +01:00
Victor Marin
0da77201bf TimeseriesPanel: Preserve string fields for data link interpolation (#58424)
* TimeseriesPanel: Preserve string fields for data link interpolation

* clean code

* Modify tests so that string fields are allowed only when a valid time/number dataframe exists

* performance mods

* fix wrong length

* remove console.log

* Check if aligned dataframe has links
2022-11-24 14:44:32 +02:00
Uladzimir Dzmitračkoŭ
1ee52e14d2 GrafanaUI: Add disabled option for menu items (#58980) 2022-11-24 13:39:42 +01:00
Sven Grossmann
400ada1ad0 Logs: Fix misalignment of LogRows (#59279)
* add default display flex

* changed to `text-align: left`
2022-11-24 13:21:55 +01:00
Dimitris Sotirakis
2d7fcea8fa CI: Remove npm steps from enterprise pipelines (#59108)
Remove npm steps from enterprise pipelines
2022-11-24 14:12:07 +02:00
Oscar Kilhed
be73418d00 PostgreSQL: Fix missing CA field from configuration (#59280)
* PostgreSQL: Fix missing CA field from configuration
2022-11-24 12:52:10 +01:00
Polina Boneva
314c22bc5b PanelChrome: Implementing the new layout on PanelChrome @ grafana/ui (#57203)
* Use newPanelChromeUI feature flag in DashboardPanel panel rendering

* just render the PanelChromeUI instead of the PanelChrome

* add new props to PanelChrome; have ChromePanel from grafana/ui in DashboardPanel for testing (will remove before finished);

* put icons next to the title of PanelChrome header space

* arrange PanelChrome's title icons into view/edit/status sections

* icons next to title in PanelChrome are surrounded by square focusable space

* items to be render in Header in PanelChrome come in as props

* PanelChrome accepts items next to title from the outside; currently them being ordered in the left side is okay, right side not so much

* revert local changes to DashboardPanel

* cleanup unused imports

* simple PanelChrome render without any header props

* CSS function

* add test PanelChrome prop padding

* add icons next to title if they are passed to PanelChrome

* fixed PanelChrome header: hoverHeader, having a menu prop;

* only show icons with correct icon names; show menu icon only on hover over panel container; minor other fixes

* attempt to resolve hovering in an RTL test for the menu icon to work as expected

* menu opens in a Dropdown if provided as prop

* fixing tooltips and aria-labels

* Fixed issue with light theme in storybook

* comment out props and tests that are not yet used

* Fixed issue where content was overflowing the boundaries

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
2022-11-24 13:21:18 +02:00
Sofia Papagiannaki
f3da48bd50 SQLStore: Refactor query retries to use exponential backoff (#58559) 2022-11-24 13:12:50 +02:00
zdg-github
a2f1d2e102 TraceView: Fix broken rendering when scrolling in Dashboard panel in Firefox (#56642) 2022-11-24 11:49:55 +01:00
Andres Martinez Gotor
276b54fe9d Azure Monitor: Fix empty/errored responses for Logs variables (#59240) 2022-11-24 11:25:40 +01:00
Serge Zaitsev
cff36ea7d8 Chore: Remove unused method from sqlstore (#59156)
remove unused method
2022-11-24 05:21:06 -05:00
Hamas Shafiq
624e6037cf Chore: Refactor transform-trace-data.test.js to TS (#59214) 2022-11-24 05:16:00 -05:00
Hamas Shafiq
2105e52138 Chore: Refactor the packages/jaeger-ui-components/src/model folder to TS (#59233) 2022-11-24 09:56:09 +00:00
Timur Olzhabayev
24ce1a8a0b Feat: Adding an optional browser config option to e2e test runner (#59076)
Adding an optional browser config option to e2e test runner
2022-11-24 10:15:21 +01:00
Leon Sorokin
6f00bc5674 Heatmap: Fix blurry text & rendering (#59260) 2022-11-23 21:55:30 -06:00
matt abrams
f4574f098d DataLinks: Improve Data-Links AutoComplete Logic (#58934)
* refactor dollar-sign logic to consider cursor position

* refactor logic

* add inline comment for obscure collapse() function
2022-11-24 03:59:37 +01:00
Ryan McKinley
5888f53aab Angular: auto-migrate graph panel when angular is disabled (#59247) 2022-11-23 13:32:52 -08:00
Nathan Marrs
5fe35e4860 Canvas: Update docs for 9.3.0 (#59168) 2022-11-23 11:58:21 -08:00
Drew Slobodnjak
38b74d8bd6 Geomap: Update documentation for 9.3 (#59164)
* Geomap: Update documentation for 9.3

* Update docs/sources/panels-visualizations/visualizations/geomap/index.md

Co-authored-by: Nathan Marrs  <nathanielmarrs@gmail.com>
2022-11-23 11:46:04 -08:00
owensmallwood
4d8e681b96 Chore: update latest.json to 9.2.6 (#59246) 2022-11-23 13:44:46 -06:00
Dimitris Sotirakis
27bd50da52 Docs: Update merge-pull-request.md regarding backport policies (#59239)
* Update merge-pull-request.md

* yarn run prettier:write
2022-11-23 20:51:09 +02:00
Ryan McKinley
0a7a5b13fe Heatmap: Remove legacy angular based implementation (#59249)
remove angular heatmap
2022-11-23 10:46:21 -08:00
Andre Pereira
183b279274 Explore: Sub-tables support for Table component (#58682)
* First commit with working version of sub-tables using subData array

* Update TableContainer and query result to support a dataframe array for the table result

* Fix border issue by moving the subtable to above the cells in the DOM

* Allow header to be configurable using custom options.

* Update TablePanel to support sub-tables

* Fix main row links

* Added tests

* Fix TablePanel correctly splitting frames and sub-frames by using refId
2022-11-23 17:49:32 +00:00
Selene
b981a93f9a Chore: Add Quote function in DB (#58594)
Added Quote function
2022-11-23 18:40:58 +01:00
Selene
9dc82606db LoginService: Remove unused sqlstore (#58595)
Remove unused sqlstore
2022-11-23 17:58:52 +01:00
Ashley Harrison
d33b4918cd Chore: more any/type assertion improvements (#59229)
more any/type assertion improvements
2022-11-23 16:54:57 +00:00
Gareth Dawson
a098bdef58 Loki: Make label browser accessible in query builder (#58525)
* add label browser button to query editor header

* add dynamic button label text

* add LabelBrowserModal.tsx

* toggle label browser modal on click

* pass required props to LabelBrowserModal

* add placeholder to text input

* render label browser inside of the modal

* change button based on label status

* remove label browser button from code mode

* fix element overlap in label browser

* fix undefined app in feature tracking

* remove all any types

* add tests for label browser button

* update modal component width

* update label loading function

* add tests to LabelBrowserModal

* fix broken mock datasource

* update test names

* use stack component for button spacing

* revert modal width

* update label search placeholder

* remove unused import

* add test assertion for closed modal

* remove redundant if statement

* remove unnecessary code

* update error message and fix position

* fix input placeholder text
2022-11-23 16:48:41 +00:00
Dan Cech
ed72b02b27 Chore: update vscode "Run Server" config for single-binary (#59237)
update vscode "Run Server" config for single-binary
2022-11-23 11:32:42 -05:00
Shirley
7cec30f0e1 CloudWatch: Fix flaky test assertions (#59234) 2022-11-23 17:13:47 +01:00
Gareth Dawson
94372f5f23 Loki: Remove raw query toggle (#59125)
* set default query expression

* always show raw query

* remove raw query title

* remove test for raw query toggle

* remove raw query toggle

* remove default expression

* hide raw query preview if empty

* remove e2e test for raw query toggle

* update test name
2022-11-23 16:07:59 +00:00
Grot (@grafanabot)
ae508c12f3 Changelog: Updated changelog for 9.2.6 (#59232) 2022-11-23 10:05:17 -06:00
Karl Persson
83c101dc34 LoginAttempts: Reset attempts on successfull password reset (#59215)
* LoginAttempt: Add function to reset attemtps for username

* PasswordReset: Reset attempts on successful password reset
2022-11-23 16:57:18 +01:00
Andres Martinez Gotor
9d88e14f01 Azure Monitor Logs: Avoid warning when the response is empty (#59211) 2022-11-23 16:15:18 +01:00
Sofia Papagiannaki
ad96b240fc Nested Folder: Enforce maximum nested folder depth (#59213)
* Nested Folder: Enforce maximum nested folder depth

* Cleanup

* Fix logging
2022-11-23 09:44:45 -05:00
Sonia Aguilar
980a2cb949 Use Stack from experimental instead of css styles for flex containers (#59201) 2022-11-23 15:43:38 +01:00
George Robinson
c9286ff794 Alerting: Remove comments for fixed behavior (#58951) 2022-11-23 15:37:15 +01:00
Josh Hunt
2d8910d9de Chore: gitignore storage.json (#59225) 2022-11-23 09:31:40 -05:00
Josh Hunt
ba0ac08465 Internationalization: Enable internationalization by default (#59204)
* Enable internationalization feature flag by default

* Change i18n feature to beta

* Set i18n feature flag to stable

* update features
2022-11-23 14:23:26 +00:00
Hamas Shafiq
6d94fa6aa5 Tempo: Send the correct start time when making a TraceQL query (#59128) 2022-11-23 13:45:10 +00:00
Timur Olzhabayev
5af9a511c0 Chore: Reordering codeowners file (#59198)
Reordering codeowners file
2022-11-23 14:09:27 +01:00
Grafana I18n Bot
343f65fffb I18n: Crowdin sync (#59210)
* New translations grafana.json (French)

* New translations grafana.json (Spanish)

* New translations grafana.json (German)

* New translations grafana.json (Chinese Simplified)
2022-11-23 07:24:54 -05:00
Josh Hunt
f180bb46f8 I18n: Translate Dashboard Starred notification (#59138) 2022-11-23 13:12:33 +01:00
Leo
7d82a27835 Folder: Provide adhoc ui for nested folder creation (#59126)
chore: provide adhoc ui for nested folder creation
2022-11-23 13:08:36 +01:00
Hamas Shafiq
4e6b8f658e Chore: Refactor TreeNode.js & TreeNode.test.js to TypeScript (#58540) 2022-11-23 11:48:25 +00:00
Ashley Harrison
c2f31c2685 Navigation: always show GetStartedWithPlugin even if there's install control wa… (#59127)
always show `GetStartedWithPlugin` even if there's install control warnings
2022-11-23 11:34:00 +00:00
Sofia Papagiannaki
0af96936be Nested Folders: Do not refer to the configuration for checking for the flag (#59197)
* Nested Folders: Do not refer to the configuration for checking for the flag

Use always features.IsEnabled() instead

* Depend on the interface instead
2022-11-23 06:16:00 -05:00
Selene
a0334a92f5 Solo Panel: Configurable timezone (#59153)
* Allow to set timezone in query

* Use optional timestamp

* Update timeZone
2022-11-23 12:14:35 +01:00
Jo
d7a652ff7f User: Optimize signed in user cache management (#59090)
* only access the cache if a user ID is set

* ignore all negative values
2022-11-23 12:04:38 +01:00
Josh Hunt
c02f2321c1 I18n: Fix variables not interpolating with pseudo localisation (#59145)
* I18n: Don't pseudolocalise string variables

* clean up
2022-11-23 10:32:20 +00:00
Yann Vigara
f1ef63791a Fix #58598 X-ID-Token header missing on Loki Datasource (#58784)
* Fix #58598 X-ID-Token header missing on Loki Datasource

* Remove unecessary continue statements

* Add getAuthHeadersForCallResource unit tests

* Fix test and switch statement issues introduced during merge
2022-11-23 11:31:50 +01:00
idafurjes
054d87e52e Chore: Remove DeleteUser from sqlstore (#59180)
* Remove DeleteUser from sqlstore

* Use Delete instead of DeleteUser

* Remove unused method
2022-11-23 11:15:48 +01:00
Ashley Harrison
8761a71da2 Navigation: use correct id to find cloud access policies page (#59123)
use correct id to find cloud access policies page
2022-11-23 10:01:57 +00:00
Serge Zaitsev
c2e847d0b0 Chore: Remove createorgwithmember (#59161)
remove createorgwithmember
2022-11-23 10:37:04 +01:00
Zoltán Bedi
75097b99fb SQL: Fix code editor for SQL datasources (#58116)
* SQL: Fix code editor for sql datasources

* Fix: mysql completion with defaultdb
2022-11-23 10:36:07 +01:00
George Robinson
7376eee6ff Alerting: Support From and To when taking screenshots (#59166)
This commit adds support for the From and To parameters that set the
time range for the graph. The default is 6 hours, which can sometimes
be too large of a time range.
2022-11-23 09:28:24 +00:00
Konrad Lalik
cae5d89d0f Alerting: Add dashboard and panel picker to the rule form (#58304)
Co-authored-by: Gilles De Mey <gilles.de.mey@gmail.com>
2022-11-23 10:27:49 +01:00
Serge Zaitsev
245a59548c Chore: Remove DeleteOrg method from sqlstore (#59162)
remove DeleteOrg method from sqlstore
2022-11-23 10:22:52 +01:00
Sofia Papagiannaki
02b6b09121 Nested Folders: Set user in the API level (#59148) 2022-11-23 11:13:47 +02:00
Laura Fernández
4a628f18b0 Internationalization: Translate menu items (#59088) 2022-11-23 09:34:53 +01:00
Leon Sorokin
9512f1e1af StateTimeline: Prevent label text from overflowing state rects (#59169)
Co-authored-by: Vegard Vatn <vegard.vatn@avento.no>
2022-11-22 20:58:48 -07:00
Leon Sorokin
2a8706b025 Heatmap: Fix tooltip y range of top and bottom buckets in calculated heatmaps (#59172)
Co-authored-by: xdavidwu <xdavidwuph@gmail.com>
2022-11-22 20:54:54 -07:00
Nathan Marrs
e157ef1171 Canvas: Add icon value mapping (#59013) 2022-11-22 14:39:19 -08:00
Hamas Shafiq
51359fe90d Chore: Refactor Tween.test.js to TypeScript (#58655) 2022-11-22 22:19:35 +00:00
juanicabanas
a93b8a03cb PublicDashboards: Orphaned public dashboard deletion script added (#57917)
* Adds migration to remove orphaned public dashboards.

Co-authored-by: Jeff Levin <jeff@levinology.com>
2022-11-22 13:11:06 -09:00
Drew Slobodnjak
ee8f292c6a Geomap: Improve location editor (#58017)
* add custom component for location editor

* FC cleanup

* Apply filter to add location fields call

* Create custom editor for location mode

* Apply validation logic and render warning

* Improve alert styling

* Add help url button to location alert

* Add success alert for auto

* Remove completed TODOs

* Only use alert on error, not success

* Change location mode to dropdown

* Change alert severity to less severe, info

* Prevent auto field selection during manual

* Update location testing to be for auto mode

* Run geo transformer editor init once

* Fix breaking test

* Clean up some anys

* Update styling for alert

* Remove auto success styling

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
Co-authored-by: nmarrs <nathanielmarrs@gmail.com>
2022-11-22 11:24:56 -08:00
Serge Zaitsev
b875ca08c6 SQLStore: Make addOrgUser private (#59142)
make addOrgUser private
2022-11-22 17:02:39 +00:00
Dan Cech
de99ce139c Server: Switch from separate server & cli to a unified grafana binary (#58286)
* avoid the need for a second bulky binary for grafana-cli

* look for grafana-server in $PATH as well as same directory

* implement unified "grafana" command

* update dockerfiles, fix grafana-cli -v

* update packaging to work with single binary

- add wrapper scripts for grafana and grafana-server
- update and sync package files
- implement --sign flag of build package command
- stop packaging scripts folder, they are not useful for end users
- add support for --configOverrides in server command
- remove unused nfpm.yaml config file

* windows support
2022-11-22 11:53:43 -05:00
Ashley Harrison
824a562b03 Navigation: share logic between buildBreadcrumbs and usePageTitle (#58819)
* simplify usePageTitle logic a bit

* use buildBreadcrumbs logic in usePageTitle

* always add home item to navTree, fix some tests

* fix remaining unit tests
2022-11-22 16:48:07 +00:00
Ashley Harrison
26a7423151 Chore: add some unique keys to prevent warnings (#59143)
add some unique keys to prevent warnings
2022-11-22 16:42:21 +00:00
Guilherme Caulada
414df842b8 Build: Add command to publish to AWS Marketplace through the pipeline (#59068)
* Remove generic variables from publish github action

* Create publish aws cmd to automate aws releases

* Add tests to publish aws cmd

* Replace fmt with log for prints

* Remove unnecessary type assertions

* Readd mistakenly removed go package

* Replace log with fmt for prints due to conflicts

* Update github tests to conform with casing
2022-11-22 13:04:14 -03:00
Jean-Philippe Quéméner
41b3398eb4 Alerting: Enable interpolation for notification policies in file provisioning (#58956) 2022-11-22 16:54:24 +01:00
Kristina
d5274dfdda Explore: Skip flaky query history test (#59135)
Skip flaky query history test
2022-11-22 10:52:50 -05:00
Joao Silva
f8dc333ee4 Preferences: Add confirmation modal when saving org preferences (#59119) 2022-11-22 16:47:42 +01:00
Andres Martinez Gotor
5b1ff83ee9 Azure Monitor: Fix resource picker selection for subresources (#56392) 2022-11-22 16:43:57 +01:00
Andres Martinez Gotor
3bea8f2462 Azure Monitor: Fix namespace selection for storageaccounts (#56449) 2022-11-22 16:43:35 +01:00
Ivan Ortega Alba
f98ec2c582 Scenes: Add custom variable support (#59057) 2022-11-22 16:30:16 +01:00
Shirley
c43e1a721f CloudWatch: fix custom namespace for listing dimension keys, refactor to non-pointer types, add test assertions, rename packages (#59106)
Co-authored-by: Erik Sundell <erik.sundell87@gmail.com>
2022-11-22 15:59:11 +01:00
Hamas Shafiq
f62e55f461 Chore: Refactor CopyIcon.test.js to TS (#59024) 2022-11-22 14:40:12 +00:00
Hamas Shafiq
2903e2dbf5 Chore: Refactor UiFindInput.test.js to TypeScript (#59063) 2022-11-22 14:38:43 +00:00
Serge Zaitsev
7ff41cde9a Chore: Fix status codes for nested folders (#59087)
* check for errutil errors first

* a better fix
2022-11-22 16:06:39 +02:00
Ashley Harrison
6f26668a9f Chore: Document theme toggle keybinding (#59031)
* make theme toggle keybinding dev only

* fix bug + add support for theme change keybinding
2022-11-22 14:01:51 +00:00
sam boyer
42baad837a codegen: Refactor core jennies for reusability, add version-picking metajennies (#58995)
* Add each-major jenny, refactor TS jenny for it

* Introduce LatestJenny, refactor GoTypesJenny for it
2022-11-22 15:00:29 +01:00
Andreas Christou
4eed56193f DataSourceWithBackend - Set postResource method to POST (#59114)
Set postResource method to POST
2022-11-22 13:31:47 +00:00
Sven Grossmann
08e87a217c Loki: Add gzip compression to resource calls (#59059)
* Loki: Add compression to `callResource`

* add missing tests

* fix formatting
2022-11-22 14:02:30 +01:00
Gábor Farkas
afeb21e300 yarn: commit files to make yarn-install reproducible (#55979) 2022-11-22 13:49:03 +01:00
Marcos de Oliveira
91582ba03d LDAP: Make LDAP attribute mapping case-insensitive (#58992)
* Make LDAP attribute mapping case-insensitive

* Add test case with attribute name different from schema's

* Add fix to getArrayAttribute also and add test with mismatched letter
case.

* Update pkg/services/ldap/helpers.go

Co-authored-by: Misi <mgyongyosi@users.noreply.github.com>
2022-11-22 13:47:53 +01:00
Denis Limarev
4d8287b319 Performance: add preallocation for some slice/map (#57860)
This change preallocates slices and maps where the size of the data is known before the object is created.

Co-authored-by: Joe Blubaugh <joe.blubaugh@grafana.com>
2022-11-22 20:24:36 +08:00
Josh Hunt
460be70261 Internationalization: Change locale preference to language (#58359)
* backend locale -> language

* frontend locale -> language

* sample.ini and tests

* fix few last locale -> language

* fix few last locale -> language
2022-11-22 12:18:34 +00:00
Sofia Papagiannaki
9926931d40 Nested Folder: Include URL into the GET response (#59099) 2022-11-22 07:04:09 -05:00
brendamuir
6c6103d573 Docs: adds workaround for editing provisioned rules using the HTTP API (#59094)
* Docs: adds workaround for editing provisioned rules using api

* updates text

* updates text take two
2022-11-22 11:46:48 +00:00
Sonia Aguilar
9c4b78ae4f Alerting: add group name validation in alert rule form (#59095)
Add group name validation in alert rule form
2022-11-22 12:26:07 +01:00
Ashley Harrison
19e97a1f31 Accessibility: Improve keyboard accessibility in Collapse (#59022)
fix keyboard accessibility in Collapse
2022-11-22 11:19:57 +00:00
Karl Persson
189bf102cf LoginAttempt: Move logic around login attempts into the service (#58962)
* LoginAttemps: Remove from sqlstore mock

* LoginAttemps: Move from models package to service package

* LoginAttemps: Implement functionallity from brute force login in service

* LoginAttemps: Call service

* LoginAttempts: Update name and remove internal functions

* LoginAttempts: Add tests

* LoginAttempt: Add service fake

* LoginAttempt: Register service as a background_services and remove job
from cleanup service

* LoginAttemps: Remove result from command struct

* LoginAttempt: No longer pass pointers
2022-11-22 11:37:18 +01:00
Sonia Aguilar
082c8ba7a0 Docs: Add step for custom labels in alert form (#59027) 2022-11-22 11:35:54 +01:00
kay delaney
850f5fa8d7 LibraryPanels: Fix issue where viewer with folder edit permissions could not update library panel (#58420)
* LibraryPanels: Fix issue where viewer with folder edit permissions could not update library panel
2022-11-22 10:05:55 +00:00
Karl Persson
062c5b805c Auth: Merge ActiveAuthTokenService into UserAuthTokenService (#59032)
* Auth: Merge UserTokenService and ActiveAuthTokenService

* Auth: Rename function
2022-11-22 10:58:59 +01:00
linoman
f8f61c1a69 Auth: Add expiry date for service accounts access tokens (#58885)
* Add new configuration option for SA tokens

* Add new expiry date option to frontend components

* Add backend validation


Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com>
2022-11-22 10:08:40 +01:00
jmatosgrafana
c1eabb893f Docs: Update RSS feed in security page (#56439)
* Update RSS security feed

* docs: update security.md to refer to blog

* Update SECURITY.md

Co-authored-by: Richard Hartmann <RichiH@users.noreply.github.com>

Co-authored-by: Daniel Lee <dan.limerick@gmail.com>
Co-authored-by: Richard Hartmann <RichiH@users.noreply.github.com>
2022-11-22 10:07:59 +01:00
Sasha Melentyev
c02003af3c Refactor time durations (#58484)
This change uses `time.Second` in place of `1000 * time.Millisecond` and `time.Minute` in place of `60*time.Second`.
2022-11-22 15:09:15 +08:00
sam boyer
6ac43c9cb4 kindsys: Return Decl from Kinds (#59075)
* kindsys: Return Decl from Kinds

* Add funcs to extract DeclForGen from kinds
2022-11-21 17:50:06 -05:00
Bart Peeters
57d6adbc7c Alerting: Support Prometheus durations in Provisioning API (#58293)
Provisioning API should support Prometheus durations
2022-11-21 18:58:25 +00:00
Zoltán Bedi
38f25a0bf5 MS/My/PostgresSQL: Migrate annotation query (#58847) 2022-11-21 19:46:04 +01:00
Dimitris Sotirakis
44402ff726 CI: Split enterprise2 pipelines (#57997)
* Add publishimages_enterprise2.go file

* Add push.go

* Modify build files

* Modify starlark files

* Remove promotion pipeline

* Remove unused args

* Handle tag for custom events
2022-11-21 20:06:00 +02:00
Leon Sorokin
1f4834a144 Prometheus: fix Heatmap y buckets when legendFormat: auto (#59053) 2022-11-21 10:29:37 -07:00
Sonia Aguilar
99725bf9d4 Alerting: Improve UI for making more clear that evaluation interval belongs to the group (#56397)
* In GrafanaEvaluationBehaviour component : Split evaluation interval from for duration and add button to edit to allow editing it and warning

* Move folder and group fields to the evaluation section in the alert form

* Include 'Group behaviour' info in a card and fix 'Edit group behaviour' button onClick.

* Create hook for  getting groups for a particular folder

* Use dropdown in group instead of input and fill it with groups that belong to the selected folder

* Add evaluation interval for each group in dropdown , and show warning in case user wants to update it

* Avoid saving evaluation interval when some rules in the same group would have invalid For with this change

* Clear group value when reseting the drop down

* Remove evaluationEvery from form values, show this as a label and add a button to edit the group

* Open EditRuleGroupModal for editing evaluation interval form the alert rule form

* Fix aligment in group behaviour card

* compact space in evaluation behaviour card and change group drop down label

* In EditgroupModal, in case of grafana managed group, show folder instead of namespcace label and disable the folder name input

* Add edge case in rulesInSameGroupHaveInvalidFor method when For value is zero

* Vertically align annotations input to the evaluation section in alert rule form

* Fix width when editing new group

* Add placeholder for group input

* Make folder and group in modal readonly from alert form and disable edit group button when new group

* Update texts

* Don't show evaluation behaviour section until folder and group are selected

* Update texts

* Fix merge conflits

* Fix wrong margin in evaluation label

* Remove non-used isRulerGrafanaRuleDTO method

* Remove negative margin to avoid overlaping on Firefox
2022-11-21 17:59:19 +01:00
Laura Fernández
8f567d57fa Internationalization: Translate ViewJSONmodal and ClipboardButton (#58807) 2022-11-21 17:37:53 +01:00
Sven Grossmann
a62e437eb3 DevEnv: Add default loki configuration (#59058)
add local default config
2022-11-21 17:12:27 +01:00
ying-jeanne
ba8124ef93 Chore: Fix SQLx failure when starting the server with newDBLibrary enabled (#58985)
change the weekstart to pointer

Co-authored-by: Sofia Papagiannaki <1632407+papagian@users.noreply.github.com>
2022-11-21 16:53:56 +02:00
Torkel Ödegaard
156ed4b56c VizPanel: Support panel migrations and state changes (#58501)
* VizPanel: Make it more real

* Updates

* Progress on query runner and max data points from width

* Updated

* Update

* Tests

* Fixed issue with migration

* Moving VizPanel

* Fixed migration issue due to pluginVersion not being set

* Update public/app/features/scenes/querying/SceneQueryRunner.test.ts

Co-authored-by: Ivan Ortega Alba <ivanortegaalba@gmail.com>

* Some minor review fixes

* Added expect

Co-authored-by: Ivan Ortega Alba <ivanortegaalba@gmail.com>
2022-11-21 15:31:01 +01:00
Sofia Papagiannaki
15561b83e4 Nested Folders: Make parent_uid column nullable (#59035)
Nested Folders: Make parent UID column nullable
2022-11-21 15:24:20 +01:00
Kristina
bdfa127ee5 Explore: Notify when compact URL is used (#58684)
* Add explore compact url notices

* Add error checking around data links urls

* Fix tests

* remove global flag, add test for warning in title

* Move feature tracking to initialization, add better error messaging

* Fix test

* Add compact url tests, fix styling bug, remove warning tooltip

* Fix broken check, move tests to util file
2022-11-21 08:03:50 -06:00
Josh Hunt
b1ffe18599 Chore: Fix some as HTMLElement type assertions (#58667) 2022-11-21 13:05:55 +00:00
Andres Martinez Gotor
448358ac66 @grafana/runtime: Avoid calling applyTemplateVariables for the wrong datasource (#57921) 2022-11-21 13:09:43 +01:00
Andreas Christou
f8656d269d AzureMonitor: Separate subscription health check API version (#58253)
Separate subscription health check API version
2022-11-21 13:03:16 +01:00
George Robinson
2f878acd9d Alerting: Add Troubleshooting to Images in notifications docs (#58955) 2022-11-21 11:21:59 +00:00
Karl Persson
4d1504d160 Change codeowner of login and login attempt packages (#59020)
Set grafana authnz team as CODEOWNERS for /pkg/services/loginattempt and /pkg/login
2022-11-21 05:32:47 -05:00
Sonia Aguilar
ee9057a5fa Alerting: Remove checkForPathSeparator validation in alert rule name (#59014)
Remove checkForPathSeparator validation in alert rule name
2022-11-21 11:15:00 +01:00
Mitch Seaman
b0fc736e7a Remove Annotations API version reference (#57057)
Remove minimum version reference in Annotations API docs, since docs are versioned and this feature has been released for years.
2022-11-21 10:07:59 +00:00
Ashley Harrison
8aa74fe9ee Accessibility: Improve keyboard accessibility of FilterPill (#58976)
fix keyboard a11y in FilterPill
2022-11-21 09:29:41 +00:00
Ashley Harrison
598935cb34 Accessibility: Improve keyboard accessibility in AnnoListPanel (#58971)
fix keyboard accessibility in AnnoListPanel
2022-11-21 09:25:56 +00:00
Yuri Tseretyan
b57689e07e Alerting: Add header X-Grafana-Org-Id to evaluation requests (#58972) 2022-11-21 10:13:44 +01:00
Leo
4aa5dea96b Navigation: Set navtree to an empty array instead of null (#58919)
set navtree to  an empty array instead of null
2022-11-21 09:43:21 +01:00
Leo
14fbd44ac0 Navigation: Prevent viewer role accessing dashboard creation, import and folder creation (#58842)
hide pages related dashboard import create and folder creation for viewer role
2022-11-21 09:42:58 +01:00
Sonia Aguilar
97bf3c1dca Alerting: Move alert rule name to the top left in alert form (#58579)
* Move alert rule name to the top left in alert form, and add a placeholder

* Update docs

* Fix lint error
2022-11-21 09:11:02 +01:00
Christopher Moyer
8ac197b11c Docs/removes admin screenshots (#58994)
* removes screenshots in the admin docs

* removes unneeded screenshot
2022-11-18 15:55:46 -06:00
Christopher Moyer
780efa5791 Docs: adds permission validation setting (#58970)
* adds permission validation setting

* Update docs/sources/administration/roles-and-permissions/access-control/configure-rbac/index.md

Co-authored-by: Misi <mgyongyosi@users.noreply.github.com>

* makes prettier

Co-authored-by: Misi <mgyongyosi@users.noreply.github.com>
2022-11-18 12:06:09 -06:00
Andreas Christou
19ff3645e8 Update verify-release script (#58812)
Update verify-release script with required arg
2022-11-18 16:47:13 +00:00
Christopher Moyer
e7b5bd34bd Docs: adjusts link to kms integration (#58981)
adjusts link to kms integration
2022-11-18 10:46:07 -06:00
George Robinson
4da97aef7d Alerting: Fix metric in Images in Notifications docs (#58954) 2022-11-18 16:28:00 +00:00
Ashley Harrison
e19957bbc8 Accessibility: Improve keyboard accessibility in GettingStarted panel (#58966)
fix keyboard a11y in `GettingStarted` panel
2022-11-18 15:29:50 +00:00
Dimitris Sotirakis
01afe9fbd4 CI: Move upload-packages subcmd from grabpl (#58960)
* Move upload-packages subcmd from grabpl

# Conflicts:
#	.drone.yml

# Conflicts:
#	.drone.yml

* Fix lint - add ActivateServiceAccount

* Fix lint
2022-11-18 17:22:14 +02:00
Josh Hunt
5978dc138e Nav: Split Admin into three sections for new IA (#58229)
* start to split admin into two sections

* most of new admin nav implemented

* landing pages

* hide admin for non-admins

* update admin redirects if not topnav

* clean up

* updated IA for admin (still WIP)

* move plugin pages into correct admin sections

* fix backend unit test

* move correlations into the correct section

* add translations for admin sections

Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2022-11-18 15:11:59 +00:00
Yuri Tseretyan
8c72d19bcc Alerting: Refactor MS teams, Pushover and Webhook notifiers to use encoding/json to parse settings (#56834)
* update teams
* update sensugo
* update pushover
* update webhook to use json.Number
2022-11-18 09:24:12 -05:00
Ashley Harrison
5226a61f67 Navigation: Stop clearing search state when opening a result in a new tab (#58880)
search: only clear search state if not opening in a new tab
2022-11-18 14:17:59 +00:00
Dimitris Sotirakis
0bf3c98eec CI: Add environment variables for edition to all pipelines (#58964)
Add environment variables to pipelines
2022-11-18 16:15:04 +02:00
Ivan Ortega Alba
766867735d E2E: Fix flakiness for dashboard-search spec (#58950) 2022-11-18 14:55:34 +01:00
Giordano Ricci
27b5e5f781 Explore: Fix a11y issue with logs navigation buttons (#58944) 2022-11-18 14:54:56 +01:00
Giordano Ricci
b68fe6336a Chore: move keydown handler in rich history card (#58945)
Chore: move kedown handler in rich history card
2022-11-18 14:54:20 +01:00
Giordano Ricci
44e8fb628e Explore: Fix a11y issue with show all series button in Graph (#58943)
* Explore: Fix a11y issue with show all series button in Graph

* remove extra space

* add spacing
2022-11-18 14:52:54 +01:00
Karl Persson
b3406a8273 Auth: Remove userauth service (#58941)
* Auth: remove userauth service

* Use Revoke user tokens from UserAuthTokenService
* Add function to delete user auth info to UserAuthInfo service
2022-11-18 14:40:26 +01:00
Dimitris Sotirakis
e37fc888c0 CI: Move upload-cdn subcommand from grabpl (#58957)
Move upload-cdn from grabpl
2022-11-18 08:37:18 -05:00
sfranzis
e823a90b82 GaugePanel: Setting the neutral-point of a gauge (#53989) 2022-11-18 12:13:31 +01:00
Ryan McKinley
8e19a1618f QueryData: skip header validation (revert check) (#58871) 2022-11-18 05:46:50 -05:00
Alex Pakalniskis
0e4108f62f Documentation Update: Minor spelling change (#58933)
chore: minor grammar tweak
2022-11-18 11:34:25 +01:00
Torkel Ödegaard
38b980bd81 SceneObject: Prevent state mutation by using Object.freeze (#58936) 2022-11-18 10:35:27 +01:00
George Robinson
b77c3946a5 Alerting: Fix ConditionsCmd No Data for "has no value" (#58634)
This commit fixes a bug where ConditionsCmd returns No Data even when
the condition checks for "has no value". It should return 1 with a nil
match.
2022-11-18 09:28:21 +00:00
Misi
9c98314e9f OAuth: Refactor OAuth parameters handling to support obtaining refresh tokens for Google OAuth (#58782)
* Add ApprovalForce to AuthCodeOptions

* Extract access token validity check to a function

* Refactor

* Oauth: set options internally instead of exposing new function

* Align tests

* Remove unused function

Co-authored-by: Karl Persson <kalle.persson@grafana.com>
2022-11-18 10:12:17 +01:00
Ashley Harrison
d46e3916a1 Navigation: move connections + integrations to be a top level item (#58902)
* move connections + integrations to be a top level item

* add a test to check we can move apps to the root

* split out movePlugin logic into a separate function

* fix linting

* rename movePlugin -> addPluginToSection
2022-11-18 09:05:45 +00:00
George Robinson
48c34d310c Alerting: Add tests that check current No Data behaviour with two conditions (#58650) 2022-11-18 09:04:43 +00:00
Karl Persson
fef1e1d5bc Auth: Refactor auth package (#58920)
* Auth: move interface to its own file

* Auth: move to test package

* Auth: move quota consts to auth file

* Auth: move service to impl package

* Auth: move interfaces and related models to auth package

* Auth: Create sub package and type alias to avoid circular dependency
2022-11-18 09:56:06 +01:00
Gilles De Mey
ea27eca147 Email: Use MJML email templates (#57751)
Co-authored-by: Santiago <santiagohernandez.1997@gmail.com>
2022-11-17 21:41:46 +01:00
Sofia Papagiannaki
18738cfd77 Quota: Fix failure in store due to missing scope parameters (#58874)
Quota: Fix failure in store
2022-11-17 18:08:25 +01:00
Kristina
5cad7089b3 Explore: Enable resize of split pane (#58683)
* Move layout to paneleditor, make SplitPaneWrapper more generic

* Read/write the size ratio in local storage

* Add min height to enable scrollbar

* Enable show/hide panel options

* Add new component to explore

* Add styles

* Bring in code from other branch

* Fix update size function, add min size to explore container

* Add window size, save width as a ratio

* Fix tests

* Allow for one child

* Remove children type definition

* Use library methods for min/max size instead of hooks
2022-11-17 09:27:07 -06:00
Torkel Ödegaard
0c4aa6d0d8 DashboardScene: First step to loading the current dashboard model and rendering it as a scene (#57012)
* Initial dashboard loading start

* loading dashboard works and shows something

* loading dashboard works and shows something

* Minor tweaks

* Add starred dashboards to scene list page

* Use new SceneGridLayout

* Allow switching directly from dashboard to a scene

* Migrate basic dashboard rows to scene based dashboard

* Review nit

Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
2022-11-17 07:15:51 -08:00
Levente Balogh
c093a471e6 AppRootPage: Fix passing the queryParams (#58912)
* fix(AppRootPage): push the query params properly

* refactor: remove unnecessary changes in AppRootPage

* refactor(AppRootPage): use existing utility function
2022-11-17 10:09:06 -05:00
Torkel Ödegaard
c14cbfc65d Breadcrumbs: Remove semi-bold and change current/last breadcrumb text color (#58875) 2022-11-17 15:51:09 +01:00
Ashley Harrison
ac66e14054 Navigation: rename Grafana Machine Learning to just Machine Learning (#58893)
rename Grafana Machine Learning to just Machine Learning
2022-11-17 14:31:03 +00:00
Karl Persson
6e3cb2e3ed Oauth: Remove unused function for oauth implementations (#58887)
* Oauth: remove unused function

* Oauth: remove unused Oauth types
2022-11-17 15:03:15 +01:00
Jo
7e9d94cfda Chore: Extract server lock error so it can be used with errors.As (#58899)
chore: extract server lock Error so it can be used with error.As
2022-11-17 15:02:17 +01:00
Dimitris Sotirakis
5ea077c440 CI: Replace TAG with DRONE_TAG in CI (#58894)
* Replace TAG with DRONE_TAG

* Fix variable call

* Replace remaining bits

* Bump grabpl version
2022-11-17 08:30:09 -05:00
Dimitris Sotirakis
d0dcbe34b2 grafana.com: Make beta and test releases not stable (#58883)
If version is beta or test, don't mark it as stable
2022-11-17 12:44:53 +02:00
Eric Leijonmarck
2a6ed76e54 [Docs] Edit terraform example and doc for file generation (#58822)
* docs: update terraform example and doc for file generation

* docs: updated the documnettaion to include the help command with fields included

* Update pkg/cmd/grafana-cli/commands/commands.go

* docs: add help command
2022-11-17 05:24:07 -05:00
Ashley Harrison
b398e8640d Navigation: Change quick add styling (#58854)
Change quick add styling + allow for returning isOpen state to dropdown children
2022-11-17 09:03:12 +00:00
Leo
27b6b3b3bd Folder: Replace folderId with folderUid (#58393)
* support folderuid in FolderPicker

* support folderuid in unified alerting

* support folderuid when returning to view mode after editing a panel

* support folderuid when preselecting the folderpicker in dashboard general settings

* support folderuid when saving dashboard

* support folderuid when pre-selecting folderpicker in dashboard form

* support folderuid in routes when loading a dashboard

* support folderuid when saving dashboard json

* support folderuid when validating new dashboard name

* support folderuid when moving dashboard to another folder

* support folderuid on dashboard action buttons

* support folderuid when creating a new dashboard on an empty folder

* support folderuid when showing library panel modal

* support folderuid when saving library panel

* support folderuid when importing dashboard

* fixed broken tests

* use folderuid when importing dashboards

* remove commented line

* fix typo when comparing uid values
2022-11-17 09:22:57 +01:00
Sofia Papagiannaki
ab36252c86 Quota: Fix failure when checking session limits (#58865) 2022-11-17 00:30:27 +01:00
sam boyer
c4528f9bd8 codejen: Update to latest codejen (#58866) 2022-11-16 15:08:01 -05:00
lean.dev
88f5ed0faf Chore: update latest.json to 9.2.5 (#58860) 2022-11-16 13:42:38 -05:00
Marcus Efraimsson
79f1a7a4fd Database: Adds support for enable/disable SQLite Write-Ahead Logging (WAL) via configuration (#58268)
Adds support for enable/disable SQLite Write-Ahead Logging (WAL) via configuration.
Enables SQLite WAL for E2E tests.
2022-11-16 19:29:33 +01:00
Grot (@grafanabot)
df27164b8e Changelog: Updated changelog for 9.2.5 (#58856) 2022-11-16 15:25:14 -03:00
matt abrams
d9b8b761e9 Query Editor: Hide overflow for long query names (#58840)
hides overflow for long query names
2022-11-16 18:22:06 +01:00
João Calisto
f254a37d35 Middleware: Add CSP Report Only support (#58074)
* Middleware: Add CSP Report Only support

* Update docs/sources/setup-grafana/configure-grafana/_index.md

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>

* Update docs/sources/setup-grafana/configure-grafana/_index.md

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>

* Update csp documentation wording

* Update conf/sample.ini

Co-authored-by: Dave Henderson <dave.henderson@grafana.com>

* Update docs/sources/setup-grafana/configure-grafana/_index.md

Co-authored-by: Dave Henderson <dave.henderson@grafana.com>

* Update docs/sources/setup-grafana/configure-grafana/_index.md

Co-authored-by: Dave Henderson <dave.henderson@grafana.com>

* Update docs/sources/setup-grafana/configure-grafana/_index.md

Co-authored-by: Dave Henderson <dave.henderson@grafana.com>

* Update pkg/middleware/csp.go

Co-authored-by: Dave Henderson <dave.henderson@grafana.com>

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
Co-authored-by: Dave Henderson <dave.henderson@grafana.com>
2022-11-16 17:11:26 +00:00
matt abrams
aea860a3bd DataLinks: Fix double dollar-sign bug in data-links editor (#58096)
* fix template variable bug

* fix bug when adding vars before existing vars

* take 2--remove includeDollarSign logic

* take 3-add includeDollarSign logic for template vars
2022-11-16 17:46:12 +01:00
Gabriel MABILLE
8756c4d91f RBAC: Add tests on AddAppLinks (#58843)
* RBAC: Add tests on AddAppLinks
2022-11-16 17:44:33 +01:00
Ivan Ortega Alba
f4d238cdbd Build: Disable flaky RuleEditor frontend test (#58844) 2022-11-16 16:41:32 +01:00
Kyle Brandt
1953d473c0 SSE: Keep value name from numeric table (#58831)
fixes #48868
2022-11-16 10:39:28 -05:00
Kyle Brandt
f2066398f0 CodeOwners: (Chore) Add Server Side Expressions (SSE) (#58841)
CodeOwners: Add Server Side Expressions (SSE)
owned by observability-metrics
2022-11-16 10:38:53 -05:00
Artur Wierzbicki
7bf3e28e8f Chore: skip flaky tests (#58835)
skip flaky tests
2022-11-16 10:23:49 -05:00
Ryan McKinley
934fb2f0ee QueryData: fix header parsing to support expressions (#58826)
fixes #58821
2022-11-16 10:17:24 -05:00
Laura Benz
9a5a344304 Explore: A11y of range slider in query history (#58708)
refactor: remove temporary setting
2022-11-16 09:05:30 -06:00
Karl Persson
9283773c12 Teams: Support paginating and filtering more then 1000 teams (#58761)
* TeamList: break out rows to its own component

* TeamsState: Add total count

* TeamList: Remove teamsCount prop

* TeamList: Restructure code and use count from backend response

* TeamList: calculate total pages using totalCount

* TeamList: Rename to state to currentPage and the reducer to
setCurrentPage

* TeamList: remove wrapper functions

* TeamList: rewrite as a functional component

* TeamList: export components for test

* TeamList: pass limit, page and query to backend

* TeamList: Rename properties in state and create actions for page and
query change

* TeamList: Add flag to control if EmptyList banner should render
2022-11-16 15:55:10 +01:00
Gabriel MABILLE
a8c48b6801 RBAC: Cover plugin includes (#57582)
* RBAC: Add action to plugin includes

* Adding the feature toggle check

* Cue update

* Extract include access control to method

* Suggestion to prevent log when RBAC is disabled

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

* Rename IsRBACReady to RequireRBACAction

Co-authored-by: ievaVasiljeva <ieva.vasiljeva@grafana.com>
2022-11-16 15:54:04 +01:00
Torkel Ödegaard
bce83485a9 Scenes: Share factory function for test data query runner (#58816) 2022-11-16 15:47:44 +01:00
Yuri Tseretyan
332630c2e0 kindsys: Make kind generators run in Windows (#58794) 2022-11-16 09:21:11 -05:00
Dimitris Sotirakis
5d73f7f8e8 CI: Cleanup e2e tests dependencies (#58829)
Cleanup end to end tests dependencies
2022-11-16 09:07:53 -05:00
Torkel Ödegaard
20133ec6fb Variables: Use new format registry from templateSrv (#58813)
* Variables: Use new format registry from templateSrv

* Updated comment

* Fixed e2e
2022-11-16 14:55:31 +01:00
matt abrams
74010fd05d Admin: Fix broken links to image assets in email templates (#58729)
fix broken links to image assets
2022-11-16 14:17:39 +01:00
Laura Fernández
f2cb248d93 Internationalization: Translate 'Hide / show legend' of PanelHeaderMenuItem (#58800) 2022-11-16 13:06:04 +01:00
Laura Fernández
515440979b Internationalization: Translate ShareSnapshot label (#58802) 2022-11-16 13:04:51 +01:00
Laura Fernández
3f63ca06c3 Internationalization: Translate NavBar - 'Search dashboard' menu item (#58815) 2022-11-16 13:02:29 +01:00
Levente Balogh
4ee83a5f2b AppRootPage: Render app plugins without pages (#58776)
fix: render app plugins that don't have a page in includes
2022-11-16 11:49:34 +01:00
Torkel Ödegaard
8c585a4ebf Scene: Variables interpolation formats and multi value handling (#58591)
* Component that can cache and extract variable dependencies

* Component that can cache and extract variable dependencies

* Updates

* Refactoring

* Lots of refactoring and iterations of supporting both re-rendering and query re-execution

* Updated SceneCanvasText

* Updated name of file

* Updated

* Refactoring a bit

* Added back getName

* Added comment

* minor fix

* Minor fix

* Merge fixes

* Scene variable interpolation progress

* Merge fixes

* Added all format registeries

* Progress on multi value support

* Progress on multi value support

* Updates

* Progress on scoped vars

* Fixed circular dependency

* Updates

* Some review fixes

* Updated comment

* Added forceRender function

* Add back fail on console log

* Update public/app/features/scenes/variables/interpolation/sceneInterpolator.test.ts

* Moving functions from SceneObjectBase

* fixing tests

* Fixed e2e

Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
2022-11-16 11:36:30 +01:00
Giordano Ricci
2a9381e998 Explore: Refactor ExploreGraph (#58660)
* WIP

* revert collapse changes

* use HorizontalGroup instead of custom styles

* fix tests

* use import aliases
2022-11-16 11:16:27 +01:00
Timur Olzhabayev
174a039ee1 Fix: Bump-version action regex pattern to work with beta1 (#58805)
Fixing bump version regex
2022-11-16 09:26:38 +00:00
Marcus Andersson
5bd15026ff Docs: How to add plugin interaction tracking (#58652)
* docs for plugin interaction tracking.

* Update docs/sources/developers/plugins/add-anonymous-usage-reporting.md

Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>

* Adding query type

* Fixed spelling issue

Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
2022-11-16 10:06:42 +01:00
Dimitris Sotirakis
3d016d67a2 latest.json: Update latest.json to 9.3.0-beta1 (#58788)
Update latest.json
2022-11-15 18:32:34 -03:00
Grot (@grafanabot)
d5318f02c6 Changelog: Updated changelog for 9.3.0-beta1 (#58785) 2022-11-15 17:01:22 -03:00
Laura Fernández
3cedcdedbd Internationalization: Translate VariableInput and VariableOptions components (#58748) 2022-11-15 17:30:33 +01:00
Kristina
2055d922f3 Refactor SplitPaneWrapper to be more centralized component, refactor PanelEditor to use it (#58380)
* Move layout to paneleditor, make SplitPaneWrapper more generic

* Read/write the size ratio in local storage

* Add min height to enable scrollbar

* Enable show/hide panel options

* Change back variable name
2022-11-15 09:10:05 -06:00
sam boyer
78f0340031 plugindef: Move pluginmeta out of coremodels as standalone thema lineage (#56765)
* Get pluginmeta mostly moved over to pkg/plugins/plugindef

* Remove dead func

* Fix up pfs, use sync.Once in plugindef

* Update to latest thema

* Chase Endec->Codec conversion in Thema

* Comments on slash header gen; use ToSlash

* Also generate JSON schema for plugindef

* Generate JSON Schema as well

* Fix slot loading from kindsys cue decls

* Remove unused vars

* skip generating plugin.schema.json for now

Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
2022-11-15 14:48:31 +01:00
Ashley Harrison
ff1afbb699 Revert "Chore: move to node 18 (#58570)" (#58754)
This reverts commit 0a9129cf90.
2022-11-15 13:47:14 +00:00
lean.dev
83bd57244d Chore: Update version (#58750) 2022-11-15 10:03:05 -03:00
Joao Silva
20e6ac397e Search: Fixes issue with Recent/Starred section always displaying "General" folder (#58746) 2022-11-15 13:16:03 +01:00
Ashley Harrison
028751a18a Navigation: Add quick actions button (#58707)
* initial implementation for quick add

* add new isCreateAction prop on NavModel

* adjust separator margin

* switch to primary button

* undo changes to plugin.json

* remove unused props from interface

* use a consistent dropdown overlay type

* memoize findCreateActions

* add prop description

* use a function so that menus are only rendered when the dropdown is open
2022-11-15 12:08:15 +00:00
Torkel Ödegaard
84a69135a7 Scene: Variables and support for declaring variable dependencies and getting notified or re-rendered when they change (#58299)
* Component that can cache and extract variable dependencies

* Component that can cache and extract variable dependencies

* Updates

* Refactoring

* Lots of refactoring and iterations of supporting both re-rendering and query re-execution

* Updated SceneCanvasText

* Updated name of file

* Updated

* Refactoring a bit

* Added back getName

* Added comment

* minor fix

* Minor fix

* Merge fixes

* Merge fixes

* Some review fixes

* Updated comment

* Added forceRender function

* Add back fail on console log
2022-11-15 12:54:24 +01:00
Sofia Papagiannaki
93b4b9154e Chore: Restore folder properties (#58743)
* Chore: Fix folder URL

* Restore more folder properties

* Fixup
2022-11-15 12:58:12 +02:00
Karl Persson
98dbc637cc Auth: Always include oauth and saml settings for frontend (#58705)
* Auth: Always include oauth and saml settings
2022-11-15 10:50:37 +01:00
Gabriel MABILLE
d999b5bda0 RBAC: remove redundant role name field from plugin role registrations (#58166)
* RBAC: Remove name from role registration

* Inline accesscontrol service

* test fix

* use fmt

Co-Authored-By: marefr <marcus.efraimsson@gmail.com>

Co-authored-by: marefr <marcus.efraimsson@gmail.com>
2022-11-15 09:51:40 +01:00
Dominik Prokop
80e80221b9 Scenes: Grid layout (#56737)
* WIP: First approach to scene grid layout

* Flex layout

* Grid layout rows

* Allow passing custom props to scene object renderers

* Allow nesting grid layouts

* Re-layout nested grid's enclosing grids

* Update public/app/features/scenes/components/layout/SceneGridLayout.tsx

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

* Review comments

* Got rid of flex & grid child layout objects

* WIP: Recreating rows behaviour (almost working)

* Major progress on rows

* remove nested grid example (not supported)

* Remove removal damn

* Trying to use children directly

* Ts fixes

* chore: Fix TS

* Fix issue when row bboxes when not updated on layout change

* Now the tricky part

* working

* Removing some code

* needs more work

* Getting some thing working

* Getting some thing working

* fix toggle row

* Starting to work

* Fix

* Yay it's working

* Updates

* Updates

* Added some sorting of children

* Updated comment

* Simplify sorting

* removed commented code

* Updated

* Pushed a fix so we can move a panel out from a row and into the parent grid

* simplify move logic

* Minor simplification

* Removed some unnesary code

* fixed comment

* Removed unnessary condition in findGridSceneParent

* remove unnessary if

* Simplify toGridCell

* removed duplicate if

* removed unused code

* Adds grid demo with different data scenarios

* Make it green

* Demo grid with multiple time ranges

* Move child atomically

* Add tests

* Cleanup

* Fix unused import

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
Co-authored-by: Ivan Ortega <ivanortegaalba@gmail.com>
2022-11-15 00:49:39 -08:00
matt abrams
16aa4376ac Transformations: Make Card Descriptions Clickable (#58717)
replace Card Meta w Card Description
2022-11-15 09:37:37 +01:00
Artur Wierzbicki
eff5450ff1 Search: Revert "load dashboard performance improvements" (#58730)
Revert "Search: load dashboard performance improvements (#57509)"

This reverts commit 1df8a85a42.
2022-11-15 02:25:13 -05:00
Ryan McKinley
d33939da55 DataSourceWithBackend: Add plugin id to the request headers (#58082) 2022-11-14 19:35:50 -05:00
Jack Baldry
b9d8bcb59b Use relref resolved from nearest section (#58718)
As image-rendering is a branch bundle, it is considered a section by
Hugo and relrefs should be resolved from there even for child pages.

The behavior that worked in `next` but not `latest` could be explained
by the lenient but potentially ambiguous relref resolution algorithm
Hugo uses. However, I have not determined the exact difference between
the two sets of content that causes `next` to work but `latest` not to.

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
2022-11-14 17:00:28 -04:00
kay delaney
59d2cf2ff7 Snapshots: Allow user with viewer permissions to delete own snapshots (#58572)
Also allows deletion of snapshots whose original dashboard is
in a folder which the viewer has explicit edit permissions for
2022-11-14 19:13:33 +00:00
Sofia Papagiannaki
9855e74b92 Chore: Refactor quota service (#58643)
Chore: Refactor quota service (#57586)

* Chore: refactore quota service

* Apply suggestions from code review
2022-11-14 21:08:10 +02:00
Laura Fernández
dd0d034796 Internationalization: Translate RefreshPicker component (#58530) 2022-11-14 17:47:15 +01:00
Laura Fernández
67bd0d5537 Internationalization: Translate TimeRangePicker component (#58470) 2022-11-14 17:16:34 +01:00
Yuri Tseretyan
28d39d35fd Alerting: Update state manager to save state transitions in one batch (#58358)
* change stale results handler to not update database but return transitions
* save all transitions in one call
2022-11-14 10:57:51 -05:00
Misi
4915d21c25 OAuth: Feature toggle for access token expiration check and docs (#58179)
* Add feature toggle for access token expiration check

* Add docs for configuring refresh tokens

* Update docs

* Update docs based on review

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>

* Improve documentation

* Change access_type default to Offline

* Update docs/sources/setup-grafana/configure-security/configure-authentication/gitlab/index.md

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>

* Update docs/sources/setup-grafana/configure-security/configure-authentication/google/index.md

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>

* Update pkg/services/featuremgmt/registry.go

Co-authored-by: Eric Leijonmarck <eric.leijonmarck@gmail.com>

* Regenerate toggles

* Update Generic OAuth docs

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
Co-authored-by: Eric Leijonmarck <eric.leijonmarck@gmail.com>
2022-11-14 16:47:46 +01:00
Christopher Moyer
a9458c8c00 Docs: corrects relrefs (#58706)
corrects relrefs
2022-11-14 09:24:39 -06:00
Jo
121631daae Fix: Email and username trimming and invitation validation (#58442)
* fix: email and username trimming and invitation validation

* Trim leading and trailing whitespaces from email and username on signup

* Check whether the provided email address is the same as where the invitation sent

* Align tests

Co-authored-by: Mihaly Gyongyosi <mgyongyosi@users.noreply.github.com>
2022-11-14 13:11:26 +01:00
David Beitey
1fddd9aed1 Docs: Update install guides link in README (#56116)
This updates the link to the installation guides in the README to the docs for the latest Grafana version, whereas the previous redirect was going to v9.0. This also improves the security of the link, which was previously insecure http://.
2022-11-14 11:42:23 +01:00
Dimitris Sotirakis
09c3ead945 CI: Make build and store storybook trigger in the release process (#58686)
Make storybook trigger conditional
2022-11-14 10:14:50 +00:00
Garrett Guillotte
b0c197b966 Docs: Comment out broken images (#57482)
* Docs: Comment out broken images

* Docs: Hide the correct images

Co-authored-by: Jack Baldry <jack.baldry@grafana.com>
Co-authored-by: Daniel Lee <dan.limerick@gmail.com>
2022-11-14 10:49:04 +01:00
Labesse Kévin
c3fef96ee0 docs: code format (#58216) 2022-11-14 10:35:44 +01:00
Leo
a71f74220a Navigation: Remove monitoring texts for items under Monitoring section (#58522)
* rename Synthetic monitoring with Synthetics

* improved text override
2022-11-14 10:01:23 +01:00
Karl Persson
f4531b4ee1 Omit error from http response (#58443) 2022-11-14 09:42:31 +01:00
Jack Westbrook
ce50400740 Toolkit: Fix compilation loop when watching plugins for changes (#58167)
* fix(toolkit): ignore node_modules and dist directories when watching for changes to plugin

* fix(toolkit): move watchOptions.ignored config to pluginDev watch call
2022-11-14 09:30:52 +01:00
Niklas Kaaf
75c9350a5a docs: fix heading level for env variable on configuration page (#58689)
fix syntax error in Heading
2022-11-13 13:43:23 +01:00
Ryan McKinley
5934407443 Storage: add an admin write flavor that can explicitly set the user/time (#58618) 2022-11-12 11:36:18 -08:00
ying-jeanne
69b5a9c752 Chore: [Nested Folder] Add db migration at service start time (#58590)
* add db migration at service start time

* make changes for the 3 db

* revert migrator

* fix feature toggle check

Co-authored-by: Serge Zaitsev <serge.zaitsev@grafana.com>
2022-11-12 09:51:46 -05:00
Oscar Kilhed
75e435fb00 SQL: Fix issue where testing the datasource would always be successful if the datasourceQueryMultiStatus feature was enabled (#58671)
SQL Datasources: fix issue where testing the datasource connection would show success even when there was an error.

Co-authored-by: Victor Marin <victor.marin@grafana.com>
2022-11-11 22:41:38 +01:00
Victor Marin
6e776d0fec MSSQL: Add connection timeout setting in configuration page (#58631)
* MSSQL add connection timeout

* add docs

* Update docs and add min value to the timeout setting
2022-11-11 14:04:08 -05:00
Alex Moreno
78bb8c10ce Alerting: Allow none provenance alert rule creation from provisioning API (#58410) 2022-11-11 19:58:45 +01:00
Victor Marin
79142340e0 StateTimelinePanel: Fix duration on merged values (#58561)
Fix stateTimeline duration
2022-11-11 20:19:40 +02:00
gotjosh
d748979048 Alerting: Implement the Webex notifier (#58480)
* Alerting: Implement the Webex notifier

Closes https://github.com/grafana/grafana/issues/11750

Signed-off-by: gotjosh <josue.abreu@gmail.com>
2022-11-11 17:27:13 +00:00
ismail simsek
1c5039085b Prometheus: Make Prometheus streaming parser as default client (#58365)
* Introduce a new feature flag for prometheus buffered client

* Use querydata client as default and put buffered client behind the feature flag

* Remove prometheusStreamingJSONParser feature flag as it is not needed anymore

* Update tests

* Fix unit tests

* Update feature flag description
2022-11-11 17:53:12 +01:00
Ashley Harrison
500cf16142 Chore: fix some types (#58662)
chore: fix some types
2022-11-11 16:29:49 +00:00
Leon Sorokin
860e25df3c BarChart: add gdev panel for random threshold from query (#58580) 2022-11-11 08:58:08 -07:00
ismail simsek
8edeb1aa22 Prometheus: Handle errors in buffered client (#58504)
* Handle prometheus errors in buffered client

* Handle prometheus warnings

* Fix tests

* Add unit test for warnings
2022-11-11 15:49:46 +01:00
Ashley Harrison
0bd120e01b Navigation: fix page title spacing when there is no subtitle (#58654)
* fix page title spacing when there is no subtitle

* apply margin to whole page header
2022-11-11 09:43:11 -05:00
Virginia Cepeda
e5cb1ceae0 Alerting: Suggest previously entered custom labels (#57783)
* [Alerting] - replace label inputs with dropdowns (#57019)

* Add AlertLabelDropdown component

It will be used to pick from or create new labels

* Adapt LabelsField component to use AlertLabelDropdown instead of inputs

* Add tests for LabelsField component

Plus a few other tests were adapted to work with the label dropdowns

* Use ref in component

* Fix showing placeholders in the label dropdowns

* Minor syntax change

* Remove unneeded import after rebase

* Display custom labels

When a label key is selected, its corresponding values are shown in the dropdown

* Add tooltip explaining where labels in the dropdowns come from

* Fix import of Stack component

* Avoid duplicated values

* Improvements based on review

* Display labels for currently selected datasource only

* Refactor AlertsField to allow to choose whether to suggest labels or not

* Suggest labels for NotificationStep and tests

* Don't suggest labels in TestContactPointModal

* [LabelsField] - refactor: get dataSourceName as a parameter

* [LabelsField] - extract common code into reusable components

* Display loading spinner while fetching rules

* LabelsField - refactor

Removing the suggest prop and the default dataSource 'grafana'. Instead, the component now relies on the dataSourceName param. If it's set it means we want to show suggestions so we fetch the labels, otherwise, if not set, we show the plain input texts without suggestions.

* Add test for LabelsField without suggestions

* Show custom labels for grafana managed alerts

When the dataSourceName in the NotificationsStep component has a null value, we can assume it's because we're dealing with grafana managed alerts. In that case we set the correct value.

* Fix tests after latest changes

Since we removed the combobox from the TestContactPoints modal, tests had to be adjusted

* Update texts

* initialize all new added inputs with empty data
2022-11-11 10:29:59 -03:00
idafurjes
080ea88af7 Nested Folders: Support getting of nested folder in folder service wh… (#58597)
* Nested Folders: Support getting of nested folder in folder service when feature flag is set

* Fix lint

* Fix some tests

* Fix ngalert test

* ngalert fix

* Fix API tests

* Fix some tests and lint

* Fix lint 2

* Fix library elements and panels

* Add access control to get folder

* Cleanup and minor test change
2022-11-11 14:28:24 +01:00
Sonia Aguilar
88a829e103 Fix: don't show an error when receiver status is not available (#58638) 2022-11-11 14:26:43 +01:00
Ashley Harrison
6625f6f0c8 Chore: Update .nvmrc (#58641)
Update .nvmrc
2022-11-11 07:21:38 -05:00
Ashley Harrison
0a9129cf90 Chore: move to node 18 (#58570)
* bump node version to 18

* update folder to 18.x

* update README for m1 instructions

* update drone

* update unit test

* update README
2022-11-11 11:34:00 +00:00
Daniel Lee
891ae91c70 docs: fix typo in provisioning docs (#58110)
Fix typo

Co-authored-by: Udlei Nati <udlei@nati.biz>
2022-11-11 12:30:26 +01:00
Hamas Shafiq
8e4fa4046b Chore: Refactor process.js & process.test.js to TypeScript (#58464) 2022-11-11 10:44:06 +00:00
Joey Tawadrous
c76183a961 Tempo: Fix search removing service name from query (#58630)
* Fix handleOnChange deps

* Remove eslint disable
2022-11-11 10:40:13 +00:00
Timur Olzhabayev
02137396bd Fix: Bumping msw and xmldom (#58627)
Bumping msw and xmldom to mitigate xmldom vulnerability
2022-11-11 11:18:38 +01:00
George Robinson
bd87b46b15 Alerting: Improve test coverage for ConditionsCmd (#58603) 2022-11-11 09:27:35 +00:00
Todd Treece
c090de9ed9 Chore: Move dev-dashboards jsonnet into separate directory (#58619) 2022-11-11 04:19:29 -05:00
Alexa V
5fac98bcfd Docs: Add feature flag example to override configuration with environment variables (#58613) 2022-11-10 15:39:27 -06:00
Nathan Marrs
fd6edbf8c5 Canvas: Improve disabled inline editing UX (#58610) 2022-11-10 13:04:42 -08:00
sam boyer
07e5f8117f Reconcile coremodels, entities, objects under new kind framework (#56492)
* Update thema to latest

* Deal with s/Library/*Runtime/

* Commit new, working results of codegen

* We like pointers now

* Always take runtime arg for NewBase()

* Sketchy handwavy pass at entity meta framework

* Little nibbles

* Update pkg/framework/coremodel/entityframework.cue

Co-authored-by: Artur Wierzbicki <wierzbicki.artur.94@gmail.com>

* Move file into new framework location

* Introduce loaders, Go code

* Complete rename to kind

* Flesh out framework, add svg/dashboard examples

* Cruft removal

* Remove generated kind go files from gitignore

* Refine maturity concept, add SlotKind

* Update embed and go deps

* Export PrefixWithGrafanaCUE

* Make the loader actually work, holy crap

* Many small tweaks to type.cue

* Add Apache 2 licensing exceptions for kinds

* Add new kinds dir, start of generator

* Roll back to earlier oapi-codegen

* Introduce new grafana-specific CUE loaders

* Introduce new tidy code generators framework

* Catch up kind framework with tinkering

* Add slices for the generators

* Add write/verify step to main generator

* Many renames

* Split up kind framework cue files

* Use kind.Decl within generated kinds

* Create kind.SomeDecl wrapper type to cache lineages

* Better names again

* Get one generated implemented, hopefully

* Copy dashboard schema into new kind.cue

* Small fixes to make the initial gen work

* Put svg kind in its new home

* Add generated Go dashboard type

* More renames and cleanups

* Add base kind registry and generator

* Stop blacklisting *_gen.go files

This is not the Go best practice, anyway. All we actually want to ignore
for enterprise is generated wire files.

* Change codegen output directories

pkg/kind -> pkg/kinds
pkg/registry/kindreg -> pkg/registry/corekind

* Rename pkg/framework/kind to pkg/kindsys

* Add core structured kind generator

* Add plural and machine names to kind spec

* Copy playlist over to kind system

* Consolidate kindsys files

* Add raw kind generator

* Update CODEOWNERS for kind framework

* Touch up comments a bit

* More docs tweaks

* Remove generated types to reduce noise for review

* Split each generator into its own file

* Rename Slot kind to Composable kind

* Add handwavy types for customkind loading

* Guard against init calls to framework loader

* First pass at doc on extending the kind system

* Improve attribute example in docs

* Fix wire imports

* Add basic TS types generator

* Fix composable kind category def

* No need for a separate file with generate directive

* Catch dashboard schema up

* Rename generator types to something saner and generic

* Make version configurable in ts/go generators

* Add CommonMeta to ease property access

* Add kindsys prop indicating whether lineage is group

* Put all kind categories back in a single file

* Finish with kindsys group props

* Refactor maturity progression per discussion

- Replace "committed" with "merged"
- All kindcats can use all maturity levels, at least for now

* Convert ts veneer index generator to modular system

* Move over to new jennywrites framework

* Strip down old coremodel generator

* Use public version of jennywrites

* Pull latest thema

* Commit generated Go types

* Add header injection postprocessor

* Move sdboyer/jennywrites to grafana/codejen

* Tweak header output

* Remove dashboard and playlist coremodels

* Fix up backend dashboards devenv test

* Fix TS import patterns to new gen filename

* Update internal imports, remove coremodel registry

* Fix compilation errors, wire generation

* Export and replace the prefix dropper

* More Go struct and field name changes

* Last name fixes, hopefully

* Fix lint errors

* Last lint error

Co-authored-by: Artur Wierzbicki <wierzbicki.artur.94@gmail.com>
2022-11-10 12:36:40 -08:00
Ryan McKinley
f92d978386 Export: support export in postgresql (#58553) 2022-11-10 14:16:31 -05:00
Nathan Marrs
47055561ec Canvas: Fix setting icon from field data #58499 2022-11-10 10:56:31 -08:00
Timur Olzhabayev
41c491e2db Cleaning up plugin developer docs (#58596) 2022-11-10 18:36:59 +01:00
Timur Olzhabayev
5bc7f693b5 Docs: Replacing toolkit with sign-plugin (#58593) 2022-11-10 18:31:42 +01:00
Ashley Harrison
9cbbe65243 Move cloud link app to the Administration section (#58578) 2022-11-10 17:02:41 +00:00
Ivana Huckova
261d620f1c Elasticsearch: Add feature toggle for backend migration (#58585)
* Elasticsearch: Add feature toggle for backend migration

* Update
2022-11-10 16:35:15 +01:00
Alex Moreno
45facbba11 Alerting: Remove url based external alertmanagers config (#57918)
* Remove URL-based alertmanagers from endpoint config

* WIP

* Add migration and alertmanagers from admin_configuration

* Empty comment removed

* set BasicAuth true when user is present in url

* Remove Alertmanagers from GET /admin_config payload

* Remove URL-based alertmanager configuration from UI

* Fix new uid generation in external alertmanagers migration

* Fix tests for URL-based external alertmanagers

* Fix API tests

* Add more tests, move migration code to separate file, and remove possible am duplicate urls

* Fix edge cases in migration

* Fix imports

* Remove useless fields and fix created_at/updated_at retrieval

Co-authored-by: George Robinson <george.robinson@grafana.com>
Co-authored-by: Konrad Lalik <konrad.lalik@grafana.com>
2022-11-10 16:34:13 +01:00
Gilles De Mey
738e023d13 Alerting: Fix threshold expression rewire (#58334) 2022-11-10 16:15:38 +01:00
Emil Tullstedt
990d8cd22e Chore: Upgrade go-sqlite3 to v1.14.16 (#58581) 2022-11-10 15:49:28 +01:00
Piotr Jamróz
039f4cb4dd Explore: Support fields interpolation in logs panel (#58426) 2022-11-10 15:33:17 +01:00
ying-jeanne
b13b58ebf8 Add move endpoint into folder service (#58575)
* add move endpoint

* change signatures
2022-11-10 09:06:52 -05:00
Leon Sorokin
778337e522 BarChart: Fix coloring from thresholds and value mappings (#58285) 2022-11-10 07:43:32 -06:00
idafurjes
30f0d66983 Folder: Add implementation for Update for nested folder (#58479)
* Add implementation for Update nested folder

* Remove parent uid from Update

* Fix update
2022-11-10 14:28:55 +01:00
brendamuir
bd6ac793a0 Docs: adds explore content for alerting (#58573) 2022-11-10 12:35:24 +00:00
Timur Olzhabayev
f451332e36 Chore: Switching to new output format for detect breaking changes action (#58516)
* Switching to new output format for detect breaking changes action

* linting: wrap $GITHUB_OUTPUT with double quotes

* linting: fix shellcheck issues in the right place 🤦‍♂️

Co-authored-by: Levente Balogh <balogh.levente.hu@gmail.com>
2022-11-10 06:02:04 -05:00
Levente Balogh
181640b080 Connections: Support standalone plugin pages (#57772)
* feat(Connections): create sub-pages wrapped by `<Page>`

* feat(Connections): rename the Connections page and update routes

* feat(Connections): use new url for editing datasources

* refactor(Connections): remove unused tab components

* feat(Connections): update routes and nav titles

* tests: fix tests for Connections

* tests: fix typo in backend tests
2022-11-10 11:14:23 +01:00
George Robinson
c5ae1bcfe0 Alerting: Fix logging pointer address of DashboardUID and PanelID variables (#58539) 2022-11-10 09:58:38 +00:00
George Robinson
68600c224b Alerting: Log when alert rule cannot be screenshot to help debugging (#58537) 2022-11-10 09:41:31 +00:00
Sofia Papagiannaki
bf5a08e039 API: Support creating a nested folder (#58508)
* API: Support nested folder creation

* Update swagger

* fixup

* Update pkg/api/dtos/folder.go

Co-authored-by: Serge Zaitsev <serge.zaitsev@grafana.com>

* Fix some tests

* create legacy folder url from title and uid

Co-authored-by: idafurjes <36131195+idafurjes@users.noreply.github.com>
Co-authored-by: Serge Zaitsev <serge.zaitsev@grafana.com>
Co-authored-by: Ida Furjesova <ida.furjesova@grafana.com>
2022-11-10 04:41:03 -05:00
Timur Olzhabayev
b5388bb080 Switching to new output format for bump-version action (#58514) 2022-11-10 10:24:19 +01:00
Timur Olzhabayev
c9138ebb68 Switching to new output format for publish docs action (#58518) 2022-11-10 10:14:23 +01:00
ying-jeanne
accb4dea55 [Nested Folder] Delete folder methode (#58444)
* transfer DeleteFolder changes from larger PR

* finish some thingies

* add the simplest delete logics

* some intermedia steps

* fix tests

* add test

* fix some comments

Co-authored-by: yangkb09 <yangkb09@gmail.com>
2022-11-10 03:42:32 -05:00
Andres Martinez Gotor
1201170724 GoogleCloudMonitoring: Refactor query type definition (#58512) 2022-11-10 09:30:47 +01:00
Kristin Laemmert
70dac35348 chore(tests): return a copy of the map to avoid concurrency issues in tests (#58547) 2022-11-09 22:12:18 +01:00
Alexander Weaver
2bfdda5b68 Alerting: Break dependency between state and image packages (#58381)
* Refactor state and manager to not depend directly on image interface

* Move generic errors to models package

* Move NotAvailableImageService to state as its only references are in state tests

* Move NoopImageService to state package

* Move mock to state package

* Fix linter error

* Fix comment styling

* Fix a couple added references introduced by rebase

* Empty commit to kick build
2022-11-09 15:06:49 -06:00
Yuri Tseretyan
bad4f28d0d Alerting: update test TestAlertingTicker to not rely on clock (#58544)
* extract method processTick
* make processTick return scheduled rules
* move state manager tests to state manager
* update test
* move all tests into one file
* remove unused fields
2022-11-09 15:08:57 -05:00
Galen Kistler
ee7348afee Prometheus: Query builder label filters dropdown UI overload fix (#58266)
* WIP: try to support removing series endpoint for supported clients

* add other filter variables to match param for label values query against filter values, in order to resolve bug in which filter value options would display that aren't relevant in the current query editor context, i.e. options would display that upon select would display no data

* clean up console logs

* refactor and comment

* expanding current unit test coverage to cover calls to new API

* fix unit test

* whitespace

* prettier

* WIP: need to merge in other PR

* WIP giving up and trying again

* WIP: most functionality is working, split out shared loki/prom code

* fix bug in which search results wouldn't take other label context into the query

* Fix bug in which the previously selected value would conflict with the async search

* interpolate the label name string instead of the match promql expression

* remove type assertions

* remove type assertion

* clean up generic confusing types, and add back in a type assertion

* remove generic type

* make sure to interpolate label names

* fix bugs with variables not interpolating before query

* remove debug

* assert partial properties on QueryBuilderLabelFilter

* Force update betterer results :(

* update regex so dropdown UX more closely matches current behavior

* add eslint ignore

* add eslint ignore and update betterer
2022-11-09 14:54:51 -05:00
Sofia Papagiannaki
000b4f878d Chore: Retry queries by default in tests (#58535) 2022-11-09 19:56:47 +02:00
Christopher Moyer
ad374efcbd adjusts the stem sentence (#58538) 2022-11-09 11:24:29 -06:00
George Robinson
7e852720e3 Alerting: Fix images cached on rule instead of dashboard panel signature (#58510) 2022-11-09 17:01:48 +00:00
George Robinson
b92a0223e3 Alerting: Improve debug logs in image service (#58507) 2022-11-09 16:32:58 +00:00
Sasha Melentyev
febcaeff3a Chore: Use strings.ReplaceAll and preallocate containers (#58483) 2022-11-09 17:17:09 +01:00
Christopher Moyer
2dfe0a4060 Docs: adjusts topics to align with task templates (#58478)
* updates topic to align with multiple task template

* updates goal intro

* aligns formatting with single task topic template

* Update docs/sources/administration/team-management/index.md

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

* adds permissions requirements to two tasks

Co-authored-by: Kim Nylander <104772500+knylander-grafana@users.noreply.github.com>
2022-11-09 10:09:46 -06:00
George Robinson
acfa066ba2 Alerting: Change TestConditionsCmd to assert on mathexp.Results (#58434) 2022-11-09 16:07:43 +00:00
Giuseppe Guerra
33f02839f0 Plugins: CallResource: Use canonical MIME headers when writing response (#58506)
* Plugins: CallResource: use canonical MIME headers when writing response

* Plugins: add tests for canonical mime headers and Set-Cookie filter

* Removed extra new line
2022-11-09 15:47:32 +01:00
Ashley Harrison
159607fe6f Navigation: Convert PluginDetails page to use new Page extensions (#58509)
* Added labels

* App page fixes

* Switch to switch

* wip

* Updates

* I am stuck

* Minor tweak

* This props interface could work

* removed change

* use new page extensions in plugin details page

* add link separator, fix action button spacing

* some renaming

* Move PageInfo into it's own folder + add tests

* add support for new props in old page header

* remove PluginDetailsHeader as it's no longer used

* Fix unit tests

* fix some badge alignments

* center align actions

* badge alignment + only show downloads for community/commercial plugins

* better link alignment

* conditionally render description

* move install control warnings to below subtitle + refactor

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
2022-11-09 14:44:38 +00:00
Esteban Beltran
cced175ccf Docs: Replace toolkit command to scaffold plugins with create-plugin (#58462)
* Replace command to scaffold plugin with create-plugin

* Change link text
2022-11-09 08:15:23 -06:00
Gareth Dawson
fa5a304de8 Elasticsearch: fix typo (#58519) 2022-11-09 14:10:47 +00:00
Timur Olzhabayev
008c554d7f Echo: Add config option to prevent duplicate page views for GA4 (#57619) 2022-11-09 15:09:19 +01:00
Matias Chomicki
463f993186 feat(loki-monaco-editor): update e2e test with autocomplete steps (#58455)
* feat(loki-monaco-editor): update e2e test with autocomplete steps

* Chore: replace typing method

* Test simpler POC test

* Chore: refactor test

* Chore: use selector to get the editor value
2022-11-09 13:37:00 +01:00
George Robinson
1290951b65 Alerting: Small improvements to staleResultsHandler (#58007) 2022-11-09 11:08:32 +00:00
Gareth Dawson
966b47c2ef Loki: Rename log browser to label browser (#58416)
* rename loki log browser to label browser

* rename loki log browser to label browser
2022-11-09 09:57:05 +00:00
Torkel Ödegaard
b5651803e0 Scene: ObjectVariable for supporting the built in system variables and object scoped variables (__data for example) (#58291)
* Scene: Adds ObjectVariable to support the built-in/system variables

* fixed lint issue
2022-11-09 10:27:20 +01:00
George Robinson
fdeefaee42 Alerting: Reorder tests in classic_test.go (#58425) 2022-11-09 09:13:47 +00:00
Ashley Harrison
b3c761aaa7 Navigation: Expose new props to extend Page/PluginPage (#58465)
* add extensions and customisation to `Page`

* adjust alignment
2022-11-09 09:05:01 +00:00
Andres Martinez Gotor
9778d642df GoogleCloudMonitoring: use typed struct in newInstanceSettings (#58440) 2022-11-09 09:38:06 +01:00
Torkel Ödegaard
6ed35292fe Variables: SceneVariable update process (#57784)
* First baby steps

* First baby steps

* No progress really

* Updates

* no progress

* refactoring

* Progress on sub menu and value selectors

* Some more tweaks

* Lots of progress

* Progress

* Updates

* Progress

* Tweaks

* Updates

* Updates to variable system

* Cleaner tests

* Update

* Some cleanup

* correct test name

* Renames and moves

* prop rename

* Fixed scene template interpolator

* More tests for SceneObjectBase and fixed issue in EventBus

* Updates

* More tweaks

* More refinements

* Fixed test

* Added test to EventBus

* Clone all scene object arrays

* Simplify

* tried to merge issue

* Update

* added more comments to interface

* temp progress

* Trying to simplify things, but struggling a bit

* Updated

* Tweaks

* Progress on fixing the select componenet and typing, and sharing code in a base class

* Updated

* Multi select

* Simpler loading state

* Update

* removed failOnConsole

* Removed old funcs

* Moved logic from update manage to MultiValueVariable

* Added tests for MultiValueVariable logic

* Made value a more abstract concept to support object values

* renamed func to getValueText

* Refactored and moved logic to VariableSet

* Added test for deactivation and query cancelling

* Tweaks

* Fixed lint issues
2022-11-09 08:02:24 +01:00
George Robinson
c646ff0ce3 Alerting: Fix screenshots were not cached (#58493) 2022-11-09 01:52:16 +00:00
Ryan McKinley
238a3f820c Store: use "at" suffix for time base fields more consistently (#58486) 2022-11-08 17:42:32 -05:00
George Robinson
ad9ac85ee0 Alerting: Use hash of opts in singleflight (#58474) 2022-11-08 22:37:49 +00:00
George Robinson
72275e97d2 Use fnv64 for InmemCacheService (#58468) 2022-11-08 22:05:15 +00:00
Sofia Papagiannaki
4d2be7a277 Nested Folders: Use recursive query if the driver supports it (#58178)
* Nested Folders: Try first recursive query and fallback if it's not supported

* Apply suggestion from code review

Fix error msgID
2022-11-08 14:53:05 -05:00
Andreas Christou
ed64133943 grafana/e2e: Update add dashboard flow (#58360)
* Update variable editor e2e flow

- Use correct selector for Variables
- Add variable query form
- Add label for variable apply button

* Use data-testid instead of aria-label

* Add jsdoc
2022-11-08 12:15:21 -05:00
Adam Simpson
3e92a2dc77 Tooltips: Make tooltips in FormField and FormLabel interactive and keyboard friendly (#57706)
* Tooltips: add tabindex and interactive

A couple tooltips used in configuration of datasources like ADX were not
clickable or didn't show on keyboard focus.

- fixes #56561
- Same solution as #47137

* test: add test around tabbing to tooltips
2022-11-08 16:55:53 +00:00
Hamas Shafiq
43a0afeac4 Tempo: Fix start time column sorting when using search (#56635) 2022-11-08 16:39:21 +00:00
Grot (@grafanabot)
512584558f Changelog: Updated changelog for 8.5.15 (#58467) 2022-11-08 16:32:41 +00:00
Laura Fernández
96d70c37bd Internationalization: Translate TimeZonePicker component (#58461) 2022-11-08 17:25:35 +01:00
Emil Tullstedt
75701695d8 pkg/web: avoid shared middleware slice (#58458) 2022-11-08 10:58:04 -05:00
Grot (@grafanabot)
2e6761b4e4 Changelog: Updated changelog for 8.5.15 (#58459) 2022-11-08 10:49:30 -05:00
Laura Fernández
d0f173665f Internationalization: Translate TimePickerContent component (#58316) 2022-11-08 16:30:03 +01:00
Dan Cech
d593aede3d properly format new .drone.yml in verify-drone (#58436) 2022-11-08 10:27:57 -05:00
Torkel Ödegaard
50a197014f Panels: Fixes crashing issue when migrating angular panels (#58232) 2022-11-08 16:26:02 +01:00
Matias Chomicki
25f79ef2b9 Loki: enable Monaco Query Editor by default (#58080)
* feat(loki-monaco-editor): update tests

* chore(loki): use unified datasource mock function in tests

* chore: enable monaco feature flag in tests

* feat(loki-monaco-editor): add test case for disabled feature

* feat(loki-monaco-editor): enable by default

* Revert "feat(loki-monaco-editor): enable by default"

This reverts commit 08904f94a707a4fa32aa1e7f3f0de377575a7636.

* feat(loki-monaco-editor): enable from registry

* feat(loki-monaco-editor): make feature flag frontend only
2022-11-08 10:22:40 -05:00
Gábor Farkas
29fcc46333 devenv:elastic: update version (#58439) 2022-11-08 15:00:23 +00:00
Laura Fernández
3790e105e5 Internationalization: Translate TimePickerFooter component (#58390) 2022-11-08 15:56:19 +01:00
Andres Martinez Gotor
42b2e630b7 GoogleCloudMonitoring: Refactor annotation code (#58417) 2022-11-08 15:41:17 +01:00
Galen Kistler
9281746914 Prometheus: remove /series endpoint calls in query builder label names and values for supported clients (#58087)
* add other filter variables to match param for label values query against filter values, in order to resolve bug in which filter value options would display that aren't relevant in the current query editor context, i.e. options would display that upon select would display no data

* expanding current unit test coverage to cover calls to new API

* interpolate the label name string instead of the match promql expression
2022-11-08 08:37:11 -06:00
Jack Westbrook
904c6f1ea9 Chore: update latest.json to 9.2.4 (#58433) 2022-11-08 09:26:32 -05:00
Ashley Harrison
831ecb467c Add new PageInfo component (#58421) 2022-11-08 14:20:05 +00:00
Joe Blubaugh
f07da85d8b Dashboards: Provide better error messages in SaveDashboardAsForm (#57866)
The existing code uses `instanceof Error` to check for a `message` field on the thrown object. The objects that are thrown are never instances of the error interface. This change introduces a new type that extends Error so that the check works properly and displays a meaningful error message in the UI.
2022-11-08 22:11:02 +08:00
Kristin Laemmert
a255c32e1a nested folders: support creation of nested folders in folder service when feature flag is set (#58364)
* nested folders: support creation of nested folders in folder service when feature flag is set
2022-11-08 08:59:55 -05:00
Grot (@grafanabot)
94573d3e61 Changelog: Updated changelog for 9.2.4 (#58429) 2022-11-08 14:58:19 +01:00
Laura Fernández
c1d677c174 Internationalization: Translate TimeRangeContent component (#58343) 2022-11-08 14:55:50 +01:00
George Robinson
aa69a8463f Revert "Alerting: Fix mathexp.NoData in ConditionsCmd (#56812)" (#58423)
This reverts commit 5fa0936b7e.
2022-11-08 13:35:58 +00:00
Levente Balogh
bfd14709c9 Levitate: Only run workflows when the NPM packages change (#58206)
* chore: only run Levitate when our NPM packages have changes

* chore: show the Levitate workflow as passed even if it was skipped
2022-11-08 14:26:31 +01:00
Julien Duchesne
f1f401147f Linux repositories: Document apt|rpm.grafana.com (#57527)
* Linux repositories: Document `apt|rpm.grafana.com`
We'll be moving off packages.grafana.com (it will be linked to the new repositories)
The new package repositories are easier to use, so let's document them instead

Question: Are the scripts in `scripts/build/update_repo` and `scripts/verify-repo-update` still used? They seem very old, and seem like the generation of scripts before grabpl was created

* Shorter RPM docs. No need to copy the same snippet twice

* Add warning about repository migration

* oops
2022-11-08 07:10:56 -05:00
Julien Duchesne
786c7faff2 Grafana Enterprise Packaging: Set to conflict with grafana, not replace (#58189)
* Grafana Enterprise Packaging: Set to conflict with `grafana`, not replace
When `grafana` and `grafana-enterprise` are in the same RPM repository, grafana-enterprise takes precedence over Grafana
This is not what we want. Users should be able to install either OSS or Enterprise

* Set it only one way. It's how it's currently tested
2022-11-08 13:08:01 +01:00
George Robinson
5fa0936b7e Alerting: Fix mathexp.NoData in ConditionsCmd (#56812)
This commit fixes an issue where mathexp.NoData would return an error
in ConditionsCmd (Classic Condition) instead of no data. It further
refactors the Execute method to make it easier to understand.
2022-11-08 11:41:57 +00:00
ying-jeanne
0e87d27e5b Support folderUID in import dashboard service (#58415)
* add folder service and get folderid

* remove storage?
2022-11-08 06:36:18 -05:00
Kristin Laemmert
ef7145e4aa feat(nested folders): Add CountAlertRulesInFolder to ngalert store (#58269)
* chore: refactor CountDashboardsInFolder to use the more efficient Count() sql function

* feat(nested folders): Add CountAlertRulesInFolder to ngalert store

This commit adds CountAlertRulesInFolder and a new model for the CountAlertRulesQuery. It returns a count of alert rules associated with a given orgID and parent folder UID. (the namespace referenced inside alert rules is the parent folder).

I'm not sure where this belongs in the ngalert service, so that will come in a future commit.
2022-11-08 11:51:00 +01:00
idafurjes
af2f51f196 Folder: Add folder service implementation (#58182)
* Folder: Add folder service implementation

* Add Move

* Add tests

* Add new servie method and adjust Update, Delete and Move

* Remove contains

* GetTree return children of depth one
2022-11-08 11:33:13 +01:00
Andreas Christou
5cfd983cc2 AzureMonitor - E2E tests drone update (#57100)
* Update e2e command with video flag

* Add Cloud Plugins E2E tests to drone

* Update env variable names

* Add vault Azure secrets

* Update e2e steps

* Update secrets path

* Update image and rebuild drone file

* Readd drone changes

* Rebuild drone

* Remake drone

* Correct reference to secret

* Remake drone file

* Remove unneeded step

* Clear values in Arg query
2022-11-08 11:27:54 +01:00
Giordano Ricci
e4c394dfcd Correlations: add tracking for add, update, delete, and details expanded (#58239)
* Correlations: add tracking for add, update, delete, and details expanded

* add tests

* change delete event

* rename handlers
2022-11-08 10:10:09 +00:00
Sofia Papagiannaki
96cdf77995 Revert "Chore: Refactor quota service (#57586)" (#58394)
This reverts commit 326ea86a57.
2022-11-08 11:52:07 +02:00
Timur Olzhabayev
228ec4c0f3 Chore: Switch Grafana to using faro libraries (#58186) 2022-11-08 10:36:27 +01:00
Shirley
82d09e0647 CloudWatch: Refactor test mock by removing GetMetricsData from FakeMetricsAPI (#58355) 2022-11-08 10:28:50 +01:00
Sofia Papagiannaki
326ea86a57 Chore: Refactor quota service (#57586)
* Chore: refactore quota service

* Apply suggestions from code review
2022-11-08 10:25:34 +02:00
Marcus Efraimsson
faa0fda6eb Prometheus: Upgrades http client to v1.13.1 (#58363) 2022-11-08 08:35:05 +01:00
Christopher Moyer
0315f6317e Docs: corrects outer join example (#58348)
* corrects outer join example

* Update docs/sources/panels-visualizations/query-transform-data/transform-data/index.md

* adds query tables back in
2022-11-07 13:40:09 -06:00
ismail simsek
93c1fbbe3f Remove data comparison tool and feature flag (#58196) 2022-11-07 19:20:00 +01:00
Eric Leijonmarck
76947b10e2 Auth: conflicting users validation improvements (#58136)
* WIP

* add: better validation of conflict file

* add: better description of validation and ingest command

* add: check for at least one user to delete

* add: example in terraform to setup for conflicts

* Update pkg/cmd/grafana-cli/commands/conflict_user_command.go

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

* Add: print of conflict block for error

- adds conflict block to error output for validation of the file to
  easier diagnose in the file

* fix: formatting of errors

* fix: info strings improvements

* add: default 0 to blocks to check for users

* fixed: tests

* test integration

* fix strings fmt

* set store in resolver

Co-authored-by: Ieva <ieva.vasiljeva@grafana.com>
2022-11-07 18:12:17 +00:00
Gareth Dawson
2027f4702c Loki: Add case insensitive line contains operation (#58177)
* add line-contains-case-insensitive operation definition

* add loki operation id for line-contains-case-insensitive

* make query case-insensitive when using line filter

* remove console log from operationUtils.ts

* add line-does-not-contain-case-insensitive operation definition

* add loki operation id for line-does-not-contain-case-insensitive

* make query case insensitive when using line-does-not-contain-case-insensitive

* update title and min-width for line-contains-case-insensitive

* add caseInsensitive optional parameter

* toggle case insensitive on operations

* remove console log

* update operation names

* add test coverage

* update to implement suggestions

* add suggestion
2022-11-07 17:01:06 +00:00
Andres Martinez Gotor
0a8fdc4550 GoogleCloudMonitoring: Remove unused code (#58347) 2022-11-07 17:51:49 +01:00
Matias Chomicki
17cce38545 Loki Monaco Editor: implement extracted label keys (#57368)
* feat(loki-monaco-editor): implement extracted label keys

* Chore: add missing responseUtils tests

* feat(loki-monaco-editor): suggest extracted labels

* Chore: fix test case name

* feat(loki-monaco-editor): dont suggest labels in logs query

* Chore: remove console log

* Chore: remove extracted keyword from suggested label

* feat(loki-monaco-editor): do not suggest duplicated labels

* refactor(loki-monaco-editor): pass query and offset to the completions resolver

* Revert "refactor(loki-monaco-editor): pass query and offset to the completions resolver"

This reverts commit d39464fd1a4624d5cd5420156dd2d1e2dad2eecf.

* refactor(loki-monaco-editor): refactor label completions for grouping

* Chore: remove obsolete function
2022-11-07 11:45:07 -05:00
George Robinson
8353f307aa Alerting: Fix test fails in some environments (#58251) 2022-11-07 16:34:37 +00:00
Ben Sully
480277f612 CallResource: don't set Content-Type header if status is 204 (#50780)
Grafana's HTTPServer ensures that the Content-Type header is always set
in the response to a CallResource call, but when the status code is
204 No Content this shouldn't be done; the body should be empty and no
Content-Type header should be set.

We ran into this in the Grafana ML plugin where we were sending an empty
response with status 204, but the frontend client saw that the content
type was JSON and tried to parse it, resulting in an error that made it
to the JS console.
2022-11-07 17:25:49 +01:00
Giordano Ricci
43436bd6f0 Explore: Remove explore2Dashboard feature toggle (#58329) 2022-11-07 16:06:40 +00:00
Zoltán Bedi
b472306239 MSSql/Postgres: Fix visual query editor filter disappearing (#58248) 2022-11-07 17:04:53 +01:00
Yuri Tseretyan
3621cf5a12 Alerting: Update handling of stale state (#58276)
* delete all stale states in one lock
* do not use touched states to detect stale rely only on LastEvaluationTime maintained correctly
* fix tests to use correct eval time
* delete unused method
2022-11-07 11:03:53 -05:00
Neel
db1fd10ff1 Alerting: Append org ID to alert notification URLs (#57123) 2022-11-07 16:03:25 +00:00
Si Mon
bc280d0749 Datasource Loki: preserve header X-ID-Token (#57878) 2022-11-07 16:53:42 +01:00
Emil Tullstedt
89eba7a108 Server: Write internal server error on missing write (#57813) 2022-11-07 16:14:41 +01:00
Galen Kistler
6bc8ec0f9b fix thanos semver string (#58335) 2022-11-07 09:03:42 -06:00
Emil Tullstedt
1ba25b2baa Preferences: Create indices (#48356) 2022-11-07 15:52:26 +01:00
Yuri Tseretyan
623de12e35 Alerting: Create AlertInstanceKey in one place (#58278)
* use method GetAlertInstanceKey
* do not add key if error
2022-11-07 09:35:29 -05:00
Torkel Ödegaard
1fb37b54b3 Scenes: Enforce explicit accessibility modifiers (ESLint) (#58331)
* Public test

* Update

* Update

* revert

* Added some public accessability modifiers

* Force public acessability only for scenes/* folder

* Fixes
2022-11-07 15:32:02 +01:00
Levente Balogh
eb3ee35e1c Frontend Routing: Always render standalone plugin pages using the <AppRootPage> (#57771)
* chore: fix go lint issues

* feat(Routing): route standalone plugin pages to the `AppRoutePage`

* feat(plugin.json): introduce a new field called `isCorePage` for `includes`

* chore: add explanatory comments for types

* refactor(AppRootPage): receive the `pluginId` and `pluginSection` through the props

Now we are able to receive these as props as the pluginId is defined on navLinks
that are registered by plugins.

* chore: update teests for AppRootPage

* fix: remove rebase issue

* tests(applinks): add a test for checking isCorePage plugin page setting

* refactor(applinks): update tests to use FindById() and be more resilient to changes

* fix: Go lint issues

* refactor(routes): use cleaner types when working with plugin nav nodes

Co-authored-by: Marcus Andersson <marcus.andersson@grafana.com>

* chore: fix linting issues

* t: remove `isCorePage` field from includes

Co-authored-by: Marcus Andersson <marcus.andersson@grafana.com>
2022-11-07 15:19:31 +01:00
Yuri Tseretyan
f9c88e72ae Alerting: Update saveAlertStates in state manager to not return results (#58279) 2022-11-07 09:09:19 -05:00
Laura Fernández
e5d4d00c1f Internationalization: Translate CalendarFooter component (#58326) 2022-11-07 14:42:20 +01:00
Virginia Cepeda
97df6e682e [Alerting] - make rule groups the default view (#58271) 2022-11-07 09:44:20 -03:00
Conor Evans
40ba2ba18d fix(config/jwt): the value should be "expect_claims", not "expected_claims" (#58284)
Signed-off-by: Conor Evans <coevans@tcd.ie>
2022-11-07 12:29:27 +00:00
Josh Hunt
d4e3d47f56 Chore: Disable dashboard-time-zone e2e tests (#58320) 2022-11-07 06:37:47 -05:00
Gábor Farkas
6dd5ce7ab0 Tracing: Allow trace to logs for OpenSearch (#58161)
* tracing: allow trace-to-opensearch functionality

* more consistent naming
2022-11-07 12:24:01 +01:00
Andres Martinez Gotor
d001a1b035 @grafana/e2e: Fix addPanel for small screen size (#57398) 2022-11-07 12:10:30 +01:00
Jo
2ce5dcfb91 ServiceAccounts: Add background service to check for token leaks (#53658)
* add secret scan service

* add token batching

* Apply suggestions from code review

Co-authored-by: Victor Cinaglia <victor@grafana.com>

* fix: finish constant renaming

Co-authored-by: Victor Cinaglia <victor@grafana.com>
2022-11-07 05:46:19 -05:00
Giuseppe Crinò
b40f192c7e chore(docs): clarify how to refer to GH teams (#57679) 2022-11-07 11:39:59 +01:00
Gabriel MABILLE
30fae33f66 RBAC: Allow role registration for plugins (#57387)
* Picking role registration from OnCall POC branch

* Fix test

* Remove include actions from this PR

* Removing unused permission

* Adding test to DeclarePluginRoles

* Add testcase to RegisterFixed role

* Additional test case

* Adding tests to validate plugins roles

* Add test to plugin loader

* Nit.

* Scuemata validation

* Changing the design to decouple accesscontrol from plugin management

Co-authored-by: Kalle Persson <kalle.persson@grafana.com>

* Fixing tests

Co-authored-by: Jguer <joao.guerreiro@grafana.com>

* Add missing files

Co-authored-by: Jguer <joao.guerreiro@grafana.com>

* Remove feature toggle check from loader

* Remove feature toggleimport

* Feedback

Co-Authored-By: marefr <marcus.efraimsson@gmail.com>

* Fix test'

* Make plugins.RoleRegistry interface typed

* Remove comment question

* No need for json tags anymore

* Nit. log

* Adding the schema validation

* Remove group to take plugin Name instead

* Revert sqlstore -> db

* Nit.

* Nit. on tests

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

* Update pkg/services/accesscontrol/plugins.go

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

* Log message

Co-Authored-By: marefr <marcus.efraimsson@gmail.com>

* Log message

Co-Authored-By: marefr <marcus.efraimsson@gmail.com>

* Remove unecessary method. Update test name.

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

* Fix linting

* Update cue descriptions

* Fix test

Co-authored-by: Kalle Persson <kalle.persson@grafana.com>
Co-authored-by: Jguer <joao.guerreiro@grafana.com>
Co-authored-by: marefr <marcus.efraimsson@gmail.com>
Co-authored-by: ievaVasiljeva <ieva.vasiljeva@grafana.com>
2022-11-07 11:30:45 +01:00
Ashley Harrison
334b498632 group d3 updates together (#58309) 2022-11-07 10:30:23 +00:00
Will Browne
09e8cff06e Plugins: Make "README" the default markdown request param (#58264)
* Plugins: Make README the default markdown request param

* undo devdboard changes

* fix missing prefix

* rm newline

* re-add space UFFFFF
2022-11-07 11:16:17 +01:00
Oscar Kilhed
b1bfae0350 MySQL: make it possible to add CA cert without using tlsAuth (#58226) 2022-11-07 09:38:42 +01:00
Victor Marin
d673c8809b Timeseries: Fix null pointer when matching fill below to field (#58030)
* Fix timeseries fill below to error

* wip

* modifications

* add tests for fillBelowTo option
2022-11-06 16:19:50 +02:00
Dimitris Sotirakis
bdb8fe3b02 Update drone-cli go mod to v1.6.1 (#58245) 2022-11-05 09:52:21 +02:00
Ryan McKinley
bff19747bd Timeseries: Use standard editor for fillBelowTo field picker (#58283) 2022-11-04 22:00:46 -07:00
Ryan McKinley
a83fdc6b87 Live: remove json exact converter (#58282) 2022-11-04 18:33:02 -04:00
Ryan McKinley
eb1cc80941 Storage: include SQL implementation (#58018) 2022-11-04 17:30:22 -04:00
Yuri Tseretyan
978f1119d7 Alerting: Run state manager as regular sub-service (#58246) 2022-11-04 17:06:47 -04:00
Ryan McKinley
e6a9fa1cf9 ServiceAccounts: enable service accounts after IsRealUser change (#58263)
* suppor service accounts

* add: IsServiceAccount to scheduleUser in scheduler

Co-authored-by: eleijonmarck <eric.leijonmarck@gmail.com>
2022-11-04 15:53:35 -04:00
Todd Treece
d80abd173b Chore: Sort generated jsonnet dashboards by full path (#58267) 2022-11-04 15:14:56 -04:00
Yuri Tseretyan
dce8879145 Alerting: Update state manager to accept rule store as Warm method argument (#58244) 2022-11-04 14:23:08 -04:00
juanicabanas
8f6cdd4cda PublicDashboards: Add delete public dashboard button in public dashboard modal (#58095)
- Delete public dashboard button added in public dashboard modal
- Delete public dashboard button refactored in order to be used in audit table and public dashboard modal
- Tests added
- RTK Query api modified, in order to keep cached data because of having to show public dashboard modal once delete modal is closed.
- RTK Query specific cached data invalidated for public dashboard
- Save button text changed: Create public dashboard when it was never created. Save public dashboard when there's a public dashboard already created
- Public Dashboard modal subscribed to DashboardModel metadata changes
2022-11-04 14:08:50 -04:00
Ezequiel Victorero
ae30a0688a PublicDashboards: refactor using new grafana error types (#58078) 2022-11-04 14:14:32 -03:00
renovate[bot]
5f5b3521d9 Update dependency rollup-plugin-dts to v5 (#58258)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-11-04 17:04:00 +00:00
renovate[bot]
85d15b6292 Update dependency uuid to v9 (#58260)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-11-04 16:54:12 +00:00
renovate[bot]
10ee9f129d Update dependency rollup-plugin-node-externals to v5 (#58259)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-11-04 16:52:15 +00:00
Ashley Harrison
ca3bcc691c hide sectionnav items when collapsed, ensure focus ring overlays active items (#58250) 2022-11-04 16:42:34 +00:00
Ryan McKinley
22628d1f7e Storage: fix failing test (set IsServiceAccount=true) (#58257) 2022-11-04 12:37:25 -04:00
Will Jordan
d581b368bd Alerting: Remove duplicate Slack notification title (#58107)
Move mentions to a markdown-formatted pretext field
to prevent issues mixing blocks and legacy-attachment content.
2022-11-04 17:09:24 +01:00
Torkel Ödegaard
4d2bf41efb AppChrome: Fixes kiosk mode toggling (#58240) 2022-11-04 16:49:31 +01:00
Alexander Weaver
cc8c1380e2 Alerting: Persist annotations from multidimensional rules in batches (#56575)
* Reduce piecemeal state fields

* Read data directly off state instead of rule

* Unify state and context into single struct

* Expose contextual information to layer above setNextState

* Work in terms of ContextualState and call historian in batches

* Call annotations service in batches

* Export format state and reason and remove workaround in unrelated test package

* Add new method to annotation service for batch inserting

* Fix loop variable aliasing bug caught by linter, didn't change behavior

* Incl timerange on annotation tests

* Insert one at a time if tags are present

* Point to rule from ContextualState rather than copy fields

* Build annotations and copy data prior to starting goroutine

* Rename to StateTransition

* Use new bulk-insert utility

* Remove rule from StateTransition and pass in directly to historian

* Simplify annotations logic since we have only one rule

* Fix logs and context, nilcheck, simplify method name

* Regenerate mock
2022-11-04 10:39:26 -05:00
renovate[bot]
c1ea944c79 Update dependency @types/node to v18 (#58139)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-11-04 15:28:47 +00:00
Gareth Dawson
4749f45fe8 Loki: Replace hardcoded css values (#57770)
* replace hardcoded margin/padding in getLogRowStyles.ts

* replace hardcoded margin/padding in LogDetails.tsx

* replace hardcoded values in LogDetailsRow.tsx

* replace hardcoded values in LogLabels.tsx

* replace hardcoded values in LogLabelStats.tsx

* replace hardcoded values in LogLabelStatsRow.tsx

* replace hardcoded values in LogRowContext.tsx

* replace hardcoded values in LogRowMessage.tsx

* replace hardcoded values

* remove forced theme spacing values
2022-11-04 15:18:55 +00:00
Giordano Ricci
4758bbcb61 Explore: don't re-init the Graph on every data change (#57906)
* Perf: remove structureRev logic from Graph in Explore

* Avoid reinitializing uPlot when not needed

* move fieldConfigRegistry

* restore usememo for dataWithConfig
2022-11-04 15:05:06 +00:00
renovate[bot]
7078871ab6 Update dependency react-i18next to v12 (#58238)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-11-04 14:45:20 +00:00
Dan Cech
da9c646f24 Build: add explicit build step for go codeql (#58195)
* add explicit build step for go codeql

* support workflow_dispatch for codeql checks

* syntax fix

* enable on push to codeql-go branch

* test

* use go version from go.mod

* explicitly set go version

* tidy up, add workflow_dispatch support to all codeql actions
2022-11-04 10:20:08 -04:00
Dan Cech
9ea6a43089 Build: clean up and document integration test convention (#58170)
* clean up and document integration test convention

* clarify integration test conventions

* clean up integration tests that don't follow convention

* mark testIntegration* functions as helpers to avoid confusion
2022-11-04 10:14:21 -04:00
Emil Tullstedt
428dd54094 Chore: Upgrade Go to 1.19.3 (#58052) 2022-11-04 14:50:43 +01:00
renovate[bot]
a6f302648b Update dependency @wojtekmaj/enzyme-adapter-react-17 to v0.7.0 (#58233)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-11-04 13:49:09 +00:00
renovate[bot]
9b8e3b9619 Update dependency jest-fail-on-console to v3 (#58219)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-11-04 13:39:51 +00:00
Yuriy Tseretyan
ff5cc3e640 Chore: Update cloud monitoring and Azure data sources to support contextual logs (#57844)
* update cloud monitoring to use log from context
* update azure monitor to use contextual logger
2022-11-04 09:28:38 -04:00
Eric Leijonmarck
72d0c6b428 Auth: add IsServiceAccount to IsRealUser (#58015)
* add: IsServiceAccount to SignedInUser and IsRealUser

* fix: linting error

* refactor: add function IsServiceAccountUser()

By adding the function IsServiceAccountUser() we use it to identify for
ServiceAccounts in the HasUniqueID() since caching is built up on having
a uniqueID, see comment: https://github.com/grafana/grafana/pull/58015#discussion_r1011361880
2022-11-04 12:39:54 +00:00
Laura Fernández
b7efd46e2d Internationalization: Translate TimeRangeList component (#58131) 2022-11-04 12:21:46 +01:00
Dimitris Sotirakis
9c1c10ab9a Remove base and arch args (#58209) 2022-11-04 13:21:18 +02:00
Josh Hunt
9ff2765bb9 Auth: Check for OrgUsersAdd on frontend to display pending invites (#58217) 2022-11-04 11:14:59 +00:00
Gilles De Mey
e410dfbab8 Alerting: Encode path separators to side-step proxies (#58141) 2022-11-04 06:58:17 -04:00
Andreas Christou
7bb76e0975 Azure Monitor: E2E Tests (#54619)
* Update credentials form with data-testids and aria-labels

* Update gitignore

* Add example dashboard

* Stub out E2E test for creating ds and importing dashboard

* Add component selectors

* Remove subscription check temporarily

* Appropriately set disabled prop

* Fix lint issues

* Update to use selectors and wait on subscriptions request

* Add test for metrics panel

- Add required selectors for resource picker and metrics query editor

* Add logs and ARG basic query scenarios

- More selector updates

* Add E2E test for template variables

- Tests advanced resource picker
- Adds required selectors

* Remove log and add annotation e2e test

* Update test

* Prettier/betterer updates

- Remove gitignore change

* Lint issues

* Update betterer results

* Lint issue and remove unneeded import

* Don't print certain commands

* Avoiding flakiness

- Ensure code editor has sufficient time to load in ARG test
- Avoid flakiness around correct template variable being selected by typing in resource name

* Remove be.visible requirement

* Update test

* Update selector name

* Reuse datasource

* Fix datasource reuse and combine query tests

* Remove import dashboard step as unneeded

* Review

- Randomise datasource name
- Skip annotations test
- Remove unused example dashboard

* Update to ensure e2e test works in CI

* Update e2e test

- Update environment variables (process is not available in cypress)
- Add wait on resource picker searches to avoid flakiness
- Update subscription and resource group names

* Update CODEOWNERS

* Parse credentials in CI from outputs file

* Update outputs file path

* Fix selector

* Undo selector change

* Update e2e tests

- Set default subscription
- Fix datasource selection in variable editor
- Fix resource picker search flakiness
- Set subscription in ARG query test
- Fix resource group selection
- Update resource group

* Review

* Review 2
2022-11-04 10:47:54 +00:00
renovate[bot]
aa9039a841 Update dependency i18next to v22 (#58156)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-11-04 10:46:19 +00:00
renovate[bot]
1e7d9c6360 Update dependency sass to v1.56.0 (#58207)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-11-04 10:44:00 +00:00
renovate[bot]
3f38c95377 Update dependency @types/k6 to v0.41.0 (#58165)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-11-04 10:42:45 +00:00
Jo
e3ea7ee145 Doc: Add groups mapping config to readme (#58208) 2022-11-04 10:43:38 +01:00
renovate[bot]
17f7cbf0f6 Update dependency babel-loader to v9.1.0 (#58155)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-11-04 09:20:27 +00:00
Ashley Harrison
871d98e550 hopefully improve slate test reliability (#58171) 2022-11-04 09:20:03 +00:00
Sofia Papagiannaki
d131733f55 Nested Folder: Modify store Update() (#58183)
* Nested Folder: Modify store Update()

* fixup
2022-11-04 10:04:24 +01:00
Ryan McKinley
3dfa49b376 Playlist: cleanup object store implementation (#58201) 2022-11-03 16:35:20 -07:00
Levente Balogh
376f4b0cc7 Navigation: Add pluginId to standalone plugin page NavLinks (#57769)
* feat(Navigation): add `pluginId` to NavLink and override sibling navlinks with the same URL

* test replacing page from plugin

* chore: fix go lint issues

* fix(NavLink): change `PluginId` to `PluginID`

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

* fix(NavLink): make the `PluginId` -> `PluginID` change everywhere

* chore(navModel.ts): update explanatory comment for `pluginId`

Co-authored-by: Miklós Tolnai <miklos.tolnai@grafana.com>
Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
2022-11-03 21:19:42 +01:00
Jeff Levin
6fcc5b42c0 publicdashboards: split create/update api paths (#57940)
This PR splits the create and update paths for public dashboards and includes assorted refactors toward a proper REST API. Additionally, we removed the concept of a "public dashboard config" in favor of "public dashboard" 

Co-authored-by: juanicabanas <juan.cabanas@grafana.com>
Co-authored-by: Ezequiel Victorero <ezequiel.victorero@grafana.com>
2022-11-03 11:30:12 -08:00
ismail simsek
0367f61bb3 Share azureauth between prometheus clients (#58122)
* Move azureauth to upper package

* Refactor http transport options
2022-11-03 19:44:37 +01:00
Christopher Moyer
1722000309 fixes typo (#58159) 2022-11-03 13:42:23 -05:00
kay delaney
a8c181bf6a Chore: Migrate usage of v1 theme to v2 (#58154) 2022-11-03 18:15:55 +00:00
lean.dev
c1b10e4f0c Docs: Adding documentation for custom branding on public dashboards (#58090)
Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
2022-11-03 14:58:43 -03:00
Timur Olzhabayev
de7f411e20 Removing workflow_call from update-changelog and bump-version action (#58181) 2022-11-03 17:47:04 +00:00
Giuseppe Guerra
7996a1c8ad Chore: Update grafana-plugin-sdk-go to v0.142.0 (#58115)
* Chore: Update grafana-plugin-sdk-go to v0.142.0

* Update tests and golden files for 207 status code

* Chore: Move update flag definition at the top in response_parser_test.go

* retrigger

Co-authored-by: Will Browne <will.browne@grafana.com>
2022-11-03 18:34:27 +01:00
Ryan McKinley
857e545c5a FeatureFlags: set defaults in the registry rather than the ini file (#58106) 2022-11-03 17:34:01 +00:00
Adela Almasan
9c7b6b1ce8 Canvas: Extend root context menu (#58097) 2022-11-03 17:30:12 +00:00
dessen-xu
b799be3052 Toolkit: Fix Webpack less-loader config (#57950) 2022-11-03 16:13:18 +01:00
Todd Treece
e105b5a107 Chore: Add jsonnet library for devenv dashboards (#57928) 2022-11-03 11:04:39 -04:00
Laura Fernández
813ebf988d Internationalization: Translate TimePickerTitle component (#57909) 2022-11-03 16:03:28 +01:00
Kyle Cunningham
05f630a566 Add VSCode launch configuration to debug in remote Chrome (#58108) 2022-11-03 21:08:38 +07:00
Sven Grossmann
4b1ddba0a8 fixed explain handlers for label- and lineformat (#58135) 2022-11-03 14:57:29 +01:00
kay delaney
f37e53f060 Chore: Migrate more theme v1 usage to v2 (#58121) 2022-11-03 09:54:18 -04:00
Ashley Harrison
c1c8dc8749 remove e2e-api-tests + axios dependency (#58148) 2022-11-03 13:52:58 +00:00
renovate[bot]
0792ff8e20 Update dependency eslint-plugin-jest to v27 (#58143)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-11-03 13:37:00 +00:00
Leon Sorokin
4d88e2b542 TimeSeries: more thorough detection of negative values for stacking dir (#57863) 2022-11-03 07:24:01 -06:00
Marcos Vinicius
372ba83534 reduce the number of requests in folder section (#55876) 2022-11-03 13:22:07 +00:00
Sofia Papagiannaki
5c973e58bd Nested Folders: Add tests for store methods (#57662)
* Nested Folders: Add store tests

* Fix parent order

* Fix update

* skip tests!

* Export test helpers for now
2022-11-03 14:21:41 +01:00
renovate[bot]
89548df5a4 Update dependency @types/ol-ext to v3 (#58140)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-11-03 13:18:47 +00:00
lean.dev
49e36c5c05 Public Dashboards: Renaming PubdashFooter (#58137) 2022-11-03 10:12:27 -03:00
Todd Treece
d45fe6e25c Chore: Add NewAnonymousSignedInUser to user service (#57537) 2022-11-03 14:03:29 +01:00
Beto Muniz
8fe02612b6 Graphite: Allow metric name to use true/false as name (#57996) 2022-11-03 09:34:34 -03:00
Sonia Aguilar
c8f87f4413 Alerting: Improving group modal with validation on evaluation interval (#57830)
* Show rules list for the group with the For duration, and add validation for keeping all rules in the same group with a valid For

* Sort rules by For duration

* Add number evaluations column in alert list

* Add Error badge in column #evaluations in case of invalid For

* Add test for getNumberEvaluationsToStartAlerting method

* Move re-usable new InfoIcon component into a separate file in unified components folder

* Add edge case for getNumberEvaluationsToStartAlerting method, and change some namings
2022-11-03 12:50:32 +01:00
renovate[bot]
15b553c11c Update dependency @rollup/plugin-node-resolve to v15 (#58130)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-11-03 11:43:28 +00:00
renovate[bot]
2095bbcfa7 Update dependency react-select to v5.6.0 (#58127)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-11-03 11:32:46 +00:00
renovate[bot]
5b86474733 Update dependency eslint-plugin-jsdoc to v39.6.2 (#58126)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-11-03 11:29:25 +00:00
renovate[bot]
ed31f0fe20 Update dependency @rollup/plugin-json to v5 (#58083)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-11-03 11:17:52 +00:00
Joey Tawadrous
130f848f74 Flame Graph: Add units and value to blocks (#57959)
* Added unit to block label

* Tests

* Throw if value field is undefined
2022-11-03 11:15:42 +00:00
Villena Guillaume
e9dc7fb85c Rendering: Add configuration options for renderKey lifetime (#57339)
* Add configuration options for `renderKey` lifetime

* Rename config key to `render_key_lifetime`

* Update conf/defaults.ini

Co-authored-by: Joan López de la Franca Beltran <5459617+joanlopez@users.noreply.github.com>

* Add `render_key_lifetime` to sample.ini

Co-authored-by: Joan López de la Franca Beltran <5459617+joanlopez@users.noreply.github.com>
2022-11-03 12:06:55 +01:00
Andre Pereira
90ac300d10 Tempo: Make usage of time range for TraceID query optional (#58057)
* Added switch to toggle the TraceID query time shift

* Fix and improve tests
2022-11-03 11:01:22 +00:00
renovate[bot]
0071b949e1 Update typescript-eslint monorepo to v5.42.0 (#58073)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-11-03 07:00:00 -04:00
renovate[bot]
cf5f88ca47 Update dependency @rollup/plugin-commonjs to v23 (#58075)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-11-03 06:56:11 -04:00
Ashley Harrison
514d3111f4 Accessibility: Enable rule jsx-a11y/no-noninteractive-element-interactions (#58077)
* fixes for no-noninteractive-element-interactions

* remaining fixes

* add type="button"

* fix unit tests
2022-11-03 10:55:58 +00:00
renovate[bot]
65bd5c65d8 Update emotion monorepo (#58066)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-11-03 10:49:50 +00:00
Ashley Harrison
c3206167a6 increase select placeholder contrast to be WCAG AA compliant (#58034) 2022-11-03 10:45:57 +00:00
Ashley Harrison
f76ba90078 Accessibility: Enable jsx-a11y/mouse-events-have-key-events (#58050)
* implement VizLegend keyboard accessibility

* add onBlur/onFocus
2022-11-03 10:22:50 +00:00
Giordano Ricci
e6b088fbf5 Explore: Fix shared crosshair for logs, logsvolume and graph panels (#57892)
* Explore: enable shared corsshair for logs, logsvolume & graph panel

* avoid recreating a scoped bus on every render
2022-11-03 09:55:02 +00:00
Alex Moreno
3558cadb7e Alerting: Add title and description to Webhook contact point (#58058)
* Add title and description to Webhook contact point

* Remove deprecation message
2022-11-03 10:52:07 +01:00
Alexander Komarov
76532c1f27 Fix an indentation issue in example config in doc (#57814)
Fix this issue:
"Error loading config (--config.file=/etc/prometheus/prometheus.yml)" file=/etc/prometheus/prometheus.yml err="parsing YAML file /etc/prometheus/prometheus.yml: yaml: line 8: did not find expected '-' indicator"
2022-11-03 10:44:14 +01:00
Alex Moreno
ba15d675e7 Alerting: Add values to annotations (#57738)
* Add values to annotations

* Fix imports

* Use State attrs instead of Result attrs

* Remove unnecessary variable
2022-11-03 10:35:34 +01:00
Ashley Harrison
b8303fd431 Chore: Convert SpanTreeOffset test to RTL (#56195)
* convert SpanTreeOffset tests to RTL (minus mouseenter/mouseleave tests)

* fix remaining tests
2022-11-03 09:31:09 +00:00
Eric Leijonmarck
fc1b647474 Auth: Add fixed repeat migration w. checks for subset of permissions (#58054)
* add: added a repeat migration w. fixed checks for permissions

* add: migration to migrations

* refactor: fix migration instead of making a new one

* fix: removed the old id

* fix: keep old name but change id

* add: migration for patched previous migration

* add: migration from missing file
2022-11-03 08:57:20 +00:00
Ivana Huckova
a83dee6031 Elasticsearch: Add trace to logs functionality (#58063)
* Elasticsearch: Implement trace to logs

* Fix tests
2022-11-03 09:52:40 +01:00
Jo
eb84358aa7 Auth: Validate Azure ID token version on login is not v1 (#58088) 2022-11-03 09:47:44 +01:00
Ivana Huckova
77f47ccba3 Loki: Remove redundant feature flag in defaults.ini (#58084) 2022-11-03 09:40:13 +01:00
Torkel Ödegaard
915ebcf832 Search: Refactor state and logic to be less fragmented and spread out (#57973)
* Started search state refactor

* Things are working

* Move more to statemanger

* minor tweaks

* Fixed name of hook

* revert yarn.lock changes

* Harderning StateManagerBase

* More tests and refinements

* Fixed unit test

* More polish

* fixing tests

* fixed test

* Fixed test
2022-11-03 08:29:39 +01:00
Drew Slobodnjak
94d9baa9ff Geomap: Add photo layer (#57307)
* Geomap: Add photo layer

* Remove unrelated changes

* Add todos for follow up

* Geomap: simplify photos layer (#57320)

* photos layer

* Remove unused import

Co-authored-by: drew08t <drew08@gmail.com>

* Add field selector for image source

* Add radius slider

* Fix rendering issue

* Only update vector layer after image load

* Add border color selection

* Update question mark source

* Add gdev dashboard for photo layer

* Add panel title to gdev dashboard

* Add photo validation

* Update geomap gdev dashboard to remove null value for threshold

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
Co-authored-by: nmarrs <nathanielmarrs@gmail.com>
2022-11-02 16:50:59 -07:00
George Robinson
f2e4cb7c4e Alerting: Fix feedback (#57922) 2022-11-02 22:36:14 +00:00
George Robinson
215ffee437 Alerting: Fix screenshot is not taken for stale series (#57982) 2022-11-02 22:14:22 +00:00
brendamuir
f1b6660b54 Docs: fixes alias (#58060)
* Docs: fixes alias

* adds file ext
2022-11-02 17:00:26 -04:00
owensmallwood
7de093738d PublicDashboards: Adds command to generate map of supported datasources (#57841)
generates map of supported datasources for pubdash
2022-11-02 13:35:57 -06:00
Dimitris Sotirakis
7a12132237 DEB/RPM Packages: Remove old package publishing steps (#58071)
* Remove old publish package steps

* Don't ignore publish packaging failures
2022-11-02 18:42:01 +00:00
Andrej Ocenas
9e03355e53 Flamegraph: Add self to tooltip (#57548)
* Add self to tooltip

* Fix tests

* Update layout

* Fixed too much space on the bottom
2022-11-02 19:07:11 +01:00
lean.dev
d5a92e8f42 Public Dashboards: Extracting config of Public Dashboard (#57788)
Co-authored-by: juanicabanas <juan.cabanas@grafana.com>
2022-11-02 14:32:29 -03:00
renovate[bot]
7954ac3948 Update dependency webpack-bundle-analyzer to v4.7.0 (#58055)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-11-02 16:17:28 +00:00
Marcus Andersson
b804b2f073 Plugins: Added hook to make it easier to track interactions in plugins (#56126)
* first stab at context away plugin tracking.

* adding a plugin context and a hook to get hold of a tracker that always appends the plugin context information.

* wip

* improved the code a bit.

* wip

* Fixed type errors.

* added datasource_uid to data sources.

* fixed error message when trying to use hook outside of context.

* small refactoring according to feedback.

* using the correct provider for data source context.

* check not needed.

* enforcing the interaction name to start with grafana_plugin_

* exposing guards for the other context type.

* added structure for writing reporter hook tests.

* added some more tests.

* added tests.

* reverted back to inheritance between context types.

* adding mock for getDataSourceSrv
2022-11-02 16:57:57 +01:00
Leo
932429a545 LibraryPanels: Replace folderID with folderUID (#56414)
* user essentials mob! 🔱

lastFile:pkg/services/libraryelements/writers.go

* user essentials mob! 🔱

lastFile:pkg/services/libraryelements/writers.go

* user essentials mob! 🔱

lastFile:pkg/services/libraryelements/writers.go

* user essentials mob! 🔱

lastFile:pkg/services/libraryelements/writers.go

* user essentials mob! 🔱

lastFile:pkg/services/libraryelements/database.go

* user essentials mob! 🔱

lastFile:pkg/services/libraryelements/writers.go

* user essentials mob! 🔱

lastFile:pkg/services/libraryelements/writers.go

* user essentials mob! 🔱

* support filterFolderUIDs in the frontend

* move common logic to a variable

* fixed FolderLibraryPanelsPage and improved unit test

* fix backend lint error

* fix formatting error

Co-authored-by: Joao Silva <joao.silva@grafana.com>
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
Co-authored-by: eledobleefe <laura.fernandez@grafana.com>
Co-authored-by: joshhunt <josh@trtr.co>
2022-11-02 16:49:02 +01:00
Kristina
5a99aff7b8 construct the datasource for the example query if not added (#57936) 2022-11-02 09:50:10 -05:00
Yuriy Tseretyan
3a5ddbfbdf use logger context in cloudwatch (#57842) 2022-11-02 10:14:02 -04:00
Yuriy Tseretyan
e3a4bde622 Alerting: Condition evaluator with cached pipeline (#57479)
* create rule evaluator
* load header from the context
* init one factory
* update scheduler
2022-11-02 10:13:39 -04:00
Yuriy Tseretyan
d9c40ca41e Chore: Update sqleng, elasticsearch, tempo and opentsdb plugins to support contextual logs. (#57777)
* make sql engine use pick log context for logs
* update tempo to get log context
* update opentsdb to use log context
* update es client to use log context
2022-11-02 10:03:50 -04:00
renovate[bot]
17ebeab02c Update dependency webpack-dev-server to v4.11.1 (#58056)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-11-02 13:56:56 +00:00
Carl Bergquist
06705a49e2 Instrumentation: Log plugin and datasource info for each plugin request. (#54769)
Signed-off-by: bergquist <carl.bergquist@gmail.com>
2022-11-02 14:51:51 +01:00
Simon Podlipsky
d32a9a62b5 Docker: Remove Edge repos (#53875)
Co-authored-by: Leonard Gram <leo@xlson.com>
2022-11-02 09:44:39 -04:00
Gábor Farkas
ce13ab7077 renovate: group @types/slate* with slate* (#58053) 2022-11-02 13:42:53 +00:00
Dan Cech
6a4a10fa92 remove unneeded package updates (#58005) 2022-11-02 09:30:20 -04:00
Emil Tullstedt
d0dfb28ee4 Security: Upgrade x/text to version unaffected by CVE-2022-32149 (#57797) (#57803)
Co-authored-by: emerson_gong <yong-jie.gong@microfocus.com>
2022-11-02 14:28:43 +01:00
renovate[bot]
78bef1c7e1 Update dependency eslint-plugin-jsdoc to v39.5.0 (#58039)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-11-02 13:22:54 +00:00
Kristin Laemmert
706b301285 feat(nested folders): add CountDashboardsInFolder (#57847)
* feat(nested folders): add CountDashboardsInFolder

This commit adds a new method to the Dashboard service and stores: CountDashboardsInFolder. The command struct takes a folderUID, but the store implementation still depends on the parent folder ID. This is temporary; eventually we will replace all references to FolderIDs (associated with Dashboards) with folder UIDs.

There are some unfortunate additional test changes that were necessary after generating the service & store mocks; it looks like that hasn't been generated since the last change(s).

* more test updates
* don't forget the service test
* that didn't end up used, so bye for now
* agree to disagree with the linter
2022-11-02 09:15:50 -04:00
renovate[bot]
409ed84136 Update dependency stylelint to v14.14.0 (#58051)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-11-02 09:02:41 -04:00
renovate[bot]
09d91d1f53 Update dependency react-select to v5.5.9 (#58012)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-11-02 12:35:24 +00:00
renovate[bot]
a18ee16dd9 Update dependency sass-loader to v13.1.0 (#58047)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-11-02 12:28:28 +00:00
renovate[bot]
38ad824f7a Update dependency rudder-sdk-js to v2.18.1 (#58013)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-11-02 12:27:30 +00:00
George Robinson
4c581b5f85 Alerting: Fix response is not returned for invalid Duration in Provisioning API (#58046) 2022-11-02 08:21:23 -04:00
renovate[bot]
909d0f4ced Update Monthly patch updates (#58002)
* Update Monthly patch updates

* update typescript sdk, add ignore for emotion css prop

* fix unit tests

* type fixes

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2022-11-02 12:05:32 +00:00
Sriram
c58542348d chore: updated plugin-ci go dependency to 1.19.3 (#58035) 2022-11-02 11:11:29 +00:00
renovate[bot]
9e25cf7e12 Update dependency rc-slider to v10 (#49242)
* Update dependency rc-slider to v10

* start migrating to rc-slider 10

* rc-slider 10 changes

* fix

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: joshhunt <josh@trtr.co>
2022-11-02 07:00:49 -04:00
Torkel Ödegaard
d7f9093ccd LibrayPanels: Fix unlinking libray panel (#57825) 2022-11-02 11:38:48 +01:00
kay delaney
30dc0f56a4 Chore: Migrate more usage of v1 themes to v2 (#57680)
* Chore: Migrate more usage of v1 themes to v2

* Implement suggested changes
2022-11-02 10:25:08 +00:00
Piotr Jamróz
dd5e3a0818 Explore: Track data links usage (#56868)
* Add tracking for data links in explore

* Add tracking for data links in explore

* Fix tests

* Retrigger build
2022-11-02 11:22:09 +01:00
Julien Duchesne
c46a4a0b26 Linux Packages: Handle publish to beta (#57528)
Uses the feature added here: https://github.com/grafana/deployment_tools/pull/46301
When a version is named "beta", it will be distributed in the beta distribution, rather than in stable

Co-authored-by: dsotirakis <dimitrios.sotirakis@grafana.com>
2022-11-02 06:21:41 -04:00
Gabriel MABILLE
101ce57a94 RBAC: Allow listing user permissions with scope (#57538)
* RBAC: Allow listing user permissions with scope

* Add docs

* Document the api endpoint

* Update docs

Co-authored-by: Garrett Guillotte <100453168+gguillotte-grafana@users.noreply.github.com>

* Split endpoint in two

* document reloadcache

* Update docs/sources/developers/http_api/access_control.md

* Fix test

* Ieva's nit.

* Simplify flag description

Co-authored-by: Garrett Guillotte <100453168+gguillotte-grafana@users.noreply.github.com>
2022-11-02 10:48:11 +01:00
Ashley Harrison
f1f0a6f88b Revert "Update React Aria (#57975)" (#58001)
This reverts commit 44069b64cd.
2022-11-02 09:39:32 +00:00
Jack Westbrook
68a3a867ce chore(npm): patch bump msw to fix nested dep vuln (#57671) 2022-11-02 04:20:33 -04:00
Dimitris Sotirakis
f3b8cd1c98 CI: Remove *-test-backend-enterprise2 pipelines (#58028)
* Remove test-backend-enterprise2 pipelines

* Remove leftover
2022-11-02 04:13:12 -04:00
Zoltán Bedi
26659baf8f PostgreSQL: Migrate to React (#52831)
- Migrate Postgres query editor to react
- Add support for field aliasing in SELECT clauses to SQL based datasources

Co-authored-by: Kyle Cunningham <kyle@codeincarnate.com>
Co-authored-by: Oscar Kilhed <oscar.kilhed@grafana.com>
2022-11-02 11:30:35 +07:00
Ryan McKinley
0c3ed0219e Storage: fix dummy implementation and tests (#58019) 2022-11-01 20:33:36 -04:00
Eric Leijonmarck
c43e97cf37 Docs: Add prerequisites to enable auth.jwt for url login (#57806)
* docs: add prerequisites

* Update docs/sources/setup-grafana/configure-security/configure-authentication/jwt/index.md
2022-11-01 17:21:07 -04:00
juanicabanas
fb5401b8b9 PublicDashboards: Orphaned public dashboard item list modified (#58014)
PublicDashboards: Orphaned public dashboard item list modified
2022-11-01 16:56:19 -03:00
Christopher Moyer
088a4e02e8 Docs: removes writing guidelines, points contributors to Writers' Toolkit (#58011)
* removes writing guidelines, points contributors to the Writers' Toolkit

* Update contribute/documentation/README.md

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

Co-authored-by: Ursula Kallio <ursula.kallio@grafana.com>
2022-11-01 14:48:52 -05:00
Alexander Weaver
ea8c5ce929 SQLStore: Create utility for bulk inserts (#57632)
* Add batchsize to dialects

* Some intermediary progress

* Reflection-based implementation

* Validate batch size

* Implement a few simple tests

* Fix linter error

* Add debug message when falling back to default batch size
2022-11-01 13:24:32 -05:00
Grafana I18n Bot
d8a4a7c90d I18n: Crowdin sync (#57998)
* New translations grafana.json (French)

* New translations grafana.json (French)
2022-11-01 12:38:55 -04:00
renovate[bot]
02f9853c4f Update dependency mocha to v10.1.0 (#58004)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-11-01 16:28:29 +00:00
renovate[bot]
bb51afee69 Update dependency i18next-parser to v6.6.0 (#57999)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-11-01 16:24:59 +00:00
renovate[bot]
0ed71dbdd4 Update dependency marked to v4.2.0 (#58000)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-11-01 16:02:49 +00:00
Ryan McKinley
5736b46962 Storage: add support for snapshots, dataframes, and raw json objects (#57934) 2022-11-01 08:28:13 -07:00
Garrett Guillotte
852d069a3c Docs: Refactor data sources content (#57573)
* Docs: Revise data source index

* Docs: Consolidate data source administration docs

* Docs: Revise panels docs related to data sources

* Docs: Revise Alertmanager data source

* Docs: Reorganize AWS CloudWatch data source docs

* Docs: Reorganize Azure Monitor data source docs

* Docs: Move azuremonitor to azure-monitor

* Docs: Revise Elasticsearch docs

* Docs: Move Elasticsearch index into bundle

* Docs: Revise GCM docs

* Docs: Revise Graphite docs

* Docs: Move Graphite index into bundle

* Docs: Revise InfluxDB docs

* Docs: Revise Jaeger docs

* Docs: Move Jaeger index into bundle

* Docs: Revise Loki docs

* Docs: Move Loki index into bundle

* Docs: Revise MS SQL docs

* Docs: Move MS SQL index into bundle

* Docs: Revise Prometheus docs

* Docs: Move Prometheus index into bundle

* Docs: Revise Tempo docs

* Docs: Move Tempo index into bundle

* Docs: Revise TestData DB docs

* Docs: Move TestData DB index into bundle

* Docs: Revise Zipkin docs

* Docs: Move Zipkin index into bundle

* Docs: Move other data sources' index pages into bundles

* Docs: Revise frontmatter

* Fixing hugo markdown errors

* Docs: Add query editor and template var sections to overview doc

* Docs: Remove CTAs across data source docs

* Docs: Remove CTA

* Docs: Remove CTA

* Docs: Fix links, images, typos, and usage consistency.

* Docs: Fix typos

* Docs: Fix CI issues

* Update docs/sources/datasources/_index.md

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

* Update docs/sources/datasources/_index.md

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

* Docs: Fix query editor links

* Update docs/sources/panels-visualizations/_index.md

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

* Update docs/sources/panels-visualizations/_index.md

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

* Docs: Rebundle child pages per writers' toolkit

* Docs: Fix prettier for CI

* Docs: Fix relrefs from outside data sources docs

* Docs: Fix broken relrefs within datasources

* Docs: Fix relrefs to data sources docs

* Fixed some more refs

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
2022-11-01 10:22:06 -05:00
Ryan McKinley
22648d8581 GRN: minor cleanup (#57924) 2022-11-01 11:09:39 -04:00
dependabot[bot]
09908b6602 Bump actions/cache from 2.1.7 to 3.0.11 (#56910)
Bumps [actions/cache](https://github.com/actions/cache) from 2.1.7 to 3.0.11.
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](https://github.com/actions/cache/compare/v2.1.7...v3.0.11)

---
updated-dependencies:
- dependency-name: actions/cache
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-11-01 15:00:07 +00:00
renovate[bot]
c0526e1905 Update dependency eslint to v8.26.0 (#57986)
* Update dependency eslint to v8.26.0

* update eslint sdk as well

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2022-11-01 14:55:41 +00:00
dependabot[bot]
f6376ead29 Bump actions/stale from 5 to 6 (#57864)
Bumps [actions/stale](https://github.com/actions/stale) from 5 to 6.
- [Release notes](https://github.com/actions/stale/releases)
- [Changelog](https://github.com/actions/stale/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/stale/compare/v5...v6)

---
updated-dependencies:
- dependency-name: actions/stale
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-11-01 14:46:04 +00:00
dependabot[bot]
86d7542234 Bump actions/setup-node from 3.4.0 to 3.5.1 (#57865)
Bumps [actions/setup-node](https://github.com/actions/setup-node) from 3.4.0 to 3.5.1.
- [Release notes](https://github.com/actions/setup-node/releases)
- [Commits](https://github.com/actions/setup-node/compare/v3.4.0...v3.5.1)

---
updated-dependencies:
- dependency-name: actions/setup-node
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-11-01 14:44:37 +00:00
Santiago
a3f828de8a Alerting: Fix flaky test in notifiers (#57927)
* Alerting: Fix flaky test in notifiers

* remove TODO comment
2022-11-01 11:39:14 -03:00
Ashley Harrison
e5c68f40c2 Accessibility: enable rule jsx-a11y/label-has-associated-control (#57964)
* use labels correctly

* fix opentsdb labels

* fix unit tests

* use aria-label instead of data-testid
2022-11-01 14:37:58 +00:00
dependabot[bot]
3770f4f2b7 Bump slackapi/slack-github-action from 1.14.0 to 1.23.0 (#56836)
Bumps [slackapi/slack-github-action](https://github.com/slackapi/slack-github-action) from 1.14.0 to 1.23.0.
- [Release notes](https://github.com/slackapi/slack-github-action/releases)
- [Commits](https://github.com/slackapi/slack-github-action/compare/v1.14.0...v1.23.0)

---
updated-dependencies:
- dependency-name: slackapi/slack-github-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-11-01 14:36:40 +00:00
renovate[bot]
c9104c97a8 Update dependency eslint-plugin-jsdoc to v39.4.0 (#57987)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-11-01 14:34:23 +00:00
dependabot[bot]
28fc518ec8 Bump actions/cache from 2.1.7 to 3.0.10 (#56218)
Bumps [actions/cache](https://github.com/actions/cache) from 2.1.7 to 3.0.10.
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](https://github.com/actions/cache/compare/v2.1.7...v3.0.10)

---
updated-dependencies:
- dependency-name: actions/cache
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-11-01 14:28:52 +00:00
renovate[bot]
5b43ca7d7d Update dependency @visx/tooltip to v2.16.0 (#57980)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-11-01 14:19:29 +00:00
unknowndevQwQ
6dd3584f77 Server: Make unix socket permission configurable (#52944) 2022-11-01 15:04:01 +01:00
renovate[bot]
44069b64cd Update React Aria (#57975)
* Update React Aria

* fix unit tests

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2022-11-01 13:36:00 +00:00
Dimitris Sotirakis
57ee0e4a4b CI: Use full dockerhub repository name (#57979)
* Add full dockerhub repo name

* Update grabpl version
2022-11-01 15:33:16 +02:00
renovate[bot]
9fa2da2724 Update dependency core-js to v3.26.0 (#57981)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-11-01 13:25:26 +00:00
Grafana I18n Bot
b30a0887bd I18n: Crowdin sync (#57978)
* Update source file grafana.json

* New translations grafana.json (French)

* New translations grafana.json (Spanish)

* New translations grafana.json (German)

* New translations grafana.json (Chinese Simplified)
2022-11-01 13:07:06 +00:00
renovate[bot]
511be7d35f Update dependency @react-types/shared to v3.15.0 (#57970)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-11-01 13:01:35 +00:00
renovate[bot]
deef046626 Update dependency @rushstack/ts-command-line to v4.13.0 (#57972)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-11-01 12:23:45 +00:00
renovate[bot]
1b8409dff8 Update Moveable (#57967)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-11-01 12:11:20 +00:00
Petr Stupka
e99f75f0ca Alerting: Linking external images securely - Azure Blob (#1) (#56598) 2022-11-01 13:02:17 +01:00
Carl Bergquist
3188af9be3 metrics: expose when the binary was built as an gauge (#57951)
Signed-off-by: bergquist <carl.bergquist@gmail.com>
2022-11-01 13:00:47 +01:00
Ashley Harrison
cff6d1cf8b Chore: group some packages to reduce number of PRs (#57912)
* group some packages to reduce number of PRs

* Group slate + slate-react together

* kick drone
2022-11-01 11:52:17 +00:00
Josh Hunt
2de6cd0692 Chore: Stories for Select performance (#57965)
* user essentials mob! 🔱

* user essentials mob! 🔱

lastFile:packages/grafana-ui/src/components/Select/SelectPerf.story.internal.tsx

* user essentials mob! 🔱

Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2022-11-01 11:51:53 +00:00
Marcus Andersson
5c30b0cca1 Chore: update latest.json to 9.2.3 (#57960) 2022-11-01 07:01:37 -04:00
Grot (@grafanabot)
02add89b53 Changelog: Updated changelog for 9.2.3 (#57955) 2022-11-01 11:32:34 +01:00
Andrej Ocenas
dfb75815b1 Profiling: Add docs for Parca and Phlare (#57833)
* Add docs for Parca and Phlare

* Add feature toggle note

* Wording fixes

* Update images and some links

* Update links
2022-11-01 11:14:36 +01:00
Joey Tawadrous
00ebd7a983 FlameGraph: Add docs for flame graph (#57834)
* Flame graph docs

* Remove aliases

* Add flame graph to viz page

* Update text

* Update feature toggle text

* Update docs/sources/panels-visualizations/visualizations/flame-graph/index.md

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

* Update docs/sources/panels-visualizations/visualizations/flame-graph/index.md

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

* Update docs/sources/panels-visualizations/visualizations/flame-graph/index.md

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

* Update docs/sources/panels-visualizations/visualizations/flame-graph/index.md

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

* Update docs/sources/panels-visualizations/visualizations/flame-graph/index.md

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

* Update docs/sources/panels-visualizations/visualizations/flame-graph/index.md

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

* Update docs/sources/panels-visualizations/visualizations/flame-graph/index.md

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

* Update links

* Remove heading

* Update docs/sources/panels-visualizations/visualizations/flame-graph/index.md

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

* Update docs/sources/panels-visualizations/visualizations/flame-graph/index.md

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

* Update docs/sources/panels-visualizations/visualizations/flame-graph/index.md

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

* Update docs/sources/panels-visualizations/visualizations/flame-graph/index.md

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

* Update docs/sources/panels-visualizations/visualizations/flame-graph/index.md

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

* Update docs/sources/panels-visualizations/visualizations/flame-graph/index.md

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

* Update text

Co-authored-by: Eve Meelan <81647476+Eve832@users.noreply.github.com>
2022-11-01 09:51:58 +00:00
Torkel Ödegaard
3991be4c1d Search: Fixes searching by current folder when opened by clicking dashboard folder name (#57716)
* Search: Read from url on mount no on app boot

* Fixed tests

* Remove unused type
2022-11-01 10:11:42 +01:00
Lion Ralfs
1f7c84f125 CloudWatch: Fix all-log-groups endpoint when called without logGroupNamePrefix (#57483) 2022-11-01 08:50:04 +01:00
Dimitris Sotirakis
1eaf7cbfc0 Add GCP_KEY to publish-grafanacom step (#57910) 2022-11-01 09:41:15 +02:00
Leon Sorokin
45234e76eb TimeSeries: Render null-bounded points at data edges (#57798) 2022-10-31 17:50:43 -05:00
Leon Sorokin
fbfd0fd51b BarChart: Fix stacked hover (#57711) 2022-10-31 16:48:21 -05:00
Christopher Moyer
6aa3003a54 removes CTAs (#57931) 2022-10-31 16:24:51 -05:00
juanicabanas
48120f2594 PublicDashboards: Delete public dashboard in public dashboard table (#57766)
PublicDashboards: delete button added in public dashboard table in order to delete a public dashboard.

Co-authored-by: Jeff Levin <jeff@levinology.com>
2022-10-31 17:16:07 -04:00
Ryan McKinley
6e3a6cce61 Storage: move http wrapper into its own subpackage (#57929) 2022-10-31 13:37:05 -07:00
Gilles De Mey
6d2dced218 Alerting: fix filtering in notification policies (#57824) 2022-10-31 13:11:29 -04:00
George Robinson
b0a927b138 Alerting: Add debug logs in validateAndGetPrefix (#57002) 2022-10-31 16:40:28 +00:00
Alexander Weaver
0dfd78c88c Attempt to preserve UID from migrated channel (#57639) 2022-10-31 11:29:07 -05:00
renovate[bot]
96c3a8339e Update dependency @leeoniya/ufuzzy to v0.8.0 (#57894)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-10-31 09:45:46 -06:00
Ryan McKinley
9149544086 Store: Add SQL tables for SQL based object store (dev mode only) (#57785) 2022-10-31 11:28:19 -04:00
Jo
07991c76fe Doc: Fix wrong default callback URL (#57908)
* doc: fix wrong default callback URL

* doc: fix gitlab typos
2022-10-31 16:13:27 +01:00
Konrad Lalik
a59dc8b7ad Alerting: Query time logging (#57585) 2022-10-31 15:55:47 +01:00
Ieva
5c1a1c8318 change json command parameter names from userID to userId and teamID to teamId (#57902) 2022-10-31 14:32:28 +00:00
Ryan McKinley
3527cad9dc Store: protobuf based GRN/identifier (#57714) 2022-10-31 07:26:16 -07:00
Ezequiel Victorero
46093c1267 PublicDashboards: do not return errors when resource not found from store layer (#57838) 2022-10-31 11:22:27 -03:00
Torkel Ödegaard
f0ab4bea8c Scene: SceneObject and SceneObjectBase refinements and stricter typing (#57851) 2022-10-31 15:16:16 +01:00
Joan López de la Franca Beltran
0864994bcb Docs: Update Auditing docs (#57867)
* Docs: Update Auditing docs

* Update docs/sources/setup-grafana/configure-grafana/enterprise-configuration/index.md

Co-authored-by: Ieva <ieva.vasiljeva@grafana.com>
2022-10-31 14:53:46 +01:00
Andres Martinez Gotor
9391a8ab9b Google Cloud Monitoring: Set frame interval to draw null values (#57768) 2022-10-31 14:48:32 +01:00
Sonia Aguilar
30cb04f205 Alerting: move alert rule View/Edit/Delete action buttons to collapsed row (#57687)
* Move view edit and delete buttons to RulesTable

* Move tests for edit and delete buttons to a new test file for RulesTable

* Action buttons: Only show icon for non large screens, and add a Tooltip

* Remove buttons moved from the RuleDetailsActionButtons component

* Fix horizontal aligment for icons for non large devices
2022-10-31 14:42:09 +01:00
Andres Martinez Gotor
ce38840f29 Google Cloud Monitoring: Ensure selectors fit in the screen (#57817) 2022-10-31 12:52:25 +01:00
Ieva
2546437e20 add an endpoint for updating several managed permissions with one call (#57893) 2022-10-31 11:46:58 +00:00
Josh Hunt
fd5c147574 Chore: Update footer changelog link to github (#57871) 2022-10-31 07:34:21 -04:00
renovate[bot]
2417b9151c Update dependency @cypress/webpack-preprocessor to v5.15.0 (#57873)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-10-31 11:28:39 +00:00
xiyu95
77be89eb1c Tempo: Fix dropdown issue on tag field focus (#57616) 2022-10-31 11:35:38 +01:00
Ieva
7e62352aea Access Control: documentation for RBAC provisioning with Terraform (#57747)
* add docs for RBAC provisioning with Terraform

* remove unnecessary bit

* shuffle the structure around, as docs can't go more than four levels deep

* Update index.md

* Update index.md
2022-10-31 06:32:32 -04:00
Erik Sundell
92ed9a4f2f CloudWatch: Fix broken test (#57879)
* mock date.now

* fix broken test
2022-10-31 06:26:43 -04:00
Torkel Ödegaard
19b961465c TopNav: Make it possible to to have sections without children (#57815) 2022-10-31 11:01:34 +01:00
renovate[bot]
656f159ae9 Update babel monorepo (#57665)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-10-31 09:25:01 +00:00
Karl Persson
052d1426f9 Oauth: Display friendly error message when role_attribute_strict=true and no valid role found (#57818)
* Oauth: change error type to a struct that unwraps into a social error

* Oauth: Handle empty role in error and fix unwrap

* Oauth: provide more informatio in error

* Oauth: return InvalidBasicRoleError

* Oauth: Fix tests

* Login: Remove casing

* Oath: Change to warning logs
2022-10-31 09:11:31 +01:00
Joe Blubaugh
89d917b196 Docs: Add information about DB version support to upgrade guide. (#57643)
In v9.2 Grafana added an official DB version support policy. That change
is now noted in the upgrade guide.
2022-10-31 15:23:51 +08:00
Jo
61774ae7f1 Docs: Add keycloak oauth setup guide (#57685)
* use scopes for generic_oauth devenv. Support refresh_tokens

* add keycloak section

* add teamsync support to oauth devenv

* Add keycloak guide

* Upgrade keycloak to version 19

* Update devenv/docker/blocks/auth/oauth/readme.md

Co-authored-by: Misi <mgyongyosi@users.noreply.github.com>

* feedback

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

Co-authored-by: Misi <mgyongyosi@users.noreply.github.com>
Co-authored-by: Ieva <ieva.vasiljeva@grafana.com>
2022-10-28 17:57:56 -04:00
Karl Persson
1cc6dde836 GenericOauth: Only fetch user data from api if api_url is configured (#57827) 2022-10-28 21:44:09 +00:00
Virginia Cepeda
c73b499ec5 [Alerting] Avoid invalid characters in copied rule expression (#57839)
* Avoid copying UTF8 BOM chars in rule expression

* Add comment
2022-10-28 15:40:55 -03:00
idafurjes
d7bee33398 Add implementation for Create and GetParents of foder store (#57829)
* Add Move implementation

* Remove Move from store

* Add Create and GetParents implementation for folder store
2022-10-28 20:07:25 +02:00
Esteban Beltran
4abf4d90b4 Toolkit: Deprecate plugin:github-publish command (#57726)
* Toolkit: Deprecate `plugin:github-publish` command

* Remove wrong console log message

* Update link to recommended workflows
2022-10-28 19:44:59 +02:00
Adela Almasan
a5c492b033 Canvas: Add tabs to inline editor (#57778) 2022-10-28 13:36:19 -04:00
Yuriy Tseretyan
3294918e9f Alerting: Update state manager to support nil stores and metrics (#57791) 2022-10-28 13:10:28 -04:00
Yuriy Tseretyan
d848cc629b Alerting: Refactor rule interval validation to be reusable (#57792) 2022-10-28 14:40:11 +00:00
kay delaney
e4d1d8d70c Dashboards: Add workaround for react-grid-layout rearrange bug (#57832) 2022-10-28 15:36:37 +01:00
Yuriy Tseretyan
fa043efb2c Fix: correctly close trace span in Prometheus and Loki data sources (#57774)
* rename span for loki
2022-10-28 10:17:56 -04:00
Kyle Brandt
6126f56ef0 Prometheus: Do not drop errors in streaming parser (#57698)
- Fixes #57692
- and also takes care of #42776 when using the streaming parser, not an ideal fix for #42776 but makes explore work better I think. https://github.com/grafana/grafana/issues/57365 might be a better longer term solution
2022-10-28 10:11:06 -04:00
Shirley
c2e9e797b3 CloudWatch: fix non-deterministic test (#57831) 2022-10-28 10:05:55 -04:00
idafurjes
6b483a8dca Add implementation for folder store methods (#57700)
* Add implementation for folder store methods

* Add Move implementation

* Add back comment and fix query

* Remove Move from store

* Adjust GetChildren

* Fix errutil error declaration and usage

* Add org id to get children query
2022-10-28 15:35:49 +02:00
Kyle Brandt
2cd9cbd359 Prometheus: Chore - Remove incorrect FrameType from exemplar frame (#57695) 2022-10-28 09:15:01 -04:00
Kristin Laemmert
6a6fdbc1f9 chore: updates to the new folder model (#57776) 2022-10-28 08:23:39 -04:00
Christopher Moyer
b9a0576638 docs: Refactors remaining enterprise topics, corrects relrefs (#57707)
* moves topics, correct relrefs

* Update docs/sources/dashboards/create-reports/index.md

Co-authored-by: Garrett Guillotte <100453168+gguillotte-grafana@users.noreply.github.com>

* Update docs/sources/administration/data-source-management/index.md

Co-authored-by: Garrett Guillotte <100453168+gguillotte-grafana@users.noreply.github.com>

* Update docs/sources/setup-grafana/configure-security/audit-grafana.md

Co-authored-by: Garrett Guillotte <100453168+gguillotte-grafana@users.noreply.github.com>

* Update docs/sources/setup-grafana/configure-security/configure-request-security.md

Co-authored-by: Garrett Guillotte <100453168+gguillotte-grafana@users.noreply.github.com>

* Update docs/sources/setup-grafana/configure-security/configure-team-sync.md

Co-authored-by: Garrett Guillotte <100453168+gguillotte-grafana@users.noreply.github.com>

* Update docs/sources/administration/data-source-management/index.md

Co-authored-by: Garrett Guillotte <100453168+gguillotte-grafana@users.noreply.github.com>

* Update docs/sources/dashboards/create-reports/index.md

Co-authored-by: Garrett Guillotte <100453168+gguillotte-grafana@users.noreply.github.com>

* Update docs/sources/dashboards/create-reports/index.md

Co-authored-by: Garrett Guillotte <100453168+gguillotte-grafana@users.noreply.github.com>

* Update docs/sources/administration/recorded-queries/index.md

Co-authored-by: Garrett Guillotte <100453168+gguillotte-grafana@users.noreply.github.com>

* Update docs/sources/dashboards/create-reports/index.md

Co-authored-by: Garrett Guillotte <100453168+gguillotte-grafana@users.noreply.github.com>

* Update docs/sources/dashboards/create-reports/index.md

Co-authored-by: Garrett Guillotte <100453168+gguillotte-grafana@users.noreply.github.com>

* Update docs/sources/dashboards/create-reports/index.md

Co-authored-by: Garrett Guillotte <100453168+gguillotte-grafana@users.noreply.github.com>

* Update docs/sources/dashboards/create-reports/index.md

Co-authored-by: Garrett Guillotte <100453168+gguillotte-grafana@users.noreply.github.com>

* Update docs/sources/dashboards/create-reports/index.md

Co-authored-by: Garrett Guillotte <100453168+gguillotte-grafana@users.noreply.github.com>

* Update docs/sources/dashboards/create-reports/index.md

Co-authored-by: Garrett Guillotte <100453168+gguillotte-grafana@users.noreply.github.com>

* Update docs/sources/dashboards/create-reports/index.md

Co-authored-by: Garrett Guillotte <100453168+gguillotte-grafana@users.noreply.github.com>

* removes link that goes nowhere

Co-authored-by: Garrett Guillotte <100453168+gguillotte-grafana@users.noreply.github.com>
2022-10-28 07:13:40 -05:00
brendamuir
f34dd29ac4 Docs: adds view notification errors topic (#57820) 2022-10-28 12:44:23 +01:00
Armand Grillet
ee7adc081b Remove Sensu from docs (#57812)
We do not support Sensu in Grafana Alerting, only Sensu Go.
2022-10-28 12:40:46 +01:00
Andrej Ocenas
0845ac2f53 Profiling: Add Phlare and Parca datasources (#57809)
* Add phlare datasource

* Rename

* Add parca

* Add self field to parca

* Make sure phlare works with add to dashboard flow

* Add profiling category and hide behind feature flag

* Update description and logos

* Update phlare icon

* Cleanup logging

* Clean up logging

* Fix for shift+enter

* onRunQuery to set label

* Update type naming

* Fix lint

* Fix test and quality issues

Co-authored-by: Joey Tawadrous <joey.tawadrous@grafana.com>
2022-10-28 13:33:37 +02:00
brendamuir
1d53a6f57e Docs: Change GA to Alerting (#57811)
* Docs: Change GA to Alerting

* typos
2022-10-28 10:28:02 +01:00
Kevin Minehart
fd16cad7da Only provide version ot build-frontend-packages if it's a valid semver (has 2 digits) (#57808) 2022-10-28 05:04:59 -04:00
brendamuir
5edd511461 Docs: fixes alerting links (#57805)
* Docs: fixes alerting links

* fixes grafana relrefs to alerting

* changing GA to Alerting
2022-10-28 10:01:43 +01:00
brendamuir
f9d2801249 Docs: alerting refactor (#57804)
* Docs: alerting refactor

* fixes broken relrefs
2022-10-28 09:58:39 +02:00
Victor Marin
953fdfe76f TimeseriesPanel: Fill below to override works with name override (#57728) 2022-10-28 09:27:54 +03:00
Jeff Levin
bf672f960a public dashboards: rename api functions (#57789)
This PR imposes better naming conventions on public dashboards api

* rename api functions and remove use of _config_ noun

* fix tests

Co-authored-by: Ezequiel Victorero <ezequiel.victorero@grafana.com>
2022-10-27 17:08:11 -08:00
Jeff Levin
6b7d6fe0cb public dashboards: rename route paths (#57787)
This PR fixes the naming of routes for public dashboards to be more accurate and descriptive.

Co-authored-by: Ezequiel Victorero <ezequiel.victorero@grafana.com>
2022-10-27 14:41:56 -08:00
Leon Sorokin
7d020d3f6e Candlestick: Maintain candle width at different display resolutions (#57709) 2022-10-27 17:36:59 -05:00
Drew Slobodnjak
cf4c0a5db4 Canvas: Minor fixes for canvas gdev dashboard (#57781) 2022-10-27 15:02:40 -07:00
Alex Moreno
c08c14f8dd Alerting: Add custom title to pushover contact point (#57530)
* Add custom title to pushover contact point

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

Co-authored-by: Santiago <santiagohernandez.1997@gmail.com>

* Use simplejson

* Use more verbose variable names

Co-authored-by: Santiago <santiagohernandez.1997@gmail.com>
2022-10-27 19:07:01 +02:00
Will Browne
9f77bd4728 Plugins: Use public store instead of internal registry (#57631)
* Plugins: Use public store instead of internal registry

* update comments

* fix import

* fix test
2022-10-27 18:44:28 +02:00
Yuriy Tseretyan
facf2b1ee8 Chore: Update prometheus, loki, graphite and influx plugins to support contextual logs. (#57708) 2022-10-27 12:05:06 -04:00
yinjialu
9aac0d32f9 Prometheus: fix Raw query is not updated when label op change. (#57492) (#57493) 2022-10-27 18:00:14 +02:00
Selene
bff9671b81 Rendering: Check timeout error when the request failed (#57654)
* Check timeout error when the request failed

* Update error and check

* Uses errors.As to fix the lint
2022-10-27 17:27:03 +02:00
Gilles De Mey
2a36301817 Alerting: Fall back to "range" query type for unified alerting when "both" is specified (#57288) 2022-10-27 17:22:23 +02:00
Artur Wierzbicki
616db7f68b Storage: k6 tests (#57496)
* object store k6

* update script

* refactor

* rename scripts

* fix paths

* fixes

* fix client - check connected state

* add teardown timeout

* rename to grpc object store client

* fail if health check fails

* abort rather than fail

* stale import

* create `run.sh`

* adjust for dummy server

* fix mkdir

* clean up dependencies

* remove name and version

* bring back name and version!

* remove clean webpackk plugin

* remove copy plugin

* update yarn lock

* remove stale import

* update yarn lock

* move perf tests to devenv/docker/loadtest-ts

* add codeownres
2022-10-27 23:22:04 +08:00
Alex Moreno
10fdfa8583 Alerting: Change handling of settings to pagerduty contact point (#57524)
* Add custom title to pagerduty contact point

* Fix tests by saving decrypted key

* Use simplejson
2022-10-27 16:20:10 +02:00
Alex Moreno
f8d12af021 Add custom title to googlechet contact point (#57517)
* Add custom title to googlechet contact point

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

Co-authored-by: Santiago <santiagohernandez.1997@gmail.com>

* Use simplejson

Co-authored-by: Santiago <santiagohernandez.1997@gmail.com>
2022-10-27 16:19:48 +02:00
Sofia Papagiannaki
40a59c2793 Chore: Update developer guide for running integration tests (#57758) 2022-10-27 17:18:20 +03:00
Alex Moreno
3d437117ad Alerting: Add custom title to discord contact point (#57506)
* Add custom title to discord contact point

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

Co-authored-by: Santiago <santiagohernandez.1997@gmail.com>

* Use simplejson

Co-authored-by: Santiago <santiagohernandez.1997@gmail.com>
2022-10-27 16:17:18 +02:00
Alex Moreno
1ab0af1eb2 Alerting: Add custom title to DingDing contact point (#57498)
* Add custom title to DingDing contact point

* Update pkg/services/ngalert/notifier/channels_config/available_channels.go

Co-authored-by: Santiago <santiagohernandez.1997@gmail.com>

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

Co-authored-by: Santiago <santiagohernandez.1997@gmail.com>

* Add error checking before URL templating

* Remove comment

* Use simplejson

Co-authored-by: Santiago <santiagohernandez.1997@gmail.com>
2022-10-27 16:16:36 +02:00
Alex Moreno
fb62660df7 Alerting: Add title and description to VictorOps contact point (#57458)
* Add title and description to VictorOps contact point

* Update pkg/services/ngalert/notifier/channels_config/available_channels.go

Co-authored-by: Santiago <santiagohernandez.1997@gmail.com>

Co-authored-by: Santiago <santiagohernandez.1997@gmail.com>
2022-10-27 16:12:14 +02:00
Alex Moreno
73a9e2a115 Add title and description to Threema contact point (#57429) 2022-10-27 16:11:38 +02:00
Jo
cae900c6f9 fix GF_AUTH_JWT_URL_LOGIN not working (#57689) 2022-10-27 15:57:01 +02:00
Gabriel MABILLE
4d380978d3 Fix: Unlock new button based on user permissions (#57733) 2022-10-27 15:48:07 +02:00
Alex Moreno
6839154720 Alerting: Add missing custom title and description to Line contact point (#57388)
* Add title and description to Line receiver

* Fix labal names for LINE contact point
2022-10-27 15:27:04 +02:00
Alex Moreno
1dcc432537 Alerting: Add missing custom title and description fields in Kafka contact point (#57361)
* Add description and details to Kafka notifier

* Fixed testing and add new logic testing

* Add proper description to kafka contact point UI

* Update pkg/services/ngalert/notifier/channels_config/available_channels.go

Co-authored-by: Santiago <santiagohernandez.1997@gmail.com>

* Update pkg/services/ngalert/notifier/channels_config/available_channels.go

Co-authored-by: Santiago <santiagohernandez.1997@gmail.com>

Co-authored-by: Santiago <santiagohernandez.1997@gmail.com>
2022-10-27 15:25:54 +02:00
Esteban Beltran
91ee5fec14 Toolkit: Deprecate plugin:update-circleci command (#57743) 2022-10-27 15:05:32 +02:00
brendamuir
998093a280 Docs: more refactoring for alerting (#57741)
* docs: more refactoring alerting

* performance limitations

* typo

* fix relrefs
2022-10-27 13:21:02 +01:00
Shirley
96beb3a3f1 Cloudwatch: refactor parsing metric data queries (#57624) 2022-10-27 14:10:49 +02:00
Esteban Beltran
b4633fc516 Toolkit: Deprecate plugin:bundle-managed command and move its functionality to a bash script. (#57719)
* Toolkit: Deprecate `plugin:bundle-managed` command

* Replace yarn script with bash command
2022-10-27 13:15:45 +02:00
Gareth Dawson
8b44ca1b0c Loki: Add devenv dashboard (#57519)
* Add loki devenv dashboard

* remove dashboard auto refresh

* set time range to 5m for timeseries graph

* add adhoc filters

* override with new export

* Chore: run stripnulls script

Co-authored-by: Matias Chomicki <matyax@gmail.com>
2022-10-27 12:07:20 +01:00
brendamuir
279ac50d59 Docs: refactors notifications in alerting (#57734)
* Refactors noticifacations section

* adds hover over error icon detail
2022-10-27 11:19:03 +01:00
idafurjes
50fb47dba0 Chore: Remove methods from sqlstore (#57545)
* Remove methods from sqlstore

* Remove commented out code

* Remove GetUserById from tests

* Adjust fake for get user profile

* Adjust test

* Adjust go mod files

* Try fix test

* Test adjustment

* Adjust test 2

* Remove commented out code
2022-10-27 11:44:09 +02:00
Pepe Fagoaga
1340c2c358 docs(config): Include admin_email documentation (#55789) 2022-10-27 10:15:14 +02:00
Artur Wierzbicki
1df8a85a42 Search: load dashboard performance improvements (#57509)
* fix windows storage init

* fixxx

* close session asap

* fix span end

* error handling

* add comment

* simplify

* simplify

* fix limit

* pass readDashboardCtx to summary builder

* add string slice validation
2022-10-27 14:52:42 +08:00
Santiago
cdb5d4230a Alerting: Fix "Not Implemented" responses (#57710)
* fix swagger spec, return 404 instead of 501 when an endpoint does not exist

* update number of paths in authorization_test.go
2022-10-26 23:35:52 -03:00
Yuriy Tseretyan
0a4121cef8 Alerting: Contextual log provider for rule key (#57476)
* create contextual log context provider
* use contextual provider in scheduler
* init logger in the package
* use context for log context
* use context in state manager
2022-10-26 19:16:02 -04:00
Brendan O'Handley
59ffd9571e Transformations : Add partition by values to transformation docs (#57697)
* add partition by values to tranformation docs

* Update docs/sources/panels-visualizations/query-transform-data/transform-data/index.md

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

* Update docs/sources/panels-visualizations/query-transform-data/transform-data/index.md

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

* Update docs/sources/panels-visualizations/query-transform-data/transform-data/index.md

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

* Update docs/sources/panels-visualizations/query-transform-data/transform-data/index.md

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

* include leon's suggestions

* include leon's suggestions

* Update docs/sources/panels-visualizations/query-transform-data/transform-data/index.md

* Update docs/sources/panels-visualizations/query-transform-data/transform-data/index.md

* Update docs/sources/panels-visualizations/query-transform-data/transform-data/index.md

Co-authored-by: Kim Nylander <104772500+knylander-grafana@users.noreply.github.com>
Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
2022-10-26 19:01:45 -04:00
Ryan McKinley
7346280316 LibraryPanels: Load library panels in the frontend rather than the backend (#50560)
Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
2022-10-26 15:38:20 -07:00
Garrett Guillotte
0db946977b Docs: Reassign docs ownership (#57701) 2022-10-26 15:20:25 -07:00
Yuriy Tseretyan
2d20c8db7b Chore: Expression engine to support relative time range (#57474)
* make TimeRange interface and add relative range
* make Execute methods support the current time
* update resample to support relative time range
* update DSNode to support relative time range
* update query service to create queries with absolute time
* make alerting evaluator create relative time ranges
2022-10-26 16:13:58 -04:00
brendamuir
596b4fecb0 Docs: Refactors notifications in alerting (#57653)
* Refactors notifications in alerting

* Fixes broken links

* adds headings

* fixes broken links

* Adds line space and intro sentences
2022-10-26 19:07:49 +01:00
Ezequiel Victorero
7b819284c1 PublicDashboards: use orgId when querying dashboards (#57696) 2022-10-26 14:49:43 -03:00
Kyle Brandt
dfdc9bcbc1 Docs: (Whats new 9.2) Prom Stream Parser (#57603)
* Docs: (Whats new 9.2) Prom Stream Parser

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

Co-authored-by: Garrett Guillotte <100453168+gguillotte-grafana@users.noreply.github.com>

Co-authored-by: Garrett Guillotte <100453168+gguillotte-grafana@users.noreply.github.com>
2022-10-26 12:37:27 -04:00
Ezequiel Victorero
fe9c0c881e PublicDashboards: remove function with business logic from database layer and use it at service layer (#57684) 2022-10-26 12:53:33 -03:00
Kristin Laemmert
6c982e5b71 some file moving and struct renaming (#57686) 2022-10-26 11:52:01 -04:00
Selene
8917bd57e6 Clarify that audit logs are generated only for API requests (#57521) 2022-10-26 17:08:21 +02:00
Emil Tullstedt
1e2b7c5368 Errors: Add HTTP writer for errutil.Error (#57661) 2022-10-26 16:57:53 +02:00
kay delaney
05872283b5 ServiceAccounts: Wrap ServiceAccountPage route in dynamic import (#57669) 2022-10-26 15:54:28 +01:00
Kristin Laemmert
b346ae0310 feat: add new Folder table migration & define nested folder interfaces (#56882)
* feat: add new Folder table migration

Add a new folder table to support the Nested Folders feature.

https://github.com/grafana/grafana/issues/56880

* register nested folders feature flag (unused)

* feat: nested folder service (experiment)

This commit adds a NestedFolderSvc interface and stubbed out implementation as an alternative to the existing folder service. This is an experimental feature to try out different methods for backwards compatibility and parallelization, so that Grafana can continue to store folders in the existing (non-nested) manner while also using the new nested folder service.

Eventually the new service will (hopefully) become _the_ service, at which point the legacy service can be deprecated (or remain, with the new service methods replacing the original. whatever makes sense at the time).


* nested folders: don't run the new migration

This commit removes the nested folder migration from the list of active migrations so we can merge this branch and continue development without impacting Grafana instances built off main.
2022-10-26 10:15:14 -04:00
Erik Sundell
237ff2699d CloudWatch: Refactor metrics resource request frontend (#57602)
* refactor metric resource request frontend

* remove dupe interface
2022-10-26 15:59:26 +02:00
Erik Sundell
94aa090fb0 Cloudwatch: Refactor namespaces resource request (#57590)
* add route tests

* remove not used method

* pr feedback

* change variable name
2022-10-26 15:54:23 +02:00
Matias Chomicki
c8689fd591 Loki Monaco Editor: grab operator documentation from the operations module (#57525)
* feat(loki-operations): add method to resolve operation docs

* feat(loki-operations): read operation and strip markdown links

* feat(loki-monaco-editor): read parser docs from operations

* feat(loki-monaco-editor): grab docs for more operations

* Chore: update completions test

* Chore: add tests for the operations module

* Chore: fix typo

Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>

* Chore: fix typo

Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>

Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
2022-10-26 15:44:44 +02:00
juanicabanas
e81ce1dae7 PublicDashboards: Fix GET public dashboard that doesn't match
PublicDashboards: Fix GET public dashboard that doesn't match
2022-10-26 09:25:24 -04:00
kay delaney
05ceff5188 Chore: Migrate usage of v1 themes to v2 (#57617) 2022-10-26 13:28:12 +01:00
Jo
77437f2c89 Add multi-auth devenv (#57609)
* add authentik devenv

* remove direct dependency on spew

* use cn

* add authentik instructions

* add backup instructions
2022-10-26 13:46:50 +02:00
Ieva
92531c5596 move data source permission model to enterprise repo (#57615) 2022-10-26 11:49:45 +01:00
Esteban Beltran
987d4fd459 Toolkit: Deprecate and replace toolkit:build with plain yarn scripts (#57620)
* Toolkit: Deprecate and replace toolkit:build with plain yarn scripts

* Remove "generated" from copied files in the script
2022-10-26 10:11:15 +02:00
Esteban Beltran
cbe7fe3d8d Toolkit: Deprecate searchTestData command (#57589) 2022-10-26 08:54:51 +02:00
Ryan McKinley
a3acfb1a48 Chore: Register a feature flag for "newDBLibrary" (#57468) 2022-10-25 18:20:41 -07:00
Ezequiel Victorero
860380d893 PublicDashboards: refactor following naming convention for services (#57625) 2022-10-25 21:40:42 -03:00
Michael Mandrus
5879805e4b PublicDashboards: Fix unsafe code snippets (#57641)
* return an error if we can't extract queries from a panel

* check for null or undefined
2022-10-25 20:16:10 -04:00
Ryan McKinley
e6575bab76 Playlist: allow using object store as the backend (#57467) 2022-10-25 16:51:01 -07:00
Artur Wierzbicki
6abd4cd8e8 Chore: pointerify dummy server (#57640) 2022-10-25 19:27:31 -04:00
owensmallwood
b5f1876ba3 PublicDashboards: Update docs with supported datasources (#57629)
Updates public dashboards docs with compatible datasources
2022-10-25 17:06:02 -06:00
kay delaney
b49713d323 Chore: Remove unused files (#57515) 2022-10-25 23:34:53 +01:00
Beto Muniz
069a4cb21b Fix orderFieldsTransformer sorting (#57635) 2022-10-25 17:48:14 -03:00
Ezequiel Victorero
c5e420a94c PublicDashboards: move methods from store to service (#57599) 2022-10-25 16:29:18 -03:00
Galen Kistler
c27aac0d38 Prometheus query builder: Replace select with AsyncSelect to support high cardinality prometheus instances (#57300)
* Replace current select with AsyncSelect component to facilitate autocomplete via prometheus server instead of client application
Co-authored-by: Kyle Brandt <kyle@grafana.com>
2022-10-25 13:05:21 -05:00
Andrej Ocenas
82d79780d8 Flamegraph: Fix vertical offset (#57618) 2022-10-25 17:55:49 +02:00
Gilles De Mey
8788f7d2d8 Alerting: Always allow configuring AM configuration (#57522) 2022-10-25 16:52:11 +02:00
Gilles De Mey
7414ba7279 Expressions: make reduce inputs compacter (#56404) 2022-10-25 16:28:11 +02:00
Shirley
76a3a1eda7 CloudWatch: migrate tests to metrics data query request parsing level, add tests (#57431) 2022-10-25 15:53:54 +02:00
Virginia Cepeda
9eae793b5d Alerting: Remove the alert manager selection from the data source configuration (#57369)
* Remove alertmanager dropdown from datasource config

* Avoid sending alertmanagers from loki/prom config editors

* Add test

* Remove unneeded param
2022-10-25 10:53:20 -03:00
Artur Wierzbicki
a63c529ad1 Chore: add query_retries=3 to querylibrary_integration_test.go (#57607) 2022-10-25 09:52:56 -04:00
Matias Chomicki
cc820062c6 Chore: update latest.json to 9.2.2 (#57608) 2022-10-25 13:39:23 +00:00
brendamuir
58b15f3e54 Adds information on what's new label to PR template (#57594) 2022-10-25 14:25:41 +01:00
Kristin Laemmert
225ed4cc0a GRN parsing service (#56750)
* GRN parsing service
* move GRN package into infra and update fields
* remove orgID from GRNs (collapse into tenantID)
2022-10-25 09:07:24 -04:00
Erik Sundell
5daa87d7a1 Cloudwatch: Remove unused code (#57593)
* remove not used code and refactor check health

* fix broken test

* remove not used variable
2022-10-25 15:03:51 +02:00
Esteban Beltran
8d42e1b169 Toolkit: Deprecate node-version-check command (#57591)
* Toolkit: Deprecate node-version-check command

* Do not check for nodejs version on frontend-test
2022-10-25 14:53:53 +02:00
Grot (@grafanabot)
f64b0e1fae Changelog: Updated changelog for 9.2.2 (#57601) 2022-10-25 14:36:46 +02:00
Erik Sundell
4c654ddb76 Cloudwatch: Refactor metrics resource request (#57424)
* refactor metrics request

* Update pkg/tsdb/cloudwatch/routes/dimension_keys_test.go

Co-authored-by: Shirley <4163034+fridgepoet@users.noreply.github.com>

* return metric struct value intead of pointer

* make it possible to test hard coded metrics service

* test all paths in route

* fix broken test

* fix one more broken test

* add integration test

Co-authored-by: Shirley <4163034+fridgepoet@users.noreply.github.com>
2022-10-25 14:00:54 +02:00
Todd Treece
53d7404e2b Chore: Add appcontext.WithUser and appcontext.User (#57534) 2022-10-25 07:51:24 -04:00
sh0rez
beaaabd770 live: explicitely reply with http 200 (#57428)
`pkg/web` triggers a panic when a http handler chain does not return any
response to the client.
This has been put in place, because it usually means a middleware along
the way did not call the next one.

In this specific case however, the handlers meant to return 200, but did
not do so explicitely, instead relying on the default behavior of `net/http`
2022-10-25 11:45:54 +02:00
Jack Westbrook
588e64d9f5 Chore: Fix vulnerabilities in webpack loader-utils (#57533)
* chore: remove unused webpack loaders from core and toolkit

* chore: refresh yarn.lock file

* chore(yarn): refresh lock file for loader-utils update to 2.0.3

* chore: force ngtemplate-loader to use loader-utils@2.0.3

* chore(e2e): bump ts-loader@8.4.0 for loader-utils@2.0.3

* chore(yarn): remove unused packageExtensions

* chore(storybook): force unused webpack deps to v5. force plugins and loaders for loader-utils@2.0.3

* chore(storybook): update config for type changes from webpack v4 to v5
2022-10-25 11:37:41 +02:00
Joey Tawadrous
8f75ec4007 Flame Graph: Exact search (#56769)
* Use exact match

* Create searchable FlameGraphPanel.tsx
2022-10-25 10:24:27 +01:00
Karl Persson
7386f8652c RBAC: Improve performance of dashboard filter query (#56813)
* RBAC: Move UserRolesFilter to domain package

* Dashboard Permissions: Rewrite rbac filter to check access in sql

* RBAC: Add break when wildcard is found

* RBAC: Add tests for dashboard filter

* RBAC: Update tests

* RBAC: Cover more test cases

Co-authored-by: Ieva <ieva.vasiljeva@grafana.com>
2022-10-25 11:14:27 +02:00
Ashley Harrison
d2a70bc42d Chore: more any/type assertion improvements (#57450)
* more friday any/type assertion improvements

* Apply suggestions from code review

Co-authored-by: Marcus Andersson <marcus.andersson@grafana.com>

* Update public/app/angular/promiseToDigest.test.ts

Co-authored-by: Marcus Andersson <marcus.andersson@grafana.com>

Co-authored-by: Marcus Andersson <marcus.andersson@grafana.com>
2022-10-25 11:04:35 +02:00
Erik Sundell
8adbacb18e Cloudwatch: Refactor datasource instance factory method (#57452)
* wip

* fix broken test
2022-10-25 09:52:12 +02:00
Joey Tawadrous
d9a6c3f398 FlameGraph: Add newly designed flame graph icon (#57514)
* Add newly designed flame graph icon

* Update expectedListResponse
2022-10-25 07:18:17 +01:00
Victor Marin
c30716a073 TablePanel: Fix updating footer values on data change (#57518)
* TablePanel: Fix updating footer values on data change

* tests
2022-10-25 08:32:16 +03:00
Artur Wierzbicki
e485ddd13d Store: don't marshall/unmarshall the dashboard when building a summary (#57520)
* dont pretty print the dashboard

* stop marshalling the dashboard

* do not sanitize for searchV2

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2022-10-25 09:39:17 +08:00
Artur Wierzbicki
749b3b6263 Storage: Fix initialization on windows (#57504) 2022-10-25 09:27:22 +08:00
Nathan Marrs
9d857f4d61 Canvas: Improve resource picker initialization (#57319) 2022-10-24 13:40:28 -07:00
Ryan McKinley
37b011d79e Annotations: Disable "Add annotation" button when annotations are disabled (#57481) 2022-10-24 13:24:33 -07:00
Galen Kistler
e59ddd6bc5 Revert "Revert "Prometheus: Provide label values match parameter API when supported prometheus instance is configured (#56510)" (#57551)" (#57553)
This reverts commit e7671bf909.
2022-10-24 15:02:15 -05:00
Galen Kistler
f93c3acc51 Prometheus: Flavor/version configuration (#57554)
* Revert "Revert "Prometheus: Type and flavor configuration (#56496)" (#57552)"
This reverts commit 2432ce619a.
* Adds new fields and documentation for Prometheus datasource configuration: prometheus type, and version
2022-10-24 14:53:11 -05:00
Guilherme Caulada
cfd9e72da5 Add dashboards to the navtree on public dashboards (#57542) 2022-10-24 16:34:27 -03:00
Erik Sundell
c23a7bdcf8 refactoring dimension values frontend req (#57475) 2022-10-24 20:45:02 +02:00
Joan López de la Franca Beltran
5d18b41857 Docs: Database encryption corrections (#57503)
* Docs: Database encryption corrections

* Fix relref links

* Additional corrections
2022-10-24 20:07:32 +02:00
Galen Kistler
2432ce619a Revert "Prometheus: Type and flavor configuration (#56496)" (#57552)
This reverts commit 7ecbc98b3e.
2022-10-24 12:33:11 -05:00
Galen Kistler
e7671bf909 Revert "Prometheus: Provide label values match parameter API when supported prometheus instance is configured (#56510)" (#57551)
This reverts commit 3cbbf706cf.
2022-10-24 11:56:49 -05:00
brendamuir
e48fac9d91 Proposal for PR template text (#57267)
* Proposal for PR template text

* adds full stop
2022-10-24 16:51:26 +01:00
Zoltán Bedi
c0b778134e Revert: Query editor components from grafana-ui (#57436)
* Revert: QueryEditor components from grafana-ui

* Use local version of experimental

* Use experimental for query editor components

* Fix type issues in MSSQL

* point to actual version of experimental package

* point to latest version of experimental

Co-authored-by: Erik Sundell <erik.sundell87@gmail.com>
2022-10-24 17:12:36 +02:00
Galen Kistler
3cbbf706cf Prometheus: Provide label values match parameter API when supported prometheus instance is configured (#56510)
Provide label values API with match parameter when prometheus datasource has configured supported prometheus type and version
2022-10-24 09:47:35 -05:00
Ivana Huckova
3d7439d97d Loki: Fix input history (#57344) 2022-10-24 16:27:56 +02:00
Galen Kistler
7ecbc98b3e Prometheus: Type and flavor configuration (#56496)
* Adding two new fields to the data JSON in the prometheus datasource configuration: prometheusType, and prometheusVersion.
* Version field will attempt to auto-detect via buildinfo API when prometheus Type is selected
2022-10-24 09:26:32 -05:00
Gábor Farkas
8d0e24a622 explore: fix filtering logs-data in table-display (#57356) 2022-10-24 14:18:56 +00:00
Erik Sundell
017da781cf Cloudwatch: Refactor dimension values resource request (#57346)
* refactor dimension values backend

* fix test file name
2022-10-24 15:04:25 +02:00
Shirley
9ebed91eed CloudWatch: Refactor to extract DataQuery grouping by region out of request parsing (#57392)
* CloudWatch: Extract request parsing grouping by region from ParseQueries

* Rename ParseQueries to ParseMetricDataQueries
2022-10-24 14:57:32 +02:00
idafurjes
1bda67ab11 Chore: Delete unused mocks (#57512)
* Chore: Delete unused mocks

* Add back used methods

* Add back used mocks 2

* Add back used mocks 3

* Add back used mocks 4

* Add back the alerting mocks

* Remove mock variables

* Add bacl needed mock var
2022-10-24 14:00:22 +02:00
Karl Persson
78c849ac29 RBAC: Fetch service account permissions in oss (#57343) 2022-10-24 12:11:59 +02:00
Eric Leijonmarck
924d6a82a3 add: postgresql as a database for resolving conflicts (#57466) 2022-10-24 10:59:26 +01:00
Andrej Ocenas
67aa99af78 NodeGraph: Fix rendering issues when values of arc are over 1 (#57460) 2022-10-24 11:28:49 +02:00
Yaelle Chaudy
6ee69853dc Datasource Config Editor: Add event-based funnel for measuring CVR (#55105)
* Added start event on adding new DS from datasources/new page

* Added end event + tests

* revert analytics.ts changes

* revert azure tracking changes

* changed version in doc

* update props name for consistency with plugin-platform PR to come

* Updated tests
2022-10-24 11:09:26 +02:00
Gabriel MABILLE
fce0a49284 LDAP: inline toml with devenv (#57499) 2022-10-24 11:01:58 +02:00
Armand Grillet
42871fcb2a Clarify notification policies. (#57465) 2022-10-24 09:46:04 +01:00
Joey Tawadrous
52dbd67a11 Node Graph: Always show context menu (#56876)
* Ensure context menu always appears

* Close the context menu after selecting the alternative layout

Co-authored-by: Hamas Shafiq <hamas.shafiq@grafana.com>
2022-10-24 09:14:42 +01:00
Adela Almasan
73c215ae41 Canvas: Button element (alpha) (#57491) 2022-10-23 20:39:10 -04:00
Artur Wierzbicki
6e3de8d016 gRPC Server: Fix logging unauthenticated request error (#57490) 2022-10-23 03:51:23 +08:00
ismail simsek
4053cbea38 Fix broken image links (#57480) 2022-10-22 09:15:45 -07:00
Leon Sorokin
0640eeef0a Number formatting: only 0-trim decimals in y axis ticks. omit currency, locale units. (#57386) 2022-10-21 21:35:29 -06:00
Leon Sorokin
45707ccf99 TimeSeries: fix negative stacked percent y-axis range (#57470) 2022-10-21 15:45:00 -06:00
Ezequiel Victorero
1f3d34ecda PublicDashboards: service and store methods rename (#57463) 2022-10-21 18:25:20 -03:00
Alexander Weaver
de46c1b002 Alerting: Improve logs in state manager and historian (#57374)
* Touch up log statements, fix casing, add and normalize contexts

* Dedicated logger for dashboard resolver

* Avoid injecting logger to historian

* More minor log touch-ups

* Dedicated logger for state manager

* Use rule context in annotation creator

* Rename base logger and avoid redundant contextual loggers
2022-10-21 16:16:51 -05:00
Ryan McKinley
910154c102 ObjectStore: Add folder to kind registry (#57461) 2022-10-21 16:48:32 -04:00
owensmallwood
0b8fb543fc Public Dashboards: Can toggle annotations in modal (#57312)
adds toggle for pubdash annotations
2022-10-21 13:42:14 -06:00
Zoltán Bedi
7f3b567657 TimeSeries: Fix stacking when first value is negative zero (#57257)
* TimeSeries: Fix stacking when first value is negative zero

* More test + refactor
2022-10-21 20:58:23 +02:00
Emil Tullstedt
2c9526fdf7 Docs: Update errors documentation (#57402)
Expand on what a base should represent and update some out of date info.
2022-10-21 20:50:29 +02:00
lean.dev
654db452cd Public Dashboards: Fixing annotations validations for public dashboards (#57455) 2022-10-21 12:06:39 -03:00
Hamas Shafiq
07ac388e8b Tempo: Update the query whenever the value of the TraceQL editor changes (#57199) 2022-10-21 16:01:53 +01:00
Kristina
5d7d54d076 Auth: Write the redirect cookie if denied - do not write a blank redirect (#57381)
* Write the redirect cookie if denied - do not write a blank redirect

* Remove redundant code, reverse polarity
2022-10-21 09:53:17 -05:00
bikashmishra100
98053cfde8 Tempo: Add start time and end time parameters while querying traces (#48068)
* Add start time and end time parameters while querying tempo traces

* Added configurable time shift to query by trace id

* Test that the URL is formatted correctly

* Added test to check for time shift

* Improved label and tooltip of new time shift settings

Co-authored-by: André Pereira <adrapereira@gmail.com>
2022-10-21 15:38:10 +01:00
Yuriy Tseretyan
245c1ee3d3 Chore: Add last downsampling function to Resample expression (#57379) 2022-10-21 10:03:43 -04:00
Sonia Aguilar
cd0e0fcc53 fix: add alerting enabled condition FOR adding alerting tab in folder view (#57434) 2022-10-21 15:32:59 +02:00
Sven Grossmann
842b629cd1 use inherited colors on svg (#57427) 2022-10-21 15:24:02 +02:00
Karl Persson
d55e5b8862 [main] Login email before username (#57400)
* Swap order of login fields

* Validate email field before validating the username field.

Co-authored-by: linoman <2051016+linoman@users.noreply.github.com>
2022-10-21 15:21:21 +02:00
Ashley Harrison
7e631e7239 A11y: Enable jsx-a11y/interactive-supports-focus (#57391)
* first batch of fixes for interactive-supports-focus

* remove role and aria attributes since this won't be focusable to a screenreader anyway
2022-10-21 13:52:46 +01:00
Beto Muniz
9fb6cdae8a Support resize Flux Query Editor (#57214) 2022-10-21 09:40:09 -03:00
Ezequiel Victorero
5b9959014c PublicDashboards: refactor service (#57372) 2022-10-21 09:37:38 -03:00
Victor Marin
f161c5407a OutsideRangePlugin: Exclude leading and trailing null values when checking limits (#57335)
* OutsideRangePlugin: Exclude null limit values from calculation

* refactor

* Update OutsideRangePlugin.tsx

Co-authored-by: Leon Sorokin <leeoniya@gmail.com>

Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
2022-10-21 08:33:21 -04:00
Marcus Efraimsson
6f8fcae01b [main] Plugin fixes (#57399)
* Plugins: Remove support for V1 manifests

* Plugins: Make proxy endpoints not leak sensitive HTTP headers

* Security: Fix do not forward login cookie in outgoing requests

(cherry picked from commit 4539c33fce)

Co-authored-by: Will Browne <wbrowne@users.noreply.github.com>
2022-10-21 13:54:55 +02:00
brendamuir
af17123b5f Docs: fixes silences typo (#57418) 2022-10-21 12:48:33 +01:00
Josh Hunt
e417387bc7 I18n: Add German (#57397) 2022-10-21 11:47:17 +01:00
Josh Hunt
fc75076b72 I18n: Show languages in local names (#57367)
* I18n: Show languages in local names

* fixed test
2022-10-21 05:29:03 -04:00
Konrad Lalik
5c710a5590 Alerting: Add Alertmanager choice warning (#55311) 2022-10-21 11:01:07 +02:00
Laura Fernández
e402a8f27d A11y: enable rule jsx-a11y/anchor-is-valid (#56690) 2022-10-21 09:13:32 +02:00
Leon Sorokin
7eac79b5f8 Number formatting: Strip trailing zeros after decimal point when decimals=auto (#57373) 2022-10-20 17:56:21 -05:00
Leon Sorokin
883d61d191 Transformers: PartitionByValues (#56767)
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2022-10-20 17:22:02 -05:00
Brendan O'Handley
60b14a2ec2 Opentsdb: Allow template variables for filter keys (#57226)
* allow template variables for filter keys

* add types to interpolate var function
2022-10-20 15:53:29 -05:00
Brendan O'Handley
c34c1d0cb4 Graphite: Never escape asPercent function params as string (#56593)
* handle asPercent func by never esc params as string

* add test and clean up
2022-10-20 15:49:40 -05:00
Adela Almasan
5128659d19 Canvas: Improve text element readability (#57371) 2022-10-20 15:01:28 -05:00
lean.dev
552d9d70eb PublicDashboards: Validate access token (#57298)
Adding validation for access token
2022-10-20 16:43:33 -03:00
Alexander Weaver
5ee4744d62 Alerting: Improve operational logs in sender package (#57134)
* Audit logs in sender package

* Fix casing and touch up a few key names

* Avoid logging entire alert struct

* Log configuration ID being applied

* Revert change to errorf rather than log

* Tune levels further and remove some redundancies

* Adjust logger naming and standardize log context

* Adjust logger naming in router

* Move log and get rid of dead error handling code
2022-10-20 14:19:04 -05:00
Yuriy Tseretyan
f3c219a980 Alerting: update format of logs in scheduler (#57302)
* Change the severity level of the log messages
2022-10-20 13:43:48 -04:00
Josh Hunt
8cebaf345d User: Fix externalUserId not being populated (#57341) 2022-10-20 18:12:53 +01:00
Sonia Aguilar
a61e044d00 Contact points tab: Remove error count in integrations details and show only Error label (#57325) 2022-10-20 18:24:32 +02:00
Sergey Kostrukov
47eb7f785d Use resource call query_result query (#57232) 2022-10-20 09:46:36 -05:00
Hamas Shafiq
84a5ced72a Tempo: Integrate TraceQL API (#56867) 2022-10-20 10:44:59 -04:00
Zoltán Bedi
0232927591 CODEOWNERS: Change owner for DateTimePickers (#57357)
Also remove @jessover9000 as she is not part of grafana anymore 😢
2022-10-20 16:32:48 +02:00
Guilherme Caulada
96a97f9827 Build: Add github release command to build/cmd (#56349)
* Add github release command to build/cmd

* Use go-github library and implement dry-run

* Make tag optional and default to metadata

* Fix minor bug with tag default

* Make some refactors to ease testing

* Add tests for publish github command

* Refactor publish github tests

* Refactor test helper function name

* Isolate local test
2022-10-20 11:11:53 -03:00
Josh Hunt
4b68918b0b I18n: Update crowdin config and codeowners (#57264)
* update config and codeowners for i18n

* update codeowners
2022-10-20 14:59:02 +01:00
mikkancso
a4e66a2a01 Connections: New "Connect data" page with data source catalog (#56772)
* remove Plugins and CloudIntegrations tab and add ConnectData tab

* ConnectData: add Search component and use it

* ConnectData: add DataSourcePluginList component

* add CardGrid component

* add CategoryHeader component

* ConnectData: restructure content

DataSourcePluginList is removed, because its responsibilities are
actually the same as ConnectData's responsibilities.

NoResults was added as a reusable component, and was moved out of
CardGrid, since there could be more CardGrid on one page, but only one
NoResults.

* fix spacer

* use LoadingPlaceholder

* CardGrid: add margin

* generalize CardGridProps

* move isLoading and error into CardGrid

We'd like CardGrid to be reusable, even multiple times within a page.
In this case, it's better UX if we show the loading or error states per
card grid, not for the whole page.

* ConnectData: fix NoResults condition

* fix and add meaningful tests

* fix indentation

* move isLoading and error back to ConnectData

* make `url` required for CardGrid items
2022-10-20 15:53:10 +02:00
Sriram
8b2d35bdb9 updated plugin-ci go dependency to 1.19.2 (#57200) 2022-10-20 14:50:22 +01:00
Joey Tawadrous
5e27a6f276 Flame Graph: Fix for dashboard scrolling (#56555)
* Flamegraph dash scrolling

* Separate scroll for top table and for flame graph

* Custom scroll behavior for explore vs vs dash etc and sticky flame graph header

* Final UI tweaks

* Update tests
2022-10-20 14:20:48 +01:00
Gabriel MABILLE
f184f9211c GoogleOAuth: Unlock UI (#57350) 2022-10-20 14:52:36 +02:00
Ivana Huckova
ef78f03a6f Loki: Fix the name of exported component from LokiQueryEditor.tsx (#57340)
* Loki: Fix editor

* Fix names
2022-10-20 14:49:55 +02:00
Grafana I18n Bot
060c804449 I18n: Crowdin sync (#57345)
* New translations grafana.json (French)

* New translations grafana.json (Spanish)

* New translations grafana.json (German)

* New translations grafana.json (Chinese Simplified)
2022-10-20 12:37:47 +00:00
Ashley Harrison
630c18d79d make border-radius part of the base styles so focus styles are consistent (#57353) 2022-10-20 13:34:14 +01:00
Timur Olzhabayev
66d2fe7d9d Fixing upload failure (#57290) 2022-10-20 14:18:33 +02:00
Leon Sorokin
79afad3888 StateTimeline: fix hover overlays when browser-zoomed (#57224) 2022-10-20 06:02:29 -06:00
Erik Sundell
b0c2ca6c1b Cloudwatch: Refactor dimension keys resource request (#57148)
* use new layered architecture in get dimension keys request

* go lint fixes

* pr feedback

* more pr feedback

* remove not used code

* refactor route middleware

* change signature

* add integration tests for the dimension keys route

* use request suffix instead of query

* use typed args also in frontend

* remove unused import

* harmonize naming

* fix merge conflict
2022-10-20 12:53:28 +02:00
Jo
7f3536a6d2 OAuth: Fix misleading warn log related to oauth and increase logged content (#57336)
* only emit warn log when sync is not skipped. Fix warn log that had wrong recommendation

* log presence of refresh token
2022-10-20 05:50:12 -04:00
Ivana Huckova
3ee450e66b Loki: Remove unused query editors (#57192)
* Loki: Remove not used query editors

* Move Loki editor to components and rename

* Update public/app/plugins/datasource/loki/components/LokiQueryEditorByApp.test.tsx

Co-authored-by: Matias Chomicki <matyax@gmail.com>

* Fix test

Co-authored-by: Matias Chomicki <matyax@gmail.com>
2022-10-20 11:46:48 +02:00
Shirley
cadc6088db CloudWatch: move QueryData input parsing types to separate package (#57165)
* CloudWatch: move parse request types separate package

* Move metric query constants, unexport metricDataQuery json decoding type

* Unexport isSearchExpression
2022-10-20 11:21:13 +02:00
brendamuir
ee6ff18122 Docs: fixes endpoint for mimir (#57330) 2022-10-20 09:39:19 +01:00
Gábor Farkas
e8cad52132 devenv: fix loki&elastic naming conflict (#57268) 2022-10-20 07:49:52 +00:00
Karl Persson
764d5b9929 RBAC: Cleaup team api rbac tests (#57265)
* RBAC: Remove the access control evaluator fake

* API: Change to use access control implementation instead of mocks with
rbac disabled in tests

* Tests: Set cfg and access control defaults after applying options

* Tests: Rewrite team legacy access control tests

* Tests: Add helper function to create user with permissions

* Tests: set fake quota service as default

* Team: Add ExpectedTeamDTO and set in query result

* RBAC: Revert change

* RBAC: Add deprecation notice to mock
2022-10-20 09:11:47 +02:00
Victor Marin
0dd721d4ce StatuHistoryPanel: Fix zoom not working (#57240) 2022-10-20 09:15:51 +03:00
Ryan McKinley
ed1176adc8 Storage: export dashboards + playlists to object store (#57313) 2022-10-19 17:05:51 -07:00
Ryan McKinley
e3c2859e83 Geomap: Upgrade to openlayers 7.x (#57317) 2022-10-19 17:03:44 -07:00
Alexander Weaver
3ddb28bad9 Find-and-replace 'err' logs to 'error' to match log search conventions (#57309) 2022-10-19 17:36:54 -04:00
Ezequiel Victorero
3e6bdf0439 PublicDashboards: filter by permissions on audit list (#57228) 2022-10-19 17:24:00 -03:00
Kristina
d81a3e524d Panel Menu: Use config explore enabled as an override to access control (#57225)
* Use config explore as an override to access control

* Change logic to need something explicitly false

* Keep logic consistent
2022-10-19 15:21:40 -05:00
Leon Sorokin
bdb97496ec Routing: an unexpected spelling error happened (#57295) 2022-10-19 16:01:50 -04:00
Yuriy Tseretyan
3e6bc28de5 Alerting: Change severity level of fetcher log messages (#57299) 2022-10-19 16:00:47 -04:00
juanicabanas
4418d78440 PublicDashboards: Delete public dashboard when dashboard is deleted (#57291)
PublicDashboards: Delete public dashboard when dashboard is deleted
2022-10-19 16:47:08 -03:00
Alexander Weaver
4eb8e4ff66 Alerting: Add traceability headers for alert queries (#57127)
* Define EvaluationContext

* Refactor ConditionEval to use new context struct

* Refactor QueriesAndExpressionsEval to use EvaluationContext

* Remove dead field from AlertExecCtx

* Refactor Validate to use EvaluationContext

* Get rid of privately used AlertExecCtx

* Move EvaluationContext to new file and add helper

* Add builder pattern and bind rule info to context

* Extract header logic and add rule UID header

* Fix missing call
2022-10-19 14:19:43 -05:00
Santiago
85cda0db69 Alerting: Templated URLs for webhook type contact points (#57296)
* templated URLs for webhooks

* clear tmplErr before using tmpl() again
2022-10-19 16:14:53 -03:00
Garrett Guillotte
c70bb592fe Docs: Fix reference to Enterprise licensing restrictions (#57230) 2022-10-19 13:20:47 -05:00
Garrett Guillotte
a0d83e7db7 Docs: Add missing alias for field options (#57234) 2022-10-19 14:13:17 -04:00
Michael Mandrus
86b0581021 add public dashboard token to metric panel issued queries (#57293) 2022-10-19 13:29:19 -04:00
Selene
8a35cb57fa Fix null pointer (#57292) 2022-10-19 13:20:03 -04:00
Gabriel MABILLE
717bd4a6c0 RBAC: Add a feature toggle for primitives we provide to OnCall (#57289) 2022-10-19 18:10:09 +02:00
Zoltán Bedi
09ab156480 MSSQL: Support tables from all schemas (#53099) 2022-10-19 17:27:29 +02:00
Ivana Huckova
7928f170ce Loki: Fix adding of adhoc filters to stream selector when query with empty stream selector (#57280)
* disable double stringify

* Refactor test for addLabelToQuery

* Add tests (TDD for expected behaviour)

* Fix adding ad hoc filters to correct place when no stream selector

* Update

* Update comment

* Fix getAllPositionsInNodeByType

Co-authored-by: Sven Grossmann <svennergr@gmail.com>
2022-10-19 17:24:00 +02:00
Garrett Guillotte
e14ef50d02 Docs: Fix broken InfluxDB starting guide links (#57235)
* Docs: Fix broken InfluxDB starting guide links

* Docs: Fix another link to panel adding docs
2022-10-19 07:52:15 -07:00
Garrett Guillotte
9680249066 Docs: Fix links in old What's New docs (#57231)
* Docs: Fix placeholder URL in release notes link

* Docs: Fix link to refactored docs and add missing alias

* Docs: Fix malformed links

* Docs: Fix alias with correct path
2022-10-19 07:51:49 -07:00
Ryan McKinley
15517f8329 SQLX: Expose sqlxdb query functions (#57227) 2022-10-19 07:33:40 -07:00
Ryan McKinley
de3737b5de Store: Add resolver service (#57112) 2022-10-19 07:33:26 -07:00
Matias Chomicki
93f39b5178 Loki Monaco Editor: add missing documentation and new autocompletion type (#57186)
* feat(loki-monaco-editor): add documentation and pipe operators

- Added documentation for line filters
- Added documentation for parsers
- Improved parser suggestions
- Introduced new PIPE_OPERATION category
- Added missing label_format pipe operation

* feat(loki-monaco-editor): update tests

* Chore: remove unused completion type

* Chore: remove line format
2022-10-19 10:30:44 -04:00
Ashley Harrison
2987734832 only get organizations if user is signed in (#57279) 2022-10-19 14:24:52 +01:00
Galen Kistler
0b66abba18 add case for empty influxdb 1 versions, so the health check doesn't fail (#56426) 2022-10-19 08:15:32 -05:00
Kristin Laemmert
05709ce411 chore: remove sqlstore & mockstore dependencies from (most) packages (#57087)
* chore: add alias for InitTestDB and Session

Adds an alias for the sqlstore InitTestDB and Session, and updates tests using these to reduce dependencies on the sqlstore.Store.

* next pass of removing sqlstore imports
* last little bit
* remove mockstore where possible
2022-10-19 09:02:15 -04:00
AJ Tomko
5285d34cc0 Dashboard: Alerts user to incorrect tag format for JSON import (#54657)
* Dashboard: Alerts user to incorrect tag format for JSON import

Fixes #54285: Malformed tags cause hidden title and settings page crash

* Update public/app/features/manage-dashboards/utils/validation.ts

Co-authored-by: Polina Boneva <13227501+polibb@users.noreply.github.com>

* Included Suggestions

- Removed Comments
- Updated Code Block accordingly
- Updated Tests to camelCase over snake_case

* Updates per comments

- Re-wrapped function in try{}, catch{} as I appear to have overlooked including it in the initial refactor
- Re-worded errors to align with initial error
- Added a test case for invalid json

* Update validation.ts

Updated errors to read correctly to the root cause.
Updated dashboard variable as const.

* Update actions.test.ts

Fix tests according to error output rewording

* Update validation.ts

- Included test for an empty string of non-array

* Update actions.test.ts

-- Commented incorrect commit for validation.ts, update:
- Refactored code to better align and separate from generic JSON package tests followed by our manual checks of (1) Is array, and (2) if array, is of strings

- Test cases now include a check for non-array empty string in the tag property

Co-authored-by: Polina Boneva <13227501+polibb@users.noreply.github.com>
2022-10-19 08:59:24 -04:00
Garrett Guillotte
e52c98ba99 Docs: Fix links in panels and vis docs (#57233) 2022-10-19 07:41:34 -05:00
Hamas Shafiq
f50ab457bd Tempo: Fix Node Graph visualization type in dashboard (#56931)
Co-authored-by: Andrej Ocenas <mr.ocenas@gmail.com>
2022-10-19 13:11:33 +01:00
Grafana I18n Bot
de24a444b5 I18n: Crowdin sync (#57260)
* New translations grafana.json (French)

* New translations grafana.json (Spanish)

* New translations grafana.json (German)

* New translations grafana.json (Chinese Simplified)
2022-10-19 12:14:55 +01:00
Dimitris Sotirakis
e829b50149 CI: Add CreateTempDir func and use it in publish packages logic (#57171)
* Add CreateTempDir func and use it in publish packages logic

* Fill err return in defer func
2022-10-19 12:58:22 +02:00
Ivana Huckova
b4a03d0cff Loki: Fix explain section about $__interval variable (#57188)
* Loki: Update  explain section

* Update

* Update public/app/plugins/datasource/loki/querybuilder/operationUtils.ts

Co-authored-by: Matias Chomicki <matyax@gmail.com>

Co-authored-by: Matias Chomicki <matyax@gmail.com>
2022-10-19 12:01:29 +02:00
Sven Grossmann
598da14d88 disable double stringify (#57243) 2022-10-19 11:58:16 +02:00
Karl Persson
9adaf1565c RBAC: Allow to list users for dashboard / folder admins (#57080)
* RBAC: Use query struct in tests

* RBAC: If access control enforcement is disabled don't filter out users
when fetching permissions
2022-10-19 11:53:59 +02:00
Dimitris Sotirakis
0b72c36527 Replace json decoder with io.ReadAll (#57178) 2022-10-19 12:51:24 +03:00
Ivana Huckova
b997bc4200 Loki: Remove already selected options from next label filter options in builder (#57187)
* Loki: Filter out duplicated options in loki query builder label name options

* Update test
2022-10-19 11:32:01 +02:00
Gareth Dawson
c0f5183330 Logs: Add feature tracking to the load more button in log row context (#57079)
* add feature tracking for the load more button in log row context

* fix test by mocking reportInteraction

* track the new log row limit
2022-10-19 10:02:26 +01:00
Gareth Dawson
20616eef8c Logs: Add feature to tracking show context button click (#57074)
* report interaction on context open

* report interaction on context close_esc

* replace deprecated feature (KeyboardEvent.keyCode)

* update to report interaction on toggle context

* remove redundant if statement
2022-10-19 10:01:45 +01:00
Ashley Harrison
96660992f4 Navigation: Ignore null children in ToolbarButtonRow (#57201)
* filter out any null buttons to prevent padding being added for them

* ignore null children in toolbarbuttonrow
2022-10-19 10:00:57 +01:00
Gábor Farkas
0491c19712 elastic: backend-mode: fix trimEdges functionality (#56985) 2022-10-19 10:40:42 +02:00
Dimitris Sotirakis
f0b882ebad Add token to init-enterprise (#57246) 2022-10-19 04:23:12 -04:00
Erik Sundell
8949e574e6 cache api calls when args are the same (#57082) 2022-10-19 08:40:03 +02:00
Erik Sundell
a30885c523 CloudWatch: Make sure adoption tracking is done on valid, migrated queries (#56872)
* make sure adoption tracking is done on valid, migrated queries

* ignore hidden queries

* fix test

* remove obsolete test
2022-10-19 08:39:18 +02:00
aimuz
c0cc85b5f1 Alerting: Add support for wecom apiapp (#55991)
This change adds new functionality to the wecom alerting contact point. In addition to a webhook address, you can now send alerts to the wecom apiapp endpoint.

Based on https://github.com/grafana/grafana/discussions/55883

Signed-off-by: aimuz <mr.imuz@gmail.com>
2022-10-19 12:17:37 +08:00
owensmallwood
b2408dd7c5 Publicdasboards: Add annotations support (#56413)
adds annotations support for public dashboards
2022-10-18 19:48:20 -06:00
Sobuno
cc6245df8e Fix typo (#57223) 2022-10-18 22:52:56 +00:00
Ezequiel Victorero
22b5e574b1 PublicDashboards: hide topnav (#56873) 2022-10-18 19:51:09 -03:00
Christopher Moyer
cafdbc1644 restructures directories, corrects relrefs (#57130) 2022-10-18 15:07:15 -05:00
Christopher Moyer
e5fc1b85e0 restructures directories, correct relrefs (#57131) 2022-10-18 15:06:58 -05:00
Michael Mandrus
2a8a82e2af PublicDashboards: Don't filter datasources from FrontendSettings in a public dashboard (#57208)
* add filter skip to avoid issues with RBAC

* update comment
2022-10-18 15:44:33 -04:00
Torkel Ödegaard
69bfd923be RefreshPicker: Fix issue clearing auto refresh (#57215) 2022-10-18 21:41:37 +02:00
Kristina
3cb1ec58f0 Add information about tempo in devenv (#57204) 2022-10-18 14:29:28 -05:00
Sarah Zinger
b2e2879b07 Cloudwatch: Fix issue where selected log groups clear from dashboards if there are more than 50 results (#57196) 2022-10-18 14:34:27 -04:00
Misi
9c954d06ab Auth: Refresh OAuth access_token automatically using the refresh_token (#56076)
* Verify OAuth token expiration for oauth users in the ctx handler middleware

* Use refresh token to get a new access token

* Refactor oauth_token.go

* Add tests for the middleware changes

* Align other tests

* Add tests, wip

* Add more tests

* Add InvalidateOAuthTokens method

* Fix ExpiryDate update to default

* Invalidate OAuth tokens during logout

* Improve logout

* Add more comments

* Cleanup

* Fix import order

* Add error to HasOAuthEntry return values

* add dev debug logs

* Fix tests

Co-authored-by: jguer <joao.guerreiro@grafana.com>
2022-10-18 18:17:28 +02:00
Artur Wierzbicki
984ec00aac Search: load dashboards optimization (#56933)
* search: load dashboards optimization

* search: load dashboards optimization

* search: close dashboard channel, return error when context is done

* search: refactor

* search: return err on ctx done

* search: remove sleep
2022-10-18 23:53:15 +08:00
Torkel Ödegaard
ca98dba053 Page: Refine responsive paddings and margins (#57132) 2022-10-18 17:43:09 +02:00
Victor Marin
e91135cf19 Fix NumberInput empty values (#57142)
* Fix NumberInput empty values

* tests

* tests
2022-10-18 16:59:34 +03:00
juanicabanas
71f79b9de0 PublicDashboards: Fix hidden queries execution (#57004)
PublicDashboards: Fix hidden queries execution
2022-10-18 10:47:24 -03:00
ying-jeanne
ed98d7bc27 Chore: remove busmock (#57170) 2022-10-18 13:31:56 +00:00
Sven Grossmann
4b1b0344e4 Chore: update latest.json to 9.2.1 (#57185) 2022-10-18 15:26:17 +02:00
Victor Marin
9c514748f7 Revert data links code for sorted vector case (#57175) 2022-10-18 08:59:53 -04:00
Grot (@grafanabot)
4cee910971 Changelog: Updated changelog for 9.2.1 (#57176) 2022-10-18 14:45:30 +02:00
Gilles De Mey
423643aaa6 Alerting: use virtualized list of namespaces / groups for cloud rules (#56415) 2022-10-18 13:38:59 +02:00
Eric Leijonmarck
fa45742abc Quota(fix): remove service accounts from quota count (#56700) 2022-10-18 12:26:38 +01:00
Victor Marin
76d6e3c075 TimeseriesPanel: Fix variables in data links (#56729)
* TimeseriesPanel: Fix variables in data links

* Refactor variable fix for all Timeseries panels

* cr mods
2022-10-18 14:22:31 +03:00
Ashley Harrison
178b05160a make betterer a required step on PRs again (#57099) 2022-10-18 12:22:13 +01:00
Julien Duchesne
44ad4ec9d4 Add RPM package publishing (#56797)
Just tested deb publishing, and confirmed it works. Noticed that RPM packages aren't published though
It's the exact same step, targetting the RPM files instead
Both steps will run in parallel

Co-authored-by: dsotirakis <dimitrios.sotirakis@grafana.com>
2022-10-18 13:41:23 +03:00
Matias Chomicki
d2abcbe4a5 feat(loki-monaco-editor): improve line filter suggestions (#57103) 2022-10-18 12:40:12 +02:00
Laura Fernández
4d0dd0647e Browse: Fix General folder not showing in FolderPicker (#57156) 2022-10-18 12:38:51 +02:00
Gabriel MABILLE
3963ed3754 RBAC: Allow access to /dashboards when user has dashboards create (#56712)
* RBAC: Allow access to dashboards when user has dashboards create

* Remove eval any that I didn't add on purpose
2022-10-18 11:15:52 +02:00
Shirley
65939ce5b1 CloudWatch: Move logger to its own package and minor refactoring (#57107)
* Move log to its own package

* Rename test-data to testdata

* Change alias to string type

* Remove parseQueries from a method of cloudWatchExecutor
2022-10-18 04:21:18 -04:00
Gábor Farkas
2815343ee5 logs: handle mixed datasources in filters (#56560)
* logs: handle mixed datasources in filters

* removed unnecessary special handling

* added explanation comment

* more consistent type-handling
2022-10-18 09:27:17 +02:00
Erik Sundell
36734f3cef CloudWatch: Move hard coded metrics, namespaces and dimensions to its own package (#57089)
* move hard coded metrics to its own package

* remove comment
2022-10-18 09:23:47 +02:00
Dimitris Sotirakis
7a71482371 Update grabpl to 3.0.14 (#57144) 2022-10-18 02:44:31 -04:00
Artur Wierzbicki
c26cf6a517 Search: Sort alphabetically in the folder view, increase the limit of the folder search from 50 to 1000 (#57078)
* search: sort folders

* search: increase the limit for folder search to 1000

* add folder view sort test

* search: getFolderViewSort

* search: revert test

Co-authored-by: Todd Treece <todd.treece@grafana.com>
2022-10-18 14:10:53 +08:00
Matthew Jacobson
0db339d82f Alerting: Improve notification policies created during migration (#52071)
* Alerting: Improve notification policies created during migration

Previously, migrated legacy alerts were connected to notification policies through
a `rule_uid` label in a 1:1 fashion. While this correctly mimicked pre-migration routing,
it didn't create a notification policy structure that is easy to view/modify. In addition,
having one policy per migrated alert is, in some ways, counter to the recommended approach of
Unified Alerting.

This change replaces `rule_uid`-based migrated notification policies with a private
label called `__contacts__`. This label stores a list of double quoted strings containing the names of
all contact points an AlertRule should route to (based on legacy notification channels). Finally,
one notification policy is created per contact point with each matching AlertRules via regex on this
`__contacts__` label.

The result is a simpler, clearer, and easier to modify notification policy structure, with the
added benefit that you can see which contact points an AlertRule is being routed to from the
AlertRule creation page.
2022-10-18 00:47:39 -04:00
Guilherme Caulada
313c88f3e1 Reapply public dashboard granularity fix (#57129) 2022-10-17 22:11:59 -03:00
Adela Almasan
7f5914ff05 Canvas: Text input cursor jumping (#57133)
Co-authored-by: nmarrs <nathanielmarrs@gmail.com>
2022-10-17 18:36:18 -04:00
Jeff Levin
7146f2731c Public Dashboards: audit log paths and add traceId where user facing error is different (#56914)
Audit all paths for publicdashboards and implement traces where user facing error is different from the internal error.
2022-10-17 13:17:24 -08:00
Christopher Moyer
d09d39ddd4 Docs/restructures setup (#57125)
* builds out configure grafana directory to align with hugo

* restructures configure authentication, corrects relrefs

* correct alias

* corrects final relrefs
2022-10-17 15:24:33 -05:00
Santiago
6ad405e256 fix swagger spec for receivers API response (#57124) 2022-10-17 16:58:55 -03:00
Yuriy Tseretyan
888bdfd4ad Alerting: Use correct response body for silence post API (#57114) 2022-10-17 15:43:37 -04:00
Sofia Papagiannaki
46fb4081ba SQLStore: Optionally retry queries if sqlite returns database is locked (#56096)
* SQLStore: Retry queries if sqlite returns database is locked

* Configurable retries

* Apply suggestions from code review

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
2022-10-17 21:23:44 +03:00
Beto Muniz
920d2aa599 InfluxDB: Interpolate ad-hoc filters from Dashboard to Explore (#56996) 2022-10-17 13:28:54 -03:00
Ahmed
5c2b722287 Docs: Fix broken link (#57083)
* Docs: Fix broken link

* Update docs/sources/setup-grafana/configure-security/configure-authentication/auth-proxy.md

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
2022-10-17 09:09:31 -07:00
Jack Westbrook
24c04740e3 Grafana UI: Export prop types for queryfield, modal and field components (#57097)
* chore(grafana-ui): export prop types for queryfield, modal and field components

* docs(migration-guide): add notes for react peerdependencies and additional type exposure

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

Co-authored-by: Timur Olzhabayev <timur.olzhabayev@grafana.com>

Co-authored-by: Timur Olzhabayev <timur.olzhabayev@grafana.com>
2022-10-17 17:54:43 +02:00
brendamuir
b7feb34acf Fix broken relrefs (#57092)
* Fixes relrefs

* Fixes more relrefs
2022-10-17 08:54:00 -07:00
Garrett Guillotte
2bed451990 Docs: Contextualize base64 encoding in Basic Authorization (#57046) 2022-10-17 08:53:17 -07:00
kay delaney
ed71b7b884 Chore/React18: Remove enzyme slate tests and replace with e2e tests (#57095) 2022-10-17 16:31:59 +01:00
Dimitris Sotirakis
c96b6a6ab0 CI: Move CreateTempFile - use it for rpm/deb packages (#56990)
* Move CreateTempFile - use it for rpm/deb packages

* Fix typo

* Fix tests:
2022-10-17 16:23:57 +01:00
Jack Westbrook
fd0fcffc24 Toolkit: Fix Cannot use "import statement outside" error in tests (#57071) 2022-10-17 16:31:12 +02:00
Selene
ba6c715708 Chore: Delete unused db in orgs and use db in datasources (#57085)
* Delete unused db in orgs and use db in datasources

* Sort imports
2022-10-17 16:27:56 +02:00
Alexa V
6524a0b437 Chore: Rename grafana core PanelChrome and use grafana-ui - PanelChrome component (#56659) 2022-10-17 16:03:38 +02:00
Christopher Moyer
de1cfc120f Docs: adds modify dashboard settings docs (#56826)
* adds modify dashboard settings docs

* Quick updates

* minor corrections

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
2022-10-17 09:02:22 -05:00
kay delaney
5d53a983d8 React18: Update useCallback arg types where needed (#57084) 2022-10-17 14:52:12 +01:00
kay delaney
b1128e0b8c Chore/React18: Update context types where needed (#57018) 2022-10-17 13:29:44 +01:00
Torkel Ödegaard
0d9b321058 DashboardsList: Fixes issue with overflow hidden causing input focus state to be obscured (#57021) 2022-10-17 14:19:57 +02:00
Torkel Ödegaard
0f9e6dda2d Page: Refactor out section nav state logic and move it to SectionNav component (#57036) 2022-10-17 14:19:29 +02:00
Sonia Aguilar
3f26ffde94 Alerting: Add relativeTimeRange from dataSource when using Resample expresions (#56652)
* Fix: Add relativeTimeRange from dataSource when using Resample expression

* Add test for relativeTimeRange when updating resample expression

* update time range for expressions when data sources are updated

* Get data source recursively from expression up to the last query that this tree is referencing to

* Remove unnecessary produce from immer, and check if there is a cycle in the queries structure
2022-10-17 12:29:05 +02:00
Karl Persson
21792fdf37 RBAC: Make uid for managed role names deterministic during migrations (#56620)
* RBAC: Change the generate uid function to be deterministic so we can avoid collision

* RBAC: Use fmt.Errorf

* RBAC: Add comment

* RBAC: Export GenerateManagedRoleUID
2022-10-17 12:15:20 +02:00
brendamuir
ecc252429e Docs alerting: copy edit terraform provisioning (#55978) (#57068) 2022-10-17 11:48:39 +02:00
Esteban Beltran
0abf04a20f Toolkit: Remove unused close-milestone command (#57062)
* Toolkit: Remove unused close-milestone command

* Remove import line
2022-10-17 11:27:27 +02:00
Dimitris Sotirakis
27f072beb3 Don't trigger tag event when merging (#57063) 2022-10-17 12:27:10 +03:00
Jan Garaj
03248e9cd8 Alerting: Missing config option in the sample (#54179) 2022-10-17 11:10:41 +02:00
Ashley Harrison
3cca8e3676 any/type assertion fixes (#57009) 2022-10-17 10:10:10 +01:00
Dimitris Sotirakis
e25475b9c8 Make publish packages depend on compile-build-cmd and run from bin/build (#56713) 2022-10-17 10:58:36 +03:00
Labesse Kévin
c8402b4b50 GoogleCloudMonitoring: fix typo tooltip pre-processing (#57049) 2022-10-17 09:45:35 +02:00
Leon Sorokin
da39c7297b BarChart: use dashboard timezone for x axis (#57047) 2022-10-17 14:06:45 +07:00
Garrett Guillotte
4831091115 Docs: Fix provisioning table formatting (#57042) 2022-10-16 11:05:47 -05:00
Garrett Guillotte
0889c3ad07 Docs: Clarify and document dashboard URL query parameters for variables (#56055) 2022-10-15 18:07:25 -07:00
Vũ Quốc Phong
800754e7e8 Add document for jsondata field alertmanagerUid (#52895)
alertmanagerUid can be used to specify Alert Manager for a particular Prometheus/Loki data source.

Co-authored-by: Garrett Guillotte <garrett.guillotte@grafana.com>
2022-10-15 15:32:11 -07:00
Ben Golding
a46fa16b4e <Documentation> Document usage of environment variables/files in GitHub Auth login (#52891)
* Document usage of environment variables/files

* Updating Github Auth Login Documentation

Co-authored-by: Garrett Guillotte <100453168+gguillotte-grafana@users.noreply.github.com>

Co-authored-by: Garrett Guillotte <100453168+gguillotte-grafana@users.noreply.github.com>
2022-10-15 09:20:50 -07:00
Torkel Ödegaard
9f5e691994 Theme: Inter font (behind feature toggle) (#56441)
* Theme: Inter font change with new line-height

* Add it behind feature toggle

* make buildVariant easier to read + enforce integer multiples of 2 (#56486)

* Minor update

* Update

Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2022-10-15 16:22:33 +02:00
Alexander Weaver
129a28919b Alerting: Cache result of dashboard ID lookups (#56587)
* Create caching dashboard resolver

* A couple tests for dashboard resolving

* Log warning on not found

* Additional polish + review nits

* Move to singleflight instead of a plain mutex

* Store errors instead of -1 in cache and use reflection when reading

* Address linter error

* One more linter error
2022-10-14 15:48:02 -05:00
Kristin Laemmert
c61b5e85b4 chore: replace sqlstore.Store with db.DB (#57010)
* chore: replace sqlstore.SQLStore with db.DB

* more post-sqlstore.SQLStore cleanup
2022-10-14 15:33:06 -04:00
Garrett Guillotte
2b4d57fe60 Docs: Note end of release notes publication (#57013)
* Docs: Note cessation of release notes

* Docs: Update What's New index mention of release notes

* Docs: Update links and references to the release notes

* Docs: Fix relrefs

* Docs: Spellcheck
2022-10-14 18:24:32 +01:00
kay delaney
64b0f8072b Themes: Add color-scheme attribute to :root (#57001) 2022-10-14 16:30:07 +01:00
Michael Mandrus
ea8549b8c2 Datasources: Support mixed datasources in a single query (#56832)
* initial cut at refactor - need to run more tests

* fix unit tests

* change newly unused function to test helper

* create unit tests for parsing query requests that cover a range of cases

* add some comments

* rename function to avoid dev confusion
2022-10-14 10:27:06 -04:00
Yaelle Chaudy
2ccbb4d3a3 Configuration page: Fix dropdown menus keyboard a11y (#56986)
* Made dropdown menu keyboard accessible

* ul menu and left align
2022-10-14 15:57:45 +02:00
Josh Hunt
2e16d5499e Dashboard: Add dashboard validation warning to save drawer (#55732)
* add api route for validating a dashboard json

* add feature flag for showDashboardValidationWarnings

* tidy up

* comments and messages

* swagger specs

* fix typo

* more swagger

* tests!

* tidy test a little bit

* no more ioutil

* api will return different status code depending on validation error

* clean up

* handle 4xx errors

* remove console.log

* fix backend tests

* tidy up

* Swagger: Exclude alpha endpoints

Co-authored-by: Sofia Papagiannaki <1632407+papagian@users.noreply.github.com>
2022-10-14 09:51:05 -04:00
Arpit Bhardwaj
e4b1347ca5 Select Dropdown alignment fix (#56858) 2022-10-14 13:24:08 +00:00
Kristina
3dbb0f1659 Add in logic to send root datasource as override if needed (#56904) 2022-10-14 08:12:04 -05:00
George Robinson
2f85172718 Alerting: Remove blank comment (#56889) 2022-10-14 13:28:41 +01:00
Josh Hunt
8e512de308 I18n: update contributing docs (#56860)
* update contrib i18n docs

* update contrib i18n docs

* remove lingui references, rearrage plain js usage
2022-10-14 11:55:15 +01:00
Gabriel MABILLE
0f4d126109 AzureAD: Add option to force fetch the groups from the Graph API (#56916)
* Add a new option to systematically fetch AzureAD groups from the Graph API
2022-10-14 12:55:00 +02:00
Jorge Luis Betancourt
e4f2006cce Elasticsearch: Fix calculation of trimEdges (#56148)
* Elasticsearch: Fix calculation of trimEdges

When a value of trimEdges is set greater than 1 we need to drop both the
first and last sample of the data from the response.

* Elasticsearch: Fix reading trimEdges from the query settings

Currently the trimEdges property in the JSON panel is stored as a string
and not directly as a number.

This caused that the reading of the value failed in the go backend
because the simplejson.Int() method doesn't properly handle this case.
This failure when decoding the value goes unnoticed because of the early
return causing the trimEdges configuration to be ignored.

* Refactor castToInt to also return an error

Add a new test case that sets the `trimEdges` property as a quoted
number.
2022-10-14 12:53:12 +02:00
GitStart
4ecc9f42ac Last Table Column Not Centered (#56047)
Co-authored-by: gitstart <gitstart@gitstart.com>
Co-authored-by: gitstart <gitstart@users.noreply.github.com>
Co-authored-by: Nitesh Singh <nitesh.singh@gitstart.dev>
Co-authored-by: Thiago Nascimbeni <tnascimbeni@gmail.com>
Co-authored-by: Rubens Rafael <70234898+RubensRafael@users.noreply.github.com>
Co-authored-by: RubensRafael <rubensrafael2@live.com>
Co-authored-by: Rafael Toledo <87545086+Toledodev@users.noreply.github.com>
Co-authored-by: Matheus Muniz <87545749+matheusmuniz03@users.noreply.github.com>
Co-authored-by: Matheus Muniz <matheusmuniz100@hotmail.com>
Co-authored-by: Matheus Benini Ferreira <88898100+MatheusBeniniF@users.noreply.github.com>
Co-authored-by: Murilo Amaral <87545137+MuriloAmarals@users.noreply.github.com>

Co-authored-by: gitstart <gitstart@users.noreply.github.com>
Co-authored-by: gitstart <gitstart@gitstart.com>
Co-authored-by: Nitesh Singh <nitesh.singh@gitstart.dev>
Co-authored-by: Thiago Nascimbeni <tnascimbeni@gmail.com>
Co-authored-by: Rubens Rafael <70234898+RubensRafael@users.noreply.github.com>
Co-authored-by: RubensRafael <rubensrafael2@live.com>
Co-authored-by: Rafael Toledo <87545086+Toledodev@users.noreply.github.com>
Co-authored-by: Matheus Muniz <87545749+matheusmuniz03@users.noreply.github.com>
Co-authored-by: Matheus Muniz <matheusmuniz100@hotmail.com>
Co-authored-by: Matheus Benini Ferreira <88898100+MatheusBeniniF@users.noreply.github.com>
Co-authored-by: Murilo Amaral <87545137+MuriloAmarals@users.noreply.github.com>
2022-10-14 13:25:40 +03:00
Gareth Dawson
b047316ef4 Logs: Add feature tracking to the replace line button (#56883) 2022-10-14 11:10:53 +01:00
Ashley Harrison
a904372269 Accessibility: enable rule jsx-a11y/no-noninteractive-element-to-interactive-role (#56870)
* enable rule `jsx-a11y/no-noninteractive-element-to-interactive-role` and switch to extending recommended preset

* fix unit tests

* better unit test
2022-10-14 11:02:01 +01:00
kay delaney
e85917f041 Chore/React18: Update component prop types (#56898) 2022-10-14 10:24:32 +01:00
Leon Sorokin
4eea326ee8 Candlestick: re-init config when series length changes (#56913) 2022-10-14 04:12:28 -05:00
Leon Sorokin
53ac77d4a5 Heatmap: honor dashboard timezone in x axis and fix tooltip time range (#56909) 2022-10-14 04:11:20 -05:00
sam boyer
7767002e12 dashboards: Use @grafanamaturity(NeedsExpertReview) in schema (#56888) 2022-10-14 05:10:39 -04:00
Victor Marin
b374b01260 MSSQL/MySQL: Add correct refId when fetching variable query results (#56919) 2022-10-14 11:52:12 +03:00
Victor Marin
902a230867 MSSQL/MySQL: Fix variable interpolation (#56879)
* MSSQL/MySQL: Fix variable interpolation

* Escape string vars
2022-10-14 11:52:08 +03:00
kay delaney
e819ed0f51 PlotLegend: Memoize for better performance (#56123) 2022-10-14 09:51:27 +01:00
Matias Chomicki
08ffcfdf16 feat(loki-monaco-editor): escape autocompleted label values (#56890) 2022-10-14 08:29:03 +00:00
Konrad Lalik
e5d644d991 Alerting: Fix source and rule name decoding on Find route (#56805) 2022-10-14 10:06:00 +02:00
Konrad Lalik
9d0380cbdd Alerting: Fix folder picker clear action (#56864) 2022-10-14 08:48:05 +02:00
Nathan Marrs
527690d19a Docs: Fix Canvas doc link and add call to action for feedback (#56908)
* Fix canvas documentation link on what's new page; add feedback CTA in canvas doc

* PORK: replace allows with enables for better language

* Fix a few more instances of allow to enable

* Move feedback above video in intro canvas section

* Revert changing link change
2022-10-13 19:02:44 -07:00
Christopher Moyer
385079bea7 Docs: Basics docs refactor (#56905)
* renames directory

* fixes relrefs
2022-10-13 15:57:58 -05:00
Christopher Moyer
c137cf60f0 moves canvas to proper directory, corrects relref (#56902) 2022-10-13 14:39:05 -05:00
Leon Sorokin
5acda40248 Search/ActionRow: drill placeholder to SortPicker (#56475) 2022-10-13 13:30:20 -06:00
Alexander Weaver
145b970557 Propagate all headers on main QueryData (#56896) 2022-10-13 14:18:53 -05:00
Joan López de la Franca Beltran
1ca5c347d3 Analytics: Add datasource UID to events (#56852)
* Analytics: Add datasource UID to events
2022-10-13 17:41:52 +02:00
Beto Muniz
5d86dc507a Fix Meta Data tab breaking condition (#56646) 2022-10-13 12:39:01 -03:00
juanicabanas
75a5777e36 PublicDashboards: Validate access token not to be duplicated and add retries. (#56755)
PublicDashboards: Validate access token not to be duplicated and add retries.
2022-10-13 11:32:32 -03:00
Ryan McKinley
3b4b528993 Storage: Dashboard summary builder cleanup (#56665) 2022-10-13 09:29:19 -04:00
Gareth Dawson
b8b25f7e31 Logs: add app to feature tracking in ad-hoc statistics (#56865)
* add app tracking to adhoc statistics

* use the object property value shorthand
2022-10-13 14:26:59 +01:00
Armand Grillet
83aa006c98 Add Alerting API to list of HTTP APIs (#56863)
This link has been asked many times and is only viewable on old docs pages.
2022-10-13 15:09:49 +02:00
Santiago
9996dbd577 use Prometheus' format for notification attempts durations (#56822) 2022-10-13 10:08:09 -03:00
Santiago
3c56fd8da0 Fix duplicated receivers in API response (#56829) 2022-10-13 10:01:28 -03:00
idafurjes
ef651daed2 Use org service instead of sqlstore (#56407)
* Use org service instead of sqlstore

* Remove methods from sqlstore

* Remove commented out code

* Fix lint

* Fix lint 2
2022-10-13 08:40:46 -04:00
Gareth Dawson
b0cb02568a Logs: Add feature tracking for filters in log rows (#56808)
* Add feature tracking for log details filter clicks

* use deconstructed prop values

* use deconstructed prop values
2022-10-13 11:21:17 +01:00
Laura Benz
b71e08ad59 Explore: Remove camel case from tracking labels (#56809)
* refactor: remove camel case from tracking labels

* refactor: remove camel case from tracking labels
2022-10-13 12:12:50 +02:00
Sven Grossmann
efe214a293 LogContext: Change line highlighting to match the hover state (#56811)
* add hover background also to logs with context

* add inherit display
2022-10-13 11:42:40 +02:00
Sonia Aguilar
d957fe01f4 Simplify mocking useGetContactPointsState (#56842) 2022-10-13 11:06:20 +02:00
Yaelle Chaudy
0295177bb0 Cloud Monitoring: Fix missing data when result is paginated (#56270)
* Added nextPageToken prop

* Adding first and pageToken condition to while loop

* clean up

* revert gitignore

* fix go lint

* Added logic to builder too

* Removed pageSize - was for local testing

* gofmt

* extracted doRequest function

* extracted doRequest in query too

* Adressed filter comments

* Adressed query comments

* go fmt

* removed pageSize added for testing

* go fmt again
2022-10-13 10:58:07 +02:00
Dimitris Sotirakis
b9d449529a Update grabpl to v3.0.12 (#56823) 2022-10-13 11:35:05 +03:00
Sofia Papagiannaki
97730aec10 Chore: Bump golang.org/x/text (#56841) 2022-10-13 11:26:25 +03:00
Gábor Farkas
5a0d90b104 logs: refactor: remove unused param "index" (#56543) 2022-10-13 10:04:51 +02:00
Sonia Aguilar
277803a894 Alerting: Refactor fetch for receivers for using RTKQuery (#56624)
* Refactor fetch for reveivers for using  RTKQuery

* Simplify receiversApi contactPointsState endpoint

* Fix tests and create useGetContactPointsState hook for using receiversApi.useContactPointsStateQuery
2022-10-13 10:00:59 +02:00
Ashley Harrison
5af36e48ba convert ThresholdsEditor to RTL (#56791) 2022-10-13 08:56:36 +01:00
Jeff Levin
cc27214dca Public Dashboards: Add audit table (#54508)
This PR adds an audit table for public dashboards allowing a user to view all public dashboards on an instance of grafana. The public dashboards team is working on a proposal for adding RBAC support to the audit table for 9.3

Co-authored-by: juanicabanas <juan.cabanas@grafana.com>
2022-10-12 21:36:05 -08:00
Joe Blubaugh
c7c640d903 Alerting: Fix email image embedding on Windows. (#56766)
The email notifier was incorrectly handling Windows filepaths. This is
fixed by using the `path/filepath` package.
2022-10-13 10:24:00 +08:00
Adela Almasan
254bb0c99e Canvas: Clear current selection in dashboard mode (#56830) 2022-10-12 17:18:56 -04:00
George Robinson
004bb7689d Alerting: Fix mathexp.NoData for ConditionsCmd (#56816) 2022-10-12 17:34:28 +01:00
Ashley Harrison
61fd369b3f ensure the first item in the sectionnav is always the section root (#56815) 2022-10-12 17:02:31 +01:00
Ashley Harrison
8846778f9b fix title of config node (#56810) 2022-10-12 16:37:14 +01:00
Alex
94ed744454 Auth: Make built-in login configurable (#46978) 2022-10-12 15:34:59 +00:00
Ashley Harrison
7d18460d8f Chore: convert MetricSelect test to RTL (#56801)
* convert MetricSelect test to RTL

* remove type param
2022-10-12 16:33:12 +01:00
Michael Mandrus
26e7228cd9 fix typo (#56802) 2022-10-12 09:44:21 -04:00
Gareth Dawson
f30ba0d34e Explore/Logs: Add feature tracking for ad-hoc statistics in log rows (#56681)
* Add feature tracking for ad-hoc statistics in log rows

* Make row prop mandatory in LogDetailsRow.tsx

* Remove optional chaining

* fix: failing test by mocking reportInteraction
2022-10-12 14:37:24 +01:00
Karl Persson
b1761908c2 RBAC: Add primary key to seed_assignment table (#56540)
* RBAC: Add seed_assignment migrations from enterprise

* RBAC: Create migration to add primary key to seed_assignment table
2022-10-12 15:18:07 +02:00
Gabriel MABILLE
5fcec05695 LDAP: log that organization mapping is skipped (#56796) 2022-10-12 08:41:11 -04:00
Joey Tawadrous
78061260fb Default to flamegraph (#56733) 2022-10-12 13:39:08 +01:00
Ivana Huckova
7c10082c57 Devenv: Fix influx dashboard (#56775) 2022-10-12 14:01:48 +02:00
Josh Hunt
b7d969baf1 I18n: Improve tooling (#56731)
* Delete en-US.json before extracting strings so it's always up to date

* Add 'comment' to message jsons

* Enable Pseudo-locale option only in dev mode

* don't load english messages

* fix package.json

* fix
2022-10-12 07:51:16 -04:00
ying-jeanne
80ede174dd update the feature toggle usage in backend (#56787) 2022-10-12 13:43:35 +02:00
Gabriel MABILLE
10c080dad1 LDAP: Add skip_org_role_sync configuration option (#56679)
* LDAP: Add skip_org_role_sync option

* Document the new config option

* Nit on docs

* Update docs/sources/setup-grafana/configure-security/configure-authentication/ldap.md

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>

* Docs suggestions

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
Co-authored-by: Jguer <joao.guerreiro@grafana.com>

* Add test, Fix disabled user when no role

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
Co-authored-by: Jguer <joao.guerreiro@grafana.com>
2022-10-12 13:33:33 +02:00
Julien Duchesne
72b9555487 Publish Linux Packages: Fix bad secret name (#56708)
🤦

Co-authored-by: dsotirakis <dimitrios.sotirakis@grafana.com>
2022-10-12 14:07:13 +03:00
Josh Hunt
719769ee7c I18n: Add Chinese (Simplified) (#56739)
* Prevent _old.json files from being created

* Add contrib docs for adding new locale

* add chinese (simplified)
2022-10-12 06:12:46 -04:00
Torkel Ödegaard
85e3ed491d DashboardsList: Fix height issue in topnav (#56661) 2022-10-12 11:00:45 +01:00
George Robinson
67d93ceea0 Alerting: Add doc comments to classic.go (#56724) 2022-10-12 10:55:48 +01:00
Ashley Harrison
dd9e1498f9 only render direct children on the landing page routes (#56720) 2022-10-12 10:01:33 +01:00
Matt
26bb139470 Fixes 48972 - Exposes channels.WebhookMessage (#56140) 2022-10-12 09:50:28 +01:00
kay delaney
45edce90d3 VariableEditor: Use new form styles (#56326) 2022-10-12 09:43:41 +01:00
Alex
6edce00b1a Inspect: Handle JSON tab crash when the provided object is too big to stringify. (#55939)
* fix(inspector): handle json tab crash when too much data

* message update when JSON stringify fails due to obj size
2022-10-12 00:52:23 -07:00
Victor Marin
48c27872af TablePanel: Footer now updates values on column filtering (#56354)
* Table footer now updates values on column filtering

* Backwards compatibility
2022-10-12 07:57:49 +03:00
Nathan Marrs
17433f2166 Docs: Fix what's new canvas doc video file reference #56754 2022-10-11 15:57:48 -07:00
Michael Mandrus
6827ca01a0 Docs: Add missing documentation for enterprise features (#56753)
* add documentation about protected roles

* add section about sync debug

* add link to recorded queries to main enterprise pages

* Update docs/sources/setup-grafana/configure-security/configure-authentication/ldap.md

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

* fixes from pr review

* add missing char

* Apply suggestions from code review

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

* fix other incorrect lines to match review

Co-authored-by: Eve Meelan <81647476+Eve832@users.noreply.github.com>
2022-10-11 15:57:27 -07:00
Christopher Moyer
414d536186 Docs: refactors config panels and visualizations, corrects relrefs (#55940)
* refactors config panels and visualizations, corrects relrefs

* adds an alias

* Remove some old content

* moves visualizations topic to the root

* moves out panels and visualization topics to the root

* adds move and resize panel to add/organize panel; creates a create dashboard topic under build dashboards; adjusts context of add a panel to be from within an existing dashboard

* updates aliases

* creates search at root, moves dashboard preview to search, creates standalone search dashboard topic

* moves Set dashboard time range to use-dashboards, creates modify dashboard settings and adds moves Modify dashboard time settings to that topic

* moves existing query-options topic from working with panels to configure-panel-visualizations, moves panel time overrides and timeshift content to query options

* Moving things to better category, fixing links, improving ordering

* Move panel inspector to main panel topic

* completes partial fix of relrefs

* relref fixes con't

* restructures remaining panels topics

* more relref fixes

* Minor fix

* Minor tweak

* finishes fixing relrefs

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
Co-authored-by: Jack Baldry <jack.baldry@grafana.com>
2022-10-11 15:31:20 -05:00
Garrett Guillotte
f4a3400a9c Docs: Update Canvas videos to mp4 URLs (#56748) 2022-10-11 11:39:52 -07:00
Garrett Guillotte
abd7b7dccc Docs: Remove Beta tag from 9.2 What's New post-release (#56746) 2022-10-11 13:16:24 -05:00
Garrett Guillotte
4a99470e22 Docs: Add CODEOWNER to setup docs (#56745) 2022-10-11 13:43:58 -04:00
Garrett Guillotte
c98db1615f Docs: Clarify JOIN feature change (#56740) 2022-10-11 18:23:48 +02:00
Dimitris Sotirakis
62314bbf66 Remove grabpl dependency from yarn-install (#56692) 2022-10-11 18:58:03 +03:00
Matias Chomicki
6a74cd207a feat(loki-monaco-editor): add support for in_aggregation situation (#56680) 2022-10-11 15:52:57 +00:00
Junaid Ali
33eb4a2807 Exclude full OAuth token details from printing out on stdout (#55426)
* remove token details from printing out on stdout

* Update login_oauth.go

* address comment
2022-10-11 17:20:49 +02:00
Hamas Shafiq
9db61f54ff Tempo: Fix the inconsistency between the query limit values in the options component (#56566) 2022-10-11 16:08:53 +01:00
Dimitris Sotirakis
94fe605175 Update latest json (#56732) 2022-10-11 14:35:50 +00:00
Giordano Ricci
e3e32c7d04 chore: bump code coverage action version (#56710) 2022-10-11 15:35:35 +01:00
Konrad Lalik
5ddf7b85df Alerting: Alert list performance improvements (#56247)
Co-authored-by: Gilles De Mey <gilles.de.mey@gmail.com>
2022-10-11 16:24:01 +02:00
Grot (@grafanabot)
8627b2131f Changelog: Updated changelog for 9.2.0 (#56725) 2022-10-11 17:18:15 +03:00
Sofia Papagiannaki
7e24e19230 Swagger: Remove license (#56716) 2022-10-11 17:06:36 +03:00
Nathan Marrs
a9c0afcc1f Canvas: Docs for 9.2 (#56219)
Co-authored-by: Adela Almasan <adela.almasan@grafana.com>
2022-10-11 06:34:49 -07:00
Grot (@grafanabot)
5cebb94e01 Changelog: Updated changelog for 9.1.8 (#56714) 2022-10-11 16:31:10 +03:00
Neel
86a1fe578a Grafana UI: Fix alignment issue with http method dropdown (#56592)
- Removed custom width prop from the http method Select component to fix the alignment issue for prometheus HTTP request type dropdown
2022-10-11 08:20:13 -05:00
Grot (@grafanabot)
ae72742b76 Changelog: Updated changelog for 8.5.14 (#56709) 2022-10-11 16:15:07 +03:00
Giordano Ricci
f1a0a5cb47 Glue: improves validation & fix api docs for correlations (#56682) 2022-10-11 14:04:55 +01:00
Andres Martinez Gotor
cf2ba7e41c Google Cloud Monitoring: Adapt default crossSeriesReducer (#56693) 2022-10-11 14:51:25 +02:00
Piotr Jamróz
ae927eab73 Glue: Enrich query results data frames in Explore with correlations to generate static links from correlations (#56295)
* Attach static generic data link to data frames in Explore

* WIP

* Always load correlations config when the query is run

This will be moved to Wrapper.tsx and called only once Explore is mounted

* remove comment

* Load the config when Explore is loaded

* Clean up

* Check for feature toggle, simplify cod

* Simplify the code

* Remove unused code

* Fix types

* Add a test for attaching links

* Revert package.json changes

* Display title provided in the correlation label

* Add missing mocks

* Fix tests

* Merge branch 'main' into ifrost/integration/attach-generic-data-link

# Conflicts:
#	public/app/features/explore/Wrapper.tsx
#	public/app/features/explore/state/main.ts

* Remove redundant async calls

* Do not block Wrapper before correlations are loaded (only delay the query)

* Test showing results after correlations are loaded

* Post-merge fix

* Use more consistent naming

* Avoid null assertions

Co-authored-by: Elfo404 <me@giordanoricci.com>
2022-10-11 14:40:55 +02:00
Jorge Luis Betancourt
95b9fa3346 Alerting: Fix duration calculation when testing a rule (#56616)
When testing a rule within the legacy alerting the `timeMs` field could
sometimes show negative (and/or wrongly calculated) durations. This happens if the alert evaluation crosses a second boundary. This change uses the full timestamp to compute the eval duration.
2022-10-11 20:40:18 +08:00
Leo
0a183d1ba2 Navigation: Mobile support for topnav items (#56568)
* add topbar layout and wrapper

* mobile support for topnav icons

* improved hooks implementation

* added tests for TopSearchBarSection

* support css overrides for select and valuepicker

* make singlevalue inherit the color from select
2022-10-11 14:24:02 +02:00
Ashley Harrison
90cf76e05e Navigation: Integrate Explore actions into topnav (#56381)
* integrate Explore actions into topnav toolbar

* add keys

* fix unit test

* fix bug with ToolbarButtonRow overflow

* make the render function a bit more readable

* fix overflow not updating when children change
2022-10-11 12:59:17 +01:00
brendamuir
d6fa12c5bc Docs: updates numbering (#56695)
* Docs: updates numbering

* removes full stop
2022-10-11 12:58:15 +01:00
Leo
a91d77003d AnnotationList: Support html content (#54916)
* support html content in annolistpanel

* improve panel tests

* add RenderUserContentAsHTML ui

* sanitize content
2022-10-11 13:35:03 +02:00
Josh Hunt
6969354490 Chore: remove i18n console log (#56691) 2022-10-11 07:22:48 -04:00
Grafana I18n Bot
11c4ab8397 I18n: Crowdin sync (#56688)
* New translations grafana.json (French)

* New translations grafana.json (Spanish)

* New translations grafana.json (German)

* New translations grafana.json (Chinese Simplified)
2022-10-11 07:04:33 -04:00
Dimitris Sotirakis
efc8f985cb Remove build-frontend-packages step from docs pipelines (#56686) 2022-10-11 06:56:43 -04:00
Armand Grillet
74a79b517d Update Alerting changelog (#56684)
Now simpler to use.
2022-10-11 10:55:18 +00:00
Ashley Harrison
8348f486d9 Navigation: Make sure topnav is translated (#56643)
* initial translation progress

* more nav translations

* add subtitle translations

* more specific gitignore path

* fix unit tests
2022-10-11 11:45:58 +01:00
brendamuir
8a3294dcdf Docs: adds external Alertmanager config (#56636)
* Docs: adds external Alertmanager config

* Adds link to add external alertmanager

* updating with george feedbacj
2022-10-11 11:29:11 +01:00
Josh Hunt
d52ab5de2e EchoSrv: Remove $.ajax for loading scripts (#56678)
* user essentials mob! 🔱

lastFile:public/app/core/services/echo/backends/analytics/RudderstackBackend.ts

* user essentials mob! 🔱

lastFile:public/app/core/services/echo/backends/analytics/ApplicationInsightsBackend.ts

* user essentials mob! 🔱

Co-authored-by: Joao Silva <joao.silva@grafana.com>
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2022-10-11 11:11:23 +01:00
sam boyer
5641029a4a coremodels: Always take runtime arg for NewBase() (#56677) 2022-10-11 05:39:29 -04:00
Gareth Dawson
10a34a041c Add feature tracking for LogRow.tsx (#56656)
* Add feature tracking for LogRow.tsx

* Add type and logRowUid to reportInteraction

* Rename logs variable
2022-10-11 10:04:43 +01:00
GitStart
bc632f239d Tempo: Tab button doesn't work when in the Tags field (#56458)
Co-authored-by: gitstart <gitstart@gitstart.com>
Co-authored-by: gitstart <gitstart@users.noreply.github.com>
Co-authored-by: Rubens Rafael <70234898+RubensRafael@users.noreply.github.com>
Co-authored-by: RubensRafael <rubensrafael2@live.com>
Co-authored-by: Rafael Toledo <87545086+Toledodev@users.noreply.github.com>
Co-authored-by: Matheus Muniz <87545749+matheusmuniz03@users.noreply.github.com>
Co-authored-by: Thiago Nascimbeni <tnascimbeni@gmail.com>
Co-authored-by: Matheus Muniz <matheusmuniz100@hotmail.com>
Co-authored-by: Nitesh Singh <nitesh.singh@gitstart.dev>
Co-authored-by: Matheus Benini Ferreira <88898100+MatheusBeniniF@users.noreply.github.com>
Co-authored-by: Murilo Amaral <87545137+MuriloAmarals@users.noreply.github.com>
2022-10-11 10:03:59 +01:00
Dimitris Sotirakis
66cb56de79 CI: Trigger tag on CI changes (#55388)
* Trigger tag on CI changes

* Use github token available for PRs

Remove remote addition

* Replace origin with full url

Remove fetch for origin

Fix fetch

Remove --quite

Add rebase

Stash changes from verify-gen-cue

Cleanup

* Add --quiet when fetching
2022-10-11 12:01:18 +03:00
Joan López de la Franca Beltran
ef17f12c23 Docs: Fix caching.memcached setting name (#56606) 2022-10-11 10:47:57 +02:00
sam boyer
e5a6547a94 coremodels: Update to latest Thema with generics (#56602)
* Update thema to latest

* Deal with s/Library/*Runtime/

* Commit new, working results of codegen
2022-10-11 09:45:07 +01:00
Dimitris Sotirakis
668cb25b82 Fix release test pipelines dependencies (#56671) 2022-10-11 11:42:24 +03:00
George Robinson
52965de369 Alerting: Add doc comments to state struct and normalize fields (#56647) 2022-10-11 09:30:33 +01:00
Gareth Dawson
fa09aef4ba Loki: Add tests for NestedQuery.tsx (#56538)
* WIP: Testing the NestedQuery component

* Add tests for NestedQuery.jsx

* Add aria-labels to select elements

* Update aria-labels

* Create datasource using createLokiDatasource()
2022-10-11 09:22:32 +01:00
Andres Martinez Gotor
8d9da34827 @grafana/ui: EditorField tooltip interactive (#56557) 2022-10-11 10:19:37 +02:00
Matias Chomicki
1b7e31cd27 Loki Monaco Editor: add component tests (#56658)
* feat(loki-monaco-editor): add component tests

* feat(loki-monaco-editor): rename test case

* Chore: add missing export
2022-10-11 04:15:48 -04:00
Dimitris Sotirakis
811f6054c8 Add dependencies (#56666) 2022-10-11 10:05:13 +03:00
Serge Zaitsev
53baecd71f Chore: Move folder service into a separate package (#56591)
* Chore: move folder service interface into a separate package

* copy implementation into a standalone package

* move implementation and tests to the new folder package

* remove leftovers from wire

* add test doubles for folder service

* fix tests in library panels/elements

* fix provideservice in ngalert
2022-10-10 21:47:53 +02:00
Dimitris Sotirakis
eb077db2b0 Add clone-enterprise and init-enterprise steps (#56662) 2022-10-10 22:46:12 +03:00
Grafana I18n Bot
3f89de1747 I18n: Crowdin sync (#56660)
* New translations grafana.json (Chinese Simplified)

* delete zh-CN

Co-authored-by: joshhunt <josh@trtr.co>
2022-10-10 12:15:21 -04:00
Ivana Huckova
3e856da2e4 LabelFilters: Remove redundant css styling (#56653)
* LabelFilters: Remove redundant css

* Remove unused import
2022-10-10 17:59:13 +02:00
kay delaney
0696cd3549 i18n: Fix unnecessary ampersand escaping (#56654) 2022-10-10 11:56:28 -04:00
Dimitris Sotirakis
75c5845749 CI: Split release test pipelines (#56655)
* Split test release pipelines

* Add missing dependencies

* Add release branch case when naming pipeline
2022-10-10 11:46:56 -04:00
Polina Boneva
129a5a29e7 PanelChrome: New Panel Header design Feature Flag (#56450)
* add feature toggle newPanelHeader

* add feature toggle newPanelHeader

* more explicit naming and description of PanelChrome feature flag
2022-10-10 18:03:16 +03:00
kay delaney
efed72096f TagsInput: Prevent adding duplicate tags + refactor, restyle (#56485) 2022-10-10 15:56:02 +01:00
Sven Grossmann
fb31daa92f LogContext: Fix wrong width if lines are wrapped (#56650) 2022-10-10 16:31:14 +02:00
Andres Martinez Gotor
65e56c9fb8 Google Cloud Monitoring: Fix bucket bound for distributions (#56565) 2022-10-10 16:08:33 +02:00
Alex Khomenko
d332747c38 TimeRangeInput: Fix clear button type (#56545) 2022-10-10 17:05:30 +03:00
Grafana I18n Bot
08f9605d83 I18n: Crowdin sync (#56645)
* New translations grafana.json (German)

* New translations grafana.json (Chinese Simplified)
2022-10-10 09:58:36 -04:00
Laura Benz
bc9a37ee8d Glue: Add configuration support to PATCH (#56117)
* feat: add config to tests v0

* feat: add config to UpdateCorrelationCommand

* refactor: repair some tests

* refactor: repair another test

* refactor: repair last test

* refactor: remove possible test

* refactor: add comments

* refactor: add changes from code review

* refactor: implement more detailed patch

* feat: add tests for partial config update

* refactor: make error handling more detailed

Co-authored-by: Giordano Ricci <me@giordanoricci.com>

Co-authored-by: Giordano Ricci <me@giordanoricci.com>
2022-10-10 15:36:14 +02:00
Josh Hunt
680dfde90d I18n: Update crowdin config for i18next json files (#56640) 2022-10-10 14:02:25 +01:00
George Robinson
802d67eeca Alerting: Support values in notification templates (#56457)
We have received a lot of feedback regarding the ValueString in alert notifications. Perhaps one of the most frequent complaints about ValueString is that it is difficult to read because it contains a lot of information, and the information is shown as a JSON-like string. Users have often asked how it can be templated and the answer is that it can't.

Until now users have been able to add custom annotations to their alert rules which contains values via the $values variable added in previous versions of Grafana. However, these custom annotations must be added for each of the user's alert rule, instead of once in a template that all of their alerts can be notified via.

This commit adds then the much requested feature to support values in notification templates. Users can then create a single template that prints the annotations, labels and values of their alerts in a format of their choice!
2022-10-10 13:40:21 +01:00
Sven Grossmann
62674604b4 Loki: Escape label-values in context queries (#56614) 2022-10-10 14:31:19 +02:00
brendamuir
137d332d4f Docs: deletes provisioning from grafana and adds link (#56637)
* Docs: deletes provisioning from grafana and adds link

* updates link
2022-10-10 13:30:23 +01:00
Sven Grossmann
be68bb6b3b LogContext: Fix wrong position of logcontext (#56613)
* fix styling issues

* remove unused class
2022-10-10 14:17:22 +02:00
Giordano Ricci
da9d8fe14f Correlations: Add query editor and target field to settings page (#55567)
* Fix: use type=button in editor

* Grafana-UI: TextArea: make ctextare a block element

* WIP: add field & target query to correlations

* add table query helpers & test ordering

* refactor some tests for disappearance

* chore: move QueryEditorField & add tests

* cleanup & fix typo

* revert textarea changes

* update form to support new config

* move defaults
2022-10-10 12:32:21 +01:00
brendamuir
db68fa358f Docs: removes duplicate sentence in silences (#56629) 2022-10-10 06:56:21 -04:00
brendamuir
2aff817ea8 Docs: adds note on aurora incompatibility (#56621)
* Docs: adds note on aurora incompatibility

* updates with feedback

* adds issue link
2022-10-10 12:51:19 +02:00
Torkel Ödegaard
03e887723a ErrorPage: Fix position of chunk loading error (#56473) 2022-10-10 12:47:33 +02:00
Torkel Ödegaard
462f6b7797 Page: Pages that have hideFromBreadcrumbs set to true should not be added to page Title (#56596)
* Page: Pages that have hideFromBreadcrumbs set to true should not be added to page Title

* Updated test
2022-10-10 12:47:04 +02:00
Josh Hunt
d405f3a877 GrafanaUI: InputGroup: Fix invalid children borders (#56169)
* GrafanaUI: InputGroup: Fix invalid children borders

* tidy story

* zindex priority stack

* clarify comment

* fix inputgroup children type
2022-10-10 06:43:29 -04:00
brendamuir
a84edb274b Docs: changes alert groupings to groups (#56617)
* Docs: changes alert groupings to groups

* One more alert grouping
2022-10-10 12:41:14 +02:00
Timost
f90e72991d docs/provisioning: fix typo in notification policies (#54917) 2022-10-10 10:51:29 +01:00
Alec Sears
c61d6c39a0 Configuration: Update ssl_mode docs in sample.ini to match default.ini (#55138) 2022-10-10 09:04:51 +00:00
kay delaney
d79f60d73f QueryEditorRow: Fix broken drag-and-drop reordering (#56515) 2022-10-10 09:40:54 +01:00
Sven Grossmann
1bcce79d4e LogContext: Add header and close button to modal (#56283)
* added context header

* Rename to Log Context

Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>

Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
2022-10-10 09:33:18 +02:00
Sofia Papagiannaki
4cdbfb7606 Chore: Timeout integration package tests faster (#56287) 2022-10-10 09:27:04 +02:00
Serge Zaitsev
169610fd27 Chore: Reduce test timeouts to 5 minutes (#56599) 2022-10-10 09:26:47 +02:00
Joe Blubaugh
7312a2dab0 Alerting: Mark all tests that interact with the database as Integration tests. (#54875)
Previously, two tests were not explicitly marked as integration tests
and so were not run against all 3 supported databases in the CI
environment.
2022-10-10 01:54:54 -04:00
Ryan McKinley
b24be6c0fc ObjectStore: add a kind registry (#56507) 2022-10-08 12:05:46 -04:00
Nathan Marrs
ac91df0ea2 Canvas: Add demo dashboards (#56351)
Co-authored-by: drew08t <drew08@gmail.com>
Co-authored-by: Adela Almasan <adela.almasan@grafana.com>
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2022-10-07 21:34:18 -04:00
Yuriy Tseretyan
3487e68d15 Alerting: Fix migration to create rules with group index 1 (#56511) 2022-10-07 17:20:01 -04:00
Yuriy Tseretyan
e2f1201382 Alerting: Fix migration to not add label "alertname" (#56509)
* do not add label alertname because it is overridden in state manager anyway
* update state manager to not consider labels with same value as dupe
2022-10-07 15:06:53 -04:00
Artur Wierzbicki
4b2a940659 Search: wrap data.Frame in a backend.DataResponse and return it directly when the index is not ready (#56522) 2022-10-07 11:32:37 -07:00
Artur Wierzbicki
bf264d2f76 Query library: requiresDevMode dummy backend (#56466)
* query library - dummy backend

* fix tests

* dont explicitly marshall backend dataresponse

* skip integration tests

* null check for tests

* added query library to codeowners

* null check for tests

* lint
2022-10-07 11:31:45 -07:00
Ivana Huckova
23e04c0f9c Elasticsearch: Add integration tests for http header handling (#56542)
* Elasticsearch: Add integration test

* Fix lint
2022-10-07 18:21:48 +02:00
Eric Leijonmarck
53f0928321 Docs: Add variable expansion recommendation (#56368)
* docs: add variable expansion recommendation

* docs: updated the ldap docs in configure grafana
2022-10-07 17:04:37 +01:00
Leo
9c50131c2c Navigation: Added organisation switcher next to grafana logo (#56361)
* added org dropdown to topnav

* render icon and dropdown for mobile screen

* remove switch org from profile node

* adjust styles to be mobile first

* add test for select

* hide profile node only when topnav is on

* replace margin with gap instead

* improve tests

* add aria labels

* fix broken test
2022-10-07 17:52:13 +02:00
Sonia Aguilar
3990d2b2b3 Alerting/handle 0s last notify duration notification error feedback (#56541)
* Show '-' in notifiers table when lastNotifyAttemptDuration is 0s

* Add tests for no attempt (lastNotifyAttempt null date) and no last duration (lastNotifyAttemptDuration 0s)
2022-10-07 17:07:02 +02:00
Torkel Ödegaard
754fc37972 PluginPage: Fix finding root section for standalone pages (#56554) 2022-10-07 16:33:36 +02:00
Ashley Harrison
ff41b9544b Chore: more typing improvements to @grafana/ui (#56544)
* improve grafana-ui types

* more type improvements

* better useState type
2022-10-07 15:22:21 +01:00
Ivana Huckova
a4c5801440 Loki: Fix redundant escaping in adhoc filter with regex match (#56447)
* Loki: Fix redundant escaping in adhoc filter with regex match

* Update data.js

* Simplify test

* Simplify test

* Update

* Add more tests
2022-10-07 16:21:59 +02:00
Konrad Lalik
d945091ff1 Alerting: Fix evaluation interval validation (#56115)
Co-authored-by: Gilles De Mey <gilles.de.mey@gmail.com>
2022-10-07 15:01:47 +02:00
Andres Martinez Gotor
76868bad04 AzureMonitor: Allow multiple resources in the API for Metrics (#56118) 2022-10-07 14:57:01 +02:00
Gabriel MABILLE
7595ed0668 FIX: Remove RBAC datasource permissions upon datasource deletion (#56530)
* FIX: Remove RBAC datasource permissions upon datasource deletion

* Use scope provider instead

* Fix test
2022-10-07 08:30:15 -04:00
GitStart
0eb3afbd14 Form validation problem in table panel option (column width & minimum column width) (#56452)
Co-authored-by: gitstart <gitstart@users.noreply.github.com>
Co-authored-by: gitstart <gitstart@gitstart.com>
Co-authored-by: Rubens Rafael <70234898+RubensRafael@users.noreply.github.com>
Co-authored-by: Rafael Toledo <87545086+Toledodev@users.noreply.github.com>
Co-authored-by: Matheus Muniz <87545749+matheusmuniz03@users.noreply.github.com>
Co-authored-by: Thiago Nascimbeni <tnascimbeni@gmail.com>
Co-authored-by: Matheus Muniz <matheusmuniz100@hotmail.com>
Co-authored-by: Nitesh Singh <nitesh.singh@gitstart.dev>
Co-authored-by: Matheus Benini Ferreira <88898100+MatheusBeniniF@users.noreply.github.com>
Co-authored-by: Murilo Amaral <87545137+MuriloAmarals@users.noreply.github.com>
2022-10-07 15:06:50 +03:00
Emil Tullstedt
22756913ba Errutil: Update documentation for Go 1.19 (#55807) 2022-10-07 12:47:43 +02:00
Emil Tullstedt
c2d3a31772 Chore: Upgrade Go to 1.19.2 (#56355) 2022-10-07 12:47:24 +02:00
Josh Hunt
891f9c00a1 I18n: Add lint rule to enforce correct i18n imports (#56487)
* I18n: Add lint rule to enforce correct i18n imports

* ignore in gui wrapper
2022-10-07 11:46:28 +01:00
Joey Tawadrous
74c809f544 Plugins: Introduce new Flame graph panel (#56376)
* Flamegraph

* Updated flame graph width/height values

* Fix top table rendering issue

* Add feature toggle for flamegraph in explore

* Update tests

* Hide flamegraph from dash panel viz list if feature toggle not enabled

* Show table if no flameGraphFrames

* Add flame graph to testdata ds

* Minor improvement
2022-10-07 11:39:14 +01:00
Sonia Aguilar
a18a3d7628 Show No attempts instead of OK when there is no attempt for notifier (#56494) 2022-10-07 11:41:18 +02:00
brendamuir
939caa67a2 Docs: adds alertmanager overview (#56527)
* Docs: adds alertmanager overview

* updating with georges feedback

* adds deprecation note to API docs

* update to provisioning instuctions
2022-10-07 10:26:51 +01:00
George Robinson
762688d67f Alerting: Fix pq: missing FROM-clause for table "a" (#56453)
This commit fixes a bug where changing the Folder or Rule Group of an existing rule returns the following error in PostgreSQL "pq: missing FROM-clause for table a"
2022-10-07 10:18:49 +01:00
Joe Blubaugh
13067b39da Alerting: Update replacement of prometheus-alertmanager (#56519)
grafana.com/grafana/prometheus-alertmanager has been updated to a
version that fixes some bugs upstream. This change just updates that
dependency and a few shared ones.
2022-10-07 17:10:20 +08:00
Torkel Ödegaard
6c39a1995f Page: More easily support full height pages (#56524)
* Page: More easily support full height pages

* tweaks to JSONSettingsPage
2022-10-07 10:56:12 +02:00
Dimitris Sotirakis
df2abf09c2 Use io.ReadAll instead of json.Decode (#56528) 2022-10-07 04:27:18 -04:00
Ivana Huckova
eef3f28447 Loki: Add integration tests for http header handling (#56478)
* Loki: Add integration tests for http header handling

* Fix linting
2022-10-07 10:16:41 +02:00
Emil Tullstedt
bb479e030a RBAC: Redirect to /login when forceLogin is set (#56469) 2022-10-07 08:18:56 +02:00
Victor Marin
b622a87aee StateTimeline: Fix tooltip showing erroneously in shared crosshair dashboards (#55809)
* StateTimeline: Fix shared crosshair

* Fix for StatusHistory also
2022-10-07 08:56:15 +03:00
Leon Sorokin
21d9cf0db4 Thresholds: fix line rendering with multiple y axes (#56516) 2022-10-06 17:18:47 -06:00
Beto Muniz
b5cb917dfa Fix queries with repeated references (#56497) 2022-10-06 17:59:14 -03:00
lean.dev
356318e387 Docs: Updating Public Dashboard documentation (#56504)
Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
2022-10-06 17:47:38 -03:00
Jeff Levin
331110bde5 refactor public dashboards middleware testing (#55706)
This PR refactors how we add the orgId to the context on a public dashboard paths. We also split out accessToken handling into its own package and rework status code for "RequiresValidAccessToken". We will be modeling all endpoints to use these status codes going forward. Additionally, it includes a scaffold for better middleware testing and refactors existing tests to table drive tests.
2022-10-06 12:35:19 -08:00
Ryan McKinley
609abf00d1 ObjectStore: Write json as json when possible (#56433) 2022-10-06 15:48:53 -04:00
Yuriy Tseretyan
7b6437402a Alerting: Refactor state manager's cache (#56197)
* remove ResetAllStates because it's not used
* refactor cache to accept logs, metrics and url as method args
* update manager Warm method to set the entire state at once
* remove unused reset method
* introduce ruleStates
* change getOrCreate to belong to ruleStates
* update Get to not return error
2022-10-06 15:30:12 -04:00
Drew Slobodnjak
15d2653b89 Geomap: Docs for 9.2 (#56493) 2022-10-06 11:32:39 -07:00
Misi
1de0f4453e Chore: Make NewCookieOptions exported in cookies.go (#56476) 2022-10-06 20:00:54 +02:00
Josh Hunt
5361efc225 I18n: Migrate to I18next (#55845)
* Switch from lingui from i18next

* Change lingui messages to i18next messages

* Change lingui messages to i18next messages (grafana-ui)

* Init i18n for tests
2022-10-06 16:34:04 +01:00
Nicolas Janicaud Gondoin
c1d6df4eb7 Fix issue 55626 (#55636)
Reset the mapping table for Dynamic Geojson
2022-10-06 08:30:03 -07:00
Virginia Cepeda
48f0f4bb91 Alerting: subscribe to Dashboard refresh interval for alert panels (#56347)
* Subscribe to Dashboard refresh interval for alert panels

* Add test

* Remove unused import

* Use useEffectOnce when obtaining dashboard
2022-10-06 12:02:19 -03:00
Matias Chomicki
729ce8bb72 Loki: query editor using Monaco (#55391)
* loki: switch to a monaco-based query field, step 1 (#46291)

* loki: use monaco-logql (#46318)

* loki: use monaco-logql

* updated monaco-logql

* fix all the tests (#46327)

* loki: recommend parser (#46362)

* loki: recommend parser

* additional improvements

* more improvements

* type and lint fixes

* more improvements

* trigger autocomplete on focus

* rename

* loki: more smart features (#46414)

* loki: more smart features

* loki: updated syntax-highlight version

* better explanation (#46443)

* better explanation

* improved help-text

Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>

Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>

* Fix label

* feat(loki-monaco-editor): add monaco-logql as a dependency

* feat(loki-monaco-editor): add back range function removed during merge

* feat(loki-monaco-editor): sync imports with recent changes

* feat(loki-monaco-editor): add missing lang provider functions

* feat(loki-monaco-editor): fix imports

* feat(loki-monaco-editor): display monaco editor by default

Temporarily

* Chore: remove commented code

* Chore: minor refactor to NeverCaseError

* Chore: minor code cleanups

* feat(loki-monaco-editor): add history implementation

Will see how it behaves and base the history slicing on tangible feedback

* feat(loki-monaco-editor): turn completion data provider into a class

* Chore: fix missing imports

* feat(loki-monaco-editor): refactor data provider methods

Move complexity scattered everywhere to the provider

* Chore: clean up redundant code

* Chore: minor comments cleanup

* Chore: simplify override services

* Chore: rename callback

* feat(loki-monaco-editor): use query hints implementation to parse expression

* feat(loki-monaco-editor): improve function name

* Chore: remove superfluous variable in favor of destructuring

* Chore: remove unused imports

* Chore: make method async

* feat(loki-monaco-editor): fix deprecations and errors in situation

* feat(loki-monaco-editor): comment failing test case

* Chore: remove comment from test

* Chore: remove duplicated completion item

* Chore: fix linting issues

* Chore: update language provider test

* Chore: update datasource test

* feat(loki-monaco-editor): create feature flag

* feat(loki-monaco-editor): place the editor under a feature flag

* Chore: add completion unit test

* Chore: add completion data provider test

* Chore: remove unwanted export

* Chore: remove unused export

* Chore(loki-query-field): destructure all props

* chore(loki-completions): remove odd string

* fix(loki-completions): remove rate_interval

Not supported

* fix(loki-completions): remove line filters for after pipe case

We shouldn't offer line filters if we are after first pipe.

* refactor(loki-datasource): update default parameter

* fix(loki-syntax): remove outdated documentation

* Update capitalization in pkg/services/featuremgmt/registry.go

Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>

* refactor(situation): use node types instead of names

* Chore: comment line filters pending implementation

It's breaking the build due to a linting error.

* Chore: update feature flag test after capitalization change

* Revert "fix(loki-completions): remove line filters for after pipe case"

This reverts commit 3d003ca4bc.

* Revert "Chore: comment line filters pending implementation"

This reverts commit 84bfe76a6a.

Co-authored-by: Gábor Farkas <gabor.farkas@gmail.com>
Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
Co-authored-by: Ivana Huckova <ivana.huckova@gmail.com>
2022-10-06 10:35:30 -04:00
Galen Kistler
8fd4fcb987 Prometheus: Annotation query filtering values less then 1 (#53969)
* prevent annotation query from filtering values less then 1
* unit tests were asserting that gaps in data (0 value) are removed from annotation, update filter to exclude 0
2022-10-06 09:26:08 -05:00
Sonia Aguilar
01526d9053 Add error details in notification error feedback tooltip (#56472) 2022-10-06 16:20:07 +02:00
Dimitris Sotirakis
66e8f39ce8 Packaging: Change from 0750 to 0755 folder permissions when packaging (#56436)
* Change from 0750 to 0755

* Change to 0o755

* Skip lint when creating dir
2022-10-06 17:11:11 +03:00
Sonia Aguilar
d8d8ef1aff Alerting: Add Notification error feedback on contact points view (#56225)
* Alerting: Receivers integrations error feedback: WIP - Add notifications error at the top right on contact points view (#52390)

* Add interfaces for contact point errors

* [WIP] Create fake response for the new service to get contact point errors

* [WIP] Create action an reducer for the new service to get contact point errors

* Fetch fetchContactPointStates in Contact Points tab every 20s and when AM changes

* [WIP] Use store to get error count

* Show number of integrations errors at the contact points main view

* Add warning icon and refactor styles using getStyles

* Change lastNotify type to string instead of DateTime

* Use Stack component from experimental library when it is possible

* Alerting: Add receivers error feedback in contact point list (#52524)

* Refactor types for contact points state

* Add health column in ReceiversTable in case error state is available for this AM

* Create method for converting contact points state DTO to the FE type used in Redux store

* Update types

* Fix indexOf criteria getting integration type

* Change type name to integrationType name

* Change new components to be named functions to follow the FE style-guide

* Fix typos

Co-authored-by: Konrad Lalik <konrad.lalik@grafana.com>

* Decouple ReceiversTable from Redux state

* Create private useContactPointsState hook to simplify code in ReceiversTable component

* Add tests for getIntegrationType and refactor the method to validate the name

* Add tests for contactPointsStateDtoToModel method

* Remove unnecessary check

* Use Badge compoment for health status in contact point list

* Create new method parseIntegrationName to simplify getting types and index from integration name

Co-authored-by: Konrad Lalik <konrad.lalik@grafana.com>

* Alerting: Show integrations error feedback when expanding contact point in list (#52920)

* Use DynamicTable for rendering list of contact points and make them expandable if error status is available

* Render expanded content for contact points integrations

* Style and format last notify column

* Add send resolve column to the integration details

* Fix receiver id for DynamicTable row

* Update clock icon in integration state

* Fix tests

* Add PR review sugestions

* Alerting/integrations error feedback handle null dates in response 3 (#55659)

* Update fake response with lastNotify ISO8601 formatted, to be aligned with latest BE changes

* Update LastNotify in ReceiversTable component to handle null date

* Alerting/integrations error feedback handle 404 state not available (#55803)

* Create fetchContactPointsState using the future contact point url and handle 404 error

* Add contact points state tests

* Alerting/update receivers dto naming 2 (#56201)

* Update NotifierStatus naming and fix sendResolved not being updated in UI

* Return always empty ContactPointsState array when catching an error in the request response

* Fix test

* Show notification status only in notifications main view

* Calculate total error count from the final contactPointsState object, to avoid errors when duplicated entries are returned wronly in the response

* Add PR review suggestions

Co-authored-by: Konrad Lalik <konrad.lalik@grafana.com>
2022-10-06 15:23:38 +02:00
Torkel Ödegaard
9300ae7ce6 NavTree: Don't add license and stats page unless your a Grafana Admin (#56410) 2022-10-06 14:30:51 +02:00
Gábor Farkas
3a76c7aac3 grafana-ui: removed obsolete test that cause jest warnings (#56444) 2022-10-06 11:35:21 +00:00
Ashley Harrison
c5171b84a0 actually convert Cloudwatch ConfigEditor test to RTL (#56461) 2022-10-06 12:14:41 +01:00
Torkel Ödegaard
a8b883b1fa TopNav: Adding sign in to topnav and hiding it mega menu (#56403)
* TopNav: Adding sign in to topnav and hiding it mega menu

* Added target _self

* remove scss change

* Fix sign in link

* Fix other link
2022-10-06 13:00:32 +02:00
Torkel Ödegaard
0958d9ba55 Theme: Change body line-height to fix alignment issue (#56442)
* Theme: Change body line-height to fix alignment issue

* Updates
2022-10-06 12:59:43 +02:00
Levente Balogh
55187ebc48 Navtree: Make it possible to configure standalone plugin pages (#56393)
* feat: make it possible to register standalone app plugin pages under different sections

* refactor(sample.ini): use "admin" instead of "starred" section in the INI

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

* feat(defaults.ini): add app navigation settings to the defaults.ini as well

* fix: use the correct key in the tests

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
2022-10-06 12:57:03 +02:00
Joe Blubaugh
b1df15c4b9 Alerting: Add basic test wrappers to notification channel API test. (#56432)
Adds t.Run calls that supply the name of a receiver and its integrations
when the API response is being verified. This test has a rare flake and
it's difficult to track down without more context for the test failure.
2022-10-06 17:38:54 +08:00
Leo
b0ba94f316 Navigation: Use page nav in silence and policy notification pages (#55753)
* use pagenav in mutetiming form

* use pagenav in alert policy page

* use pageNav for Silence page

* added missing breadcrumbs
2022-10-06 11:18:43 +02:00
Dimitris Sotirakis
3aacda5579 Move files under pkg/build/packaging (#56435) 2022-10-06 03:33:40 -04:00
Dimitris Sotirakis
ec7d9e196e Change from grabpl to build for grafana-com (#56434) 2022-10-06 08:14:38 +01:00
Torkel Ödegaard
fe1395a1ec Revert "TopNav: Section styling fix (#56372)" (#56399)
This reverts commit b396f16fe1.
2022-10-06 08:23:29 +02:00
Joe Blubaugh
b476ae62fb Alerting: Write and Delete multiple alert instances. (#55350)
Prior to this change, all alert instance writes and deletes happened
individually, in their own database transaction. This change batches up
writes or deletes for a given rule's evaluation loop into a single
transaction before applying it.

These new transactions are off by default, guarded by the feature toggle "alertingBigTransactions"

Before:

```
goos: darwin
goarch: arm64
pkg: github.com/grafana/grafana/pkg/services/ngalert/store
BenchmarkAlertInstanceOperations-8           398           2991381 ns/op         1133537 B/op      27703 allocs/op
--- BENCH: BenchmarkAlertInstanceOperations-8
    util.go:127: alert definition: {orgID: 1, UID: FovKXiRVzm} with title: "an alert definition FTvFXmRVkz" interval: 60 created
    util.go:127: alert definition: {orgID: 1, UID: foDFXmRVkm} with title: "an alert definition fovFXmRVkz" interval: 60 created
    util.go:127: alert definition: {orgID: 1, UID: VQvFuigVkm} with title: "an alert definition VwDKXmR4kz" interval: 60 created
PASS
ok      github.com/grafana/grafana/pkg/services/ngalert/store   1.619s
```

After:

```
goos: darwin
goarch: arm64
pkg: github.com/grafana/grafana/pkg/services/ngalert/store
BenchmarkAlertInstanceOperations-8          1440            816484 ns/op          352297 B/op       6529 allocs/op
--- BENCH: BenchmarkAlertInstanceOperations-8
    util.go:127: alert definition: {orgID: 1, UID: 302r_igVzm} with title: "an alert definition q0h9lmR4zz" interval: 60 created
    util.go:127: alert definition: {orgID: 1, UID: 71hrlmR4km} with title: "an alert definition nJ29_mR4zz" interval: 60 created
    util.go:127: alert definition: {orgID: 1, UID: Cahr_mR4zm} with title: "an alert definition ja2rlmg4zz" interval: 60 created
PASS
ok      github.com/grafana/grafana/pkg/services/ngalert/store   1.383s
```

So we cut time by about 75% and memory allocations by about 60% when
storing and deleting 100 instances.
2022-10-06 14:22:58 +08:00
Ryan McKinley
b4e23e5d32 ObjectStore: update dev protobuf definitions (#56428) 2022-10-05 18:46:17 -07:00
Leon Sorokin
8300702524 Search: fuzzy match dashboard names in frontend from full list (#55721) 2022-10-05 18:32:35 -04:00
juanicabanas
69c49f6ba2 PublicDashboards: Make mixed datasource calls concurrently (#56421)
PublicDashboards: Make mixed datasource calls concurrently
2022-10-05 18:45:17 -03:00
ying-jeanne
d9cc292066 Star: Add uid in the endpoint (#54340)
* add new uid endpoing for star

* add store pool into service

* fix the endpoint caller

* udpate swagger file

* Update pkg/api/stars.go

Co-authored-by: Sofia Papagiannaki <1632407+papagian@users.noreply.github.com>

* remove useless code for star dashboard

* add new uid endpoing for star

* add store pool into service

* fix the endpoint caller

* Update pkg/api/stars.go

Co-authored-by: Sofia Papagiannaki <1632407+papagian@users.noreply.github.com>

* Update pkg/api/stars.go

Co-authored-by: Sofia Papagiannaki <1632407+papagian@users.noreply.github.com>

* solve linter

Co-authored-by: Sofia Papagiannaki <1632407+papagian@users.noreply.github.com>
2022-10-05 22:32:49 +02:00
Alexander Weaver
8df830557a Alerting: Move annotation functionality behind a history persistence interface (#56133)
* Move annotation functionality behind a history persistence interface

* Rename to RecordState

* Fix lint error in import aliasing

* One more import linter error
2022-10-05 15:32:20 -05:00
Kevin Yu
b3087cfcd1 QueryEditorRow: Only pass error to query editor if panel is not loading (#56350) 2022-10-05 12:19:49 -07:00
Ryan McKinley
97d19830cf ObjectStore: rename modified to updated (#56420) 2022-10-05 14:58:46 -04:00
Artur Wierzbicki
a94acb7f61 Object store: get user from context (#56346)
* GRPC Server: Add signedInUser to context after auth

* add permissions to signedInUser

* add access control permissions test

* add additional signedInUser checks

* get user from context

* move `UserFromContext` to object/auth.go

Co-authored-by: Todd Treece <todd.treece@grafana.com>
2022-10-05 17:00:34 +00:00
Beto Muniz
4a14d75086 Add prop to improve memory usage listing metrics (#56398) 2022-10-05 12:19:12 -03:00
Andres Martinez Gotor
2cdbd05634 Azure Monitor: Fix subscription selector when changing data sources (#56284) 2022-10-05 16:59:06 +02:00
Sven Grossmann
0d8ea2bb34 LogContext: Fix scroll position in upper context group (#56370)
* fix log row being falsely added to context

* do not add to many lines

* fix scroll position in context

* more flexible id comparison

* add original refid to context query

* added missing row comparison

* updated comment

Co-authored-by: Matias Chomicki <matyax@gmail.com>

Co-authored-by: Matias Chomicki <matyax@gmail.com>
2022-10-05 16:26:22 +02:00
Sven Grossmann
2410b88ad1 Logs: Show LogRowMenu also for long logs and wrap-lines turned off (#56030)
* show logrowmenu as new table-cell

* fix dashboard position

* added reasonable position

* fix log row message not beeing 100%
2022-10-05 16:11:08 +02:00
idafurjes
bc7a383252 Remove org methods from sqlstore interface (#56358)
* Remove org methods from sqlstore interface

* Remove some mocks

* Fix some tests
2022-10-05 15:47:56 +02:00
Yuriy Tseretyan
ad2a1dd680 Alerting: Start ticker only when scheduler starts (#56339) 2022-10-05 09:35:02 -04:00
Andres Martinez Gotor
8594e648e8 Azure Monitor: Adapt empty Logs response (#56378) 2022-10-05 15:29:34 +02:00
Ivan Ortega Alba
7fd613ec0d E2E: Remove time zone scenario flackyness (#55458)
Co-authored-by: polinaboneva <polina.boneva@grafana.com>
2022-10-05 16:00:33 +03:00
GitStart
48ebaa48cc Toolkit: Remove changelog command (already replaced by a github workflow) (#56073)
Co-authored-by: gitstart <gitstart@gitstart.com>
Co-authored-by: Rubens Rafael <70234898+RubensRafael@users.noreply.github.com>
Co-authored-by: Matheus Muniz <matheusmuniz100@hotmail.com>
Co-authored-by: Nitesh Singh <nitesh.singh@gitstart.dev>
Co-authored-by: Matheus Benini Ferreira <88898100+MatheusBeniniF@users.noreply.github.com>
Co-authored-by: Thiago Nascimbeni <tnascimbeni@gmail.com>
Co-authored-by: Rafael Toledo <87545086+Toledodev@users.noreply.github.com>
Co-authored-by: Murilo Amaral <87545137+MuriloAmarals@users.noreply.github.com>
2022-10-05 14:44:53 +02:00
Gilles De Mey
87cba8836f Alerting: Expressions pipeline redesign (#54601) 2022-10-05 14:35:15 +02:00
Tania
222c33c307 Remove branding feature toggle (#56379) 2022-10-05 14:07:35 +02:00
Ashley Harrison
78a57f2064 Navigation: use ToolbarButton in TopSearchBar for consistency (#56371)
* use ToolbarButton in TopSearchBar for consistency

* Removed unnessary styles

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
2022-10-05 12:22:47 +01:00
Dimitris Sotirakis
636ae8d091 Update grabpl version to v3.0.11 (#56377) 2022-10-05 14:18:28 +03:00
Torkel Ödegaard
b396f16fe1 TopNav: Section styling fix (#56372) 2022-10-05 13:06:51 +02:00
Jack Westbrook
dcc02a8ebe Storybook: Fix asset paths for hosted storybooks (#56319)
* feat(sass): introduce font-file-path var to define where to load fonts from

* feat(storybook): introduce storybook sass theme styles to set font file paths

* chore(sass): change imports so treated as sass rather than css

* feat(storybook): filter assets so builds dont contain thousands of files
2022-10-05 12:10:29 +02:00
Torkel Ödegaard
aa274500cf TopNav: Fixes to page and plugin page handling (#56278)
* Added labels

* App page fixes

* Switch to switch

* Fixing sort position for Apps
2022-10-05 11:46:27 +02:00
Ivana Huckova
4469572b27 Loki: Add support for range aggregations with by grouping (#56184)
* Loki: Fix unwrapped range operations with grouping

* Update, fix tests

* Fix modeller
2022-10-05 11:32:33 +02:00
Gilles De Mey
015651f860 @grafana/ui: adds a virtualized options for the Select component (#55629) 2022-10-05 10:33:47 +02:00
Ashley Harrison
7ac7f844f4 improve some grafana-ui types (#56318) 2022-10-05 09:04:10 +01:00
Levente Balogh
ae5e8bc53b refactor: rename Data Connections to Connections (#56353) 2022-10-05 09:56:58 +02:00
brendamuir
b1b3f9e24c Fixes alertmanagers whats new entry (#56356) 2022-10-05 08:39:50 +01:00
idafurjes
5167c55760 Chore: Move methods from sqlstore to user store (#56305)
* Copy sqlstore methods to suer store

* Adjust ProvideService signatures in test

* Add xorm tags and tests for search

* Remove methods from sqlstore

* fix lint in tests
2022-10-05 09:34:36 +02:00
Torkel Ödegaard
580ca144fd StyleGuide: Minor fix for themes.md (#56012)
* Update themes.md

* Update themes.md

* Updates
2022-10-05 08:50:39 +02:00
Gábor Farkas
3f4bf76324 cloudwatch-logs: use not-deprecated version of type (#56239) 2022-10-05 08:47:57 +02:00
Dimitris Sotirakis
5cdc932f8c CI: Stop publishing OSS images for security mode (#56088)
* No-op: Refactor publish images pipeline struct

* Stop publishing images for OSS
2022-10-05 09:39:38 +03:00
George Rodrigues
8950d86141 fix: some typos (#56171) 2022-10-04 18:43:49 -05:00
Todd Treece
4163f31d76 GRPC Server: Add signedInUser to context (#56059) 2022-10-04 16:31:02 -04:00
sam boyer
ba97b268d0 Playlist: Split PlaylistItem into standalone TS type (#56343)
* playlist: Split PlaylistItem into standalone TS type

* update playlist model

* actually set the title

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2022-10-04 16:08:26 -04:00
Nathan Marrs
2c1c98f3b6 Canvas: Promote to beta (#56217)
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2022-10-04 12:29:56 -07:00
Adela Almasan
8833e35b43 Canvas: Increase Add Item picker width (#56204) 2022-10-04 15:22:11 -04:00
Ryan McKinley
4fc9b9aa35 Storage: Cleanup object history API (#56215) 2022-10-04 14:57:26 -04:00
Kat Yang
7715672fb3 Chore: use org service methods (#55768)
* Chore: use org service methods

* fix tests

* fix errors

* adjust func signatures for getbyname

* 💩

* Use the same fake service to get the user in AC and in HS

* Fix middleware test

* Fix more middleware test

* Fix api tests

Co-authored-by: gamab <gabi.mabs@gmail.com>
Co-authored-by: Ida Furjesova <ida.furjesova@grafana.com>
2022-10-04 14:48:02 -04:00
Grot (@grafanabot)
169f1ab974 ReleaseNotes: Updated changelog and release notes for 9.1.7 (#56323) 2022-10-04 16:56:21 +00:00
Ryan McKinley
d5e2713168 Storage: Add HTTP endpoint for object store service (#56214) 2022-10-04 09:40:15 -07:00
Sofia Papagiannaki
bba6eb1f2d Chore: update latest.json to 9.1.7 (#56315) 2022-10-04 19:32:13 +03:00
Jack Westbrook
d7228829ad Grafana UI: Clean up bundle (#56100)
* chore(grafana-ui): don't bundle emotionPerfTest

* chore(grafana-ui): fix circular dependencies that cause esm chunks to not match up

* chore(grafana-ui): prevent bundling all css properties in package types
2022-10-04 17:51:45 +02:00
Grot (@grafanabot)
a50017da1d ReleaseNotes: Updated changelog and release notes for 9.1.7 (#56313) 2022-10-04 18:26:30 +03:00
Ryan McKinley
3b1a8d45ed Playlist: update service so it supports both read+write (#55959) 2022-10-04 11:11:18 -04:00
Ashley Harrison
d293055ef6 enable rule jsx-a11y/iframe-has-title (#56292) 2022-10-04 16:04:28 +01:00
Giordano Ricci
a7de5182b0 Explore: Revert split pane resize feature (#56310)
* Revert "Explore: Prevent panes from disappearing when resizing window in split view (#55696)"

This reverts commit 0a5aa19ca2.

* Revert "Explore: Add resize to split view, with Min/Max button (#54420)"

This reverts commit c3e4f1f876.
2022-10-04 15:42:43 +01:00
Ashley Harrison
d3f50f791c Convert test to RTL (#56279) 2022-10-04 15:37:47 +01:00
Dimitris Sotirakis
d94af21cac Replace filename with path without the local dir (#56296) 2022-10-04 17:18:07 +03:00
brendamuir
8176810b2b adds alertmanager to whats new (#56304) 2022-10-04 14:59:52 +01:00
Christopher Moyer
d0b437741e adds 4 links to blogs (#56193) 2022-10-04 08:28:00 -05:00
Gábor Farkas
291276e767 elasticsearch: improved types in the typescript files (#56293) 2022-10-04 15:08:57 +02:00
Todd Treece
152c7f149a Prometheus: Add Exemplar sampling for streaming parser (#56049) 2022-10-04 08:40:01 -04:00
Leo
4eea5d5190 Navigation: Use navid and pagnav in alert rules pages (#55722)
* add navid and pagenav to edit/add/view alert rules

* move ruleeditor smaller component to its own file

* fix form alignments with new layout

* fixed broken test

* reuse AlertingPageWrapper
2022-10-04 14:36:36 +02:00
idafurjes
a25516fbe3 Chore: Copy sqlstore methods to user store (#56280)
* Chore: Copy sqlstore methods to user store

* Fix xorm tag

* Add tests

* Remove unused methods from sqlstore
2022-10-04 14:14:32 +02:00
Mitch Seaman
3d58f39b25 Remove Custom Branding previews from What's new (#56273)
We need to remove the custom branding announcement from the 9.2 release, since we will not release the feature in Grafana Enterprise.
2022-10-04 13:06:10 +01:00
Gábor Farkas
3fb104209f explore: logs volume histogram: anchor graph to zero (#56200) 2022-10-04 13:54:39 +02:00
Ashley Harrison
e942a3d99d enable jsx-a11y/no-autofocus (#56288) 2022-10-04 12:54:14 +01:00
Gabriel MABILLE
80dfa788c6 Azure OAuth: Use TID from id_token by default (#56264)
Co-authored-by: Kalle Persson <kalle.persson@grafana.com>

Co-authored-by: Kalle Persson <kalle.persson@grafana.com>
2022-10-04 13:48:15 +02:00
Sofia Papagiannaki
91b4ce08a9 Update github.com/labstack/echo/v4 (#56226) 2022-10-04 14:31:05 +03:00
Will Browne
1038ac7308 DataSources: Remove unused cfg from core Grafana data source (#56188)
* remove unused cfg from grafana ds

* fix test
2022-10-04 06:32:25 -04:00
Todd Treece
2d433194d0 GRPC Server: Add tracing interceptors (#56045)
Co-authored-by: Artur Wierzbicki <artur.wierzbicki@grafana.com>
2022-10-04 14:27:14 +04:00
idafurjes
a863a4d95d Chore: Copy user methods over to user store (#56000)
* Chore: Copy user methods over to user store

* Fix some tests and bugs

* Add some more tests

* Move tests to user store

* Move back the tests

* Add some tests
2022-10-04 12:17:55 +02:00
Ashley Harrison
ab09f2783c fix section root styling, parentItem will be the home item now (#56266) 2022-10-04 11:17:12 +01:00
Dimitris Sotirakis
26d64a778e Add cronjob option at switch case (#56272) 2022-10-04 11:15:47 +01:00
renovate[bot]
cb5195329b Update dependency selecto to v1.20.2 (#56245)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-10-04 10:42:49 +01:00
Joe Blubaugh
ce89624ca2 Alerting: Update imported prometheus alertmanager version. (#56228)
Version 0.24.0 has a few bugs that cause panics. We update here to the
latest commit on github.com/prometheus/alertmanager's main branch.

Panic Bugs:
https://github.com/prometheus/alertmanager/issues/2936
https://github.com/prometheus/alertmanager/issues/3064
2022-10-04 17:41:34 +08:00
Ashley Harrison
7e5509891a Navigation: adjust megamenu position in mobile (#56262)
* adjust megamenu position in mobile

* improve mobile breadcrumb logic
2022-10-04 10:40:34 +01:00
Gábor Farkas
3c1de8750c GrafanaData: Deprecate the LogsParser type (#56242)
* added copy of code to main-grafana

* grafana-data: add depreceted-notice
2022-10-04 11:25:22 +02:00
Andreas Christou
462ca50512 AzureMonitor: Ensure resourceURI template variable is migrated (#56095)
* Ensure resourceURI template vars are migrated

- Do not filter queries containing a resource URI template
- Update migration
- Add test

* Update condition

* Review
2022-10-04 04:44:34 -04:00
renovate[bot]
efe4ce06a2 Update dependency sass to v1.55.0 (#56243)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-10-04 09:41:26 +01:00
Levente Balogh
cc6fae18db BackendSrv: Make it possible to pass options to .get|post|patch... methods (#51316)
* feat: make it possible to pass in `options` to `.get()`, `.post()`, etc methods

* feat(Datasource): make it possible to specify `optinos` for `getResource()` and `postResource()`

* fix(BackendSrv): use partial `BackendSrvRequest`

* feat(Datasource): make it possible to set `options` for resource requests

* refactor(BackendSrv): remove internal usage of `.request()`

* fix(GettingStarted): remove unnecessary import

* fix: fix type issues by typing the delete dashboard response

* refactor: use more strict types for `params`

By reusing the type of `BackendSrvRequest.params`

* refactor: make the options paramater partial

* fix: extract `data` from the fetch response

* docs: update the deprecation notice or `BackendSrv.request()`

* refactor: use `.request()` as if it was private

* refactor: remove unnecessary change
2022-10-04 10:40:21 +02:00
Giordano Ricci
489b302c03 Glue: Correlations minor APIs behavior improvements (#56078)
* add correlation config type, CorrelationConfig validator & default values

* make config required when creating correlations

* make targetUID optional, add validation for createCommand & configType

* fix tests

* update remaining tests

* fix lint error

* Update pkg/services/correlations/models.go

Co-authored-by: Piotr Jamróz <pm.jamroz@gmail.com>

* update docs

Co-authored-by: Piotr Jamróz <pm.jamroz@gmail.com>
2022-10-04 09:39:55 +01:00
Giordano Ricci
3381629d3d Chore: Convert Wrapper to function component (#56172)
* WIP

* remove comment
2022-10-04 09:39:22 +01:00
Jesus Vazquez
cb99b94b01 Add error information to graphite queries tracing (#55249)
This commit extends graphite QueryData() instrumentation to include in
the traces information about possible errors.

I've added an attribute about the graphite response code as well as
records for errors if there are any.
2022-10-04 10:30:27 +02:00
Ashley Harrison
317b353b34 Navigation: Collapsible section nav implementation (#55995)
* initial collapsible section nav implementation

* fix unit tests

* automatically collapse sectionnav when below lg size

* fix unit tests

* only register 1 event listener each time

* fix display name for SectionNavToggle
2022-10-04 09:19:23 +01:00
Will Browne
4087ad413f re-use fake trace + feature toggles (#56186) 2022-10-04 10:15:10 +02:00
renovate[bot]
c83d576ffc Update dependency @cypress/webpack-preprocessor to v5.13.1 (#56072)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-10-04 09:14:09 +01:00
renovate[bot]
51cf573656 Update dependency rudder-sdk-js to v2.15.0 (#56196)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-10-04 09:11:37 +01:00
Esteban Beltran
25bb926a0a Toolkit: Deprecate component:create command (#56086)
* Mark component:create as deprecated

* Update message

* Update packages/grafana-toolkit/src/cli/index.ts

Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com>

* Add alternative message

Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com>
2022-10-04 09:43:24 +02:00
Victor Marin
7b93d85a85 XYChart: Beta release (#55973)
* Bump state from alpha to beta

* Sync manual pointsize max with auto one

* Add xyChart to list
2022-10-04 10:41:36 +03:00
Dimitris Sotirakis
8eea6f7f4f Add edition as environment var (#56069) 2022-10-04 10:35:18 +03:00
Leon Sorokin
eeb31c2901 Heatmap: fix color scheme reversal (#56227) 2022-10-04 02:17:58 -05:00
Dimitris Sotirakis
f7c6fe0c97 Fix update-changelog.yml version input (#56224) 2022-10-04 02:55:13 -04:00
Victor Marin
6913623461 Take standard options min/max into account (#55972) 2022-10-04 08:58:35 +03:00
Brendan O'Handley
82d8015469 OpenTSDB: Convert the OpenTSDB Query Editor from Angular to React (#54677)
* add query editor to module

* add metric section, add tests, update query type

* remove use of any for betterer

* fix test

* add tooltip for alias

* run runQuery on select change, fix metric select loading

* add downsample row, differentiate for tsdb version

* add tests for mteric section and downsample section

* add filter section react component and tests

* add tag section and tests

* add rate section and tests

* remove angular code

* fix styling

* remove comments

* remove unused code
2022-10-03 17:00:46 -04:00
Ethan
ad48cee2bb init sbom action (#56177) 2022-10-03 15:53:28 +00:00
Torkel Ödegaard
dba0baec69 TopNav: Fix pages import dashboard and create new folder (#56182) 2022-10-03 17:30:53 +02:00
renovate[bot]
bcd1c48a4d Update dependency rollup-plugin-esbuild to v4.10.1 (#56191)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-10-03 16:27:37 +01:00
Gareth Dawson
05e958f689 Loki: Add tests for LokiOptionFields.tsx (#56183)
* WIP: Added tests to LokiOptionFields.test.tsx

* chore(loki-option-fields): fix error with `userEvent`

Using `fireEvent` prevents the running condition.

* Add tests for LokiOptionFields.tsx

* chore: remove unwanted comments

* chore: update test names

Co-authored-by: Matias Chomicki <matyax@gmail.com>
2022-10-03 15:56:30 +01:00
renovate[bot]
8f578d18ce Update dependency rollup to v2.79.1 (#56187)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-10-03 16:42:55 +02:00
Todd Treece
1c61c81dde Prometheus: Various buffered and streaming parsing fixes (#55941) 2022-10-03 10:26:54 -04:00
Ashley Harrison
8984507291 Navigation: show breadcrumbs correctly when on the home page (#55759)
* show breadcrumbs correctly when on the home page

* adjust breadcrumb unit tests

* update betterer

* fix backend tests

* update getSectionRoot to look at the home nav id

* remove redundant setting of home dashboard

* construct a home navmodelitem in the backend

* fix cases when the feature toggle is off

* fix unit test

* fix more unit tests

* refactor how buildBreadcrumbs works

* use HOME_NAV_ID

* move homeNav useSelector into NavToolbar

* remove unnecesary cloneDeep

* don't need locationUtil here

* restore using getUrlForPartial in DashboardPage

* special case for the editview query param

* remove commented out code

* add comment to clarify splice behaviour

* slightly cleaner syntax
2022-10-03 15:05:19 +01:00
Virginia Cepeda
0d348dc0b1 Alerting: log alert rule creation and clicking state filters (#55698)
* Add messages for new trackings

* Track clicking on alert state filters

* Track creating alert rule from panel

* Track creating alert rule from scratch

* Track on success and when cancelling a rule creation
2022-10-03 11:00:19 -03:00
Santiago
09f8e026a1 Alerting: Expose info about notification delivery errors in a new /receivers endpoint (#55429)
* (WIP) switch to fork AM, first implementation of the API, generate spec

* get receivers avoiding race conditions

* use latest version of our forked AM, tests

* make linter happy, delete TODO comment

* update number of expected paths to += 2

* delete unused endpoint code, code review comments, tests

* Update pkg/services/ngalert/notifier/alertmanager.go

Co-authored-by: Matthew Jacobson <matthew.jacobson@grafana.com>

* remove call to fmt.Println

* clear naming for fields

* shorter variable names in GetReceivers

Co-authored-by: Matthew Jacobson <matthew.jacobson@grafana.com>
2022-10-03 10:58:41 -03:00
Yuriy Tseretyan
1e16dd5b7c Docs: Update Grafana Alerting migration article to mention paused alert rules (#55590)
Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com>
2022-10-03 09:45:09 -04:00
Christopher Moyer
c5b68ed497 adds note about org_role being case sensitive (#56043) 2022-10-03 08:20:19 -05:00
Dimitris Sotirakis
d32c67b52a CI: Add packages-bucket flag to publish packages command (#56170)
* Add public bucket string

* Fix lint
2022-10-03 13:29:32 +01:00
Oscar Kilhed
3342e529b4 Docs: Update postgresql and mssql docs (#56011)
* Update mssql docs first draft

* Update postgresql docs first draft

* update image tag

* add missing >

* Update docs/sources/datasources/mssql.md

* Update docs/sources/datasources/mssql.md

* Update docs/sources/datasources/postgres.md

* Update docs/sources/datasources/postgres.md

* Update docs/sources/datasources/postgres.md

* Reflect updated image names

Co-authored-by: Garrett Guillotte <100453168+gguillotte-grafana@users.noreply.github.com>
2022-10-03 14:06:51 +02:00
Oscar Kilhed
885e8efec6 Docs: update mysql docs to reflect editor changes (#54568)
* Docs: update mysql docs to reflect visual query builder/code editor changes

* Apply suggestions from code review

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

* Add missing >

* Reflect updated image name

Co-authored-by: Kim Nylander <104772500+knylander-grafana@users.noreply.github.com>
Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com>
2022-10-03 14:06:20 +02:00
Dimitris Sotirakis
947838cca0 CI: Move grafanacom command to OSS (#55853)
* Move publish-packages command over from

* Fix lint

* Move grafanacom command to OSS

* Add GetLatestMainBuild to gsutil

* Fix lint

* More lint fixes

* Add tests for grafanacom

* Fix lint
2022-10-03 14:14:24 +03:00
renovate[bot]
abfd647283 Update dependency lerna to v5.5.4 (#54955)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-10-03 12:45:11 +02:00
renovate[bot]
eed8df5ccc Update dependency react-colorful to v5.6.1 (#56165)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-10-03 11:38:18 +01:00
ms-hujia
ec024ae960 Azure Monitor: Add support to customized routes (#54829) 2022-10-03 12:33:37 +02:00
Eric Leijonmarck
4200d7b246 Auth: fix check for conflict login in validation (#56154)
* fix: check for conflict login

* review comment fix
2022-10-03 06:24:26 -04:00
renovate[bot]
3372668889 Update dependency css-minimizer-webpack-plugin to v4.2.0 (#56153)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-10-03 10:58:26 +01:00
Jack Westbrook
d1b21a5981 Grafana UI: Prevent built storybook being bundled with package (#56158) 2022-10-03 11:41:38 +02:00
Ashley Harrison
f2b06abb33 Convert SpanDetail/index.test.js to RTL (#56019) 2022-10-03 10:22:50 +01:00
Ashley Harrison
3e688ecf7d Navigation: remove description from the backend navmodel and use subTitle instead (#56155)
* remove description from the backend navmodel and use subTitle instead

* only add admin subtitle in topnav
2022-10-03 10:09:32 +01:00
Eric Leijonmarck
f7de253cdd fix: remove permission grouping (#56157) 2022-10-03 10:59:24 +02:00
gotjosh
501e921b2b Alerting: Allow created by to be manually set when there's no creator for silences (#55952)
* Alerting: Allow created by to be manually set when there's no creator

Grafana has a mode that allows unauthenticated interaction, typically the created by field of a silence is inferred from the current logged user. When this is not present, the field is left black and thus the silence creation fails.

This allows us to set the created by when we is not possible to infer it from the current user.

* Show created by input field only if user is not logged

* Add test for new logic with createdBy input field

Co-authored-by: Sonia Aguilar <soniaaguilarpeiron@gmail.com>
2022-10-03 10:56:27 +02:00
Laura Fernández
fca252e7dc A11y: enable rule jsx-a11y/alt-text (#55832)
* Enable jsx-a11y/alt-text rule

* Fix errors

* Fix tests

* Enable jsx-a11y/alt-text rule after solving merge conflict

* Delete unused import

* Modify files according to the reviewer's comments

* Revert test changes and update snapshot

* tweaks to image alt names

Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2022-10-03 09:27:04 +01:00
renovate[bot]
6856784134 Update Storybook updates to v6.5.10 (#49793)
* Update Storybook updates to v6.5.6

* refactor(storybook): fix up dependencies and webpack configs

* chore(storybook): bump to 6.5.7

* chore(yarn): refresh lock file

* chore(storybook): bump storybook to 6.5.10

* refactor(storybook): update configuration to use babel, tidy webpack config, clean dependencies

* chore(storybook): bump to 6.5.12

* chore(storybook): bump storybook-dark-mode to 1.1.2

* chore(storybook): workaround resolving storybook-docs addon for yarn pnp

* refactor(storybook): remove preview-head.html in favour of global theme styles

* chore(storybook): patch storybook-dark-mode to work with SB 6.5.x and yarn PnP

* feat(storybook): move to using MDXv2

* fix(icon): make sure icon story doesn't disappear offscreen and is scrollable

* chore(grafana-ui): clean up dependencies related to storybook

* feat(storybook): enable webpack5 filesystem cache

* feat(storybook): replace babel with esbuild

* fix(emotionperftest): fix jsx pragma for esbuild

* fix(emotionperftest): force jsxRuntime to classic so esbuild and babel compile without error

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com>
2022-10-03 09:23:47 +02:00
Esteban Beltran
29ca8de6c0 Toolkit: Remove unused legacy cherrypick command (#56114) 2022-10-03 09:04:11 +02:00
Nathan Marrs
fc62f7ae23 Canvas: Add text element (#56137)
Co-authored-by: Drew Slobodnjak <drew08t@users.noreply.github.com>
2022-09-30 17:21:02 -07:00
Garrett Guillotte
ef1aa8ceb8 Docs: Add link to TimescaleDB docs (#56134)
* Added a link for more information

Added a link to TimescaleDB so that users can get additional information if need be.

* fixed formatting

* fixed the table

* made it prettier

* make it pretty for CI

Co-authored-by: Rajakavitha Kodhandapani <krajakavitha@gmail.com>
2022-09-30 15:35:11 -07:00
Ryan McKinley
385ebea540 Devenv: move timeseries dashboards to a timeseries folder (#56131) 2022-09-30 13:10:20 -07:00
Artur Wierzbicki
85b965cbec Storage: Dummy object server and basic integration tests (#56014)
* object extractors

* update bluge to use summary values

* gosec

* move to store/object package

* references

* references

* references

* same thign but with protobuf

* now the service

* now with summary

* now with summary

* from protobuf

* from protobuf

* cleanup

* remove hand crafted file

* update proto definitions

* update comments

* remove properties

* remove properties

* re-generate

* add batch

* move ref to raw struct

* GRPC test infra

* fix merge

* add delete

* lint

* rename to dummyobjectserver

* update comment

* refactor collection, simplify dummy server

* update

* refactor test structure

* more tests

* more tests

* replace collection with infra/persistentcollection

* skip if not integration test suite

* very important lint fix

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2022-09-30 15:56:07 -04:00
Ryan McKinley
268a49cb38 Devenv: add dashboard showing timeseries out of range points (#56130) 2022-09-30 15:47:23 -04:00
Alexander Weaver
c16317e5b8 Alerting: Move fake rule store to the test utilities package (#56062)
* Move fakeRuleStore to tests/fakes package

* Break stub dependencies on store

* Update existing tests to point to new location

* Remove unused stub of TimeNow

* Rename fake to take advantage of package name
2022-09-30 14:36:51 -05:00
Drew Slobodnjak
82d7f80a15 Canvas: Rename textbox to rectangle (#55633)
Co-authored-by: nmarrs <nathanielmarrs@gmail.com>
2022-09-30 10:44:47 -07:00
Artur Wierzbicki
ea1334c01d Chore: Persistent collection (#56074)
* persistent collection

* dont remove temp dir

* temp dir change

* lint

* add experimental comment

* move to X package

* lint

* orgID -> namespace
2022-09-30 21:34:44 +04:00
Nathan Marrs
2eb24bbc4e Canvas: Add canvas editor options to inline editor (#55970)
Co-authored-by: Drew Slobodnjak <60050885+drew08t@users.noreply.github.com>
2022-09-30 09:52:30 -07:00
Andres Martinez Gotor
9958f938e0 @grafana/ui: Render PageToolbar Go Back icon for smaller window size (#55671) 2022-09-30 17:36:14 +02:00
kay delaney
81a39b7e5b Variables: Add confirmation modal when deleting variables (#56016) 2022-09-30 16:32:14 +01:00
Alexa V
e2ef41be72 Docs [Standard options definitions] Add missing information for prefix in custom unit (#56098) 2022-09-30 16:13:26 +02:00
renovate[bot]
c29667f35e Update dependency react-calendar to v3.9.0 (#55921)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-09-30 06:42:04 -07:00
Gareth Dawson
2338660a62 Loki: Add more assertions to loki-query-builder.spec.ts (#56044)
* Add more assertions to loki-query-builder.spec.ts

* Update assertions in loki-query-builder.spec.ts
2022-09-30 14:27:48 +01:00
Josh Hunt
80065c47ab Chore: Updating swagger spec (#56094) 2022-09-30 09:15:09 -04:00
Leo
7df49ca230 Navigation: Add News to top nav (#55466)
* added news feed component

* move button to news component

* create newsfeed hooks and conver NewsPanel to functional component

* added news_feed_enabled and news_feed_url to server settings ini

* add default value in defaults.ini

* set news drawer settings value to true by default

* remove server settings config

* use useToggle hook

* fix newsitem render

* support drawer on mobile screen

* use media query utility
2022-09-30 15:11:24 +02:00
juanicabanas
5eab922a16 Dashboard: Record the number of cached queries for usage insights. 2022-09-30 09:49:16 -03:00
Gábor Farkas
a069a01853 grafana-data: logs: add deprecated-info (#56077) 2022-09-30 14:22:04 +02:00
Ashley Harrison
5b1fdd535a Accessibility: turn on jsx-a11y/no-noninteractive-tabindex + fix/ignore errors (#56084)
* turn on jsx-a11y/no-noninteractive-tabindex + fix/ignore errors

* update comments
2022-09-30 13:20:39 +01:00
Shirley
09079bfb65 Upgrade to grafana-aws-sdk v0.11.0 (#56042) 2022-09-30 13:51:28 +02:00
Marcus Andersson
d406e6d899 Docs: Added icon type improvements to plugin migration guide (#56075) 2022-09-30 13:17:11 +02:00
Laura Benz
fc6afc6b84 Core: Implement aria attributes for query rows, improve a11y (#55563)
* feat: add aria-expanded prop

* refactor: remove console.log()

* feat: add aria-controls

* refactor: add id to expendable section

* refactor: create unique id
2022-09-30 13:03:55 +02:00
sam boyer
9ec7b202b6 playlist: introduce coremodel schema, swap in for backend DTO types (#56048)
* Add simplest possible playlist schema

* Add @grafana(decisionNeeded) attributes

* playlistid, not playlist_id
2022-09-30 06:33:11 -04:00
Gábor Farkas
d2601003cf Logs: move logs-functions from grafana-data to grafana-main (#55457)
* logs: move utils from grafana-data to grafana

* logs: adjust imports

* updated betterer checksum file
2022-09-30 12:16:47 +02:00
Sven Grossmann
0c1e4979af add correct overscroll-behavior to context modals (#56070) 2022-09-30 11:25:51 +02:00
renovate[bot]
62811c2141 Update dependency @rushstack/node-core-library to v3.53.0 (#56002)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-09-30 10:01:30 +01:00
Timur Olzhabayev
2ded4c12ab Chore: Rename one of the publish docs action steps (#55888) 2022-09-30 09:48:54 +02:00
Jeff Levin
e4157361d9 documentation: update documentation for enabling tracing on a grafana instance (#56068)
This PR improves docs around enabling traces on grafana.
In order to enable tracing and get a traceID, you must set the address field in your config.ini

https://github.com/grafana/grafana/blob/main/contribute/engineering/backend/instrumentation.md#2-enable-tracing-in-grafana
2022-09-30 03:44:12 -04:00
GitStart
2664575a4a Dashboard Edited/Saved notifications leak into other views (#55540)
Co-authored-by: Nitesh Singh <nitesh.singh@gitstart.dev>
Co-authored-by: gitstart <gitstart@users.noreply.github.com>
Co-authored-by: Rubens Rafael <70234898+RubensRafael@users.noreply.github.com>
Co-authored-by: RubensRafael <rubensrafael2@live.com>
Co-authored-by: Matheus Benini Ferreira <88898100+MatheusBeniniF@users.noreply.github.com>
Co-authored-by: Thiago Nascimbeni <tnascimbeni@gmail.com>
Co-authored-by: gitstart <gitstart@gitstart.com>
Co-authored-by: Rafael Toledo <87545086+Toledodev@users.noreply.github.com>
Co-authored-by: Murilo Amaral <87545137+MuriloAmarals@users.noreply.github.com>
Co-authored-by: Júlio Piubello da Silva Cabral <julio.piubello@gitstart.dev>

Co-authored-by: gitstart <gitstart@users.noreply.github.com>
Co-authored-by: Nitesh Singh <nitesh.singh@gitstart.dev>
Co-authored-by: Rubens Rafael <70234898+RubensRafael@users.noreply.github.com>
Co-authored-by: RubensRafael <rubensrafael2@live.com>
Co-authored-by: Matheus Benini Ferreira <88898100+MatheusBeniniF@users.noreply.github.com>
Co-authored-by: Thiago Nascimbeni <tnascimbeni@gmail.com>
Co-authored-by: gitstart <gitstart@gitstart.com>
Co-authored-by: Rafael Toledo <87545086+Toledodev@users.noreply.github.com>
Co-authored-by: Murilo Amaral <87545137+MuriloAmarals@users.noreply.github.com>
Co-authored-by: Júlio Piubello da Silva Cabral <julio.piubello@gitstart.dev>
2022-09-30 09:18:50 +02:00
Ryan McKinley
213cfe5117 Object: use protobuf to declare the raw/summary types (#55646) 2022-09-29 22:18:15 -07:00
Alexander Weaver
d66ed6fe35 Alerting: Move stray model structs in store package to model package (#55968)
* Move stray command structs to model package like the rest

* Fix broken references
2022-09-29 15:47:56 -05:00
lean.dev
7bd8dbf2f8 Docs: Update Public Dashboard documentation (#56035) 2022-09-29 14:24:38 -03:00
Sven Grossmann
3afa3f5e21 fix wrong context height (#56024) 2022-09-29 18:12:20 +02:00
sam boyer
59a3e18bb2 Fix prefix dropper in Go codegen (#56041) 2022-09-29 12:01:02 -04:00
Mike McFarland
46da77d1a0 docs: fix typo in is_null expression explainer (#55988) 2022-09-29 10:04:43 -05:00
Sofia Papagiannaki
6099e55e62 SQLStore: Remove call to deleted store.NewSession() (#56025) 2022-09-29 10:17:33 -04:00
Sven Grossmann
6bc09a6390 Logs: Add Download logs button to log log-browser (#55163)
* move download functions to utils

* add downloads button

* removed unused export annotations

* changed button to `ToolbarButton`

* added tests and restructured download methods

* pin `blob-polyfill`

* add missing import

* changed type
2022-09-29 16:09:40 +02:00
Sofia Papagiannaki
8b77ee2734 SQLStore: Ensure that sessions are always closed (#55864)
* SQLStore: Ensure that sessions are always closed

Delete `NewSession()` in favour of `WithDbSession()`

* Add WithDbSessionForceNewSession to the interface

* Apply suggestions from code review
2022-09-29 15:55:47 +03:00
Sven Grossmann
c9e957a44e Logs: Center show context modal on click (#55989)
* added center implementation

* fixed passing `scrollElement` to wrong component

* rather destructure than direct ref

* removed unnecessary `undefined`
2022-09-29 14:51:20 +02:00
Artur Wierzbicki
64eff8196c Chore: expose grpc server address (#56013) 2022-09-29 08:42:01 -04:00
Eric Leijonmarck
1e8f8dff4b Auth: Adds validation and ingestion of conflict file (#53014)
* add users-manager command

* add users-manager command

* rename files

* refactor: imports and renaming

* Command: add conflict merge user command

- MergeUser will
	- replace all user_ids from conflicting users to the chosen userId
	- delete users whose user_ids are not the chosen user
- SameIdentification will
	- update chosen user with chosen email,login details
	- delete users whose user_ids are not the chosen user

* refactor: clean up

* refactor: create structure for read, validate, ingest

* feat: ls and generate-file for conflicting users

* remove usagestats

* added back pkg/services/login/authinfoservice/database/stats.go

* Revert "added back pkg/services/login/authinfoservice/database/stats.go"

This reverts commit 2ba6e3c4d6.

* Revert "remove usagestats"

This reverts commit 1e3fa97810.

* cherry pick

* Revert "cherry pick"

This reverts commit 461626c306.

* validation of picked merge user

* fix test

* make lint

* make test run

* tests for ingest working

* clean up and refactored to align with downstream refactoring

* formatting

* refactor: name list instead of ls

* fix: static lint error use trimprefix

* WIP: permissions for validation

* fix: remove unused functions in sqlstore

* fix: remove unused function

* handling of multiple users and resolve discarded users

* fix tests

* fix: bug that did not exclude the blocks

* ioutil is blacklisted

* WIP: validation

* tests for merging a user working

* add latest changes to output print

* refactor: removed conflictEmail and conflictLogin that was not used

* refactor: code clean up, showChanges working

* test and linting fixes

* test and linting fixes

* refactor: removed logging of config and added more info for vlidation command

* refactor: fix order of code

* fix time now

* refactor: no longer need for check casesensitive login/email

* removed unnessecary loop

* refactor: move functions around

* test: working

* docs: add docuemntationf for file

* Add failing test for generating the conflict login block

* Fix regex

* Fix some stuff/tests

Co-authored-by: eleijonmarck <eric.leijonmarck@gmail.com>

* add: docs for conflict file

* add: conflict_email, conflict_login fields

* add: conflict_email, conflict_login fields

* WIP

* fix: tests working as intended

* Update pkg/cmd/grafana-cli/commands/conflict_user_command.go

Co-authored-by: linoman <2051016+linoman@users.noreply.github.com>

* review comments

* Update pkg/cmd/grafana-cli/commands/conflict_user_command.go

Co-authored-by: Misi <mgyongyosi@users.noreply.github.com>

* Update pkg/cmd/grafana-cli/commands/conflict_user_command.go

Co-authored-by: Misi <mgyongyosi@users.noreply.github.com>

* missspelling

* trailing new line

* update to use userimpl store

* remove newline

* remove newline

* refactor: initializing of resolver for conflicts

* fix: test sqlStore

* refactor: removed lines

* refactor: remove TODOs

Co-authored-by: Mihaly Gyongyosi <mgyongyosi@users.noreply.github.com>
Co-authored-by: linoman <2051016+linoman@users.noreply.github.com>
2022-09-29 14:26:24 +02:00
Dimitris Sotirakis
9a68f8704f CI: Move publish-packages command over from grabpl (#55850)
* Move publish-packages command over from

* Lint fixes

* Update test
2022-09-29 07:32:42 -04:00
Ivana Huckova
b39d629142 Loki: Show invalid fields in label filter (#55751)
* Loki: Show invalid fields in Label filter

* Update

* Update comment

* Update comment
2022-09-29 13:32:01 +02:00
Torkel Ödegaard
b4f73c9f09 PluginPages: Support plugin pages that don't belong to a section (#55904)
* Fixing pages that don't exist in navtree

* Fix test

* fix lint warning

* Fixes
2022-09-29 13:27:51 +02:00
Artur Wierzbicki
34f18aacd6 Chore: add more input parameters to serviceaccounts/test/common.go (#55994) 2022-09-29 12:11:53 +01:00
Ashley Harrison
27abc32608 fix lockfile (#56003) 2022-09-29 06:52:33 -04:00
renovate[bot]
836b3b4dd6 Update dependency rc-tree to v5.7.0 (#55902)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-09-29 11:22:01 +01:00
Alexa V
c4500438a4 Variable: Limit variable name to 50 characters (#55406)
Co-authored-by: kay delaney <45561153+kaydelaney@users.noreply.github.com>
Co-authored-by: kay delaney <kay@grafana.com>
2022-09-29 12:13:07 +02:00
Ivana Huckova
21a99fba7e Loki/Prometheus: Fix adding of ad hoc filters when jumping from dashboard to explore (#55915)
* Loki, Prometheus: Fix adding of ad hoc filters when jumping from dashbaord to explore

* Update
2022-09-29 11:17:41 +02:00
Sven Grossmann
9cf1f2224c LogsContext: Added button to load 10 more log lines (#55923)
* added load-more button

* added missing px
2022-09-29 10:44:15 +02:00
Jack Westbrook
5c5228da61 Toolkit: Put back publishConfig access public (#55983) 2022-09-29 04:31:52 -04:00
brendamuir
ebdc13ed86 Docs alerting: copy edit terraform provisioning (#55978)
* Docs alerting: copy edit terraform provisioning

* changes intro sentence for explore
2022-09-29 10:19:16 +02:00
Sven Grossmann
998a368c69 Logs: Show copy button independently from context (#55934) 2022-09-29 10:00:01 +02:00
aimuz
bf07deb992 Fix showWhen failure (#55337)
When a contact point configuration field has `showWhen` set on it, the contact point form was not correctly displaying. This change fixes that so that forms display correctly.
2022-09-29 15:00:49 +08:00
Nathan Marrs
5a9dfd7173 Canvas: Fix inline edit toggle crash (#55961) 2022-09-28 15:31:30 -07:00
Drew Slobodnjak
b0cd511ecc Geomap: Fix tooltip display option (#55956) 2022-09-28 15:21:21 -07:00
Leon Sorokin
16c9c858b8 BarChart: add negY transform to fieldConfig overrides (#55930) 2022-09-28 14:32:37 -06:00
Marcus Andersson
fc09d5a8a7 GrafanaUI: Expose data links context types externally (#55905) 2022-09-28 21:35:46 +02:00
Ezequiel Victorero
b370a8e366 PublicDashboards: Allow disabling an existent public dashboard if it has template variables (#55778) 2022-09-28 15:34:53 -03:00
Todd Treece
a281c26580 GRPC Server: Move reflection to a separate gRPC service (#55872) 2022-09-28 14:00:46 -04:00
Giedrius Statkevičius
e8ac52ba0f Prometheus: fix proxy check (#54823)
The original check has been added ~3 years ago and since then a new
variable has been added that says whether the mode is browser or
proxied.

Start using the new variable in this function so that proxy mode could
be properly detected. It's important to us to get these headers and this
check is currently broken for HTTP/HTTPS URLs.

Signed-off-by: Giedrius Statkevičius <giedrius.statkevicius@vinted.com>

Signed-off-by: Giedrius Statkevičius <giedrius.statkevicius@vinted.com>
2022-09-28 19:05:52 +02:00
Ivana Huckova
5bd65db8a8 Loki: Add new range operation range_counter (#55936)
* Loki: Add new range operation range_counter

* Update yarn.lock
2022-09-28 18:36:36 +02:00
Sofia Papagiannaki
b749cef78e Chore: Remove unnecessary transaction (#55819) 2022-09-28 18:50:19 +03:00
Jack Westbrook
b81f90cd0c Toolkit: Fix script failures due to missing import paths (#55857)
* fix(toolkit): package without dist folder so config file paths are correct

* chore(packages): make sure to bundle readme, changelog and apache2 license

* refactor(packages): recursively copy src when prepacking toolkit

* chore(toolkit): lock down babel dependencies. use grafana-eslint-config@5 for TS4.8 support
2022-09-28 17:04:55 +02:00
Tania
71578d0932 Docs: Document Reporting API (#55434)
* Docs: Document reporting api

* Update docs/sources/developers/http_api/reporting.md

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

* Update docs/sources/developers/http_api/reporting.md

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

* Update docs/sources/developers/http_api/reporting.md

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

* Document the rest of endpoints

* Document more endpoints

* Fix scopes and links

* Remove rendering endpoints

* Fix status codes

* Apply review feedback

* Typo

Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>
2022-09-28 17:03:43 +02:00
emerson_gong
4ffa0532f0 Security: Fix CVE-2022-27664 (#55361)
* Fix CVE-2022-27664

* update golang.org/x/sys in go.sum
2022-09-28 17:35:06 +03:00
idafurjes
122e7c141d Chore: Delete UpdateUser, ChangeUserPassword, UpdateLastSeenAt from sqlstore (#55928) 2022-09-28 16:17:09 +02:00
Hamas Shafiq
0ec253bfa0 Tempo: Add a placeholder to the TraceQL query editor (#55257) 2022-09-28 15:07:10 +01:00
Emil Tullstedt
6aef353b59 Tracing: Fix bug where errors are not reported to OTel (#55925) 2022-09-28 15:54:47 +02:00
Emil Tullstedt
b0b1e8d568 Tracing: Document Tracer and Span interfaces (#55926) 2022-09-28 15:53:48 +02:00
Jimmie Han
c6dffb11a4 Tempo: Fix unexpected trimming of leading zeroes in traceID (#55167)
* tempo: fix unexpected trim traceID leading zero (#55166)

* fix lint
2022-09-28 15:49:12 +02:00
Sonia Aguilar
ef641ea9c9 Alerting: fix alert supported warning when editing data source name (#55886) 2022-09-28 14:41:54 +02:00
Joao Silva
cf1862ecc4 Storybook: Explicitly set init on a registry to stop Storybook from being broken (#55909) 2022-09-28 13:29:41 +01:00
ying-jeanne
2472777ce2 Chore: implement sqlx into tag service (#55908)
* add sqlx store to tag service

* add sqlx into tag service

* fix test

* change to camal cases

* change in xorm camal case
2022-09-28 08:23:40 -04:00
renovate[bot]
8869d6fe7a Update dependency rc-cascader to v3.7.0 (#55896)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-09-28 13:12:15 +01:00
Leon Sorokin
4ff7917039 TimeSeries: clamp log-y-axis min to 1 when decimals=0 (#55882) 2022-09-28 05:39:24 -06:00
Sven Grossmann
7e8738e01e LogContext: Improve text describing the loglines (#55475)
* changed messages before and after LogContext

* add comment explaining the if

* add tests

* removed unused divs

* improved if statements
2022-09-28 13:37:49 +02:00
idafurjes
a45ef61d25 Chore: Remove GetUserByEmail and GetUserByLogin from sqlstore (#55903)
* Chore: Remove GetUserByEmail and GetUserByLogin from sqlstore
 Rename GetUserProfile to GetProfile

* Fix lint

* Skip test for mysql

* Add missing method to sqlstore mock
2022-09-28 13:18:19 +02:00
Piotr Jamróz
a8f43b97a2 Glue: Return correlation config in GET /correlations (#55801)
* Fix getting and creating correlations config

* Fix tests
2022-09-28 12:17:43 +01:00
brendamuir
43dc92d12c fix index file for website (#55907) 2022-09-28 13:06:38 +02:00
Andreas Christou
37aa45001f AzureMonitor: Correctly update subscriptions value in ARG editor (#55860)
* Correctly update subscriptions prop in query

* Simplify setting of subscriptions value
2022-09-28 11:59:07 +01:00
renovate[bot]
678fb7c29a Update dependency eslint to v8.24.0 (#55727)
* Update dependency eslint to v8.24.0

* bump sdk as well

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2022-09-28 10:43:14 +01:00
brendamuir
4ba757e7b8 Update Alerting provisioning docs (#55892) 2022-09-28 11:03:36 +02:00
renovate[bot]
1bfc6413db Update dependency react-awesome-query-builder to v5.3.1 (#54988)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-09-28 09:55:49 +01:00
Dimitris Sotirakis
46037cff56 Remove prepare-release.yml (#55893) 2022-09-28 04:52:42 -04:00
brendamuir
b7f356df31 Docs: adds terraform provisioning docs (#55660)
* Docs: adds set up section and alertmanager

* deletes info that got copied to new file
2022-09-28 09:18:46 +01:00
Hamas Shafiq
445fed0875 Chore: Fix broken image link in Zipkin's documentation (#55847) 2022-09-28 09:18:26 +01:00
Vladimir
efef672d19 Documentation: clarify label matching (#55650)
* Documentation: clarify label matching

Behaviour in case of multiple matchers is not documented, but my experiments show they are reduced using logical AND. Please validate the updated description.

* Accept wording suggestion

Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com>

* Accept suggestion for docs/sources/alerting/fundamentals/annotation-label/labels-and-label-matchers.md

Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com>

* Improve wording according to review suggestions

Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com>
2022-09-28 09:06:04 +01:00
Alexa V
51028b1b2e Panel Inspect JSON: Add instrumentation for "Apply" feature (#55179)
Co-authored-by: Ivan Ortega Alba <ivanortegaalba@gmail.com>
2022-09-28 09:56:58 +02:00
Leon Sorokin
bd50fd1606 Thresholds: Add option for dashed line style (#55875) 2022-09-28 00:48:09 -06:00
Torkel Ödegaard
e31cb93ec0 NavTree: Make it possible to configure where in nav tree plugins live (#55484)
* NewIA: Plugin nav config

* progress

* Progress

* Things are working

* Add monitoring node

* Add alerts and incidents

* added experiment with standalone page

* Refactoring by adding a type for navtree root

* First test working

* More tests

* more tests

* Progress on richer config and sorting

* Sort weight working

* Path config

* Improving logic for not including admin or cfg nodes, making it the last step so that enterprise can add admin nodes without having to worry about the section not existing

* fixed index routes

* removed file

* Fixes

* Fixing tests

* Fixing more tests and adding support for weight config

* Updates

* Remove unused fake

* More fixes

* Minor tweak

* Minor fix

* Can now control position using sortweight even when existing items have no sortweight

* Added tests for frontend standalone page logic

* more tests

* Remove unused fake and fixed lint issue

* Moving reading settings to navtree impl package

* remove nav_id setting prefix

* Remove old test file

* Fix trailing newline

* Fixed bug with adding nil node

* fixing lint issue

* remove some code we have to rethink

* move read settings to PrivideService and switch to util.SplitString
2022-09-28 08:29:35 +02:00
Artur Wierzbicki
202dce66ff Search: add basic e2e test for the folder view (#55820) 2022-09-28 09:46:24 +04:00
Nathan Marrs
d9d7bff793 Canvas: Fix resource picker folder UX (#55877) 2022-09-27 21:05:13 -07:00
Ryan McKinley
e7e7763252 Store/Search: Explore a general interface to extract summary data from a blob (#55598) 2022-09-27 18:08:47 -04:00
Yuriy Tseretyan
0b3c60fc22 Alerting: Refactor notifiers VictorOps, Threema, Telegram to use encoding/json to parse settings instead of simplejson (#55779)
* update victorops
* update threema
* update telegram
2022-09-27 16:58:18 -04:00
Leon Sorokin
b8da1ffdc3 TimeSeries: fix log-y-axis tick label skipping when decimals=0 (#55868) 2022-09-27 15:50:41 -05:00
Guilherme Caulada
2a12644778 Links: Fix opening links from different orgs on the same tab (#55837)
* Skip intercepting links of different orgs

* Check if orgId is present on query params

* Use locationSearchToObject instead of parseKeyValue

* Revert locationSearchToObject to parseKeyValue
2022-09-27 16:50:05 -03:00
Richard Hartmann
80daf05843 Relicense Tempo datasource plugin to Apache 2 (#55866)
As per Ash's request.

Signed-off-by: Richard Hartmann <richih@richih.org>
2022-09-27 20:53:11 +02:00
Alexander Weaver
e6f99fc418 Alerting: Decouple schedule package from store (#55858)
* Separate out fake for scheduler tests

* Delete extracted methods from older fake
2022-09-27 13:48:12 -05:00
owensmallwood
664aa795c1 PublicDashboards: Add metric for public dashboard datasource query success (#55701)
Adds metric for which datasource queries are successful or not with pubdash.
2022-09-27 12:25:56 -06:00
Garrett Guillotte
1485209287 Docs: Add screenshots to What's New in v9.2 (#55862)
* Docs: Add What's New in Grafana v9.2 Beta

* Docs: Add links to What's New in Grafana v9.2

* Docs: Apply updates to What's New
2022-09-27 11:11:14 -07:00
Artur Wierzbicki
814211282a Search: Fix tags query (#55851)
* Search: fix tags query

* Search: fix type
2022-09-27 21:16:49 +04:00
Garrett Guillotte
3409979288 Docs: Add What's New in Grafana v9.2 Beta (#55855) 2022-09-27 12:09:00 -05:00
Ashley Harrison
97f1524b66 Chore: move the a11y rules to the overrides section so they don't apply to t… (#55848)
* move the a11y rules to the overrides section so they don't apply to tests

* turn alt-text back off
2022-09-27 16:59:35 +01:00
Nathan Marrs
e160f19247 Canvas: Fix icon element resizing 2022-09-27 08:53:47 -07:00
Guilherme Caulada
6674407d3f Revert public dashboard granularity fix (#55844) 2022-09-27 12:41:14 -03:00
Alexander Weaver
81b631d1e9 Use separate fake for rule reader (#55835) 2022-09-27 10:33:32 -05:00
Victor Marin
3361f2c62d XYChart further improvements (#55152)
* Tooltip shows all data facets. Renamed options

* Add per series line style

* Remove line style option from manual panel options

* Refactored tooltip view

* sets selected after switch to manual

* remove facet prefixes

* in manual mode pull series names from config options, not y facet

* unused import

* Point size

* x & y axes labels

* Fix manual series prep

* betterer

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
2022-09-27 18:18:42 +03:00
Ashley Harrison
11eb02a183 enable rule role-has-required-aria-props (#55841) 2022-09-27 11:17:26 -04:00
idafurjes
edcf359473 Chore: Copy org sqlstore methods to org store (#55825)
* Chore: Copy org sqlstore methods to org store

* Remove GetByName, add some tests

* Rename GetByNameHandler to GetByName

* Fix fake name
2022-09-27 16:53:45 +02:00
Ashley Harrison
527c00dae5 enable rule jsx-a11y/role-supports-aria-props (#55839) 2022-09-27 15:42:46 +01:00
Ashley Harrison
422b22a513 enable img-redundant-alt rule (#55833) 2022-09-27 10:26:32 -04:00
Josh Hunt
615d86d902 Docs: Clarify contributions for translations (#55574)
* Docs: Clarify contributions for translations

* add comment to messages.po files
2022-09-27 10:21:23 -04:00
Ashley Harrison
afdb094983 turn on tabindex-no-positive rule (#55830) 2022-09-27 15:18:24 +01:00
Alexander Weaver
d17ab82b98 Alerting: Break up store.RuleStore interface, delete dead code (#55776)
* Refactor state manager to not depend on rule store interface

* Refactor grafana and proxied ruler APIs to not depend on store.RuleStore

* Refactor folder subscription logic to not use store.RuleStore

* Delete dead code

* Delete store.RuleStore
2022-09-27 08:56:30 -05:00
Dimitris Sotirakis
cd360f2d2a Add nightly cronjob (#55675) 2022-09-27 08:49:20 -05:00
Dimitris Sotirakis
2a3f423e10 Replace armhf with armhfp for RPMs (#55814) 2022-09-27 08:49:00 -05:00
Kristina
0a5aa19ca2 Explore: Prevent panes from disappearing when resizing window in split view (#55696) 2022-09-27 15:48:09 +02:00
idafurjes
56cfe02ca2 Chore: Remove methods from sqlstore interface (#55802)
* Remove SearchOrgUsers from sqlstore interface

* Remove RemoveOrgUser method from sqlstore interface

* Delete RemoveOrgUser from sqlstore

* Fix lint
2022-09-27 15:33:38 +02:00
GitStart
332e8477c7 Convert packages/grafana-ui/src/components/Graph/Graph.test.tsx to RTL (#55771)
Co-authored-by: gitstart <gitstart@users.noreply.github.com>
Co-authored-by: gitstart <gitstart@gitstart.com>
Co-authored-by: Nitesh Singh <nitesh.singh@gitstart.dev>
Co-authored-by: Thiago Nascimbeni <tnascimbeni@gmail.com>
Co-authored-by: Rubens Rafael <70234898+RubensRafael@users.noreply.github.com>
Co-authored-by: Matheus Benini Ferreira <88898100+MatheusBeniniF@users.noreply.github.com>
Co-authored-by: Rafael Toledo <87545086+Toledodev@users.noreply.github.com>
Co-authored-by: Murilo Amaral <87545137+MuriloAmarals@users.noreply.github.com>
Co-authored-by: Rubens Rafael <rubensrafael2@live.com>
2022-09-27 14:26:53 +01:00
ying-jeanne
b96a3832d0 StoreSplit: move dashboard thumbs into thumbs service (#55800)
* move dashboard thumbs into thumbs service

* rename some variables
2022-09-27 08:46:03 -04:00
Julien Duchesne
169df2fe90 Drone: publish-linux-packages should be privileged (#55816)
It's currently failing with a failure to mount s3fs
2022-09-27 15:44:39 +03:00
Oscar Kilhed
53a39e5037 Make LocalStorageProvider react to storage events (#55810) 2022-09-27 14:37:59 +02:00
Tania
4a4201ec92 Chore: Update versions (#55813) 2022-09-27 14:07:16 +02:00
Virginia Cepeda
27f022283d JS Agent: remove user email and add session id (#55767) 2022-09-27 08:59:32 -03:00
Kristin Laemmert
701f6d5436 UserService: use the UserService instead of calling sqlstore directly (#55745)
* UserService: update callers to use the UserService instead of calling sqlstore directly

There is one major change hiding in this PR. UserService.Delete originally called a number of services to delete user-related records. I moved everything except the actual call to the user table, and moved those into the API. This was done to avoid dependencies cycles; many of our services depend on the user service, so the user service itself should have as few dependencies as possible.
2022-09-27 07:58:49 -04:00
Tania
4f6c2d35c2 Chore: Update latest.json to 9.2.0-beta1 (#55811) 2022-09-27 11:52:55 +00:00
Hamas Shafiq
62046449d2 Tempo: Add a placeholder for the Limit field under the Search tab (#55557) 2022-09-27 12:27:40 +01:00
Tima Gixe
69f8b32dc0 Storybook: add controls to Segment story (#55264) 2022-09-27 12:19:00 +01:00
Grot (@grafanabot)
da7797014a ReleaseNotes: Updated changelog for 9.2.0-beta1 (#55788)
* ReleaseNotes: Updated changelog and release notes for 9.2.0-beta1

* Remove release notes

Co-authored-by: dsotirakis <dimitrios.sotirakis@grafana.com>
2022-09-27 13:16:53 +02:00
idafurjes
d8cd30d22a Chore: Remove DeleteOrg and UpdateOrgAddress from sqlstore (#55795)
* Chore: Remove DeleteOrg and UpdateOrgAddress from sqlstore

* Remove commented out methods
2022-09-27 12:30:10 +02:00
Gábor Farkas
d1375d31cd devenv: loki: remove unused devenv-config (#55752)
* devenv: jaeger: add it's own copy of promtail-config

* devenv: removed unused loki config
2022-09-27 11:58:08 +02:00
Martin Lehmann
85c26ea908 Alerting: Fix a typo in alerting rule annotation docs (#55730) 2022-09-27 10:56:22 +01:00
Laura Fernández
6b6882c141 Navigation: Align landing pages with designs (#55749) 2022-09-27 11:16:29 +02:00
Piotr Jamróz
becdf10f0e Glue: Add DB migration & support provisioning for user-defined correlations config (#55560)
* Allow provisioning correlation config

* Simplify code

* Fix reading correlations test

* Fix linting errors

* Fix linting errors

* remove simpleJson

* Clean up

* Fix tests

* Update swagger docs

* Fix linting

* Fix linting

* Clean up swagger definitions

Co-authored-by: Elfo404 <me@giordanoricci.com>
2022-09-27 11:08:02 +02:00
George Robinson
a49fcbdbbc Alerting: Add frames for all queries and expressions (#55609)
This commit is one of two commits to make the data frames for all queries and expressions in an alert rule available to the state package for rendering a graph. It renames Result to Condition, and creates an additional field called
Results that is a map of Ref ID to data.Frames.
2022-09-27 10:05:29 +01:00
Laura Fernández
4544494058 A11y: enable rule jsx-a11y/aria-role (#55760) 2022-09-27 10:55:16 +02:00
idafurjes
2bfd26249b Chore: Remove methods from store interface (#55765)
* Chore: Remove methods from store interface

* Fix api tests

* Remove sqlstore methods, add org store tests, add GetOrgUsers to org store interface

* Fix lint

* Remove debug logs

* Remove commented out methods
2022-09-27 10:34:31 +02:00
Jimmie Han
708225f69f feat: add tracesToMetrics span time shift options (#54710) (#55335) 2022-09-27 09:30:33 +01:00
Giordano Ricci
4cd4bc84b5 Fix: use type=button in editor (#55731) 2022-09-27 09:20:23 +01:00
Christopher Moyer
2bbc7c40e9 Docs: first draft of share panel with support docs (#55170) 2022-09-26 13:28:10 -07:00
Alexander Emelin
55aae79744 GRPC Server: Add gRPC server service (#47849)
Co-authored-by: Todd Treece <todd.treece@grafana.com>
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2022-09-26 16:25:34 -04:00
Alexander Weaver
f11495a4c3 Alerting: Remove dead functionality from alert instance store (#55774)
* Update tests to use ListAlertInstances

* Drop the actual methods rather than just updating tests
2022-09-26 14:38:53 -05:00
Alexander Weaver
a00879ae21 Alerting: Refactor store to not export its own interface for InstanceStore, delete dead dependency injection (#55772)
* Add consumer-side store interface to state manager

* Remove dead dependency

* Delete dead dependency in API struct

* Delete store-layer InstanceStore interface

* Move fake for state's InstanceStore interface to state package
2022-09-26 13:55:05 -05:00
Alexander Weaver
bd6a5c900f Alerting: Extract ticker into shared package (#55703)
* Move ticker files to dedicated package with no changes

* Fix package naming and resolve naming conflicts

* Fix up all existing references to moved objects

* Remove all alerting-specific references from shared util

* Rename TickerMetrics to simply Metrics

* Rename base ticker type to T and rename NewTicker to simply New
2022-09-26 12:35:33 -05:00
Andreas Christou
53c61b49bf AzureMonitor: Add region params (#55763)
* Ensure region params are included

* Fix betterer results change
2022-09-26 12:56:18 -04:00
idafurjes
846a4510b4 Chore: Use org service methods (#55738)
* Chore: Use org service methods

* Fix loginservice test

* User Serach from org service

* Fix test
2022-09-26 18:53:17 +02:00
Yuriy Tseretyan
29fdbf0354 Alerting: Refactor webhook notifier to use encoding/json to parse settings instead of simplejson (#55517)
* update webhook to use json marshaller
* make maxAlerts to be interface{}
2022-09-26 12:51:58 -04:00
owensmallwood
64dd9a0898 Adds docker block for clickhouse (#55702)
Adds clickhouse docker-compose block
2022-09-26 10:44:25 -06:00
Josh Hunt
00a90d3255 Chore: Regen swagger spec (#55750)
* Chore: Regen swagger spec

* Regenerate swagger after enteprise fix

Co-authored-by: Sofia Papagiannaki <1632407+papagian@users.noreply.github.com>
2022-09-26 12:37:27 -04:00
kay delaney
4d1b422b25 Chore: Remove empty and leftover files (#55757) 2022-09-26 11:33:07 -04:00
Dominik Prokop
70f48cc725 Library panels: Add backend route (#55746) 2022-09-26 08:27:26 -07:00
sam boyer
e2ff875976 codegen: Introduce TS codegen veneer (#54816)
* Split all named types out into defs, etc.

* Use latest cuetsy, refactor generators accordingly

* Return AST type from plugin TS generator

* Near-complete checkin of TS veneer code generator

* First full completed pass

* Improve the attribute name

* Defer use of the dashboard veneer type to follow-up

* Remove dummy index, prettier on veneer

* Fix merge errors in gen.go

* Add match field to SpecialValueMap

* Fix backend lint errors
2022-09-26 11:26:18 -04:00
Christopher Moyer
f8240e4b0a Docs: Refactors best practices and creates Build a dashboard section in the docs (#55101)
* starts refactor

* corrects broken relrefs
2022-09-26 10:07:24 -05:00
Marcos Vinicius
f4d7a6d869 Elasticsearch: Rename public/app/plugins/datasource/elasticsearch/elastic_response.ts to follow convention (#55533)
* Elasticsearch: Rename public/app/plugins/datasource/elasticsearch/elastic_response.ts to follow convention

* undo changes in this file

* fix import types
2022-09-26 16:53:25 +02:00
GitStart
ac875a1329 Loki: Remove any from public/app/plugins/datasource/loki/live_streams.test.ts (#55545)
Co-authored-by: gitstart <gitstart@gitstart.com>
Co-authored-by: gitstart <gitstart@users.noreply.github.com>
Co-authored-by: Matheus Benini Ferreira <88898100+MatheusBeniniF@users.noreply.github.com>
Co-authored-by: Nitesh Singh <nitesh.singh@gitstart.dev>
Co-authored-by: Thiago Nascimbeni <tnascimbeni@gmail.com>
Co-authored-by: Rafael Toledo <87545086+Toledodev@users.noreply.github.com>
Co-authored-by: Murilo Amaral <87545137+MuriloAmarals@users.noreply.github.com>
Co-authored-by: Rubens Rafael <70234898+RubensRafael@users.noreply.github.com>
Co-authored-by: Júlio Piubello da Silva Cabral <julio.piubello@gitstart.dev>

Co-authored-by: gitstart <gitstart@users.noreply.github.com>
Co-authored-by: gitstart <gitstart@gitstart.com>
Co-authored-by: Matheus Benini Ferreira <88898100+MatheusBeniniF@users.noreply.github.com>
Co-authored-by: Nitesh Singh <nitesh.singh@gitstart.dev>
Co-authored-by: Thiago Nascimbeni <tnascimbeni@gmail.com>
Co-authored-by: Rafael Toledo <87545086+Toledodev@users.noreply.github.com>
Co-authored-by: Murilo Amaral <87545137+MuriloAmarals@users.noreply.github.com>
Co-authored-by: Rubens Rafael <70234898+RubensRafael@users.noreply.github.com>
Co-authored-by: Júlio Piubello da Silva Cabral <julio.piubello@gitstart.dev>
2022-09-26 16:42:53 +02:00
Gilles De Mey
9aa61ddd0e Alerting: Add threshold expression (#55102) 2022-09-26 16:05:44 +02:00
Emil Tullstedt
f7a3e50b23 UsageStats: Add traces when sending usage stats (#55474) 2022-09-26 15:10:54 +02:00
Giordano Ricci
d07abdd23c Correlations: Only return correlation for which both source and target datasources exist (#55454)
* Correlation: only return correlation for which both source and targe ds exist

* add test
2022-09-26 14:05:04 +01:00
Torkel Ödegaard
018733dd24 PluginDetails: Make plugin details page look good in topnav (#55571)
* PluginDetails: Make plugin details page look good in topnav

* Minor style tweak aligning things

* minor refactoring where I moved the logic to decide the default tab into its own hook.

* refactor(plugindetails): first pass at using navmodel for usePluginDetailsTabs hook

* refactor(plugindetails): move "reset page when uninstalling plugin" to installcontrols

this prevents a user from seeing a blank page if they uninstall an app plugin whilst viewing a
config page

* refactor(plugindetails): remove usage of toIconName and reduce nested if

* Trying to fix tests

* minor fix

* test(plugindetails): update selectors causing failing tests

* chore(plugindetails): remove commented out test code

* test(plugindetails): clean up - remove unnecesary usage of waitFor

Co-authored-by: Marcus Andersson <marcus.andersson@grafana.com>
Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com>
2022-09-26 15:04:07 +02:00
Ashley Harrison
1a830e6f45 don't add folder breadcrumb if there is no folderUid (#55739) 2022-09-26 14:02:50 +01:00
Gábor Farkas
d8b4f776aa Logs: Allow collapsing the logs volume histogram (#52808)
* logs: Allow disabling the logs volume histogram

* removed unnecessary code

* refactor: adjusted prop-name

* refactor: simplified code

* refactor: more readable code

* refactor: better naming

* refactor: better naming

* only unsubscribe when disabling the UI

* revert visual change

* re-apply visual change

This reverts commit 7fda5c197f.

* smoother transition

* adjusted visual

Co-authored-by: Giordano Ricci <me@giordanoricci.com>

* logs: top-gap reduced

* added feature tracking

* removed not-working feature-tracking property

* lint fix

Co-authored-by: Giordano Ricci <me@giordanoricci.com>
2022-09-26 14:28:12 +02:00
Gábor Farkas
2efd7fa481 Elasticsearch: Reuse http client in the backend (#55172)
* elastic: backend: reuse http client

* fixed lint error
2022-09-26 14:27:46 +02:00
Ivana Huckova
c0ecdf6783 Loki: Redesign and improve query patterns (#55097)
* WIP

* WIP

* Query patterns: Redesign and improve feature

* Remove duplicated pattern

* Remove empty line

* Refactor

* Add tests

* Update docs and e2e test

* Update public/app/plugins/datasource/loki/querybuilder/LokiQueryModeller.ts

Co-authored-by: Matias Chomicki <matyax@gmail.com>

* Update public/app/plugins/datasource/loki/querybuilder/LokiQueryModeller.ts

Co-authored-by: Matias Chomicki <matyax@gmail.com>

* Update public/app/plugins/datasource/loki/querybuilder/LokiQueryModeller.ts

Co-authored-by: Matias Chomicki <matyax@gmail.com>

* Use capitalize

* Refactor to use QueryPatternsCard component

* Update public/app/plugins/datasource/loki/querybuilder/LokiQueryModeller.ts

Co-authored-by: Matias Chomicki <matyax@gmail.com>

* Update feature tracking for v2

* QueryPatternsCard: Remove unnecessary key

* Update naming for card

* Mock reportInteraction in tests

Co-authored-by: Matias Chomicki <matyax@gmail.com>
2022-09-26 14:03:13 +02:00
Sven Grossmann
231de5a32f devenv: change default elasticsearch datasources (#55479)
* devenv: change default elasticsearch datasources

* remove metrics ds

* updated datasources
2022-09-26 13:00:29 +02:00
ying-jeanne
70c2a31513 move models of dashboard thumbs into its package (#55729) 2022-09-26 12:37:34 +02:00
6603 changed files with 478728 additions and 191636 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -1,10 +1,10 @@
import { regexp } from '@betterer/regexp';
import { BettererFileTest } from '@betterer/betterer';
import { ESLint, Linter } from 'eslint';
import { existsSync } from 'fs';
import path from 'path';
import glob from 'glob';
export default {
'no enzyme tests': () => regexp(/from 'enzyme'/g).include('**/*.test.*'),
'better eslint': () => countEslintErrors().include('**/*.{ts,tsx}'),
'no undocumented stories': () => countUndocumentedStories().include('**/*.story.tsx'),
};
@@ -22,51 +22,80 @@ function countUndocumentedStories() {
});
}
async function findEslintConfigFiles(): Promise<string[]> {
return new Promise((resolve, reject) => {
glob('**/.eslintrc', (err, files) => {
if (err) {
reject(err);
}
resolve(files);
});
});
}
function countEslintErrors() {
return new BettererFileTest(async (filePaths, fileTestResult, resolver) => {
const { baseDirectory } = resolver;
const cli = new ESLint({ cwd: baseDirectory });
await Promise.all(
filePaths.map(async (filePath) => {
const linterOptions = (await cli.calculateConfigForFile(filePath)) as Linter.Config;
const eslintConfigFiles = await findEslintConfigFiles();
const eslintConfigMainPaths = eslintConfigFiles.map((file) => path.resolve(path.dirname(file)));
const rules: Partial<Linter.RulesRecord> = {
'@typescript-eslint/no-explicit-any': 'error',
};
const baseRules: Partial<Linter.RulesRecord> = {
'@typescript-eslint/no-explicit-any': 'error',
'@grafana/no-aria-label-selectors': 'error',
};
const isTestFile =
filePath.endsWith('.test.tsx') || filePath.endsWith('.test.ts') || filePath.includes('__mocks__');
const nonTestFilesRules: Partial<Linter.RulesRecord> = {
...baseRules,
'@typescript-eslint/consistent-type-assertions': ['error', { assertionStyle: 'never' }],
};
if (!isTestFile) {
rules['@typescript-eslint/consistent-type-assertions'] = [
'error',
{
assertionStyle: 'never',
},
];
}
// group files by eslint config file
// this will create two file groups for each eslint config file
// one for test files and one for non-test files
const fileGroups: Record<string, string[]> = {};
const runner = new ESLint({
baseConfig: {
...linterOptions,
rules,
},
useEslintrc: false,
cwd: baseDirectory,
});
for (const filePath of filePaths) {
let configPath = eslintConfigMainPaths.find((configPath) => filePath.startsWith(configPath)) ?? '';
const isTestFile =
filePath.endsWith('.test.tsx') ||
filePath.endsWith('.test.ts') ||
filePath.includes('__mocks__') ||
filePath.includes('public/test/');
const lintResults = await runner.lintFiles([filePath]);
lintResults
.filter((lintResult) => lintResult.source)
.forEach((lintResult) => {
const { messages } = lintResult;
const file = fileTestResult.addFile(filePath, '');
messages.forEach((message, index) => {
file.addIssue(0, 0, message.message, `${index}`);
});
if (isTestFile) {
configPath += '-test';
}
if (!fileGroups[configPath]) {
fileGroups[configPath] = [];
}
fileGroups[configPath].push(filePath);
}
for (const configPath of Object.keys(fileGroups)) {
const rules = configPath.endsWith('-test') ? baseRules : nonTestFilesRules;
// this is by far the slowest part of this code. It takes eslint about 2 seconds just to find the config
const linterOptions = (await cli.calculateConfigForFile(fileGroups[configPath][0])) as Linter.Config;
const runner = new ESLint({
baseConfig: {
...linterOptions,
rules: rules,
},
useEslintrc: false,
cwd: baseDirectory,
});
const lintResults = await runner.lintFiles(fileGroups[configPath]);
lintResults
.filter((lintResult) => lintResult.source)
.forEach((lintResult) => {
const { messages } = lintResult;
const filePath = lintResult.filePath;
const file = fileTestResult.addFile(filePath, '');
messages.forEach((message, index) => {
file.addIssue(0, 0, message.message, `${index}`);
});
})
);
});
}
});
}

View File

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

View File

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

5
.bingo/cue.mod Normal file
View File

@@ -0,0 +1,5 @@
module _ // Auto generated by https://github.com/bwplotka/bingo. DO NOT EDIT
go 1.19
require cuelang.org/go v0.5.0-beta.2 // cmd/cue

30
.bingo/cue.sum Normal file
View File

@@ -0,0 +1,30 @@
cuelang.org/go v0.4.3 h1:W3oBBjDTm7+IZfCKZAmC8uDG0eYfJL4Pp/xbbCMKaVo=
cuelang.org/go v0.4.3/go.mod h1:7805vR9H+VoBNdWFdI7jyDR3QLUPp4+naHfbcgp55HI=
cuelang.org/go v0.5.0-beta.2 h1:am5M7jGvNTJ0rnjrFNyvE7fucL/wRqb0emK4XxdThQI=
cuelang.org/go v0.5.0-beta.2/go.mod h1:okjJBHFQFer+a41sAe2SaGm1glWS8oEb6CmJvn5Zdws=
github.com/cockroachdb/apd v1.1.0 h1:3LFP3629v+1aKXU5Q37mxmRxX/pIu1nijXydLShEq5I=
github.com/cockroachdb/apd/v2 v2.0.1 h1:y1Rh3tEU89D+7Tgbw+lp52T6p/GJLpDmNvr10UWqLTE=
github.com/cockroachdb/apd/v2 v2.0.2 h1:weh8u7Cneje73dDh+2tEVLUvyBc89iwepWCD8b8034E=
github.com/emicklei/proto v1.6.15 h1:XbpwxmuOPrdES97FrSfpyy67SSCV/wBIKXqgJzh6hNw=
github.com/emicklei/proto v1.10.0 h1:pDGyFRVV5RvV+nkBK9iy3q67FBy9Xa7vwrOTE+g5aGw=
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b h1:VKtxabqXZkF25pY9ekfRL6a582T4P37/31XEstQ5p58=
github.com/google/uuid v1.2.0 h1:qJYtXnJRWmpe7m/3XlyhrsLrEURqHRM2kxzoxXqyUDs=
github.com/mitchellh/go-wordwrap v1.0.1 h1:TLuKupo69TCn6TQSyGxwI1EblZZEsQ0vMlAFQflz0v0=
github.com/mpvl/unique v0.0.0-20150818121801-cbe035fff7de h1:D5x39vF5KCwKQaw+OC9ZPiLVHXz3UFw2+psEX+gYcto=
github.com/pkg/errors v0.8.1 h1:iURUrRGxPUNPdy5/HRSm+Yj6okJ6UtLINN0Q9M4+h3I=
github.com/protocolbuffers/txtpbfmt v0.0.0-20201118171849-f6a6b3f636fc h1:gSVONBi2HWMFXCa9jFdYvYk7IwW/mTLxWOF7rXS4LO0=
github.com/protocolbuffers/txtpbfmt v0.0.0-20220428173112-74888fd59c2b h1:zd/2RNzIRkoGGMjE+YIsZ85CnDIz672JK2F3Zl4vux4=
github.com/spf13/cobra v1.4.0 h1:y+wJpx64xcgO1V+RcnwW0LEHxTKRi2ZDPSBjWnrg88Q=
github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA=
golang.org/x/mod v0.3.1-0.20200828183125-ce943fd02449 h1:xUIPaMhvROX9dhPvRCenIJtU78+lbEenGbgqB5hfHCQ=
golang.org/x/mod v0.6.0-dev.0.20220818022119-ed83ed61efb9 h1:VtCrPQXM5Wo9l7XN64SjBMczl48j8mkP+2e3OhYlz+0=
golang.org/x/net v0.0.0-20200226121028-0de0cce0169b h1:0mm1VjtFUOIlE1SbDlwjYaDxZVDP2S5ou6y0gSgXHu8=
golang.org/x/net v0.0.0-20220722155237-a158d28d115b h1:PxfKdU9lEEDYjdIzOtC4qFWgkU2rGHdKlKowJSMN9h0=
golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f h1:v4INt8xihDGvnrfjMDVXGxw9wrfxYyCjk0KbXjhR55s=
golang.org/x/text v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk=
golang.org/x/text v0.3.8 h1:nAL+RVCQ9uMn3vJZbV+MRnydTJFPf8qqY42YiA6MrqY=
golang.org/x/tools v0.0.0-20200612220849-54c614fe050c h1:g6oFfz6Cmw68izP3xsdud3Oxu145IPkeFzyRg58AKHM=
golang.org/x/tools v0.1.12 h1:VveCTK38A2rkS8ZqFY25HIDFscX5X9OoEhJd3quQmXU=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4=
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b h1:h8qDotaEPuJATrMmW04NCwg7v22aHH28wwpauUhK9Oo=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=

View File

@@ -2,173 +2,4 @@ module _ // Auto generated by https://github.com/bwplotka/bingo. DO NOT EDIT
go 1.19
require github.com/golangci/golangci-lint v1.49.0 // cmd/golangci-lint
require (
4d63.com/gochecknoglobals v0.1.0 // indirect
github.com/Antonboom/errname v0.1.7 // indirect
github.com/Antonboom/nilnil v0.1.1 // indirect
github.com/BurntSushi/toml v1.2.0 // indirect
github.com/Djarvur/go-err113 v0.0.0-20210108212216-aea10b59be24 // indirect
github.com/GaijinEntertainment/go-exhaustruct/v2 v2.3.0 // indirect
github.com/Masterminds/semver v1.5.0 // indirect
github.com/OpenPeeDeeP/depguard v1.1.0 // indirect
github.com/alexkohler/prealloc v1.0.0 // indirect
github.com/alingse/asasalint v0.0.11 // indirect
github.com/ashanbrown/forbidigo v1.3.0 // indirect
github.com/ashanbrown/makezero v1.1.1 // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/bkielbasa/cyclop v1.2.0 // indirect
github.com/blizzy78/varnamelen v0.8.0 // indirect
github.com/bombsimon/wsl/v3 v3.3.0 // indirect
github.com/breml/bidichk v0.2.3 // indirect
github.com/breml/errchkjson v0.3.0 // indirect
github.com/butuzov/ireturn v0.1.1 // indirect
github.com/cespare/xxhash/v2 v2.1.2 // indirect
github.com/charithe/durationcheck v0.0.9 // indirect
github.com/chavacava/garif v0.0.0-20220630083739-93517212f375 // indirect
github.com/curioswitch/go-reassign v0.1.2 // indirect
github.com/daixiang0/gci v0.6.3 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/denis-tingaikin/go-header v0.4.3 // indirect
github.com/esimonov/ifshort v1.0.4 // indirect
github.com/ettle/strcase v0.1.1 // indirect
github.com/fatih/color v1.13.0 // indirect
github.com/fatih/structtag v1.2.0 // indirect
github.com/firefart/nonamedreturns v1.0.4 // indirect
github.com/fsnotify/fsnotify v1.5.4 // indirect
github.com/fzipp/gocyclo v0.6.0 // indirect
github.com/go-critic/go-critic v0.6.4 // indirect
github.com/go-toolsmith/astcast v1.0.0 // indirect
github.com/go-toolsmith/astcopy v1.0.1 // indirect
github.com/go-toolsmith/astequal v1.0.2 // indirect
github.com/go-toolsmith/astfmt v1.0.0 // indirect
github.com/go-toolsmith/astp v1.0.0 // indirect
github.com/go-toolsmith/strparse v1.0.0 // indirect
github.com/go-toolsmith/typep v1.0.2 // indirect
github.com/go-xmlfmt/xmlfmt v0.0.0-20191208150333-d5b6f63a941b // indirect
github.com/gobwas/glob v0.2.3 // indirect
github.com/gofrs/flock v0.8.1 // indirect
github.com/golang/protobuf v1.5.2 // indirect
github.com/golangci/check v0.0.0-20180506172741-cfe4005ccda2 // indirect
github.com/golangci/dupl v0.0.0-20180902072040-3e9179ac440a // indirect
github.com/golangci/go-misc v0.0.0-20220329215616-d24fe342adfe // indirect
github.com/golangci/gofmt v0.0.0-20190930125516-244bba706f1a // indirect
github.com/golangci/lint-1 v0.0.0-20191013205115-297bf364a8e0 // indirect
github.com/golangci/maligned v0.0.0-20180506175553-b1d89398deca // indirect
github.com/golangci/misspell v0.3.5 // indirect
github.com/golangci/revgrep v0.0.0-20220804021717-745bb2f7c2e6 // indirect
github.com/golangci/unconvert v0.0.0-20180507085042-28b1c447d1f4 // indirect
github.com/google/go-cmp v0.5.8 // indirect
github.com/gordonklaus/ineffassign v0.0.0-20210914165742-4cc7213b9bc8 // indirect
github.com/gostaticanalysis/analysisutil v0.7.1 // indirect
github.com/gostaticanalysis/comment v1.4.2 // indirect
github.com/gostaticanalysis/forcetypeassert v0.1.0 // indirect
github.com/gostaticanalysis/nilerr v0.1.1 // indirect
github.com/hashicorp/errwrap v1.0.0 // indirect
github.com/hashicorp/go-multierror v1.1.1 // indirect
github.com/hashicorp/go-version v1.6.0 // indirect
github.com/hashicorp/hcl v1.0.0 // indirect
github.com/hexops/gotextdiff v1.0.3 // indirect
github.com/inconshreveable/mousetrap v1.0.0 // indirect
github.com/jgautheron/goconst v1.5.1 // indirect
github.com/jingyugao/rowserrcheck v1.1.1 // indirect
github.com/jirfag/go-printf-func-name v0.0.0-20200119135958-7558a9eaa5af // indirect
github.com/julz/importas v0.1.0 // indirect
github.com/kisielk/errcheck v1.6.2 // indirect
github.com/kisielk/gotool v1.0.0 // indirect
github.com/kulti/thelper v0.6.3 // indirect
github.com/kunwardeep/paralleltest v1.0.6 // indirect
github.com/kyoh86/exportloopref v0.1.8 // indirect
github.com/ldez/gomoddirectives v0.2.3 // indirect
github.com/ldez/tagliatelle v0.3.1 // indirect
github.com/leonklingele/grouper v1.1.0 // indirect
github.com/lufeee/execinquery v1.2.1 // indirect
github.com/magiconair/properties v1.8.6 // indirect
github.com/maratori/testpackage v1.1.0 // indirect
github.com/matoous/godox v0.0.0-20210227103229-6504466cf951 // indirect
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-isatty v0.0.16 // indirect
github.com/mattn/go-runewidth v0.0.9 // indirect
github.com/matttproud/golang_protobuf_extensions v1.0.1 // indirect
github.com/mbilski/exhaustivestruct v1.2.0 // indirect
github.com/mgechev/revive v1.2.3 // indirect
github.com/mitchellh/go-homedir v1.1.0 // indirect
github.com/mitchellh/mapstructure v1.5.0 // indirect
github.com/moricho/tparallel v0.2.1 // indirect
github.com/nakabonne/nestif v0.3.1 // indirect
github.com/nbutton23/zxcvbn-go v0.0.0-20210217022336-fa2cb2858354 // indirect
github.com/nishanths/exhaustive v0.8.1 // indirect
github.com/nishanths/predeclared v0.2.2 // indirect
github.com/olekukonko/tablewriter v0.0.5 // indirect
github.com/pelletier/go-toml v1.9.5 // indirect
github.com/pelletier/go-toml/v2 v2.0.2 // indirect
github.com/phayes/checkstyle v0.0.0-20170904204023-bfd46e6a821d // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/polyfloyd/go-errorlint v1.0.2 // indirect
github.com/prometheus/client_golang v1.12.1 // indirect
github.com/prometheus/client_model v0.2.0 // indirect
github.com/prometheus/common v0.32.1 // indirect
github.com/prometheus/procfs v0.7.3 // indirect
github.com/quasilyte/go-ruleguard v0.3.17 // indirect
github.com/quasilyte/gogrep v0.0.0-20220120141003-628d8b3623b5 // indirect
github.com/quasilyte/regex/syntax v0.0.0-20200407221936-30656e2c4a95 // indirect
github.com/quasilyte/stdinfo v0.0.0-20220114132959-f7386bf02567 // indirect
github.com/ryancurrah/gomodguard v1.2.4 // indirect
github.com/ryanrolds/sqlclosecheck v0.3.0 // indirect
github.com/sanposhiho/wastedassign/v2 v2.0.6 // indirect
github.com/sashamelentyev/interfacebloat v1.1.0 // indirect
github.com/sashamelentyev/usestdlibvars v1.13.0 // indirect
github.com/securego/gosec/v2 v2.13.1 // indirect
github.com/shazow/go-diff v0.0.0-20160112020656-b6b7b6733b8c // indirect
github.com/sirupsen/logrus v1.9.0 // indirect
github.com/sivchari/containedctx v1.0.2 // indirect
github.com/sivchari/nosnakecase v1.7.0 // indirect
github.com/sivchari/tenv v1.7.0 // indirect
github.com/sonatard/noctx v0.0.1 // indirect
github.com/sourcegraph/go-diff v0.6.1 // indirect
github.com/spf13/afero v1.8.2 // indirect
github.com/spf13/cast v1.5.0 // indirect
github.com/spf13/cobra v1.5.0 // indirect
github.com/spf13/jwalterweatherman v1.1.0 // indirect
github.com/spf13/pflag v1.0.5 // indirect
github.com/spf13/viper v1.12.0 // indirect
github.com/ssgreg/nlreturn/v2 v2.2.1 // indirect
github.com/stbenjam/no-sprintf-host-port v0.1.1 // indirect
github.com/stretchr/objx v0.4.0 // indirect
github.com/stretchr/testify v1.8.0 // indirect
github.com/subosito/gotenv v1.4.0 // indirect
github.com/sylvia7788/contextcheck v1.0.6 // indirect
github.com/tdakkota/asciicheck v0.1.1 // indirect
github.com/tetafro/godot v1.4.11 // indirect
github.com/timakin/bodyclose v0.0.0-20210704033933-f49887972144 // indirect
github.com/timonwong/logrlint v0.1.0 // indirect
github.com/tomarrell/wrapcheck/v2 v2.6.2 // indirect
github.com/tommy-muehle/go-mnd/v2 v2.5.0 // indirect
github.com/ultraware/funlen v0.0.3 // indirect
github.com/ultraware/whitespace v0.0.5 // indirect
github.com/uudashr/gocognit v1.0.6 // indirect
github.com/yagipy/maintidx v1.0.0 // indirect
github.com/yeya24/promlinter v0.2.0 // indirect
gitlab.com/bosi/decorder v0.2.3 // indirect
go.uber.org/atomic v1.7.0 // indirect
go.uber.org/multierr v1.6.0 // indirect
go.uber.org/zap v1.17.0 // indirect
golang.org/x/exp v0.0.0-20220722155223-a9213eeb770e // indirect
golang.org/x/exp/typeparams v0.0.0-20220613132600-b0d781184e0d // indirect
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4 // indirect
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4 // indirect
golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab // indirect
golang.org/x/text v0.3.7 // indirect
golang.org/x/tools v0.1.12 // indirect
google.golang.org/protobuf v1.28.0 // indirect
gopkg.in/ini.v1 v1.66.6 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
honnef.co/go/tools v0.3.3 // indirect
mvdan.cc/gofumpt v0.3.1 // indirect
mvdan.cc/interfacer v0.0.0-20180901003855-c20040233aed // indirect
mvdan.cc/lint v0.0.0-20170908181259-adc824a0674b // indirect
mvdan.cc/unparam v0.0.0-20220706161116-678bad134442 // indirect
)
require github.com/golangci/golangci-lint v1.50.1 // cmd/golangci-lint

File diff suppressed because it is too large Load Diff

5
.bingo/jb.mod Normal file
View File

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

50
.bingo/jb.sum Normal file
View File

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

View File

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

View File

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

View File

@@ -2,7 +2,6 @@
.dockerignore
.git
.gitignore
.github
.vscode
bin
data*

View File

@@ -3,19 +3,55 @@
# 2. Login to drone and export the env variables (token and server) shown here: https://drone.grafana.net/account
# 3. Run `make drone`
# More information about this process here: https://github.com/grafana/deployment_tools/blob/master/docs/infrastructure/drone/signing.md
"""
This module returns a Drone configuration including pipelines and secrets.
"""
load('scripts/drone/events/pr.star', 'pr_pipelines')
load('scripts/drone/events/main.star', 'main_pipelines')
load('scripts/drone/pipelines/docs.star', 'docs_pipelines')
load('scripts/drone/events/release.star', 'release_pipelines', 'publish_image_pipelines', 'publish_artifacts_pipelines', 'publish_npm_pipelines', 'publish_packages_pipeline', 'artifacts_page_pipeline')
load('scripts/drone/version.star', 'version_branch_pipelines')
load('scripts/drone/events/cron.star', 'cronjobs')
load('scripts/drone/vault.star', 'secrets')
load("scripts/drone/events/pr.star", "pr_pipelines")
load("scripts/drone/events/main.star", "main_pipelines")
load(
"scripts/drone/events/release.star",
"artifacts_page_pipeline",
"enterprise2_pipelines",
"enterprise_pipelines",
"oss_pipelines",
"publish_artifacts_pipelines",
"publish_npm_pipelines",
"publish_packages_pipeline",
)
load(
"scripts/drone/pipelines/publish_images.star",
"publish_image_pipelines_public",
"publish_image_pipelines_security",
)
load("scripts/drone/pipelines/github.star", "publish_github_pipeline")
load("scripts/drone/pipelines/aws_marketplace.star", "publish_aws_marketplace_pipeline")
load("scripts/drone/version.star", "version_branch_pipelines")
load("scripts/drone/events/cron.star", "cronjobs")
load("scripts/drone/vault.star", "secrets")
def main(ctx):
edition = 'oss'
return pr_pipelines(edition=edition) + main_pipelines(edition=edition) + release_pipelines() + \
publish_image_pipelines('public') + publish_image_pipelines('security') + \
publish_artifacts_pipelines('security') + publish_artifacts_pipelines('public') + \
publish_npm_pipelines('public') + publish_packages_pipeline() + artifacts_page_pipeline() + \
version_branch_pipelines() + cronjobs(edition=edition) + secrets()
def main(_ctx):
return (
pr_pipelines() +
main_pipelines() +
oss_pipelines() +
enterprise_pipelines() +
enterprise2_pipelines() +
enterprise2_pipelines(
prefix = "custom-",
trigger = {"event": ["custom"]},
) +
publish_image_pipelines_public() +
publish_image_pipelines_security() +
publish_github_pipeline("public") +
publish_github_pipeline("security") +
publish_aws_marketplace_pipeline("public") +
publish_artifacts_pipelines("security") +
publish_artifacts_pipelines("public") +
publish_npm_pipelines() +
publish_packages_pipeline() +
artifacts_page_pipeline() +
version_branch_pipelines() +
cronjobs() +
secrets()
)

3254
.drone.yml

File diff suppressed because it is too large Load Diff

103
.eslintrc
View File

@@ -1,13 +1,15 @@
{
"extends": ["@grafana/eslint-config"],
"root": true,
"plugins": ["@emotion", "lodash", "jest", "import", "jsx-a11y"],
"plugins": ["@emotion", "lodash", "jest", "import", "jsx-a11y", "@grafana"],
"settings": {
"import/internal-regex": "^(app/)|(@grafana)",
"import/external-module-folders": ["node_modules", ".yarn"]
},
"rules": {
"react/prop-types": "off",
// need to ignore emotion's `css` prop, see https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-unknown-property.md#rule-options
"react/no-unknown-property": ["error", { "ignore": ["css"] }],
"@emotion/jsx-import": "error",
"lodash/import-scope": [2, "member"],
"jest/no-focused-tests": "error",
@@ -20,13 +22,18 @@
}
],
"no-restricted-imports": [
"warn",
"error",
{
"paths": [
{
"name": "react-redux",
"importNames": ["useDispatch", "useSelector"],
"message": "Please import from app/types instead."
},
{
"name": "react-i18next",
"importNames": ["Trans", "t"],
"message": "Please import from app/core/internationalization instead"
}
]
}
@@ -34,68 +41,15 @@
// Use typescript's no-redeclare for compatibility with overrides
"no-redeclare": "off",
"@typescript-eslint/no-redeclare": ["error"],
// these are all the rules listed in the strict preset
// we should fix them one by one and mark them as errors
// once they're all fixed, we can remove them all and instead extend the strict preset
// with "extends": ["plugin:jsx-a11y/strict"]
"jsx-a11y/alt-text": "off",
"jsx-a11y/anchor-has-content": "error",
"jsx-a11y/anchor-is-valid": "off",
"jsx-a11y/aria-activedescendant-has-tabindex": "error",
"jsx-a11y/aria-props": "error",
"jsx-a11y/aria-proptypes": "error",
"jsx-a11y/aria-role": "off",
"jsx-a11y/aria-unsupported-elements": "error",
"jsx-a11y/autocomplete-valid": "error",
"jsx-a11y/click-events-have-key-events": "off",
"jsx-a11y/heading-has-content": "error",
"jsx-a11y/html-has-lang": "error",
"jsx-a11y/iframe-has-title": "off",
"jsx-a11y/img-redundant-alt": "off",
"jsx-a11y/interactive-supports-focus": [
"off",
{
"tabbable": [
"button",
"checkbox",
"link",
"progressbar",
"searchbox",
"slider",
"spinbutton",
"switch",
"textbox"
]
}
],
"jsx-a11y/label-has-associated-control": "off",
"jsx-a11y/media-has-caption": "error",
"jsx-a11y/mouse-events-have-key-events": "off",
"jsx-a11y/no-access-key": "error",
"jsx-a11y/no-autofocus": "off",
"jsx-a11y/no-distracting-elements": "error",
"jsx-a11y/no-interactive-element-to-noninteractive-role": "error",
"jsx-a11y/no-noninteractive-element-interactions": [
"off",
{
"body": ["onError", "onLoad"],
"iframe": ["onError", "onLoad"],
"img": ["onError", "onLoad"]
}
],
"jsx-a11y/no-noninteractive-element-to-interactive-role": "off",
"jsx-a11y/no-noninteractive-tabindex": "off",
"jsx-a11y/no-redundant-roles": "error",
"jsx-a11y/no-static-element-interactions": "off",
"jsx-a11y/role-has-required-aria-props": "off",
"jsx-a11y/role-supports-aria-props": "off",
"jsx-a11y/scope": "error",
"jsx-a11y/tabindex-no-positive": "off"
"@typescript-eslint/no-redeclare": ["error"]
},
"overrides": [
{
"files": ["public/app/features/scenes/**/*.{ts,tsx}"],
"rules": {
"@typescript-eslint/explicit-member-accessibility": ["error", { "accessibility": "explicit" }]
}
},
{
"files": ["packages/grafana-ui/src/components/uPlot/**/*.{ts,tsx}"],
"rules": {
@@ -117,6 +71,31 @@
"no-redeclare": "error",
"@typescript-eslint/no-redeclare": "off"
}
},
{
"extends": ["plugin:jsx-a11y/recommended"],
"files": ["**/*"],
"excludedFiles": ["**/*.{spec,test}.{ts,tsx}"],
"rules": {
// rules marked "off" are those left in the recommended preset we need to fix
// we should remove the corresponding line and fix them one by one
// any marked "error" contain specific overrides we'll need to keep
"jsx-a11y/click-events-have-key-events": "off",
"jsx-a11y/no-autofocus": [
"error",
{
"ignoreNonDOM": true
}
],
"jsx-a11y/no-static-element-interactions": "off",
"jsx-a11y/label-has-associated-control": [
"error",
{
"controlComponents": ["NumberInput"],
"depth": 2
}
]
}
}
]
}

683
.github/CODEOWNERS vendored
View File

@@ -12,205 +12,602 @@
# This should make it easy to add new rules without breaking existing ones.
# Documentation
/docs/ @grafana/docs-squad
/contribute/ @grafana/docs-squad
/docs/sources/developers/plugins/ @grafana/docs-squad @grafana/plugins-platform-frontend @grafana/plugins-platform-backend
/docs/sources/developers/plugins/backend @grafana/docs-squad @grafana/plugins-platform-backend
# Administration, data sources, querying, release updates: Garrett Guillotte
/docs/ @grafana/docs-grafana
/contribute/ @grafana/docs-grafana
/docs/sources/developers/plugins/ @grafana/docs-grafana @grafana/plugins-platform-frontend @grafana/plugins-platform-backend
/docs/sources/developers/plugins/backend/ @grafana/docs-grafana @grafana/plugins-platform-backend
/.changelog-archive @grafana/docs-grafana
CHANGELOG.md @grafana/docs-grafana
CODE_OF_CONDUCT.md @grafana/docs-grafana
CONTRIBUTING.md @grafana/docs-grafana
GOVERNANCE.md @RichiH
HALL_OF_FAME.md @grafana/docs-grafana
ISSUE_TRIAGE.md @grafana/grafana-community-support
LICENSE @torkelo
LICENSING.md @torkelo
MAINTAINERS.md @RichiH
NOTICE.md @torkelo
README.md @grafana/docs-grafana
ROADMAP.md @torkelo
SECURITY.md @grafana/security-team
SUPPORT.md @torkelo
UPGRADING_DEPENDENCIES.md @grafana/docs-grafana
WORKFLOW.md @torkelo
# Set up, dashboards/visualization, best practices: Chris Moyer
# Alerting: Brenda Muir
/docs/sources/administration/ @gguillotte-grafana
/docs/sources/alerting @brendamuir
/docs/sources/best-practices/ @chri2547
/docs/sources/administration/ @Eve832 @GrafanaWriter
/docs/sources/alerting/ @brendamuir
/docs/sources/dashboards/ @chri2547
/docs/sources/datasources/ @gguillotte-grafana
/docs/sources/enterprise/ @gguillotte-grafana
/docs/sources/explore/ @gguillotte-grafana
/docs/sources/datasources/ @Eve832 @GrafanaWriter
/docs/sources/explore/ @Eve832 @GrafanaWriter
/docs/sources/getting-started/ @chri2547
/docs/sources/old-alerting @brendamuir
/docs/sources/panels/ @chri2547
/docs/sources/release-notes/ @gguillotte-grafana
/docs/sources/visualization/ @chri2547
/docs/sources/whatsnew/ @gguillotte-grafana
/docs/sources/old-alerting/ @brendamuir
/docs/sources/release-notes/ @Eve832 @GrafanaWriter
/docs/sources/setup-grafana/ @chri2547
/docs/sources/whatsnew/ @Eve832 @GrafanaWriter
# Backend code
*.go @grafana/backend-platform
go.mod @grafana/backend-platform
go.sum @grafana/backend-platform
/.bingo @grafana/backend-platform
/go.mod @grafana/backend-platform
/go.sum @grafana/backend-platform
/.bingo/ @grafana/backend-platform
/pkg/README.md @grafana/backend-platform
/pkg/ruleguard.rules.go @grafana/backend-platform
/.bra.toml @grafana/backend-platform
/.golangci.toml @grafana/backend-platform
/build.go @grafana/backend-platform
/pkg/api/ @grafana/backend-platform
/pkg/bus/ @grafana/backend-platform
/pkg/cmd/ @grafana/backend-platform
/pkg/components/apikeygen/ @grafana/grafana-authnz-team
/pkg/components/apikeygenprefixed/ @grafana/grafana-authnz-team
/pkg/components/dashdiffs/ @grafana/backend-platform
/pkg/components/imguploader/ @grafana/backend-platform
/pkg/components/loki/ @grafana/backend-platform
/pkg/components/null/ @grafana/backend-platform
/pkg/components/simplejson/ @grafana/backend-platform
/pkg/events/ @grafana/backend-platform
/pkg/extensions/ @grafana/backend-platform
/pkg/ifaces/ @grafana/backend-platform
/pkg/infra/appcontext/ @grafana/backend-platform
/pkg/infra/db/ @grafana/backend-platform
/pkg/infra/grn/ @grafana/backend-platform
/pkg/infra/localcache/ @grafana/backend-platform
/pkg/infra/log/ @grafana/backend-platform
/pkg/infra/metrics/ @grafana/backend-platform
/pkg/infra/network/ @grafana/backend-platform
/pkg/infra/process/ @grafana/backend-platform
/pkg/infra/remotecache/ @grafana/backend-platform
/pkg/infra/serverlock/ @grafana/backend-platform
/pkg/infra/slugify/ @grafana/backend-platform
/pkg/infra/tracing/ @grafana/backend-platform
/pkg/infra/usagestats/ @grafana/backend-platform
/pkg/middleware/ @grafana/backend-platform
/pkg/mocks/ @grafana/backend-platform
/pkg/models/ @grafana/backend-platform
/pkg/server/ @grafana/backend-platform
/pkg/services/annotations/ @grafana/backend-platform
/pkg/services/apikey/ @grafana/backend-platform
/pkg/services/cleanup/ @grafana/backend-platform
/pkg/services/comments/ @grafana/backend-platform
/pkg/services/contexthandler/ @grafana/backend-platform
/pkg/services/correlations/ @grafana/backend-platform
/pkg/services/dashboardimport/ @grafana/backend-platform
/pkg/services/dashboards/ @grafana/backend-platform
/pkg/services/dashboardsnapshots/ @grafana/backend-platform
/pkg/services/dashboardversion/ @grafana/backend-platform
/pkg/services/encryption/ @grafana/backend-platform
/pkg/services/featuremgmt/ @grafana/backend-platform
/pkg/services/folder/ @grafana/backend-platform
/pkg/services/hooks/ @grafana/backend-platform
/pkg/services/kmsproviders/ @grafana/backend-platform
/pkg/services/licensing/ @grafana/backend-platform
/pkg/services/navtree/ @grafana/backend-platform
/pkg/services/notifications/ @grafana/backend-platform
/pkg/services/org/ @grafana/backend-platform
/pkg/services/playlist/ @grafana/backend-platform
/pkg/services/plugindashboards/ @grafana/backend-platform
/pkg/services/pluginsettings/ @grafana/backend-platform
/pkg/services/preference/ @grafana/backend-platform
/pkg/services/provisioning/ @grafana/backend-platform
/pkg/services/publicdashboards/ @grafana/dashboards-squad
/pkg/services/query/ @grafana/backend-platform
/pkg/services/queryhistory/ @grafana/backend-platform
/pkg/services/quota/ @grafana/backend-platform
/pkg/services/rendering/ @grafana/backend-platform
/pkg/services/screenshot/ @grafana/backend-platform
/pkg/services/search/ @grafana/backend-platform
/pkg/services/searchusers/ @grafana/backend-platform
/pkg/services/secrets/ @grafana/backend-platform
/pkg/services/shorturls/ @grafana/backend-platform
/pkg/services/sqlstore/ @grafana/backend-platform
/pkg/services/star/ @grafana/backend-platform
/pkg/services/stats/ @grafana/backend-platform
/pkg/services/tag/ @grafana/backend-platform
/pkg/services/team/ @grafana/grafana-authnz-team
/pkg/services/temp_user/ @grafana/backend-platform
/pkg/services/updatechecker/ @grafana/backend-platform
/pkg/services/user/ @grafana/backend-platform
/pkg/services/validations/ @grafana/backend-platform
/pkg/setting/ @grafana/backend-platform
/pkg/tests/ @grafana/backend-platform
/pkg/tsdb/grafanads/ @grafana/backend-platform
/pkg/tsdb/intervalv2/ @grafana/backend-platform
/pkg/tsdb/legacydata/ @grafana/backend-platform
/pkg/tsdb/opentsdb/ @grafana/backend-platform
/pkg/tsdb/sqleng/ @grafana/backend-platform
/pkg/util/ @grafana/backend-platform
/pkg/web/ @grafana/backend-platform
/pkg/services/grpcserver/ @grafana/backend-platform
/pkg/infra/kvstore/ @grafana/backend-platform
/pkg/infra/fs/ @grafana/backend-platform
/pkg/infra/x/ @grafana/backend-platform
# devenv
# Backend code, developers environment
/devenv/docker/blocks/auth @grafana/grafana-authnz-team
/devenv/docker/blocks/auth/ @grafana/grafana-authnz-team
# Logs code, developers environment
/devenv/docker/blocks/loki* @grafana/observability-logs
/devenv/docker/blocks/elastic* @grafana/observability-logs
# Performance tests
/devenv/docker/loadtest-ts/ @grafana/multitenancy-squad
/devenv/bulk-dashboards/ @grafana/dashboards-squad
/devenv/bulk_alerting_dashboards/ @grafana/alerting-squad-backend
/devenv/create_docker_compose.sh @grafana/backend-platform
/devenv/dashboards.yaml @grafana/dashboards-squad
/devenv/datasources.yaml @grafana/backend-platform
/devenv/datasources_docker.yaml @grafana/backend-platform
/devenv/dev-dashboards-without-uid/ @grafana/dashboards-squad
/devenv/dev-dashboards/ @grafana/dashboards-squad
/devenv/docker/blocks/alert_webhook_listener/ @grafana/alerting-squad-backend
/devenv/docker/blocks/clickhouse/ @grafana/partner-plugins
/devenv/docker/blocks/collectd/ @grafana/observability-metrics
/devenv/docker/blocks/grafana/ @grafana/grafana-as-code
/devenv/docker/blocks/graphite/ @grafana/observability-metrics
/devenv/docker/blocks/graphite09/ @grafana/observability-metrics
/devenv/docker/blocks/graphite1/ @grafana/observability-metrics
/devenv/docker/blocks/influxdb/ @grafana/observability-metrics
/devenv/docker/blocks/influxdb1/ @grafana/observability-metrics
/devenv/docker/blocks/jaeger/ @grafana/observability-traces-and-profiling
/devenv/docker/blocks/maildev/ @grafana/alerting-squad-frontend
/devenv/docker/blocks/memcached/ @grafana/backend-platform
/devenv/docker/blocks/mssql/ @grafana/grafana-bi-squad
/devenv/docker/blocks/mssql_arm64/ @grafana/grafana-bi-squad
/devenv/docker/blocks/mssql_tests/ @grafana/grafana-bi-squad
/devenv/docker/blocks/mssql_tls/ @grafana/grafana-bi-squad
/devenv/docker/blocks/mysql/ @grafana/grafana-bi-squad
/devenv/docker/blocks/mysql_exporter/ @grafana/grafana-bi-squad
/devenv/docker/blocks/mysql_opendata/ @grafana/grafana-bi-squad
/devenv/docker/blocks/mysql_tests/ @grafana/grafana-bi-squad
/devenv/docker/blocks/opentsdb/ @grafana/observability-metrics
/devenv/docker/blocks/phlare/ @grafana/observability-traces-and-profiling
/devenv/docker/blocks/postgres/ @grafana/grafana-bi-squad
/devenv/docker/blocks/postgres_tests/ @grafana/grafana-bi-squad
/devenv/docker/blocks/prometheus/ @grafana/observability-metrics
/devenv/docker/blocks/prometheus_random_data/ @grafana/observability-metrics
/devenv/docker/blocks/redis/ @bergquist
/devenv/docker/blocks/sensugo/ @grafana/backend-platform
/devenv/docker/blocks/slow_proxy/ @bergquist
/devenv/docker/blocks/smtp/ @bergquist
/devenv/docker/blocks/tempo/ @grafana/observability-traces-and-profiling
/devenv/docker/blocks/traefik/ @mckn
/devenv/docker/blocks/zipkin/ @grafana/observability-traces-and-profiling
/devenv/docker/buildcontainer/ @bergquist
/devenv/docker/compose_header.yml @grafana/backend-platform
/devenv/docker/debtest/ @bergquist
/devenv/docker/ha-test-unified-alerting/ @grafana/alerting-squad-backend
/devenv/docker/ha_test/ @grafana/backend-platform
/devenv/docker/loadtest/ @grafana/backend-platform
/devenv/docker/rpmtest/ @grafana/backend-platform
/devenv/jsonnet/ @grafana/grafana-edge-squad
/devenv/local-npm/ @grafana/frontend-ops
/devenv/vscode/ @grafana/frontend-ops
/devenv/setup.sh @grafana/backend-platform
# Emails
/emails/ @grafana/alerting-squad-frontend
#Packaging
/packaging/ @DanCech
# Continuous Integration
.drone.yml @grafana/grafana-release-eng
.drone.star @grafana/grafana-release-eng
/scripts/drone/ @grafana/grafana-release-eng
/pkg/build/ @grafana/grafana-release-eng
/.dockerignore @grafana/grafana-release-eng
/Dockerfile @grafana/grafana-release-eng
/Makefile @grafana/grafana-release-eng
/scripts/build/ @grafana/grafana-release-eng
# Cloud Datasources backend code
/pkg/tsdb/cloudwatch @grafana/aws-plugins
/pkg/tsdb/azuremonitor @grafana/cloud-provider-plugins
/pkg/tsdb/cloudmonitoring @grafana/cloud-provider-plugins
# OSS Plugin Partnerships backend code
/pkg/tsdb/cloudwatch/ @grafana/aws-plugins
/pkg/tsdb/azuremonitor/ @grafana/partner-plugins
/pkg/tsdb/cloudmonitoring/ @grafana/partner-plugins
# Observability backend code
/pkg/tsdb/prometheus @grafana/observability-metrics
/pkg/tsdb/influxdb @grafana/observability-metrics
/pkg/tsdb/elasticsearch @grafana/observability-logs
/pkg/tsdb/graphite @grafana/observability-metrics
/pkg/tsdb/jaeger @grafana/observability-traces-and-profiling
/pkg/tsdb/loki @grafana/observability-logs
/pkg/tsdb/zipkin @grafana/observability-traces-and-profiling
/pkg/tsdb/tempo @grafana/observability-traces-and-profiling
/pkg/tsdb/prometheus/ @grafana/observability-metrics
/pkg/tsdb/influxdb/ @grafana/observability-metrics
/pkg/tsdb/elasticsearch/ @grafana/observability-logs
/pkg/tsdb/graphite/ @grafana/observability-metrics
/pkg/tsdb/loki/ @grafana/observability-logs
/pkg/tsdb/tempo/ @grafana/observability-traces-and-profiling
/pkg/tsdb/phlare/ @grafana/observability-traces-and-profiling
/pkg/tsdb/parca/ @grafana/observability-traces-and-profiling
# BI backend code
/pkg/tsdb/mysql @grafana/grafana-bi-squad
/pkg/tsdb/postgres @grafana/grafana-bi-squad
/pkg/tsdb/mssql @grafana/grafana-bi-squad
/pkg/tsdb/mysql/ @grafana/grafana-bi-squad
/pkg/tsdb/postgres/ @grafana/grafana-bi-squad
/pkg/tsdb/mssql/ @grafana/grafana-bi-squad
# Database migrations
/pkg/services/sqlstore/migrations @grafana/backend-platform @grafana/hosted-grafana-team
/pkg/services/sqlstore/migrations/ @grafana/backend-platform @grafana/hosted-grafana-team
*_mig.go @grafana/backend-platform @grafana/hosted-grafana-team
# Grafana edge
/pkg/services/live/ @grafana/grafana-edge-squad
/pkg/services/searchV2/ @grafana/grafana-edge-squad
/pkg/services/store/ @grafana/grafana-edge-squad
/pkg/services/export/ @grafana/grafana-edge-squad
/pkg/infra/filestore/ @grafana/grafana-edge-squad
/pkg/tsdb/testdatasource/sims/ @grafana/grafana-edge-squad
# Grafana multitenancy
/pkg/services/live/ @grafana/multitenancy-squad
/pkg/services/searchV2/ @grafana/multitenancy-squad
/pkg/services/store/ @grafana/multitenancy-squad
/pkg/services/querylibrary/ @grafana/multitenancy-squad
/pkg/services/export/ @grafana/multitenancy-squad
/pkg/infra/filestorage/ @grafana/multitenancy-squad
/pkg/util/converter/ @grafana/multitenancy-squad
# Alerting
/pkg/services/ngalert @grafana/alerting-squad-backend
/pkg/services/sqlstore/migrations/ualert @grafana/alerting-squad-backend
/pkg/services/alerting @grafana/alerting-squad-backend
/pkg/tests/api/alerting @grafana/alerting-squad-backend
/public/app/features/alerting @grafana/alerting-squad-frontend
/pkg/services/ngalert/ @grafana/alerting-squad-backend
/pkg/services/sqlstore/migrations/ualert/ @grafana/alerting-squad-backend
/pkg/services/alerting/ @grafana/alerting-squad-backend
/pkg/tests/api/alerting/ @grafana/alerting-squad-backend
/public/app/features/alerting/ @grafana/alerting-squad-frontend
# Library Services
/pkg/services/libraryelements @grafana/user-essentials
/pkg/services/librarypanels @grafana/user-essentials
/pkg/services/libraryelements/ @grafana/user-essentials
/pkg/services/librarypanels/ @grafana/user-essentials
# Plugins
/pkg/api/pluginproxy @grafana/plugins-platform-backend
/pkg/plugins @grafana/plugins-platform-backend
/pkg/services/datasourceproxy @grafana/plugins-platform-backend
/pkg/services/datasources @grafana/plugins-platform-backend
/pkg/plugins/pfs @grafana/plugins-platform-backend @grafana/grafana-as-code
/pkg/api/pluginproxy/ @grafana/plugins-platform-backend
/pkg/infra/httpclient/ @grafana/plugins-platform-backend
/pkg/plugins/ @grafana/plugins-platform-backend
/pkg/services/datasourceproxy/ @grafana/plugins-platform-backend
/pkg/services/datasources/ @grafana/plugins-platform-backend
/pkg/services/pluginsintegration/ @grafana/plugins-platform-backend
/pkg/plugins/pfs/ @grafana/plugins-platform-backend @grafana/grafana-as-code
/pkg/tsdb/testdatasource/ @grafana/plugins-platform-backend
# Dashboard previews / crawler (behind feature flag)
/pkg/services/thumbs @grafana/grafana-edge-squad
/pkg/services/thumbs/ @grafana/multitenancy-squad
# Backend code docs
/contribute/style-guides/backend.md @grafana/backend-platform
/contribute/architecture/backend @grafana/backend-platform
/contribute/engineering/backend @grafana/backend-platform
/contribute/backend/ @grafana/backend-platform
/e2e @grafana/user-essentials
/packages @grafana/user-essentials @grafana/plugins-platform-frontend @grafana/grafana-bi-squad
/packages/grafana-e2e-selectors @grafana/user-essentials
/packages/grafana-e2e @grafana/user-essentials
/packages/grafana-toolkit @grafana/plugins-platform-frontend
/packages/grafana-ui/.storybook @grafana/plugins-platform-frontend
/packages/grafana-ui/src/components/DateTimePickers @grafana/grafana-bi-squad
/packages/grafana-ui/src/components/GraphNG @grafana/grafana-bi-squad
/packages/grafana-ui/src/components/Logs @grafana/observability-logs
/packages/grafana-ui/src/components/Table @grafana/grafana-bi-squad
/packages/grafana-ui/src/components/TimeSeries @grafana/grafana-bi-squad
/packages/grafana-ui/src/components/uPlot @grafana/grafana-bi-squad
/packages/grafana-ui/src/utils/storybook @grafana/plugins-platform-frontend
/packages/jaeger-ui-components/ @grafana/observability-traces-and-profiling
/plugins-bundled @grafana/plugins-platform-frontend
# public folder
/public/app/core/components/TimePicker @grafana/grafana-bi-squad
/public/app/core/components/Layers @grafana/grafana-edge-squad
/public/app/features/canvas/ @grafana/grafana-edge-squad
/public/app/features/comments/ @grafana/grafana-edge-squad
/public/app/features/dimensions/ @grafana/grafana-edge-squad
/public/app/features/geo/ @grafana/grafana-edge-squad
/public/app/features/storage/ @grafana/grafana-edge-squad
/public/app/features/live/ @grafana/grafana-edge-squad
/public/app/features/explore/ @grafana/observability-experience-squad
/public/app/features/plugins @grafana/plugins-platform-frontend
/public/app/features/transformers/spatial @grafana/grafana-edge-squad
/public/app/plugins/panel/alertlist @grafana/alerting-squad-frontend
/public/app/plugins/panel/barchart @grafana/grafana-bi-squad
/public/app/plugins/panel/heatmap @grafana/grafana-bi-squad
/public/app/plugins/panel/histogram @grafana/grafana-bi-squad
/public/app/plugins/panel/logs @grafana/observability-logs
/public/app/plugins/panel/nodeGraph @grafana/observability-traces-and-profiling
/public/app/plugins/panel/traces @grafana/observability-traces-and-profiling
/public/app/plugins/panel/piechart @grafana/grafana-bi-squad
/public/app/plugins/panel/state-timeline @grafana/grafana-bi-squad
/public/app/plugins/panel/status-history @grafana/grafana-bi-squad
/public/app/plugins/panel/table @grafana/grafana-bi-squad
/public/app/plugins/panel/timeseries @grafana/grafana-bi-squad
/public/app/plugins/panel/geomap @grafana/grafana-edge-squad
/public/app/plugins/panel/canvas @grafana/grafana-edge-squad
/public/app/plugins/panel/candlestick @grafana/grafana-edge-squad
/public/app/plugins/panel/icon @grafana/grafana-edge-squad
/scripts/build/release-packages.sh @grafana/plugins-platform-frontend
/scripts/circle-release-next-packages.sh @grafana/plugins-platform-frontend
/scripts/ci-frontend-metrics.sh @grafana/user-essentials @grafana/plugins-platform-frontend @grafana/grafana-bi-squad
/scripts/grunt @grafana/frontend-ops
/scripts/webpack @grafana/frontend-ops
/scripts/generate-a11y-report.sh @grafana/user-essentials
/crowdin.yml @grafana/user-essentials
/public/locales/ @grafana/user-essentials
/public/app/core/internationalization/ @grafana/user-essentials
/e2e/ @grafana/user-essentials
/e2e/cloud-plugins-suite/ @grafana/partner-plugins
/packages/ @grafana/user-essentials @grafana/plugins-platform-frontend @grafana/grafana-bi-squad
/packages/grafana-e2e-selectors/ @grafana/user-essentials
/packages/grafana-e2e/ @grafana/user-essentials
/packages/grafana-toolkit/ @grafana/plugins-platform-frontend
/packages/grafana-ui/.storybook/ @grafana/plugins-platform-frontend
/packages/grafana-ui/src/components/DateTimePickers/ @grafana/user-essentials
/packages/grafana-ui/src/components/GraphNG/ @grafana/grafana-bi-squad
/packages/grafana-ui/src/components/Logs/ @grafana/observability-logs
/packages/grafana-ui/src/components/Table/ @grafana/grafana-bi-squad
/packages/grafana-ui/src/components/TimeSeries/ @grafana/grafana-bi-squad
/packages/grafana-ui/src/components/uPlot/ @grafana/grafana-bi-squad
/packages/grafana-ui/src/utils/storybook/ @grafana/plugins-platform-frontend
/packages/grafana-data/src/**/*logs* @grafana/observability-logs
/plugins-bundled/ @grafana/plugins-platform-frontend
# root files, mostly frontend
.browserslistrc @grafana/frontend-ops
package.json @grafana/frontend-ops
tsconfig.json @grafana/frontend-ops
/.editorconfig @grafana/frontend-ops
/.eslintignore @grafana/frontend-ops
/.gitattributes @grafana/frontend-ops
/.gitignore @grafana/frontend-ops
/.husky/pre-commit @grafana/frontend-ops
/.nvmrc @grafana/frontend-ops
/.prettierignore @grafana/frontend-ops
/.yarn @grafana/frontend-ops
/.yarnrc.yml @grafana/frontend-ops
/yarn.lock @grafana/frontend-ops
/.linguirc @grafana/user-essentials
/babel.config.json @grafana/frontend-ops
lerna.json @grafana/frontend-ops
.babelrc @grafana/frontend-ops
.prettierrc.js @grafana/frontend-ops
.eslintrc @grafana/frontend-ops
/.prettierrc.js @grafana/frontend-ops
/.eslintrc @grafana/frontend-ops
/.vim @zoltanbedi
/jest.config.js @grafana/frontend-ops
/latest.json @grafana/frontend-ops
/metadata.md @grafana/plugins-platform
/stylelint.config.js @grafana/frontend-ops
/tools/ @grafana/frontend-ops
# public folder
/public/app/core/ @grafana/user-essentials
/public/app/core/components/TimePicker/ @grafana/user-essentials
/public/app/core/components/Layers/ @grafana/grafana-edge-squad
/public/app/features/all.ts @grafana/user-essentials
/public/app/features/admin/ @grafana/grafana-authnz-team
/public/app/features/annotations/ @grafana/user-essentials
/public/app/features/api-keys/ @grafana/user-essentials
/public/app/features/canvas/ @grafana/grafana-edge-squad
/public/app/features/commandPalette/ @grafana/user-essentials
/public/app/features/comments/ @grafana/grafana-edge-squad
/public/app/features/connections/ @grafana/plugins-platform-frontend
/public/app/features/correlations/ @grafana/explore-squad
/public/app/features/dashboard/ @grafana/dashboards-squad
/public/app/features/datasources/ @grafana/user-essentials
/public/app/features/dimensions/ @grafana/grafana-edge-squad
/public/app/features/explore/ @grafana/explore-squad
/public/app/features/expressions/ @grafana/observability-metrics
/public/app/features/folders/ @grafana/user-essentials
/public/app/features/inspector/ @grafana/user-essentials
/public/app/features/invites/ @grafana/user-essentials
/public/app/features/geo/ @grafana/grafana-edge-squad
/public/app/features/library-panels/ @grafana/user-essentials
/public/app/features/logs/ @grafana/observability-logs
/public/app/features/live/ @grafana/multitenancy-squad
/public/app/features/manage-dashboards/ @grafana/dashboards-squad
/public/app/features/notifications/ @grafana/user-essentials
/public/app/features/org/ @grafana/user-essentials
/public/app/features/panel/ @grafana/user-essentials
/public/app/features/playlist/ @grafana/dashboards-squad
/public/app/features/plugins/ @grafana/plugins-platform-frontend
/public/app/features/profile/ @grafana/user-essentials
/public/app/features/runtime/ @ryantxu
/public/app/features/query/ @grafana/dashboards-squad
/public/app/features/query-library/ @grafana/grafana-edge-squad
/public/app/features/sandbox/ @grafana/user-essentials
/public/app/features/scenes/ @grafana/dashboards-squad
/public/app/features/search/ @grafana/user-essentials
/public/app/features/serviceaccounts/ @grafana/grafana-authnz-team
/public/app/features/storage/ @grafana/multitenancy-squad
/public/app/features/teams/ @grafana/grafana-authnz-team
/public/app/features/templating/ @grafana/dashboards-squad
/public/app/features/transformers/ @grafana/grafana-edge-squad
/public/app/features/users/ @grafana/grafana-authnz-team
/public/app/features/variables/ @grafana/dashboards-squad
/public/app/plugins/panel/alertGroups/ @grafana/alerting-squad-frontend
/public/app/plugins/panel/alertlist/ @grafana/alerting-squad-frontend
/public/app/plugins/panel/annolist/ @grafana/user-essentials
/public/app/plugins/panel/barchart/ @grafana/grafana-bi-squad
/public/app/plugins/panel/bargauge/ @grafana/user-essentials
/public/app/plugins/panel/dashlist/ @grafana/user-essentials
/public/app/plugins/panel/debug/ @ryantxu
/public/app/plugins/panel/gauge/ @grafana/user-essentials
/public/app/plugins/panel/gettingstarted/ @grafana/user-essentials
/public/app/plugins/panel/graph/ @grafana/user-essentials
/public/app/plugins/panel/heatmap/ @grafana/grafana-bi-squad
/public/app/plugins/panel/histogram/ @grafana/grafana-bi-squad
/public/app/plugins/panel/logs/ @grafana/observability-logs
/public/app/plugins/panel/nodeGraph/ @grafana/observability-traces-and-profiling
/public/app/plugins/panel/traces/ @grafana/observability-traces-and-profiling
/public/app/plugins/panel/flamegraph/ @grafana/observability-traces-and-profiling
/public/app/plugins/panel/piechart/ @grafana/grafana-bi-squad
/public/app/plugins/panel/state-timeline/ @grafana/grafana-bi-squad
/public/app/plugins/panel/status-history/ @grafana/grafana-bi-squad
/public/app/plugins/panel/table/ @grafana/grafana-bi-squad
/public/app/plugins/panel/table-old/ @grafana/grafana-bi-squad
/public/app/plugins/panel/timeseries/ @grafana/grafana-bi-squad
/public/app/plugins/panel/geomap/ @grafana/grafana-edge-squad
/public/app/plugins/panel/canvas/ @grafana/grafana-edge-squad
/public/app/plugins/panel/candlestick/ @grafana/grafana-edge-squad
/public/app/plugins/panel/icon/ @grafana/grafana-edge-squad
/public/app/plugins/panel/live/ @grafana/multitenancy-squad
/public/app/plugins/panel/news/ @grafana/user-essentials
/public/app/plugins/panel/stat/ @grafana/user-essentials
/public/app/plugins/panel/text/ @grafana/user-essentials
/public/app/plugins/panel/welcome/ @grafana/user-essentials
/public/app/plugins/panel/xychart/ @grafana/grafana-bi-squad
/public/app/plugins/sdk.ts @grafana/plugins-platform-frontend
/public/app/polyfills/old-mediaquerylist.ts @grafana/user-essentials
/public/app/routes/ @grafana/user-essentials
/public/app/store/ @grafana/user-essentials
/public/app/types/ @grafana/user-essentials
/public/dashboards/ @grafana/dashboards-squad
/public/fonts/ @grafana/alerting-squad-frontend
/public/emails/ @grafana/user-essentials
/public/gazetteer/ @ryantxu
/public/img/ @grafana/user-essentials
/public/lib/ @grafana/user-essentials
/public/maps/ @ryantxu
/public/robots.txt @grafana/frontend-ops
/public/sass/ @grafana/user-essentials
/public/test/ @grafana/user-essentials
/public/testdata/ @grafana/user-essentials
/public/views/ @grafana/user-essentials
/public/app/features/explore/Logs.tsx @grafana/observability-logs
/public/app/features/explore/LogsContainer.tsx @grafana/observability-logs
/public/app/features/explore/TraceView/ @grafana/observability-traces-and-profiling
/public/api-merged.json @grafana/backend-platform
/public/api-spec.json @grafana/backend-platform
/public/openapi3.json @grafana/backend-platform
/public/app/angular/ @torkelo
/public/app/app.ts @grafana/frontend-ops
/public/app/dev.ts @grafana/frontend-ops
/public/app/index.ts @grafana/frontend-ops
/public/app/AppWrapper.tsx @grafana/frontend-ops
/public/app/partials/ @grafana/user-essentials
/scripts/benchmark-access-control.sh @grafana/grafana-authnz-team
/scripts/check-breaking-changes.sh @grafana/plugins-platform-frontend
/scripts/ci-* @grafana/grafana-release-eng
/scripts/circle-* @grafana/grafana-release-eng
/scripts/ci-frontend-metrics.sh @grafana/user-essentials @grafana/plugins-platform-frontend @grafana/grafana-bi-squad
/scripts/cli/ @grafana/user-essentials
/scripts/clean-git-or-error.sh @grafana/grafana-as-code
/scripts/grafana-server/ @grafana/user-essentials
/scripts/helpers/ @grafana/grafana-release-eng
/scripts/import_many_dashboards.sh @torkelo
/scripts/mixin-check.sh @bergquist
/scripts/openapi3/ @grafana/grafana-partnerships-team
/scripts/prepare-packagejson.js @grafana/frontend-ops
/scripts/protobuf-check.sh @grafana/plugins-platform-backend
/scripts/stripnulls.sh @grafana/grafana-as-code
/scripts/tag_release.sh @grafana/grafana-release-eng
/scripts/trigger_docker_build.sh @grafana/grafana-release-eng
/scripts/trigger_grafana_packer.sh @grafana/grafana-release-eng
/scripts/trigger_windows_build.sh @grafana/grafana-release-eng
/scripts/validate-devenv-dashboards.sh @grafana/grafana-release-eng
/scripts/verify-repo-update/ @grafana/grafana-release-eng
/scripts/webpack/ @grafana/frontend-ops
/scripts/generate-a11y-report.sh @grafana/user-essentials
.pa11yci.conf.js @grafana/user-essentials
.pa11yci-pr.conf.js @grafana/user-essentials
.betterer.results @joshhunt
.betterer.ts @joshhunt
# @grafana/ui component documentation
*.mdx @jessover9000 @grafana/plugins-platform-frontend
*.mdx @grafana/plugins-platform-frontend
# Design system
/public/img/icons/unicons/ @grafana/design-system
# Core datasources
/public/app/plugins/datasource/cloudwatch @grafana/aws-plugins
/public/app/plugins/datasource/elasticsearch @grafana/observability-logs
/public/app/plugins/datasource/grafana-azure-monitor-datasource @grafana/cloud-provider-plugins
/public/app/plugins/datasource/graphite @grafana/observability-metrics
/public/app/plugins/datasource/influxdb @grafana/observability-metrics
/public/app/plugins/datasource/jaeger @grafana/observability-traces-and-profiling
/public/app/plugins/datasource/loki @grafana/observability-logs
/public/app/plugins/datasource/mssql @grafana/grafana-bi-squad
/public/app/plugins/datasource/mysql @grafana/grafana-bi-squad
/public/app/plugins/datasource/opentsdb @grafana/backend-platform
/public/app/plugins/datasource/postgres @grafana/grafana-bi-squad
/public/app/plugins/datasource/prometheus @grafana/observability-metrics
/public/app/plugins/datasource/cloud-monitoring @grafana/cloud-provider-plugins
/public/app/plugins/datasource/zipkin @grafana/observability-traces-and-profiling
/public/app/plugins/datasource/tempo @grafana/observability-traces-and-profiling
/public/app/plugins/datasource/alertmanager @grafana/alerting-squad
/public/app/plugins/datasource/dashboard/ @grafana/dashboards-squad
/public/app/plugins/datasource/cloudwatch/ @grafana/aws-plugins
/public/app/plugins/datasource/elasticsearch/ @grafana/observability-logs
/public/app/plugins/datasource/grafana/ @grafana/user-essentials
/public/app/plugins/datasource/testdata/ @grafana/plugins-platform-frontend
/public/app/plugins/datasource/grafana-azure-monitor-datasource/ @grafana/partner-plugins
/public/app/plugins/datasource/graphite/ @grafana/observability-metrics
/public/app/plugins/datasource/influxdb/ @grafana/observability-metrics
/public/app/plugins/datasource/jaeger/ @grafana/observability-traces-and-profiling
/public/app/plugins/datasource/loki/ @grafana/observability-logs
/public/app/plugins/datasource/mixed/ @grafana/dashboards-squad
/public/app/plugins/datasource/mssql/ @grafana/grafana-bi-squad
/public/app/plugins/datasource/mysql/ @grafana/grafana-bi-squad
/public/app/plugins/datasource/opentsdb/ @grafana/backend-platform
/public/app/plugins/datasource/postgres/ @grafana/grafana-bi-squad
/public/app/plugins/datasource/prometheus/ @grafana/observability-metrics
/public/app/plugins/datasource/cloud-monitoring/ @grafana/partner-plugins
/public/app/plugins/datasource/zipkin/ @grafana/observability-traces-and-profiling
/public/app/plugins/datasource/tempo/ @grafana/observability-traces-and-profiling
/public/app/plugins/datasource/phlare/ @grafana/observability-traces-and-profiling
/public/app/plugins/datasource/parca/ @grafana/observability-traces-and-profiling
/public/app/plugins/datasource/alertmanager/ @grafana/alerting-squad
# SSE - Server Side Expressions
/pkg/expr/ @grafana/observability-metrics
# Cloud middleware
/grafana-mixin/ @grafana/hosted-grafana-team
# Grafana authentication and authorization
/pkg/services/accesscontrol @grafana/grafana-authnz-team
/pkg/services/auth @grafana/grafana-authnz-team
/pkg/login/ @grafana/grafana-authnz-team
/pkg/services/accesscontrol/ @grafana/grafana-authnz-team
/pkg/services/auth/ @grafana/grafana-authnz-team
/pkg/services/dashboards/accesscontrol.go @grafana/grafana-authnz-team
/pkg/services/datasources/permissions @grafana/grafana-authnz-team
/pkg/services/datasources/permissions/accesscontrol.go @grafana/grafana-authnz-team
/pkg/services/guardian @grafana/grafana-authnz-team
/pkg/services/ldap @grafana/grafana-authnz-team
/pkg/services/login @grafana/grafana-authnz-team
/pkg/services/multildap @grafana/grafana-authnz-team
/pkg/services/oauthtoken @grafana/grafana-authnz-team
/pkg/services/teamguardian @grafana/grafana-authnz-team
/pkg/services/serviceaccounts @grafana/grafana-authnz-team
/pkg/services/datasources/permissions/ @grafana/grafana-authnz-team
/pkg/services/guardian/ @grafana/grafana-authnz-team
/pkg/services/ldap/ @grafana/grafana-authnz-team
/pkg/services/login/ @grafana/grafana-authnz-team
/pkg/services/multildap/ @grafana/grafana-authnz-team
/pkg/services/oauthtoken/ @grafana/grafana-authnz-team
/pkg/services/teamguardian/ @grafana/grafana-authnz-team
/pkg/services/serviceaccounts/ @grafana/grafana-authnz-team
/pkg/services/loginattempt/ @grafana/grafana-authnz-team
/pkg/services/authn/ @grafana/grafana-authnz-team
# Support bundles
/public/app/features/support-bundles/ @grafana/grafana-authnz-team
/pkg/services/supportbundles/ @grafana/grafana-authnz-team
# Grafana Partnerships Team
/pkg/infra/httpclient/httpclientprovider/sigv4_middleware.go @grafana/grafana-partnerships-team
/pkg/infra/httpclient/httpclientprovider/sigv4_middleware_test.go @grafana/grafana-partnerships-team
# Schema framework and code generation
/pkg/codegen @grafana/grafana-as-code
/pkg/framework/coremodel @grafana/grafana-as-code
# Kind definitions
/kinds/dashboard @grafana/dashboards-squad
/kinds/ @grafana/grafana-as-code
# Kind system and code generation
embed.go @grafana/grafana-as-code
/pkg/kinds/ @grafana/grafana-as-code
/pkg/cuectx/ @grafana/grafana-as-code
/pkg/registry/ @grafana/grafana-as-code
/pkg/codegen/ @grafana/grafana-as-code
/pkg/kindsys/ @grafana/grafana-as-code
/pkg/kindsys/kindcat_custom.cue @grafana/apps-platform-core
/pkg/kinds/*/*_gen.go @grafana/grafana-as-code
/pkg/registry/corekind/ @grafana/grafana-as-code
/public/app/plugins/*gen.go @grafana/grafana-as-code
/cue.mod/ @grafana/grafana-as-code
# GitHub Workflows and Templates
/.github/CODEOWNERS @tolzhabayev
/.github/ISSUE_TEMPLATE/ @torkelo
/.github/PULL_REQUEST_TEMPLATE.md @torkelo
/.github/bot.md @torkelo
/.github/commands.json @torkelo
/.github/dependabot.yml @grafana/frontend-ops
/.github/metrics-collector.json @torkelo
/.github/pr-checks.json @marefr
/.github/pr-commands.json @marefr
/.github/renovate.json5 @grafana/frontend-ops
/.github/teams.yml @armandgrillet
/.github/workflows/backport.yml @grafana/grafana-release-eng
/.github/workflows/bump-version.yml @grafana/grafana-release-eng
/.github/workflows/close-milestone.yml @grafana/grafana-release-eng
/.github/workflows/cloud-data-sources-code-coverage.yml @grafana/partner-plugins @grafana/aws-plugins
/.github/workflows/codeowners-validator.yml @tolzhabayev
/.github/workflows/codeql-analysis.yml @DanCech
/.github/workflows/commands.yml @torkelo
/.github/workflows/detect-breaking-changes-* @grafana/plugins-platform-frontend
/.github/workflows/doc-validator.yml @grafana/docs-grafana
/.github/workflows/enterprise-pr-check.yml @grafana/grafana-release-eng
/.github/workflows/epic-add-to-platform-ux-parent-project.yml @meanmina
/.github/workflows/github-release.yml @torkelo
/.github/workflows/issue-labeled.yml @armandgrillet
/.github/workflows/metrics-collector.yml @torkelo
/.github/workflows/milestone.yml @marefr
/.github/workflows/ox-code-coverage.yml @grafana/explore-squad
/.github/workflows/pr-checks.yml @marefr
/.github/workflows/pr-codeql-analysis-go.yml @DanCech
/.github/workflows/pr-codeql-analysis-javascript.yml @DanCech
/.github/workflows/pr-codeql-analysis-python.yml @DanCech
/.github/workflows/pr-commands-closed.yml @tolzhabayev
/.github/workflows/pr-commands.yml @marefr
/.github/workflows/publish-technical-documentation-next.yml @grafana/docs-grafana
/.github/workflows/publish-technical-documentation-release.yml @grafana/docs-grafana
/.github/workflows/remove-milestone.yml @grafana/user-essentials
/.github/workflows/sbom-report.yml @grafana/security-team
/.github/workflows/scripts/json-file-to-job-output.js @grafana/plugins-platform-frontend
/.github/workflows/scripts/pr-get-job-link.js @grafana/plugins-platform-frontend
/.github/workflows/stale.yml @grafana/user-essentials
/.github/workflows/update-changelog.yml @grafana/grafana-release-eng
# Conf
/conf/defaults.ini @torkelo
/conf/sample.ini @torkelo
/conf/ldap.toml @grafana/grafana-authnz-team
/conf/ldap_multiple.toml @grafana/grafana-authnz-team
/conf/provisioning/access-control/ @grafana/grafana-authnz-team
/conf/provisioning/alerting/ @grafana/alerting-squad-backend
/conf/provisioning/dashboards/ @grafana/dashboards-squad
/conf/provisioning/datasources/ @grafana/plugins-platform-backend
/conf/provisioning/notifiers/ @bergquist
/conf/provisioning/plugins/ @grafana/plugins-platform-backend

View File

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

24
.github/commands.json vendored
View File

@@ -155,6 +155,22 @@
"url":"https://github.com/orgs/grafana/projects/221"
}
},
{
"type":"label",
"name":"datasource/Phlare",
"action":"addToProject",
"addToProject":{
"url":"https://github.com/orgs/grafana/projects/221"
}
},
{
"type":"label",
"name":"datasource/Parca",
"action":"addToProject",
"addToProject":{
"url":"https://github.com/orgs/grafana/projects/221"
}
},
{
"type":"label",
"name":"datasource/Elasticsearch",
@@ -298,5 +314,13 @@
"addToProject": {
"url": "https://github.com/orgs/grafana/projects/86"
}
},
{
"type": "label",
"name": "area/internationalization",
"action": "addToProject",
"addToProject": {
"url": "https://github.com/orgs/grafana/projects/78"
}
}
]

View File

@@ -66,8 +66,7 @@
"scripts/build/**/*",
"scripts/*.sh",
"Makefile",
"Dockerfile",
"Dockerfile.ubuntu"
"Dockerfile"
],
"action": "updateLabel",
"addLabel": "type/build-packaging"

View File

@@ -5,22 +5,13 @@
"enabledManagers": ["npm"],
"ignoreDeps": [
"@types/systemjs",
"@types/d3-force", // we should bump this once we move to esm modules
"@types/d3-interpolate", // we should bump this once we move to esm modules
"@types/d3-scale-chromatic", // we should bump this once we move to esm modules
"@types/react-icons", // jaeger-ui-components is being refactored to use @grafana/ui icons instead
"commander", // we are planning to remove this, so no need to update it
"d3",
"d3-force", // we should bump this once we move to esm modules
"d3-interpolate", // we should bump this once we move to esm modules
"d3-scale-chromatic", // we should bump this once we move to esm modules
"execa", // we should bump this once we move to esm modules
"history", // we should bump this together with react-router-dom
"@mdx-js/react", // storybook peer-depends on its 1.x version, we should upgrade this when we upgrade storybook
"monaco-editor", // due to us exposing this via @grafana/ui/CodeEditor's props bumping can break plugins
"node-fetch", // we should bump this once we move to esm modules
"react-hook-form", // due to us exposing these hooks via @grafana/ui form components bumping can break plugins
"react-icons", // jaeger-ui-components is being refactored to use @grafana/ui icons instead
"react-redux", // react-beautiful-dnd depends on react-redux 7.x, we need to update that one first
"react-router-dom", // we should bump this together with history
"systemjs",
@@ -28,6 +19,12 @@
"ts-loader", // we should remove ts-loader and use babel-loader instead
"ora", // we should bump this once we move to esm modules
// Sentry deprecated in favor of Grafana Faro for frontend logging.
// Major effort required to upgrade to latest Sentry, not worthwhile
"@sentry/browser",
"@sentry/types",
"@sentry/utils",
// dep updates blocked by React 18
"@testing-library/react",
"@types/react",
@@ -37,6 +34,7 @@
"react-dom",
"react-test-renderer"
],
"includePaths": ["package.json", "packages/**"],
"ignorePaths": ["packages/grafana-toolkit/package.json", "emails/**", "plugins-bundled/**", "**/mocks/**"],
"labels": ["area/frontend", "dependencies", "no-backport", "no-changelog"],
"packageRules": [
@@ -50,12 +48,49 @@
"matchPackagePatterns": ["@storybook"],
"extends": ["schedule:monthly"],
"groupName": "Storybook updates"
},
{
"groupName": "React Aria",
"matchPackagePrefixes": [
"@react-aria/",
"@react-stately/"
]
},
{
"groupName": "Moveable",
"matchPackageNames": [
"moveable",
"react-moveable"
]
},
{
"groupName": "Slate",
"matchPackageNames": [
"@types/slate",
"@types/slate-react",
"slate",
"slate-react"
]
},
{
"groupName": "d3",
"matchPackagePrefixes": [
"d3",
"@types/d3"
]
},
{
"groupName": "visx",
"matchPackagePrefixes": [
"@visx/"
]
}
],
"pin": {
"enabled": false
},
"prConcurrentLimit": 10,
"rebaseWhen": "conflicted",
"reviewers": ["team:grafana/frontend-ops"],
"separateMajorMinor": false,
"vulnerabilityAlerts": {

View File

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

View File

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

View File

@@ -0,0 +1,38 @@
name: "Codeowners Validator"
on:
pull_request:
branches: [ main ]
jobs:
codeowners-validator:
runs-on: ubuntu-latest
steps:
# Checks-out your repository, which is validated in the next step
- uses: actions/checkout@v2
- name: GitHub CODEOWNERS Validator
uses: mszostok/codeowners-validator@v0.7.4
# input parameters
with:
# ==== GitHub Auth ====
# "The list of checks that will be executed. By default, all checks are executed. Possible values: files,owners,duppatterns,syntax"
checks: "files,duppatterns,syntax"
# "The comma-separated list of experimental checks that should be executed. By default, all experimental checks are turned off. Possible values: notowned,avoid-shadowing"
experimental_checks: "notowned,avoid-shadowing"
# The repository path in which CODEOWNERS file should be validated."
repository_path: "."
# Defines the level on which the application should treat check issues as failures. Defaults to warning, which treats both errors and warnings as failures, and exits with error code 3. Possible values are error and warning. Default: warning"
check_failure_level: "error"
# The comma-separated list of patterns that should be ignored by not-owned-checker. For example, you can specify * and as a result, the * pattern from the CODEOWNERS file will be ignored and files owned by this pattern will be reported as unowned unless a later specific pattern will match that path. It's useful because often we have default owners entry at the begging of the CODOEWNERS file, e.g. * @global-owner1 @global-owner2"
not_owned_checker_skip_patterns: ""
# Specifies whether CODEOWNERS may have unowned files. For example, `/infra/oncall-rotator/oncall-config.yml` doesn't have owner and this is not reported.
owner_checker_allow_unowned_patterns: "false"
# Specifies whether only teams are allowed as owners of files.
owner_checker_owners_must_be_teams: "false"

View File

@@ -6,6 +6,7 @@
name: "CodeQL"
on:
workflow_dispatch:
push:
branches: [main, v1.8.x, v2.0.x, v2.1.x, v2.6.x, v3.0.x, v3.1.x, v4.0.x, v4.1.x, v4.2.x, v4.3.x, v4.4.x, v4.5.x, v4.6.x, v4.7.x, v5.0.x, v5.1.x, v5.2.x, v5.3.x, v5.4.x, v6.0.x, v6.1.x, v6.2.x, v6.3.x, v6.4.x, v6.5.x, v6.6.x, v6.7.x, v7.0.x, v7.1.x, v7.2.x]
paths-ignore:
@@ -39,6 +40,12 @@ jobs:
# a pull request then we can checkout the head.
fetch-depth: 2
- if: matrix.language == 'go'
name: Set go version
uses: actions/setup-go@v3
with:
go-version: '1.19.2'
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
@@ -49,5 +56,11 @@ jobs:
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main
- if: matrix.language == 'go'
name: Build go files
run: |
go mod verify
make build-go
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2

View File

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

View File

@@ -1,6 +1,14 @@
# Only runs if anything under the packages/ directory changes.
# (Otherwise detect-breaking-changes-build-skip.yml takes over)
name: Levitate / Detect breaking changes
on: pull_request
on:
pull_request:
paths:
- 'packages/**'
branches:
- 'main'
jobs:
buildPR:
@@ -14,16 +22,16 @@ jobs:
- uses: actions/checkout@v3
with:
path: './pr'
- uses: actions/setup-node@v3
- uses: actions/setup-node@v3.5.1
with:
node-version: 16.16.0
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn config get cacheFolder)"
run: echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT
- name: Restore yarn cache
uses: actions/cache@v2
uses: actions/cache@v3.0.11
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
@@ -62,16 +70,16 @@ jobs:
path: './base'
ref: ${{ github.event.pull_request.base.ref }}
- uses: actions/setup-node@v3
- uses: actions/setup-node@v3.5.1
with:
node-version: 16.16.0
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn config get cacheFolder)"
run: echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT
- name: Restore yarn cache
uses: actions/cache@v2
uses: actions/cache@v3.0.11
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
@@ -102,7 +110,7 @@ jobs:
runs-on: ubuntu-latest
needs: ['buildPR', 'buildBase']
env:
GITHUB_STEP_NUMBER: 7
GITHUB_STEP_NUMBER: 8
steps:
- uses: actions/checkout@v3
@@ -128,8 +136,9 @@ jobs:
uses: actions/github-script@v6
with:
script: |
const name = 'Detect breaking changes';
const script = require('./.github/workflows/scripts/pr-get-job-link.js')
await script({github, context, core})
await script({name, github, context, core})
- name: Detect breaking changes
id: breaking-changes

View File

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

View File

@@ -7,10 +7,10 @@ jobs:
doc-validator:
runs-on: "ubuntu-latest"
container:
image: "grafana/doc-validator:latest"
image: "grafana/doc-validator:v1.9.0"
steps:
- name: "Checkout code"
uses: "actions/checkout@v3"
- name: "Run doc-validator tool"
# Ensure that the CI always passes until all errors are resolved.
run: "doc-validator ./docs/sources || true"
run: "doc-validator --skip-image-validation ./docs/sources /docs/grafana/latest || true"

View File

@@ -23,4 +23,4 @@ jobs:
repository: grafana/grafana-enterprise
event_type: oss-pull-request
client_payload:
'{"source_branch": "${{ github.head_ref }}", "target_branch": "${{ github.base_ref }}", "pr_number": "${{ github.event.number }}"}'
'{"source_sha": "${{ github.event.pull_request.head.sha }}", "source_branch": "${{ github.head_ref }}", "target_branch": "${{ github.base_ref }}", "pr_number": "${{ github.event.number }}"}'

View File

@@ -0,0 +1,134 @@
name: When epic issues changed in Platform UX squad projects, check if epic is part of specified child projects and update on Platform UX parent project
on:
issues:
types: [opened, closed, edited, reopened, assigned, unassigned, labeled, unlabeled]
labels:
- 'type/epic'
env:
GITHUB_TOKEN: ${{ secrets.GH_BOT_PROJECTS_ACCESS_TOKEN }}
ORGANIZATION: ${{ github.repository_owner }}
REPO: ${{ github.event.repository.name }}
PARENT_PROJECT: 304
CHILD_PROJECT_1: 78
CHILD_PROJECT_2: 111
CHILD_PROJECT_3: 202
concurrency:
group: issue-add-to-parent-project-${{ github.event.number }}
jobs:
main:
runs-on: ubuntu-latest
steps:
- name: Check if issue is in child or parent projects
run: |
gh api graphql -f query='
query($org: String!, $repo: String!) {
repository(name: $repo, owner: $org) {
issue (number: ${{ github.event.issue.number }}) {
projectItems(first:20) {
nodes {
id,
project {
number,
title
},
fieldValueByName(name:"Status") {
... on ProjectV2ItemFieldSingleSelectValue {
optionId
name
}
}
}
}
}
}
}' -f org=$ORGANIZATION -f repo=$REPO > projects_data.json
echo 'IN_PARENT_PROJ='$(jq '.data.repository.issue.projectItems.nodes[] | select(.project.number==${{ env.PARENT_PROJECT }}) | .project != null' projects_data.json) >> $GITHUB_ENV
echo 'PARENT_PROJ_STATUS_ID='$(jq '.data.repository.issue.projectItems.nodes[] | select(.project.number==${{ env.PARENT_PROJECT }}) | select(.fieldValueByName != null) | .fieldValueByName.optionId' projects_data.json) >> $GITHUB_ENV
echo 'ITEM_ID='$(jq '.data.repository.issue.projectItems.nodes[] | select(.project.number==${{ env.PARENT_PROJECT }}) | .id' projects_data.json) >> $GITHUB_ENV
echo 'IN_CHILD_PROJ='$(jq 'first(.data.repository.issue.projectItems.nodes[] | select(.project.number==${{ env.CHILD_PROJECT_1 }} or .project.number==${{ env.CHILD_PROJECT_2 }} or .project.number==${{ env.CHILD_PROJECT_3 }}) | .project != null)' projects_data.json) >> $GITHUB_ENV
echo 'CHILD_PROJ_STATUS='$(jq -r '.data.repository.issue.projectItems.nodes[] | select(.project.number==${{ env.CHILD_PROJECT_1 }} or .project.number==${{ env.CHILD_PROJECT_2 }} or .project.number==${{ env.CHILD_PROJECT_3 }}) | select(.fieldValueByName != null) | .fieldValueByName.name' projects_data.json) >> $GITHUB_ENV
- name: Get parent project project data
if: env.IN_CHILD_PROJ
run: |
gh api graphql -f query='
query($org: String!, $number: Int!) {
organization(login: $org){
projectV2(number: $number) {
id
fields(first:20) {
nodes {
... on ProjectV2Field {
id
name
}
... on ProjectV2SingleSelectField {
id
name
options {
id
name
}
}
}
}
}
}
}' -f org=$ORGANIZATION -F number=$PARENT_PROJECT > project_data.json
echo 'PROJECT_ID='$(jq '.data.organization.projectV2.id' project_data.json) >> $GITHUB_ENV
echo 'STATUS_FIELD_ID='$(jq '.data.organization.projectV2.fields.nodes[] | select(.name== "Status") | .id' project_data.json) >> $GITHUB_ENV
echo 'TODO_OPTION_ID='$(jq '.data.organization.projectV2.fields.nodes[] | select(.name== "Status") | .options[] | select(.name=="Todo") |.id' project_data.json) >> $GITHUB_ENV
echo 'PROGRESS_OPTION_ID='$(jq '.data.organization.projectV2.fields.nodes[] | select(.name== "Status") | .options[] | select(.name=="In Progress") |.id' project_data.json) >> $GITHUB_ENV
echo 'DONE_OPTION_ID='$(jq '.data.organization.projectV2.fields.nodes[] | select(.name== "Status") | .options[] | select(.name=="Done") |.id' project_data.json) >> $GITHUB_ENV
- name: Add issue to parent project
if: env.IN_CHILD_PROJ && !env.IN_PARENT_PROJ
run: |
item_id="$( gh api graphql -f query='
mutation($project:ID!, $issue:ID!) {
addProjectV2ItemById(input: {projectId: $project, contentId: $issue}) {
item {
id
}
}
}' -f project=$PROJECT_ID -f issue=${{ github.event.issue.node_id }} --jq '.data.addProjectV2ItemById.item.id')"
echo 'ITEM_ID='$item_id >> $GITHUB_ENV
- name: Set parent project status Done
if: contains(env.CHILD_PROJ_STATUS, 'Done')
run: |
echo 'OPTION_ID='$DONE_OPTION_ID >> $GITHUB_ENV
- name: Set parent project status In Progress
if: contains(env.CHILD_PROJ_STATUS, 'In ') || contains(env.CHILD_PROJ_STATUS, 'Blocked')
run: |
echo 'OPTION_ID='$PROGRESS_OPTION_ID >> $GITHUB_ENV
- name: Set parent project status To do
if: env.CHILD_PROJ_STATUS && !contains(env.CHILD_PROJ_STATUS, 'In ') && !contains(env.CHILD_PROJ_STATUS, 'Blocked') && ! contains(env.CHILD_PROJ_STATUS, 'Done')
run: |
echo 'OPTION_ID='$TODO_OPTION_ID >> $GITHUB_ENV
- name: Set issue status in parent project
if: env.OPTION_ID && (env.OPTION_ID != env.PARENT_PROJ_STATUS_ID)
run: |
gh api graphql -f query='
mutation (
$project: ID!
$item: ID!
$status_field: ID!
$status_value: String!
) {
set_status: updateProjectV2ItemFieldValue(input: {
projectId: $project
itemId: $item
fieldId: $status_field
value: {
singleSelectOptionId: $status_value
}
}) {
projectV2Item {
id
}
}
}' -f project=$PROJECT_ID -f item=$ITEM_ID -f status_field=$STATUS_FIELD_ID -f status_value=${{ env.OPTION_ID }} --silent

View File

@@ -58,7 +58,7 @@ jobs:
- name: "Send Slack notification"
if: ${{ env.CHANNEL != 'null' }}
uses: slackapi/slack-github-action@v1.14.0
uses: slackapi/slack-github-action@v1.23.0
with:
payload: >
{

View File

@@ -3,15 +3,19 @@ on:
pull_request:
paths:
- 'pkg/services/queryhistory/**'
- 'pkg/tsdb/loki/**'
- 'pkg/tsdb/elasticsearch/**'
- 'public/app/features/explore/**'
- 'public/app/features/correlations/**'
- 'public/app/plugins/datasource/loki/**'
- 'public/app/plugins/datasource/elasticsearch/**'
branches-ignore:
- dependabot/**
- backport-*
jobs:
workflow-call:
uses: grafana/code-coverage/.github/workflows/code-coverage.yml@v0.1.11
uses: grafana/code-coverage/.github/workflows/code-coverage.yml@v0.1.17
with:
frontend-path-regexp: public\/app\/features\/(explore|correlations)
backend-path-regexp: pkg\/services\/(queryhistory)
frontend-path-regexp: public\/app\/features\/(explore|correlations)|public\/app\/plugins\/datasource\/(loki|elasticsearch)
backend-path-regexp: pkg\/services\/(queryhistory)|pkg\/tsdb\/(loki|elasticsearch)

View File

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

View File

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

View File

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

View File

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

View File

@@ -0,0 +1,34 @@
name: "publish-technical-documentation-next"
on:
push:
branches:
- "main"
paths:
- "docs/sources/**"
workflow_dispatch:
jobs:
sync:
if: "github.repository == 'grafana/grafana'"
runs-on: "ubuntu-latest"
steps:
- name: "Checkout Grafana repo"
uses: "actions/checkout@v3"
- name: "Clone website-sync Action"
# WEBSITE_SYNC_GRAFANA is a fine-grained GitHub Personal Access Token that expires.
# It must be updated in the grafanabot GitHub account.
run: "git clone --single-branch --no-tags --depth 1 -b master https://grafanabot:${{ secrets.WEBSITE_SYNC_GRAFANA }}@github.com/grafana/website-sync ./.github/actions/website-sync"
- name: "Publish to website repository (next)"
uses: "./.github/actions/website-sync"
id: "publish-next"
with:
repository: "grafana/website"
branch: "master"
host: "github.com"
# PUBLISH_TO_WEBSITE_GRAFANA is a fine-grained GitHub Personal Access Token that expires.
# It must be updated in the grafanabot GitHub account.
github_pat: "grafanabot:${{ secrets.PUBLISH_TO_WEBSITE_GRAFANA }}"
source_folder: "docs/sources"
target_folder: "content/docs/grafana/next"

View File

@@ -0,0 +1,64 @@
name: "publish-technical-documentation-release"
on:
push:
branches:
- v[0-9]+.[0-9]+.x
tags:
- v[0-9]+.[0-9]+.[0-9]+
paths:
- "docs/sources/**"
workflow_dispatch:
jobs:
sync:
if: "github.repository == 'grafana/grafana'"
runs-on: "ubuntu-latest"
steps:
- name: "Checkout Grafana repo"
uses: "actions/checkout@v3"
with:
fetch-depth: 0
- name: "Checkout Actions library"
uses: "actions/checkout@v3"
with:
repository: "grafana/grafana-github-actions"
path: "./actions"
- name: "Install Actions from library"
run: "npm install --production --prefix ./actions"
- name: "Determine if there is a matching release tag"
id: "has-matching-release-tag"
uses: "./actions/has-matching-release-tag"
with:
ref_name: "${{ github.ref_name }}"
release_tag_regexp: "^v(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)$"
release_branch_regexp: "^v(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.x$"
- name: "Determine technical documentation version"
if: "steps.has-matching-release-tag.outputs.bool == 'true'"
uses: "./actions/docs-target"
id: "target"
with:
ref_name: "${{ github.ref_name }}"
- name: "Clone website-sync Action"
if: "steps.has-matching-release-tag.outputs.bool == 'true'"
# WEBSITE_SYNC_GRAFANA is a fine-grained GitHub Personal Access Token that expires.
# It must be updated in the grafanabot GitHub account.
run: "git clone --single-branch --no-tags --depth 1 -b master https://grafanabot:${{ secrets.WEBSITE_SYNC_GRAFANA }}@github.com/grafana/website-sync ./.github/actions/website-sync"
- name: "Publish to website repository (release)"
if: "steps.has-matching-release-tag.outputs.bool == 'true'"
uses: "./.github/actions/website-sync"
id: "publish-release"
with:
repository: "grafana/website"
branch: "master"
host: "github.com"
# PUBLISH_TO_WEBSITE_GRAFANA is a fine-grained GitHub Personal Access Token that expires.
# It must be updated in the grafanabot GitHub account.
github_pat: "grafanabot:${{ secrets.PUBLISH_TO_WEBSITE_GRAFANA }}"
source_folder: "docs/sources"
target_folder: "content/docs/grafana/${{ steps.target.outputs.target }}"

View File

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

20
.github/workflows/sbom-report.yml vendored Normal file
View File

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

View File

@@ -1,9 +1,9 @@
module.exports = async ({ github, context, core }) => {
module.exports = async ({ name, github, context, core }) => {
const { owner, repo } = context.repo;
const url = `https://api.github.com/repos/${owner}/${repo}/actions/runs/${context.runId}/jobs`
const result = await github.request(url)
const link = `https://github.com/grafana/grafana/runs/${result.data.jobs[0].id}?check_suite_focus=true`;
core.setOutput('link', link);
}
const result = await github.request(url);
const job = result.data.jobs.find(j => j.name === name);
core.setOutput('link', `${job.html_url}?check_suite_focus=true`);
}

View File

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

View File

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

18
.gitignore vendored
View File

@@ -61,6 +61,7 @@ public/css/*.min.css
*.sublime-workspace
*.swp
.idea/
.fleet/
*.iml
*.tmp
.DS_Store
@@ -104,6 +105,7 @@ debug.test
/packaging/**/*.tar.gz
/packaging/**/*.tar.gz.sha256
pkg/cmd/grafana-server/__debug_bin
pkg/services/quota/quotaimpl/storage/storage.json
# Ignore OSX indexing
.DS_Store
@@ -125,11 +127,13 @@ pkg/cmd/grafana-server/__debug_bin
!.yarn/patches/*.patch
# Ignoring frontend packages specifics
/packages/grafana-ui/.yarn/.cache
/packages/**/dist
/packages/**/compiled
/packages/**/.rpt2_cache
/packages/**/tsdoc-metadata.json
/packages/**/package.tgz
/packages/grafana-toolkit/sass
## CI places the packages in a different location
/npm-artifacts/*.tgz
@@ -153,6 +157,8 @@ compilation-stats.json
/e2e/benchmarks/**/results/*
/e2e/benchmarks/**/results
/e2e/build_results.zip
/e2e/extensions
/e2e/extensions-suite
# grafana server
/scripts/grafana-server/server.log
@@ -167,17 +173,13 @@ compilation-stats.json
# auto generated frontend docs
/docs/sources/packages_api
# auto generated Go files
*_gen.go
!pkg/services/featuremgmt/toggles_gen.go
!pkg/coremodel/**/*_gen.go
!pkg/framework/**/*_gen.go
!pkg/plugins/pfs/**/*_gen.go
!public/app/plugins/**/*_gen.go
# wire generated files
**/wire_gen.go
# Auto-generated internationalization files
public/locales/_build/
public/locales/**/*.js
public/locales/*/*.js
public/locales/*/grafana_old.json
deployment_tools_config.json

View File

@@ -19,6 +19,7 @@ include-go-root = true
packages = ["io/ioutil"]
[[linters-settings.depguard.packages-with-error-message]]
"io/ioutil" = "Deprecated: As of Go 1.16, the same functionality is now provided by package io or package os, and those implementations should be preferred in new code. See the specific function documentation for details."
"gopkg.in/yaml.v2" = "Grafana packages are not allowed to depend on gopkg.in/yaml.v2 as gopkg.in/yaml.v3 is now available"
[linters-settings.gocritic]
enabled-checks = ["ruleguard"]
@@ -83,7 +84,11 @@ text = "ST1001"
# Use golang.org/x/text/cases instead.
[[issues.exclude-rules]]
linters = ["staticcheck"]
text = "SA1019"
text = "SA1019: strings.Title"
[[issues.exclude-rules]]
linters = ["staticcheck"]
text = "use fake service and real access control evaluator instead"
[[issues.exclude-rules]]
linters = ["gosec"]

2
.nvmrc
View File

@@ -1 +1 @@
v16.14.0
v18.12.0

View File

@@ -62,7 +62,7 @@ var config = {
url: '${HOST}/login',
wait: 500,
rootElement: '.main-view',
threshold: 12,
threshold: 13,
},
{
url: '${HOST}/login',
@@ -74,7 +74,7 @@ var config = {
"click element button[aria-label='Login button']",
"wait for element [aria-label='Skip change password button'] to be visible",
],
threshold: 13,
threshold: 14,
rootElement: '.main-view',
},
{
@@ -101,49 +101,49 @@ var config = {
rootElement: '.main-view',
// the unified alerting promotion alert's content contrast is too low
// see https://github.com/grafana/grafana/pull/41829
threshold: 4,
threshold: 6,
},
{
url: '${HOST}/datasources',
wait: 500,
rootElement: '.main-view',
threshold: 0,
threshold: 1,
},
{
url: '${HOST}/org/users',
wait: 500,
rootElement: '.main-view',
threshold: 0,
threshold: 1,
},
{
url: '${HOST}/org/teams',
wait: 500,
rootElement: '.main-view',
threshold: 0,
threshold: 1,
},
{
url: '${HOST}/plugins',
wait: 500,
rootElement: '.main-view',
threshold: 0,
threshold: 1,
},
{
url: '${HOST}/org',
wait: 500,
rootElement: '.main-view',
threshold: 0,
threshold: 1,
},
{
url: '${HOST}/org/apikeys',
wait: 500,
rootElement: '.main-view',
threshold: 3,
threshold: 4,
},
{
url: '${HOST}/dashboards',
wait: 500,
rootElement: '.main-view',
threshold: 0,
threshold: 1,
},
],
};

View File

@@ -30,3 +30,11 @@ theme.dark.generated.json
public/api-spec.json
public/api-merged.json
public/openapi3.json
# Generated Kinds report
kinds/report.json
# Generated schema docs
docs/sources/developers/kinds/
scripts/cli/bettererIssueTemplate.md

19
.vscode/launch.json vendored
View File

@@ -6,10 +6,17 @@
"type": "go",
"request": "launch",
"mode": "auto",
"program": "${workspaceFolder}/pkg/cmd/grafana-server/",
"program": "${workspaceFolder}/pkg/cmd/grafana/",
"env": {},
"cwd": "${workspaceFolder}",
"args": ["--homepath", "${workspaceFolder}", "--packaging", "dev"]
"args": ["server", "--homepath", "${workspaceFolder}", "--packaging", "dev"]
},
{
"name": "Attach to Chrome",
"port": 9222,
"request": "attach",
"type": "chrome",
"webRoot": "${workspaceFolder}"
},
{
"name": "Debug Jest test",
@@ -20,6 +27,14 @@
"console": "integratedTerminal",
"internalConsoleOptions": "neverOpen",
"port": 9229
},
{
"name": "Debug Go test",
"type": "go",
"request": "launch",
"mode": "test",
"program": "${workspaceFolder}/${relativeFileDirname}",
"showLog": true
}
]
}

Binary file not shown.

Binary file not shown.

File diff suppressed because one or more lines are too long

807
.yarn/releases/yarn-3.3.0.cjs vendored Executable file

File diff suppressed because one or more lines are too long

View File

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

View File

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

View File

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

View File

@@ -3,41 +3,36 @@ enableTelemetry: false
nodeLinker: pnp
packageExtensions:
"@mdx-js/loader@1.6.22":
'@storybook/addon-docs@6.5.12':
peerDependencies:
react: 17.0.1
"@npmcli/run-script@4.1.3":
'@babel/core': ^7.0.0
'@storybook/manager-webpack5': 6.5.12
'webpack': 5.74.0
'@storybook/addon-essentials@6.5.12':
peerDependencies:
'@storybook/components': 6.5.12
'@storybook/core-events': 6.5.12
'@storybook/manager-webpack5': 6.5.12
'@storybook/theming': 6.5.12
'@storybook/core-server@6.5.12':
peerDependencies:
'@babel/core': ^7.0.0
'@storybook/core@6.5.12':
peerDependencies:
'@babel/core': ^7.0.0
'@storybook/manager-webpack5': 6.5.12
'@storybook/csf-tools@6.5.12':
peerDependencies:
'@babel/core': ^7.0.0
'@storybook/mdx2-csf@0.0.3':
dependencies:
which: ^2.0.2
"@storybook/addon-docs@6.4.21":
'@babel/types': ^7.14.8
'@storybook/react@6.5.12':
peerDependencies:
"@storybook/manager-webpack5": 6.4.21
"@storybook/addon-essentials@6.4.21":
peerDependencies:
"@storybook/components": 6.4.21
"@storybook/core-events": 6.4.21
"@storybook/manager-webpack5": 6.4.21
"@storybook/theming": 6.4.21
"@storybook/core-server@6.4.21":
peerDependencies:
"@babel/core": ^7.0.0
"@storybook/core@6.4.21":
peerDependencies:
"@babel/core": ^7.0.0
"@storybook/manager-webpack5": 6.4.21
"@storybook/csf-tools@6.4.21":
peerDependencies:
"@babel/core": ^7.0.0
"@storybook/react@6.4.21":
peerDependencies:
"@storybook/manager-webpack5": 6.4.21
'@storybook/manager-webpack5': 6.5.12
doctrine@3.0.0:
dependencies:
assert: 2.0.0
moveable@0.30.0:
dependencies:
"@daybrush/utils": 1.7.0
framework-utils: ^1.1.0
rc-time-picker@3.7.3:
peerDependencies:
react: 17.0.1
@@ -49,33 +44,26 @@ packageExtensions:
react-compat-css-styled@1.0.8:
dependencies:
react-simple-compat: 1.2.2
react-compat-moveable@0.18.0:
dependencies:
"@egjs/agent": ^2.2.1
"@egjs/children-differ": ^1.0.1
"@scena/matrix": 1.1.1
css-to-mat: ^1.0.3
gesto: ^1.9.0
overlap-area: ^1.0.0
react-simple-compat: 1.2.2
peerDependencies:
framework-utils: ^1.1.0
react-docgen-typescript-loader@3.7.2:
peerDependencies:
webpack: 4.41.5
react-icons@2.2.7:
peerDependencies:
prop-types: "*"
prop-types: '*'
react-resizable@3.0.4:
peerDependencies:
react-dom: 17.0.1
plugins:
- path: .yarn/plugins/@yarnpkg/plugin-typescript.cjs
spec: "@yarnpkg/plugin-typescript"
spec: '@yarnpkg/plugin-typescript'
- path: .yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs
spec: "@yarnpkg/plugin-interactive-tools"
spec: '@yarnpkg/plugin-interactive-tools'
- path: .yarn/plugins/@yarnpkg/plugin-outdated.cjs
spec: "https://mskelton.dev/yarn-outdated/v2"
spec: 'https://mskelton.dev/yarn-outdated/v2'
yarnPath: .yarn/releases/yarn-3.2.3.cjs
yarnPath: .yarn/releases/yarn-3.3.0.cjs
# Uncomment the following lines if you want to use Verdaccio local npm registry. Read more at packages/README.md
# npmScopes:
# grafana:
# npmRegistryServer: http://localhost:4873
# unsafeHttpWhitelist:
# - 'localhost'

View File

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

View File

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

View File

@@ -1,8 +1,17 @@
FROM node:16-alpine3.15 as js-builder
# syntax=docker/dockerfile:1
ARG BASE_IMAGE=alpine:3.15
ARG JS_IMAGE=node:18-alpine3.15
ARG GO_IMAGE=golang:1.19.4-alpine3.17
ARG GO_SRC=go-builder
ARG JS_SRC=js-builder
FROM ${JS_IMAGE} as js-builder
ENV NODE_OPTIONS=--max_old_space_size=8000
WORKDIR /grafana
WORKDIR /tmp/grafana
COPY package.json yarn.lock .yarnrc.yml ./
COPY .yarn .yarn
@@ -13,84 +22,141 @@ RUN yarn install
COPY tsconfig.json .eslintrc .editorconfig .browserslistrc .prettierrc.js babel.config.json .linguirc ./
COPY public public
COPY tools tools
COPY scripts scripts
COPY emails emails
ENV NODE_ENV production
RUN yarn build
FROM golang:1.19.1-alpine3.15 as go-builder
FROM ${GO_IMAGE} as go-builder
RUN apk add --no-cache gcc g++ make
# Install build dependencies
RUN if grep -i -q alpine /etc/issue; then \
apk add --no-cache gcc g++ make; \
fi
WORKDIR /grafana
WORKDIR /tmp/grafana
COPY go.mod go.sum embed.go Makefile build.go package.json ./
COPY go.* ./
COPY .bingo .bingo
RUN go mod download && \
go install github.com/bwplotka/bingo@latest && \
bingo get
COPY embed.go Makefile build.go package.json ./
COPY cue.mod cue.mod
COPY kinds kinds
COPY packages/grafana-schema packages/grafana-schema
COPY public/app/plugins public/app/plugins
COPY public/api-spec.json public/api-spec.json
COPY pkg pkg
COPY scripts scripts
COPY cue.mod cue.mod
COPY .bingo .bingo
COPY conf conf
COPY .github .github
RUN go mod verify
RUN make build-go
# Final stage
FROM alpine:3.15.6
FROM ${BASE_IMAGE} as tgz-builder
LABEL maintainer="Grafana team <hello@grafana.com>"
WORKDIR /tmp/grafana
ARG GRAFANA_TGZ="grafana-latest.linux-x64-musl.tar.gz"
COPY ${GRAFANA_TGZ} /tmp/grafana.tar.gz
# add -v to make tar print every file it extracts
RUN tar x -z -f /tmp/grafana.tar.gz --strip-components=1
# helpers for COPY --from
FROM ${GO_SRC} as go-src
FROM ${JS_SRC} as js-src
# Final stage
FROM ${BASE_IMAGE}
LABEL maintainer="Grafana Labs <hello@grafana.com>"
ARG GF_UID="472"
ARG GF_GID="0"
ENV PATH="/usr/share/grafana/bin:$PATH" \
GF_PATHS_CONFIG="/etc/grafana/grafana.ini" \
GF_PATHS_DATA="/var/lib/grafana" \
GF_PATHS_HOME="/usr/share/grafana" \
GF_PATHS_LOGS="/var/log/grafana" \
GF_PATHS_PLUGINS="/var/lib/grafana/plugins" \
GF_PATHS_PROVISIONING="/etc/grafana/provisioning"
GF_PATHS_CONFIG="/etc/grafana/grafana.ini" \
GF_PATHS_DATA="/var/lib/grafana" \
GF_PATHS_HOME="/usr/share/grafana" \
GF_PATHS_LOGS="/var/log/grafana" \
GF_PATHS_PLUGINS="/var/lib/grafana/plugins" \
GF_PATHS_PROVISIONING="/etc/grafana/provisioning"
WORKDIR $GF_PATHS_HOME
RUN apk add --no-cache ca-certificates bash tzdata musl-utils
RUN apk add --no-cache openssl ncurses-libs ncurses-terminfo-base --repository=http://dl-cdn.alpinelinux.org/alpine/edge/main
RUN apk upgrade ncurses-libs ncurses-terminfo-base --repository=http://dl-cdn.alpinelinux.org/alpine/edge/main
RUN apk info -vv | sort
# Install dependencies
RUN if grep -i -q alpine /etc/issue; then \
apk add --no-cache ca-certificates bash tzdata musl-utils && \
apk info -vv | sort; \
elif grep -i -q ubuntu /etc/issue; then \
DEBIAN_FRONTEND=noninteractive && \
apt-get update && \
apt-get install -y ca-certificates curl tzdata && \
apt-get autoremove -y && \
rm -rf /var/lib/apt/lists/*; \
else \
echo 'ERROR: Unsupported base image' && /bin/false; \
fi
COPY conf ./conf
# glibc support for alpine x86_64 only
RUN if grep -i -q alpine /etc/issue && [ `arch` = "x86_64" ]; then \
wget https://github.com/sgerrand/alpine-pkg-glibc/releases/download/2.35-r0/glibc-2.35-r0.apk \
-O /tmp/glibc-2.35-r0.apk && \
wget https://github.com/sgerrand/alpine-pkg-glibc/releases/download/2.35-r0/glibc-bin-2.35-r0.apk \
-O /tmp/glibc-bin-2.35-r0.apk && \
apk add --no-cache --allow-untrusted /tmp/glibc-2.35-r0.apk /tmp/glibc-bin-2.35-r0.apk && \
rm -f /lib64/ld-linux-x86-64.so.2 && \
ln -s /usr/glibc-compat/lib64/ld-linux-x86-64.so.2 /lib64/ld-linux-x86-64.so.2 && \
rm -f /tmp/glibc-2.35-r0.apk && \
rm -f /tmp/glibc-bin-2.35-r0.apk && \
rm -f /lib/ld-linux-x86-64.so.2 && \
rm -f /etc/ld.so.cache; \
fi
COPY --from=go-src /tmp/grafana/conf ./conf
RUN if [ ! $(getent group "$GF_GID") ]; then \
addgroup -S -g $GF_GID grafana; \
fi
if grep -i -q alpine /etc/issue; then \
addgroup -S -g $GF_GID grafana; \
else \
addgroup --system --gid $GF_GID grafana; \
fi; \
fi && \
GF_GID_NAME=$(getent group $GF_GID | cut -d':' -f1) && \
mkdir -p "$GF_PATHS_HOME/.aws" && \
if grep -i -q alpine /etc/issue; then \
adduser -S -u $GF_UID -G "$GF_GID_NAME" grafana; \
else \
adduser --system --uid $GF_UID --ingroup "$GF_GID_NAME" grafana; \
fi && \
mkdir -p "$GF_PATHS_PROVISIONING/datasources" \
"$GF_PATHS_PROVISIONING/dashboards" \
"$GF_PATHS_PROVISIONING/notifiers" \
"$GF_PATHS_PROVISIONING/plugins" \
"$GF_PATHS_PROVISIONING/access-control" \
"$GF_PATHS_PROVISIONING/alerting" \
"$GF_PATHS_LOGS" \
"$GF_PATHS_PLUGINS" \
"$GF_PATHS_DATA" && \
cp conf/sample.ini "$GF_PATHS_CONFIG" && \
cp conf/ldap.toml /etc/grafana/ldap.toml && \
chown -R "grafana:$GF_GID_NAME" "$GF_PATHS_DATA" "$GF_PATHS_HOME/.aws" "$GF_PATHS_LOGS" "$GF_PATHS_PLUGINS" "$GF_PATHS_PROVISIONING" && \
chmod -R 777 "$GF_PATHS_DATA" "$GF_PATHS_HOME/.aws" "$GF_PATHS_LOGS" "$GF_PATHS_PLUGINS" "$GF_PATHS_PROVISIONING"
RUN export GF_GID_NAME=$(getent group $GF_GID | cut -d':' -f1) && \
mkdir -p "$GF_PATHS_HOME/.aws" && \
adduser -S -u $GF_UID -G "$GF_GID_NAME" grafana && \
mkdir -p "$GF_PATHS_PROVISIONING/datasources" \
"$GF_PATHS_PROVISIONING/dashboards" \
"$GF_PATHS_PROVISIONING/notifiers" \
"$GF_PATHS_PROVISIONING/plugins" \
"$GF_PATHS_PROVISIONING/access-control" \
"$GF_PATHS_PROVISIONING/alerting" \
"$GF_PATHS_LOGS" \
"$GF_PATHS_PLUGINS" \
"$GF_PATHS_DATA" && \
cp "$GF_PATHS_HOME/conf/sample.ini" "$GF_PATHS_CONFIG" && \
cp "$GF_PATHS_HOME/conf/ldap.toml" /etc/grafana/ldap.toml && \
chown -R "grafana:$GF_GID_NAME" "$GF_PATHS_DATA" "$GF_PATHS_HOME/.aws" "$GF_PATHS_LOGS" "$GF_PATHS_PLUGINS" "$GF_PATHS_PROVISIONING" && \
chmod -R 777 "$GF_PATHS_DATA" "$GF_PATHS_HOME/.aws" "$GF_PATHS_LOGS" "$GF_PATHS_PLUGINS" "$GF_PATHS_PROVISIONING"
COPY --from=go-builder /grafana/bin/*/grafana-server /grafana/bin/*/grafana-cli ./bin/
COPY --from=js-builder /grafana/public ./public
COPY --from=js-builder /grafana/tools ./tools
COPY --from=go-src /tmp/grafana/bin/grafana* /tmp/grafana/bin/*/grafana* ./bin/
COPY --from=js-src /tmp/grafana/public ./public
EXPOSE 3000
COPY ./packaging/docker/run.sh /run.sh
ARG RUN_SH=./packaging/docker/run.sh
USER grafana
COPY ${RUN_SH} /run.sh
USER "$GF_UID"
ENTRYPOINT [ "/run.sh" ]

View File

@@ -1,87 +0,0 @@
FROM node:16-alpine3.15 as js-builder
ENV NODE_OPTIONS=--max_old_space_size=8000
WORKDIR /usr/src/app/
COPY package.json yarn.lock ./
COPY packages packages
COPY .yarnrc.yml ./
COPY .yarn .yarn
COPY plugins-bundled plugins-bundled
RUN yarn install
COPY tsconfig.json .eslintrc .editorconfig .browserslistrc .prettierrc.js babel.config.json .linguirc ./
COPY public public
COPY tools tools
COPY scripts scripts
COPY emails emails
ENV NODE_ENV production
RUN yarn build
FROM golang:1.19.1 AS go-builder
WORKDIR /src/grafana
COPY go.mod go.sum embed.go ./
COPY Makefile build.go package.json ./
COPY .bingo .bingo
COPY pkg pkg/
COPY cue.mod cue.mod/
COPY packages/grafana-schema packages/grafana-schema/
COPY public/app/plugins public/app/plugins/
COPY public/api-spec.json public/api-spec.json
RUN go mod verify
RUN make build-go
FROM ubuntu:20.04
LABEL maintainer="Grafana team <hello@grafana.com>"
EXPOSE 3000
ARG GF_UID="472"
ARG GF_GID="472"
ENV PATH="/usr/share/grafana/bin:$PATH" \
GF_PATHS_CONFIG="/etc/grafana/grafana.ini" \
GF_PATHS_DATA="/var/lib/grafana" \
GF_PATHS_HOME="/usr/share/grafana" \
GF_PATHS_LOGS="/var/log/grafana" \
GF_PATHS_PLUGINS="/var/lib/grafana/plugins" \
GF_PATHS_PROVISIONING="/etc/grafana/provisioning"
WORKDIR $GF_PATHS_HOME
COPY conf conf
# curl should be part of the image
RUN apt-get update && apt-get install -y ca-certificates curl
RUN mkdir -p "$GF_PATHS_HOME/.aws" && \
addgroup --system --gid $GF_GID grafana && \
adduser --uid $GF_UID --system --ingroup grafana grafana && \
mkdir -p "$GF_PATHS_PROVISIONING/datasources" \
"$GF_PATHS_PROVISIONING/dashboards" \
"$GF_PATHS_PROVISIONING/notifiers" \
"$GF_PATHS_PROVISIONING/plugins" \
"$GF_PATHS_PROVISIONING/access-control" \
"$GF_PATHS_PROVISIONING/alerting" \
"$GF_PATHS_LOGS" \
"$GF_PATHS_PLUGINS" \
"$GF_PATHS_DATA" && \
cp conf/sample.ini "$GF_PATHS_CONFIG" && \
cp conf/ldap.toml /etc/grafana/ldap.toml && \
chown -R grafana:grafana "$GF_PATHS_DATA" "$GF_PATHS_HOME/.aws" "$GF_PATHS_LOGS" "$GF_PATHS_PLUGINS" "$GF_PATHS_PROVISIONING" && \
chmod -R 777 "$GF_PATHS_DATA" "$GF_PATHS_HOME/.aws" "$GF_PATHS_LOGS" "$GF_PATHS_PLUGINS" "$GF_PATHS_PROVISIONING"
COPY --from=go-builder /src/grafana/bin/*/grafana-server /src/grafana/bin/*/grafana-cli bin/
COPY --from=js-builder /usr/src/app/public public
COPY --from=js-builder /usr/src/app/tools tools
COPY packaging/docker/run.sh /
USER grafana
ENTRYPOINT [ "/run.sh" ]

View File

@@ -20,43 +20,52 @@ If you don't have the knowledge or time to code, consider helping with triage. T
<!-- https://textik.com/#610afa78553def29 -->
```
+--------------------------+
+----------------+ New issue opened/ |
| | more information added |
| +-------------+------------+
| Ask for more |
| information +-------------+------------+
| | All information needed |
| +--------+ to categorize the issue? +--------+
| | | | |
| | NO +--------------------------+ YES |
| | |
+------+-------+-------------+ +------------+---------+ +----------------------------+
| | | | | |
| label: needs more info | | Needs investigation? +--YES---+ label: needs investigation |
| | | | | |
+----------------------------+ +----------------+-----+ +--------------+-------------+
NO | |
| Investigate |
+-----------+----------+ |
| label: type/* | |
| label: area/* +------------------+
| label: datasource/* |
+-----|----------+-----+
| |
| |
| +--+--------------------+ +--------------------+
| | | | label: priority/* |
| | Needs priority? +--YES---+| milestone? |
| | | | |
| +--------------------+--+ +----+---------------+
| NO | |
| | |
+----+-------------+ +---+----------+ |
| | | | |
| Close issue +----------+ Done +------+
| | | |
+------------------+ +--------------+
+-------------------+
| |
| new issue/ | +
| more info added |
| |
+---------|---------+
|
+-------------|-----------+
| |
NO +------- all info needed to ------+ YES
| | categorize the issue? | |
| | | |
| +-------------------------+ |
+------|-----------+ +------------|----------+
| | | |
| label: | | label: type/* |
| needs more info | | label: area/* |
| | | label: datasource/* |
+------------------+ | | |
+------------|----------+
|
+--------|-------+
| |
NO +---------- is duplicate? --------------------+ YES
| | | |
| +----------------+ |
| +----------------|---------------+
+------|-----+ | |
| | | add comment: |
NO +------------ can repro? ------------+ YES | |
| | | | | /duplicate of #<issue number> |
| +------------+ | | |
| | +--------------------------------+
+-------------|-------------+ |
| | +--------|---------+
| label: | | |
| triage/needs-confirmation | NO +-------- needs priority? ------+ YES
| | | | | |
+-------------|-------------+ | +------------------+ |
| | |
+-------------|------+ +-------|--------+ +----------|---------+
| | | | | |
| Assign to project ------ Done -------------- label: priority/* |
| | | | | |
+--------------------+ +----------------+ +--------------------+
```
## 1. Find uncategorized issues
@@ -87,28 +96,29 @@ Given a certain [issue template](https://github.com/grafana/grafana/issues/new/c
Should explain what happened, what was expected and how to reproduce it together with any additional information that may help giving a complete picture of what happened such as screenshots, [query inspector](https://community.grafana.com/t/using-grafanas-query-inspector-to-troubleshoot-issues/2630) output and any environment related information that's applicable and/or maybe related to the reported problem:
- Grafana version
- Data source type & version
- Platform & OS Grafana is installed on
- User OS & Browser + versions
- Using docker + what environment
- Which plugins
- Configuration database in use (sqlite, mysql, postgres)
- Reverse proxy in front of Grafana, what version and configuration
- Non-default configuration settings
- Development environment like Go and Node versions, if applicable
- Grafana version:
- Data source type & version:
- OS Grafana is installed on:
- User OS & Browser:
- Grafana plugins:
- Others:
#### Enhancement requests
Should explain what enhancement or feature that the author wants to be added and why that is needed.
Enhancement requests (aka. feature requests) should be created as a [Github discussion](https://github.com/grafana/grafana/discussions). When submitting an enhancement request we ask that users focus on the problem they'd like to solve and why its a problem rather than focusing on the solution itself. To facilitate this we recommend using the following template:
- What would you like to be added?:
- Why is this needed (describe your use case and goals)\*\*?:
#### Accessibility issues
This is a mix between a bug report and enhancement request but focused on accessibility issues to help make Grafana improve keyboard navigation, screen-reader support and being accessible to everyone. The report should include relevant WCAG criteria, if applicable.
This is a mix between a bug report and enhancement request but focused on accessibility issues to help make Grafana improve keyboard navigation, screen-reader support and being accessible to everyone. The report should include relevant [WCAG criteria](https://www.w3.org/WAI/WCAG21/quickref/?versions=2.0), if applicable.
Grafana Labs is dedicated to improving our graphical user interfaces and overall experience so that our product becomes usable and accessible for people with disabilities as well as anyone else. Learn more about Grafana's commitment to [A11y](https://grafana.com/accessibility/) (accessibility).
#### Support requests
In general, if the issue description and title is perceived as a question no more information is needed.
In general, if the issue description and title is perceived as a question no more information is needed. See how to categorize these requests [here](#support-requests-1).
### Good practices
@@ -122,7 +132,7 @@ To make it easier for everyone to understand and find issues they're searching f
### Do you have all the information needed to categorize an issue?
Depending on the issue, you might not feel all this information is needed. Use your best judgement. If you cannot triage an issue using what its author provided, explain kindly to the author that they must provide the above information to clarify the problem. Label issue with `needs more detail` and add any related `area/*` or `datasource/*` labels.
Depending on the issue, you might not feel all this information is needed. Use your best judgement. If you cannot triage an issue using what its author provided, explain kindly to the author that they must provide the above information to clarify the problem. Label issue with `needs more info` and add any related `area/*` or `datasource/*` labels. Alternatively, use `bot/needs more info` label and the Grafana bot will request it for you.
If the author provides the standard information but you are still unable to triage the issue, request additional information. Do this kindly and politely because you are asking for more of the author's time.
@@ -158,7 +168,7 @@ Make sure it's not a duplicate by searching existing issues using related terms
1. Add a comment `/duplicate of #<issue number>`. GitHub will recognize this and add some additional context to the issue activity.
2. The Grafana bot will do the rest, adding the correct label and closing comment
3. Optionally add any related `area/*` or `datasource/*` labels.
3. Add `type/duplicate` label. Optionally add any related `area/*` or `datasource/*` labels.
### Bug reports
@@ -183,8 +193,8 @@ If it's not perfectly clear that it's an actual bug, quickly try to reproduce it
### Enhancement/feature?
1. Label the issue `type/feature-request` and at least one `area/*` or `datasource/*` label.
2. Move on to [prioritizing the issue](#4-prioritization-of-issues).
1. Remind the contributor that enhancement/feature request should be created as a GitHub discussion. See [Enhancements requests.](https://github.com/grafana/grafana/blob/main/ISSUE_TRIAGE.md#enhancement-requests)
2. Label the issue `type/feature-request` and at least one `area/*` or `datasource/*` label.
### Documentation issue?
@@ -215,7 +225,7 @@ There's a minor typo/error/lack of information that adds a lot of confusion for
### Support requests
1. Kindly and politely direct the issue author to the [community site](https://community.grafana.com/) and explain that GitHub is mainly used for tracking bugs and feature requests. If possible, it's usually a good idea to add some pointers to the issue author's question.
2. Close the issue and label it with `type/question`.
2. Label the issue with `bot/question`. The Grafana bot will automatically close the issue, and it will add the type/question label for you.
## 4. Prioritization of issues
@@ -296,7 +306,7 @@ In many cases the issue author or community as a whole is more suitable to contr
## Investigation of issues
When an issue has all basic information provided, but the triage responsible haven't been able to reproduce the reported problem at a first glance, the issue is labeled [Needs investigation](https://github.com/grafana/grafana/labels/needs%20investigation). Depending on the perceived severity and/or number of [upvotes](https://github.blog/2016-03-10-add-reactions-to-pull-requests-issues-and-comments), the investigation will either be delegated to another maintainer for further investigation or put on hold until someone else (maintainer or contributor) picks it up and eventually starts investigating it.
When an issue has all basic information provided, but the triage responsible haven't been able to reproduce the reported problem at a first glance, the issue is labeled [`triage/needs-confirmation`](https://github.com/grafana/grafana/labels/triage%2Fneeds-confirmation). Depending on the perceived severity and/or number of [upvotes](https://github.blog/2016-03-10-add-reactions-to-pull-requests-issues-and-comments), the investigation will either be delegated to another maintainer for further investigation or put on hold until someone else (maintainer or contributor) picks it up and eventually starts investigating it.
Investigating issues can be a very time consuming task, especially for the maintainers, given the huge number of combinations of plugins, data sources, platforms, databases, browsers, tools, hardware, integrations, versions and cloud services, etc that are being used with Grafana. There is a certain number of combinations that are more common than others, and these are in general easier for maintainers to investigate.
@@ -308,19 +318,16 @@ Even if you don't have the time or knowledge to investigate an issue we highly r
We have some automation that triggers on comments or labels being added to issues. Many of these automated behaviors are defined in [commands.json](https://github.com/grafana/grafana/blob/main/.github/commands.json). Or in other [GitHub Actions](https://github.com/grafana/grafana/tree/main/.github/workflows)
- Add /duplicate `#<issue number>` to have Grafana label & close issue with an appropriate message.
- Add `bot/question` and the bot will close it with an appropriate message.
[Read more on bot actions](https://github.com/grafana/grafana/blob/main/.github/bot.md)
## External PRs
Part of issue triage should also be triaging of external PRs. Main goal should be to make sure PRs from external contributors have an owner/reviewer and are not forgotten.
1. Check new external PRs which do not have a reviewer.
1. Check if there is a link to an existing issue.
1. If not and you know which issue it is solving, add the link yourself, otherwise ask the author to link the issue or create one.
1. Assign a reviewer based on who was handling the linked issue or what code or feature does the PR touches (look at who was the last to make changes there if all else fails).
1. Check new external PRs which do not have a reviewer. You can easily search for pull requests made by external contributors by using the label: `pr/external` in your [query search](https://github.com/grafana/grafana/pulls?q=is%3Aopen+is%3Apr+label%3Apr%2Fexternal) Note: external PRs are automatically labeled with `pr/external` upon creation.
2. Check if there is a link to an existing issue. The link to a existing issue should be in the description section, underneath “Which issue(s) does this PR fix?:”.
3. If not and you know which issue it is solving, add the link yourself, otherwise ask the author to link the issue or create one.
4. Assign a reviewer based on who was handling the linked issue or what code or feature does the PR touches (look at who was the last to make changes there if all else fails).
## Appendix

View File

@@ -15,12 +15,14 @@ packages/grafana-e2e-selectors/
packages/grafana-runtime/
packages/grafana-toolkit/
packages/grafana-ui/
packages/jaeger-ui-components/
packaging/
pkg/coremodel/
pkg/framework/coremodel/
kinds/
pkg/kinds/
pkg/kindsys/
pkg/registry/corekind/
grafana-mixin/
cue/
public/app/plugins/datasource/tempo
public/app/features/explore/TraceView/components
public/img/icons/solid/
public/img/icons/unicons/
```

View File

@@ -7,12 +7,13 @@ WIRE_TAGS = "oss"
-include local/Makefile
include .bingo/Variables.mk
.PHONY: all deps-go deps-js deps build-go build-server build-cli build-js build build-docker-full build-docker-full-ubuntu lint-go golangci-lint test-go test-js gen-ts test run run-frontend clean devenv devenv-down protobuf drone help gen-go gen-cue
.PHONY: all deps-go deps-js deps build-go build-backend build-server build-cli build-js build build-docker-full build-docker-full-ubuntu lint-go golangci-lint test-go test-js gen-ts test run run-frontend clean devenv devenv-down protobuf drone help gen-go gen-cue fix-cue
GO = go
GO_FILES ?= ./pkg/...
SH_FILES ?= $(shell find ./scripts -name *.sh)
GO_BUILD_FLAGS += $(if $(GO_BUILD_DEV),-dev)
GO_BUILD_FLAGS += $(if $(GO_BUILD_DEV),-dev)
GO_BUILD_FLAGS += $(if $(GO_BUILD_TAGS),-build-tags=$(GO_BUILD_TAGS))
all: deps build
@@ -46,7 +47,8 @@ $(SPEC_TARGET): $(SWAGGER) ## Generate API Swagger specification
SWAGGER_GENERATE_EXTENSION=false $(SWAGGER) generate spec -m -w pkg/server -o $(SPEC_TARGET) \
-x "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" \
-x "github.com/prometheus/alertmanager" \
-i pkg/api/swagger_tags.json
-i pkg/api/swagger_tags.json \
--exclude-tag=alpha
swagger-api-spec: gen-go $(SPEC_TARGET) $(MERGED_SPEC_TARGET) validate-api-spec
@@ -65,17 +67,31 @@ openapi3-gen: swagger-api-spec ## Generates OpenApi 3 specs from the Swagger 2 a
##@ Building
gen-cue: ## Do all CUE/Thema code generation
@echo "generate code from .cue files"
go generate ./pkg/framework/coremodel
go generate ./public/app/plugins
go generate ./pkg/plugins/plugindef
go generate ./kinds/gen.go
go generate ./public/app/plugins/gen.go
go generate ./pkg/kindsys/report.go
gen-go: $(WIRE) gen-cue
@echo "generate go files"
$(WIRE) gen -tags $(WIRE_TAGS) ./pkg/server ./pkg/cmd/grafana-cli/runner
fix-cue: $(CUE)
@echo "formatting cue files"
$(CUE) fix kinds/**/*.cue
$(CUE) fix public/app/plugins/**/**/*.cue
gen-jsonnet:
go generate ./devenv/jsonnet
build-go: $(MERGED_SPEC_TARGET) gen-go ## Build all Go binaries.
@echo "build go files"
$(GO) run build.go $(GO_BUILD_FLAGS) build
build-backend: ## Build Grafana backend.
@echo "build backend"
$(GO) run build.go $(GO_BUILD_FLAGS) build-backend
build-server: ## Build Grafana server.
@echo "build server"
$(GO) run build.go $(GO_BUILD_FLAGS) build-server
@@ -116,13 +132,13 @@ test-go-integration: ## Run integration tests for backend with flags.
test-go-integration-postgres: devenv-postgres ## Run integration tests for postgres backend with flags.
@echo "test backend integration postgres tests"
$(GO) clean -testcache
$(GO) list './pkg/...' | xargs -I {} sh -c 'GRAFANA_TEST_DB=postgres go test -run Integration -covermode=atomic -timeout=30m {}'
$(GO) list './pkg/...' | xargs -I {} sh -c 'GRAFANA_TEST_DB=postgres go test -run Integration -covermode=atomic -timeout=2m {}'
.PHONY: test-go-integration-mysql
test-go-integration-mysql: devenv-mysql ## Run integration tests for mysql backend with flags.
@echo "test backend integration mysql tests"
$(GO) clean -testcache
$(GO) list './pkg/...' | xargs -I {} sh -c 'GRAFANA_TEST_DB=mysql go test -run Integration -covermode=atomic -timeout=30m {}'
$(GO) list './pkg/...' | xargs -I {} sh -c 'GRAFANA_TEST_DB=mysql go test -run Integration -covermode=atomic -timeout=2m {}'
test-js: ## Run tests for frontend.
@echo "test frontend"
@@ -148,12 +164,17 @@ shellcheck: $(SH_FILES) ## Run checks for shell scripts.
build-docker-full: ## Build Docker image for development.
@echo "build docker container"
docker build --tag grafana/grafana:dev .
DOCKER_BUILDKIT=1 \
docker build \
--tag grafana/grafana:dev .
build-docker-full-ubuntu: ## Build Docker image based on Ubuntu for development.
@echo "build docker container"
docker build --tag grafana/grafana:dev-ubuntu -f ./Dockerfile.ubuntu .
DOCKER_BUILDKIT=1 \
docker build \
--build-arg BASE_IMAGE=ubuntu:20.04 \
--build-arg GO_IMAGE=golang:1.19.4 \
--tag grafana/grafana:dev-ubuntu .
##@ Services
@@ -218,5 +239,12 @@ drone: $(DRONE)
$(DRONE) lint .drone.yml --trusted
$(DRONE) --server https://drone.grafana.net sign --save grafana/grafana
# Generate an Emacs tags table (https://www.gnu.org/software/emacs/manual/html_node/emacs/Tags-Tables.html) for Starlark files.
scripts/drone/TAGS: $(shell find scripts/drone -name '*.star')
etags --lang none --regex="/def \(\w+\)[^:]+:/\1/" --regex="/\s*\(\w+\) =/\1/" $^ -o $@
format-drone:
buildifier -r scripts/drone
help: ## Display this help.
@awk 'BEGIN {FS = ":.*##"; printf "\nUsage:\n make \033[36m<target>\033[0m\n"} /^[a-zA-Z_-]+:.*?##/ { printf " \033[36m%-15s\033[0m %s\n", $$1, $$2 } /^##@/ { printf "\n\033[1m%s\033[0m\n", substr($$0, 5) } ' $(MAKEFILE_LIST)

View File

@@ -1,33 +0,0 @@
# Plugin development
This document is not meant as a complete guide for developing plugins but more as a changelog for changes in
Grafana that can impact plugin development. Whenever you as a plugin author encounter an issue with your plugin after
upgrading Grafana please check here before creating an issue.
## Plugin development resources
- [Grafana plugin developer guide](https://grafana.com/docs/grafana/latest/developers/plugins/)
- [Webpack Grafana plugin template project](https://github.com/CorpGlory/grafana-plugin-template-webpack)
- [Simple JSON datasource plugin](https://github.com/grafana/simple-json-datasource)
## Changes in Grafana v4.6
This version of Grafana has big changes that will impact a limited set of plugins. We moved from systemjs to webpack
for built-in plugins and everything internal. External plugins still use systemjs but now with a limited
set of Grafana components they can import. Plugins can depend on libs like lodash & moment and internal components
like before using the same import paths. However since everything in Grafana is no longer accessible, a few plugins could encounter issues when importing a Grafana dependency.
[List of exposed components plugins can import/require](https://github.com/grafana/grafana/blob/main/public/app/features/plugins/plugin_loader.ts#L48)
If you think we missed exposing a crucial lib or Grafana component let us know by opening an issue.
### Deprecated components
The angular directive `<spectrum-picker>` is now deprecated (will still work for a version more) but we recommend plugin authors
upgrade to new `<color-picker color="ctrl.color" onChange="ctrl.onSparklineColorChange"></color-picker>`
## Changes in Grafana v6.0
### DashboardSrv.ts
If you utilize [DashboardSrv](https://github.com/grafana/grafana/commit/8574dca081002f36e482b572517d8f05fd44453f#diff-1ab99561f9f6a10e1fafcddc39bc1d65) in your plugin code, `dash` was renamed to `dashboard`.

View File

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

View File

@@ -14,7 +14,6 @@ Grafana Labs will send you a response indicating the next steps in handling your
## Security announcements
We maintain a category on the community site called [Security Announcements](https://community.grafana.com/c/support/security-announcements),
where we will post a summary, remediation, and mitigation details for any patch containing security fixes.
We will post a summary, remediation, and mitigation details for any patch containing security fixes on the Grafana blog. The security announcement blog posts will be tagged with the [security tag](https://grafana.com/tags/security/).
You can also subscribe to email updates to this category if you have a grafana.com account and sign on to the community site or track updates via an [RSS feed](https://community.grafana.com/c/support/security-announcements.rss).
You can also track security announcements via the [RSS feed](https://grafana.com/tags/security/index.xml).

View File

@@ -66,6 +66,15 @@ enable_gzip = false
cert_file =
cert_key =
# Unix socket gid
# Changing the gid of a file without privileges requires that the target group is in the group of the process and that the process is the file owner
# It is recommended to set the gid as http server user gid
# Not set when the value is -1
socket_gid = -1
# Unix socket mode
socket_mode = 0660
# Unix socket path
socket = /tmp/grafana.sock
@@ -76,6 +85,11 @@ cdn_url =
# `0` means there is no timeout for reading the request.
read_timeout = 0
# This setting enables you to specify additional headers that the server adds to HTTP(S) responses.
[server.custom_response_headers]
#exampleHeader1 = exampleValue1
#exampleHeader2 = exampleValue2
#################################### Database ############################
[database]
# You can configure the database connection by specifying type, host, name, user and password
@@ -125,9 +139,18 @@ path = grafana.db
# For "sqlite3" only. cache mode setting used for connecting to the database
cache_mode = private
# For "sqlite3" only. Enable/disable Write-Ahead Logging, https://sqlite.org/wal.html. Default is false.
wal = false
# For "mysql" only if migrationLocking feature toggle is set. How many seconds to wait before failing to lock the database for the migrations, default is 0.
locking_attempt_timeout_sec = 0
# For "sqlite" only. How many times to retry query in case of database is locked failures. Default is 0 (disabled).
query_retries = 0
# For "sqlite" only. How many times to retry transaction in case of database is locked failures. Default is 5.
transaction_retries = 5
#################################### Cache server #############################
[remote_cache]
# Either "redis", "memcached" or "database" default is "database"
@@ -139,6 +162,12 @@ type = database
# memcache: 127.0.0.1:11211
connstr =
# prefix prepended to all the keys in the remote cache
prefix =
# This enables encryption of values stored in the remote cache
encryption =
#################################### Data proxy ###########################
[dataproxy]
@@ -210,10 +239,13 @@ check_for_updates = true
check_for_plugin_updates = true
# Google Analytics universal tracking code, only enabled if you specify an id here
google_analytics_ua_id =
google_analytics_ua_id =
# Google Analytics 4 tracking code, only enabled if you specify an id here
google_analytics_4_id =
google_analytics_4_id =
# When Google Analytics 4 Enhanced event measurement is enabled, we will try to avoid sending duplicate events and let Google Analytics 4 detect navigation changes, etc.
google_analytics_4_send_manual_page_views = false
# Google Tag Manager ID, only enabled if you specify an id here
google_tag_manager_id =
@@ -311,6 +343,15 @@ content_security_policy = false
# $ROOT_PATH is server.root_url without the protocol.
content_security_policy_template = """script-src 'self' 'unsafe-eval' 'unsafe-inline' 'strict-dynamic' $NONCE;object-src 'none';font-src 'self';style-src 'self' 'unsafe-inline' blob:;img-src * data:;base-uri 'self';connect-src 'self' grafana.com ws://$ROOT_PATH wss://$ROOT_PATH;manifest-src 'self';media-src 'none';form-action 'self';"""
# Enable adding the Content-Security-Policy-Report-Only header to your requests.
# Allows you to monitor the effects of a policy without enforcing it.
content_security_policy_report_only = false
# Set Content Security Policy Report Only template used when adding the Content-Security-Policy-Report-Only header to your requests.
# $NONCE in the template includes a random nonce.
# $ROOT_PATH is server.root_url without the protocol.
content_security_policy_report_only_template = """script-src 'self' 'unsafe-eval' 'unsafe-inline' 'strict-dynamic' $NONCE;object-src 'none';font-src 'self';style-src 'self' 'unsafe-inline' blob:;img-src * data:;base-uri 'self';connect-src 'self' grafana.com ws://$ROOT_PATH wss://$ROOT_PATH;manifest-src 'self';media-src 'none';form-action 'self';"""
# Controls if old angular plugins are supported or not. This will be disabled by default in future release
angular_support_enabled = true
@@ -325,6 +366,9 @@ data_keys_cache_cleanup_interval = 1m
#################################### Snapshots ###########################
[snapshots]
# set to false to remove snapshot functionality
enabled = true
# snapshot sharing options
external_enabled = true
external_snapshot_url = https://snapshots.raintank.io
@@ -379,11 +423,11 @@ verify_email_enabled = false
login_hint = email or username
password_hint = password
# Default UI theme ("dark" or "light")
# Default UI theme ("dark" or "light" or "system")
default_theme = dark
# Default locale (supported IETF language tag, such as en-US)
default_locale = en-US
# Default UI language (supported IETF language tag, such as en-US)
default_language = en-US
# Path to a custom home page. Users are only redirected to this if the default home dashboard is used. It should match a frontend route and contain a leading slash.
home_page =
@@ -405,10 +449,17 @@ user_invite_max_lifetime_duration = 24h
# Enter a comma-separated list of usernames to hide them in the Grafana UI. These users are shown to Grafana admins and to themselves.
hidden_users =
[service_accounts]
# When set, Grafana will not allow the creation of tokens with expiry greater than this setting.
token_expiration_day_limit =
[auth]
# Login cookie name
login_cookie_name = grafana_session
# Disable usage of Grafana build-in login solution.
disable_login = false
# The maximum lifetime (duration) an authenticated user can be inactive before being required to login at next visit. Default is 7 days (7d). This setting should be expressed as a duration, e.g. 5m (minutes), 6h (hours), 10d (days), 2w (weeks), 1M (month). The lifetime resets at each successful token rotation (token_rotation_interval_minutes).
login_maximum_inactive_lifetime_duration =
@@ -429,6 +480,7 @@ signout_redirect_url =
# Set to true to attempt login with OAuth automatically, skipping the login screen.
# This setting is ignored if multiple OAuth providers are configured.
# Deprecated, use auto_login option for specific provider instead.
oauth_auto_login = false
# OAuth state max age cookie duration in seconds. Defaults to 600 seconds.
@@ -467,6 +519,7 @@ hide_version = false
[auth.github]
enabled = false
allow_sign_up = true
auto_login = false
client_id = some_id
client_secret =
scopes = user:email,read:org
@@ -484,6 +537,7 @@ allow_assign_grafana_admin = false
[auth.gitlab]
enabled = false
allow_sign_up = true
auto_login = false
client_id = some_id
client_secret =
scopes = api
@@ -495,11 +549,13 @@ allowed_groups =
role_attribute_path =
role_attribute_strict = false
allow_assign_grafana_admin = false
skip_org_role_sync = false
#################################### Google Auth #########################
[auth.google]
enabled = false
allow_sign_up = true
auto_login = false
client_id = some_client_id
client_secret =
scopes = https://www.googleapis.com/auth/userinfo.profile https://www.googleapis.com/auth/userinfo.email
@@ -508,6 +564,7 @@ token_url = https://accounts.google.com/o/oauth2/token
api_url = https://www.googleapis.com/oauth2/v1/userinfo
allowed_domains =
hosted_domain =
skip_org_role_sync = false
#################################### Grafana.com Auth ####################
# legacy key names (so they work in env variables)
@@ -522,16 +579,19 @@ allowed_organizations =
[auth.grafana_com]
enabled = false
allow_sign_up = true
auto_login = false
client_id = some_id
client_secret =
scopes = user:email
allowed_organizations =
skip_org_role_sync = false
#################################### Azure AD OAuth #######################
[auth.azuread]
name = Azure AD
enabled = false
allow_sign_up = true
auto_login = false
client_id = some_client_id
client_secret =
scopes = openid email profile
@@ -541,6 +601,7 @@ allowed_domains =
allowed_groups =
role_attribute_strict = false
allow_assign_grafana_admin = false
force_use_graph_api = false
#################################### Okta OAuth #######################
[auth.okta]
@@ -548,6 +609,7 @@ name = Okta
icon = okta
enabled = false
allow_sign_up = true
auto_login = false
client_id = some_id
client_secret =
scopes = openid profile email groups
@@ -559,6 +621,7 @@ allowed_groups =
role_attribute_path =
role_attribute_strict = false
allow_assign_grafana_admin = false
skip_org_role_sync = false
#################################### Generic OAuth #######################
[auth.generic_oauth]
@@ -566,6 +629,7 @@ name = OAuth
icon = signin
enabled = false
allow_sign_up = true
auto_login = false
client_id = some_id
client_secret =
scopes = user:email
@@ -620,18 +684,21 @@ username_claim =
jwk_set_url =
jwk_set_file =
cache_ttl = 60m
expected_claims = {}
expect_claims = {}
key_file =
role_attribute_path =
role_attribute_strict = false
auto_sign_up = false
url_login = false
allow_assign_grafana_admin = false
skip_org_role_sync = false
#################################### Auth LDAP ###########################
[auth.ldap]
enabled = false
config_file = /etc/grafana/ldap.toml
allow_sign_up = true
skip_org_role_sync = false
# LDAP background sync (Enterprise only)
# At 1 am every day
@@ -672,6 +739,10 @@ managed_identity_client_id =
# If enabled, cache permissions in a in memory cache
permission_cache = true
# Reset basic roles permissions on boot
# Warning left to true, basic roles permissions will be reset on every boot
reset_basic_roles = false
#################################### SMTP / Emailing #####################
[smtp]
enabled = false
@@ -887,6 +958,12 @@ min_interval = 10s
# For more information on configuration options, refer to [rendering].
capture = false
# The timeout for capturing screenshots. If a screenshot cannot be captured within the timeout then
# the notification is sent without a screenshot. The maximum duration is 30 seconds. This timeout
# should be less than the minimum Interval of all Evaluation Groups to avoid back pressure on alert
# rule evaluation.
capture_timeout = 10s
# The maximum number of screenshots that can be taken at the same time. This option is different from
# concurrent_render_request_limit as max_concurrent_screenshots sets the number of concurrent screenshots
# that can be taken at the same time for all firing alerts where as concurrent_render_request_limit sets
@@ -903,6 +980,10 @@ upload_external_image_storage = false
# For example: `disabled_labels=grafana_folder`
disabled_labels =
[unified_alerting.state_history]
# Enable the state history functionality in Unified Alerting. The previous states of alert rules will be visible in panels and in the UI.
enabled = true
#################################### Alerting ############################
[alerting]
# Enable the legacy alerting sub-system and interface. If Unified Alerting is already enabled and you try to go back to legacy alerting, all data that is part of Unified Alerting will be deleted. When this configuration section and flag are not defined, the state is defined at runtime. See the documentation for more details.
@@ -1020,6 +1101,7 @@ url = https://grafana.com
[grafana_com]
url = https://grafana.com
api_url = https://grafana.com/api
#################################### Distributed tracing ############
# Opentracing is deprecated use opentelemetry instead
@@ -1097,6 +1179,7 @@ signed_url_expiration =
account_name =
account_key =
container_name =
sas_token_expiration_days =
[external_image_storage.local]
# does not require any configuration
@@ -1112,6 +1195,11 @@ renderer_token = -
# Concurrent render request limit affects when the /render HTTP endpoint is used. Rendering many images at the same time can overload the server,
# which this setting can help protect against by only allowing a certain amount of concurrent requests.
concurrent_render_request_limit = 30
# Determines the lifetime of the render key used by the image renderer to access and render Grafana.
# This setting should be expressed as a duration. Examples: 10s (seconds), 5m (minutes), 2h (hours).
# Default is 5m. This should be more than enough for most deployments.
# Change the value only if image rendering is failing and you see `Failed to get the render key from cache` in Grafana logs.
render_key_lifetime = 5m
[panels]
# here for to support old env variables, can remove after a few months
@@ -1226,20 +1314,10 @@ license_path =
# enable = feature1,feature2
enable =
# The new prometheus visual query builder
promQueryBuilder = true
# The new loki visual query builder
lokiQueryBuilder = true
# Experimental Explore to Dashboard workflow
explore2Dashboard = true
# Command Palette
commandPalette = true
# Use dynamic labels in CloudWatch datasource
cloudWatchDynamicLabels = true
# Some features are enabled by default, see:
# https://grafana.com/docs/grafana/next/setup-grafana/configure-grafana/feature-toggles/
# To enable features by default, set `Expression: "true"` in:
# https://github.com/grafana/grafana/blob/main/pkg/services/featuremgmt/registry.go
# feature1 = true
# feature2 = false
@@ -1316,3 +1394,24 @@ full_reindex_interval = 5m
# Defines the frequency of partial index updates based on recent changes such as dashboard updates.
# This is a temporary settings that might be removed in the future.
index_update_interval = 10s
# Move an app plugin referenced by its id (including all its pages) to a specific navigation section
# Dependencies: needs the `topnav` feature to be enabled
# Format: <Plugin ID> = <Section ID> <Sort Weight>
[navigation.app_sections]
# Move a specific app plugin page (referenced by its `path` field) to a specific navigation section
# Format: <Page URL> = <Section ID> <Sort Weight>
[navigation.app_standalone_pages]
#################################### Secure Socks5 Datasource Proxy #####################################
[secure_socks_datasource_proxy]
enabled = false
root_ca_cert =
client_key =
client_cert =
server_name =
# The address of the socks5 proxy datasources should connect to
proxy_address =

View File

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

View File

@@ -11,7 +11,7 @@ apiVersion: 1
# folder: my_first_folder
# # <duration, required> interval of the rule group evaluation
# interval: 60s
# # <list, required> list of rules that are part of the rule group
# # <list, required> list of rules that are part of the rule group
# rules:
# # <string, required> unique identifier for the rule
# - uid: my_id_1
@@ -23,7 +23,7 @@ apiVersion: 1
# # evaluation - should be obtained via the API
# data:
# - refId: A
# datasourceUid: "-100"
# datasourceUid: "__expr__"
# model:
# conditions:
# - evaluator:
@@ -40,7 +40,7 @@ apiVersion: 1
# type: query
# datasource:
# type: __expr__
# uid: "-100"
# uid: "__expr__"
# expression: 1==0
# intervalMs: 1000
# maxDataPoints: 43200
@@ -53,18 +53,20 @@ apiVersion: 1
# # <string> state of the alert rule when no data is returned
# # possible values: "NoData", "Alerting", "OK", default = NoData
# noDataState: Alerting
# # <string> state of the alert rule when the query execution
# # <string> state of the alert rule when the query execution
# # fails - possible values: "Error", "Alerting", "OK"
# # default = Alerting
# executionErrorState: Alerting
# # <duration, required> how long the alert condition should be breached before Firing. Before this time has elapsed, the alert is considered to be Pending
# for: 60s
# # <map<string, string>> map of strings to attach arbitrary custom data
# annotations:
# some_key: some_value
# # <map<string, string> map of strings to filter and
# # <map<string, string> map of strings to filter and
# # route alerts
# labels:
# team: sre_team_1
# isPaused: false
# # List of alert rule UIDs that should be deleted
# deleteRules:
@@ -102,7 +104,7 @@ apiVersion: 1
# # <list<string>> The labels by which incoming alerts are grouped together. For example,
# # multiple alerts coming in for cluster=A and alertname=LatencyHigh would
# # be batched into a single group.
# #
# #
# # To aggregate by all possible labels, use the special value '...' as
# # the sole label name, for example:
# # group_by: ['...']
@@ -126,18 +128,18 @@ apiVersion: 1
# mute_time_intervals:
# - abc
# # <duration> How long to initially wait to send a notification for a group
# # of alerts. Allows to collect more initial alerts for the same group.
# # of alerts. Allows to collect more initial alerts for the same group.
# # (Usually ~0s to few minutes), default = 30s
# group_wait: 30s
# # <duration> How long to wait before sending a notification about new alerts that
# # are added to a group of alerts for which an initial notification has
# # already been sent. (Usually ~5m or more), default = 5m
# group_internval: 5m
# group_interval: 5m
# # <duration> How long to wait before sending a notification again if it has already
# # been sent successfully for an alert. (Usually ~3h or more), default = 4h
# repeat_interval: 4h
# # <list> Zero or more child routes
# routes:
# routes:
# ...
# # List of orgIds that should be reset to the default policy

View File

@@ -67,6 +67,15 @@
;cert_file =
;cert_key =
# Unix socket gid
# Changing the gid of a file without privileges requires that the target group is in the group of the process and that the process is the file owner
# It is recommended to set the gid as http server user gid
# Not set when the value is -1
;socket_gid =
# Unix socket mode
;socket_mode =
# Unix socket path
;socket =
@@ -77,6 +86,11 @@
# `0` means there is no timeout for reading the request.
;read_timeout = 0
# This setting enables you to specify additional headers that the server adds to HTTP(S) responses.
[server.custom_response_headers]
#exampleHeader1 = exampleValue1
#exampleHeader2 = exampleValue2
#################################### Database ####################################
[database]
# You can configure the database connection by specifying type, host, name, user and password
@@ -94,7 +108,8 @@
# Example: mysql://user:secret@host:port/database
;url =
# For "postgres" only, either "disable", "require" or "verify-full"
# For "postgres", use either "disable", "require" or "verify-full"
# For "mysql", use either "true", "false", or "skip-verify".
;ssl_mode = disable
# Database drivers may support different transaction isolation levels.
@@ -126,9 +141,18 @@
# For "sqlite3" only. cache mode setting used for connecting to the database. (private, shared)
;cache_mode = private
# For "sqlite3" only. Enable/disable Write-Ahead Logging, https://sqlite.org/wal.html. Default is false.
;wal = false
# For "mysql" only if migrationLocking feature toggle is set. How many seconds to wait before failing to lock the database for the migrations, default is 0.
;locking_attempt_timeout_sec = 0
# For "sqlite" only. How many times to retry query in case of database is locked failures. Default is 0 (disabled).
;query_retries = 0
# For "sqlite" only. How many times to retry transaction in case of database is locked failures. Default is 5.
;transaction_retries = 5
################################### Data sources #########################
[datasources]
# Upper limit of data sources that Grafana will return. This limit is a temporary configuration and it will be deprecated when pagination will be introduced on the list data sources API.
@@ -145,6 +169,12 @@
# memcache: 127.0.0.1:11211
;connstr =
# prefix prepended to all the keys in the remote cache
; prefix =
# This enables encryption of values stored in the remote cache
;encryption =
#################################### Data proxy ###########################
[dataproxy]
@@ -219,7 +249,10 @@
;google_analytics_ua_id =
# Google Analytics 4 tracking code, only enabled if you specify an id here
;google_analytics_4_id =
;google_analytics_4_id =
# When Google Analytics 4 Enhanced event measurement is enabled, we will try to avoid sending duplicate events and let Google Analytics 4 detect navigation changes, etc.
;google_analytics_4_send_manual_page_views = false
# Google Tag Manager ID, only enabled if you specify an id here
;google_tag_manager_id =
@@ -311,6 +344,14 @@
# $ROOT_PATH is server.root_url without the protocol.
;content_security_policy_template = """script-src 'self' 'unsafe-eval' 'unsafe-inline' 'strict-dynamic' $NONCE;object-src 'none';font-src 'self';style-src 'self' 'unsafe-inline' blob:;img-src * data:;base-uri 'self';connect-src 'self' grafana.com ws://$ROOT_PATH wss://$ROOT_PATH;manifest-src 'self';media-src 'none';form-action 'self';"""
# Enable adding the Content-Security-Policy-Report-Only header to your requests.
# Allows you to monitor the effects of a policy without enforcing it.
;content_security_policy_report_only = false
# Set Content Security Policy Report Only template used when adding the Content-Security-Policy-Report-Only header to your requests.
# $NONCE in the template includes a random nonce.
# $ROOT_PATH is server.root_url without the protocol.
;content_security_policy_report_only_template = """script-src 'self' 'unsafe-eval' 'unsafe-inline' 'strict-dynamic' $NONCE;object-src 'none';font-src 'self';style-src 'self' 'unsafe-inline' blob:;img-src * data:;base-uri 'self';connect-src 'self' grafana.com ws://$ROOT_PATH wss://$ROOT_PATH;manifest-src 'self';media-src 'none';form-action 'self';"""
# Controls if old angular plugins are supported or not. This will be disabled by default in future release
;angular_support_enabled = true
@@ -331,6 +372,9 @@
#################################### Snapshots ###########################
[snapshots]
# set to false to remove snapshot functionality
;enabled = true
# snapshot sharing options
;external_enabled = true
;external_snapshot_url = https://snapshots.raintank.io
@@ -382,8 +426,8 @@
# Default UI theme ("dark" or "light")
;default_theme = dark
# Default locale (supported IETF language tag, such as en-US)
;default_locale = en-US
# Default UI language (supported IETF language tag, such as en-US)
;default_language = en-US
# Path to a custom home page. Users are only redirected to this if the default home dashboard is used. It should match a frontend route and contain a leading slash.
;home_page =
@@ -405,10 +449,18 @@
# Enter a comma-separated list of users login to hide them in the Grafana UI. These users are shown to Grafana admins and themselves.
; hidden_users =
[service_accounts]
# Service account maximum expiration date in days.
# When set, Grafana will not allow the creation of tokens with expiry greater than this setting.
; token_expiration_day_limit =
[auth]
# Login cookie name
;login_cookie_name = grafana_session
# Disable usage of Grafana build-in login solution.
;disable_login = false
# The maximum lifetime (duration) an authenticated user can be inactive before being required to login at next visit. Default is 7 days (7d). This setting should be expressed as a duration, e.g. 5m (minutes), 6h (hours), 10d (days), 2w (weeks), 1M (month). The lifetime resets at each successful token rotation.
;login_maximum_inactive_lifetime_duration =
@@ -429,6 +481,7 @@
# Set to true to attempt login with OAuth automatically, skipping the login screen.
# This setting is ignored if multiple OAuth providers are configured.
# Deprecated, use auto_login option for specific provider instead.
;oauth_auto_login = false
# OAuth state max age cookie duration in seconds. Defaults to 600 seconds.
@@ -449,6 +502,9 @@
# Set to true to enable Azure authentication option for HTTP-based datasources.
;azure_auth_enabled = false
# Set to skip the organization role from JWT login and use system's role assignment instead.
; skip_org_role_sync = false
#################################### Anonymous Auth ######################
[auth.anonymous]
# enable anonymous access
@@ -467,6 +523,7 @@
[auth.github]
;enabled = false
;allow_sign_up = true
;auto_login = false
;client_id = some_id
;client_secret = some_secret
;scopes = user:email,read:org
@@ -484,6 +541,7 @@
[auth.gitlab]
;enabled = false
;allow_sign_up = true
;auto_login = false
;client_id = some_id
;client_secret = some_secret
;scopes = api
@@ -495,11 +553,13 @@
;role_attribute_path =
;role_attribute_strict = false
;allow_assign_grafana_admin = false
;skip_org_role_sync = false
#################################### Google Auth ##########################
[auth.google]
;enabled = false
;allow_sign_up = true
;auto_login = false
;client_id = some_client_id
;client_secret = some_client_secret
;scopes = https://www.googleapis.com/auth/userinfo.profile https://www.googleapis.com/auth/userinfo.email
@@ -508,21 +568,25 @@
;api_url = https://www.googleapis.com/oauth2/v1/userinfo
;allowed_domains =
;hosted_domain =
;skip_org_role_sync = false
#################################### Grafana.com Auth ####################
[auth.grafana_com]
;enabled = false
;allow_sign_up = true
;auto_login = false
;client_id = some_id
;client_secret = some_secret
;scopes = user:email
;allowed_organizations =
;skip_org_role_sync = false
#################################### Azure AD OAuth #######################
[auth.azuread]
;name = Azure AD
;enabled = false
;allow_sign_up = true
;auto_login = false
;client_id = some_client_id
;client_secret = some_client_secret
;scopes = openid email profile
@@ -532,12 +596,15 @@
;allowed_groups =
;role_attribute_strict = false
;allow_assign_grafana_admin = false
# prevent synchronizing users organization roles
;skip_org_role_sync = false
#################################### Okta OAuth #######################
[auth.okta]
;name = Okta
;enabled = false
;allow_sign_up = true
;auto_login = false
;client_id = some_id
;client_secret = some_secret
;scopes = openid profile email groups
@@ -549,12 +616,14 @@
;role_attribute_path =
;role_attribute_strict = false
;allow_assign_grafana_admin = false
;skip_org_role_sync = false
#################################### Generic OAuth ##########################
[auth.generic_oauth]
;enabled = false
;name = OAuth
;allow_sign_up = true
;auto_login = false
;client_id = some_id
;client_secret = some_secret
;scopes = user:email,read:org
@@ -610,7 +679,7 @@
;jwk_set_url = https://foo.bar/.well-known/jwks.json
;jwk_set_file = /path/to/jwks.json
;cache_ttl = 60m
;expected_claims = {"aud": ["foo", "bar"]}
;expect_claims = {"aud": ["foo", "bar"]}
;key_file = /path/to/key/file
;role_attribute_path =
;role_attribute_strict = false
@@ -623,6 +692,8 @@
;enabled = false
;config_file = /etc/grafana/ldap.toml
;allow_sign_up = true
# prevent synchronizing ldap users organization roles
;skip_org_role_sync = false
# LDAP background sync (Enterprise only)
# At 1 am every day
@@ -658,6 +729,11 @@
#################################### Role-based Access Control ###########
[rbac]
;permission_cache = true
# Reset basic roles permissions on boot
# Warning left to true, basic roles permissions will be reset on every boot
#reset_basic_roles = false
#################################### SMTP / Emailing ##########################
[smtp]
;enabled = false
@@ -989,6 +1065,7 @@
# Url used to import dashboards directly from Grafana.com
[grafana_com]
;url = https://grafana.com
;api_url = https://grafana.com/api
#################################### Distributed tracing ############
# Opentracing is deprecated use opentelemetry instead
@@ -1062,6 +1139,7 @@
;account_name =
;account_key =
;container_name =
;sas_token_expiration_days =
[external_image_storage.local]
# does not require any configuration
@@ -1077,6 +1155,11 @@
# Concurrent render request limit affects when the /render HTTP endpoint is used. Rendering many images at the same time can overload the server,
# which this setting can help protect against by only allowing a certain amount of concurrent requests.
;concurrent_render_request_limit = 30
# Determines the lifetime of the render key used by the image renderer to access and render Grafana.
# This setting should be expressed as a duration. Examples: 10s (seconds), 5m (minutes), 2h (hours).
# Default is 5m. This should be more than enough for most deployments.
# Change the value only if image rendering is failing and you see `Failed to get the render key from cache` in Grafana logs.
;render_key_lifetime = 5m
[panels]
# If set to true Grafana will allow script tags in text panels. Not recommended as it enable XSS vulnerabilities.
@@ -1228,3 +1311,24 @@
# Enable or disable loading other base map layers
;enable_custom_baselayers = true
# Move an app plugin referenced by its id (including all its pages) to a specific navigation section
# Dependencies: needs the `topnav` feature to be enabled
[navigation.app_sections]
# The following will move an app plugin with the id of `my-app-id` under the `starred` section
# my-app-id = admin
# Move a specific app plugin page (referenced by its `path` field) to a specific navigation section
[navigation.app_standalone_pages]
# The following will move the page with the path "/a/my-app-id/starred-content" from `my-app-id` to the `starred` section
# /a/my-app-id/starred-content = starred
#################################### Secure Socks5 Datasource Proxy #####################################
[secure_socks_datasource_proxy]
; enabled = false
; root_ca_cert =
; client_key =
; client_cert =
; server_name =
# The address of the socks5 proxy datasources should connect to
; proxy_address =

View File

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

View File

@@ -4,9 +4,9 @@ Are you looking to take on contributions with bigger impact? These guides help y
Learn more about the backend architecture:
- Part 1: [Services](backend/services.md)
- Part 2: [Communication](backend/communication.md)
- Part 3: [Database](backend/database.md)
- Part 1: [Services](../backend/services.md)
- Part 2: [Communication](../backend/communication.md)
- Part 3: [Database](../backend/database.md)
Learn more about the frontend architecture:

View File

@@ -1,81 +0,0 @@
# Errors
Grafana introduced its own error type `github.com/grafana/grafana/pkg/util/errutil.Error`
in June 2022. It's built on top of the Go `error` interface extended to
contain all the information necessary by Grafana to handle errors in an
informative and safe way.
Previously, Grafana has passed around regular Go errors and have had to
rely on bespoke solutions in API handlers to communicate informative
messages to the end-user. With the new `errutil.Error`, the API handlers
can be slimmed as information about public messaging, structured data
related to the error, localization metadata, log level, HTTP status
code, and so forth are carried by the error.
## Basic use
### Declaring errors
For a service, declare the different categories of errors that may occur
from your service (this corresponds to what you might want to have
specific public error messages or their templates for) by globally
constructing variables using the `errutil.NewBase(status, messageID, opts...)`
function.
The status code loosely corresponds to HTTP status codes and provides a
default log level for errors to ensure that the request logging is
properly informing administrators about various errors occurring in
Grafana (e.g. `StatusBadRequest` is generally speaking not as relevant
as `StatusInternal`). All available status codes live in the `errutil`
package and have names starting with `Status`.
The messageID is constructed as `<servicename>.<error-identifier>` where
the `<servicename>` corresponds to the root service directory per
[the package hierarchy](package-hierarchy.md) and `<error-identifier>`
is a short identifier using dashes for word separation that identifies
the specific category of errors within the service.
To set a static message sent to the client when the error occurs, the
`errutil.WithPublicMessage(message string)` option may be appended to
the NewBase function call. For dynamic messages or more options, refer
to the `errutil` package's GoDocs.
Errors are then constructed using the `Base.Errorf` method, which
functions like the [fmt.Errorf](https://pkg.go.dev/fmt#Errorf) method
except that it creates an `errutil.Error`.
```go
package main
import (
"errors"
"github.com/grafana/grafana/pkg/util/errutil"
"example.org/thing"
)
var ErrBaseNotFound = errutil.NewBase(errutil.StatusNotFound, "main.not-found", errutil.WithPublicMessage("Thing not found"))
func Look(id int) (*Thing, error) {
t, err := thing.GetByID(id)
if errors.Is(err, thing.ErrNotFound) {
return nil, ErrBaseNotFound.Errorf("did not find thing with ID %d: %w", id, err)
}
return t, nil
}
```
Check out [errutil's GoDocs](https://pkg.go.dev/github.com/grafana/grafana@v0.0.0-20220621133844-0f4fc1290421/pkg/util/errutil)
for details on how to construct and use Grafana style errors.
### Handling errors in the API
API handlers use the `github.com/grafana/grafana/pkg/api/response.Err`
function to create responses based on `errutil.Error`s.
> **Note:** (@sakjur 2022-06) `response.Err` requires all errors to be
> `errutil.Error` or it'll be considered an internal server error.
> This is something that should be fixed in the near future to allow
> fallback behavior to make it possible to correctly handle Grafana
> style errors if they're present but allow fallback to a reasonable
> default otherwise.

View File

@@ -0,0 +1,98 @@
# Backend
This document gives an overview of the directory structure, and ongoing refactorings.
For more information on developing for the backend:
- [Backend style guide](/contribute/backend/style-guide.md)
- [Architecture](/contribute/architecture)
## Central folders of Grafana's backend
| folder | description |
| --------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| /pkg/api | HTTP handlers and routing. Almost all handler funcs are global which is something we would like to improve in the future. Handlers should be associated with a struct that refers to all dependencies. |
| /pkg/cmd | The binaries that we build: grafana-server and grafana-cli. |
| /pkg/components | A mix of third-party packages and packages we have implemented ourselves. Includes our packages that have out-grown the util package and don't naturally belong somewhere else. |
| /pkg/infra | Packages in infra should be packages that are used in multiple places in Grafana without knowing anything about the Grafana domain. |
| /pkg/services | Packages in services are responsible for persisting domain objects and manage the relationship between domain objects. Services should communicate with each other using DI when possible. Most of Grafana's codebase still relies on global state for this. Any new features going forward should use DI. |
| /pkg/tsdb | All backend implementations of the data sources in Grafana. Used by both Grafana's frontend and alerting. |
| /pkg/util | Small helper functions that are used in multiple parts of the codebase. Many functions are placed directly in the util folders which is something we want to avoid. Its better to give the util function a more descriptive package name. Ex `errutil`. |
## Central components of Grafana's backend
| package | description |
| ---------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| /pkg/bus | The bus is described in more details under [Communication](/contribute/backend/communication.md) |
| /pkg/models | This is where we keep our domain model. This package should not depend on any package outside standard library. It does contain some references within Grafana but that is something we should avoid going forward. |
| /pkg/registry | Package for managing services. |
| /pkg/services/alerting | Grafana's alerting services. The alerting engine runs in a separate goroutine and shouldn't depend on anything else within Grafana. |
| /pkg/services/sqlstore | Currently where the database logic resides. |
| /pkg/setting | Anything related to Grafana global configuration should be dealt with in this package. |
## Dependency management
Refer to [UPGRADING_DEPENDENCIES.md](https://github.com/grafana/grafana/blob/main/UPGRADING_DEPENDENCIES.md).
## Ongoing refactoring
These issues are not something we want to address all at once but something we will improve incrementally. Since Grafana is released at a regular schedule the preferred approach is to do this in batches. Not only is it easier to review, but it also reduces the risk of conflicts when cherry-picking fixes from main to release branches. Please try to submit changes that span multiple locations at the end of the release cycle. We prefer to wait until the end because we make fewer patch releases at the end of the release cycle, so there are fewer opportunities for complications.
### Global state
Global state makes testing and debugging software harder and it's something we want to avoid when possible. Unfortunately, there is quite a lot of global state in Grafana.
We want to migrate away from this by using the `inject` package to wire up all dependencies either in `pkg/cmd/grafana-server/main.go` or self-registering using `registry.RegisterService` ex https://github.com/grafana/grafana/blob/main/pkg/services/cleanup/cleanup.go#L25.
### Limit the use of the init() function
Only use the init() function to register services/implementations.
### Settings refactoring
The plan is to move all settings to from package level vars in settings package to the [setting.Cfg](https://github.com/grafana/grafana/blob/df917663e6f358a076ed3daa9b199412e95c11f4/pkg/setting/setting.go#L210) struct. To access the settings, services and components can inject this setting.Cfg struct:
[Cfg struct](https://github.com/grafana/grafana/blob/df917663e6f358a076ed3daa9b199412e95c11f4/pkg/setting/setting.go#L210)
[Injection example](https://github.com/grafana/grafana/blob/df917663e6f358a076ed3daa9b199412e95c11f4/pkg/services/cleanup/cleanup.go#L20)
### Reduce the use of GoConvey
We want to migrate away from using GoConvey. Instead, we want to use stdlib testing, because it's the most common approach in the Go community and we think it will be easier for new contributors. Read more about how we want to write tests in the [style guide](/contribute/backend/style-guide.md).
### Refactor SqlStore
The `sqlstore` handlers all use a global xorm engine variable. Refactor them to use the `SqlStore` instance.
### Avoid global HTTP handler functions
Refactor HTTP handlers so that the handler methods are on the HttpServer instance or a more detailed handler struct. E.g (AuthHandler). This ensures they get access to HttpServer service dependencies (and Cfg object) and can avoid global state.
### Date comparison
Store newly introduced date columns in the database as epochs if they require date comparison. This permits a unified approach for comparing dates against all the supported databases instead of handling dates differently for each database. Also, by comparing epochs, we no longer need error pruning transformations to and from other time zones.
### Avoid use of the simplejson package
Use of the `simplejson` package (`pkg/components/simplejson`) in place of types (Go structs) results in code that is difficult to maintain. Instead, create types for objects and use the Go standard library's [`encoding/json`](https://golang.org/pkg/encoding/json/) package.
### Provisionable\*
All new features that require state should be possible to configure using config files. For example:
- [Data sources](https://github.com/grafana/grafana/tree/main/pkg/services/provisioning/datasources)
- [Alert notifiers](https://github.com/grafana/grafana/tree/main/pkg/services/provisioning/notifiers)
- [Dashboards](https://github.com/grafana/grafana/tree/main/pkg/services/provisioning/dashboards)
Today its only possible to provision data sources and dashboards but this is something we want to support all over Grafana.
### Use context.Context "everywhere"
The package [context](https://golang.org/pkg/context/) should be used and propagated through all the layers of the code. For example the `context.Context` of an incoming API request should be propagated to any other layers being used such as the bus, service and database layers. Utility functions/methods normally doesn't need `context.Context` To follow best practices, any function/method that receives a context.Context argument should receive it as its first argument.
To be able to solve certain problems and/or implement and support certain features making sure that `context.Context` is passed down through all layers of the code is vital. Being able to provide contextual information for the full life-cycle of an API request allows us to use contextual logging, provide contextual information about the authenticated user, create multiple spans for a distributed trace of service calls and database queries etc.
Code should use `context.TODO` when it's unclear which Context to use or it is not yet available (because the surrounding function has not yet been extended to accept a `context.Context` argument).
More details in [Services](/contribute/backend/services.md), [Communication](/contribute/backend/communication.md) and [Database](/contribute/backend/database.md).
[Original design doc](https://docs.google.com/document/d/1ebUhUVXU8FlShezsN-C64T0dOoo-DaC9_r-c8gB2XEU/edit#).

View File

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

View File

@@ -0,0 +1,103 @@
# Errors
Grafana introduced its own error type `github.com/grafana/grafana/pkg/util/errutil.Error`
in June 2022. It's built on top of the Go `error` interface extended to
contain all the information necessary by Grafana to handle errors in an
informative and safe way.
Previously, Grafana has passed around regular Go errors and have had to
rely on bespoke solutions in API handlers to communicate informative
messages to the end-user. With the new `errutil.Error`, the API handlers
can be slimmed as information about public messaging, structured data
related to the error, localization metadata, log level, HTTP status
code, and so forth are carried by the error.
## Basic use
### Declaring errors
For a service, declare the different categories of errors that may occur
from your service (this corresponds to what you might want to have
specific public error messages or their templates for) by globally
constructing variables using the `errutil.NewBase(status, messageID, opts...)`
function.
The status code loosely corresponds to HTTP status codes and provides a
default log level for errors to ensure that the request logging is
properly informing administrators about various errors occurring in
Grafana (e.g. `StatusBadRequest` is generally speaking not as relevant
as `StatusInternal`). All available status codes live in the `errutil`
package and have names starting with `Status`.
The messageID is constructed as `<servicename>.<errorIdentifier>` where
the `<servicename>` corresponds to the root service directory per
[the package hierarchy](package-hierarchy.md) and `<errorIdentifier>`
is a camelCased short identifier that identifies the specific category
of errors within the service.
Errors should be grouped together (i.e. share `errutil.Base`) based on
their public facing properties, a single messageID should represent a
translatable string and what metadata is carried with it.
_service.MissingRequiredFields_ and _service.MessageTooLong_ are likely
to be two different errors that are both validation failures, as their
user-friendly expansions are likely different. This is the maximization
rule of declaring as many `errutil.Error`s as you need public message
structures.
The other side of this is that even though a login service's
"user is ratelimited", "user does not exist", "wrong username", and
"wrong password" are reasonable errors to separate between internally,
for security reasons the end-user should not be told which particular
error they struck. This means that they should share the same base (such
as _login.Failed_). This is the minimization rule of grouping together
distinct logged errors that provide the same information via the API.
To set a static message sent to the client when the error occurs, the
`errutil.WithPublicMessage(message string)` option may be appended to
the NewBase function call. For dynamic messages or more options, refer
to the `errutil` package's GoDocs.
Errors are then constructed using the `Base.Errorf` method, which
functions like the [fmt.Errorf](https://pkg.go.dev/fmt#Errorf) method
except that it creates an `errutil.Error`.
```go
package main
import (
"errors"
"github.com/grafana/grafana/pkg/util/errutil"
"example.org/thing"
)
var ErrBaseNotFound = errutil.NewBase(errutil.StatusNotFound, "main.notFound", errutil.WithPublicMessage("Thing not found"))
func Look(id int) (*Thing, error) {
t, err := thing.GetByID(id)
if errors.Is(err, thing.ErrNotFound) {
return nil, ErrBaseNotFound.Errorf("did not find thing with ID %d: %w", id, err)
}
return t, nil
}
```
Errors consider themselves to be both its `errutil.Base` or
`errutil.Template` and whatever errors it wraps for the purposes of the
`errors.Is` function.
Check out the package and method documentation for
github.com/grafana/grafana/pkg/util/errutil for details on how to
construct and use Grafana style errors. This documentation is
unfortunately not readily available on pkg.go.dev because Grafana is not
fully Go modules compatible, but can be viewed using
[godoc](https://go.dev/cmd/godoc/) from the Grafana directory.
### Handling errors in the API
API handlers use the `github.com/grafana/grafana/pkg/api/response.Err`
or `github.com/grafana/grafana/pkg/api/response.ErrWithFallback`
(same signature as `response.Error`) function to create responses based
on `errutil.Error`.
Using `response.Err` requires all errors to be Grafana style errors.

View File

@@ -55,6 +55,8 @@ When to use which log level?
Use a contextual logger to include additional key/value pairs attached to `context.Context`, e.g. `traceID`, to allow correlating logs with traces and/or correlate logs with a common identifier.
You must [Enable tracing in Grafana](#2-enable-tracing-in-grafana) to get a traceID
Example:
```go
@@ -152,7 +154,7 @@ A distributed trace is data that tracks an application request as it flows throu
### Usage
Grafana currently supports two tracing implementations, [OpenTelemetry](https://opentelemetry.io/) and [OpenTracing](https://opentracing.io/). OpenTracing is deprecated, but still supported until we remove it. The two different implementations implements the `Tracer` and `Span` interfaces, defined in the _pkg/infra/tracing_ package, which you can use to create traces and spans. To get a hold of a `Tracer` you would need to get it injected as dependency into your service, see [Services](../../architecture/backend/services.md) for more details.
Grafana currently supports two tracing implementations, [OpenTelemetry](https://opentelemetry.io/) and [OpenTracing](https://opentracing.io/). OpenTracing is deprecated, but still supported until we remove it. The two different implementations implements the `Tracer` and `Span` interfaces, defined in the _pkg/infra/tracing_ package, which you can use to create traces and spans. To get a hold of a `Tracer` you would need to get it injected as dependency into your service, see [Services](services.md) for more details.
Example:
@@ -241,36 +243,38 @@ Be **careful** to not expose any sensitive information in span names, attribute
### How to collect, visualize and query traces (and correlate logs with traces) locally
1. Start Jaeger
#### 1. Start Jaeger
```bash
make devenv sources=jaeger
```
```bash
make devenv sources=jaeger
```
2. Enable tracing in Grafana
#### 2. Enable tracing in Grafana
opentelemetry tracing (recommended):
To enable tracing in Grafana, you must set the address in your config.ini file
```ini
[tracing.opentelemetry.jaeger]
address = http://localhost:14268/api/traces
```
opentelemetry tracing (recommended):
opentracing tracing (deprecated/not recommended):
```ini
[tracing.opentelemetry.jaeger]
address = http://localhost:14268/api/traces
```
```ini
[tracing.jaeger]
address = localhost:6831
```
opentracing tracing (deprecated/not recommended):
3. Search/browse collected logs and traces in Grafana Explore
```ini
[tracing.jaeger]
address = localhost:6831
```
You need provisioned gdev-jaeger and gdev-loki datasources, see [developer dashboard and data sources](https://github.com/grafana/grafana/tree/main/devenv#developer-dashboards-and-data-sources) for setup instructions.
#### 3. Search/browse collected logs and traces in Grafana Explore
Open Grafana explore and select gdev-loki datasource and use the query `{filename="/var/log/grafana/grafana.log"} | logfmt`.
You need provisioned gdev-jaeger and gdev-loki datasources, see [developer dashboard and data sources](https://github.com/grafana/grafana/tree/main/devenv#developer-dashboards-and-data-sources) for setup instructions.
You can then inspect any log message that includes a `traceID` and from there click on `gdev-jaeger` to split view and inspect the trace in question.
Open Grafana explore and select gdev-loki datasource and use the query `{filename="/var/log/grafana/grafana.log"} | logfmt`.
4. Search/browse collected traces in Jaeger UI
You can then inspect any log message that includes a `traceID` and from there click on `gdev-jaeger` to split view and inspect the trace in question.
You can open http://localhost:16686 to use the Jaeger UI for browsing and searching traces.
#### 4. Search/browse collected traces in Jaeger UI
You can open http://localhost:16686 to use the Jaeger UI for browsing and searching traces.

View File

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

View File

@@ -0,0 +1,211 @@
# Backend style guide
Grafana's backend has been developed for a long time with a mix of code styles. This guide explains how we want to write Go code in the future.
Unless stated otherwise, use the guidelines listed in the following articles:
- [Effective Go](https://golang.org/doc/effective_go.html)
- [Code Review Comments](https://github.com/golang/go/wiki/CodeReviewComments)
- [Go: Best Practices for Production Environments](http://peter.bourgon.org/go-in-production/#formatting-and-style)
## Linting and formatting
To ensure consistency across the Go codebase, we require all code to pass a number of linter checks.
We use the standard following linters:
- [gofmt](https://golang.org/cmd/gofmt/)
- [golint](https://github.com/golang/lint)
- [go vet](https://golang.org/cmd/vet/)
In addition to the standard linters, we also use:
- [revive](https://revive.run/) with a [custom config](https://github.com/grafana/grafana/blob/main/conf/revive.toml)
- [GolangCI-Lint](https://github.com/golangci/golangci-lint)
- [gosec](https://github.com/securego/gosec)
To run all linters, use the `lint-go` Makefile target:
```bash
make lint-go
```
## Testing
We value clean and readable code, that is loosely coupled and covered by unit tests. This makes it easier to collaborate and maintain the code.
Tests must use the standard library, `testing`. For assertions, prefer using [testify](https://github.com/stretchr/testify).
The majority of our tests uses [GoConvey](http://goconvey.co/) but that's something we want to avoid going forward.
In the `sqlstore` package we do database operations in tests and while some might say that's not suited for unit tests. We think they are fast enough and provide a lot of value.
### Integration Tests
We run unit and integration tests separately, to help keep our CI pipeline running smoothly and provide a better developer experience.
To properly mark a test as being an integration test, you must format your test function definition as follows, with the function name starting with `TestIntegration` and the check for `testing.Short()`:
```
func TestIntegrationFoo(t *testing.T) {
if testing.Short() {
t.Skip("skipping integration test")
}
// function body
}
```
If you do not follow this convention, your integration test may be run twice or not run at all.
### Assertions
Use respectively [`assert.*`](https://github.com/stretchr/testify#assert-package) functions to make assertions that
should _not_ halt the test ("soft checks") and [`require.*`](https://github.com/stretchr/testify#require-package)
functions to make assertions that _should_ halt the test ("hard checks"). Typically you want to use the latter type of
check to assert that errors have or have not happened, since continuing the test after such an assertion fails is
chaotic (the system under test will be in an undefined state) and you'll often have segfaults in practice.
### Sub-tests
Use [`t.Run`](https://golang.org/pkg/testing/#T.Run) to group sub-test cases, since it allows common setup and teardown
code, plus lets you run each test case in isolation when debugging. Don't use `t.Run` to e.g. group assertions.
### Cleanup
Use [`t.Cleanup`](https://golang.org/pkg/testing/#T.Cleanup) to clean up resources in tests. It's a less fragile choice than `defer`, since it's independent of which
function you call it in. It will always execute after the test is over in reverse call order (last `t.Cleanup` first, same as `defer`).
### Mock
Optionally, we use [`mock.Mock`](https://github.com/stretchr/testify#mock-package) package to generate mocks. This is
useful when you expect different behaviours of the same function.
#### Tips
- Use `Once()` or `Times(n)` to make this mock only works `n` times.
- Use `mockedClass.AssertExpectations(t)` to guarantee that the mock is called the times asked.
- If any mock set is not called or its expects more calls, the test fails.
- You can pass `mock.Anything` as argument if you don't care about the argument passed.
- Use `mockedClass.AssertNotCalled(t, "FunctionName")` to assert that this test is not called.
#### Example
This is an example to easily create a mock of an interface.
Given this interface:
```go
func MyInterface interface {
Get(ctx context.Context, id string) (Object, error)
}
```
Mock implementation should be like this:
```go
import
func MockImplementation struct {
mock.Mock
}
func (m *MockImplementation) Get(ctx context.Context, id string) error {
args := m.Called(ctx, id) // Pass all arguments in order here
return args.Get(0).(Object), args.Error(1)
}
```
And use it as the following way:
```go
objectToReturn := Object{Message: "abc"}
errToReturn := errors.New("my error")
myMock := &MockImplementation{}
defer myMock.AssertExpectations(t)
myMock.On("Get", mock.Anything, "id1").Return(objectToReturn, errToReturn).Once()
myMock.On("Get", mock.Anything, "id2").Return(Object{}, nil).Once()
anyService := NewService(myMock)
resp, err := anyService.Call("id1")
assert.Equal(t, resp.Message, objectToReturn.Message)
assert.Error(t, err, errToReturn)
resp, err = anyService.Call("id2")
assert.Nil(t, err)
```
#### Mockery
When an interface to test is too big, it's annoying to mock each function manually. To avoid this, you can
use [`mockery`](https://github.com/vektra/mockery) library to generate the mocks.
The command is like the following (there are more options documented if you need to use another one):
```
mockery --name InterfaceName --structname MockImplementationName --inpackage --filename my_implementation_mock.go
```
- `--name`: Interface to mock
- `--structname`: Mock implementation name
- `--inpackage`: To use the same package name as the interface
- `--filename`: Your mock generated file name
If any interface signature changes, executing the command again updates the mock.
Additionally, you can put `go:generate` command on the top of the file as a comment. It's useful because some IDEs
like Goland and Visual Studio Code allows executing scripts from the IDE.
```
package <package>
import (
...
)
//go:generate mockery --name InterfaceName --structname MockImplementationName --inpackage --filename my_implementation_mock.go
```
## Globals
As a general rule of thumb, avoid using global variables, since they make the code difficult to maintain and reason
about, and to write tests for. The Grafana codebase currently does use a lot of global variables, especially when
it comes to configuration, but that is a problem we're trying to solve.
## Pointers
In general, use value types and only reach for pointers when there's a real need. The reason being that pointers
increase the risk of bugs, since a pointer can be nil and dereferencing a nil pointer leads to a panic (AKA segfault).
Valid reasons to use a pointer include (but not necessarily limited to):
- You might need to pass a modifiable argument to a function
- Copying an object might incur a performance hit (benchmark to check your assumptions, copying is often faster than
allocating heap memory)
- You might _need_ `nil` to tell if a variable isn't set, although usually it's better to use the type's zero
value to tell instead
## Database
In database related code, we follow certain patterns.
### Foreign keys
While they can be useful, we don't generally use foreign key constraints in Grafana, for historical and
technical reasons. See this [comment](https://github.com/grafana/grafana/issues/3269#issuecomment-383328548) by Torkel
for context.
### Unique columns
If a column, or column combination, should be unique, add a corresponding uniqueness constraint through a migration.
## JSON
The simplejson package is used a lot throughout the backend codebase, but it's legacy, so if at all possible
avoid using it in new code. Use [json-iterator](https://github.com/json-iterator/go) instead, which is a more performant
drop-in alternative to the standard [encoding/json](https://golang.org/pkg/encoding/json/) package. While encoding/json
is a fine choice, profiling shows that json-iterator may be 3-4 times more efficient for encoding. We haven't profiled
its parsing performance yet, but according to json-iterator's own benchmarks, it appears even more superior in this
department.

View File

@@ -72,7 +72,7 @@ We make use of a tool called [**Betterer**](https://phenomnomnominal.github.io/b
## Backend-specific guidelines
Please refer to the [backend style guidelines](/contribute/style-guides/backend.md).
Please refer to the [backend style guidelines](/contribute/backend/style-guide.md).
## Code review

View File

@@ -18,7 +18,7 @@ We recommend using [Homebrew](https://brew.sh/) for installing any missing depen
```
brew install git
brew install go
brew install node@16
brew install node@18
npm install -g yarn
```
@@ -149,13 +149,13 @@ go test -covermode=atomic -tags=integration ./pkg/...
To run PostgreSQL and MySQL integration tests locally, you need to start the docker blocks for MySQL and/or PostgreSQL test data sources by running `make devenv sources=mysql_tests,postgres_tests`. When your test data sources are running, you can execute integration tests by running:
```bash
GRAFANA_TEST_DB=mysql go test -covermode=atomic -tags=integration ./pkg/...
make test-go-integration-mysql
```
and/or
```bash
GRAFANA_TEST_DB=postgres go test -covermode=atomic -tags=integration ./pkg/...
make test-go-integration-postgres
```
### Run end-to-end tests

View File

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

View File

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

Binary file not shown.

Before

Width:  |  Height:  |  Size: 182 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 179 KiB

View File

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

View File

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

View File

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

View File

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

View File

@@ -135,6 +135,14 @@ Some examples when backport is not required:
- The change is supposed to be released in the next major/minor release, e.g. v8.0.0, but the release branch, e.g. v8.0.x, has not yet been created.
#### Required labels
To ensure that we don't backport pull requests that don't need to be backported, i.e. implement new features, and only backport pull requests that address bugs, have a product approval, or refer to docs changes, backport labels need to be followed by either:
- `type/bug` label: Pull requests which address bugs,
- `product-approved` label: Urgent fixes which need product approval, in order to get merged,
- `type/docs` label: Docs changes`.
> **Note:** You can still backport a pull request after it's been merged.
## Doing the actual merge

View File

@@ -1,194 +0,0 @@
# Backend style guide
Grafana's backend has been developed for a long time with a mix of code styles. This guide explains how we want to write Go code in the future.
Unless stated otherwise, use the guidelines listed in the following articles:
- [Effective Go](https://golang.org/doc/effective_go.html)
- [Code Review Comments](https://github.com/golang/go/wiki/CodeReviewComments)
- [Go: Best Practices for Production Environments](http://peter.bourgon.org/go-in-production/#formatting-and-style)
## Linting and formatting
To ensure consistency across the Go codebase, we require all code to pass a number of linter checks.
We use the standard following linters:
- [gofmt](https://golang.org/cmd/gofmt/)
- [golint](https://github.com/golang/lint)
- [go vet](https://golang.org/cmd/vet/)
In addition to the standard linters, we also use:
- [revive](https://revive.run/) with a [custom config](https://github.com/grafana/grafana/blob/main/conf/revive.toml)
- [GolangCI-Lint](https://github.com/golangci/golangci-lint)
- [gosec](https://github.com/securego/gosec)
To run all linters, use the `lint-go` Makefile target:
```bash
make lint-go
```
## Testing
We value clean and readable code, that is loosely coupled and covered by unit tests. This makes it easier to collaborate and maintain the code.
Tests must use the standard library, `testing`. For assertions, prefer using [testify](https://github.com/stretchr/testify).
The majority of our tests uses [GoConvey](http://goconvey.co/) but that's something we want to avoid going forward.
In the `sqlstore` package we do database operations in tests and while some might say that's not suited for unit tests. We think they are fast enough and provide a lot of value.
### Assertions
Use respectively [`assert.*`](https://github.com/stretchr/testify#assert-package) functions to make assertions that
should _not_ halt the test ("soft checks") and [`require.*`](https://github.com/stretchr/testify#require-package)
functions to make assertions that _should_ halt the test ("hard checks"). Typically you want to use the latter type of
check to assert that errors have or have not happened, since continuing the test after such an assertion fails is
chaotic (the system under test will be in an undefined state) and you'll often have segfaults in practice.
### Sub-tests
Use [`t.Run`](https://golang.org/pkg/testing/#T.Run) to group sub-test cases, since it allows common setup and teardown
code, plus lets you run each test case in isolation when debugging. Don't use `t.Run` to e.g. group assertions.
### Cleanup
Use [`t.Cleanup`](https://golang.org/pkg/testing/#T.Cleanup) to clean up resources in tests. It's a less fragile choice than `defer`, since it's independent of which
function you call it in. It will always execute after the test is over in reverse call order (last `t.Cleanup` first, same as `defer`).
### Mock
Optionally, we use [`mock.Mock`](https://github.com/stretchr/testify#mock-package) package to generate mocks. This is
useful when you expect different behaviours of the same function.
#### Tips
- Use `Once()` or `Times(n)` to make this mock only works `n` times.
- Use `mockedClass.AssertExpectations(t)` to guarantee that the mock is called the times asked.
- If any mock set is not called or its expects more calls, the test fails.
- You can pass `mock.Anything` as argument if you don't care about the argument passed.
- Use `mockedClass.AssertNotCalled(t, "FunctionName")` to assert that this test is not called.
#### Example
This is an example to easily create a mock of an interface.
Given this interface:
```go
func MyInterface interface {
Get(ctx context.Context, id string) (Object, error)
}
```
Mock implementation should be like this:
```go
import
func MockImplementation struct {
mock.Mock
}
func (m *MockImplementation) Get(ctx context.Context, id string) error {
args := m.Called(ctx, id) // Pass all arguments in order here
return args.Get(0).(Object), args.Error(1)
}
```
And use it as the following way:
```go
objectToReturn := Object{Message: "abc"}
errToReturn := errors.New("my error")
myMock := &MockImplementation{}
defer myMock.AssertExpectations(t)
myMock.On("Get", mock.Anything, "id1").Return(objectToReturn, errToReturn).Once()
myMock.On("Get", mock.Anything, "id2").Return(Object{}, nil).Once()
anyService := NewService(myMock)
resp, err := anyService.Call("id1")
assert.Equal(t, resp.Message, objectToReturn.Message)
assert.Error(t, err, errToReturn)
resp, err = anyService.Call("id2")
assert.Nil(t, err)
```
#### Mockery
When an interface to test is too big, it's annoying to mock each function manually. To avoid this, you can
use [`mockery`](https://github.com/vektra/mockery) library to generate the mocks.
The command is like the following (there are more options documented if you need to use another one):
```
mockery --name InterfaceName --structname MockImplementationName --inpackage --filename my_implementation_mock.go
```
- `--name`: Interface to mock
- `--structname`: Mock implementation name
- `--inpackage`: To use the same package name as the interface
- `--filename`: Your mock generated file name
If any interface signature changes, executing the command again updates the mock.
Additionally, you can put `go:generate` command on the top of the file as a comment. It's useful because some IDEs
like Goland and Visual Studio Code allows executing scripts from the IDE.
```
package <package>
import (
...
)
//go:generate mockery --name InterfaceName --structname MockImplementationName --inpackage --filename my_implementation_mock.go
```
## Globals
As a general rule of thumb, avoid using global variables, since they make the code difficult to maintain and reason
about, and to write tests for. The Grafana codebase currently does use a lot of global variables, especially when
it comes to configuration, but that is a problem we're trying to solve.
## Pointers
In general, use value types and only reach for pointers when there's a real need. The reason being that pointers
increase the risk of bugs, since a pointer can be nil and dereferencing a nil pointer leads to a panic (AKA segfault).
Valid reasons to use a pointer include (but not necessarily limited to):
- You might need to pass a modifiable argument to a function
- Copying an object might incur a performance hit (benchmark to check your assumptions, copying is often faster than
allocating heap memory)
- You might _need_ `nil` to tell if a variable isn't set, although usually it's better to use the type's zero
value to tell instead
## Database
In database related code, we follow certain patterns.
### Foreign keys
While they can be useful, we don't generally use foreign key constraints in Grafana, for historical and
technical reasons. See this [comment](https://github.com/grafana/grafana/issues/3269#issuecomment-383328548) by Torkel
for context.
### Unique columns
If a column, or column combination, should be unique, add a corresponding uniqueness constraint through a migration.
## JSON
The simplejson package is used a lot throughout the backend codebase, but it's legacy, so if at all possible
avoid using it in new code. Use [json-iterator](https://github.com/json-iterator/go) instead, which is a more performant
drop-in alternative to the standard [encoding/json](https://golang.org/pkg/encoding/json/) package. While encoding/json
is a fine choice, profiling shows that json-iterator may be 3-4 times more efficient for encoding. We haven't profiled
its parsing performance yet, but according to json-iterator's own benchmarks, it appears even more superior in this
department.

View File

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

View File

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

View File

@@ -1,7 +1,6 @@
files:
- source: /public/locales/en-US/messages.po
- source: /public/locales/en-US/grafana.json
translation: /public/locales/%locale%/%original_file_name%
export_only_approved: true
pull_request_title: 'I18n: Crowdin sync'
pull_request_labels:

View File

@@ -4,6 +4,7 @@ This folder contains useful scripts and configuration so you can:
- Configure data sources in Grafana for development.
- Configure dashboards for development and test scenarios.
- Set up an SMTP Server + Web Interface for viewing and testing emails.
- Create docker-compose file with databases and fake data.
## Install Docker
@@ -44,6 +45,9 @@ make devenv sources=postgres,auth/openldap,grafana postgres_version=9.2 grafana_
#### Grafana
The grafana block is pre-configured with the dev-datasources and dashboards.
#### Tempo
The tempo block runs loki and prometheus as well and should not be ran with prometheus as a separate source. You need to install a docker plugin for the self logging to work, without it the container won't start. See https://grafana.com/docs/loki/latest/clients/docker-driver/#installing for installation instructions.
#### Jaeger
Jaeger block runs both Jaeger and Loki container. Loki container sends traces to Jaeger and also logs its own logs into itself so it is possible to setup derived field for traceID from Loki to Jaeger. You need to install a docker plugin for the self logging to work, without it the container won't start. See https://grafana.com/docs/loki/latest/clients/docker-driver/#installing for installation instructions.
@@ -55,6 +59,21 @@ Jaeger block runs both Jaeger and Loki container. Loki container sends traces to
| 1.0 | graphite1 | 8280 | 2203 | 2203 |
| 0.9 | graphite09 | 8380 | 2303 | 2303 |
#### MailDev
MailDev block runs an SMTP server and a web UI to test and view emails. This is useful for testing your email notifications locally.
Make sure you configure your .ini file with the following settings:
```ini
[smtp]
enabled = true
skip_verify = true
host = "localhost:1025"
```
You can access the web UI at http://localhost:12080/#/
## Debugging setup in VS Code
An example of launch.json is provided in `devenv/vscode/launch.json`. It basically does what Makefile and .bra.toml do. The 'program' field is set to the folder name so VS Code loads all *.go files in it instead of just main.go.

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