Compare commits

...

1564 Commits

Author SHA1 Message Date
Grot (@grafanabot)
eed942a502 "Release: Updated versions in package to 9.0.7" (#449) 2022-08-10 11:18:27 +02:00
ismail simsek
4c7e06157e Merge branch 'v9.0.x' of https://github.com/grafana/grafana into v9.0.x 2022-08-10 10:52:08 +02:00
Grot (@grafanabot)
1c13ac20c3 [v9.0.x] Grafana/toolkit: Fix incorrect image and font generation for plugin builds (#52939)
Co-authored-by: Esteban Beltran <academo@users.noreply.github.com>
Co-authored-by: Esteban Beltran <esteban.beltran@elastic.co>
2022-08-10 10:12:35 +02:00
Grot (@grafanabot)
7eaa0c5913 Geomap: Set markers color based on selected color field #53493 (#53497)
(cherry picked from commit 45750da667)

Co-authored-by: Adela Almasan <88068998+adela-almasan@users.noreply.github.com>
2022-08-09 19:05:37 -04:00
Grot (@grafanabot)
9030100c65 updates aliases (#53488) (#53489)
(cherry picked from commit ffb4aba214)

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
2022-08-09 15:16:33 -05:00
Grot (@grafanabot)
0c07167691 moves legend to visualizations, adds links (#53486) (#53487)
(cherry picked from commit acae736796)

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
2022-08-09 14:51:22 -05:00
Grot (@grafanabot)
58d5ab6253 LibraryPanels: Rewrite invalid connection deletion query to be MySQL-friendly (#53460) (#53468)
Closes #53456

(cherry picked from commit f4a5e034b3)

Co-authored-by: kay delaney <45561153+kaydelaney@users.noreply.github.com>
2022-08-09 15:37:03 +01:00
Victor Marin
c73ee26595 Histogram: Send proper dataframe to PlotLegend (#53284) (#53463)
* Send proper dataframe to PlotLegend

* Update dataFrameFieldIndex for multiple frames

(cherry picked from commit 3893c46976)
2022-08-09 13:11:59 +00:00
Grot (@grafanabot)
3c655effec check not empty root urls before setting field (#53135) (#53235)
(cherry picked from commit 5523c00b01)

Co-authored-by: Will Browne <wbrowne@users.noreply.github.com>
2022-08-09 08:19:23 -04:00
Grot (@grafanabot)
2a5724219c Fix relrefs in api keys doc (#51943) (#51994)
(cherry picked from commit 92577d3770)

Co-authored-by: Garrett Guillotte <100453168+gguillotte-grafana@users.noreply.github.com>
2022-08-09 13:27:20 +02:00
Grot (@grafanabot)
01eac32eb1 Browse/Search: Make browser back work properly when visiting Browse or search (#52271) (#52277)
(cherry picked from commit 52a7b0e75f)

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
2022-08-09 13:24:49 +02:00
Grot (@grafanabot)
e737477208 Docs: Emphasize American English as source language (#52040) (#52043)
(cherry picked from commit f1960b8ffc)

Co-authored-by: Ursula Kallio <ursula.kallio@grafana.com>
2022-08-09 13:23:29 +02:00
Grot (@grafanabot)
fad3ffe4c8 Docs: Correct references to 'lockingMigration' (#51678) (#52289)
Signed-off-by: Dave Henderson <dave.henderson@grafana.com>
(cherry picked from commit 19cf9fa87d)

Co-authored-by: Dave Henderson <dave.henderson@grafana.com>
2022-08-09 13:21:20 +02:00
Grot (@grafanabot)
fdfa380fa9 Dashboard Links: Fix styles for very long dashboard titles (#52443) (#52468)
(cherry picked from commit 0142c8ccd1)

Co-authored-by: kay delaney <45561153+kaydelaney@users.noreply.github.com>
2022-08-09 13:20:22 +02:00
Grot (@grafanabot)
95e3c91f63 Prometheus: Remove metadata endpoint (#53428) (#53432)
* remove prom metadata endpoint until we have a fix for detecting versions and implementations

* fix linting issue

(cherry picked from commit 7aeb8b4cdf)

Co-authored-by: Brendan O'Handley <brendan.ohandley@grafana.com>
2022-08-08 18:56:52 -04:00
Grot (@grafanabot)
60e9fb265e Graphite: Use TimeRange with applied fiscalYearStartMonth (#51623) (#53370)
* Parse date with fiscalYearStartMonth in graphite ds

* Use precalculated timeranges

* Always use precalculated values

* Modify test

(cherry picked from commit 5b058d617d)

Co-authored-by: Victor Marin <36818606+mdvictor@users.noreply.github.com>
2022-08-08 04:34:12 -04:00
Grot (@grafanabot)
8ef9ad063b Geomap: Do not show markers with empty coordinates (#53330) (#53333)
Co-authored-by: nmarrs <nathanielmarrs@gmail.com>
(cherry picked from commit 64721bfa94)

Co-authored-by: Drew Slobodnjak <60050885+drew08t@users.noreply.github.com>
2022-08-05 14:36:06 -04:00
Grot (@grafanabot)
e186375a17 Alerting: Remove mention of host name from Alerting HA docs (#53178) (#53344)
(cherry picked from commit 4090e122f8)

Co-authored-by: Yuriy Tseretyan <yuriy.tseretyan@grafana.com>
2022-08-05 08:51:39 -04:00
Sofia Papagiannaki
1be924fa23 [v9.0.x] API: Fix snapshot responses (#53312)
* API: Fix snapshot responses (#52998)

* API: Fix response status when snapshots are not found

* API: Fix response status when snapshot key is empty

* Apply suggestions from code review

(cherry picked from commit 5fec6cc4f5)
2022-08-04 19:24:12 +03:00
Grot (@grafanabot)
27c1d18208 GrafanaUI: Render PageToolbar's leftItems regardless of title's presence (#53285) (#53291)
* Grafana-UI: make PageToolbar render leftItems regardless of title's presence

* simplify test

(cherry picked from commit 1ec9007fe0)

Co-authored-by: Giordano Ricci <me@giordanoricci.com>
2022-08-04 12:38:45 +01:00
Drew Slobodnjak
68782b12de Geomap: Fix tooltip offset bug (#53274) 2022-08-03 16:34:04 -07:00
Grot (@grafanabot)
a8b9d8037a add missing check for root URLs length (#53239) (#53250)
(cherry picked from commit 46b7ca12e1)

Co-authored-by: Will Browne <wbrowne@users.noreply.github.com>
2022-08-03 11:33:29 -04:00
Grot (@grafanabot)
a1c9e06036 Plugins: Validate root URLs when signing private plugins via grafana-toolkit (#51968) (#53228)
* validate URLs

* apply PR review feedback

* fix err msg

(cherry picked from commit b32ad993c5)

Co-authored-by: Will Browne <wbrowne@users.noreply.github.com>
2022-08-03 15:59:05 +02:00
Grot (@grafanabot)
f1b5f233b4 RolePicker: Fix RolePicker menu positioning (#53201) (#53215)
Fixes #52800

(cherry picked from commit dc775c7577)

Co-authored-by: Mihály Gyöngyösi <mgyongyosi@users.noreply.github.com>
2022-08-03 15:11:07 +02:00
Yuriy Tseretyan
a010d12684 [9.0.x] Alerting: Remove user input from error response (#53158)
* omit recipient input from the error
Co-authored-by: Alexander Weaver <weaver.alex.d@gmail.com>
2022-08-02 12:31:42 -04:00
Grot (@grafanabot)
ea938c9962 Azure Monitor: Clarify removed query methods (#52986) (#53142)
(cherry picked from commit 194d0fe33b)

Co-authored-by: Andres Martinez Gotor <andres.martinez@grafana.com>
2022-08-02 10:10:45 -04:00
Grot (@grafanabot)
7ac8049376 ReleaseNotes: Updated changelog and release notes for 9.0.6 (#53092) (#53093)
(cherry picked from commit 47a7f84c86)
2022-08-02 10:28:23 +02:00
Grot (@grafanabot)
5cfda094c6 "Release: Updated versions in package to 9.0.6" (#53091) 2022-08-02 10:10:18 +02:00
Grot (@grafanabot)
0446c57ec4 CloudWatch: add CloudWatchSynthetics namespace (#52956) (#53048)
(cherry picked from commit 52b57fdb1c)

Co-authored-by: Isabella Siu <Isabella.siu@grafana.com>
2022-08-01 11:40:56 -04:00
Grot (@grafanabot)
f8c6d1236f TimeSeriesPanel: Tooltip works properly when changing modes (#52876) (#53055)
* TimeSeriesPanel: Tooltip works properly when changing modes

* TooltipPlugin respects display mode

* Pass options to TimeSeriesPanel props

(cherry picked from commit 2948bf01dc)

Co-authored-by: Victor Marin <36818606+mdvictor@users.noreply.github.com>
2022-08-01 11:32:34 -04:00
Grot (@grafanabot)
1a065b58ce CloudWatch: the variable editor should accept custom values (#52955) (#53045)
(cherry picked from commit 74f0c3dbd4)

Co-authored-by: Isabella Siu <Isabella.siu@grafana.com>
2022-08-01 10:41:35 -04:00
Grot (@grafanabot)
3dbcd94d43 CloudMonitoring: Remove link setting for SLO queries (#53031) (#53036)
(cherry picked from commit 314eb5223f)

Co-authored-by: Andres Martinez Gotor <andres.martinez@grafana.com>
2022-08-01 09:11:56 -04:00
eleijonmarck
2a904cb14c Merge branch 'v9.0.x' of github.com:grafana/grafana into v9.0.x 2022-08-01 13:51:30 +02:00
Jack Westbrook
fafab77127 Update dependency moment to v2.29.4 [SECURITY] (#51886) (#53027)
* Update dependency moment to v2.29.4 [SECURITY]

* chore(moment): make sure nested moment deps resolve to moment@2.29.4

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com>
(cherry picked from commit b4c6efa07b)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-08-01 12:14:08 +02:00
Grot (@grafanabot)
0857a0a171 BarchartPanel: Fix color from thresholds show incorrectly (#52038) (#52969)
Signed-off-by:  Kyle Cunningham <kyle.cunningham@grafana.com>
(cherry picked from commit 11c79cd6da)

Co-authored-by: mingozh <77652617+mingozh@users.noreply.github.com>
2022-08-01 05:04:57 -04:00
Grot (@grafanabot)
721b17a732 docker: The cue directory is gone. Catch-up (#52606) (#53004)
The files got removed in 8876d56495 but
the container was not updated yet.

(cherry picked from commit 27709adac3)

Co-authored-by: Holger Freyther <holger+github@freyther.de>
2022-07-29 17:45:50 +00:00
Grot (@grafanabot)
04bdcc09ed Prometheus: Fix adding of multiple values for regex operator (#52978) (#53003)
* Prometheus, Loki: Fix adding of multiple values for regex operator

* Refactor

(cherry picked from commit 1eb3513781)

Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
2022-07-29 11:58:52 -04:00
Grot (@grafanabot)
457c110b26 API: Do not expose user input in datasource error responses (#52992) (#52996)
(cherry picked from commit 87004cc22d)

Co-authored-by: Sofia Papagiannaki <1632407+papagian@users.noreply.github.com>
2022-07-29 16:18:53 +03:00
Grot (@grafanabot)
44bdccbfd1 Tooltip mode works in BarChart panel (#52941) (#52989)
(cherry picked from commit e88e3482e0)

Co-authored-by: Victor Marin <36818606+mdvictor@users.noreply.github.com>
2022-07-29 08:34:15 -04:00
Ieva
b0055b3e61 fix tests (#52984) 2022-07-29 06:57:55 -04:00
Grot (@grafanabot)
e26a51fc00 Cloud Datasources: Add necessary inputs and bump version for code coverage workflow (#52055) (#52902)
* Add necessary inputs and bump version

* Test coverage commit

* Bump coverage workflow version

* Bump workflow version

* Try updated workflow

* Bump commit sha

* Rename empty file for testing

* Update sha

* Update sha

* Update sha

* Bump SHA

* Update SHA

* Update sha

* Bump SHA

* Bump SHA

* Bump sha

* Bump SHA

* Test all plugins (including backend)

* Bump SHA

* Update SHA

* Remove empty files and set appropriate workflow version

(cherry picked from commit caec0f8771)

Co-authored-by: Andreas Christou <andreas.christou@grafana.com>
2022-07-28 10:47:36 -07:00
Grot (@grafanabot)
e441965514 Fix relrefs in alerting (#51939) (#51993)
(cherry picked from commit a243dc8713)

Co-authored-by: Garrett Guillotte <100453168+gguillotte-grafana@users.noreply.github.com>
2022-07-27 14:17:02 -07:00
Grot (@grafanabot)
7a621b93d0 Fix small typo in panel doc (#52568) (#52727)
(cherry picked from commit bdcef92e35)

Co-authored-by: Chris Hodges <chris.hodges@gmail.com>
2022-07-27 14:15:57 -07:00
Grot (@grafanabot)
ba8549cfcc Separate task with additional information (#52871) (#52883)
(cherry picked from commit c968b76279)

Co-authored-by: Ursula Kallio <ursula.kallio@grafana.com>
2022-07-27 14:15:36 -07:00
Grot (@grafanabot)
02fb825de0 fixes links (#52899) (#52906)
(cherry picked from commit d06ea6ea0e)

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
2022-07-27 15:21:42 -05:00
Ieva
c71dfb49da allow org admins to invite new users to Grafana (#52904) 2022-07-27 21:11:17 +02:00
Grot (@grafanabot)
ca710b4935 Cloudwatch: Add template variable query function for listing log groups (#50100) (#52898)
* cloud-datasources mob! :shipit:

* cloud-datasources mob! :shipit:

lastFile:public/app/plugins/datasource/cloudwatch/components/VariableQueryEditor/VariableQueryEditor.tsx

* mob next [ci-skip] [ci skip] [skip ci]

lastFile:public/app/plugins/datasource/cloudwatch/variables.ts

* cloud-datasources mob! 👶

lastFile:public/app/plugins/datasource/cloudwatch/components/VariableQueryEditor/VariableQueryEditor.test.tsx

* cloud-datasources mob! 👶

lastFile:public/app/plugins/datasource/cloudwatch/components/VariableQueryEditor/VariableQueryEditor.test.tsx

* mob next [ci-skip] [ci skip] [skip ci]

lastFile:public/app/plugins/datasource/cloudwatch/components/VariableQueryEditor/VariableQueryEditor.test.tsx

* cloud-datasources mob! :shipit:

lastFile:public/app/plugins/datasource/cloudwatch/variables.test.ts

* cloud-datasources mob! 

* prettier md

Co-authored-by: Kevin Yu <kevinwcyu@users.noreply.github.com>
Co-authored-by: Andres <andres.martinez@grafana.com>
Co-authored-by: Erik Sundell <erik.sundell87@gmail.com>
Co-authored-by: Adam Simpson <adam@adamsimpson.net>
(cherry picked from commit bcf8320e07)

Co-authored-by: Yaelle Chaudy <42030685+yaelleC@users.noreply.github.com>
2022-07-27 13:36:47 -04:00
Grot (@grafanabot)
b9c1a3e7f6 [v9.0.x] Access control: role checks before updates (#52900)
* Access control: role checks before updates (#51449)

* add role checks

* linting

(cherry picked from commit 0c0cf36ab8)

* fix tests

Co-authored-by: Ieva <ieva.vasiljeva@grafana.com>
2022-07-27 13:17:25 -04:00
Grot (@grafanabot)
5f947c2932 CloudWatch: returnData should default to true (#52759) (#52874)
(cherry picked from commit 542b4f2431)

Co-authored-by: Isabella Siu <Isabella.siu@grafana.com>
2022-07-27 13:09:24 -04:00
Grot (@grafanabot)
649e3aaf2e Plugins: Add validation for plugin manifest (#52787) (#52864)
* add validation for plugin manifest

* no more semver checking

* undo go.mod changes

* undo go.mod changes

* only validate v2 fields where necessary

* remove manifest version field check

(cherry picked from commit 6d066a7aa8)

Co-authored-by: Will Browne <wbrowne@users.noreply.github.com>
2022-07-27 08:43:30 -04:00
Grot (@grafanabot)
7e1df2ac61 Instrumentation: Collect database connection stats (#52797) (#52866)
Signed-off-by: bergquist <carl.bergquist@gmail.com>
(cherry picked from commit 7825ad6aa3)

Co-authored-by: Carl Bergquist <carl.bergquist@gmail.com>
2022-07-27 08:02:17 -04:00
Armand Grillet
e78045a059 Docs: fix data source MSSQL link (#52854) 2022-07-27 10:26:19 +02:00
Grot (@grafanabot)
be2d8320fc Docs: updated configuration description for auto_assign_org (#50180) (#52835)
* Docs: updated configuration description for auto_assign_org

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

* Resolve prettier issues for CI

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

Remove trailing space

Co-authored-by: Garrett Guillotte <100453168+gguillotte-grafana@users.noreply.github.com>
Co-authored-by: Garrett Guillotte <garrett.guillotte@grafana.com>
Co-authored-by: Ursula Kallio <ursula.kallio@grafana.com>
(cherry picked from commit 6968478d94)

Co-authored-by: gjed <marco@pernigo.com>
2022-07-26 10:25:17 -07:00
Grot (@grafanabot)
16d7897e1c UI/Card: Fix card items always having pointer cursor (#52809) (#52817)
(cherry picked from commit aa8c9d86dd)

Co-authored-by: Gilles De Mey <gilles.de.mey@gmail.com>
2022-07-26 16:44:52 +02:00
Grot (@grafanabot)
b5e3497ce5 ReleaseNotes: Updated changelog and release notes for 9.0.5 (#52813) (#52815)
(cherry picked from commit c20d96aaec)
2022-07-26 16:16:41 +02:00
Grot (@grafanabot)
12a81fe0bf "Release: Updated versions in package to 9.0.5" (#52812) 2022-07-26 15:04:47 +01:00
Grot (@grafanabot)
a03896d83d Docs: Update docs for images in notifications (#52721) (#52785)
(cherry picked from commit 23fc5383d9)

Co-authored-by: George Robinson <george.robinson@grafana.com>
2022-07-26 10:49:50 +01:00
IevaVasiljeva
6d7282cb7c Merge branch 'v9.0.x' of github.com:grafana/grafana into v9.0.x 2022-07-26 10:29:28 +01:00
Dimitris Sotirakis
af89d404b2 Update grabpl (#52782) 2022-07-26 12:16:54 +03:00
Grot (@grafanabot)
8d4180104b [v9.0.x] Grafana/toolkit: Fix incorrect image and font generation for plugin builds (#52783)
Co-authored-by: Esteban Beltran <academo@users.noreply.github.com>
2022-07-26 04:58:27 -04:00
Grot (@grafanabot)
63fe3aaf7c Updated pushover in Supported notifiers (#52631) (#52748)
Pushover supports images in notifications since v9.0.2

(cherry picked from commit 9c3f9887fc)

Co-authored-by: Robin Tönniges <development@toenniges.org>
2022-07-25 10:38:11 -07:00
Grot (@grafanabot)
fb3d767f61 Dashboard: Adjust styles for very long titles (#52452) (#52741)
(cherry picked from commit 06012d51a9)

Co-authored-by: kay delaney <45561153+kaydelaney@users.noreply.github.com>
2022-07-25 18:36:58 +01:00
Grot (@grafanabot)
d92fa74450 docs(alerting): removed a repetition of a word (#52376) (#52736)
removed a repetition of a word in doc

(cherry picked from commit 4d2f2b88b6)

Co-authored-by: Med Amine Amara <60155224+medamineamara@users.noreply.github.com>
2022-07-25 16:21:22 +01:00
Grot (@grafanabot)
d12e3b6da1 fix dockerfile for oracle alpine image (#52667) (#52731)
fix dockerfile for oracle alpine image

(cherry picked from commit dbc2171401)

Co-authored-by: Scott Lepper <scott.lepper@gmail.com>
2022-07-25 10:33:44 -04:00
Grot (@grafanabot)
af47d9342e Docs: Fix query history documentation (#52610) (#52724)
* Query history: Fix docs

* Update query history docs

* Update docs/sources/explore/query-management.md

* Update docs/sources/explore/query-management.md

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

* Trigger drone

Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com>
(cherry picked from commit 9d960e8723)

Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
2022-07-25 15:14:54 +02:00
Will Browne
61be62e42b resolve conflicts (#52642) 2022-07-25 11:45:11 +02:00
Grot (@grafanabot)
6dcaa1e567 Plugins: Fixes navigation between different plugin pages (#52571) (#52680) 2022-07-23 08:01:11 -04:00
Grot (@grafanabot)
56f8a72bfe Variables: Optimize "timeRangeUpdated" path (#52047) (#52664)
(cherry picked from commit 0c89743759)

Co-authored-by: kay delaney <45561153+kaydelaney@users.noreply.github.com>
2022-07-22 11:49:11 -04:00
Emil Tullstedt
4efa75ffdc [v9.0.x] Chore: Upgrade to Go version 1.17.12 (#52523) (#52531)
(cherry picked from commit 78f26a079c)
2022-07-22 14:22:22 +02:00
Grot (@grafanabot)
1d59297f70 [v9.0.x] Alerting: Fix alert panel instance-based rules filtering (#52646)
Co-authored-by: Konrad Lalik <konrad.lalik@grafana.com>
2022-07-22 07:16:15 -04:00
Eric Leijonmarck
234f29f42b [v9.0.x] Auth: Add prometheus metrics for case insensitive ids (#52634)
* merge backport

* remove sa background service
2022-07-22 12:06:02 +01:00
Grot (@grafanabot)
84b88a4dae [v9.0.x] Alerting: Add subpath to the folder edit and permission url (#52638)
Co-authored-by: Konrad Lalik <konrad.lalik@grafana.com>
2022-07-22 05:40:05 -04:00
Grot (@grafanabot)
cc7c8d4cef Fix anonymous access (#52615) (#52636)
(cherry picked from commit 8d938175f5)

Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com>
2022-07-22 11:09:05 +02:00
Grot (@grafanabot)
632f015454 removes unnecessary words in into (#52622) (#52624)
(cherry picked from commit 1974f166e0)

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
2022-07-21 14:00:26 -05:00
Grot (@grafanabot)
57976b7119 Prometheus: Don't show errors from unsuccessful API checks like rules or exemplar checks (#52609)
The query inspector was experiencing some error pop-ups due
to errors encountered on metrics datasources configured with multiple
tenants.

e.g., team-a|team-b

This fix suppresses those errors so as to not mislead the user.

(cherry picked from commit 565430f297)

Co-authored-by: Darren Janeczek <38694490+darrenjaneczek@users.noreply.github.com>
2022-07-21 10:11:37 -04:00
Grot (@grafanabot)
6eb283e29f Docs: minor corrections to prefix and naming (#52579) (#52597)
(cherry picked from commit cf42365fdd)

Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com>
2022-07-21 12:50:07 +01:00
Grot (@grafanabot)
6eb552a595 Alerting: Allow the webhook notifier to support a custom Authorization header (#52515) (#52587)
* Allow the webhook notifier to support a custom Authorization header

Instead of doing something clever of re-using the existing username/password fields of Basic Authentication - I opted for two diffent fields to match the upstream Alertmanager configuration (that in turn is based of the HTTP Basic authentication).

 It'll fail if you have values for both HTTP Basic Authentication and Authorization.

(cherry picked from commit b026f2bc5d)

Co-authored-by: gotjosh <josue.abreu@gmail.com>
2022-07-21 12:07:40 +01:00
Grot (@grafanabot)
723eca610e display dashboard settings to users who are allowed to edit the dashboard (#52532) (#52535)
(cherry picked from commit becd895244)

Co-authored-by: Ieva <ieva.vasiljeva@grafana.com>
2022-07-21 12:04:30 +01:00
Grot (@grafanabot)
02a7557de4 Alerting: Cleanup the alert_configuration table on write (#51497) (#52539)
(cherry picked from commit 320262c3db)

Co-authored-by: Jean-Philippe Quéméner <JohnnyQQQQ@users.noreply.github.com>
2022-07-21 12:29:37 +02:00
Vardan Torosyan
89ea9f0e36 Access control: Allow organisation admins to add existing users to org (#51668) (#52553)
* Access control: Allow organisation admins to add existing users to org (#51668)

* check users with user add permission to access the invite endpoint

* undo unneeded changes

* tests and cleanup

* linting

* linting

* betterer

* betterer again

* fix prettier issue

Co-authored-by: jguer <joao.guerreiro@grafana.com>
(cherry picked from commit 0c33b9f211)

* Fix org invites

* Fix tests

* Revert betterer

Co-authored-by: Ieva <ieva.vasiljeva@grafana.com>
2022-07-21 11:44:20 +02:00
Grot (@grafanabot)
da2442863b Changelog: Removed falsely added bugfix (#52580) (#52581)
(cherry picked from commit b1f355fddc)

Co-authored-by: Sven Grossmann <Svennergr@gmail.com>
2022-07-21 04:26:19 -04:00
Eric Leijonmarck
1f44da3d83 Fix: add alias to subqueries for mysql database (#52576)
(cherry picked from commit 8073502701b172f23a4dfa09a7195217cb4007aa)
2022-07-21 09:03:10 +01:00
Alexander Weaver
795e2d0a48 Alerting: use static channel configuration to determinate secure fields (#52527) (#52570)
* Alerting: use static channel configuration to determinate secure fields

* move to channels package

* introduce channel_config package to fix cyclic import

* add missing changes

* compare type to type

(cherry picked from commit ba9c18d9c3)

Co-authored-by: Jean-Philippe Quéméner <JohnnyQQQQ@users.noreply.github.com>
2022-07-20 18:34:58 -04:00
Guilherme Caulada
d1f1041aba Datasource: Propagate datasource secret decryption errors to the frontend (#52068) (#52557)
* update decrypt secrets function signature and add secrets error handling

* remove a couple instances of unnecessary logging since errors are properly handled now

* add unit test

* fix linting issues

(cherry picked from commit 9aa6ce2a50)

Co-authored-by: Michael Mandrus <41969079+mmandrus@users.noreply.github.com>
2022-07-20 18:03:44 -03:00
Grot (@grafanabot)
e95c97c119 Docs: adjusts heading and rewords the intro to active voice (#52545) (#52551)
* adjusts heading and makes intro active voice

* Update docs/sources/administration/service-accounts/_index.md

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

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

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
2022-07-20 12:42:36 -05:00
Grot (@grafanabot)
2feb6a5f73 ReleaseNotes: Updated changelog and release notes for 9.0.4 (#52548) (#52549)
(cherry picked from commit 240bb8928d)
2022-07-20 13:09:36 -04:00
Grot (@grafanabot)
409aa6b4f3 "Release: Updated versions in package to 9.0.4" (#52547) 2022-07-20 18:05:20 +01:00
Grot (@grafanabot)
af4402dab9 Loki: Fix show context not working in some occasions (#52458) (#52518)
* added missing `languageProvider.start` call

* moved `languageProvider.start`

(cherry picked from commit 6cab909132)

Co-authored-by: Sven Grossmann <Svennergr@gmail.com>
2022-07-20 16:23:09 +02:00
IevaVasiljeva
a45ddcc397 Merge branch 'v9.0.x' of github.com:grafana/grafana-private-mirror into v9.0.x 2022-07-20 14:43:06 +01:00
IevaVasiljeva
eb4dc21106 Merge branch 'v9.0.x' of github.com:grafana/grafana into v9.0.x 2022-07-20 14:42:55 +01:00
Grot (@grafanabot)
931818b822 Access control: Fix org user removal for OSS users (#52473) (#52514)
* allow setting team managed permissions for service accounts

* Revert "allow setting team managed permissions for service accounts"

This reverts commit 7598626397.

* fix org user removal for OSS

* remove comment

(cherry picked from commit ba76be174f)

Co-authored-by: Ieva <ieva.vasiljeva@grafana.com>
2022-07-20 13:53:32 +01:00
Grot (@grafanabot)
21d74574c8 [v9.0.x] Alerting: Fix Slack push notifications (#52476)
This commit fixes push notifications for Slack which used to show "This content cannot be displayed". The text field is shown in both the message and the push notification.

(cherry picked from commit 094dfd0d4d)

Co-authored-by: George Robinson <george.robinson@grafana.com>
2022-07-19 22:17:46 -04:00
Grot (@grafanabot)
963c55eeda Dashboard: Fix iteration property change triggering unsaved changes warning (#51272) (#52493) 2022-07-19 21:59:27 -04:00
Grot (@grafanabot)
46e0c1fe99 Update upgrade-grafana.md (#52406) (#52482)
fixed the broken link for the release notes

(cherry picked from commit a8ddea0d35)

Co-authored-by: Usman Ahmad <69509548+usmangt@users.noreply.github.com>
2022-07-19 14:25:45 -05:00
Grot (@grafanabot)
49db9712ab CloudWatch: fix log explorer context (#52118) (#52478)
(cherry picked from commit 146c90d59e)

Co-authored-by: Isabella Siu <Isabella.siu@grafana.com>
2022-07-19 14:17:11 -04:00
Grot (@grafanabot)
2b5f654fc4 Alerting: Preserve new-lines from custom email templates in rendered email (#52253) (#52470)
* Add line break, regenerate, and fix

* Left-align custom text in addition to preserving newlines

(cherry picked from commit 39d7fdbbbc)

Co-authored-by: Alexander Weaver <weaver.alex.d@gmail.com>
2022-07-19 11:24:11 -05:00
Ieva
24f9baef16 resolve conflicts (#52464) 2022-07-19 17:08:31 +01:00
Grot (@grafanabot)
74d0e7227a Docs: Update query caching support (#50706) (#52462)
* Docs: Update query caching support

* Update query-caching.md

(cherry picked from commit 2b7fe7251c)

Co-authored-by: Agnès Toulet <35176601+AgnesToulet@users.noreply.github.com>
2022-07-19 16:47:16 +02:00
Ieva
711fc26f7b merge (#52410) 2022-07-19 15:36:42 +01:00
Grot (@grafanabot)
bcd25e86cb Legend: Right align calculation values (#52400) (#52454)
(cherry picked from commit 49311e1cfb)

Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
2022-07-19 05:52:01 -07:00
Joey Tawadrous
377acb4cdd [v9.0.x] Traces: Remove serviceMap feature flag (#52433) 2022-07-19 10:25:12 +01:00
Grot (@grafanabot)
b026345459 SQLStore: Support Upserting multiple rows. (#52228) (#52438)
This will be used to reduce write load when the alerting system writes a
large number of events.

(cherry picked from commit a0f96ed4e1)

Co-authored-by: Joe Blubaugh <joe.blubaugh@grafana.com>
2022-07-19 17:05:27 +08:00
Eric Leijonmarck
e4c221afc4 [v9.0.x] CSRF: Fix additional headers option (#52347)
* merged and backport to 9.0.x

* merged http_server

* fix for provider being interface

* fix for provider maybe

* wire inject

* wire inject

* wire inject

Co-authored-by: Emil Tullstedt <emil.tullstedt@grafana.com>
2022-07-19 07:50:31 +01:00
Grot (@grafanabot)
198f690667 loki: better handle an empty-response (#52397) (#52431)
(cherry picked from commit 46eec85b1a)

Co-authored-by: Gábor Farkas <gabor.farkas@gmail.com>
2022-07-19 02:30:37 -04:00
Grot (@grafanabot)
5f91f0f286 Docs: Updated links to landing pages for the notifiers (#51875) (#52429)
* Documentation: Updated links to landing pages for the respective notifiers in alerting

Updated links for listed notifiers to correctly redirect to their landing pages

* Ran prettier

(cherry picked from commit 9a72ebcd99)

Co-authored-by: sunb3am <57086182+sunb3am@users.noreply.github.com>
2022-07-19 05:59:01 +02:00
George Robinson
47c398b251 Alerting: Move debug log line to where alert rules are updated (#52318) (#52411)
(cherry picked from commit e7feff6d99)
2022-07-18 18:30:44 +01:00
Grot (@grafanabot)
4d07333bba UnsavedChanges: Should not be triggered when only going into panel edit without changing anything (#52363) (#52409)
(cherry picked from commit 38ec4c0a09)

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
2022-07-18 11:37:12 -04:00
Joey Tawadrous
5c811b1a52 Traces: Add more template variables in Tempo & Zipkin (#52381) 2022-07-18 15:33:51 +01:00
Grot (@grafanabot)
6844ffedcc Docs: fixes warning for enterprise customers (#52385) (#52393)
* Docs: fixes data source links

* fixes unified alerting redirect

* Docs: fixes enterprise customer warning

(cherry picked from commit 076851313d)

Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com>
2022-07-18 12:25:24 +02:00
Grot (@grafanabot)
d915e73405 Docs: refactors configure standard options (#52278) (#52361)
* refactors configure standard options

* makes prettier

(cherry picked from commit 433bb735de)

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
2022-07-15 17:13:45 -05:00
Christopher Moyer
6c5f5467f5 Docs: removes old whats new docs (#52188) (#52359)
* removes old whats new docs

* adds v7 whats new back in

(cherry picked from commit 1834973cc6)
2022-07-15 16:57:11 -05:00
Grot (@grafanabot)
dc50bbd1ea updates broken relrefs, removes unneeded file (#52292) (#52299)
(cherry picked from commit 6177e433ff)

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
2022-07-15 13:50:59 -07:00
Grot (@grafanabot)
d7cef15a60 logs: send more info to getLogRowContext (#52130) (#52333)
(cherry picked from commit 1d3cd0103e)

Co-authored-by: Gábor Farkas <gabor.farkas@gmail.com>
2022-07-15 10:15:51 -04:00
Grot (@grafanabot)
2e1bc52ae9 Logs: Fixed incorrect highlighting on empty line filter (#52214) (#52327)
* fixed hightlighting searchwords

* do not add empty searchWords

(cherry picked from commit a2512dd1c7)

Co-authored-by: Sven Grossmann <Svennergr@gmail.com>
2022-07-15 15:11:30 +02:00
Grot (@grafanabot)
06d6a726e7 Loki: Fix incorrect TopK value type in query builder (#52226) (#52320)
* Loki: Fix incorrect TopK value type in query builder

* Simplify code

* Remove bracket

* Brackets are back

(cherry picked from commit 8fc51932f5)

Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
2022-07-15 13:42:42 +02:00
Grot (@grafanabot)
b608265587 Upgrade grafana-azure-sdk-go package (#52248) (#52316)
- Includes fix for appropriate selection of system assigned identity when using managed identity credential for Azure Monitor auth

(cherry picked from commit 1c48f443f0)

Co-authored-by: Andreas Christou <andreas.christou@grafana.com>
2022-07-15 12:09:19 +01:00
Grot (@grafanabot)
7e89ef052a Datasources: Allow configuration of the TTL (#52161) (#52317)
(cherry picked from commit 91fd0223a4)

Co-authored-by: George Robinson <george.robinson@grafana.com>
2022-07-15 11:24:17 +01:00
Grot (@grafanabot)
bb9d55cbd9 Log: Fix text logging for unsupported types (#51306) (#52311)
* Fix text log for unsupported types

* Apply suggestions from code review

Co-authored-by: Emil Tullstedt <emil.tullstedt@grafana.com>
(cherry picked from commit 84e2e1ec8e)

Co-authored-by: Sofia Papagiannaki <1632407+papagian@users.noreply.github.com>
2022-07-15 04:46:12 -04:00
Grot (@grafanabot)
802a508723 [v9.0.x] Docs: Fix broken grafana plugins tutorial links (#52273)
Co-authored-by: Garrett Guillotte <100453168+gguillotte-grafana@users.noreply.github.com>
Co-authored-by: Esteban Beltran <academo@users.noreply.github.com>
2022-07-15 09:43:23 +02:00
Grot (@grafanabot)
7c5f3623de ReleaseNotes: Updated changelog and release notes for 9.0.3 (#52296) (#52297)
(cherry picked from commit eab03aa207)
2022-07-15 00:45:04 +02:00
Grot (@grafanabot)
e2238e8812 "Release: Updated versions in package to 9.0.3" (#52295) 2022-07-14 18:36:05 -04:00
Grot (@grafanabot)
fdc4c47f1c Encryption: Re-order error check (#52251) (#52293)
(cherry picked from commit 973b3112d7)

Co-authored-by: Joan López de la Franca Beltran <5459617+joanlopez@users.noreply.github.com>
2022-07-14 18:11:55 -04:00
Kevin Minehart
4665dc253f Security: Fixes for CVE-2022-31107 and CVE-2022-31097 (#52279)
* WIP: Fix XSS in runbook URL (#378)

(cherry picked from commit f4a8d96a4e1259ea25d9cc702a652f1b819db236)
(cherry picked from commit 337c08507b2b1c78ea470192d34cf611fae4b5da)
(cherry picked from commit 54b36a07406ed4e26ff8e161e50eda5401f504da)

* Update grabpl version

(cherry picked from commit b253e87d730f7b8aabdd0b328c5e7a82547c43b3)
(cherry picked from commit 080d3e46f3fcd61555795b9fe8fd6ee2492b422a)

* Fix: Choose Lookup params per auth module

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

Fix: Prefer pointer to struct in lookup

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

Fix: user email for ldap

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

Fix: Use only login for lookup in LDAP

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

Fix: use user email for ldap

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

fix remaining test

fix nit picks

(cherry picked from commit 1eca4aeed878853743cebcf9790b05dd350c4f83)
(cherry picked from commit 0777d100e9263d08f51dbac71aee0766c8a85a92)

* remove better (broke the pipeline)

Co-authored-by: George Robinson <george.robinson@grafana.com>
Co-authored-by: dsotirakis <sotirakis.dim@gmail.com>
Co-authored-by: jguer <joao.guerreiro@grafana.com>
2022-07-14 14:56:53 -05:00
drew08t
d1f854e071 Merge branch 'v9.0.x' of github.com:grafana/grafana into v9.0.x 2022-07-14 10:40:31 -07:00
Matthew Jacobson
1d6190e4ff Alerting: Fix Teams notifier not failing on 200 response with error (#52254) (#52260)
Team's webhook API does not always use the status code to communicate errors.
There are cases where it returns 200 and an error message in the body.
For example, 429 - Too Many Requests or when the message is too large.
Instead, what we should be looking for is a response body = "1".

https://docs.microsoft.com/en-us/microsoftteams/platform/webhooks-and-connectors/how-to/connectors-using?tabs=cURL#send-messages-using-curl-and-powershell
(cherry picked from commit efa0d90093)
2022-07-14 13:38:21 -04:00
Grot (@grafanabot)
d8eada0132 Preferences: Get home dashboard from teams (#52225) (#52229)
(cherry picked from commit c8b5307c61)

Co-authored-by: Emil Tullstedt <emil.tullstedt@grafana.com>
2022-07-14 17:09:36 +02:00
Grot (@grafanabot)
9be6d854d9 [v9.0.x] AzureMonitor: Update UI to experimental package (#52235)
* AzureMonitor: Update UI to experimental package (#52123)

* feat: make azure experimental the default

* feat: combine metrics query editor rows

fix: linter errors

* chore: remove test loop for DimensionFields test

(cherry picked from commit 5d199a40b7)

* chore: update .betterer

Co-authored-by: Adam Simpson <adam@adamsimpson.net>
2022-07-14 14:01:33 +00:00
Grot (@grafanabot)
54b8bee3cc fix: set RGL wrapper height to auto to remove empty space below the panel (#52122) (#52224)
(cherry picked from commit 77e87f1806)

Co-authored-by: Leo <108552997+lpskdl@users.noreply.github.com>
2022-07-14 13:47:00 +02:00
Grot (@grafanabot)
dfca52c4fb Panels: Prevent panel content from escaping its bounds (#52167) (#52217)
(cherry picked from commit 3131d12738)

Co-authored-by: kay delaney <45561153+kaydelaney@users.noreply.github.com>
2022-07-14 06:34:18 -04:00
kay delaney
262720a702 Export: Fix export/import of dash with library panels (#49319) (#51760)
(cherry picked from commit 8053f770c1)
2022-07-14 11:17:12 +01:00
Grot (@grafanabot)
f00f6e3375 Alerting: fix validation of alertmanager template. (#51538) (#52210)
without setting function map from alertmanager we receive error:
method=PUT path=/api/v1/provisioning/templates/slack.message status=400
level=error msg="invalid object specification: invalid template: template: :1: function \"toUpper\" not defined"

So for validation we should use the same settings as alertmanager do
for templates internally.

(cherry picked from commit b54da68765)

Co-authored-by: Michał Zielonka <michal.zielonka.8001@gmail.com>
2022-07-14 06:11:14 -04:00
Grot (@grafanabot)
314b932ab8 Alerting: Fix bug where state did not change between Alerting and Error (#52204) (#52209)
This commit fixes a bug where the state did not change from Alerting to Error if the evaluation result returned an error, or from Error to Alerting if evaluations stopped returning errors.

(cherry picked from commit 34d45977ca)

Co-authored-by: George Robinson <george.robinson@grafana.com>
2022-07-14 06:10:39 -04:00
Grot (@grafanabot)
5018784717 Chore: Remove any that was introduced in a test (#52203) (#52206)
(cherry picked from commit cabdfb4811)

Co-authored-by: Josh Hunt <joshhunt@users.noreply.github.com>
2022-07-14 05:52:41 -04:00
Grot (@grafanabot)
708753244a Documentation: Show that admin/pause-all-alerts is only for legacy. (#51862) (#52019)
Fixes #51728

(cherry picked from commit b808cd4432)

Co-authored-by: Joe Blubaugh <joe.blubaugh@grafana.com>
2022-07-14 17:10:57 +08:00
Polina Boneva
10f3ad8c13 remove event.stopPropagation(), so that when one menu opens, all others close; (#51557) (#51807)
Put the ClickOutsideWrapper further out in the PanelHeader, so it doesn't catch itself when clicking on the panel header above the menu;

co-authored with @glintik

(cherry picked from commit 556f312b00)
2022-07-14 12:05:25 +03:00
Alexander Weaver
f4e7d0d261 Alerting: Provisioning API respects global rule quota (#52190)
* Alerting: Provisioning API respects global rule quota (#52180)

* Inject interface for quota service and create mock

* Check quota and return 403 if limit exceeded

* Implement tests for quota being exceeded

(cherry picked from commit 2d7389c34d)

* backport error check

Co-authored-by: Jean-Philippe Quémémer <jeanphilippe.quemener@grafana.com>
2022-07-14 10:59:04 +02:00
Grot (@grafanabot)
9457f67210 Alerting: Disable /api/admin/pause-all-alerts with Unified Alerting (#51895) (#52077)
/api/admin/pause-all-alerts only takes effect for legacy alerts. This
change returns a 403 if it's called when legacy alerting is disabled.

Fixes #51729

(cherry picked from commit 0cbc14961a)

Co-authored-by: Joe Blubaugh <joe.blubaugh@grafana.com>
2022-07-14 16:58:37 +08:00
Grot (@grafanabot)
9a7acc9fd2 Logs: Fixed LogContext being underneath the table (#52165) (#52202)
(cherry picked from commit 63776d5a0e)

Co-authored-by: Sven Grossmann <Svennergr@gmail.com>
2022-07-14 10:53:48 +02:00
Grot (@grafanabot)
63eb9a94a1 AzureMonitor: Improve handling of unsupported template variable cases in URIs (#52054) (#52201)
* Set error message for certain template variable combinations

- Make use of setError method from query editor
- Update Azure Monitor error type
- Add test for case 2 from https://github.com/grafana/grafana/pull/51331

* Update template variable docs

* Fix lint issues

* Update docs/sources/datasources/azuremonitor/template-variables.md

Co-authored-by: Garrett Guillotte <100453168+gguillotte-grafana@users.noreply.github.com>

* PR comment updates

Co-authored-by: Garrett Guillotte <100453168+gguillotte-grafana@users.noreply.github.com>
(cherry picked from commit a4d33a0f43)

Co-authored-by: Andreas Christou <andreas.christou@grafana.com>
2022-07-14 04:42:08 -04:00
Grot (@grafanabot)
8664af1ad3 Docs: fixes data source links (#52196) (#52199)
* Docs: fixes data source links

* fixes unified alerting redirect

(cherry picked from commit 07e03666ad)

Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com>
2022-07-14 10:20:22 +02:00
Grot (@grafanabot)
363fa7ca46 combines table viz docs (#52176) (#52187)
(cherry picked from commit 2520d8f827)

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
2022-07-13 17:17:19 -05:00
Grot (@grafanabot)
aabd98852a Fix the bug in navbar's active item when the root url include a subpath (#51767) (#52159)
(cherry picked from commit 7c5ba889a4)

Co-authored-by: Kian Eliasi <kian.elbo@gmail.com>
2022-07-13 10:50:44 -04:00
Konrad Lalik
d609ebd78f Use non-blocking way of fetching ruler api availability (#52102) (#52138)
Co-authored-by: Joe Blubaugh <joe.blubaugh@grafana.com>
2022-07-13 12:34:58 +02:00
Grot (@grafanabot)
4652401964 SQLstore: Fix fetching an inexistent playlist response (#51962) (#52139)
* SQLstore: Fix fetching and deleting an inexistent playlist

xorm's session.Get() does not return an error if the raw does not exist.
It returns a boolean instead.
The playlist `sqlstore.GetPlaylist()` used to check only the error and in case
of inexistent UID didn't return an error.

(cherry picked from commit 4ff0f006dd)

Co-authored-by: Sofia Papagiannaki <1632407+papagian@users.noreply.github.com>
2022-07-13 06:13:38 -04:00
Grot (@grafanabot)
f3f66f6325 API: Do not validate/save legacy alerts when saving a dashboard if legacy alerting is disabled (#51883) (#52137)
* API: Do not validate/save legacy alerts if legacy alerting is disabled

Co-authored-by: Ida Furjesova <ida.furjesova@grafana.com>
(cherry picked from commit b3992df988)

Co-authored-by: Sofia Papagiannaki <1632407+papagian@users.noreply.github.com>
2022-07-13 05:52:32 -04:00
Joey Tawadrous
7d8fbb83f4 [v9.0.x] Splunk: Use legacy annotation runner (#52079) 2022-07-13 09:27:58 +01:00
Grot (@grafanabot)
d351b07795 Logs: Fixed wrapping log lines from detected fields (#52108) (#52131)
* fixed wrap in detected fields

* removed cx

(cherry picked from commit 05ba08fd8b)

Co-authored-by: Sven Grossmann <Svennergr@gmail.com>
2022-07-13 03:38:33 -04:00
Grot (@grafanabot)
8eda9c96d3 fix docs with correct instructions to create a silence URL (#52062) (#52112)
(cherry picked from commit f4606faec2)

Co-authored-by: Yuriy Tseretyan <yuriy.tseretyan@grafana.com>
2022-07-12 11:51:26 -04:00
Brendan O'Handley
be3db07bd4 Prometheus datasource: query builder freezes when metrics metadata is undefined (#51929) (#52058)
* add error handling for prom query builder returning undefined metrics metadata

* remove reference to escalation

(cherry picked from commit e51187a474)
2022-07-12 10:26:51 -04:00
Grot (@grafanabot)
4e8cd49e08 Fix relrefs in devloper docs (#51942) (#51995)
(cherry picked from commit 1c6ee69c2d)

Co-authored-by: Garrett Guillotte <100453168+gguillotte-grafana@users.noreply.github.com>
2022-07-11 16:38:33 -07:00
Grot (@grafanabot)
82f7490f7e Alerting: Allow filtering of contact points by name (#51933) (#52070)
* Define query param and regenerate

* Add query struct for contact points

* Filter contact points by name in query

* Document that name filter is optional

(cherry picked from commit 0e066dd5f8)

Co-authored-by: Alexander Weaver <weaver.alex.d@gmail.com>
2022-07-11 18:26:35 -04:00
Grot (@grafanabot)
b016c0aec4 BarChart: fix crash when checking bar value text overlap (#52061) (#52064)
(cherry picked from commit 254159ad69)

Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
2022-07-11 14:01:53 -04:00
Leon Sorokin
5789a04e35 GraphNG: uPlot 1.6.22 (#51945) (#51992)
(cherry picked from commit fda7f064ad)

# Conflicts:
#	yarn.lock
2022-07-11 10:55:06 -05:00
Grot (@grafanabot)
ef5372d317 AzureMonitor: Update resource and namespace metadata. (#52030) (#52053)
Fixes #52028

(cherry picked from commit 1f3ff08482)

Co-authored-by: despian <mfamphlett@gmail.com>
2022-07-11 11:31:33 -04:00
Joey Tawadrous
f6147c8ece Fixed cherry-pick conflicts (#52037) 2022-07-11 15:56:02 +01:00
Grot (@grafanabot)
1d6b044c48 refactors all dashboard and linking content (#52005) (#52042)
(cherry picked from commit 94175a801a)

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
2022-07-11 07:52:25 -05:00
Grot (@grafanabot)
23ff480957 Loki: Fix suggesting operations from different category (#52034) (#52041)
(cherry picked from commit 0a2a370b77)

Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
2022-07-11 08:42:53 -04:00
Grot (@grafanabot)
d67c1004f7 Docs: new data sources topic (#51863) (#51898)
* Docs: new datasources topic

* Update docs/sources/alerting/fundamentals/data-source-alerting.md

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

* Update docs/sources/alerting/fundamentals/data-source-alerting.md

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

* corrects relrefs

Co-authored-by: George Robinson <george.robinson@grafana.com>
(cherry picked from commit f6f017edc2)

Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com>
2022-07-11 13:28:21 +01:00
Grot (@grafanabot)
36b06b90ff Table: Fix scrollbar is hidden by pagination (#51501) (#51960)
* Table: Pagination fix centering

* Table: Fix scrollbar is hidden by pagination

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

Co-authored-by: Zoltán Bedi <zoltan.bedi@gmail.com>
2022-07-11 09:22:55 +02:00
Grot (@grafanabot)
7e5a7fc7fc Alerting: Add method to reset notification policy tree back to the default (#51934) (#52004)
* Define route and run codegen

* Wire up HTTP layer

* Update API layer and test fakes

* Implement reset of policy tree

* Implement service layer test and authorization bindings

* API layer testing

* Be more specific when injecting settings

(cherry picked from commit fce283d73e)

Co-authored-by: Alexander Weaver <weaver.alex.d@gmail.com>
2022-07-08 16:39:49 -05:00
Adam Simpson
08f72f214e CloudWatch: Remove simplejson in favor of 'encoding/json' (#51062) (#51999)
(cherry picked from commit 05cdef5004)
2022-07-08 20:03:11 +00:00
Grot (@grafanabot)
48f1752e43 FeatureFlags: omit metric when grafana cant run the feature (#51856) (#51981)
(cherry picked from commit 704a602d8c)

Co-authored-by: Stephanie Hingtgen <stephanie.hingtgen@grafana.com>
2022-07-08 10:52:07 -06:00
Christopher Moyer
07cc627e10 adds shared content (#51982) (#51986)
(cherry picked from commit 7f70be0580)
2022-07-08 11:08:37 -05:00
Alexander Weaver
2b23445b42 Fix consistency errors and regenerate (#51935) (#51985)
(cherry picked from commit d77731646c)
2022-07-08 11:00:33 -05:00
Grot (@grafanabot)
25ca7c3ed8 Loki: Add missing operators in label filter expression (#51880) (#51972)
(cherry picked from commit 99fb29850e)

Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
2022-07-08 17:47:47 +02:00
Grot (@grafanabot)
c50ac22022 Plugins: InfluxDB update time range query (#51833) (#51927)
(cherry picked from commit 8deb17fdc4)

Co-authored-by: ismail simsek <ismailsimsek09@gmail.com>
2022-07-08 16:21:40 +02:00
Grot (@grafanabot)
c086ae990d Azure Monitor: Add support to migrate some queries with template variables (#51881) (#51899)
(cherry picked from commit 438c76252a)

Co-authored-by: Andres Martinez Gotor <andres.martinez@grafana.com>
2022-07-08 04:37:17 -04:00
Grot (@grafanabot)
6c9ed9a759 Alerting: Fix RegExp matchers in frontend for Silences and other previews. (#51726) (#51873)
(cherry picked from commit d99a7334d5)

Co-authored-by: Joe Blubaugh <joe.blubaugh@grafana.com>
2022-07-08 10:42:43 +08:00
Grot (@grafanabot)
91585c7719 Plugins: InfluxDB datasource - set epoch query param value as "ms" (#51651) (#51926)
(cherry picked from commit 3d68023606)

Co-authored-by: ismail simsek <ismailsimsek09@gmail.com>
2022-07-07 19:25:08 +02:00
Grot (@grafanabot)
2a25dc7ab8 Rendering: Fix user information when using render key (#50879) (#51920)
* Rendering: Fix user information when using render key

* fix when render user ID is 0

* update fix

* improve fix

* add comment

(cherry picked from commit ca80865bf1)

Co-authored-by: Agnès Toulet <35176601+AgnesToulet@users.noreply.github.com>
2022-07-07 19:02:09 +02:00
ismail simsek
f3ddc42358 [v9.0.x] Plugins: InfluxDB variable interpolation fix (#51917) (#51922)
* Plugins: InfluxDB variable interpolation fix (#51917)

* Don't use regex on flux mode while applying template variables

(cherry picked from commit 885c517983)
2022-07-07 11:51:58 -04:00
Grot (@grafanabot)
a35e7f0bf5 Plugins: InfluxDB variable interpolation fix for influxdbBackendMigration feature flag (#51624) (#51834)
(cherry picked from commit 9941e06e22)

Co-authored-by: ismail simsek <ismailsimsek09@gmail.com>
2022-07-07 17:22:00 +02:00
Grot (@grafanabot)
62e0a2c561 Time series panel: Fix an issue with stacks being not complete due to the incorrect data frame length (#51910) (#51915)
* Test failure

* Fix

(cherry picked from commit 5a65a12278)

Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
2022-07-07 07:45:02 -07:00
Grot (@grafanabot)
6e86f5dcf7 Docs: Improve docs for differences and limitations (#51905) (#51909)
(cherry picked from commit 2b2c09b8d5)

Co-authored-by: George Robinson <george.robinson@grafana.com>
2022-07-07 15:16:33 +01:00
Grot (@grafanabot)
35a4b56e33 Docs: Improve docs for images in notifications (#51900) (#51906)
(cherry picked from commit ef1fb9d3a3)

Co-authored-by: George Robinson <george.robinson@grafana.com>
2022-07-07 14:49:06 +01:00
idafurjes
59dbbb41f8 Do not check permissions while deleting external snapshot (#51897) (#51904)
(cherry picked from commit ee88b44458)
2022-07-07 15:45:32 +02:00
Grot (@grafanabot)
e4abc7b9f1 Chore: Fix CVE-2021-3807 (#51753) (#51803)
(cherry picked from commit 0c04fe16aa)

Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com>
2022-07-07 15:33:45 +02:00
Grot (@grafanabot)
02220a6c51 Chore: Fix CVE-2022-0155 (#51755) (#51793)
(cherry picked from commit c1ef68535b)

Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com>
2022-07-07 15:32:28 +02:00
Grot (@grafanabot)
d085ae7df3 Chore: Fix CVE-2020-7753 (#51752) (#51792)
(cherry picked from commit f14cdc712c)

Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com>
2022-07-07 15:30:38 +02:00
Grot (@grafanabot)
5f8a71e8c6 Chore: Fix CVE-2021-3918 (#51745) (#51791)
(cherry picked from commit 73e7a1cc92)

Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com>
2022-07-07 15:28:46 +02:00
Grot (@grafanabot)
a1ea62cce9 [v9.0.x] Bar chart: Fix stacking bug when data produces 0 accumulators (#51808)
* Bar chart: Fix stacking bug when data produces 0 accumulators (#51450)

* Don't divide by 0 ...

* Add test panel to gdev dashboard

(cherry picked from commit daf0e3cb4e)

* betterer

* Fix cue

Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
2022-07-07 06:16:39 -07:00
Grot (@grafanabot)
70f9ff79d3 AzureMonitor: Update curated dashboards (#51331) (#51882)
* Ensure resource name is appended to URI

* Add storage account check to ensure default subresource is appended

* Update storage dashboard

* Bump storage version

* Remove ADX StreamingIngestRequestRate panel as the metric is unavailable

* Refactor condition for storage namespaces

* Add more tests for URI builder

* Do not migrate resource URI if resource name or metric definition uses template variables

* Revert change to metricNamespace

(cherry picked from commit 0a6eeaa636)

Co-authored-by: Andreas Christou <andreas.christou@grafana.com>
2022-07-07 12:58:05 +01:00
Grot (@grafanabot)
11c15f3bfa [v9.0.x] Plugins: Register management endpoints only when external managed is also false (#51817)
* Plugins: Register management endpoints only when external managed is also false (#51802)

* Only define plugin install endpoints when catalog enabled

* add external check

(cherry picked from commit 40dff288cd)

* fix test

Co-authored-by: Will Browne <wbrowne@users.noreply.github.com>
Co-authored-by: Will Browne <will.browne@grafana.com>
2022-07-07 11:19:32 +02:00
Grot (@grafanabot)
65f31f978c Fixed broken link for supported namespaces (#51302) (#51868)
(cherry picked from commit a802e84772)

Co-authored-by: Yaelle Chaudy <42030685+yaelleC@users.noreply.github.com>
2022-07-07 11:15:12 +02:00
Grot (@grafanabot)
e4158d654d Add doc-validator tool to CI (#51698) (#51869)
* Add doc-validator tool to CI

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

* Use simpler apostrophe to make title match h1

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

* Ensure doc-validator CI always passes until all errors are resolved

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

Co-authored-by: Jack Baldry <jack.baldry@grafana.com>
2022-07-07 09:23:08 +01:00
Grot (@grafanabot)
82269e8520 Fixes tooltip issue with time picker and dashboard settings (#51836) (#51842)
(cherry picked from commit 777f0d532a)

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
2022-07-07 07:31:59 +02:00
Grot (@grafanabot)
1470e3db18 fix broken links (#51821) (#51824)
(cherry picked from commit 93e2a0eddc)

Co-authored-by: Santiago <santiagohernandez.1997@gmail.com>
2022-07-06 13:23:07 -03:00
Yuriy Tseretyan
dbe2925564 Chore: Update ConcreteLogger to implement gokit Logger interface (#51599) (#51648)
# Conflicts:
#	pkg/infra/log/log.go
2022-07-06 11:49:36 -04:00
Grot (@grafanabot)
7ab58de091 Docker: Update glibc version (#51107) (#51826)
(cherry picked from commit c12d1727f0)

Co-authored-by: Emil Tullstedt <emil.tullstedt@grafana.com>
2022-07-06 11:47:22 -04:00
Grot (@grafanabot)
18ea87a598 Histogram: filter nulls, bucket-adaptive xAxis decimals (#51773) (#51823)
(cherry picked from commit 173636aa61)

Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
2022-07-06 11:28:23 -04:00
Grot (@grafanabot)
98b3d1e7b6 Loki: Fix error when changing operations with different parameters (#51779) (#51820)
* copy defaultParams when changing an operation

* add type and name comparison

* removed name check

(cherry picked from commit 663f3fcd2a)

Co-authored-by: Sven Grossmann <Svennergr@gmail.com>
2022-07-06 17:19:10 +02:00
Grot (@grafanabot)
8c2a855dee BarChart: fix explicit yAxis min (#51768) (#51811)
(cherry picked from commit d122449a97)

Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
2022-07-06 08:59:00 -04:00
Grot (@grafanabot)
2ef79e5856 devenv: influxdb: fix config (#51781) (#51799)
(cherry picked from commit df9f86190f)

Co-authored-by: Gábor Farkas <gabor.farkas@gmail.com>
2022-07-06 07:38:26 -04:00
Grot (@grafanabot)
90645be45e Chore: Plugin CI E2E image update (#51787) (#51794)
(cherry picked from commit efdd999e03)

Co-authored-by: Sriram <yesoreyeram@gmail.com>
2022-07-06 12:09:15 +01:00
Grot (@grafanabot)
b73d85fdd8 Only define plugin install endpoints when catalog enabled (#51788) (#51790)
(cherry picked from commit ba9fc10a74)

Co-authored-by: Will Browne <wbrowne@users.noreply.github.com>
2022-07-06 11:28:08 +02:00
Grot (@grafanabot)
e4c9e573cb Traces: Trace to logs fix (#51053) (#51778)
* Fix to set isSplunkDS

* Remove comment

* Updated betterer.results

(cherry picked from commit 2970c6db37)

Co-authored-by: Joey Tawadrous <90795735+joey-grafana@users.noreply.github.com>
2022-07-06 09:04:53 +01:00
Grot (@grafanabot)
49c0d9c763 Docs: Add and organize panels (#51763) (#51764)
* combines topics into add and organize panels topic

* updates front matter

* fixes relrefs

* fixes typo

* Update docs/sources/dashboards/add-organize-panels.md

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

* Update docs/sources/dashboards/add-organize-panels.md

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

* make prettier

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

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
2022-07-05 13:10:35 -05:00
Alexander Weaver
96c7f6e9ed Alerting: Add method to provisioning API for obtaining a group and its rules (#51398) (#51761)
* Generate shell for new route

* Propagate path parameters

* Implement route logic

* Add a couple simple tests

* Use NotFound error for not found, avoid returning pointer

* Regenerate

(cherry picked from commit b9c7eb1380)
2022-07-05 12:47:41 -05:00
Grot (@grafanabot)
7955efc62f Altering: validate that the mute time intervals exist when updating routing tree (#51573) (#51762)
* validate that the mute time intervals exist when updating routing tree

* run lint

* add tests

(cherry picked from commit 4a76436be2)

Co-authored-by: Jean-Philippe Quéméner <JohnnyQQQQ@users.noreply.github.com>
2022-07-05 13:26:38 -04:00
Grot (@grafanabot)
7f5dec12bd Alerting: validate that the receiver exist when updating routing tree (#51561) (#51758)
* Alerting: validate that the receiver exist when updating routing tree

* rename interface

* add missing file

* change constructor

* fix e2e tests

* only import package once

* add unit test for bug

* wording

* close response body

* Update pkg/services/ngalert/api/tooling/definitions/alertmanager_validation.go

* refactor to remove database roundtrip

(cherry picked from commit e64cde8727)

Co-authored-by: Jean-Philippe Quéméner <JohnnyQQQQ@users.noreply.github.com>
2022-07-05 12:47:11 -04:00
Grot (@grafanabot)
2f76963700 Docs: Manage library panels refactor (#51661) (#51740)
* merges library panel content into a single topic

* updates menuTite

* fixes typo

* removed Grafana from task titles

(cherry picked from commit 7eec92988e)

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
2022-07-05 07:55:50 -05:00
Grot (@grafanabot)
17be86126c CloudMonitor: Correctly encode default project response (#49510) (#51734)
(cherry picked from commit ccb8888055)

Co-authored-by: Andreas Christou <andreas.christou@grafana.com>
2022-07-05 06:31:52 -04:00
Grot (@grafanabot)
d45e8fd6e7 TimeSrv: Don't modify refresh interval when editing panel (#51718) (#51732)
(cherry picked from commit d4eef3bd76)

Co-authored-by: kay delaney <45561153+kaydelaney@users.noreply.github.com>
2022-07-05 05:40:49 -04:00
Ivan Ortega Alba
5860091328 DashboardRow: collapse shortcut doesn't allow to move the row (#51589) (#51713)
(cherry picked from commit f8ac160545)
2022-07-05 09:12:25 +02:00
Grot (@grafanabot)
d990511121 TestDataDB: update CSV wave scenario ui (#51719) (#51725)
* update testdb csv wave

* support enter key

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

Co-authored-by: Sriram <yesoreyeram@gmail.com>
2022-07-05 07:22:23 +01:00
Grot (@grafanabot)
c2985f3c05 template functions reference and examples moved to corresponding section, description and links fixed (#51654) (#51721)
(cherry picked from commit 9797744c10)

Co-authored-by: Santiago <santiagohernandez.1997@gmail.com>
2022-07-04 15:49:04 -03:00
Grot (@grafanabot)
b618b64677 [v9.0.x] Chore: Make betterer tests more stable (#51706)
* Chore: Make betterer tests more stable (#51703)

* rewrite eslint test to not care about position of errors

* changing file contents shouldn't require a betterer.results update

* fix up eslint test

* fix the undocumented stories test

* ignore .test.ts files as well

(cherry picked from commit 986b766ca0)

* results...

Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2022-07-04 07:30:33 -04:00
Grot (@grafanabot)
86ebea2422 StateTimeline: Try to sort time field (#51569) (#51689)
* StateTimeline: Try to sort time field

* Sort frame earlier

(cherry picked from commit ebb9025669)

Co-authored-by: Zoltán Bedi <zoltan.bedi@gmail.com>
2022-07-04 04:26:06 -04:00
Grot (@grafanabot)
f07abe2cd2 Docs: adds new alerting diagram (#51638) (#51642)
* Docs:adds new alerting diagram

* Update docs/sources/alerting/_index.md

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

Co-authored-by: Jack Baldry <jack.baldry@grafana.com>
(cherry picked from commit 64a2c4783f)

Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com>
2022-07-04 09:09:10 +01:00
Grot (@grafanabot)
964adae477 Alerting: Remove withStoredImage and change forEachFunc (#51384) (#51641)
(cherry picked from commit 7fea330dc1)

Co-authored-by: George Robinson <george.robinson@grafana.com>
2022-07-01 10:18:21 +02:00
Grot (@grafanabot)
517627a94d Alerting: Better metrics and renamed BrowserScreenshotService (#51564) (#51649)
(cherry picked from commit d59db0b8e6)

Co-authored-by: George Robinson <george.robinson@grafana.com>
2022-06-30 18:36:20 +01:00
Grot (@grafanabot)
78cbcf74d1 Alerting: Fix normalization of alert states for panel annotations (#51637) (#51644)
A bug introduced by #49259 would crash the annotations view of a panel with a linked alert rule. States are now normalized so crashes won't occur and the base state is used instead.

(cherry picked from commit d63ffa314e)

Co-authored-by: Gilles De Mey <gilles.de.mey@gmail.com>
2022-06-30 11:01:08 -04:00
Jguer
c5aa4f4869 Fix: Choose Lookup params per auth module (#395)
Co-authored-by: Karl Persson <kalle.persson@grafana.com>

Fix: Prefer pointer to struct in lookup

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

Fix: user email for ldap

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

Fix: Use only login for lookup in LDAP

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

Fix: use user email for ldap

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

fix remaining test

fix nit picks
2022-06-30 15:19:25 +03:00
Grot (@grafanabot)
e4e3588400 [v9.0.x] Chore: some low-hanging type assertion fruit (#51620)
* Chore: some low-hanging type assertion fruit (#51618)

* some low-hanging type assertion fruit

* results

(cherry picked from commit 2a6b32598d)

* results

Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2022-06-30 06:28:17 -04:00
Grot (@grafanabot)
a33da9ebff Alerting: Fix documentation for Grafana 9.0 (#51614) (#51619)
(cherry picked from commit c8fa4a9397)

Co-authored-by: George Robinson <george.robinson@grafana.com>
2022-06-30 10:56:20 +01:00
Grot (@grafanabot)
0f72474e4e Annotations: Use point marker for short time range annotations (#51520) (#51617)
* Use point annotation marker for short time range annotations

* Properly align small region marker

(cherry picked from commit d429cac27b)

Co-authored-by: Kyle Cunningham <codeincarnate@users.noreply.github.com>
2022-06-30 05:26:28 -04:00
Grot (@grafanabot)
12f83be132 [v9.0.x] Chore: keep the betterer message generic (#51613)
* keep the betterer message generic (#51563)

(cherry picked from commit 67802e64e6)

* update betterer

Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2022-06-30 04:24:07 -04:00
Grot (@grafanabot)
f7ff12bf64 Alerting: Improvements to image package (#51576) (#51598)
This commit makes a number of improvements to the image package:

- Improved comments
- Return the correct error when a dashboard does not exist
- Set a timeout in context.Context

(cherry picked from commit fe797dcfdc)

Co-authored-by: George Robinson <george.robinson@grafana.com>
2022-06-30 07:11:53 +01:00
Grot (@grafanabot)
a3503ddc67 fixes broken relrefs (#51572) (#51603)
(cherry picked from commit d4f94ea48d)

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
2022-06-29 17:13:53 -05:00
Grot (@grafanabot)
3c3f3a498a Search: Refine clear tags UI #51590 (#51592)
(cherry picked from commit b0f1d35708)

Co-authored-by: Nathan Marrs <nathanielmarrs@gmail.com>
2022-06-29 14:34:34 -04:00
Grot (@grafanabot)
f9724ef34c Annotations: Fix custom tag functionality (#51537) (#51588)
(cherry picked from commit 35240f6d5a)

Co-authored-by: Nathan Marrs <nathanielmarrs@gmail.com>
2022-06-29 10:52:44 -07:00
Ashley Harrison
09be340848 Chore: Backport 51543 to v9.0.x (#51562)
* Chore: split betterer into it's own CI step and allow failures for now (#51543)

* split betterer into it's own CI step and allow failures for now

* Run make drone

Co-authored-by: dsotirakis <dimitrios.sotirakis@grafana.com>
(cherry picked from commit f654152dc8)

* Run make drone

Co-authored-by: dsotirakis <dimitrios.sotirakis@grafana.com>
2022-06-29 16:35:35 +01:00
Grot (@grafanabot)
53a3dca76c LibraryElements: Delete invalid connections before deleting element (#50519) (#51550)
(cherry picked from commit 189b7f9c0b)

Co-authored-by: kay delaney <45561153+kaydelaney@users.noreply.github.com>
2022-06-29 16:19:01 +01:00
Grot (@grafanabot)
fb24f7de8c Docs: combines use dashboard content into single topic (#51527) (#51554)
* combines use dashboard content into single topic

* Some minor updates

* corrects spelling

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

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
2022-06-29 08:49:11 -05:00
Grot (@grafanabot)
121d398022 Variables: variables in Markdown links are not interpolated (#51392) (#51546)
* on a text panel first interpolate, then markdown, then sanitize;

* update devenv dashboard + e2e tests

* fix typo and undo changes in grafana/data

* handling of config option disableSanitizeHtml more readable when preparing markdown in text panel

* betterer

Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
(cherry picked from commit f83f05d6b3)

Co-authored-by: Polina Boneva <13227501+polibb@users.noreply.github.com>
2022-06-29 15:46:45 +03:00
Grot (@grafanabot)
f8d19746f6 Chore: add a betterer test for undocumented stories (#51444) (#51545)
* add a betterer test for undocumented stories

* update results

* Update .betterer.ts

Co-authored-by: Levente Balogh <balogh.levente.hu@gmail.com>

* update results

* prettier

* slightly nicer regexp

Co-authored-by: Levente Balogh <balogh.levente.hu@gmail.com>
(cherry picked from commit 688164bbd6)

Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2022-06-29 07:53:55 -04:00
Grot (@grafanabot)
169646b780 Alerting: Remove duplicate error message (#51515) (#51540)
(cherry picked from commit ed56755dd7)

Co-authored-by: George Robinson <george.robinson@grafana.com>
2022-06-29 10:21:24 +01:00
Grot (@grafanabot)
37a58f8af5 Templating: Changing between variables with the same name now correctly triggers a dashboard refresh (#51490) (#51539)
* user essentials mob! 🔱

* user essentials mob! 🔱

lastFile:public/app/features/variables/pickers/OptionsPicker/actions.ts

* user essentials mob! 🔱

lastFile:public/app/features/variables/pickers/OptionsPicker/actions.test.ts

* linting

* update betterer

Co-authored-by: kay delaney <kay@grafana.com>
(cherry picked from commit 683bbc7373)

Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2022-06-29 05:02:27 -04:00
Grot (@grafanabot)
5a626418d7 moves custom branding to configuration (#51522) (#51523)
(cherry picked from commit f59a4d51cd)

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
2022-06-28 14:45:29 -05:00
Grot (@grafanabot)
cb9411d64a Docs: renames tracing topics, moves to configure docs (#51519) (#51521)
* renames tracing topics, moves to configure docs

* changes enable diagnostics file name

(cherry picked from commit 5eb35e1b78)

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
2022-06-28 12:37:55 -05:00
Grot (@grafanabot)
d4e57ea5ef ReleaseNotes: Updated changelog and release notes for 9.0.2 (#51507) (#51509)
(cherry picked from commit 744fc4c802)
2022-06-28 16:14:14 +01:00
Grot (@grafanabot)
2cc1c3196d "Release: Updated versions in package to 9.0.2" (#51505) 2022-06-28 16:02:09 +01:00
Grot (@grafanabot)
afc0318ac8 E2E: default download to grafana enterprise (#51473) (#51485)
In plugin E2E, changing the default download to enterprise version of grafana.

(cherry picked from commit 5aab8b710b)

Co-authored-by: Sriram <yesoreyeram@gmail.com>
2022-06-28 06:33:16 -04:00
Gilles De Mey
1e9b32778e Alerting: Skip the default data source if incompatible (#51452) (#51486) 2022-06-28 05:11:59 -04:00
Grot (@grafanabot)
bc294261f9 Alerting: Add support for images in Telegram (#51433) (#51482)
(cherry picked from commit 5053468c65)

Co-authored-by: George Robinson <george.robinson@grafana.com>
2022-06-28 10:06:52 +01:00
Grot (@grafanabot)
c9cd00c1be Alerting: Add support for images in Pushover alerts (#51372) (#51483)
(cherry picked from commit f04dfc589c)

Co-authored-by: George Robinson <george.robinson@grafana.com>
2022-06-28 10:06:44 +01:00
Eric Leijonmarck
5735f6c88b [v9.0.x] Auth: Case insensitive ids duplicate usagestats (#51240)
* merged and backport to 9.0

* implement the missing method GetDialect for sqlStore

* Add back mockstore missing methods
2022-06-28 11:03:53 +02:00
Grot (@grafanabot)
6dcb1b07c0 Prometheus: Add test for resource call header handling (#51036) (#51046)
* Add test

* Remove unused test

(cherry picked from commit 677b2a43b5)

Co-authored-by: Andrej Ocenas <mr.ocenas@gmail.com>
2022-06-28 10:57:17 +02:00
Grot (@grafanabot)
5b390de1b6 Alerting: Add legacy indicator to navbar (#49511) (#49614)
* update id and add translation key

* remove logs

(cherry picked from commit e3a51a4aa8)

Co-authored-by: Peter Holmberg <peterholmberg@users.noreply.github.com>
Co-authored-by: Peter Holmberg <peter.hlmbrg@gmail.com>
2022-06-28 10:38:58 +02:00
Grot (@grafanabot)
c343547467 [v9.0.x] Docs CI: Fix CHANGELOG.md - add *.md in checkDocs (#50721)
* Fix docs - add *.md checks (#50720)

(cherry picked from commit 2dfa3270ef)

* Fix changelog

Co-authored-by: Dimitris Sotirakis <sotirakis.dim@gmail.com>
Co-authored-by: dsotirakis <dimitrios.sotirakis@grafana.com>
2022-06-28 03:34:25 -04:00
Grot (@grafanabot)
5e8c61b979 Alerting: change optimistic lock to use proper insert select (#51461) (#51466)
* Alerting: change optimistic lock to proper insert select

* remove debug logging

* fix postgres

* fix mysql

* remove empty line for go-lint

* add some docs

* use constants

(cherry picked from commit cd0fefec5b)

Co-authored-by: Jean-Philippe Quéméner <JohnnyQQQQ@users.noreply.github.com>
2022-06-27 18:34:50 -04:00
Grot (@grafanabot)
1cb7a6fcb0 Optional custom title and description for OpsGenie (#50131) (#51427)
* optional custom description for OpsGenie

* custom title and message, tests

* update changelog

* check for empty / whitespace only strings

* truncate the title to 130 characters if needed

* unnecessary validation removed

* truncate title to 127 characters and add three dots

(cherry picked from commit 9dc7e752b7)

Co-authored-by: Santiago <santiagohernandez.1997@gmail.com>
2022-06-27 22:48:40 +03:00
Grot (@grafanabot)
3cd7eac137 Alerting: prevent the use of the same uid across all contact points (#51440) (#51458)
* Alerting: prevent the use of the same uid across all contact points

* Update pkg/services/ngalert/provisioning/contactpoints.go

Co-authored-by: Yuriy Tseretyan <yuriy.tseretyan@grafana.com>

Co-authored-by: Yuriy Tseretyan <yuriy.tseretyan@grafana.com>
(cherry picked from commit bf255965a2)

Co-authored-by: Jean-Philippe Quéméner <JohnnyQQQQ@users.noreply.github.com>
2022-06-27 13:11:41 -04:00
Joao Silva
c23fc1c84e Dashboards: Fixes issue with the initial panel layout counting as an unsaved change (#51439) 2022-06-27 14:19:37 +01:00
Grot (@grafanabot)
504ecbd4f9 Plugins: Improved handling of symlinks (#51324) (#51431)
Improves how we handle symlinks in plugin management.

(cherry picked from commit 04df634ef5)

Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
2022-06-27 06:41:51 -04:00
Marcus Efraimsson
e037f7ace7 [v9.0.x] Plugins: Use a Grafana specific SDK logger implementation for core plugins (#51229) (#51325)
* Plugins: Use a Grafana specific SDK logger implementation for core plugins (#51229)

Upgrade grafana-aws-sdk to v0.10.6

(cherry picked from commit a8eb29f1d7)

* fix go.mod go.sum
2022-06-27 12:22:28 +02:00
Grot (@grafanabot)
813b3873f5 [v9.0.x] Alerting: adds additional command palette actions (#51429)
Co-authored-by: Kristina Durivage <kristina.durivage@grafana.com>
Co-authored-by: Gilles De Mey <gilles.de.mey@gmail.com>
2022-06-27 06:10:22 -04:00
Grot (@grafanabot)
896396e04b [v9.0.x] Alerting: Use relative path for flow chart image (#51426)
Co-authored-by: Patrick Baus <github@maat-family.de>
2022-06-27 12:01:28 +02:00
Ashley Harrison
5d9905cc82 Chore: reintroduce type assertion test + change emitted metric names … (#51421)
* Chore: reintroduce type assertion test + change emitted metric names (#51375)

* reintroduce type assertion test + change emitted metric names

* rename test to better eslint to be more generic

(cherry picked from commit 0124dc8e6b)

* don't use --cache

* update betterer results
2022-06-27 10:32:14 +01:00
Timur Olzhabayev
a86f63e69f Updating migration docs and adding hint about polystat panel (#51367) (#51420)
(cherry picked from commit cb17f91ab5)
2022-06-27 10:22:55 +02:00
Jack Westbrook
73d9a4f08c Build: Bump grafana/eslint-config to 4.0.0 (#51329) (#51391)
(cherry picked from commit ead01e6e5d)
2022-06-25 13:48:01 +01:00
Todd Treece
e236df03c0 Variables: Selectively reload panels on URL update (#51003) (#51397)
(cherry picked from commit 342344bb03)
2022-06-24 18:39:55 +00:00
Artur Wierzbicki
899b421166 Search: Fix pagination in the new search page (#51366) (#51394)
* Fix pagination in the new search

* update betterer betterer betterer betterer betterer betterer

* revert packagejson

(cherry picked from commit c496b3e712)
2022-06-24 22:17:10 +04:00
Grot (@grafanabot)
c54f381570 [v9.0.x] Alerting: Remove fmt.Println from Threema (#51382)
Co-authored-by: George Robinson <george.robinson@grafana.com>
2022-06-24 16:05:31 +02:00
Grot (@grafanabot)
c69b092f20 FeedbackLink: Add tracking (#51251) (#51377)
(cherry picked from commit 0d899e2635)

Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
2022-06-24 15:26:40 +02:00
Grot (@grafanabot)
fe8bc8702e Logs: Fix report interaction name (#51335) (#51364)
(cherry picked from commit f7db3d2ae6)

Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
2022-06-24 10:49:53 +02:00
Grot (@grafanabot)
7c8cfc0fe5 Traces: Feature tracking (#49767) (#51312)
* Feature tracking for traces

* Mock runtime in test

* Update reportInteraction key

(cherry picked from commit dcccac6657)

Co-authored-by: Joey Tawadrous <90795735+joey-grafana@users.noreply.github.com>
2022-06-24 08:15:12 +01:00
Grot (@grafanabot)
b429aa11fe AzureMonitor: Parse non-fatal errors for Logs (#51320) (#51362)
(cherry picked from commit b10ddfdf8c)

Co-authored-by: Andres Martinez Gotor <andres.martinez@grafana.com>
2022-06-24 09:13:15 +02:00
Alexander Weaver
40ff163fde Alerting: Code-gen parsing of URL parameters and fix related bugs (#50731) (#51353)
* Extend template and generate

* Generate and fix up alertmanager endpoints

* Prometheus routes

* fix up Testing endpoints

* touch up ruler API

* Update provisioning and fix 500

* Drop dead code

* Remove more dead code

* Resolve merge conflicts

(cherry picked from commit 0d9389e1f4)
2022-06-23 16:51:01 -04:00
Isabella Siu
cfc67c0bbd CloudWatch: fix variable query migration with json template variables (#51207) (#51346)
(cherry picked from commit 8ba8e1df83)
2022-06-23 16:48:10 -04:00
gotjosh
d1c45321f7 Alerting: Don't stop the migration when alert rule tags are invalid (#51253) (#51341)
* Alerting: Don't stop the migration when alert rule tags are invalid

As we migrate we expect the `alertRuleTags` on a dashboard alert to be a JSON object. However, it seems this is not really validated by Grafana and an user can change the format to something else that the JSON parser is not able to marshal into a `map[string]string`.

Let's do a bit better by "attempting" to parse the tags and if we can't we'll simple return an empty map. The data is still there so if the user wishes they can go back, fix the data and attemp the migration again.

(cherry picked from commit 90646e7f41)
2022-06-23 19:51:22 +02:00
Erik Sundell
90ef654130 resolve merge conflict (#51333) 2022-06-23 17:14:21 +02:00
Grot (@grafanabot)
bacb7893d6 Encryption: Stop decrypting EE encrypted secrets with legacy encryption (#50090) (#51309)
(cherry picked from commit 7a614fd8a1)

Co-authored-by: Tania <yalyna.ts@gmail.com>
2022-06-23 14:09:06 +02:00
Grot (@grafanabot)
f015a44eb1 Template Variable: Datasource variable can be used when MIXED option is selected in panel query (#51170) (#51181)
* user essentials mob! 🔱

* user essentials mob! 🔱

lastFile:public/app/features/query/components/QueryEditorRowHeader.test.tsx

* user essentials mob! 🔱

* test variables showing in data source picker dropdown on MIXED

* clean up unused imports

* remove comment

* remove unused mock

Co-authored-by: Alexandra Vargas <alexa1866@gmail.com>
Co-authored-by: Joao Silva <joao.silva@grafana.com>
Co-authored-by: joshhunt <josh@trtr.co>
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
(cherry picked from commit 665da5d063)

Co-authored-by: polibb <13227501+polibb@users.noreply.github.com>
2022-06-23 12:23:02 +02:00
Grot (@grafanabot)
00165544bd Query history: Fix default value when no config (#51129) (#51167)
* Query history: Fix default value in setting.go

* Update for frontend

* Remove frontend update

(cherry picked from commit 62e55d530d)

Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
2022-06-22 17:08:23 +02:00
Grot (@grafanabot)
99cea9f98b Annotations: Fixes a problem where annotation autocomplete would crash the panel (#51164) (#51250)
* use custom formatCreateLabel in AnnotationEditorForm

* give `TagFilter` it's own formatCreateLabel

* only show TagBadge if the label is a string

(cherry picked from commit be6a878fd6)

Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2022-06-22 16:10:25 +02:00
Grot (@grafanabot)
a8401fc8e8 OAuth: Restore debug log behavior (#51244) (#51247)
(cherry picked from commit d2ab3556fa)

Co-authored-by: Jguer <joao.guerreiro@grafana.com>
2022-06-22 15:44:55 +02:00
Daniel Lee
1dcd9939a5 Minor edits in whats-new-in-v9-0 (#51159) (#51243)
Grammar, punctuation, syntax edits.

(cherry picked from commit 746f664a75)

Co-authored-by: Alexandre de Verteuil <alexandre@grafana.com>
2022-06-22 15:04:19 +02:00
Grot (@grafanabot)
7d537849b3 Alerting: Add support for images in Kafka alerts (#50758) (#51231)
(cherry picked from commit 6e44b36a30)

Co-authored-by: George Robinson <george.robinson@grafana.com>
2022-06-22 11:16:08 +01:00
Grot (@grafanabot)
128c940cda Docs: fixes setup relrefs (#51178) (#51195)
* fixes setup relrefs

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

Co-authored-by: Garrett Guillotte <100453168+gguillotte-grafana@users.noreply.github.com>

* Update docs/sources/setup-grafana/configure-security/_index.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>
(cherry picked from commit 2df04582ce)

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
2022-06-22 10:28:11 +01:00
Grot (@grafanabot)
beeefd36f5 Alerting: Add support for images in VictorOps alerts (#50759) (#51228)
(cherry picked from commit 99516360c9)

Co-authored-by: George Robinson <george.robinson@grafana.com>
2022-06-22 10:27:46 +01:00
Grot (@grafanabot)
c4c9ca47da Alerting: Update docs for images in notifications (#50760) (#51157)
(cherry picked from commit 624a3240f0)

Co-authored-by: George Robinson <george.robinson@grafana.com>
2022-06-22 10:27:35 +01:00
Grot (@grafanabot)
a7ef971981 fix broken links (#51224) (#51226)
(cherry picked from commit d4acc8b7d3)

Co-authored-by: Ieva <ieva.vasiljeva@grafana.com>
2022-06-22 09:40:27 +02:00
Grot (@grafanabot)
9921d971c1 Barchart: Fix warning not showing (#51190) (#51210)
(cherry picked from commit 24bdda72fb)

Co-authored-by: Josh Hunt <joshhunt@users.noreply.github.com>
2022-06-22 01:27:31 +02:00
Grot (@grafanabot)
7240d3f282 ReleaseNotes: Updated changelog and release notes for 9.0.1 (#51192) (#51193)
(cherry picked from commit 8211d7c787)
2022-06-21 17:52:32 +00:00
Grot (@grafanabot)
4208cb0211 "Release: Updated versions in package to 9.0.1" (#51191) 2022-06-21 17:31:33 +00:00
Grot (@grafanabot)
2c17b76b4f Docs: new version of landing page for Alerting (#51166) (#51177)
* Docs: new version of landing page for Alerting

* deletes about topic and adds alias

* Update docs/sources/alerting/_index.md

Co-authored-by: Gilles De Mey <gilles.de.mey@gmail.com>

Co-authored-by: Gilles De Mey <gilles.de.mey@gmail.com>
(cherry picked from commit 8930bc9042)

Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com>
2022-06-21 16:33:41 +02:00
Grot (@grafanabot)
59bfaf1069 Fix query parameter template variable (#50023) (#51174)
As documented under [Advanced variable format options – Query parameters](https://grafana.com/docs/grafana/latest/variables/advanced-variable-format-options/#query-parameters), the option is `queryparam`, not `queryparams`.

I have verified in Grafana 8.5.3 that the former works while the latter doesn't.

(cherry picked from commit 1b091454ec)

Co-authored-by: kiwi-oss <71145773+kiwi-oss@users.noreply.github.com>
2022-06-21 15:50:06 +02:00
Grot (@grafanabot)
8a6ef771b0 Docs: update panel title search information (#50450) (#50792)
(cherry picked from commit d1bcd1c7c8)

Co-authored-by: Alexander Emelin <frvzmb@gmail.com>
2022-06-21 15:12:28 +02:00
Grot (@grafanabot)
7f21074b11 [v9.0.x] SearchV2: Add unit test for ManageActions (#51161)
Co-authored-by: Maria Alexandra <239999+axelavargas@users.noreply.github.com>
2022-06-21 13:58:33 +02:00
Grot (@grafanabot)
bae59d9549 Dashboard: Don't show unsaved changes modal for automatic schema changes (#50822) (#51113) 2022-06-21 12:57:53 +02:00
Serge Zaitsev
72c6512e3f [v9.0.x] Chore: Remove global bus variable (#51126)
* Chore: Remove global bus variable (#50765)

* Chore: Remove global bus variable

* fix bus in tests

(cherry picked from commit 0b55c41d05)

* fix the imports
2022-06-21 11:40:44 +02:00
Grot (@grafanabot)
8522e2248c Clarify alerting opt-out docs (#51144) (#51148)
* Clarify alerting opt-out docs

* Update docs/sources/alerting/migrating-alerts/opt-out.md

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

* Update docs/sources/alerting/migrating-alerts/opt-out.md

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

* Update docs/sources/alerting/migrating-alerts/opt-out.md

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

* Update docs/sources/alerting/migrating-alerts/opt-out.md

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

Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com>
(cherry picked from commit 9aa440d7d4)

Co-authored-by: Armand Grillet <2117580+armandgrillet@users.noreply.github.com>
2022-06-21 10:58:39 +02:00
Grot (@grafanabot)
fd4c0ac83a Alerting: Add support for image annotation in Alertmanager alerts (#50686) (#51145)
(cherry picked from commit c8466d285c)

Co-authored-by: George Robinson <george.robinson@grafana.com>
2022-06-21 09:36:35 +01:00
Ryan McKinley
2e14e277a9 [v9.0.x] Heatmap: Sync main and 9.0.1 heatmap-new (#51136) 2022-06-20 20:52:11 -07:00
Grot (@grafanabot)
1922ff6756 Docs: fixes manage alerting topic (#51100) (#51110)
(cherry picked from commit 694fd1c37b)

Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com>
2022-06-20 17:30:14 +02:00
Grot (@grafanabot)
ca14dc2288 Alerting: Add support for images in Threema alerts (#50734) (#51127)
(cherry picked from commit 67046c5e79)

Co-authored-by: George Robinson <george.robinson@grafana.com>
2022-06-20 16:01:53 +01:00
Grot (@grafanabot)
5a1842635d Alerting: Use ErrImagesDone in Discord and SensuGo (#51106) (#51125)
(cherry picked from commit 7235480be5)

Co-authored-by: George Robinson <george.robinson@grafana.com>
2022-06-20 15:11:46 +01:00
Grot (@grafanabot)
89d7358211 [v9.0.x] Alerting: Fix alert instances filtering for prom rules (#51121)
Co-authored-by: Konrad Lalik <konrad.lalik@grafana.com>
2022-06-20 15:57:18 +02:00
Grot (@grafanabot)
8a544eecdd [v9.0.x] Alerting: Fix alert rule page crashing when datasource contained URL unsafe characters (#51123)
Co-authored-by: Gilles De Mey <gilles.de.mey@gmail.com>
2022-06-20 15:57:01 +02:00
Grot (@grafanabot)
d6f2ebb9ae Alerting: Support up to N fake images (#51111) (#51119)
(cherry picked from commit 18c3456d13)

Co-authored-by: George Robinson <george.robinson@grafana.com>
2022-06-20 14:53:08 +01:00
Grot (@grafanabot)
51344afeaf [v9.0.x] Alerting: Adds Mimir to Alertmanager data source implementation (#51109)
Co-authored-by: Gilles De Mey <gilles.de.mey@gmail.com>
2022-06-20 13:14:09 +02:00
Grot (@grafanabot)
e487bfb460 Variables: Fixes issue with data source variables not updating queries with variable (#49478) (#49482)
(cherry picked from commit 04bc482f11)

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
2022-06-20 12:26:16 +02:00
Gábor Farkas
f2e1725a98 loki: no histogram for instant queries (#50711) (#51103)
(cherry picked from commit 48a258f515)
2022-06-20 12:18:10 +02:00
Grot (@grafanabot)
35d6b46cc8 Alerting: Add ErrImagesDone to return from withStoredImages (#51098) (#51104)
(cherry picked from commit 62c2b1ec78)

Co-authored-by: George Robinson <george.robinson@grafana.com>
2022-06-20 11:11:25 +01:00
Grot (@grafanabot)
ee52f2107d Alerting: Add Documentation about limits of images in notifications. (#51084) (#51087) 2022-06-20 17:54:44 +08:00
Grot (@grafanabot)
2987020d83 LogRow: Fixed background-height when hovering and label-alignment (#51027) (#51101)
* fixed logline's hover-height difference

* vertically aligned log-labels

* moved labelalignment to cells

(cherry picked from commit e350cc1d7b)

Co-authored-by: Sven Grossmann <Svennergr@gmail.com>
2022-06-20 11:23:41 +02:00
Grot (@grafanabot)
828c4d4926 Alerting: Update test funcs for notifications (#51013) (#51095)
(cherry picked from commit 2dbaf259a7)

Co-authored-by: George Robinson <george.robinson@grafana.com>
2022-06-20 09:30:32 +01:00
Grot (@grafanabot)
69136becf1 Docs: fixes redirect from unified alerting (#51012) (#51023)
* Docs: fixes redirect from unified alerting

* fixes mimir alerting rule redirect

* fixes mimir alerting rule redirect

* adds slash to redirect

(cherry picked from commit 033654f93f)

Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com>
2022-06-20 08:01:43 +02:00
Grot (@grafanabot)
977ff4d6e6 Time Series Panel: Add Null Filling and "No Value" Support (#50907) (#51065)
* Use nullInsertThreshold and nullToValue in time series

* Allow for undefined timeRange to support certain candlestick uses of prepareGraphableFields

* Make sure null to value doesn't modify initial data

* Do a shallow values copy and avoid Array.push()

* Clean up null to value transformation.

* Add basic tests

* Remove redunant null threshold application flagging

* set nullThresholdApplied flag even when no null inserts were done

* Include nullThresholdApplied in test snapshot

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

Co-authored-by: Kyle Cunningham <codeincarnate@users.noreply.github.com>
2022-06-17 16:25:17 -05:00
Grot (@grafanabot)
f3a0f57535 Alerting: Docs on how to template annotations and labels (#51024) (#51056)
(cherry picked from commit 5736a3c59e)

Co-authored-by: George Robinson <george.robinson@grafana.com>
2022-06-17 18:41:48 +01:00
Grot (@grafanabot)
49aaa5c955 Search: fix anonymous user access (#51045) (#51055)
(cherry picked from commit 40b152e813)

Co-authored-by: Artur Wierzbicki <wierzbicki.artur.94@gmail.com>
2022-06-17 18:53:38 +02:00
Grot (@grafanabot)
0b3c14c7f6 Docs: fix broken link to service-account docs
(cherry picked from commit 14f8e18978)

Co-authored-by: Artur Wierzbicki <wierzbicki.artur.94@gmail.com>
2022-06-17 17:39:06 +02:00
Grot (@grafanabot)
a24941f718 Alerting: Create algorithm to process receiver changes and keep them consistent internally (#50738) (#51050)
* Algorithm to fix up receivers

* Extract for tests

* Add tests, fix bug

* Add test which demonstrates how it fixes up broken groups

* Fix package prefix

(cherry picked from commit 9bbfeedadf)

Co-authored-by: Alexander Weaver <weaver.alex.d@gmail.com>
2022-06-17 10:31:41 -05:00
Grot (@grafanabot)
b7db11082e adds video (#50964) (#51039)
(cherry picked from commit 204e9754da)

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
2022-06-17 09:52:43 -05:00
Gilles De Mey
43aaf4b4d7 Docs: Remove alpha sentence from Alertmanager data source (#50978) (#51026)
Co-authored-by: Alexander Weaver <weaver.alex.d@gmail.com>
2022-06-17 09:41:13 -05:00
Grot (@grafanabot)
363b2fdc8e Heatmap: do not dim the values in the color scale legend (#50976) (#51043)
(cherry picked from commit c6f7e53e38)

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2022-06-17 16:39:52 +02:00
Grot (@grafanabot)
75501eac48 Previews: use ETag header (#51008) (#51041)
* use etag header for previews

* use unix millis rather than tz-dependant string

(cherry picked from commit 644503f5e6)

Co-authored-by: Artur Wierzbicki <wierzbicki.artur.94@gmail.com>
2022-06-17 16:16:24 +02:00
Grot (@grafanabot)
89d6f7aba1 Playlists: Disable Create Playlist buttons for users with viewer role (#50840) (#51032)
* Disable / hide buttons for creating playlist for users with viewer role

* Update tests

* Re-add mock for contextSrv module

(cherry picked from commit 43839dc40b)

Co-authored-by: asymness <asym1999@gmail.com>
2022-06-17 14:15:50 +02:00
Grot (@grafanabot)
0f50fe2a5e Expressions: Fixes dashboard schema migration issue that casued Expression datasource to be set on panel level (#50945) (#51009)
* Expressions: Fixes dashboard schema migration issue that casued Expression datasource to be set on panel level

* fixing logic

* Updated

(cherry picked from commit eb25d8df89)

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
2022-06-17 14:10:01 +02:00
Grot (@grafanabot)
ffb381144c loki: fix bug in labels framing (#51015) (#51029)
(cherry picked from commit fd63ed540f)

Co-authored-by: Gábor Farkas <gabor.farkas@gmail.com>
2022-06-17 13:09:06 +02:00
Grot (@grafanabot)
efbbd64253 Docs: How to template annotations and labels (#50972) (#51022)
(cherry picked from commit 8c01f28285)

Co-authored-by: George Robinson <george.robinson@grafana.com>
2022-06-17 10:49:26 +01:00
Grot (@grafanabot)
646cb92b19 Docs: adds video content to Grafana Alerting (#50929) (#50956)
* Docs: adds video content to grafana alerting

* adds create alerts to managed rule page

(cherry picked from commit 7deb7258ba)

Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com>
2022-06-17 11:07:30 +02:00
Grot (@grafanabot)
b22cd2e522 CloudWatch: Allow hidden queries to be executed in case an ID is provided (#50987) (#51019)
* allow hidden queries in case an id is provided

* cleanup test

* name tests properly

(cherry picked from commit fcbe0059c2)

Co-authored-by: Erik Sundell <erik.sundell87@gmail.com>
2022-06-17 10:41:57 +02:00
Grot (@grafanabot)
67bb3f53dd AzureMonitor: Update supported namespaces (#50788) and filter resources by the right type (#50880) (#51018)
(cherry picked from commit 1f0c951bce)

Co-authored-by: Andres Martinez Gotor <andres.martinez@grafana.com>
2022-06-17 10:28:11 +02:00
Grot (@grafanabot)
78804d8661 loki: add type=instant tests (#51007) (#51016)
(cherry picked from commit 109bc7e940)

Co-authored-by: Gábor Farkas <gabor.farkas@gmail.com>
2022-06-17 10:05:26 +02:00
Grot (@grafanabot)
3becfa6d74 LogRow: Fix placement of icon (#51010) (#51017)
(cherry picked from commit 642b7b1eb8)

Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
2022-06-17 10:03:25 +02:00
Garrett Guillotte
6a351959d2 Docs: Refactor administration docs (#50592) (#50989)
* Move data source management to administration

* Move RBAC to administration

* Move team management up a docs org level

* Combine and rename admin preferences docs

* Move plugin management to administration

* Combine plugin management docs

* Combine API key docs

* Combine service account docs

* Combine server user management docs

* Move datasource management to administration

* Move enterprise licenses to administration

* Move CLI out of admin, update links to admin

* Merge org user management docs

* Restructure to Torkel's plan

* Fix typo

* Weigh admin topics for navigation

* Weigh administration topics and align to Torkel's plan

* Move server user management from server admin to admin/user management

* Move configure docker image to setup guide

* Move the remaining server admin docs to the root admin directory

* Reweight docker config

Backport of 845cebdee2 from main
2022-06-17 08:56:31 +02:00
Gábor Farkas
f12b86f7ec Loki: Handle data source configs with path in the url (#50971) (#51006)
* loki: fixed param-name

* loki: handle datasource configs with path in the url

* lint fix

(cherry picked from commit ccc587dc0f)
2022-06-17 08:22:42 +02:00
Grot (@grafanabot)
f3c0208221 Alerting: Fix AM config overwrite when SQLite db is locked during sync (#50951) (#50996)
If SQLite is used and the database is locked temporarily (ex. heavy write-load) during periodic
AM config sync, it was possible for your AM config to be overwritten with the default one.

This fixes that by patching a bug in xorm v0.8.2 which was causing SQLITE_BUSY errors to be ignored
in certain cases.

(cherry picked from commit 8f5912b94c)

Co-authored-by: Matthew Jacobson <matthew.jacobson@grafana.com>
2022-06-16 20:49:34 -04:00
Grot (@grafanabot)
83917e61fd StateTimeline: make sure we use result of applyNullInsertThreshold() (#50988) (#50994)
Co-authored-by: Kyle Cunningham <kyle@codeincarnate.com>
(cherry picked from commit 406509cdd3)

Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
2022-06-16 17:46:13 -05:00
Grot (@grafanabot)
9ff23c59b5 Geomap: Support showing tooltip content on click (not just hover) (#50985) (#50986)
(cherry picked from commit 4a749e68a8)

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2022-06-16 22:21:40 +02:00
Grot (@grafanabot)
e3b490f47c Fix double change password calls (#50948) (#50957)
(cherry picked from commit 32103fcd9f)

Co-authored-by: Jguer <joao.guerreiro@grafana.com>
2022-06-16 17:32:11 +02:00
Grot (@grafanabot)
22fb1a7b2b Previews: update documentation for enterprise setup (#50950) (#50958)
* add `enable service accounts` step

* add `enable service accounts` step

(cherry picked from commit b2852205a0)

Co-authored-by: Artur Wierzbicki <wierzbicki.artur.94@gmail.com>
2022-06-16 18:55:28 +04:00
Grot (@grafanabot)
36a622cf22 TablePanel: Show filter icon on correct field when other fields are hidden (#50940) (#50946)
(cherry picked from commit f0b191c1c8)

Co-authored-by: Victor Marin <36818606+mdvictor@users.noreply.github.com>
2022-06-16 15:32:20 +03:00
Grot (@grafanabot)
50c729c23e Bug: Fix delete dashboard snapshot for deleted dashboards (#50919) (#50937)
* Bug: Fix delete dashboard snapshot for deleted dashboards

* Fix lint and make it work for all the errors

* Fix lint

(cherry picked from commit 8ab8ce609b)

Co-authored-by: idafurjes <36131195+idafurjes@users.noreply.github.com>
2022-06-16 13:27:16 +02:00
Ashley Harrison
87a325e6df Chore: Remove newNavigation feature toggle and old navbar code (#50872) (#50932)
* Remove newNavigation feature toggle + old code

* fix unit tests

* remove buildCreateNavLinks

(cherry picked from commit d0fa326798)
2022-06-16 11:26:46 +01:00
Grot (@grafanabot)
ac947026cd Add redirects for indexed alerting pages (#50918) (#50921)
Co-authored-by: Brenda Muir <brenda.muir@grafana.com>
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

Co-authored-by: Brenda Muir <brenda.muir@grafana.com>
(cherry picked from commit d0808bdafb)

Co-authored-by: Jack Baldry <jack.baldry@grafana.com>
2022-06-16 12:13:05 +02:00
Grot (@grafanabot)
1bca3be52f Prometheus: Fix body not being included in resource calls if they are POST (#50833) (#50886)
* Pass on request body

* Fix GETs and add tests

* Fix err handling

* Add comments

* Close response body

* Fix lint maybe

* Fix test

(cherry picked from commit 07be95a001)

Co-authored-by: Andrej Ocenas <mr.ocenas@gmail.com>
2022-06-16 10:52:50 +02:00
Grot (@grafanabot)
52d7c8e914 AzureMonitor: Update alerts dashboard (#50712) (#50920)
(cherry picked from commit ab8176d234)

Co-authored-by: jcolladokuri <jcolladokuri@microsoft.com>
2022-06-16 10:42:03 +02:00
Grot (@grafanabot)
959e368feb Search: default layout to last selected value (#50743) (#50902)
(cherry picked from commit e23dbfe605)

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2022-06-15 12:04:08 -07:00
Grot (@grafanabot)
e7df1f5994 Docs: updates auth alias to fix redirect 404 (#50892) (#50903)
* updates auth alias

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

(cherry picked from commit da731a38cc)

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
2022-06-15 12:44:07 -05:00
Grot (@grafanabot)
07d3b7a7b8 Revert "Explore: Remove support for legacy, compact format URLs (#49350)" (#50873) (#50881)
This reverts commit a9cc3225ba.

Co-authored-by: Elfo404 <me@giordanoricci.com>
(cherry picked from commit dfa538ff92)

Co-authored-by: Kristina <kristina.durivage@grafana.com>
2022-06-15 10:34:39 -05:00
Marcus Efraimsson
e0d1f9aedc CLI: Allow relative symlinks in zip archives when installing plugins (#50537) (#50877)
Earlier we only allowed symlinks in plugins starting with grafana- in zip archives when
installing plugins using the grafana-cli. This changes so that symlinks in zip archives
containing relative links to files in the zip archive are always allowed when installing
plugins. The reasoning behind this is that Grafana per default doesn't load a plugin
that has an invalid plugin signature meaning that any symlink must be included in
the plugin signature manifest.

Co-authored-by: Will Browne <will.browne@grafana.com>
Co-authored-by: Will Browne <wbrowne@users.noreply.github.com>
(cherry picked from commit b47ec36d0d)
2022-06-15 17:06:08 +02:00
Grot (@grafanabot)
dd29063198 [v9.0.x] Alerting: Fix removal of notification policy without labels matchers (#50851)
Co-authored-by: Konrad Lalik <konrad.lalik@grafana.com>
2022-06-15 12:49:56 +02:00
Dimitris Sotirakis
dac01a0cd8 Rename release pipelines (#50585) (#50594)
(cherry picked from commit 5633648383)
2022-06-15 11:36:52 +01:00
Grot (@grafanabot)
54b4ca2b35 Dashboard: Prevent non-repeating panels being dropped from repeated rows when collapsed/expanded (#50764) (#50860)
* Mob: fix issue with repeating panels+rows, add e2e test

Co-authored-by: kay delaney <kay@grafana.com>
Co-authored-by: Joao Silva <joao.silva@grafana.com>
Co-authored-by: joshhunt <josh@trtr.co>
Co-authored-by: polibb <polina.boneva@grafana.com>

* Fix describe block description

Co-authored-by: kay delaney <kay@grafana.com>
Co-authored-by: Joao Silva <joao.silva@grafana.com>
Co-authored-by: joshhunt <josh@trtr.co>
Co-authored-by: polibb <polina.boneva@grafana.com>
(cherry picked from commit 94d585063e)

Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2022-06-15 12:19:11 +02:00
Grot (@grafanabot)
8d2313c5b5 Ayy1: Cannot save single dashboard link (#49075) (#50857)
(cherry picked from commit 0753539721)

Co-authored-by: Chrysa Dikonimaki <xrdikonimaki@hotmail.com>
2022-06-15 11:42:11 +02:00
Grot (@grafanabot)
efc29caf67 Alerting: Add support for images in SensuGo alerts (#50718) (#50853) 2022-06-15 11:30:35 +02:00
Dimitris Sotirakis
d543bb242f Grafana 9: Sync release-v9.0.0 branch to v9.0.x (#50844)
* Docs: Manual backport of alert list panel docs rewrite (#50512)

* Updating migration docs to include most relevant breaking changes (#50356) (#50515)

(cherry picked from commit cd01eb541a)

Co-authored-by: Timur Olzhabayev <timur.olzhabayev@grafana.com>

* ReleaseNotes: Updated changelog and release notes for 9.0.0-beta2 (#50398) (#50521)

Co-authored-by: Timur Olzhabayev <timur.olzhabayev@grafana.com>
(cherry picked from commit a6943cb399)

* Alerting: Fix force_migration when alerting is disabled (#50431) (#50481) (#50565)

This pull request fixes a bug where force_migration must be set to true when both unified and legacy alerting is disabled.

(cherry picked from commit c312188cb2)

* [release-v9.0.0] Grafana UI: Fix nonexistent indexof module for plugin tests (#50573)

* Grafana UI: Fix nonexistent indexof module for plugin tests (#50529)

* fix(grafana-ui): prevent module resolution failure where component-indexof appears as indexof

* chore(grafana-ui): update comment explaining need for alias plugin

(cherry picked from commit 6a4906ef7e)

* chore: refresh yarn.lock

Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com>

* [release-v9.0.0] Grafana UI: Put back production build in rollup config (#50581)

* Grafana UI: Put back production build in rollup config (#50575)

(cherry picked from commit 2d1ab27636)

* chore: refresh yarn.lock

Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com>

* [release-v9.0.0] Alerting: use "find" to wait for expression editor to load (#50604)

Co-authored-by: Gilles De Mey <gilles.de.mey@gmail.com>

* Docs: Backport 49739 to v9.0.x (#50123) (#50614)

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

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

* Alerting: improve provisioning docs (#50347) (#50619)

* Alerting: improve provisioning docs

* add new provisioning page

* add api docs

* fix formatting and add better descriptions

* fix typo

(cherry picked from commit 862f51216b)

Co-authored-by: Jean-Philippe Quéméner <JohnnyQQQQ@users.noreply.github.com>

* Backport docs changes for Grafana Alerting (#50620)

* doc fix (#50624) (#50627)

(cherry picked from commit 336c9fd513)

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

* RBAC: Inheritance permission migration should handle empty managed roles (#50611) (#50622)

* Make inheritance permission migration more robust

* Better fix

* Add more tests to the migration

* Add removed test case

* Add test case for empty role in empty org

* Handling the role.ID 0 case with a log

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

Co-authored-by: Jguer <joao.guerreiro@grafana.com>
(cherry picked from commit 307a0d4538)

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

* "Release: Updated versions in package to 9.0.0" (#369)

Co-authored-by: Gilles De Mey <gilles.de.mey@gmail.com>
Co-authored-by: Grot (@grafanabot) <43478413+grafanabot@users.noreply.github.com>
Co-authored-by: Timur Olzhabayev <timur.olzhabayev@grafana.com>
Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com>
Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
Co-authored-by: Jean-Philippe Quéméner <JohnnyQQQQ@users.noreply.github.com>
Co-authored-by: Armand Grillet <2117580+armandgrillet@users.noreply.github.com>
Co-authored-by: Ieva <ieva.vasiljeva@grafana.com>
Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com>
2022-06-15 12:13:14 +03:00
Grot (@grafanabot)
0ab0fe9d16 RolePicker: Fix submenu position on horizontal space overflow (#50769) (#50843)
(cherry picked from commit 2fbe99c1be)

Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>
2022-06-15 09:20:03 +02:00
Grot (@grafanabot)
8ef7fd3859 backend: add PlaylistUIDs to Playlist; remove playlist IDs from API (#49609) (#50828)
* backend/api: refactor PlaylistId to PlaylistUid
* Add org_id to Get and Update playlist functions
Fix migration - no longer pad the uid; fix mysql syntax

The relevant tests are passing using postgres, mysql and the default sqllite backends, but there are a number of other failing tests when using postgres and myself so I'm not entirely confident with those results.

* fix bad query in GetPlaylistItem and add a test that would have caught the mistake in the first place. Reverted the playlist_uid column addition in playlist_item; it became unnecessary after this PR.

Added default value to the new UID column based on PR feedback.

* break this PRs migration into its own function

* Playlists: Update UI to use the updated API

Co-authored-by: Sofia Papagiannaki <1632407+papagian@users.noreply.github.com>
(cherry picked from commit a33a023629)

Co-authored-by: Kristin Laemmert <mildwonkey@users.noreply.github.com>
2022-06-14 15:48:44 -04:00
Grot (@grafanabot)
d78c04c8e6 Remove beta note (#50824) (#50825)
* Remove beta note

Remove manually added Beta note.

* Remove beta

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

Co-authored-by: Jack Baldry <jack.baldry@grafana.com>
(cherry picked from commit 39b467b46d)

Co-authored-by: Fiona Artiaga <89225282+GrafanaWriter@users.noreply.github.com>
2022-06-14 19:41:56 +01:00
Grot (@grafanabot)
1a915c2284 MSSQL: Fix ParseFloat error (#50815) (#50818)
(cherry picked from commit 65a5ac462a)

Co-authored-by: Zoltán Bedi <zoltan.bedi@gmail.com>
2022-06-14 19:55:57 +02:00
Dimitris Sotirakis
700e7e36e3 Modify publish.yml (#50813) 2022-06-14 18:44:03 +02:00
Grot (@grafanabot)
57300f6b6d Metrics: Expose functions to initialize counters at zero (#50122) (#50750)
(cherry picked from commit 97baa6911d)

Co-authored-by: Joan López de la Franca Beltran <5459617+joanlopez@users.noreply.github.com>
2022-06-14 18:07:35 +02:00
Grot (@grafanabot)
ef7148fc4a Formatting: Fixes valueFormats for a value of 0 (#50719) (#50805)
(cherry picked from commit f9d31d0612)

Co-authored-by: Joao Silva <100691367+JoaoSilvaGrafana@users.noreply.github.com>
2022-06-14 17:19:03 +02:00
Dimitris Sotirakis
e35b901ed6 ReleaseNotes: Updated changelog and release notes for 9.0.0 (#50794) (#50799)
* ReleaseNotes: Updated changelog and release notes for 9.0.0

* Update CHANGELOG.md

* Update release-notes-9-0-0.md

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

Co-authored-by: Grot (@grafanabot) <43478413+grafanabot@users.noreply.github.com>
2022-06-14 16:56:54 +02:00
Grot (@grafanabot)
d9a53c5b63 Update header (#50787) (#50795)
(cherry picked from commit 0073f1b0b5)

Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
2022-06-14 16:38:09 +02:00
Grot (@grafanabot)
5bca6cccd2 "Release: Updated versions in package to 9.0.0" (#50793) 2022-06-14 14:29:35 +00:00
Grot (@grafanabot)
4569ac3056 Docs: Add envelope encryption as breaking change (#50716) (#50749)
* Docs: Add envelope encryption as breaking change

* Minor improvements

* Apply suggestions from code review

Co-authored-by: Tania <yalyna.ts@gmail.com>
(cherry picked from commit fcf6b29987)

Co-authored-by: Joan López de la Franca Beltran <5459617+joanlopez@users.noreply.github.com>
2022-06-14 15:44:46 +02:00
Grot (@grafanabot)
b4f9f19ed1 GrafanaData: Fix week start for non-English browsers (#50582) (#50784)
* grafana-data: Fix start week for non-English browsers

* apply review suggestion

(cherry picked from commit 99c8ce5ab9)

Co-authored-by: Agnès Toulet <35176601+AgnesToulet@users.noreply.github.com>
2022-06-14 15:26:54 +02:00
Grot (@grafanabot)
88188d63c8 rm debug log when publishing live message (#50774) (#50779)
(cherry picked from commit c581f6d945)

Co-authored-by: Alexander Emelin <frvzmb@gmail.com>
2022-06-14 14:27:11 +02:00
Grot (@grafanabot)
1fb920e02d Loki: Handle invalid query type values (#50755) (#50763)
* loki: more robust query-type handling

* better comment

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

Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
(cherry picked from commit a97f022612)

Co-authored-by: Gábor Farkas <gabor.farkas@gmail.com>
2022-06-14 12:14:26 +02:00
Sven Grossmann
5215514bf3 added opensearch annotations to not use default ui (#50655) (#50751)
(cherry picked from commit d8d3a9c561)
2022-06-14 10:23:08 +02:00
Grot (@grafanabot)
6ac398763a Heatmap: Remove alpha flag from new heatmap panel (#50733) (#50742)
(cherry picked from commit b75cc7a86c)

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2022-06-14 09:56:45 +02:00
Grot (@grafanabot)
e235af676b Instrumentation: Define handlers for requests that are not handled with named handlers (#50613) (#50744)
Signed-off-by: bergquist <carl.bergquist@gmail.com>

Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
Co-authored-by: Sofia Papagiannaki <1632407+papagian@users.noreply.github.com>
(cherry picked from commit b8b6d0e1a1)

Co-authored-by: Carl Bergquist <carl.bergquist@gmail.com>
2022-06-14 08:10:23 +02:00
Grot (@grafanabot)
1479a46997 Timeseries: Improve cursor Y sync behavior (#50740) (#50741)
(cherry picked from commit 4e4686001b)

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2022-06-13 22:45:15 -07:00
Grot (@grafanabot)
c62ccbd988 Alerting: Fix rendering issues in OpenAPI docs (#50630) (#50725)
* Clean up status codes

* Missing consumes tag

* Regenerate

* Fix incorrect documented responses and missing UI elements

* Fix response docs

* Fix wrong response copy paste

* Regenerate

* Temporarily revert

(cherry picked from commit 17e76b06ff)

Co-authored-by: Alexander Weaver <weaver.alex.d@gmail.com>
2022-06-13 15:05:59 -05:00
Grot (@grafanabot)
9f0908f6fd SearchV2: support keyboard navigation (#49650) (#50715)
Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
(cherry picked from commit 402b5ce4c6)

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2022-06-13 10:02:37 -07:00
Jack Baldry
1f9afb4f43 Use more relevant links to legacy alerting documentation (#50607) (#50695)
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
(cherry picked from commit 4cc3bc37a0)
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
2022-06-13 18:29:11 +02:00
Grot (@grafanabot)
da9dca03ea Alerting: add right provenance when creating mute timings (#50707) (#50714)
(cherry picked from commit 1ed7280363)

Co-authored-by: Jean-Philippe Quéméner <JohnnyQQQQ@users.noreply.github.com>
2022-06-13 18:18:10 +02:00
Grot (@grafanabot)
d5eb7cc42a Alerting: remove unused function in alert rule store (#50696) (#50705)
(cherry picked from commit ed6a887737)

Co-authored-by: Jean-Philippe Quéméner <JohnnyQQQQ@users.noreply.github.com>
2022-06-13 18:06:47 +02:00
Grot (@grafanabot)
de0b107188 Never set gridPos to null (#50400) (#50709)
(cherry picked from commit 759e3ec4fa)

Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2022-06-13 17:55:47 +02:00
Grot (@grafanabot)
cffb340c14 logs: better hasLogsVolumeSupport check (#50676) (#50704)
(cherry picked from commit d872aa993d)

Co-authored-by: Gábor Farkas <gabor.farkas@gmail.com>
2022-06-13 17:34:40 +02:00
Grot (@grafanabot)
5c3bac348c OAuth: Redirect to login if no oauth module is found or if module is not configured (#50661) (#50702)
* OAuth: Redirect to login if no oauth module is found or if module is not
configured

* OAuth: Update test to check for location header

(cherry picked from commit 95a4c4a4d6)

Co-authored-by: Karl Persson <kalle.persson@grafana.com>
2022-06-13 17:14:49 +02:00
Grot (@grafanabot)
efdde61c52 Docs: Update documentation now create functionality has moved (#50663) (#50693)
* Update documentation now + button functionality has moved

* Updates following comments

(cherry picked from commit 27e3e79661)

Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2022-06-13 16:30:42 +02:00
Ivana Huckova
95b545908f Loki, Prometheus: Show Query patterns in all editor modes (#50263) (#50653) 2022-06-13 15:47:54 +02:00
Grot (@grafanabot)
da76c87bfe Loki: Fix showing of duplicated label values in dropdown in query builder (#50680) (#50688)
* Prometheus,Loki: Fix showing of duplicated values in dropdown

* Use different more readable solution

* Update

(cherry picked from commit 77bdbe1dea)

Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
2022-06-13 15:47:36 +02:00
Carl Bergquist
001f3709ae Instrumentation: Add feature toggle for logging requests instrumented as unknown (#50566) (#50670)
Signed-off-by: bergquist <carl.bergquist@gmail.com>
(cherry picked from commit 2d6e69226b)
2022-06-13 15:19:07 +02:00
Grot (@grafanabot)
4eeb6750f0 add missing return (#50667) (#50675)
(cherry picked from commit 8da9b4f2b5)

Co-authored-by: Will Browne <wbrowne@users.noreply.github.com>
2022-06-13 14:27:45 +02:00
Grot (@grafanabot)
4d1ee06b1b Prometheus: Don't show undefined for step in collapsed options in query editor when value is "auto" (#50511) (#50658)
(cherry picked from commit bd04b776b5)

Co-authored-by: Andrej Ocenas <mr.ocenas@gmail.com>
2022-06-13 14:26:04 +02:00
Dan Cech
bc2f941004 clean up duplicated user creation code (#50178) (#50327)
* clean up duplicated user creation code

* remove unused duplicate getOrCreateOrg function

* fix up tests

(cherry picked from commit 9350ab781c)
2022-06-13 07:12:00 -04:00
Grot (@grafanabot)
5390fa57e9 Expression: Execute hidden expressions (#50636) (#50659)
(cherry picked from commit ede7b29db5)

Co-authored-by: Sriram <yesoreyeram@gmail.com>
2022-06-13 11:39:56 +02:00
Grot (@grafanabot)
b4dba8d14e logs: histogram: handle backend-mode queries (#50535) (#50650)
(cherry picked from commit a0e5a4eba2)

Co-authored-by: Gábor Farkas <gabor.farkas@gmail.com>
2022-06-13 08:50:50 +02:00
Grot (@grafanabot)
98c540f51e Loki: Fix issues with using query patterns (#50414) (#50646)
* WIP

* Loki: Fix running of query patterns

* Remove console.log

* Add test

* Update empty line filter test

(cherry picked from commit 88279dda1c)

Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
2022-06-11 21:53:46 +02:00
Grot (@grafanabot)
342af69edb Explore: Fix log context scroll to bottom (#50600) (#50645)
* Explore: Fix log context scroll to bottom

* Update

(cherry picked from commit 1231e0dd69)

Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
2022-06-11 21:50:53 +02:00
Grot (@grafanabot)
5ca6b7cd2d Panels: Fixes issue with showing 'Cannot visualize data' when there issue really was no data (#50485) (#50615)
(cherry picked from commit 56a9994a13)

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
2022-06-10 14:36:00 -07:00
Grot (@grafanabot)
d301b6611f SearchV2: move search parameters to a nested object (#50561) (#50635)
(cherry picked from commit b6f97e8101)

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2022-06-10 14:31:47 -07:00
Grot (@grafanabot)
d32ca6a159 RBAC: Inheritance permission migration should handle empty managed roles (#50611) (#50621)
* Make inheritance permission migration more robust

* Better fix

* Add more tests to the migration

* Add removed test case

* Add test case for empty role in empty org

* Handling the role.ID 0 case with a log

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

Co-authored-by: Jguer <joao.guerreiro@grafana.com>
(cherry picked from commit 307a0d4538)

Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com>
2022-06-10 17:34:17 +02:00
Grot (@grafanabot)
1a928a70ba Dashboard: Clean up state after deletion (#50316) (#50625)
* Dashboard: Clean up after deletion

* cleanup

* rename cleanUp function

(cherry picked from commit a832b92988)

Co-authored-by: Agnès Toulet <35176601+AgnesToulet@users.noreply.github.com>
2022-06-10 17:19:16 +02:00
Grot (@grafanabot)
fa4fa0bf4f doc fix (#50624) (#50626)
(cherry picked from commit 336c9fd513)

Co-authored-by: Ieva <ieva.vasiljeva@grafana.com>
2022-06-10 17:17:40 +02:00
Grot (@grafanabot)
5d9178f6ab Dashboards: Fix folder picker not showing correct results when typing too fast (#50303) (#50623)
* Use callback form for loadOptions in folder picker

* clean up

* fix other tests

* clarify comment

(cherry picked from commit 32d4f6ac60)

Co-authored-by: Josh Hunt <joshhunt@users.noreply.github.com>
2022-06-10 17:05:55 +02:00
Grot (@grafanabot)
fd33095837 Alerting: improve provisioning docs (#50347) (#50618)
* Alerting: improve provisioning docs

* add new provisioning page

* add api docs

* fix formatting and add better descriptions

* fix typo

(cherry picked from commit 862f51216b)

Co-authored-by: Jean-Philippe Quéméner <JohnnyQQQQ@users.noreply.github.com>
2022-06-10 16:41:55 +02:00
Armand Grillet
d8f5a3b799 Backport docs changes for Grafana Alerting (#50610) 2022-06-10 16:02:45 +02:00
Grot (@grafanabot)
a4958a437f No longer generate theme json as it's not compatible with the right tooling (#50605) (#50609)
(cherry picked from commit 9d73264895)

Co-authored-by: Josh Hunt <joshhunt@users.noreply.github.com>
2022-06-10 15:00:42 +01:00
Grot (@grafanabot)
d00ba7d49b [v9.0.x] Alerting: use "find" to wait for expression editor to load (#50603)
Co-authored-by: Gilles De Mey <gilles.de.mey@gmail.com>
2022-06-10 15:21:32 +02:00
Grot (@grafanabot)
83956baf2b Prometheus: Templating queries should pass on custom headers (#50344) (#50408)
* pass on all headers except for accept headers

* touch up and testing

* add custom header values to resource queries

* remove my picture. oops

* handle gzip responses as well

* fix linting issues

* add my space

* no lint

* removed cookies from being proxied

* clean up and handle errors from io.reader.Close() calls

(cherry picked from commit 49dc9da9c1)

Co-authored-by: Stephanie Closson <srclosson@gmail.com>
2022-06-10 08:51:26 -03:00
Grot (@grafanabot)
1e3d8610e1 loki: better error message when escaping is involved (#50352) (#50595)
(cherry picked from commit 130bd26edd)

Co-authored-by: Gábor Farkas <gabor.farkas@gmail.com>
2022-06-10 13:16:08 +02:00
Grot (@grafanabot)
b32a61933a [v9.0.x] Grafana UI: Put back production build in rollup config (#50580)
* Grafana UI: Put back production build in rollup config (#50575)

(cherry picked from commit 2d1ab27636)

* chore: refresh yarn.lock

Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com>
2022-06-10 12:17:29 +02:00
Christopher Moyer
49b20ad76c Docs: Backport 49739 to v9.0.x (#50123)
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
2022-06-10 12:15:42 +02:00
Grot (@grafanabot)
ea6d827038 Search: Fixes margins and paddings and left position (#50570) (#50578)
(cherry picked from commit c1d405a200)

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
2022-06-10 11:47:47 +02:00
Grot (@grafanabot)
5a5ecbe00b [v9.0.x] Grafana UI: Fix nonexistent indexof module for plugin tests (#50572)
* Grafana UI: Fix nonexistent indexof module for plugin tests (#50529)

* fix(grafana-ui): prevent module resolution failure where component-indexof appears as indexof

* chore(grafana-ui): update comment explaining need for alias plugin

(cherry picked from commit 6a4906ef7e)

* chore: refresh yarn.lock

Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com>
2022-06-10 11:32:58 +02:00
Grot (@grafanabot)
e760ffab0a Alerting: Invalid setting of enabled for unified alerting should return error (#49876) (#50569)
(cherry picked from commit bda47df4ad)

Co-authored-by: George Robinson <george.robinson@grafana.com>
2022-06-10 09:15:46 +01:00
Grot (@grafanabot)
c312188cb2 Alerting: Fix force_migration when alerting is disabled (#50431) (#50481)
This pull request fixes a bug where force_migration must be set to true when both unified and legacy alerting is disabled.
2022-06-10 08:30:06 +01:00
Zoltán Bedi
ca2bd11f80 [v9.0.x] TimeSeries: Add an option to set legend width (#50550)
* TimeSeries: Add an option to set legend width (#49126)

* Add an option to set legend width

* Add width to the cue file

* Use legendStyle

Co-authored-by: Zoltán Bedi <zoltan.bedi@gmail.com>
(cherry picked from commit a6693ba62f)

* Add migration

Co-authored-by: Ivan Babrou <github@ivan.computer>
2022-06-09 22:16:44 +02:00
Grot (@grafanabot)
447ce0aa30 AzureMonitor: changes to azureMonitorExperimentalUI after feedback (#50455) (#50546)
* AzureMonitor: tweak experimental-ui after UX discussions.
- move metrics up to resource row
- allow resources field to take an inlineField prop and a labelWidth prop. Eventually once the feature toggle is removed
the inlineField prop will be the only code branch in Field.tsx.

* AzureMonitor: remove devmode req for azureMonitorExperimentalUI flag

* refactor: consolidate logic branch for inline Field

(cherry picked from commit 5df694b924)

Co-authored-by: Adam Simpson <adam@adamsimpson.net>
2022-06-09 18:41:21 +00:00
Grot (@grafanabot)
4f011515c6 AzureMonitor: Remove unused code (#50399) (#50531)
(cherry picked from commit 9703c9211e)

Co-authored-by: Andres Martinez Gotor <andres.martinez@grafana.com>
2022-06-09 17:37:58 +02:00
Gábor Farkas
cfe8116791 logs: track the usage of certain features (#50325) (#50526)
* logs: track the usage of certain features

* Add report interaction for logs interactions

* mock reportInteraction in test

* mock reportInteraction

Co-authored-by: Ivana Huckova <ivana.huckova@gmail.com>
(cherry picked from commit c412a3b052)
2022-06-09 17:04:51 +02:00
Grot (@grafanabot)
dd7ea16eb1 AzureMonitor: Clean namespace when changing the resource (#50311) (#50342)
(cherry picked from commit ae449cc823)

Co-authored-by: Andres Martinez Gotor <andres.martinez@grafana.com>
2022-06-09 16:58:04 +02:00
Grot (@grafanabot)
7a4e3a3588 [v9.0.x] Docs: Manual backport of alert list panel docs rewrite (#50516)
Co-authored-by: Gilles De Mey <gilles.de.mey@gmail.com>
2022-06-09 16:27:59 +02:00
Grot (@grafanabot)
06ed6d25f5 ReleaseNotes: Updated changelog and release notes for 9.0.0-beta2 (#50398) (#50520)
Co-authored-by: Timur Olzhabayev <timur.olzhabayev@grafana.com>
(cherry picked from commit a6943cb399)
2022-06-09 15:43:32 +02:00
Grot (@grafanabot)
1ca5f3c5b7 Updating migration docs to include most relevant breaking changes (#50356) (#50514)
(cherry picked from commit cd01eb541a)

Co-authored-by: Timur Olzhabayev <timur.olzhabayev@grafana.com>
2022-06-09 15:09:54 +02:00
Grot (@grafanabot)
33c0a53369 DataSources: Fixes issue with expressions not being queried (#50446) (#50509)
(cherry picked from commit ce1ee4de04)

Co-authored-by: Joao Silva <100691367+JoaoSilvaGrafana@users.noreply.github.com>
2022-06-09 15:08:30 +03:00
Grot (@grafanabot)
18cf84112e Docs: Images in Notifications (#50425) (#50503)
(cherry picked from commit 9d537efb48)

Co-authored-by: George Robinson <george.robinson@grafana.com>
2022-06-09 14:10:23 +03:00
Grot (@grafanabot)
d53a750c18 Docs: extend RBAC breaking changes (#50495) (#50501)
* extend RBAC breaking changes

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

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

Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com>
(cherry picked from commit 7e59fd3ecf)

Co-authored-by: Ieva <ieva.vasiljeva@grafana.com>
2022-06-09 12:35:00 +02:00
Grot (@grafanabot)
d96e12efc4 Alerting: Schedule Alert rules metric tracking (#50415) (#50497)
* Alerting: Schedule Alert rules metric tracking

Change the record of metrics from one place to two as an attempt to have a semi-accurate record.

(cherry picked from commit c59938b235)

Co-authored-by: gotjosh <josue.abreu@gmail.com>
2022-06-09 12:27:22 +02:00
Grot (@grafanabot)
e9d3d6057e FeatureToggles: Support changing feature toggles with URL parameters (#50275) (#50496) 2022-06-09 12:06:45 +02:00
Grot (@grafanabot)
d71e7ef4a3 docs: clarify how PR titles should be formatted (#49682) (#49979)
(cherry picked from commit e452785291)

Co-authored-by: Levente Balogh <balogh.levente.hu@gmail.com>
2022-06-09 13:04:18 +03:00
Grot (@grafanabot)
df7c4ca137 Alerting: Tidy up input fields for name, folder and group (#50432) (#50486)
* aligned fields moved labels

* reduce width for labels inputs

(cherry picked from commit 06bbf870da)

Co-authored-by: Peter Holmberg <peterholmberg@users.noreply.github.com>
2022-06-09 11:57:49 +02:00
Grot (@grafanabot)
79fd17c22a Fix metric names for screenshots (#50426) (#50494)
(cherry picked from commit c636685ca2)

Co-authored-by: George Robinson <george.robinson@grafana.com>
2022-06-09 11:50:13 +02:00
Marcus Efraimsson
1a05f7c1dc Chore: Upgrade grafana-plugin-sdk-go to v0.137.0 (#50443) (#50489)
Co-authored-by: Todd Treece <todd.treece@grafana.com>
(cherry picked from commit cddab15769)
2022-06-09 11:47:30 +02:00
gotjosh
7e0a3c34d2 Alerting: Logs should not be capitalized and the errors key should be "err" (#50333) (#50487)
* Alerting: decapitalize log lines and use "err" as the key for errors

Found using (logger|log).(Warn|Debug|Info|Error)\([A-Z] and (logger|log).(Warn|Debug|Info|Error)\(.+"error"

(cherry picked from commit 0cde283505)
2022-06-09 11:44:54 +02:00
Grot (@grafanabot)
612e0c1545 Chore: Remove react-testing-lib from bundles (#50442) (#50490)
* refactor(selectoptiontest): move helper function out of grafana/ui so testing-lib isn't in bundle

* test(selectoptionintest): update import location of helper function

* test(amroutes): put back missing selectOptionInTest helper

* test(selectoptionintest): clean up remaining file imports / exports

* test(queryeditor): fix failing import

* refactor(grafana-ui): reuse selectOptionInTest in SelectBase test

(cherry picked from commit ccd75d72f8)

Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com>
2022-06-09 11:34:44 +02:00
Grot (@grafanabot)
9722ade9c9 [v9.0.x] Alerting: Unify alert status labels on the alert list panel (#50488)
Co-authored-by: Gilles De Mey <gilles.de.mey@gmail.com>
Co-authored-by: Konrad Lalik <konrad.lalik@grafana.com>
2022-06-09 11:30:54 +02:00
Armand Grillet
94a3704c09 [v9.0.x] Alerting: Add RBAC actions and role for provisioning API routes (#50483)
* Alerting: Add RBAC actions and role for provisioning API routes (#50459)

* add alert provisioning actions and role

* linter

(cherry picked from commit 54fa04263b)

* Fix cherry-pick conflict in rbac-fixed-basic-role-definitions.md

Co-authored-by: Yuriy Tseretyan <yuriy.tseretyan@grafana.com>
2022-06-09 11:07:38 +02:00
Agnès Toulet
b033a4e04f Docs: update license restrictions (#49334) (#50387)
* Docs: update license restrictions

* apply review feedback

* remove initial description of two license types

Clean up tiered licensing copy and keep it all in one deprecated section, refer to old docs if user wants to learn more.

* fix linting issues

* update title

* fix config url

Co-authored-by: Mitch Seaman <mjseaman@users.noreply.github.com>
(cherry picked from commit 3df7ee81f3)
2022-06-09 11:01:13 +02:00
Grot (@grafanabot)
18fc138157 Alerting: Fix provisioning validation status codes and panics (#50464) (#50484)
* Updates to all except alert rules

* Return 400 when rules fail to validate, add testinfra

* More sane package aliases

* More package alias renames

* One more bug in contact point validation

* remove unused function

Co-authored-by: Jean-Philippe Quémémer <jeanphilippe.quemener@grafana.com>
Co-authored-by: Jean-Philippe Quéméner <JohnnyQQQQ@users.noreply.github.com>
(cherry picked from commit 7dd78fee2c)

Co-authored-by: Alexander Weaver <weaver.alex.d@gmail.com>
2022-06-09 10:58:47 +02:00
Grot (@grafanabot)
8c0decbabd scroll nav elements into view when using the keyboard (#50434) (#50479)
(cherry picked from commit 3fa7f72d6c)

Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2022-06-09 09:36:28 +01:00
Andrej Ocenas
1924cfc3c0 Docs: Fix Prometheus query editor Legend docs (#50312) (#50480)
* Docs: Fix Prometheus query editor Legend docs (#50312)

* Update docs for label

* Fix wording

* Fix typo

(cherry picked from commit fee0b9d1f2)

* Fix
2022-06-09 10:30:42 +02:00
Grot (@grafanabot)
d33b53b329 SearchV2: optionally exclude panels from search results (#49971) (#50026)
(cherry picked from commit 4dfab0b7d5)

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
Co-authored-by: Artur Wierzbicki <artur.wierzbicki@grafana.com>
2022-06-09 10:05:12 +02:00
Grot (@grafanabot)
5dcc334d9c Alerting: bump rule version when updating rule group interval (#50295) (#50476)
* Alerting: move group update to alert rule service

* rename validateAlertRuleInterval to validateRuleGroupInterval

* init baseinterval correctly

* add seconds suffix

* extract validation function for reusability

* add context to err message

(cherry picked from commit cf684ed38f)

Co-authored-by: Jean-Philippe Quéméner <JohnnyQQQQ@users.noreply.github.com>
2022-06-09 09:40:00 +02:00
Grot (@grafanabot)
5eb5779a82 Formatting: Make SI number formats more robust (#50117) (#50292)
Closes #49372

(cherry picked from commit a9a276a9da)

Co-authored-by: kay delaney <45561153+kaydelaney@users.noreply.github.com>
2022-06-09 09:33:17 +02:00
Grot (@grafanabot)
4bb2ba53e8 Alerting: Improve Unified Alerting Rollback Warning (#50470) (#50472)
After migrating to unified alerting, users must explicitly allow rolling
back to legacy alerting by setting force_migration = true in config.
This updates the panic message to clarify why that's required and what
the consequences of rolling back will be.

Fixes #50469

(cherry picked from commit 30f035ca34)

Co-authored-by: Joe Blubaugh <joe.blubaugh@grafana.com>
2022-06-09 07:48:59 +02:00
Joe Blubaugh
3fe8fec086 Alerting: Fix image embed in email template. (#50370) (#50468)
The ng_alert_notification email template did not include templating for
linked or embedded images. This change updates that.

Additionally, this change supports embedding an image for each alert in
an email batch.

Fixes #50315

(cherry picked from commit ecf080825e)
2022-06-09 11:20:01 +08:00
Grot (@grafanabot)
406f286e51 RBAC: Fix migrations running into the wrong order (#50452) (#50454)
Co-authored-by: Kalle Persson <kalle.persson@grafana.com>

Co-authored-by: Kalle Persson <kalle.persson@grafana.com>
(cherry picked from commit 2813e49842)

Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com>
2022-06-08 19:53:30 +02:00
Grot (@grafanabot)
9ccee68c71 Bumping protobufjs version (#50435) (#50440)
(cherry picked from commit b9cce18f72)

Co-authored-by: lean.dev <34773040+leandro-deveikis@users.noreply.github.com>
2022-06-08 12:19:12 -03:00
Grot (@grafanabot)
a13ce8dbd8 Docs: Fix release notes formatting issues in 9.0.0-beta.3 (#50410) (#50428)
(cherry picked from commit aace6a95f0)

Co-authored-by: Sriram <yesoreyeram@gmail.com>
2022-06-08 14:54:46 +01:00
Grot (@grafanabot)
ffc7d688c2 Angular: Fixes minor mistake in previous bsTypeahead PR (#50411) (#50417)
(cherry picked from commit 3866debae9)

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
2022-06-08 14:33:20 +02:00
Grot (@grafanabot)
54bd556843 Security: Fixes javascript security warnings in old vendored libs (#50382) (#50413)
(cherry picked from commit 74608d6480)

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
2022-06-08 14:13:38 +02:00
Artur Wierzbicki
1eca4c113e Previews: update docs for the new search layout (#50247) 2022-06-08 13:48:42 +02:00
Grot (@grafanabot)
addb1dd979 Reporting: Update documentation and screenshots with v9 changes (#50072) (#50401)
* Reporting: Update docs

* Update screenshots

* Update docs/sources/enterprise/reporting.md

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

* Update docs/sources/enterprise/reporting.md

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

* Update docs/sources/enterprise/reporting.md

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

* reporting docs copy edits

reformat reporting docs, slightly correct multiple dashboard rendering doc

* Format

* Format[2]

Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com>
Co-authored-by: Mitch Seaman <mjseaman@users.noreply.github.com>
(cherry picked from commit 35ba4a6ac1)

Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>
2022-06-08 14:18:19 +03:00
Grot (@grafanabot)
11af837916 Dashboard: Fixes random scrolling on time range change (#50379) (#50384)
* Dashboard: Fixes random scrolling on time range change

* fix ts issue

* removed logging

(cherry picked from commit fd408652dc)

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
2022-06-08 13:16:52 +02:00
Grot (@grafanabot)
c9352f1778 Angular: Adds back two angular directives that are still used by remaining angular bits and plugins (#50380) (#50385)
(cherry picked from commit 288eede638)

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
2022-06-08 13:16:42 +02:00
Grot (@grafanabot)
f843c6c9d7 Remove test_steps (#50396) (#50403)
(cherry picked from commit 63ed5367c3)

Co-authored-by: Dimitris Sotirakis <sotirakis.dim@gmail.com>
2022-06-08 13:15:28 +02:00
Grot (@grafanabot)
faf3add82d Improve docs for values in custom annotations and labels (#50346) (#50389)
(cherry picked from commit 6e3d58d779)

Co-authored-by: George Robinson <george.robinson@grafana.com>
2022-06-08 11:41:39 +01:00
Grot (@grafanabot)
0690e19029 Playlists: Save button now correctly creates a new playlist (#50381) (#50390)
* Add type="submit" to PlaylistForm submit button

* fix linting errors

(cherry picked from commit a1cf709ad2)

Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2022-06-08 11:53:21 +02:00
Grot (@grafanabot)
29b2c71517 Alerting: replace a duplicated configuration key (#50350) (#50368)
This PR renames the configuration key enabled to capture. This is needed as we already have a configuration key with the name enabled.

Fixes #50328

(cherry picked from commit fd664e4beb)

Co-authored-by: Jean-Philippe Quéméner <JohnnyQQQQ@users.noreply.github.com>
2022-06-08 05:22:41 +02:00
Grot (@grafanabot)
ef8ad0f74a Bump provisioning to admin-only in lieu of dedicated RBAC permissions (#50366) (#50367)
(cherry picked from commit 28a47b56d2)

Co-authored-by: Alexander Weaver <weaver.alex.d@gmail.com>
2022-06-08 00:43:33 +02:00
Grot (@grafanabot)
2acf5ed0c0 Alerting: Fix database unavailable removes rules from scheduler (#49874) (#50345)
(cherry picked from commit c83f84348c)

Co-authored-by: George Robinson <george.robinson@grafana.com>
2022-06-07 16:41:07 +01:00
Grot (@grafanabot)
521264b647 RBAC: docs, update alerting.rules write permission (#50304) (#50329)
(cherry picked from commit f54adf6c22)

Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com>
2022-06-07 16:59:15 +02:00
Ezequiel Victorero
deea0fcfc0 ReleaseNotes: Updated changelog and release notes for 9.0.0-beta3 (#50317) (#50321)
(cherry picked from commit 32a8af59d6)

Co-authored-by: Grot (@grafanabot) <43478413+grafanabot@users.noreply.github.com>
2022-06-07 10:42:30 -03:00
Grot (@grafanabot)
a3fb261d6f "Release: Updated versions in package to 9.0.0-beta.3" (#50314) 2022-06-07 10:23:05 -03:00
Artur Wierzbicki
239956d02e Search: fix 'Clear filters' button (#50283)
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
(cherry picked from commit 49112c8356)
2022-06-07 14:21:48 +02:00
Grot (@grafanabot)
b01a07921f Loki: Add more query patterns (#50248) (#50301)
* Loki: Add query patterns

* Update

* Update queries

* Update public/app/plugins/datasource/loki/querybuilder/LokiQueryModeller.ts

Co-authored-by: Jennifer Villa <jvilla2013@gmail.com>

* Update public/app/plugins/datasource/loki/querybuilder/LokiQueryModeller.ts

* Update descriptions

* Update

Co-authored-by: Jennifer Villa <jvilla2013@gmail.com>
(cherry picked from commit be712a5f17)

Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
2022-06-07 13:33:40 +02:00
Grot (@grafanabot)
66cc24b7cb docs: describe cookie handling in backend data source plugins (#49986) (#50299)
* docs: describe cookie handling in backend data source plugins

* adjusted text

(cherry picked from commit 19df6d52b7)

Co-authored-by: Gábor Farkas <gabor.farkas@gmail.com>
2022-06-07 13:18:44 +02:00
Grot (@grafanabot)
56e353cfed Prometheus, Loki: Update run queries button (#50005) (#50281)
* Prometheus, Loki: Updare run queries button

* Update docs

* Update docs

(cherry picked from commit 9f6afb3475)

Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
2022-06-07 13:08:09 +02:00
Grot (@grafanabot)
e63dde02c5 AddDataSourceConfig: Remove deprecated checkHealth prop (#50296) (#50298)
(cherry picked from commit e9fac9ee03)

Co-authored-by: kay delaney <45561153+kaydelaney@users.noreply.github.com>
2022-06-07 12:44:03 +02:00
Grot (@grafanabot)
2a1a75c6fd Data: Remove deprecated types and functions from valueMappings (#50035) (#50293)
(cherry picked from commit c96fa4c77d)

Co-authored-by: kay delaney <45561153+kaydelaney@users.noreply.github.com>
2022-06-07 12:05:28 +02:00
Grot (@grafanabot)
3057181fbe Fix Whats New docs for images in notifications (#50250) (#50289)
(cherry picked from commit 2e1827127d)

Co-authored-by: George Robinson <george.robinson@grafana.com>
2022-06-07 10:58:47 +01:00
Grot (@grafanabot)
1bac7a8306 [v9.0.x] Tracing: Deprecate opentracing (#50082)
* Tracing: Deprecate opentracing (#50058)

* Deprecate opentracing

* Fix comment

* Adjust comment

* Fix docs for opentelemetry

* Add deprecated to sample.ini

(cherry picked from commit 24c6a73095)

* Update docs/sources/administration/configuration.md

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

Co-authored-by: idafurjes <36131195+idafurjes@users.noreply.github.com>
Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
2022-06-07 11:53:37 +02:00
Grot (@grafanabot)
5275a21c5c Add back a lower z-index (#50285) (#50288)
(cherry picked from commit 13a71e7219)

Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2022-06-07 11:49:23 +02:00
Grot (@grafanabot)
fe220eb570 CloudWatch: Dynamic label documentation (#49463) (#50286)
* dynamic label documentation

* Update docs/sources/datasources/aws-cloudwatch/_index.md

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

* Update docs/sources/datasources/aws-cloudwatch/_index.md

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

* formatting

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

Co-authored-by: Erik Sundell <erik.sundell87@gmail.com>
2022-06-07 11:40:38 +02:00
Dimitris Sotirakis
c3ad379563 Update Golang - bump grabpl and build-container (#50253) (#50255)
(cherry picked from commit 7b750cc0f0)
2022-06-06 15:57:44 +02:00
Grot (@grafanabot)
371d9bc3b8 RBAC: change migration logic (#50187) (#50245)
* change migration logic

* linting

* linting

* fix an issue with the migration logic

* make tests runnable against other DBs

Co-authored-by: Sofia Papagiannaki <1632407+papagian@users.noreply.github.com>

Co-authored-by: Sofia Papagiannaki <1632407+papagian@users.noreply.github.com>
(cherry picked from commit 7c800421d3)

Co-authored-by: Ieva <ieva.vasiljeva@grafana.com>
2022-06-06 14:02:58 +02:00
Grot (@grafanabot)
9564129300 SaveDashboardForm: Ensure saveTimerange is a boolean (#50228) (#50244)
(cherry picked from commit 333e261074)

Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>
2022-06-06 13:41:44 +02:00
Grot (@grafanabot)
760b9ac9d0 Expression: Filter query, mixed mode fixes and panel error message (#50218) (#50242)
* implement filterQuery to support query.hide

* Fixed - expression ds name in mixed mode

* Execute expression query on blur

* show actual error message when ds return Query data error

(cherry picked from commit a3071b7797)

Co-authored-by: Sriram <yesoreyeram@gmail.com>
2022-06-06 12:12:36 +01:00
Grot (@grafanabot)
4a5d5e6ead Loki: Add user analytics for query editor mode (#49619) (#50232)
* Add reportInteraction call

* Update public/app/plugins/datasource/loki/querybuilder/components/LokiQueryEditorSelector.tsx

Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
(cherry picked from commit 37aedd6906)

Co-authored-by: Andrej Ocenas <mr.ocenas@gmail.com>
2022-06-06 11:07:32 +02:00
Grot (@grafanabot)
0ab03dbf3a HeatmapNG: cell value filtering and color clamping (#50204) (#50225)
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
(cherry picked from commit 8cdfef4796)

Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
2022-06-06 01:33:32 -07:00
Grot (@grafanabot)
d929d745f1 Chore: uPlot 1.6.21 (#50223) (#50224)
(cherry picked from commit e3815111ea)

Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
2022-06-06 00:11:06 -07:00
Grot (@grafanabot)
bb801de9ed Prometheus: Fix resource call panic (#50216) (#50221)
(cherry picked from commit 4aa5e7e69e)

Co-authored-by: Todd Treece <360020+toddtreece@users.noreply.github.com>
2022-06-06 03:52:58 +02:00
Grot (@grafanabot)
4f284f167e Prometheus: Migrate metadata queries to use resource calls (#49921) (#50219) 2022-06-06 03:11:45 +02:00
Grot (@grafanabot)
7bcbf45c66 SearchV2: explicit dashboard loading order and cleanups (#50210) (#50217)
(cherry picked from commit da49f907bb)

Co-authored-by: Alexander Emelin <frvzmb@gmail.com>
2022-06-05 15:19:41 -07:00
Grot (@grafanabot)
22673382b5 Alerting: remove feature toggle for provisioning API (#50167) (#50213)
* Alerting: remove feature toggle for provisioning API

* remove missed code parts

* remove unused import

* remove empty line

* mark routes as stable

(cherry picked from commit 4b8a4449ed)

Co-authored-by: Jean-Philippe Quéméner <JohnnyQQQQ@users.noreply.github.com>
2022-06-05 08:03:47 +02:00
Grot (@grafanabot)
92d995d658 Alerting: Add provenance guard to config api (#50147) (#50209)
* Alerting: add provenance guard to config api

* add tests

* only guard if config valid

* adapt error message

* simplify logic

* rename arguments

* make logic more straight forward

* rename opt to options

* remove useless maps

(cherry picked from commit 4cc8c6f745)

Co-authored-by: Jean-Philippe Quéméner <JohnnyQQQQ@users.noreply.github.com>
2022-06-04 15:13:02 +02:00
Grot (@grafanabot)
67cbd5015d Encryption: Fix multiple data keys migration (#49848) (#50207)
* Add migration

* Migrator: Extend support to rename columns

* Fix getting current key

* Fix column name in migration

* Fix deks reencryption

* Fix caching

* Add back separate caches for byName and byPrefix

* Do not concatenate prefix with uid

* Rename DataKey struc fields

* SQLStore: Add deprecation comments for breaking migrations

* Add comment

* Minor corrections

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

Co-authored-by: Tania <yalyna.ts@gmail.com>
2022-06-04 13:13:34 +02:00
Grot (@grafanabot)
f404191ccb Alerting: only delete mute time if not used by route (#50193) (#50205)
* Alerting: only delete mute time if not used by route

* add a testcase

* import package only once

* replace apimodels with definitions

(cherry picked from commit 8de4ffe61f)

Co-authored-by: Jean-Philippe Quéméner <JohnnyQQQQ@users.noreply.github.com>
2022-06-04 08:06:17 +02:00
Grot (@grafanabot)
635a6b69b3 State Timeline: Fix Null Value Filling and Value Transformation (#50054) (#50196)
(cherry picked from commit 12ba2d6b8b)

Co-authored-by: Kyle Cunningham <codeincarnate@users.noreply.github.com>
2022-06-03 23:11:49 -05:00
Grot (@grafanabot)
9486bde991 [v9.0.x] HeatmapNG: add log scale calculation (#50203)
* HeatmapNG: add log scale calculation (#49969)

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

* stripnulls

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
2022-06-04 04:38:20 +02:00
Yuriy Tseretyan
15780f779d Alerting: Update alert rule diff to not see difference between nil and empty map (#50192) (#50198) 2022-06-03 17:55:39 -04:00
Grot (@grafanabot)
ed169da58c SearchV2: instant local updates, folder events (#50001) (#50194)
(cherry picked from commit d2868a1ce7)

Co-authored-by: Alexander Emelin <frvzmb@gmail.com>
2022-06-03 22:29:48 +02:00
Grot (@grafanabot)
b9621d08a5 Alerting: add mute timings provenance to config api (#50149) (#50190)
(cherry picked from commit d2f3631a47)

Co-authored-by: Jean-Philippe Quéméner <JohnnyQQQQ@users.noreply.github.com>
2022-06-03 19:47:21 +02:00
Gábor Farkas
8d34a58a72 Revert "Loki: do not produce histogram for instant queries (#50019) (#50065)" (#50181)
This reverts commit 063c5095eb.
2022-06-03 10:23:08 -06:00
Will Browne
d4fde160a1 resolve conflicts (#50184)
Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
2022-06-03 18:03:45 +02:00
Grot (@grafanabot)
fc4018048e SQLStore: Add deprecation comments for breaking migrations (#49740) (#50183)
* Migrator: Extend support to rename columns

* SQLStore: Add deprecation comments for breaking migrations

(cherry picked from commit 5f1305d280)

Co-authored-by: Joan López de la Franca Beltran <5459617+joanlopez@users.noreply.github.com>
2022-06-03 18:02:27 +02:00
Grot (@grafanabot)
78d5e3e0dd [v9.0.x] SearchV2: Fix Move and Delete not updating list in folder view (#50179)
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
Co-authored-by: Maria Alexandra <239999+axelavargas@users.noreply.github.com>
2022-06-03 17:46:16 +02:00
Grot (@grafanabot)
b051551f4d Alerting: Add version segment to all provisioning routes (#49121) (#50174)
Co-authored-by: Jean-Philippe Quémémer <jeanphilippe.quemener@grafana.com>
(cherry picked from commit 67290aa49f)

Co-authored-by: Alexander Weaver <weaver.alex.d@gmail.com>
2022-06-03 16:57:38 +02:00
Todd Treece
301fdc64bf [v9.0.x] Chore: Update grafana-plugin-sdk-go to v0.136.0 (#50127) (#50168)
(cherry picked from commit 64d93498de)
2022-06-03 07:47:28 -07:00
Grot (@grafanabot)
7320c53ab7 [v9.0.x] Alerting: Make folder filter clearable in Alert list panel (#50169)
Co-authored-by: Peter Holmberg <peterholmberg@users.noreply.github.com>
2022-06-03 15:56:40 +02:00
Grot (@grafanabot)
51d25ebd50 [v9.0.x] Alerting: Fix folder filtering for existing alert rule (#50164)
Co-authored-by: Konrad Lalik <konrad.lalik@grafana.com>
2022-06-03 15:55:16 +02:00
Grot (@grafanabot)
e51a0e209e [v9.0.x] Alerting: Use correct permission scope for external AM updates (#50165)
Co-authored-by: konrad147 <konrad.lalik@grafana.com>
Co-authored-by: Gilles De Mey <gilles.de.mey@gmail.com>
2022-06-03 15:55:15 +02:00
Grot (@grafanabot)
29e903e5e2 update defaults.ini to add role_attribute_path (#49147) (#50155)
cf. https://community.grafana.com/t/grafana-gitlab-oauth-env-variable-not-recognized/65039
and https://github.com/grafana/grafana/issues/48637

(cherry picked from commit 31a4d97b05)

Co-authored-by: Copolycube <kaourintin+github@gmail.com>
2022-06-03 14:17:49 +02:00
Grot (@grafanabot)
d7b61a6002 auth.gitlab: account for role_attribute_path_strict (#50088) (#50154)
(cherry picked from commit 6c7b6a7c34)

Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com>
2022-06-03 14:17:35 +02:00
Piotr Jamróz
e22600d077 [v9.0.x] Query History: Hide query history when anonymous user uses Explore (#50139)
* Hide query history when anonymous user uses Explore

* Show query history to anonymous users when local storage is used

* Fix integration test

(cherry picked from commit 84860ffc96)
2022-06-03 12:29:50 +02:00
Grot (@grafanabot)
c3313972b9 [v9.0.x] Alerting: Prevent query wrapper recreation on drag/drop (#50151)
Co-authored-by: Konrad Lalik <konrad.lalik@grafana.com>
2022-06-03 12:25:40 +02:00
Grot (@grafanabot)
7dd89a4689 Plugins Catalog: Make tabs position consistent with other Grafana pages (#49997) (#50141)
(cherry picked from commit 691a597f43)

Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com>
2022-06-03 11:15:39 +02:00
Gábor Farkas
493d43449c loki: handle ad hoc filters in backend mode (#50135) (#50145)
(cherry picked from commit 6011c373ae)
2022-06-03 09:15:12 +00:00
Grot (@grafanabot)
ccee1f7f18 Alerting: allow custom UID for contact points through API (#50089) (#50143)
* Alerting: allow custom UID for contact points through API

* fix auth

(cherry picked from commit 468ed68d64)

Co-authored-by: Jean-Philippe Quéméner <JohnnyQQQQ@users.noreply.github.com>
2022-06-03 10:45:33 +02:00
Grot (@grafanabot)
742abc8129 [v9.0.x] Query History: Do not show "load more" button when query history item is deleted (#50097)
(cherry picked from commit 927b6e33c0)

Co-authored-by: Piotr Jamróz <pm.jamroz@gmail.com>
2022-06-03 09:31:41 +02:00
Grot (@grafanabot)
8217167b03 [v9.0.x] Explore: Integration test for editing query history comment (#50096)
(cherry picked from commit d41b0f0a21)

Co-authored-by: Piotr Jamróz <pm.jamroz@gmail.com>
2022-06-03 09:29:28 +02:00
Grot (@grafanabot)
93efb1a343 [v9.0.x] Alerting: Filter folders based on users' permissions (#50112)
Co-authored-by: Konrad Lalik <konrad.lalik@grafana.com>
2022-06-03 09:10:28 +02:00
Grot (@grafanabot)
ce10741d76 AzureMonitor: add NewDimension component using experimental UI (#48946) (#50133)
* AzureMonitor: add NewDimension component using experimental UI

This new component is exercised by the same unit test file as the current Dimension component.

Also cleans up a few unneeded `await` keywords in the Dimensions test file.

* AzureMonitor: make tweaks based on PR comments.

- I was importing the wrong Field component
- We can use a typeguard to avoid the strange `if`.

(cherry picked from commit 53cb94a2ad)

Co-authored-by: Adam Simpson <adam@adamsimpson.net>
2022-06-03 03:38:04 +00:00
Grot (@grafanabot)
e674c9a2d1 [v9.0.x] Search (SQL): support dashboardUID query parameter (#50126)
* Search (SQL): support dashboardUID query parameter (#50121)

(cherry picked from commit d452322aa8)

* manual merge

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2022-06-02 18:10:29 -07:00
Grot (@grafanabot)
d5e9967809 Add a section to the alerting documents for performance considerations (#49663) (#50087)
This change adds documentation about how the configuration of Grafana
Alerting affects the performance of the Grafana backend, and how to
control the load that Grafana Alerting generates.

Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com>
(cherry picked from commit 8ad1f4f9be)
2022-06-03 09:06:13 +08:00
Grot (@grafanabot)
d8eb9fcb9c Search: exclude rows from search index (#50124) (#50132)
(cherry picked from commit efca93a3f3)

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2022-06-03 02:39:56 +02:00
Grot (@grafanabot)
afec2786fc Loki: Fix uncaught errors if labelKey contains special characters (#49887) (#50067)
* added regex check of labelKeys

- labelKeys should not contain any special characters
- added encoding of labelKeys in the URL
- don't offer autocomplete if label with special characters is detected

* removed additional regex check for labels

(cherry picked from commit d7139e75fb)

Co-authored-by: svennergr <Svennergr@gmail.com>
2022-06-02 20:20:29 +02:00
Grot (@grafanabot)
3422f70f66 SearchV2: include appSubUrl in the response URL (#50059) (#50118)
(cherry picked from commit 15b3bbad6b)

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2022-06-02 18:08:53 +02:00
Grot (@grafanabot)
ce6fb9f083 [v9.0.x] Alerting: Fix alert list panel showing firing alerts with no instances (#50095)
Co-authored-by: Gilles De Mey <gilles.de.mey@gmail.com>
2022-06-02 17:03:33 +02:00
Grot (@grafanabot)
131f42d59a [v9.0.x] Alerting: Fix alert creation form layout when errors occur (#50106)
Co-authored-by: Gilles De Mey <gilles.de.mey@gmail.com>
2022-06-02 17:03:05 +02:00
Grot (@grafanabot)
3e7a2111e6 RBAC: Make RBAC action names more consistent (#49730) (#50083)
* update action names

* correctly retrieve teams for signed in user

* remove test

* undo swagger changes

* undo swagger changes pt2

* add migration from old action names to the new ones

* rename from list to read

* linting

* also update alertign actions

* fix migration

(cherry picked from commit 5dbea9996b)

Co-authored-by: Ieva <ieva.vasiljeva@grafana.com>
2022-06-02 15:15:40 +02:00
Grot (@grafanabot)
b342fe6e30 Alerting: Provisioning API - Alert rules (#47930) (#50086)
(cherry picked from commit 81d360529b)

Co-authored-by: Jean-Philippe Quéméner <JohnnyQQQQ@users.noreply.github.com>
2022-06-02 15:05:57 +02:00
Grot (@grafanabot)
1c870e9908 Prometheus/Loki: Add raw query and syntax highlight in explain mode (#50070) (#50081)
(cherry picked from commit cc90f9bb69)

Co-authored-by: Andrej Ocenas <mr.ocenas@gmail.com>
2022-06-02 14:29:12 +02:00
Grot (@grafanabot)
e61e26d774 Prometheus/Loki: Show raw query by default in the builder(#50007) (#50080)
(cherry picked from commit c63071f519)

Co-authored-by: Andrej Ocenas <mr.ocenas@gmail.com>
2022-06-02 14:28:41 +02:00
Grot (@grafanabot)
a34e81b6fd Alerting: Fix notification policy "Override grouping" form save (#50031) (#50078)
(cherry picked from commit ace5b2058d)

Co-authored-by: Matthew Jacobson <matthew.jacobson@grafana.com>
2022-06-02 14:23:03 +02:00
Grot (@grafanabot)
0ba2bf2653 [v9.0.x] Draggable: only set drag handle props on the drag handle itself (#50076)
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2022-06-02 14:13:57 +02:00
Grot (@grafanabot)
2fc2a15fab Alerting: Remove Image Upload code from Slack notifier. (#50062) (#50066)
The image file upload code as it is now simply doesn't work - it's
missing several important steps in the file upload process. There is
more information in the fixed issue as to the steps required.

After this change, screenshots will still be attached to slack messages
when external image storage is used with Grafana (an S3 bucket, for
example).

Fixes #50056

(cherry picked from commit 9759eeda17)

Co-authored-by: Joe Blubaugh <joe.blubaugh@grafana.com>
2022-06-02 17:44:30 +08:00
Grot (@grafanabot)
cac5a1945f Cloudwatch: Dynamic labels autocomplete (#49794) (#50063)
* add completeable interface

* add basic labels language

* render monaco editor for label field

* align styling in math expression field

* add unit tests

* fix broken test

* remove unused import

* use theme

* remove comment

* pr feedback

* fix broken imports

* improve test

* make it possible to override code editor styles

* use input styles and align border styles

(cherry picked from commit 467e375fe6)

Co-authored-by: Erik Sundell <erik.sundell87@gmail.com>
2022-06-02 11:26:27 +02:00
Grot (@grafanabot)
063c5095eb Loki: do not produce histogram for instant queries (#50019) (#50065)
* loki: no histogram for instant queries

* added test

(cherry picked from commit b0925ed4ee)

Co-authored-by: Gábor Farkas <gabor.farkas@gmail.com>
2022-06-02 11:26:13 +02:00
Grot (@grafanabot)
63c1a2706f API: Fix swagger specification (#50034) (#50060)
* API: Fix swagger specification

* Validate specification after generation

(cherry picked from commit 6112bd0c63)

Co-authored-by: Sofia Papagiannaki <1632407+papagian@users.noreply.github.com>
2022-06-02 10:09:39 +02:00
Grot (@grafanabot)
77dccd54ca Azure OAuth: silent fail on getting groups (#49909) (#50022)
(cherry picked from commit 3049534c40)

Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com>
2022-06-02 09:23:44 +02:00
Grot (@grafanabot)
f591c64661 etcd: Fix vuln CVE-2018-1098 (#49976) (#49977)
* Update etcd

* Update go.sum

* Replace etcd with etcd/v3

(cherry picked from commit 0d7a3209e7)

Co-authored-by: Dimitris Sotirakis <sotirakis.dim@gmail.com>
2022-06-02 09:03:55 +02:00
Alexander Weaver
8efd4350b4 Alerting: Remove double quotes from matchers (#50038) (#50046)
* Alerting: Remove double quotes from matchers

With #38629 a new Alertmanager configuration object was introduced with `object_matchers`, it was meant to circumvent around the fact that Prometheus label names don't support a set of characters that Grafana needs to support for alerts, silences, matchers, etc. (with a common example being elasticsearch's `.`).
This new object does not include the label of sanitzation or validation that its Prometheus equivalent supports in `matchers` and therefore are semantically not equivalent.

This triggered the problem that when the migration is run, we use `matchers` as the object to populate in configuration for routing policies, but when the UI does its first save this object is transformed to `object_matchers`.

Matchers that were previously running just fine would immediately stop working as soon as the configuration is saved.

This problem surfaced with the introduction of #49952 where we stopped stripping double quotes from matchers (not just regex but _all_ of them).

* Add comment explaining rationale and future removal

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

Co-authored-by: gotjosh <josue.abreu@gmail.com>
2022-06-01 16:52:07 -05:00
Grot (@grafanabot)
1c335d1da7 Tracing: Fix trace links in traces panel (#50028) (#50039)
(cherry picked from commit bb94681d5a)

Co-authored-by: Connor Lindsey <cblindsey3@gmail.com>
2022-06-01 19:50:12 +02:00
Grot (@grafanabot)
08b84c11cb CloudWatch: Add multi-value template variable support for log group names in logs query builder (#49737) (#50037)
* Add multi-value template variable support for log group names

* add test for multi-value template variable for log group names

* add test

(cherry picked from commit dca0453c2e)

Co-authored-by: Kevin Yu <kevinwcyu@users.noreply.github.com>
2022-06-01 19:41:51 +02:00
Christopher Moyer
a96aac39f3 Docs: intro docs refactor (#49545) (#50033)
* intro docs refactor

* adds content to the index file; incorporates feedback

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

* Fix alerting opt out relref

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
Co-authored-by: Chris Moyer <chris.moyer@grafana.com>

* Convert front matter to YAML and add current aliases

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
Co-authored-by: Chris Moyer <chris.moyer@grafana.com>

Co-authored-by: Jack Baldry <jack.baldry@grafana.com>
(cherry picked from commit 1e3e9f3c68)
2022-06-01 12:35:07 -05:00
Grot (@grafanabot)
835928cd01 license: Make coremodels all Apache v2 (#49731) (#50032)
(cherry picked from commit e5fab2dec8)

Co-authored-by: sam boyer <sdboyer@grafana.com>
2022-06-01 13:17:29 -04:00
Grot (@grafanabot)
ffa5873529 DashList: Remove star z-index (#50029)
Closes #49796

(cherry picked from commit 6ceb40e20e)

Co-authored-by: Alexander Kubyshkin <i.am.glint@gmail.com>
2022-06-01 18:47:59 +02:00
Grot (@grafanabot)
56818c16fd SearchV2: Fix scroll issue in folder folder view page (#50010) (#50017)
(cherry picked from commit 07bfa13770)

Co-authored-by: Maria Alexandra <239999+axelavargas@users.noreply.github.com>
2022-06-01 17:13:12 +02:00
Grot (@grafanabot)
6e93f497b2 Alerting: Fix external alertmanager duplication (#49980) (#50008)
* Fix external alertmanager duplication

* Add tests

(cherry picked from commit 9da41140aa)

Co-authored-by: Konrad Lalik <konrad.lalik@grafana.com>
2022-06-01 16:36:38 +02:00
Grot (@grafanabot)
382eaaa773 Secrets: Fix unified secrets backwards compatibility (#49719) (#50009)
* Fix unified secrets backwards compatibility

* Add compatibility fix to AddDataSource function

* Allow updating password on fail to decrypt secrets

* If unified secret is corrupt try migrating

(cherry picked from commit 470be98588)

Co-authored-by: Guilherme Caulada <guilherme.caulada@grafana.com>
2022-06-01 11:10:02 -03:00
Grot (@grafanabot)
3b5511db2b Loki: Run query when pressing Enter on line-filters (#49913) (#50004)
* changed `onBlur` and `onKeyDown` handling

- `onCommitChange` is only called if `onBlur` or `onKeyDown` are not set

* added `runQueryOnEnter` flag to OperationParamDef

* only run query if `runQueryOnEnter` is configured

* changed `evt.type` check to `keydown`

(cherry picked from commit b355adac6f)

Co-authored-by: svennergr <Svennergr@gmail.com>
2022-06-01 16:08:09 +02:00
Grot (@grafanabot)
338f6797b2 RBAC: Include alert.rules action when setting folder permissions (#49946) (#50006)
(cherry picked from commit bdff63d4a8)

Co-authored-by: Karl Persson <kalle.persson@grafana.com>
2022-06-01 15:41:07 +02:00
Grot (@grafanabot)
39f461ea78 Metrics: Remove support for using summaries instead of histogram for HTTP instrumentation (#49985) (#50003)
Signed-off-by: bergquist <carl.bergquist@gmail.com>
(cherry picked from commit 9562fb389f)

Co-authored-by: Carl Bergquist <carl.bergquist@gmail.com>
2022-06-01 14:49:37 +02:00
Kevin Yu
b2e73b866f Azure Monitor: Include datasource ref when interpolating variables (#49543) (#49957) 2022-06-01 05:30:16 -07:00
Grot (@grafanabot)
c011b15d1c Table: Reorder panel options (#49983) (#49998)
* Table: Reorder panel options

* Fix e2e selector

(cherry picked from commit f566958555)

Co-authored-by: Zoltán Bedi <zoltan.bedi@gmail.com>
2022-06-01 13:33:14 +02:00
Grot (@grafanabot)
f7e8809763 [v9.0.x] Alerting: Re-render panel's tabs on variables change (#49995)
Co-authored-by: Konrad Lalik <konrad.lalik@grafana.com>
2022-06-01 13:24:22 +02:00
Grot (@grafanabot)
d344b69fbb Plugins: Remove deprecated /api/tsdb/query metrics endpoint (#49916) (#49996)
* remove /api/tsdb/query

* revert changes to alert rules

* regenerate spec based on 9.0.x

(cherry picked from commit abfc711c53)

Co-authored-by: Will Browne <wbrowne@users.noreply.github.com>
2022-06-01 13:22:53 +02:00
Grot (@grafanabot)
e58aac1b77 Prometheus: Fix aligning of labels of exemplars after backend migration (#49924) (#49982)
* Fix normalization of labels

* Move sorting so it actually has an effect

* fix lint error

Co-authored-by: Todd Treece <todd.treece@grafana.com>
(cherry picked from commit d2fefec306)

Co-authored-by: Andrej Ocenas <mr.ocenas@gmail.com>
2022-06-01 12:48:31 +02:00
Grot (@grafanabot)
a4431a7cbf Settings: Sunset non-duration based login lifetime config (#49944) (#49990)
(cherry picked from commit 39096208ed)

Co-authored-by: Emil Tullstedt <emil.tullstedt@grafana.com>
2022-06-01 12:46:25 +02:00
Grot (@grafanabot)
4371c45dff Usage stats: Divide collection into multiple functions to isolate failures (#49928) (#49989)
(cherry picked from commit d3ffb9e245)

Co-authored-by: Emil Tullstedt <emil.tullstedt@grafana.com>
2022-06-01 12:43:02 +02:00
Will Browne
3061d57220 regenerate swagger spec (#49942) 2022-06-01 13:37:49 +03:00
Grot (@grafanabot)
f5ede594f4 Alerting: do not overwrite existing alert rule condition (#49920) (#49984)
(cherry picked from commit 82e9f4e7e7)

Co-authored-by: Gilles De Mey <gilles.de.mey@gmail.com>
2022-06-01 12:07:29 +02:00
Grot (@grafanabot)
c14d7aa4a3 UI: Remove deprecated getFormStyles function (#49945) (#49981)
(cherry picked from commit 05e501c641)

Co-authored-by: kay delaney <45561153+kaydelaney@users.noreply.github.com>
2022-06-01 11:13:12 +02:00
Grot (@grafanabot)
a51f51f7a8 grafana/ui: Move panel-container styles to component (#49566) (#49915)
* Chore: transfer styling to Explore.tsx and convert to Emotion

* feat: create a component and export it

* Chore: replace by new component

* Chore: replace by new component

* Feat: create a story

* Chore: clean up

* Chore: clean up

(cherry picked from commit 94375592c8)

Co-authored-by: Laura <48948963+L-M-K-B@users.noreply.github.com>
2022-06-01 09:29:13 +03:00
Grot (@grafanabot)
5c19011dc1 Alerting: Add GetImages to ImageStore (#49717) (#49791)
GetImages does a `TOKEN IN` query for each token in the argument.

(cherry picked from commit 47a3ddd968)

Co-authored-by: George Robinson <george.robinson@grafana.com>
2022-06-01 05:10:03 +02:00
Grot (@grafanabot)
849a0932e8 Alerting: Add templated subject config to email notifier (#49742) (#49846)
* Add subject templating to email notifier

* Fix linting

(cherry picked from commit d92625125b)

Co-authored-by: Matthew Jacobson <matthew.jacobson@grafana.com>
2022-06-01 04:14:56 +02:00
Ezequiel Victorero
cc536ea6e9 ReleaseNotes: Updated changelog and release notes for 9.0.0-beta2 (#49960) (#49963)
(cherry picked from commit 1e4ebf876b)

Co-authored-by: Grot (@grafanabot) <43478413+grafanabot@users.noreply.github.com>
2022-05-31 16:46:53 -03:00
Grot (@grafanabot)
2508cb4751 "Release: Updated versions in package to 9.0.0-beta.2" (#49959) 2022-05-31 15:49:24 -03:00
Grot (@grafanabot)
d71e30a692 [v9.0.x] Docs: integration tests for using sqllite (#49784)
* Docs: integration tests for using sqllite (#49455)

* Update developer-guide.md

* prettier formatting

(cherry picked from commit f5d25c91f6)

* Update contribute/developer-guide.md

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

* Update contribute/developer-guide.md

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

Co-authored-by: Eric Leijonmarck <eric.leijonmarck@gmail.com>
Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com>
2022-05-31 23:52:59 +07:00
Grot (@grafanabot)
8a4eed5fb6 Datasource: Remove deprecated max_idle_connections_per_host setting (#49948) (#49951)
(cherry picked from commit b03657b0e0)

Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
2022-05-31 18:38:54 +02:00
Grot (@grafanabot)
088125ae28 Plugins: Support headers field for check health (#49930) (#49949)
(cherry picked from commit a7813275a5)

Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
2022-05-31 18:22:35 +02:00
Grot (@grafanabot)
445909a759 InlineLabel: Remove deprecated props (#49929) (#49943)
(cherry picked from commit 1595cc96e6)

Co-authored-by: kay delaney <45561153+kaydelaney@users.noreply.github.com>
2022-05-31 16:48:31 +01:00
Grot (@grafanabot)
e3127d4070 Datasource: Fix allowed cookies to be forwarded as header to backend datasources (#49541) (#49935)
Co-authored-by: Will Browne <wbrowne@users.noreply.github.com>
(cherry picked from commit 1196b4a609)

Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
2022-05-31 17:17:55 +02:00
Christopher Moyer
b8ec4346aa Docs/fixes relrefs (#49754) (#49933)
* fixes http-api link

* removes old saml docs

* fixes broken links to enterprise docs landing page

(cherry picked from commit 0f40d2a79d)
2022-05-31 10:14:35 -05:00
Jack Baldry
7de6880ba4 Backport 49786 and 49207 to v9.0.x (#49932)
* Docs: Identify which Grafana editions are relevant to each Enterprise doc (#49207)

* Add section to Ent docs index re: Cloud features
* Add and update notes identifying Enterprise and Cloud features
* Address feedback

(cherry picked from commit 3ecee06630)

* Use ref links for external content (#49786)

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

Co-authored-by: Garrett Guillotte <100453168+gguillotte-grafana@users.noreply.github.com>
2022-05-31 10:02:35 -05:00
Grot (@grafanabot)
9cb10d735f ColorPicker: Remove deprecated onColorChange prop (#49923) (#49927)
(cherry picked from commit 8d59ba2be9)

Co-authored-by: kay delaney <45561153+kaydelaney@users.noreply.github.com>
2022-05-31 16:46:21 +02:00
Christopher Moyer
4b5adfb1ba Docs: combines all SAML topics into one topic (#49443) (#49755)
* Docs: combines all SAML topics into one topic (#49443)

* combines all SAML topics

* resolves merge conflicts

* makes prettier

(cherry picked from commit 8c84d62e3d)

* Fix broken relrefs

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

Co-authored-by: Jack Baldry <jack.baldry@grafana.com>
2022-05-31 09:27:07 -05:00
Grot (@grafanabot)
adac77dd1f ClipboardButton: Simplify callbacks (#49847) (#49852)
(cherry picked from commit 70980fbb44)

Co-authored-by: kay delaney <45561153+kaydelaney@users.noreply.github.com>
2022-05-31 14:43:49 +01:00
Grot (@grafanabot)
a482c055a0 Prometheus: Predefined scopes for Azure authentication (#49861) (#49881)
(cherry picked from commit 0101c19374)

Co-authored-by: Todd Treece <360020+toddtreece@users.noreply.github.com>
2022-05-31 09:16:20 -04:00
Grot (@grafanabot)
6d107a7f41 Alerting: Add Go error message to warning log for screenshots. (#49870) (#49917)
Makes debugging problems with alert screenshotting easier.

(cherry picked from commit 56f40bd413)

Co-authored-by: Joe Blubaugh <joe.blubaugh@grafana.com>
2022-05-31 15:07:57 +02:00
Grot (@grafanabot)
c73b1787ec [v9.0.x] Alerting: Add fgac support to alert list panel (#49912)
Co-authored-by: gillesdemey <gilles.de.mey@gmail.com>
Co-authored-by: Konrad Lalik <konrad.lalik@grafana.com>
2022-05-31 14:41:35 +02:00
Grot (@grafanabot)
a8dbc1eaa0 UI/Card: Remove deprecated props (#49885) (#49900)
(cherry picked from commit d590012a18)

Co-authored-by: kay delaney <45561153+kaydelaney@users.noreply.github.com>
2022-05-31 13:38:22 +01:00
Grot (@grafanabot)
a87062e4e6 AuthProxy: Remove deprecated ldap_sync_ttl setting (#49902) (#49908)
* Remove deprecated ldap_sync_ttl

(cherry picked from commit 389eec089e)

Co-authored-by: Karl Persson <kalle.persson@grafana.com>
2022-05-31 14:19:59 +02:00
Grot (@grafanabot)
199b1467aa [v9.0.x] Prometheus: Cleanup annotation editor (#49884)
* Prometheus: Cleanup annotation editor (#49615)

* Remove unused code

* Remove test

* Remove Builder mode and simplify the code

* Fix step mapping

* Fix import

* change placeholder

(cherry picked from commit 72367cf1ad)

* Change import

Co-authored-by: Andrej Ocenas <mr.ocenas@gmail.com>
2022-05-31 13:54:28 +02:00
Grot (@grafanabot)
cf7ed5ed22 add feature highlighting in the expanded menu (#49892) (#49901)
(cherry picked from commit 0089779945)

Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2022-05-31 13:23:27 +02:00
Grot (@grafanabot)
1d83694679 RBAC: drop permissions with folder:create action added by migration (#49878) (#49891)
(cherry picked from commit f4f25d911b)

Co-authored-by: Karl Persson <kalle.persson@grafana.com>
2022-05-31 12:58:06 +02:00
Grot (@grafanabot)
8c91d4e6e2 Alerting: fix layout with long words / numbers (#49882) (#49889)
(cherry picked from commit e04f84fd1b)

Co-authored-by: Gilles De Mey <gilles.de.mey@gmail.com>
2022-05-31 12:54:17 +02:00
Grot (@grafanabot)
326c48347e UI/Button: Remove deprecated "link" variant (#49843) (#49877)
(cherry picked from commit 0012d2d81f)

Co-authored-by: kay delaney <45561153+kaydelaney@users.noreply.github.com>
2022-05-31 11:44:52 +02:00
Grot (@grafanabot)
606323212e Dependencies: Update etcd module (#49873) (#49880)
* Update etcd

* Update go.sum

* Replace etcd due to broken module

(cherry picked from commit 3587a5559b)

Co-authored-by: Dimitris Sotirakis <sotirakis.dim@gmail.com>
2022-05-31 11:28:33 +02:00
Grot (@grafanabot)
f7d8974f52 Angular: Remove deprecated angular modal support and libs (#49781) (#49869)
(cherry picked from commit 8fa8c9dc8b)

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
2022-05-31 08:36:17 +02:00
Grot (@grafanabot)
50ada76a7d PanelEditor: Fixes issue with Table view and multi data frames (#49854) (#49866)
(cherry picked from commit 056a1fec3d)

Co-authored-by: Joao Silva <100691367+JoaoSilvaGrafana@users.noreply.github.com>
2022-05-31 05:47:14 +02:00
Grot (@grafanabot)
5820ac0d76 HeatmapNG: ensure non-zero y bucket size (#49454) (#49865)
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
(cherry picked from commit 143f9e2dd9)

Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
2022-05-31 05:39:47 +02:00
Grot (@grafanabot)
2a2982f9cc Alerting: Chore: Fix event name in ngalert/README.md (#49863)
Fix event name from *evalContext to *evaluation as #45144.

(cherry picked from commit 8b2a3a018d)

Co-authored-by: kyamau <kyamau.cs@gmail.com>
2022-05-31 10:59:31 +08:00
Grot (@grafanabot)
4e90a72115 [v9.0.x] SearchV2: Fix search input width on mobile (#49853)
Co-authored-by: Maria Alexandra <239999+axelavargas@users.noreply.github.com>
2022-05-30 19:00:02 +02:00
Grot (@grafanabot)
d145bf358e Dashboard: Fix panel menu styling issues (#49806) (#49849)
* Dashboard: Fix panel menu styling issues

* remove !importants I added

(cherry picked from commit e0bb01aea6)

Co-authored-by: Josh Hunt <joshhunt@users.noreply.github.com>
2022-05-30 18:34:45 +02:00
Grot (@grafanabot)
ed06e3e4f9 Alerting: Enable Unified Alerting for open source and enterprise (#49834) (#49845)
This commit enables Unified Alerting for open source and enterprise unless disabled in configuration.

(cherry picked from commit 3b7f871bf4)

Co-authored-by: George Robinson <george.robinson@grafana.com>
2022-05-30 18:13:39 +02:00
Grot (@grafanabot)
27b20676af Chore: Update theme json (#49480) (#49497)
(cherry picked from commit c043a2f83a)

Co-authored-by: Josh Hunt <joshhunt@users.noreply.github.com>
2022-05-30 17:06:16 +01:00
Grot (@grafanabot)
6949f6dddc Prometheus: Predefined scopes for Azure authentication (#49557) (#49842)
* Predefined scopes for Azure Prometheus

* Allow override of audience

(cherry picked from commit 2b83cf4618)

Co-authored-by: Sergey Kostrukov <sergey@kostrukov.com>
2022-05-30 17:56:41 +02:00
Grot (@grafanabot)
f8012e6789 Fix: Timeseries migration regex override (#49629) (#49837)
(cherry picked from commit 3d3cf74038)

Co-authored-by: Zoltán Bedi <zoltan.bedi@gmail.com>
2022-05-30 17:32:23 +02:00
Grot (@grafanabot)
c960454bd4 AzureMonitor: migrate Logs+Arg QueryEditor to @grafana/experimental (#48978) (#49833)
* AzureMonitor: use @grafana/experimental for LogsQueryEditor

ref #48711

* AzureMonitor: migrate ArgQueryEditor to @grafana/experimental.

Change CodeEditor to 100% instead of 1000px to match LogsQueryEditor.

ref #48713

(cherry picked from commit 6554bbd70f)

Co-authored-by: Adam Simpson <adam@adamsimpson.net>
2022-05-30 16:30:11 +02:00
Grot (@grafanabot)
64feb04206 Prometheus: Disable prometheusStreamingJSONParser by default (#49825) (#49832)
(cherry picked from commit b8563958bd)

Co-authored-by: Todd Treece <360020+toddtreece@users.noreply.github.com>
2022-05-30 16:24:33 +02:00
Grot (@grafanabot)
9a33b19662 RolePicker: Add extra offset for menu position (#49823) (#49831)
(cherry picked from commit a71e371877)

Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>
2022-05-30 16:21:04 +02:00
Grot (@grafanabot)
fd8c11f51d AzureMonitor: Document maximum returned records for Resource Graph (#49801) (#49828)
(cherry picked from commit aceb218157)

Co-authored-by: Andres Martinez Gotor <andres.martinez@grafana.com>
2022-05-30 16:12:42 +02:00
Isabella Siu
36ad4fa677 CloudWatch: Use scopedVars in expressions (#49178) (#49771)
* CloudWatch: Use scopedVars in expressions

* fix spec test

(cherry picked from commit b80934617b)
2022-05-30 16:12:09 +02:00
Grot (@grafanabot)
e2f34a611c cap mobile nav height (#49785) (#49804)
(cherry picked from commit 10680c1775)

Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2022-05-30 13:15:05 +02:00
Grot (@grafanabot)
f9be87ea17 add event tracking to navigation (#49800) (#49803)
(cherry picked from commit 309ad38fd6)

Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2022-05-30 13:07:57 +02:00
Vardan Torosyan
ba0beb8596 Quick Ugly Fix for Oauth not to make web_hack.go panic (#49653) (#49797) 2022-05-30 11:55:03 +02:00
Grot (@grafanabot)
c0d4512f4c Search: Fix overflow issue with folder view (#49723) (#49799)
(cherry picked from commit 17d0133008)

Co-authored-by: kay delaney <45561153+kaydelaney@users.noreply.github.com>
2022-05-30 11:43:15 +02:00
Grot (@grafanabot)
9370bad798 Chore: Remove deprecated surface prop from IconButton (#49715) (#49745)
* Chore: Remove deprecated `surface` prop from IconButton

* Update component docs

(cherry picked from commit 3d8eda0132)

Co-authored-by: kay delaney <45561153+kaydelaney@users.noreply.github.com>
2022-05-30 10:20:04 +01:00
Grot (@grafanabot)
30b77e9716 PanelChrome: Fixes issue with padding not being applied as gridUnits (#49751) (#49780)
(cherry picked from commit 7be5142164)

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
2022-05-30 07:58:02 +02:00
JitaC
0b7e5aa9cf Docs: Update create alerting rules topics (#49764) (#49770)
* Updated topic on Grafana managed rule.

* Updated loki and mimir rules and recording rules topics

* Checkin changes.

* Fixed typo
2022-05-28 18:57:55 -04:00
JitaC
5d23308a22 Docs: Refactor contact points section of alerting docs (#49758)
* Initial commit

* weight adjustments

* Checkin changes.

(cherry picked from commit f5a3ac855d)
2022-05-27 13:40:26 -04:00
Grot (@grafanabot)
e2a60b86f2 Loki: Fix unwrap parsing (#49732) (#49752)
(cherry picked from commit 745b101d41)

Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
2022-05-27 14:17:27 +02:00
Grot (@grafanabot)
6054bd0e2c Alerting: Add tests for Slack Notifier Image Upload (#49669) (#49747)
Tests that file bytes are correctly read from storage when an image is
available without a URL. Tests that not found and success cases are both
handled.

(cherry picked from commit d5a327f43d)

Co-authored-by: Joe Blubaugh <joe.blubaugh@grafana.com>
2022-05-27 10:46:15 +08:00
Grot (@grafanabot)
afa40190d4 SearchV2: improve searcher API, and include a fallback SQL based implementation (#49535) (#49746)
(cherry picked from commit a641949a05)

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2022-05-26 17:30:58 -07:00
Grot (@grafanabot)
9f3ade9472 Canvas: Fix element placement UX (#49665) (#49727) 2022-05-26 17:09:43 -07:00
Grot (@grafanabot)
7e4327d254 Alerting: Endpoints for provisioning mute timings (#49635) (#49735)
* Add validator for mute timing and make it provisionable

* Add tests to ensure prometheus validators are running and errors are propagated

* Internal API for manipulating mute timings

* Define and generate API layer

* Wire up generated code

* Implement API handlers

* Tests for golang layer

* Fix reference bug

* Fix linter and auth tests

* Resolve semantic errors and regenerate

* Remove pointless comment

* Extract out provisioning path param keys, simplify

* Expected number of paths

(cherry picked from commit 909ebcf979)

Co-authored-by: Alexander Weaver <weaver.alex.d@gmail.com>
2022-05-26 16:06:52 -05:00
Jack Baldry
ccd1270f28 Convert TOML front matter to YAML (#49729)
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
2022-05-26 13:26:26 -04:00
Grot (@grafanabot)
5fd9fee933 Search: add icon for row and singlestat panels (#49620) (#49634)
(cherry picked from commit 2fa91b75e0)

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2022-05-26 18:50:09 +02:00
JitaC
c3cc01912b Docs: Move alert rule section to alerting fundamentals section (#49657) (#49659)
* initial commit

* Added links to alert rules, and fixes one broken alerting relref.
2022-05-26 11:06:09 -04:00
Jack Westbrook
243a6cfb6c Toolkit: Bump dependencies (#47826) (#49714)
* chore(typescript): remove sanitize_url.d.ts in favour of npm package types

* chore(toolkit): bump all webpack related deps inline with grafana core

* refactor(toolkit): prefer webpack types and use from imports for bundling

* feat(toolkit): bundle plugins using webpack 5 and babel

* chore(toolkit): but all eslint deps inline with grafana core

* refactor(toolkit): rewrite linting step to use new eslint node api

* chore(toolkit): bump jest dependencies inline with grafana core

* refactor(toolkit): update jest config for jest 27

* fix(toolkit): resolve toolkit if using yarn berry

* docs(toolkit): update instructions for developing with yarn berry

* chore(toolkit): remove yarnlink code as won't work with yarn berry

* chore(toolkit): bump remaining dependencies

* chore(toolkit): remove unused core.start task

* feat(toolkit): use browserlist when building plugins

* chore(toolkit): add browserslist dependency

* refactor(toolkit): resolve style loaders, update postcss options for webpack5

* chore(toolkit): put back grafana/data and grafana/ui

* docs(toolkit): improve instructions for developing toolkit locally

* chore(toolkit): clean up webpack debug and warnings

* chore(input-datasource): remove pnpwebpack plugin and update browserslist to solve failing build

* chore(renovatebot): remove toolkit package.json from ignorePaths

* revert(renovate): put back toolkit package.json in ignorePaths

* feat(toolkit): introduce babel plugins

* refactor(toolkit): remove runtime automatic from preset-react for earlier versions of react

* refactor(toolkit): add missing fallbacks to webpack config

* fix(toolkit): remove spaces from copy webpack glob so files are copied

* refactor(toolkit): fix up babel typescript support and copy browserlist on build

* chore(yarn): refresh lock file

* revert(toolkit): remove browsers list so plugins compile to ES5

* revert(toolkit): remove copying .browserslistrc

(cherry picked from commit f4353bbbc4)
2022-05-26 16:55:05 +02:00
Grot (@grafanabot)
94274ac0ec Query History: Add feature tracking for query history (#49685) (#49711)
* Add feature tracking for query history

* Fix unit tests

* Update event names

(cherry picked from commit e0adb41e80)

Co-authored-by: Piotr Jamróz <pm.jamroz@gmail.com>
2022-05-26 16:43:52 +02:00
Grot (@grafanabot)
0b05659c69 Chore: Remove deprecated TextDisplayOptions export (#49705) (#49710)
(cherry picked from commit c6ac9410b2)

Co-authored-by: kay delaney <45561153+kaydelaney@users.noreply.github.com>
2022-05-26 15:28:55 +01:00
Grot (@grafanabot)
8656591303 Docs: Document Prometheus NaN breaking change (#49688) (#49703) 2022-05-26 15:54:12 +02:00
Grot (@grafanabot)
bdfc7f2a37 Docs: Fix duplicate text in What’s new in Grafana v9.0 (#49699) (#49702)
(cherry picked from commit 668625aaeb)

Co-authored-by: Todd Treece <360020+toddtreece@users.noreply.github.com>
2022-05-26 15:50:23 +02:00
Grot (@grafanabot)
05cd2af454 Chore: Remove usage of deprecated getColorForTheme function (#49519) (#49700)
(cherry picked from commit 308ceebdd1)

Co-authored-by: kay delaney <45561153+kaydelaney@users.noreply.github.com>
2022-05-26 14:43:55 +01:00
Joao Silva
7e99d6dc46 TimeRange: Fixes issue when zooming out on a timerange with timespan 0 (#49622) (#49695) 2022-05-26 14:31:46 +01:00
Joao Silva
9f9f8c3a23 Variables: Fixes issue with data source variables not being correctly used in panel queries (#49323) (#49697) 2022-05-26 14:31:33 +01:00
Grot (@grafanabot)
073f747679 Loki code editor: do not run query on blur in explore mode (#49241) (#49696)
* loki code editor: do not run query on blur in explore mode

* loki: code editor: better change tracking

* fixed comment

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

Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
(cherry picked from commit 386181cf45)

Co-authored-by: Gábor Farkas <gabor.farkas@gmail.com>
2022-05-26 15:21:37 +02:00
Grot (@grafanabot)
1c67b35d6b Preferences: Fix updating of preferences for Navbar and Query History (#49677) (#49694)
* Preferences: Fix PUT for Navbar and Query History

* Update linting

* Fix linting

* Use models defined in preference package in preferences

* Remove white space

* Revert "Use models defined in preference package in preferences"

This reverts commit 6f7aa9f8d3.

(cherry picked from commit e25a49ff49)

Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
2022-05-26 14:57:55 +02:00
Grot (@grafanabot)
a4948e1018 fix: only "swallow" the json() parsing error if the response is empty (#47493) (#49692)
(cherry picked from commit 84b7efb393)

Co-authored-by: Levente Balogh <balogh.levente.hu@gmail.com>
2022-05-26 14:52:51 +02:00
Grot (@grafanabot)
db1c49a95b Build: Enable long term caching for frontend assets (#47625) (#49691)
* build(webpack): move CopyUniconsPlugin into own file

* chore(webpack): delete unused blobUrl and compile loaders

* build(webpack): prefer contenthash over fullhash for longer caching

* build(webpack): set optimization.moduleIds named only in dev

* build(webpack): introduce HTMLWebpackCSSChunks so templates can access theme css by name

* feat: inject css files with contenthash in html templates

* revert(error-template): remove ContentDeliveryURL from CSS href

* refactor(index-template): update grafanaBootData.themePaths

* chore(webpack): add typescript annotations for CopyUniconsPlugin

(cherry picked from commit 78bef7a26a)

Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com>
2022-05-26 14:43:41 +02:00
Grot (@grafanabot)
83b73db401 Alerting: Fix swagger specification (#49273) (#49687)
* Alerting: fix specification

* Update merged swagger specification

(cherry picked from commit 7cf321d7bd)

Co-authored-by: Sofia Papagiannaki <1632407+papagian@users.noreply.github.com>
2022-05-26 13:56:23 +02:00
Grot (@grafanabot)
e3a35bd2ff Remove migrations from behind configs (#49415) (#49684) 2022-05-26 13:41:03 +02:00
Grot (@grafanabot)
80bf4e2dba ValueMapping: Add support for regex replacement over multiple lines (#49607) (#49683)
(cherry picked from commit e402b3617b)

Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2022-05-26 13:34:39 +02:00
Grot (@grafanabot)
3fac10229b Notification history: Enable by default (#49502) (#49681)
* remove persistNotifications feature flag

* remove unused imports

(cherry picked from commit 8b509eb6dd)

Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2022-05-26 13:19:18 +02:00
Grot (@grafanabot)
4e35edcf07 Fix wrap_handler() panic during OAuth login (#49671) (#49678) 2022-05-26 12:44:13 +02:00
Grot (@grafanabot)
60ddede835 Narrow the alert condition picker (#49570) (#49675)
(cherry picked from commit 20a83ba14f)

Co-authored-by: Konrad Lalik <konrad.lalik@grafana.com>
2022-05-26 12:39:49 +02:00
Grot (@grafanabot)
2630dcaea5 Chore: Re-enable skipped test (#49484) (#49676)
* Re-enable skipped test

(cherry picked from commit a008a01315)

Co-authored-by: Piotr Jamróz <pm.jamroz@gmail.com>
2022-05-26 12:25:18 +02:00
Grot (@grafanabot)
4c6cfdcb7d loki: better unpack handling (#49074) (#49674)
(cherry picked from commit b54817033a)

Co-authored-by: Gábor Farkas <gabor.farkas@gmail.com>
2022-05-26 11:43:07 +02:00
Grot (@grafanabot)
d3433be585 loki: added two new functions (#49617) (#49666)
(cherry picked from commit 514d1bbbdd)

Co-authored-by: Gábor Farkas <gabor.farkas@gmail.com>
2022-05-26 10:38:22 +02:00
Grot (@grafanabot)
236dabfc1d refactoring: saml (#48114) (#49667)
Co-authored-by: Vardan Torosyan <vardants@gmail.com>
(cherry picked from commit d8d7b3ec9d)

Co-authored-by: Eric Leijonmarck <eric.leijonmarck@gmail.com>
2022-05-26 10:34:50 +02:00
Grot (@grafanabot)
dd1d1dae04 Alerting: Add stored screenshot utilities to the channels package. (#49470) (#49664)
Adds three functions:
`withStoredImages` iterates over a list of models.Alerts, extracting a stored image's data from storage, if available, and executing a user-provided function.
`withStoredImage` does this for an image attached to a specific alert.
`openImage` finds and opens an image file on disk.

Moves `store.Image` to `models.Image`
Simplifies `channels.ImageStore` interface and updates notifiers that use it to use the simpler methods.
Updates all pkg/alert/notifier/channels to use withStoredImage routines.

(cherry picked from commit 9e8efaa459)

Co-authored-by: Joe Blubaugh <joe.blubaugh@grafana.com>
2022-05-26 16:12:10 +08:00
Grot (@grafanabot)
0a07d97dd1 Old Graph migration: Preserve null values settings (#49493) (#49579)
* Graph migration: Preserve null values settings

* Review

(cherry picked from commit 30880e6e18)

Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
2022-05-26 00:47:30 -07:00
Grot (@grafanabot)
324dcae868 Prometheus: Fix sort issue in wide frames (#49660) (#49662) 2022-05-26 05:50:53 +02:00
JitaC
09a93b17d9 Docs: Move alert rule section to alerting fundamentals section (#49657)
* initial commit

* Added links to alert rules, and fixes one broken alerting relref.

(cherry picked from commit a968a43e0c)
2022-05-25 19:37:18 -04:00
JitaC
e5248a2aa7 Docs: Created separate section for migration under alerting (#49616) (#49658)
* Lots of changes, including new topic, also fixed all alerting relrefs

* Push stashed change.

* Updated content to reflect that Grafana alerting is enabled during upgrade.

* Fix typo

* Update docs/sources/alerting/migrating-alerts/_index.md

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

* Checkin changes.

* Updates from Chris's review.

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
(cherry picked from commit b5d48d217a)
2022-05-25 19:32:55 -04:00
Grot (@grafanabot)
7ac8527dac Timeseries: fix outside range stale state (#49633) (#49656)
Co-authored-by: Todd Treece <todd.treece@grafana.com>
(cherry picked from commit df90393057)

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2022-05-25 16:32:33 -07:00
JitaC
7db4119b48 Check in changes. 2022-05-25 19:12:46 -04:00
Grot (@grafanabot)
0726a56956 Util: Improve performance of strings.SplitString (#49115) (#49654)
Replaces the regexp with calls to strings.ReplaceAll and strings.Fields
for simplicity and improved performance.

Signed-off-by: Dave Henderson <dave.henderson@grafana.com>
(cherry picked from commit 1f85101787)

Co-authored-by: Dave Henderson <dave.henderson@grafana.com>
2022-05-25 23:22:50 +02:00
Grot (@grafanabot)
1a69cc5b21 Canvas: Improve changing element options UX (#49555) (#49639)
(cherry picked from commit 2449f62dbe)

Co-authored-by: Nathan Marrs <nathanielmarrs@gmail.com>
2022-05-25 13:09:28 -07:00
Grot (@grafanabot)
81bf734191 Updated document with Michelle Tan's comments (#49648) (#49651)
(cherry picked from commit 1d7d8bbf96)

Co-authored-by: JitaC <70489351+achatterjee-grafana@users.noreply.github.com>
2022-05-25 15:25:09 -04:00
Grot (@grafanabot)
4a6b94ae8e [v9.0.x] SearchV2 - Fix starred dashboards for new organizations error (#49649)
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
Co-authored-by: Maria Alexandra <239999+axelavargas@users.noreply.github.com>
2022-05-25 21:10:21 +02:00
Grot (@grafanabot)
4bd6f62dfd AccessControl: Replace IsEnterprise checks with license checks (#49572) (#49646)
(cherry picked from commit 5caf97be40)

Co-authored-by: Karl Persson <kalle.persson@grafana.com>
2022-05-25 20:59:47 +02:00
Grot (@grafanabot)
1d4e2d12da Prometheus: Enable prometheusStreamingJSONParser by default (#49475) (#49636)
(cherry picked from commit 70b3a0a500)

Co-authored-by: Todd Treece <360020+toddtreece@users.noreply.github.com>
2022-05-25 19:12:24 +02:00
Grot (@grafanabot)
8f8be23032 Canvas: Fix resize breaking certain constraints (#49551) (#49553)
Co-authored-by: Nathan Marrs <nathanielmarrs@gmail.com>
2022-05-25 09:43:43 -07:00
Grot (@grafanabot)
0cc75cc593 show notification tab only to editor (#49624) (#49632)
(cherry picked from commit 307c207a24)

Co-authored-by: Yuriy Tseretyan <yuriy.tseretyan@grafana.com>
2022-05-25 18:36:21 +02:00
JitaC
9e622ec87c Docs: What's new 9.0 (#49453) (#49628)
* initial commit

* Add to index list

* Improvements to intro section

* missing plural

* Minor fixes

* Some more changes.

* Updated image links

* Hide section "InfluxDB: Support for browser access mode removed

* Checkin more changes

* More changes.

* Fixed more image links

* Last batch of changes

* Fixed a few typos and ran prettier.

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

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
2022-05-25 12:27:19 -04:00
Grot (@grafanabot)
f966aa3474 Apply .page-toolbar class correctly (#49603) (#49627)
(cherry picked from commit a0b707ebe0)

Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2022-05-25 17:56:52 +02:00
Grot (@grafanabot)
961a8c23de fix broken alias due to #48635 (#49623) (#49626)
(cherry picked from commit f40248a06d)

Co-authored-by: Dan Cech <dcech@grafana.com>
2022-05-25 11:54:38 -04:00
Grot (@grafanabot)
823a3bfbf9 Prometheus: Migrate annotation editor to react (#48814) (#49518)
* Modify the annotation support api

* Migrate annotation editor component

* Update public/app/features/annotations/standardAnnotationSupport.ts

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

* Move the escape hatches out of the public API

* Fix props transforms

* Break import cycle

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

Co-authored-by: Andrej Ocenas <mr.ocenas@gmail.com>
2022-05-25 14:57:20 +02:00
Grot (@grafanabot)
c0286409c6 Query History: Track query history migration failures (#49560) (#49577)
(cherry picked from commit a67add5239)

Co-authored-by: Piotr Jamróz <pm.jamroz@gmail.com>
2022-05-25 14:22:24 +02:00
Grot (@grafanabot)
7106106e3b Chore: Convert a test from enzyme to testing library (#49492) (#49576)
(cherry picked from commit f93ad85b08)

Co-authored-by: Piotr Jamróz <pm.jamroz@gmail.com>
2022-05-25 14:21:18 +02:00
Grot (@grafanabot)
a2f5457463 AccessControl: Grant data source reader to all users when running oss (#49514) (#49604)
* grant data source reader to all users when running oss or enterprise
without license

* fix asserts in alerting tests

* add oss licensing service for test setup

* fix tests to pass in enterprise

* lint

* fix tests

* set setting.IsEnterprise flag for tests

Co-authored-by: Yuriy Tseretyan <yuriy.tseretyan@grafana.com>
(cherry picked from commit 1796a1d277)

Co-authored-by: Karl Persson <kalle.persson@grafana.com>
2022-05-25 14:17:14 +02:00
Grot (@grafanabot)
ef458b79d0 AccessControl: Pass current org id to UsersTable (#49584) (#49606)
* Pass current org id to UsersTable

* Mock contextSrv and update snapshot

(cherry picked from commit ef6b53ed23)

Co-authored-by: Karl Persson <kalle.persson@grafana.com>
2022-05-25 14:16:14 +02:00
Grot (@grafanabot)
fc79360e15 Access control: fix a typo for folder actions (#49582) (#49601)
* fix a typo for folder actions

* update dashboard action too

(cherry picked from commit 8d313f54e2)

Co-authored-by: Ieva <ieva.vasiljeva@grafana.com>
2022-05-25 13:28:34 +02:00
Grot (@grafanabot)
8d6b47f11d don't close drawer when clicking a select within it (#49583) (#49600)
(cherry picked from commit 5455174de5)

Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2022-05-25 11:19:17 +00:00
Grot (@grafanabot)
6ab3724a12 AngularSupport: Update description for angular_support_enabled config option (#49569) (#49574)
* AngularSupport: Update description for angular_support_enabled config option

* Update angular deprecration plan doc

* Update

* Update article

* Updated

(cherry picked from commit e1909fe74b)

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
2022-05-25 12:07:59 +02:00
Grot (@grafanabot)
312b57aa76 Login: Fix AuthInfo update process (#49556) (#49565)
* Login: Fix AuthInfo update process

* Fix GoDoc

* Add regression test for oauth info overwrite

Co-authored-by: jguer <joao.guerreiro@grafana.com>
(cherry picked from commit 73a729bbe8)

Co-authored-by: Joan López de la Franca Beltran <5459617+joanlopez@users.noreply.github.com>
2022-05-25 10:17:56 +02:00
Grot (@grafanabot)
49e653dbaf Prevent exception when panel has multiple queries (#49368) (#49562)
This fixes the issues that when a panel has multiple queries this throws an exception if source is not part of the current frame

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

Co-authored-by: Ward Bekker <ward@wardbekker.com>
2022-05-25 10:05:02 +02:00
Grot (@grafanabot)
b5da0dcf39 Search: Add primary background for global search container (#49473) (#49499)
* Search: Add primarhy background for global search container

* Fix spacing for ActionRow

* Fixing ts issue

(cherry picked from commit 20f8b8625a)

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
2022-05-25 08:45:19 +02:00
Grot (@grafanabot)
9854234c66 DatePicker: able to set minimum date that can be selected (#49503) (#49505)
(cherry picked from commit d373beeb73)

Co-authored-by: Alexander Zobnin <alexanderzobnin@gmail.com>
2022-05-25 06:33:45 +00:00
JitaC
0769151da2 Docs: Fixed typo in what's new in grafana 9 (#49549)
* Fixed typo

* Updated metadata

(cherry picked from commit 3a541ea127)
2022-05-24 22:13:00 -04:00
Grot (@grafanabot)
1e2708cbcf Prometheus: Streaming JSON parser performance improvements (#48792) (#49542)
(cherry picked from commit 94b9c524a8)

Co-authored-by: Todd Treece <360020+toddtreece@users.noreply.github.com>
2022-05-24 22:35:19 +02:00
Grot (@grafanabot)
d77a09e2d8 upgrade grabpl (#49534) (#49536)
(cherry picked from commit 61101056b6)

Co-authored-by: Kevin Minehart <kmineh0151@gmail.com>
2022-05-24 20:36:10 +02:00
Grot (@grafanabot)
0704838c95 InfluxDB: Removing influxDB backend migration feature flag (#49531) (#49532)
Removing the `influxdbBackendMigration` feature toggle default value.

(cherry picked from commit 27c26c30d1)

Co-authored-by: Sriram <yesoreyeram@gmail.com>
2022-05-24 18:44:11 +01:00
Grot (@grafanabot)
b8544741aa AzureAD: Fallback to no groups if user does not have permission to query groups from azure (#49506) (#49522)
* If GroupMemver.Read.All permissions is not configured return no groups

* fix log

(cherry picked from commit 624f8ef40d)

Co-authored-by: Karl Persson <kalle.persson@grafana.com>
2022-05-24 18:16:55 +02:00
Grot (@grafanabot)
4dd08e7da6 Alerting: Validate alert notification UID length (#45546) (#49513)
* validate alert notification UID length

* simplify-ish

* remove unused field

* whoopsie

* delete newline

* remove check

* apply feedback

(cherry picked from commit 635fa4ab0f)

Co-authored-by: Will Browne <wbrowne@users.noreply.github.com>
2022-05-24 17:21:27 +02:00
Grot (@grafanabot)
ba4c292f67 Fix escape in Modal/DashboardSettings + add some unit tests (#49500) (#49504)
(cherry picked from commit 8166d7dc4d)

Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2022-05-24 16:47:57 +02:00
Grot (@grafanabot)
992d6aeed4 "Release: Updated versions in package to 9.0.0-beta.1" (#49488) 2022-05-24 16:06:14 +02:00
Gilles De Mey
d1b8e51871 Alerting: Make alertmanager datasource stable (#49485) (#49491)
(cherry picked from commit 86871807d2)
2022-05-24 15:45:10 +02:00
Andres Martinez Gotor
b0300d56ac AzureMonitor: Do not quote variables when a custom All variable option is used (#49428) 2022-05-24 11:29:24 +02:00
Joao Silva
71ffa5e5db Chore: Converts SaveDashboardAsForm tests to RTL (#49436) 2022-05-24 10:17:40 +01:00
Kat Yang
50c2b4682a Chore: Rename integration tests (#49438)
* Chore: Rename integration tests

* Remove one Integration

Co-authored-by: Ida Furjesova <ida.furjesova@grafana.com>
2022-05-24 11:04:03 +02:00
Peter Holmberg
7bcc151ae6 Alerting: Add notification policy flow chart (#49405)
* setup component add images

* add name to theme

* add root route info box

* remove unsused

* styling
2022-05-24 10:57:26 +02:00
Konrad Lalik
3ad1263097 Alerting: Use RadioButtonList component to select alert condition (#49422) 2022-05-24 10:51:43 +02:00
Joe Blubaugh
a0193c248f Alerting: Add entries to ngAlert changelog for screenshots. (#49457)
Notes the PRs that added the feature.
2022-05-24 16:50:07 +08:00
Alex Khomenko
8ad91e3f9e SaveDashboardForm: Ensure saveVariables is boolean (#49466) 2022-05-24 10:44:20 +02:00
Joan López de la Franca Beltran
3e4b4dba46 Encryption: Enable envelope encryption by default (#49301)
* Encryption: Enable envelope encryption by default

* Stop relying on feature toggles from settings (deprecated)

* Database encryption docs (envelope encryption)

* Remove deprecated (and no longer used) FT

* Apply suggestions from code review

Co-authored-by: Tania <yalyna.ts@gmail.com>
2022-05-24 10:34:47 +02:00
Ryan McKinley
521b0202e2 Search: remove special playground page and replace the standard results (#49442) 2022-05-24 10:04:21 +02:00
kay delaney
7096bc65b1 VersionHistoryTable: Disable other checkboxes when two are selected (#49098) 2022-05-24 10:51:37 +03:00
kay delaney
a1b709626f DashList: Handle long dashboard titles more gracefully (#49460) 2022-05-24 09:29:36 +02:00
Alex Khomenko
8fecf25d54 RolePicker: UI improvements (#49397)
* RolePicker: Adjust input and display widths

* RolePicker: Use forwardRef

* RolePicker: Apply input styles to roles display
2022-05-24 10:21:31 +03:00
Eric Leijonmarck
cbf71fbd7f Serviceaccounts: Do not display service accounts assigned to team (#48995)
* Add IsServiceAccount to query

* test for excluding service accounts in query

* align test

* test update

* added logging

* should fix tests

* moved test to bottom

* add back setup function

* Remove IsServiceAccount from query

Instead use false for is_service_account
and when the time comes to implement service accounts
for team. we deal with it

* missed teamtest

* formatting
2022-05-24 16:52:39 +10:00
Vardan Torosyan
69e2ab3d0f Codeowners update: Map auth services to the Grafana AuthNZ team (#49421) 2022-05-24 08:44:16 +02:00
Alexander Emelin
1e7e149ed6 search: close unused reader and writer on re-indexing (#49458) 2022-05-24 09:42:21 +03:00
Nathan Marrs
5eb20739c2 Canvas: Fix inconsistent element resizing UX (#49450) 2022-05-23 20:13:58 -07:00
Alexander Weaver
a92f85a87b Alerting: Factor out shared code for working with configs in provisioning package (#49419)
* Factor out shared code for working with configs

* Refactor in notification policies and contact points

* Better file ordering

* Address feedback
2022-05-23 18:16:03 -05:00
Alexander Weaver
2ba4f7ed7d Alerting: Attach image URLs to Google Chat notifications. (#49445)
* Add a test card to see what styles look like

* Add text and image cards

* Address feedback
2022-05-23 18:15:44 -05:00
Adela Almasan
b1ba0bc7b0 Canvas: Quick positioning (#48992)
Co-authored-by: nmarrs <nathanielmarrs@gmail.com>
2022-05-23 15:31:39 -07:00
Alexander Weaver
d7c65d3323 Alerting: Attach image URLs or upload files to Discord notifications. (#49439)
* Images in discord

* Drop duplicated field initialization

* Fix tests

* Use the proper context
2022-05-23 17:28:16 -05:00
Ryan McKinley
33b2897552 Search: scroll to the top after a query changes (#49447) 2022-05-23 14:36:32 -07:00
Alexander Emelin
7411c81e7f Search: use prefix search for queries exceeding ngram filter max length (#49409) 2022-05-23 14:33:56 -07:00
Christopher Moyer
7d0986fda5 updated alerts to alerting (#49446) 2022-05-23 16:05:40 -05:00
Yuriy Tseretyan
279f068cd5 use forward slashes in cue ctx (#49440)
because fstest.MapFS only recognizes forward slashes
2022-05-23 22:00:30 +02:00
Joey Tawadrous
d463c3157c Tempo: NativeSearch code simplification and cleanup (#49365)
* Cleanup and show loading for service/span name

* Method rename

* Simplify logic for getting options

* Simplify logic for setting/getting value

* Move getTags to own async

* Update tests

* Promise all

* Update const name
2022-05-23 20:32:40 +01:00
Alexander Weaver
ac8951f689 Alerting: Add support for documenting which alerting APIs are stable (#49018)
* Support for documenting stable vs unstable alerting routes

* empty commit, restart drone

* Touch-up references in root makefile and drop trailing escape newline

* Rebase and regenerate

* Extend README with docs for this change
2022-05-23 14:08:27 -05:00
Andrej Ocenas
7cd034f33a Loki: Cleanup some code for default editorMode (#49431) 2022-05-23 19:21:00 +02:00
Ezequiel Victorero
dfab100dc7 Chore: sanitize values before being logged from request headers (#49245)
* Chore: sanitize values being logged directly from request headers
2022-05-23 14:18:33 -03:00
Joao Silva
51bc1bad1b Chore: Converts SaveDashboardForm tests to RTL (#49434) 2022-05-23 18:17:25 +01:00
Ryan McKinley
8af587e7ba Search: support alpha + and enterprise sorting values (#49362) 2022-05-23 10:05:15 -07:00
Ryan McKinley
653c82cec4 Search: implement clear-selection and select all buttons (#49363) 2022-05-23 10:01:18 -07:00
Sriram
f9d1d8370f Plugins: Fix Azure Devops plugin link and plugins list order (#49394)
* Plugins: Fix Azure Devops plugin link and plugins list order

* tests added for plugins sorting
2022-05-23 17:37:19 +01:00
Ryan McKinley
9a59ccd644 Search: remove internal ID from bluge index (#49205)
Co-authored-by: Alexander Emelin <frvzmb@gmail.com>
2022-05-23 09:22:35 -07:00
Ashley Harrison
fe16680c6d Notification history: Use Card instead of reusing alert (#49418)
* Use Card instead of reusing alert

* only need clearSelectedNotifications now
2022-05-23 16:48:17 +01:00
Ashley Harrison
ce86b4ebe7 Navigation: Show starred items in the NavBar (#49219)
* switch saved items to starred items

* hook up redux properly

* Better query + hook up DashList

* update initial state so it's never undefined

* update GetDashboard call

* use new star service

* add scroll + maxwidth to navbar hover menu, sort starred items alphabetically

* increase height, revert changes to CustomScrollbar

* ellipsis!

* update starred dashboard name in navtree

* sort after renaming

* limit to first 50 starred dashboards found
2022-05-23 16:45:46 +01:00
Kristin Laemmert
8c753999df chore: replace artisanal FakeDashboardService with generated mock (#49276)
* chore: replace handmade FakeDashboardService with generated mock

Maintaining a handcrafted FakeDashboardService is not sustainable now that we are in the process of moving the dashboard-related functions out of sqlstore.

* remove dialect global variable
2022-05-23 11:14:27 -04:00
Joe Blubaugh
ccd160a75e Alerting: Add image url or file attachment to email notifications. (#49381)
If an image token is present in an alert instance, the email notifier will attempt to find a public URL for the image token. If found, it will add that to the email as the `ImageLink` field. If only local file data is available, the notifier will attach the file to the outgoing email using the `EmbeddedImage` field.
2022-05-23 23:08:28 +08:00
Piotr Jamróz
5a3cd45f79 Query History: Enable new query history by default (#49407)
* Enable new Query History

* Update docs and sample.ini
2022-05-23 16:53:36 +02:00
Jguer
3250bf6b2b AccessControl: Add migration for seeding managed inherited permissions (#49337)
* AccessControl: Add migration for seeding managed inherited permissions

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

* AccessControl: move to single file

* AccessControl: Add tests for managed permission migration

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

* AccessControl: Ensure no duplicate insertion

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

* Remove commented code

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

* Add code migration constant

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

* Ensure DB is clean between tests

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

* Update pkg/services/sqlstore/migrations/accesscontrol/managed_permission_migrator.go

Co-authored-by: Karl Persson <kalle.persson@grafana.com>
Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com>
2022-05-23 16:50:10 +02:00
Alex Khomenko
18727f0bf5 TeamGroupSync: Refactor tests to use RTL (#49417) 2022-05-23 16:45:36 +02:00
Joe Blubaugh
307e33614e Alerting: Add image_urls to OpsGenie notification details. (#49379)
Adds an array of image_urls to the OpsGenie details field in a message, if image urls are available.

```json
{
  "message": "Alert with Images!",
  "details": {
    "image_urls": ["http://www.example.com"]
  }
}
```
2022-05-23 22:41:29 +08:00
Brian Gann
5fc5899462 Access Control: Add rolepicker when Fine Grained Access Control is enabled (#48347) 2022-05-23 16:13:55 +02:00
Sofia Papagiannaki
060af782df Docs: Add deprecation notices for datasource endpoints (#49411)
* Update markdown

* Update swagger
2022-05-23 16:11:47 +02:00
Kyle Brandt
01ef899753 SSE/Alerting: Support prom instant vector responses (#44865)
* SSE/Alerting: (Draft) Support prom instant vector responses
fixes #35663
* reduce\classic expressions to handle mathexp.Number
* use Notice for warning

Co-authored-by: Yuriy Tseretyan <yuriy.tseretyan@grafana.com>
2022-05-23 10:08:14 -04:00
Konrad Lalik
0215195e6d Radio: New Radio Button List component (#49052)
* Add RadioButtonDot component

* Add basic RadioGroupList component

* Add RadioButtonList component, improve disabled styles

* Refactor storybook

* Add docs, export to @grafana/ui

* Improve docs, add option descriptions

* Double spacing between elements

* Improve storybook
2022-05-23 15:59:33 +02:00
Yuriy Tseretyan
3dfafbadef Alerting: Fix access to alerts for viewer with editor permissions when RBAC is disabled (#49270)
* Add folder edit permission for users with Viewer role
* relax permissions required to create an alert when RBAC is disabled
2022-05-23 09:58:20 -04:00
Torkel Ödegaard
c29e6fcb3a Prometheus/Loki: Improve metric search highlight contrast (#49384)
* Prometheus/Loki: Improve metric search highlight contrast

* Update other places, and add reusable variables
2022-05-23 15:53:45 +02:00
Joe Blubaugh
4ea0b39db1 Alerting: Add Image URLs to Microsoft Teams notifier. (#49385)
If there are screenshot images with URLs, they will be attached to the
Microsoft teams notification in the first sections, as a slice of image
objects.
2022-05-23 21:53:36 +08:00
Zoltán Bedi
762a84153d Table: Fix don't reset filter on resize (#48421) 2022-05-23 15:26:29 +02:00
Kristina
a9cc3225ba Explore: Remove support for legacy, compact format URLs (#49350)
* Remove function, start changing tests

* Fix tests

* Remove deprecated parameter from function
2022-05-23 15:18:49 +02:00
Sofia Papagiannaki
be0d043673 API: Add endpoint for updating a data source by its UID (#49396)
* API: Add endpoint for updating a data source by UID

* Update docs markdown

* Update swagger

* Apply suggestions from code review

Co-authored-by: Selene <selenepinillos@gmail.com>
2022-05-23 15:13:13 +02:00
Piotr Jamróz
8f4c3e94b0 Query History: Implement star, comment and delete methods (#49330)
* Implement star, comment and delete methods

* Remove redundant await
2022-05-23 15:07:37 +02:00
Jimmie Han
0a509b97ef Prometheus: Fix inconsistent labels in exemplars resulting in marshal json error. (#46135)
like "frame has different field lengths, field 0 is len 5 but field 14 is len 2"

Signed-off-by: Jimmie Han <hanjinming@outlook.com>
2022-05-23 15:05:57 +02:00
Maria Alexandra
84a8a1aaa6 Search: Add ManageDashboardNew to integrate new search (#49266)
* Search: created ManageDashboardNew to integrate new search

* hide pseudo folders in ManageDashboardNew

* ManageDashboardNew - Fix overflow table

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2022-05-23 15:03:05 +02:00
Piotr Jamróz
9e5292d32d CloudWatch: Remove duplicated metrics (#49400) 2022-05-23 14:52:12 +02:00
Piotr Jamróz
060f0e5633 Query History: Results pagination (#49217)
* Load Rich History when the container is opened

* Store rich history for each pane separately

* Do not update currently opened query history when an item is added

It's impossible to figure out if the item should be added or not, because filters are applied in the backend. We don't want to replicate that filtering logic in frontend. One way to make it work could be by refreshing both panes.

* Test starring and deleting query history items when both panes are open

* Remove e2e dependency on ExploreId

* Fix unit test

* Assert exact queries

* Simplify test

* Fix e2e tests

* Fix toolbar a11y

* Reload the history after an item is added

* Fix unit test

* Remove references to Explore from generic PageToolbar component

* Update test name

* Fix test assertion

* Add issue item to TODO

* Improve test assertion

* Simplify test setup

* Move query history settings to persistence layer

* Fix test import

* Fix unit test

* Fix unit test

* Test local storage settings API

* Code formatting

* Fix linting errors

* Add an integration test

* Add missing aria role

* Fix a11y issues

* Fix a11y issues

* Use divs instead of ul/li

Otherwis,e pa11y-ci reports the error below claiming there are no children with role=tab:

Certain ARIA roles must contain particular children
   (https://dequeuniversity.com/rules/axe/4.3/aria-required-children?application=axeAPI)

   (#reactRoot > div > main > div:nth-child(3) > div > div:nth-child(1) > div >
   div:nth-child(1) > div > div > nav > div:nth-child(2) > ul)

   <ul class="css-af3vye" role="tablist"><li class="css-1ciwanz"><a href...</ul>

* Clean up settings tab

* Remove redundant aria label

* Remove redundant container

* Clean up test assertions

* Move filtering to persistence layer

* Move filtering to persistence layer

* Simplify applying filters

* Split applying filters and reloading the history

* Debounce updating filters

* Update tests

* Fix waiting for debounced results

* Clear results when switching tabs

* Improve test coverage

* Update docs

* Revert extra handling for uid (will be added when we introduce remote storage)

* Create basic plan

* Rename query history toggle

* Add list of supported features and add ds name to RichHistoryQuery object

* Clean up

Removed planned items will be addressed in upcoming prs (filtering and pagination)

* Handle data source filters

* Simplify DTO conversion

* Clean up

* Fix betterer conflicts

* Fix imports

* Fix imports

* Post-merge fixes

* Use config instead of a feature flag

* Use config instead of a feature flag

* Update converter tests

* Add tests for RichHistoryRemoteStorage

* Simplify test setup

* Simplify assertion

* Add e2e test for query history

* Remove duplicated entry

* Fix unit tests

* Improve readability

* Remove unnecessary casting

* Mock backend in integration tests

* Remove unnecessary casting

* Fix integration test

* Update betterer results

* Fix unit tests

* Simplify testing with DataSourceSrv

* Fix sorting and add to/from filtering

* Basic pagination

* Show load more only if there are items to load

* Post-merge fixes

* Change initial page limit to 100

* Fix unit tests

* Fix linting errors

* Test pagination

* Fix query migration

* Fix unit tests

* Fix prettier

* Remove full stop

* Do not show number of queries with partial results to avoid confusion

* Show number of displayed results when partial results are shown
2022-05-23 14:43:38 +02:00
Ashley Harrison
349d9973de Notification history: Add checkboxes for multiple selection (#49392)
* Add checkboxes for selection

* className is optional...

* review comments
2022-05-23 12:50:26 +01:00
Sriram
755ec3b469 InfluxDB: Use backend for influxDB by default via feature toggle (#48453) 2022-05-23 12:43:50 +01:00
Piotr Jamróz
16a948fc88 Query History: Implement RemoteStorage methods: settings (#49320)
* Implement methods to get an update user preferences

* Update integration test

* Update label

* Remove unused type

* Simplify async code
2022-05-23 13:42:12 +02:00
k-yone
34d77fd584 CloudWatch: Add missing metrics for AWS App Runner (#49048) 2022-05-23 13:38:52 +02:00
Josh Hunt
5b8bc3e44c Limit persisted notifications to 25 (#49393) 2022-05-23 12:32:31 +01:00
Jguer
6891bbf03c ServiceAccounts: Add identifiable token prefix to service account tokens (#49011)
* Add prefixed API key gen.

* Retrieve API Key by hash

* Handle prefixed API keys for login

* Add placeholder key generator

* fix spelling

* add get by hash sqlstore test

* reformat query

* quote usage of reserved keyword key

* use constant

* improve error handling and pre-select key type

Co-authored-by: Victor Cinaglia <victor@grafana.com>

* nits

Co-authored-by: Victor Cinaglia <victor@grafana.com>
2022-05-23 13:14:38 +02:00
Aton-Kish
2ba1a75d50 CloudWatch: Added missing AWS/AppRunner metrics (#49174) 2022-05-23 13:14:16 +02:00
Joan López de la Franca Beltran
e43879e55d Encryption: Add support for multiple data keys per day (#47765)
* Add database migrations

* Use short uids as data key ids

* Add support for manual data key rotation

* Fix duplicated mutex unlocks

* Fix migration

* Manage current data keys per name

* Adjust key re-encryption and test

* Modify rename column migration for MySQL compatibility

* Refactor secrets manager and data keys cache

* Multiple o11y adjustments

* Fix stats query

* Apply suggestions from code review

Co-authored-by: Tania <yalyna.ts@gmail.com>

* Fix linter

* Docs: Rotate data encryption keys API endpoint

Co-authored-by: Tania <yalyna.ts@gmail.com>
2022-05-23 13:13:55 +02:00
Ashley Harrison
ae8c11bfa4 Tweak name + add description (#49387) 2022-05-23 10:52:52 +01:00
Peter Holmberg
1402c85ce1 Alerting: change from cta to secondary (#49321) 2022-05-23 11:15:46 +02:00
Laura
ebc6d3a63c Laura/chore/refactor styling of explore container (#49324)
* Chore: convert styling from sass to emotion

* Chore: delete sass styling
2022-05-23 10:55:04 +02:00
Joe Blubaugh
1cc034d960 Alerting: Add a "Reason" to Alert Instances to show underlying cause of state. (#49259)
This change adds a field to state.State and models.AlertInstance
that indicate the "Reason" that an instance has its current state. This
helps us account for cases where the state is "Normal" but the
underlying evaluation returned "NoData" or "Error", for example.

Fixes #42606

Signed-off-by: Joe Blubaugh <joe.blubaugh@grafana.com>
2022-05-23 16:49:49 +08:00
Joe Blubaugh
26a206cce2 Alerting: Attach image URL to alerts in Webhook notifier format. (#49378)
Attaches an imageURL field to any alert messages that have a screenshot
token whose URL we can successfully read from disk.
2022-05-23 16:44:19 +08:00
Joe Blubaugh
11a908cc91 Alerting: Add Screenshot URLs to Pagerduty Notifier (#49377)
PagerDuty takes an "images" array of link objects in it's request body.
2022-05-23 16:40:58 +08:00
idafurjes
cc0448927a Add TraceID to data proxy logs (#49302) 2022-05-23 10:38:05 +02:00
Erik Sundell
4fc1bf4bfb enable feature toggle by default (#49173) 2022-05-23 10:07:21 +02:00
Piotr Jamróz
c78b1fb304 Skip Angular error handling when Angular support is disabled (#49311) 2022-05-23 08:33:05 +02:00
Piotr Jamróz
2d48e75e88 Chore: Remove deprecated DataSourceAPI methods (#49313)
* Remove deprecated metods

* Update docs
2022-05-23 08:26:33 +02:00
Joe Blubaugh
12c25759da Alerting: Attach screenshot data to Slack notifications. (#49374)
This change extracts screenshot data from alert messages via a private annotation `__alertScreenshotToken__` and attaches a URL to a Slack message or uploads the data to an image upload endpoint if needed.

This change also implements a few foundational functions for use in other notifiers.
2022-05-23 14:24:20 +08:00
Joan López de la Franca Beltran
5645d7a5e3 Encryption: Fix b64 encoding on CLI secretsmigrations commands (#49340) 2022-05-23 07:57:48 +02:00
Erik Sundell
aac5c9fd22 Cloudwatch: Pass label in deep link (#49160)
* pass label in deep iink

* add unit test

* pr feedback
2022-05-23 07:23:38 +02:00
Joe Blubaugh
1d724810de Alerting: State Manager takes screenshots. (#49338)
The State Manager will now take screenshots when an alert instance
switches to an Alerting or Resolved state.

Signed-off-by: Joe Blubaugh joe.blubaugh@grafana.com
2022-05-23 10:53:41 +08:00
Joe Blubaugh
687e79538b Alerting: Add a general screenshot service and alerting-specific image service. (#49293)
This commit adds a pkg/services/screenshot package for taking and uploading screenshots of Grafana dashboards. It supports taking screenshots of both dashboards and individual panels within a dashboard, using the rendering service.

The screenshot package has the following services, most of which can be composed:

BrowserScreenshotService (Takes screenshots with headless Chrome)
CachableScreenshotService (Caches screenshots taken with another service such as BrowserScreenshotService)
NoopScreenshotService (A no-op screenshot service for tests)
SingleFlightScreenshotService (Prevents duplicate screenshots when taking screenshots of the same dashboard or panel in parallel)
ScreenshotUnavailableService (A screenshot service that returns ErrScreenshotsUnavailable)
UploadingScreenshotService (A screenshot service that uploads taken screenshots)

The screenshot package does not support wire dependency injection yet. ngalert constructs its own version of the service. See https://github.com/grafana/grafana/issues/49296

This PR also adds an ImageScreenshotService to ngAlert. This is used to take screenshots with a screenshotservice and then store their location reference for use by alert instances and notifiers.
2022-05-22 22:33:49 +08:00
Joey Tawadrous
f06d9164a6 Jaeger: Update operations dropdown (#49329)
* Fix issue where no values would load in operations dropdown

* Better naming

* Updated tests
2022-05-22 10:29:25 +01:00
Leon Sorokin
4f46c2f75f HeatmapNG: render exemplars (#49287)
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2022-05-21 19:13:28 -07:00
sam boyer
a3402641d6 api: Validate dashboards on save via coremodels, behind feature toggle (#48252)
* Add coremodelValidation feature flag

* coremodels: use stubs when feature flag is off

* api: validate dashboards on save

* Need pointer receiver for FeatureManager

* Update dashboard Go model

* Align doc comments

* Include CoremodelRegistry in test

* Wedge coremodel in on all test cases, ugh

* Ugh fix comment again

* Update pkg/framework/coremodel/staticregistry/provide.go

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

* Update Thema (and its deps) for better errs

* omg whitespace

Co-authored-by: Artur Wierzbicki <wierzbicki.artur.94@gmail.com>
2022-05-22 02:44:12 +02:00
Artur Wierzbicki
03fe1435a0 Storage: store uploaded files in SQL rather than on the disk (#49034)
* #48259: set up storages per org id

* #48259: migrate to storage_sql
2022-05-21 16:55:11 -07:00
Gábor Farkas
313d203a87 loki: enable by default backend mode (#49326) 2022-05-21 17:01:57 +02:00
Gábor Farkas
0caeaaafe3 loki: add back frontend-mode metadata queries (#49297) 2022-05-21 16:46:39 +02:00
Gábor Farkas
93e299305c loki: backend-mode: apply default max-lines if not set in the UI (#48859) 2022-05-21 16:39:21 +02:00
Armand Grillet
7f29c2696d Add nolint to two lines in fs.go (#49357) 2022-05-21 12:14:58 +02:00
Karl Persson
0cbe4fe661 Docs: RBAC GA (#49062) 2022-05-20 21:48:52 +02:00
Adela Almasan
b3b650be1f Canvas: Context menu (#48909)
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
Co-authored-by: nmarrs <nathanielmarrs@gmail.com>
2022-05-20 12:30:29 -07:00
Jack Baldry
dea6fb4c1b Add current aliases (#49346)
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
2022-05-20 13:35:28 -05:00
svennergr
2949ebc264 Traces: Fixed missing CopyButton on KeyValueTables and overlapping of panels (#49271)
* rewrote `CopyIcon` to an functional component

- fixed missing `CopyIcon` on `KeyValuesTable`

* added fixed height of `30px` to `KeyValuesTable` to fix overlapping

* removed unused CopyIcon snapshot

* KeyValuesTable: moved `30px` height from `tr` to `td` to fix vertical alignment
2022-05-20 20:24:33 +02:00
Josh Hunt
426ca2999e GrafanaUI: Fix color of links in error Tooltips in light theme (#49327)
* GrafanaUI: Fix color of links in input validation errors in light theme

* Change colors
2022-05-20 18:54:07 +01:00
Torkel Ödegaard
6fe28854bc DashboardExport: Fixes issues sharing dashboards where query data source was set wrong (#48410) 2022-05-20 19:52:46 +02:00
Torkel Ödegaard
c3a5ff1eeb Transforms: Labels to fields, fix label picker layout (#49304) 2022-05-20 19:50:30 +02:00
Christopher Moyer
ee9ea64834 Docs: Moves http api docs to the developer docs (#49255)
* updates relrefs after move

Co-authored-by: Chris Moyer <chris.moyer@grafana.com>

* applies weights

Co-authored-by: Chris Moyer <chris.moyer@grafana.com>
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

* updates developer _index page

* make prettier

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

Co-authored-by: Jack Baldry <jack.baldry@grafana.com>
2022-05-20 12:46:27 -05:00
sh0rez
3d5d8c785b pkg/web: restrict handler types (#48495)
Makes `pkg/web` only accept handles from the following set:

```go
	handlerStd       = func(http.ResponseWriter, *http.Request)
	handlerStdCtx    = func(http.ResponseWriter, *http.Request, *web.Context)
	handlerStdReqCtx = func(http.ResponseWriter, *http.Request, *models.ReqContext)
	handlerReqCtx    = func(*models.ReqContext)
	handlerReqCtxRes = func(*models.ReqContext) Response
	handlerCtx       = func(*web.Context)
```

This is a first step to reducing above set to only `http.Handler`.

---

Due to a cyclic import situation between `pkg/models` and `pkg/web`, parts of this PR were put into `pkg/api/response`, even though they definitely do not belong there. This however is _temporary_ until we untangle `models.ReqContext`.
2022-05-20 12:45:18 -04:00
Gábor Farkas
c980655f08 elastic: config: hide access-mode selector when not needed (#49246) 2022-05-20 17:42:12 +02:00
Andreas Christou
34fa7b493c AzureMonitor: Fixes metric definition for Azure Storage queue/file/blob/table resources. (#49101)
* Appropriately set metric definition

- Nested storage account resources (queues/blobs/tables/files) require metric definition of Microsoft.Storage/storageAccounts
- Update tests accordingly

* Restructure getResourceNames test

- Add expect on getResource args

* Update to fix issue for new query editor

- Reconstruct resourceUri if the resource is a storage account
- Correctly push storage namespaces as options for metric namespaces
- Filter options appropriately

* Fix duplicate options

* Fix lint issues

* Add comment explaining URI modification
2022-05-20 16:36:42 +01:00
Gábor Farkas
061055fac9 loki: dataframes: do not set field.config.DisplayName (#49317) 2022-05-20 17:27:49 +02:00
Joan López de la Franca Beltran
15605b6c80 Encryption: Add support for decrypting ciphertexts with algorithm metadata (#49312) 2022-05-20 17:11:51 +02:00
Yuriy Tseretyan
258b3ab18b Alerting: Fix RBAC actions for notification policies (#49185)
* squash actions "alert.notifications:update", "alert.notifications:create", "alert.notifications:delete" to "alert.notifications:write"
* add migration
* update UI to use the write action
* update docs
* changelog
2022-05-20 10:55:07 -04:00
Andreas Christou
2780651ea8 AzureMonitor: Fix auto-selection of time-grain for metrics. (#49278)
* Update query editor to fix auto time-grain selection

* Update new query editor to fix auto time-grain selection

* Remove log and fix lint issues

* Add test for useMetricMetadata

- Add necessary types

* More test updates

- Update old dataHooks test
- Ensure query changes

Co-authored-by: Kevin Yu <kevinwcyu@users.noreply.github.com>
Co-authored-by: Andres Martinez Gotor <andres.mgotor@gmail.com>
Co-authored-by: Erik Sundell <erik.sundell87@gmail.com>
2022-05-20 15:45:54 +01:00
Erik Sundell
bd320ee0b3 Auth: Remove grafana ui dependency to the aws sdk (#43559)
* remove grafana ui dependency to the aws sdk

* wip

* cleanup

* add tests

* point to real version of aws-sdk
2022-05-20 16:04:20 +02:00
Kristina
be57e73b61 Add command palette to shortcuts document (#49328) 2022-05-20 15:19:26 +02:00
renovate[bot]
be7de1041a Update Monthly patch updates (#49257)
* Update Monthly patch updates

* remove @types/slate update and run prettier

* fix @types/slate resolution

* lockfile update

* more fixes

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2022-05-20 13:07:07 +01:00
Alex Khomenko
f1f5f01309 CreateTeam: Refactor test to RTL (#49306) 2022-05-20 13:28:59 +03:00
Chrysa Dikonimaki
7623f6ac64 Convert packages/jaeger-ui-components/src/TraceTimelineViewer/SpanDetail/AccordianText.test.js and packages/jaeger-ui-components/src/TraceTimelineViewer/SpanDetail/TextList.test.js to RTL (#49148)
* convert AccordianText and TestList tests to RTL

* convert AccordianText and TestList tests to RTL

* Update packages/jaeger-ui-components/src/TraceTimelineViewer/SpanDetail/AccordianText.test.js

Co-authored-by: Ashley Harrison <ashharrison90@gmail.com>

* Update packages/jaeger-ui-components/src/TraceTimelineViewer/SpanDetail/TextList.test.js

Co-authored-by: Ashley Harrison <ashharrison90@gmail.com>

* Update packages/jaeger-ui-components/src/TraceTimelineViewer/SpanDetail/AccordianText.test.js

Co-authored-by: Ashley Harrison <ashharrison90@gmail.com>

* fix TextList and AccordianText tests

* remove getrow function

* readd TextList props

Co-authored-by: Ashley Harrison <ashharrison90@gmail.com>
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2022-05-20 11:02:43 +01:00
Karl Persson
f5ec4bcbd2 remove action to manage plugin that is not used or documented (#49309) 2022-05-20 11:52:29 +02:00
Ashley Harrison
b864442717 Gauge: convert tests to RTL (#49251)
* Move logic into utils file, add EXTREMELY basic RTL test

* initialise array with value
2022-05-20 10:51:11 +01:00
Karl Persson
4a61f4111f Remove unused error from evaluator Evaluate (#49305) 2022-05-20 10:26:57 +02:00
Kristina
e5864f76b0 Add command palette to keyboard shortcuts help modal (#49186) 2022-05-20 09:11:19 +02:00
Nathan Marrs
646dcfccf9 Canvas: Implement minimum element size + center constraint UX (#49294) 2022-05-20 00:04:34 -07:00
Gabriel MABILLE
689f51599a AccessControl: Use RBACBuiltInRoleAssignmentEnabled in the frontend instead of FeatureToggle (#49261)
* AccessControl: Frontend changes to basic role enablement
2022-05-20 06:53:28 +00:00
Maria Alexandra
59c8c0d56b Search (Playground) - Fix minor css paddings inside table (#49263)
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2022-05-20 07:03:19 +02:00
Eric Leijonmarck
0f4c3f7805 Docs: SAML refactoring docs (#49039)
* moved around and made it a bit more clearer

* Update docs/sources/enterprise/saml/troubleshoot-saml.md

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

* Update docs/sources/enterprise/saml/troubleshoot-saml.md

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

* removed unnessecary if statement

* updated troubleshooting

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
2022-05-20 12:44:06 +10:00
JitaC
6397b34f8b Docs: Move labels and annotations topic to alerting fundamentals section (#49283)
* Moved annotation and labels topic to fundamentals and added label matching to the same section

* Cosmetic updates to "How label matching works topic"

* Few more changes to annotations and label section. Also added stem sentence to silences topics.

* Fixed one more broken relref.

* Update docs/sources/alerting/fundamentals/_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-05-19 19:17:57 -04:00
kay delaney
64aedb78ba Search: Support filtering by tag in folder view (#49221) 2022-05-19 14:16:25 -07:00
Alexander Weaver
e8b498fe8b Parse template when validating it (#49282) 2022-05-19 16:05:34 -05:00
Kevin Yu
0a95d493e3 Cloud Monitoring: Use new annotation API (#49026)
* remove angular code

* format annotation on backend

* format time with time type instead of string

* update annotation query tests

* update get alignment data function

* update annotation query editor

* add annotation query editor test

* update struct

* add tests

* remove extracted function

* remove non-null assertion

* remove stray commented out console.log

* fix jest haste map warning

* add alignment period

* add AnnotationMetricQuery type
2022-05-19 13:52:52 -07:00
Ryan McKinley
26e98a6f1b Search: add query to extender interface (#49281) 2022-05-19 20:30:13 +02:00
JitaC
639e548e32 Docs: Refactored alert groups and silences sections (#48833)
* Initial breakdown of silences topic

* Re-organized silences

* Refactored alert groups, fixed broken relrefs and adjusted weights.
2022-05-19 13:57:53 -04:00
Leonard Gram
fbc495ee68 update latest (#49279) 2022-05-19 19:06:45 +02:00
Grot (@grafanabot)
3bd6b8a5ae ReleaseNotes: Updated changelog and release notes for 8.5.3 (#49275)
* ReleaseNotes: Updated changelog and release notes for 8.5.3

* Update CHANGELOG.md

Co-authored-by: Leonard Gram <leo@xlson.com>
2022-05-19 19:00:36 +02:00
Todd Treece
f0f33733a5 Search: Add DashboardIndexExtender interface (#49045)
Co-authored-by: Alexander Emelin <frvzmb@gmail.com>
2022-05-19 12:46:18 -04:00
Sofia Papagiannaki
6bb843bd0e API: Introduce health and resources data source endpoints using the data source UID (#48676)
* API: introduce health and resources datasource endpoints with UID

* Document endpoints

* Update swagger
2022-05-19 19:27:59 +03:00
Vardan Torosyan
36663c093c Rename built-in roles to basic roles in the role picker (#49258) 2022-05-19 17:58:18 +02:00
Alexander Emelin
444c585c99 Search: limit max size of batches during indexing (#49187) 2022-05-19 18:57:26 +03:00
Jguer
8919c8b014 OAuth: make oauth case insensitive match for email (#49252) 2022-05-19 17:48:29 +02:00
Ryan McKinley
8a87db2743 Search: use ngram filter rather than prefix query (#49130) 2022-05-19 08:23:31 -07:00
Leonard Gram
aad2983350 Security: fixes CVE-2022-29170 (#49240)
* Request interceptor: block redirects

* handle location missing

* Update pkg/infra/httpclient/httpclientprovider/host_redirect_validation_middleware.go

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

* Update pkg/infra/httpclient/httpclientprovider/host_redirect_validation_middleware.go

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

* linter

* fixes tests

Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
2022-05-19 17:01:09 +02:00
Kristin Laemmert
33359aee6c backend/sqlstore: move GetDashboards to Dashboard Service (#49175)
I also did some mild file renaming to try and get the dashboards package closer in line with the sqlstore split design doc.
2022-05-19 10:59:12 -04:00
Isabella Siu
66220758b3 CloudWatch: migrate old variable queries with empty array (#49197) 2022-05-19 10:43:26 -04:00
renovate[bot]
e273c9a958 Ignore dependency updates to node-fetch as it's ESM only (#49235)
* Update dependency node-fetch to v3

* add node-fetch to the renovate ignore list as it's esm only at the moment

* revert back to 2.6.7

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2022-05-19 15:18:28 +01:00
Kristin Laemmert
2b8909a9c6 move GetDashboardUIDById out of sqlstore and into dashboard service (#49170)
* sqlstore: move GetDashboardUIDById to dashboard service
* winding change through the rest of the codebase
2022-05-19 10:13:02 -04:00
renovate[bot]
0bad187a60 Update dependency sass-loader to v13 (#49238)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-05-19 15:05:48 +01:00
renovate[bot]
f35be58252 Update dependency postcss-loader to v7 (#49237)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-05-19 15:00:25 +01:00
renovate[bot]
d2b9c42004 Update dependency yaml to v2 (#49239)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-05-19 14:52:25 +01:00
renovate[bot]
43d924324a Update dependency sinon to v14 (#49236)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-05-19 14:48:30 +01:00
Alex Khomenko
dacfdc0cde DashboardPickerByID: Add option to exclude dashboards (#49211) 2022-05-19 16:47:55 +03:00
Yuriy Tseretyan
f7f2253072 Alerting: Fix anonymous access to alerting (#49203)
* introduce a fallback handler that checks that role is Viewer.
* update UI nav links to allow alerting tabs for anonymous user
* update rule api to check for Viewer role instead of SignedIn when RBAC is disabled
2022-05-19 09:22:26 -04:00
renovate[bot]
31ca628262 Update dependency mocha to v10 (#49233)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-05-19 13:39:39 +01:00
renovate[bot]
74c98470ee Update dependency husky to v8 (#49232)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-05-19 13:35:53 +01:00
ying-jeanne
e2ea064584 integrat star service into APIs (#49220) 2022-05-19 14:32:10 +02:00
renovate[bot]
426324ad3e Update dependency glob to v8 (#49231)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-05-19 13:31:53 +01:00
Gábor Farkas
0355772e36 loki: do not use backend-mode when keepCookies is used (#49222) 2022-05-19 14:26:54 +02:00
Gábor Farkas
78e22aac59 loki: backend: better error-handling-tests (#49213) 2022-05-19 14:26:40 +02:00
renovate[bot]
3da1bf160e Update dependency expose-loader to v4 (#49229)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-05-19 13:25:29 +01:00
renovate[bot]
3855c6cf3d Update dependency eslint-plugin-jsdoc to v39 (#49228)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-05-19 13:21:22 +01:00
renovate[bot]
04dff7cc70 Update dependency css-minimizer-webpack-plugin to v4 (#49227)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-05-19 13:05:32 +01:00
Piotr Jamróz
c6c79a9360 Query History: Migrate local storage to remote storage (#48572)
* Load Rich History when the container is opened

* Store rich history for each pane separately

* Do not update currently opened query history when an item is added

It's impossible to figure out if the item should be added or not, because filters are applied in the backend. We don't want to replicate that filtering logic in frontend. One way to make it work could be by refreshing both panes.

* Test starring and deleting query history items when both panes are open

* Remove e2e dependency on ExploreId

* Fix unit test

* Assert exact queries

* Simplify test

* Fix e2e tests

* Fix toolbar a11y

* Reload the history after an item is added

* Fix unit test

* Remove references to Explore from generic PageToolbar component

* Update test name

* Fix test assertion

* Add issue item to TODO

* Improve test assertion

* Simplify test setup

* Move query history settings to persistence layer

* Fix test import

* Fix unit test

* Fix unit test

* Test local storage settings API

* Code formatting

* Fix linting errors

* Add an integration test

* Add missing aria role

* Fix a11y issues

* Fix a11y issues

* Use divs instead of ul/li

Otherwis,e pa11y-ci reports the error below claiming there are no children with role=tab:

Certain ARIA roles must contain particular children
   (https://dequeuniversity.com/rules/axe/4.3/aria-required-children?application=axeAPI)

   (#reactRoot > div > main > div:nth-child(3) > div > div:nth-child(1) > div >
   div:nth-child(1) > div > div > nav > div:nth-child(2) > ul)

   <ul class="css-af3vye" role="tablist"><li class="css-1ciwanz"><a href...</ul>

* Clean up settings tab

* Remove redundant aria label

* Remove redundant container

* Clean up test assertions

* Move filtering to persistence layer

* Move filtering to persistence layer

* Simplify applying filters

* Split applying filters and reloading the history

* Debounce updating filters

* Update tests

* Fix waiting for debounced results

* Clear results when switching tabs

* Improve test coverage

* Update docs

* Revert extra handling for uid (will be added when we introduce remote storage)

* Create basic plan

* Rename query history toggle

* Add list of supported features and add ds name to RichHistoryQuery object

* Clean up

Removed planned items will be addressed in upcoming prs (filtering and pagination)

* Handle data source filters

* Simplify DTO conversion

* Clean up

* Fix betterer conflicts

* Fix imports

* Fix imports

* Post-merge fixes

* Use config instead of a feature flag

* Use config instead of a feature flag

* Update converter tests

* Add tests for RichHistoryRemoteStorage

* Simplify test setup

* Simplify assertion

* Add e2e test for query history

* Remove duplicated entry

* Fix unit tests

* Improve readability

* Remove unnecessary casting

* Mock backend in integration tests

* Remove unnecessary casting

* Fix integration test

* Update betterer results

* Fix unit tests

* Simplify testing with DataSourceSrv

* Fix sorting and add to/from filtering

* Add migration for local storage query history

* Test query history migration

* Simplify testing DataSourceSettings

* Skip redundant migrations

* Revert error logging test

* Fix tests

* Update betterer results

* Change notification message after migration

* Ensure previous request is canceled when getting search results

* Add loading message when results are being loaded

* Show info message only if local storage is enabled

* Fix unit test

* Post-merge fixes

* Fix intergration tests

* Fix incorrect filtering
2022-05-19 13:45:32 +02:00
renovate[bot]
e14b93f17c Update dependency @welldone-software/why-did-you-render to v7 (#49226)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-05-19 11:34:34 +01:00
Jguer
86962dc9bd Login: Fix mismatching label on auth_module in user list (#49177)
* Login: Fix mismatching label on user auth_module

* Login: ensure previous auth was set to differing

* Login: ensure only one entry of auth is updated

* compare both entries

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

* remove noop

Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com>
2022-05-19 12:03:04 +02:00
renovate[bot]
258e48678a Update dependency rollup to v2.74.0 (#49215)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-05-19 10:13:16 +01:00
renovate[bot]
2191bf2a50 Update dependency @types/react-resizable to v3 (#49195)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-05-19 09:52:03 +01:00
renovate[bot]
c9272b7d28 Update dependency moveable to v0.29.8 (#49097)
* Update dependency moveable to v0.29.8

* update yarnrc.yml

* also update react-compat-moveable

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2022-05-19 09:49:10 +01:00
Maria Alexandra
d592d4dd73 Search(Playground) Action Row: Fix disabled option folder layout when sorting (#49182)
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2022-05-19 10:05:04 +02:00
Gabriel MABILLE
5b6d20fbce Access Control: Remove built-in role assignment by default (#49058)
* Remove FF-bultins

* Add a param to test br-simplifying
2022-05-19 09:29:36 +02:00
Gábor Farkas
a3c5834594 Elastic: devenv: improved devenv-image (#49002)
* devenv: elastic: improved config

* better ascii-codes
2022-05-19 08:29:23 +02:00
Nathan Marrs
35ea67c210 47853 canvas constraint visualizations (#49206)
Co-authored-by: Adela Almasan <adela.almasan@grafana.com>
2022-05-18 18:49:57 -07:00
Ryan McKinley
3b017e0fb1 Inspect: include annotation data in DataFrameJSON debugger (#49204) 2022-05-18 17:31:03 -07:00
Ryan McKinley
d0d4d8af7f Heatmap: improve new heatmap options (#49201) 2022-05-19 01:54:32 +02:00
Marcus Andersson
2053d37d7a Chore: Introducing a Grafana HALL_OF_FAME.md (#45878)
Co-authored-by: Hugo Häggmark <hugo.haggmark@gmail.com>
Co-authored-by: Carl Bergquist <carl.bergquist@gmail.com>
2022-05-18 20:13:11 +00:00
Yuriy Tseretyan
d87fdc1037 Alerting: Update migration to migrate only alerts that belong to existing org\dashboard (#49192)
* Update migration to migrate only alerts that belong to existing org\dashboard
2022-05-18 16:00:08 -04:00
Todd Treece
859cc92da7 Prometheus: Set default method to POST in new HTTP client (#49198) 2022-05-18 15:44:41 -04:00
Brendan O'Handley
5b52a1c391 List Azure Devops as an enterprise plugin (#49189)
* list azure devops as an enterprise plugin

* change base url to grafana.com/grafana/plugins and remove trailing slashes for consistency
2022-05-18 15:02:45 -04:00
Alexander Weaver
25da759bf2 Indicate whether templates are provisioned (#49025) 2022-05-18 13:52:30 -05:00
Isabella Siu
ce1b1bc36b CloudWatch: migrate variable query dimension filter (#48562)
* CloudWatch: migrate variable query dimension filter

* separate tests
2022-05-18 13:51:18 -04:00
Matthew Jacobson
5c32a6b6f6 Alerting: Fix flaky migration test (#48595)
* Fix flaky migration test
2022-05-18 13:23:13 -04:00
Connor Lindsey
7688b12f9a Tracing: Add config for multiple named trace to metrics queries (#49007)
* Tracing: Add config for multiple named trace to metrics queries
2022-05-18 10:55:55 -06:00
renovate[bot]
db0f36e766 Update dependency eslint to v8.15.0 (#46975)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-05-18 17:36:05 +01:00
Chrysa Dikonimaki
a113fcaca3 Convert packages/jaeger-ui-components/src/TraceTimelineViewer/SpanBarRow.test.js to RTL (#49119)
* convert SpanBarRow tests to RTL

* remove comments

* Update packages/jaeger-ui-components/src/TraceTimelineViewer/SpanBarRow.test.js

Co-authored-by: Ashley Harrison <ashharrison90@gmail.com>

* Update packages/jaeger-ui-components/src/TraceTimelineViewer/SpanBarRow.test.js

Co-authored-by: Ashley Harrison <ashharrison90@gmail.com>

* fix and replace

* fix last test

Co-authored-by: Ashley Harrison <ashharrison90@gmail.com>
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2022-05-18 17:18:24 +01:00
renovate[bot]
887adc3d9b Update dependency @testing-library/react-hooks to v8 (#49180)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-05-18 17:02:17 +01:00
renovate[bot]
4a26b9c6c7 Update typescript-eslint monorepo to v5.25.0 (#49171)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-05-18 16:31:04 +01:00
Alexander Weaver
81e368dbb5 Fix flaky test. Sort records and only test the important fields (#49120) 2022-05-18 10:17:08 -05:00
renovate[bot]
eecee16b66 Update dependency @rollup/plugin-commonjs to v22 (#49172)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-05-18 16:16:55 +01:00
renovate[bot]
2857258b53 Update emotion monorepo to v11.9.0 (#49167)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-05-18 16:13:02 +01:00
ying-jeanne
4e3f53f106 Chore: Make logger mutable for regression test (#49146)
* Log: make logger mutable

* remove flag from public configuration
2022-05-18 17:04:52 +02:00
Josh Hunt
71e1305364 LibraryPanels: Fix library panels not connecting properly in imported dashboards (#49161)
* Use saved dashboard model to create library panel connections when importing

* Rename variables in dashboard import for clarity
2022-05-18 16:50:24 +02:00
renovate[bot]
57595f7326 Update dependency webpack-dev-server to v4.9.0 (#49166)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-05-18 14:56:32 +01:00
Ashley Harrison
3ace282c29 add tracking for snapshot creation (#49165) 2022-05-18 14:53:49 +01:00
Ryan McKinley
f0496955e3 Search: extract a reusable view from the search playground (#49132)
Co-authored-by: Alexandra Vargas <alexa1866@gmail.com>
2022-05-18 15:46:43 +02:00
Sergey Kostrukov
7251115457 Settings: Use Grafana Azure SDK to pass Azure env vars for external plugins (#48954)
* Azure env vars for plugins via Grafana Azure SDK

* Remove tests
2022-05-18 15:28:40 +02:00
Gilles De Mey
0ae8e3bd4e Alerting: Fix notification policies label matchers layout (#49159) 2022-05-18 15:01:56 +02:00
renovate[bot]
b54ac426c8 Update dependency storybook-dark-mode to v1.1.0 (#49155)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-05-18 13:41:23 +01:00
renovate[bot]
103887a6e8 Update dependency stylelint to v14.8.2 (#49157)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-05-18 13:27:49 +01:00
renovate[bot]
2bc09da446 Update dependency selecto to v1.16.2 (#49153)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-05-18 13:24:02 +01:00
Kristin Laemmert
8169dcd9a2 remove unused GetDashboardSlugById function (#49116) 2022-05-18 14:17:17 +02:00
renovate[bot]
7ac9a0a087 Update dependency rollup to v2.73.0 (#49152)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-05-18 13:04:21 +01:00
Chrysa Dikonimaki
6b4353f890 Convert packages/jaeger-ui-components/src/TraceTimelineViewer/SpanBar.test.js to RTL (#49107)
* convert SpanBar tests to RTL and add testing-library/react dependency

* Update packages/jaeger-ui-components/src/TraceTimelineViewer/SpanBar.test.js

Co-authored-by: Ashley Harrison <ashharrison90@gmail.com>

* Update packages/jaeger-ui-components/src/TraceTimelineViewer/SpanBar.test.js

Co-authored-by: Ashley Harrison <ashharrison90@gmail.com>

* fix

* use e2e selector everywhere

Co-authored-by: Ashley Harrison <ashharrison90@gmail.com>
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2022-05-18 13:00:44 +01:00
renovate[bot]
523b9ec44f Update dependency react-select to v5.3.2 (#49142)
* Update dependency react-select to v5.3.2

* update snapshot

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2022-05-18 12:00:39 +01:00
renovate[bot]
752217e93c Update dependency redux to v4.2.0 (#49150)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-05-18 11:54:42 +01:00
renovate[bot]
1c5996eddf Update dependency react-table to v7.8.0 (#49149)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-05-18 11:51:04 +01:00
Dominik Prokop
cdc6344a96 Legend: Use correct unit for percent and count calculations (#49004) 2022-05-18 12:22:17 +02:00
renovate[bot]
b9e45fafe5 Update dependency react-popper to v2.3.0 (#49141)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-05-18 11:05:27 +01:00
George Robinson
43358c7248 Alerting: Keep private annotations across evaluations (#49080) 2022-05-18 11:21:18 +02:00
renovate[bot]
aaea3bdd99 Update dependency react-moveable to v0.32.7 (#49137)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-05-18 10:07:03 +01:00
Gábor Farkas
45d6d38183 Elasticsearch: Remove browser access mode (#49014)
* elastic: remove browser-access-mode

* improved text

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

* improved text

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

* better text

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

* better text

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

* better text

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

* prettier fixes

Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com>
2022-05-18 11:04:47 +02:00
Gilles De Mey
1d18b5ccd3 Alerting: inject dashboardService in to AlertNG (#49139) 2022-05-18 11:04:17 +02:00
renovate[bot]
d4d2a747d0 Update dependency lru-cache to v7.10.1 (#49096)
* Update dependency lru-cache to v7.10.1

* update snapshot

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2022-05-18 10:00:46 +01:00
renovate[bot]
2bbb685c54 Update dependency react-highlight-words to v0.18.0 (#49136)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-05-18 09:47:33 +01:00
Konrad Lalik
43ab0c1f95 Alerting: Fix Loki buildinfo request error (#49073)
* Skip buildinfo fetching for Loki data sources

* Fix and add tests

* Fix linter

* Improve typings

* Improve Loki's buildinfo notice

* Fix rename, improve prom app display name
2022-05-18 10:45:26 +02:00
renovate[bot]
0616388036 Update dependency rc-cascader to v3.5.0 (#49106)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-05-18 09:35:57 +01:00
renovate[bot]
f01a72e179 Update dependency prismjs to v1.28.0 (#49105)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-05-18 09:19:05 +01:00
Gilles De Mey
2790f0f5e4 Update UX issue template to use YAML extension (#49099) 2022-05-18 10:05:24 +02:00
Gilles De Mey
0a44fbdd42 Alerting: Do not serve alerting images from root (#49022)
Manually tested with serve_from_sub_path = true and a custom pathUrl
2022-05-18 09:54:24 +02:00
Shirley
ef9e08ffcf CloudWatch: Change aggregateResponse to return slice instead of map (#48805)
* Rename tests

* Change test names

* Change metrics from map to slice

* Add test for one output, multiple MetricDataResults

* Rename test input file

* Use map instead of iterating over the response metrics

* Rename variable

* move partial data set to query row response

* remove not used label field

* remove incorrect placeholder

Co-authored-by: Erik Sundell <erik.sundell87@gmail.com>
2022-05-18 09:16:38 +02:00
Karl Persson
5c4ebb6f34 fetch permissions by uid (#49100) 2022-05-18 09:13:41 +02:00
Ryan McKinley
30e4e9399b Geomap: show delete button (#49125) 2022-05-17 23:39:54 -07:00
Ryan McKinley
9bbe951ec6 Usage: add gauge for panel/datasource/transformer types (#48991) 2022-05-18 00:25:28 +02:00
Jeff Levin
c7f8c2cc73 add isPublic to dashboard (#48012)
adds toggle to make a dashboard public

* config struct for public dashboard config
* api endpoints for public dashboard configuration
* ui for toggling public dashboard on and off
* load public dashboard config on share modal

Co-authored-by: Owen Smallwood <owen.smallwood@grafana.com>
Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
2022-05-17 14:11:55 -08:00
Artur Wierzbicki
156e14e296 Previews: beta docs (#47993)
* #44449: preview docs draft

* #44449: remove localhost

* #44449: fixes

* #44449: remove localhost

* Update docs/sources/dashboards/previews.md

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

* Update docs/sources/dashboards/previews.md

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

* Update docs/sources/dashboards/previews.md

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

* Update docs/sources/dashboards/previews.md

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

* Update docs/sources/dashboards/previews.md

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

* Update docs/sources/dashboards/previews.md

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

* Update docs/sources/dashboards/previews.md

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

* Update docs/sources/dashboards/previews.md

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

* Update docs/sources/dashboards/previews.md

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

* Update docs/sources/dashboards/previews.md

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

* Update docs/sources/dashboards/previews.md

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

* #44449: update link

* #44449: review comment https://github.com/grafana/grafana/pull/47993#discussion_r866363311

* #44449: https://github.com/grafana/grafana/pull/47993#discussion_r866363825

* #44449: https://github.com/grafana/grafana/pull/47993#discussion_r866364182

* #44449: https://github.com/grafana/grafana/pull/47993#discussion_r866365003

* #44449: https://github.com/grafana/grafana/pull/47993#discussion_r866359611

* #44449: https://github.com/grafana/grafana/pull/47993#discussion_r866361949

* #44449: add note about the first crawler run

* #44449: https://github.com/grafana/grafana/pull/47993/files#r866355629

* Update docs/sources/dashboards/previews.md

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

* fix up

* Update docs/sources/dashboards/previews.md

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

* typo

* Update docs/sources/dashboards/previews.md

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

* Update docs/sources/dashboards/previews.md

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

* rephrase

* replace gifs with webms

* reword

Co-authored-by: JitaC <70489351+achatterjee-grafana@users.noreply.github.com>
2022-05-17 13:02:50 -07:00
qs_pang
78287618ab Fix CloudWatch: Add missing ELB metrics #48756 (#48985)
* Fix CloudWatch: Add missing ELB metrics #48756

* run go fmt
2022-05-17 14:58:34 -04:00
Kristin Laemmert
1df340ff28 backend/services: Move GetDashboard from sqlstore to dashboard service (#48971)
* rename folder to match package name
* backend/sqlstore: move GetDashboard into DashboardService

This is a stepping-stone commit which copies the GetDashboard function - which lets us remove the sqlstore from the interfaces in dashboards - without changing any other callers.
* checkpoint: moving GetDashboard calls into dashboard service
* finish refactoring api tests for dashboardService.GetDashboard
2022-05-17 14:52:22 -04:00
Alexander Weaver
9af30f6570 Alerting: Provisioning GET routes for mute timings (#49044)
* Define GET routes and run codegen

* Wire up forked and non-generated API

* Implement and wire

* Tests, authorization

* Fix linter error
2022-05-17 13:42:48 -05:00
Christopher Moyer
7bdf76a694 combines grafana live topics into a single page (#49035) 2022-05-17 12:19:58 -05:00
Kat Yang
719af24235 Refactor: Add UID endpoint for dashboard versions and restore (#48364)
* Refactor: Add UID endpoint for dashboard versions and restore

* Fix: User dashID instead of dash.id

* 💩

* Move apiCmd error handling outside of dashUID check

* fix the panic in test

* Fix handler and update docs

Co-authored-by: Kat Yang <yangkb09@users.noreply.github.com>

* Docs: add deprecated warning to restore and version docs

* Fix hyperlink text

* Add swagger endpoints for restore and versions

* Add deprecated tag on swagger for both endpoints

* Fix: Update access control to be dashboards

* Return UID in response; Update docs to reflect this; Implement Ying suggestion

* Update docs/sources/http_api/dashboard_versions.md

Co-authored-by: Sofia Papagiannaki <1632407+papagian@users.noreply.github.com>

* Update pkg/models/dashboard_version.go

Co-authored-by: Sofia Papagiannaki <1632407+papagian@users.noreply.github.com>

* Update pkg/models/dashboard_version.go

Co-authored-by: Sofia Papagiannaki <1632407+papagian@users.noreply.github.com>

* Update query to refer to DashboardUID

Co-authored-by: Ying WANG <ying.wang@grafana.com>
Co-authored-by: Sofia Papagiannaki <sofia@grafana.com>
Co-authored-by: Kat Yang <yangkb09@users.noreply.github.com>
Co-authored-by: Sofia Papagiannaki <1632407+papagian@users.noreply.github.com>
2022-05-17 12:57:27 -04:00
Sarah Zinger
c652849303 Azure Monitor: Add Resource Picker for Metrics Queries (#49029) 2022-05-17 12:53:39 -04:00
Ryan McKinley
acd31ae9f0 Search: simulate folder mange pages within the playground page (#49041) 2022-05-17 08:42:52 -07:00
Gilles De Mey
e574870104 Docs: pull labels and label matchers in to its own fundamentals article (#48758) 2022-05-17 17:31:39 +02:00
Gilles De Mey
4b4f996fa3 Alerting: refactor unified alerting promotion to deprecation (#49019) 2022-05-17 17:30:41 +02:00
Jack Baldry
51dfcd7d37 Add current alias to all files (#48635)
* Add aliases to all files

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

* Prettify front matter

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
2022-05-17 08:24:11 -07:00
Dominik Prokop
6a5a0e5770 Tooltip: Sort decimals using standard numeric compare (#49084)
* Failing test case

* Compare numeric values not using collator
2022-05-17 16:30:44 +02:00
renovate[bot]
457ee6d2fb Update dependency jest-junit to v13.2.0 (#49088)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-05-17 15:28:16 +01:00
renovate[bot]
cba54a9a1d Update dependency lint-staged to v12.4.1 (#49091)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-05-17 15:14:43 +01:00
renovate[bot]
f0b6a39ad6 Update dependency eslint-plugin-jest to v26.2.2 (#49079)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-05-17 15:05:37 +01:00
renovate[bot]
c8ca28bbea Update dependency fs-extra to v10.1.0 (#49081)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-05-17 14:58:01 +01:00
Karl Persson
34be8f28b9 AccessControl: Add metadata to search result (#48879)
* Add access control metadata to search hits if access control query string is passed
2022-05-17 15:51:44 +02:00
Gabriel MABILLE
7cb7290a3e AccessControl: Enforce user check when enterprise accesscontrol is on (#49003)
* AccessControl: Enforce user check when enterprise accesscontrol is on

* Update the test not to fail enterprise build

* Adding a log as suggested by Kalle

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

* Update log message

Co-authored-by: Kalle Persson <kalle.persson@grafana.com>
2022-05-17 09:47:31 -04:00
Gabriel MABILLE
83e234d4f6 AccessControl: Document basic roles changes and provisioning V2 (#48910)
* AccessControl: Document basic roles simplifying

* Add sample file for provisioning v2

* WIP

* Update provisioning example from docs

* Fix wrong permission in docs

* Nits on about-rbas.md

* Manage rbac roles

* Nit.

* Nit.

* Rephrase

* Comment

* Add version to the role

* Update role

* Update role

* Spell

* Final touch on about-rbac

* Add basic role UID mapping about-rbac

* Team assignments

* assign rbac roles

* move for more info

* enable rbac and provisioning

* spell

* plan rbac rollout strategy

* Cover factory reset

* remove builtin assignment permissions from docs

* to -> from

* Custom role actions scopes

* spell

* Update docs/sources/enterprise/access-control/about-rbac.md

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

* Update docs/sources/enterprise/access-control/about-rbac.md

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

* Update docs/sources/enterprise/access-control/assign-rbac-roles.md

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

* Update docs/sources/enterprise/access-control/assign-rbac-roles.md

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

* Update docs/sources/enterprise/access-control/assign-rbac-roles.md

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

* Update docs/sources/enterprise/access-control/plan-rbac-rollout-strategy.md

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

* Update docs/sources/enterprise/access-control/plan-rbac-rollout-strategy.md

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

* Update docs/sources/enterprise/access-control/manage-rbac-roles.md

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

* Update docs/sources/enterprise/access-control/custom-role-actions-scopes.md

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

* Update docs/sources/enterprise/access-control/custom-role-actions-scopes.md

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

* Update docs/sources/enterprise/access-control/enable-rbac-and-provisioning.md

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

* Update docs/sources/enterprise/access-control/manage-rbac-roles.md

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

* Update docs/sources/enterprise/access-control/manage-rbac-roles.md

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

* Update docs/sources/enterprise/access-control/manage-rbac-roles.md

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

* Update docs/sources/enterprise/access-control/manage-rbac-roles.md

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

* Update docs/sources/enterprise/access-control/manage-rbac-roles.md

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

* Update docs/sources/enterprise/access-control/manage-rbac-roles.md

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

* Update docs/sources/enterprise/access-control/manage-rbac-roles.md

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

* Update docs/sources/enterprise/access-control/manage-rbac-roles.md

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

* Update docs/sources/enterprise/access-control/manage-rbac-roles.md

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

* Update docs/sources/enterprise/access-control/manage-rbac-roles.md

* Update docs/sources/enterprise/access-control/manage-rbac-roles.md

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

* Remove factory as much as possible

* Update docs/sources/enterprise/access-control/plan-rbac-rollout-strategy.md

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

* Update docs/sources/enterprise/access-control/plan-rbac-rollout-strategy.md

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

* Have -> Must

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

* Have -> Must

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

* Replace factory by hard reset

* Replace LINK

* Update docs/sources/enterprise/access-control/about-rbac.md

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

* Suggestion on example descriptions

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

* Update docs/sources/enterprise/access-control/manage-rbac-roles.md

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

* Remove comment on permissions escalate

* Prettier.

* add a sentence to explain the type:escalate

* add a sentence to explain the type:escalate

* Rephrase

* Remove TODOs as discussed with jguer

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

* Implement vardan's suggestion to have only one mapping:

Co-authored-by: Vardan Torosyan <vardants@gmail.com>

* Document that you cannot delete basic roles

Co-authored-by: Vardan Torosyan <vardants@gmail.com>

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
Co-authored-by: Jguer <joao.guerreiro@grafana.com>
Co-authored-by: Vardan Torosyan <vardants@gmail.com>
2022-05-17 15:46:43 +02:00
renovate[bot]
e3c1faad56 Update dependency jest-fail-on-console to v2.4.1 (#49082)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-05-17 14:24:23 +01:00
renovate[bot]
54f167dc2d Update dependency core-js to v3.22.5 (#49071)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-05-17 13:57:22 +01:00
renovate[bot]
b342c53acd Update dependency csstype to v3.1.0 (#49072)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-05-17 13:32:38 +01:00
Ashley Harrison
bddbed4e21 Convert FormField tests to RTL (#49068) 2022-05-17 13:26:48 +01:00
kay delaney
e5925b2e91 Search: Constrain folder view (#49069) 2022-05-17 12:36:34 +01:00
sam boyer
44956aea66 Incremental improvements to dashboard schema (#48977)
* Change default of style to dark

* Separate cursor into standalone def

* Docs on timepicker and templating fields

Also add what appear to be timepicker-related fields

* Separate out AnnotationQuery definition

* Add memberNames for DashboardCursorSync

* Add sketch of VariableModel for templating field

Also changes label field from frontend from null to optional.

* Use constraints to enforce non-empty panel type

Negation (!="")  was breaking openapi exporter

* Add types and fields for links

* Remove panelVersion fields

These weren't right anyway, and they revealed a bug in the CUE openapi
generator

* Remove null label value from test

* Narrow type and set bounds on month field

* Adapt Go dashboard schema to lineage changes
2022-05-17 12:11:09 +01:00
Sofia Papagiannaki
925784f514 Alerting: Modify endpoint for testing a datasource rule using the UID (#48070)
* Modify testing endpoint to expect the datasource UID

* Update docs
2022-05-17 14:10:20 +03:00
kay delaney
de3e981985 Chore: Upgrade typescript to 4.6.4 (#49016) 2022-05-17 12:08:10 +01:00
Piotr Jamróz
f252e89339 Query History: Implement RemoteStorage methods: get all, add new (#48330)
* Load Rich History when the container is opened

* Store rich history for each pane separately

* Do not update currently opened query history when an item is added

It's impossible to figure out if the item should be added or not, because filters are applied in the backend. We don't want to replicate that filtering logic in frontend. One way to make it work could be by refreshing both panes.

* Test starring and deleting query history items when both panes are open

* Remove e2e dependency on ExploreId

* Fix unit test

* Assert exact queries

* Simplify test

* Fix e2e tests

* Fix toolbar a11y

* Reload the history after an item is added

* Fix unit test

* Remove references to Explore from generic PageToolbar component

* Update test name

* Fix test assertion

* Add issue item to TODO

* Improve test assertion

* Simplify test setup

* Move query history settings to persistence layer

* Fix test import

* Fix unit test

* Fix unit test

* Test local storage settings API

* Code formatting

* Fix linting errors

* Add an integration test

* Add missing aria role

* Fix a11y issues

* Fix a11y issues

* Use divs instead of ul/li

Otherwis,e pa11y-ci reports the error below claiming there are no children with role=tab:

Certain ARIA roles must contain particular children
   (https://dequeuniversity.com/rules/axe/4.3/aria-required-children?application=axeAPI)

   (#reactRoot > div > main > div:nth-child(3) > div > div:nth-child(1) > div >
   div:nth-child(1) > div > div > nav > div:nth-child(2) > ul)

   <ul class="css-af3vye" role="tablist"><li class="css-1ciwanz"><a href...</ul>

* Clean up settings tab

* Remove redundant aria label

* Remove redundant container

* Clean up test assertions

* Move filtering to persistence layer

* Move filtering to persistence layer

* Simplify applying filters

* Split applying filters and reloading the history

* Debounce updating filters

* Update tests

* Fix waiting for debounced results

* Clear results when switching tabs

* Improve test coverage

* Update docs

* Revert extra handling for uid (will be added when we introduce remote storage)

* Create basic plan

* Rename query history toggle

* Add list of supported features and add ds name to RichHistoryQuery object

* Clean up

Removed planned items will be addressed in upcoming prs (filtering and pagination)

* Handle data source filters

* Simplify DTO conversion

* Clean up

* Fix betterer conflicts

* Fix imports

* Fix imports

* Post-merge fixes

* Use config instead of a feature flag

* Use config instead of a feature flag

* Update converter tests

* Add tests for RichHistoryRemoteStorage

* Simplify test setup

* Simplify assertion

* Add e2e test for query history

* Remove duplicated entry

* Fix unit tests

* Improve readability

* Remove unnecessary casting

* Mock backend in integration tests

* Remove unnecessary casting

* Fix integration test

* Update betterer results

* Fix unit tests

* Simplify testing with DataSourceSrv

* Fix sorting and add to/from filtering

* Simplify testing DataSourceSettings

* Update betterer results

* Ensure previous request is canceled when getting search results

* Add loading message when results are being loaded

* Show info message only if local storage is enabled

* Fix unit test

* Reuse sort order options

* Reuse sort order options

* Fix footer spacing
2022-05-17 12:59:16 +02:00
Kat Yang
9a0f2ec449 Refactor: Add UID endpoint for get dashboard version (#48600)
* Refactor: Add UID endpoint for get dashboard version

* Add initial docs language

* Add new endpoint in swagger

* Change access control to dashboards

* Add parameters to swagger endpoint

* Return UID in response; Update docs to reflect this; Implement Ying suggestion

* Update docs/sources/http_api/dashboard_versions.md

Co-authored-by: Sofia Papagiannaki <1632407+papagian@users.noreply.github.com>

* Update pkg/api/api.go

Co-authored-by: Sofia Papagiannaki <1632407+papagian@users.noreply.github.com>

* Update pkg/models/dashboard_version.go

Co-authored-by: Sofia Papagiannaki <1632407+papagian@users.noreply.github.com>

* Rename UID to DashboardUID for clarity; use dashUID in method

Co-authored-by: Sofia Papagiannaki <1632407+papagian@users.noreply.github.com>
2022-05-17 12:59:02 +02:00
dependabot[bot]
ce6a5694ff Bump actions/download-artifact from 2 to 3 (#47543)
Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 2 to 3.
- [Release notes](https://github.com/actions/download-artifact/releases)
- [Commits](https://github.com/actions/download-artifact/compare/v2...v3)

---
updated-dependencies:
- dependency-name: actions/download-artifact
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-05-17 11:58:46 +01:00
dependabot[bot]
e5ae3b9762 Bump actions/setup-node from 2.5.1 to 3.2.0 (#49040)
Bumps [actions/setup-node](https://github.com/actions/setup-node) from 2.5.1 to 3.2.0.
- [Release notes](https://github.com/actions/setup-node/releases)
- [Commits](https://github.com/actions/setup-node/compare/v2.5.1...v3.2.0)

---
updated-dependencies:
- dependency-name: actions/setup-node
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-05-17 11:56:14 +01:00
dependabot[bot]
c5f5cbe438 Bump actions/stale from 4 to 5 (#47542)
Bumps [actions/stale](https://github.com/actions/stale) from 4 to 5.
- [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/v4...v5)

---
updated-dependencies:
- dependency-name: actions/stale
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-05-17 11:55:05 +01:00
renovate[bot]
9bc4a27238 Update dependency axios to v0.27.2 (#49066)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-05-17 11:47:21 +01:00
renovate[bot]
92ff880cbc Update dependency @visx/tooltip to v2.10.0 (#49065)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-05-17 11:42:09 +01:00
Ashley Harrison
3b0cd8b6f1 Convert NamedColorsPalette tests to RTL (#49064) 2022-05-17 11:34:15 +01:00
renovate[bot]
d477394d6c Update dependency @testing-library/user-event to v14.2.0 (#49060)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-05-17 11:25:40 +01:00
renovate[bot]
1be8f9686d Update dependency @rushstack/ts-command-line to v4.11.0 (#49059)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-05-17 11:19:43 +01:00
Ashley Harrison
a3e68eef17 IconButton: IconButtons are now correctly aligned in Safari (#48759)
* fix icon alignment in safari

* add comment
2022-05-17 11:03:35 +01:00
Josh Hunt
18cbea84b1 prevent generated files from being prettiered (#49061) 2022-05-17 12:01:07 +02:00
renovate[bot]
a59200fac4 Update dependency @microsoft/api-extractor to v7.24.0 (#49057)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-05-17 10:47:45 +01:00
renovate[bot]
7a0610f0f4 Update dependency @visx/group to v2.10.0 (#48712)
* Update dependency @visx/group to v2.10.0

* commit yarn lock changes

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2022-05-17 10:32:45 +01:00
renovate[bot]
075dca1b34 Update babel monorepo to v7.17.12 (#49056)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-05-17 09:54:30 +01:00
renovate[bot]
fe91b9d706 Update dependency @visx/shape to v2.10.0 (#48803)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-05-17 09:49:24 +01:00
renovate[bot]
cb1b101a9c Update dependency @visx/gradient to v2.10.0 (#48647)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-05-17 09:45:15 +01:00
Maria Alexandra
a3233c6ac3 Search(Playground)- Manage Actions: Disable delete button when folder is General (#49021)
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2022-05-17 10:31:19 +02:00
renovate[bot]
0ea04ac64d Update dependency @opentelemetry/semantic-conventions to v1.2.0 (#48640)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-05-17 09:24:55 +01:00
Jess
8fcca7f700 Create issue template for UX design issues (#48742)
This will help the UX team create issues for their work faster. That way we can be more open about our work and help both Grafanistas and community members see what we're doing.
2022-05-17 10:10:48 +02:00
renovate[bot]
15034702c6 Update dependency jest-canvas-mock to v2.4.0 (#48691)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-05-17 11:02:01 +03:00
Chrysa Dikonimaki
b33c1bf4fd Convert packages/grafana-ui/src/components/Logs/LogRows.test.tsx to RTL (#48982)
* convert LogLabels tests toRTL

* convert LogMessageAnsi tests to RTL

* convert LogMessageAnsi to RTL fix

* remove comment from LogMessageAnsi tests

* convert LogRows tests to RTL

* Delete LogRow import
2022-05-17 08:56:14 +01:00
Selene
43e34f3086 Dashboards: Allow to retrieve dashboards by uid (#48522)
* Add the possibility to get the dashboards by uid

* Fix
2022-05-17 09:37:44 +02:00
Leon Sorokin
84d4ce51ad TimeSeries: Fix detection & rendering of sparse datapoints (#48841) 2022-05-16 23:24:41 -05:00
Leon Sorokin
eecdbebf75 TimeSeries: insert null values at each missing interval (#49036) 2022-05-16 22:13:27 -05:00
Adela Almasan
14c2f4f3da Geomap: Legend threshold style update (#49020) 2022-05-16 19:54:10 -07:00
Artur Wierzbicki
7a05941ea0 Previews: improve logging, add time measurements to the crawler (#49043)
* #44449: log times taken for various things in previews service / crawler

* #44449: remove stale log
2022-05-16 18:09:46 -07:00
Alexander Emelin
baa50c58d0 Search: use only bluge-based search (#48968) 2022-05-16 16:22:45 -07:00
Ryan McKinley
68757cfa73 Search: a few minor improvements (#48989) 2022-05-17 00:38:27 +02:00
Jeff Levin
2691872c7a remove validatedQueries feature toggle (#48381)
* remove validatedQueries feature toggle
2022-05-16 13:17:05 -08:00
Yuriy Tseretyan
952cb4fc0b Alerting: introduce AlertRuleGroupKey and use it in API handlers (#48945)
* create AlertGroupKey structure
* update PrometheusSrv.
  - extract creation of RuleGroup to a separate method. Use group key for grouping
* update RuleSrv 
 - update calculateChanges to use groupKey
 - authorize to use groupkey
2022-05-16 15:45:45 -04:00
Jesse Weaver
85af8ce2ec [Public Dashboards] Extract queries from dashboards (#48602) 2022-05-16 13:08:42 -06:00
Nathan Marrs
3fbda0f35b Canvas: Improve constraint selection ux (#48837) 2022-05-16 10:28:19 -07:00
Artur Wierzbicki
5c321599c8 Storage: enable SQL backend (#48095)
* #45498: add String util to ListResponse for better UX

* #45498: refactor db_filestorage FS API backend - use path_hash in DB schema

* #45498: enable DB backend fs api tests

* #45498: add comment

* #45498: enable Storage feature flag during integration tests

* remove fmt.println

* #45498: reduce sizes of hash columns

* separate conditions

* #45498: make it easy to ignore backends when running fs api integration tests

* #45498: quote `key` column name

* #45498: reduce path_hash size

* #45498: verify `/{orgId}/{storageName}/` prefix convention in integration tests

* #45498: add etag to the sql table

* #45498: add etag to the sql table

* remove feature flag check (storage isn't dev-mode only)

* add cacheControl and content disposition

* add comments

* add path_hash comment

* explicitly set `path` column collation in `file` table for postgres
2022-05-16 10:26:40 -07:00
Ryan McKinley
ff844f0599 DashboardAPI: convert internal ids to uids (#48990) 2022-05-16 09:59:02 -07:00
Connor Lindsey
ea1001f1f5 Tempo: Trim whitespace from trace id query (#49008) 2022-05-16 10:50:02 -06:00
Karl Persson
2dc45e3e72 AccessControl: Add enterprise only setting for rbac permission cache (#49006)
* Add enterprise only setting for RBAC permission cache

Co-authored-by: Jguer <joao.guerreiro@grafana.com>
2022-05-16 17:52:10 +02:00
kay delaney
e2e9616c87 Search: Reduce unnecessary child component re-rendering (#49013) 2022-05-16 16:36:34 +01:00
Torkel Ödegaard
a2ebdf2bc2 Revert "Transformation: Added variance and standard deviation (#48844)" (#48997)
This reverts commit 906484b809.
2022-05-16 17:21:23 +02:00
Scott Bock
3d922a4e67 AnnotationsApi: GET /api/annotations/:annotationId (#47739) 2022-05-16 17:16:36 +02:00
ying-jeanne
2d4065600c star sqlstore split (#45851)
* start for stars split

* some updates
2022-05-16 22:42:02 +08:00
matt abrams
522a31c479 Build: Change names to PascalCase to match (#48949) 2022-05-16 15:26:14 +02:00
Agnès Toulet
4bd97c8673 Drone: Trigger Enterprise PR checks for OSS PRs (#47176)
* Drone: add enterprise-init-downstream step

* fixes

* Add OSS_PULL_REQUEST env variable for downstream builds

* sign Drone config

* Update .drone.yml

* use test grabpl

* test without init step

* fix downstream branch

* unknown branch test

* use drone-downstream test image

* revert latest changes

* update Drone and add GH workflow

* fix PR number

* Run Enterprise PR check only on PRs targeting main or release branch

* update repository dispatch action

* remove test data

* update grabpl version
2022-05-16 14:28:37 +02:00
kay delaney
8b5f899912 Search: Adjust table structure (#48933)
* Search: Adjust table structure

* Always include tags column
2022-05-16 12:48:38 +01:00
Gábor Farkas
683c1c0f40 logs: use explicit frame-type-check (#48940) 2022-05-16 13:38:05 +02:00
Ieva
f256f625d8 AccessControl: Enable RBAC by default (#48813)
* Add RBAC section to settings

* Default to RBAC enabled settings to true

* Update tests to respect RBAC

Co-authored-by: Karl Persson <kalle.persson@grafana.com>
2022-05-16 12:45:41 +02:00
Erik Sundell
3106af9eec Cloudwatch: Set time zone offset in GMD request (#48772)
* set timezone offset in case feature is enabled

* add unit tests

* add unit tests

* remove unused import
2022-05-16 12:15:54 +02:00
Gilles De Mey
fa37c6c9d3 Alerting: Allow disabling override timings for notification policies (#48648) 2022-05-16 11:46:14 +02:00
Gilles De Mey
1a7ca3f0de Expressions: adds inline documentation for the Math expression (#48784) 2022-05-16 11:30:27 +02:00
Alexander Zobnin
483319f1cb ServiceAccounts: Fix org role picker update issue (#48958)
* ServiceAccounts: Fix org role picker update issue

* Do not use React.FC
2022-05-16 10:05:37 +02:00
Gábor Farkas
d73bd617f0 devenv: elastic: removed unsupported versions, first step (#48960) 2022-05-16 06:34:38 +00:00
Gábor Farkas
f866165445 loki: backend: add error-prop if loki parse error happened (#48860) 2022-05-16 08:29:46 +02:00
Gábor Farkas
8b9419222a loki: backend-mode: fix experimental stream-mode (#48936) 2022-05-16 08:28:41 +02:00
Leon Sorokin
c1b56e79ef HeatmapNG: Sparse renderer (#48993)
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2022-05-15 21:03:50 -07:00
Björn Rabenstein
97759c75f4 Prometheus: add support for new _experimental_ sparse histograms/heatmaps (#47801)
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2022-05-16 02:47:18 +02:00
Anind Kiran
6f1f7cdc88 Update dashboard-header.md (#46986)
Just a tiny typo -> point 4, "homw" to "home"
2022-05-15 10:48:41 -04:00
Dan Roscigno
08268d8713 Add note to docs: log out / in after plugin add. (#47666) 2022-05-15 10:47:50 -04:00
Todd Treece
87e8521591 Prometheus: Implement Streaming JSON Parser (#48477)
use `prometheusStreamingJSONParser` feature toggle to enable
2022-05-13 20:28:54 +02:00
Yuriy Tseretyan
e528f2e430 Alerting: Use UID scope for folders authorization (#48970) 2022-05-13 18:05:25 +02:00
Yuriy Tseretyan
00ef1acb93 Alerting: Create folder for alerting when start from the scratch (#48866)
* create folderHelper struct
2022-05-13 11:49:04 -04:00
Alexander Zobnin
4cd1a113ef Access control: Fix listing data sources for org admins (#48961)
* Access control: Fix listing data sources for org admins

* Access control: always list non-core plugins for org admins
2022-05-13 14:07:08 +02:00
Maria Alexandra
75760e90b4 Search(Playground): Sync data when Move and Delete Dashboards (#48944)
Co-authored-by: kay delaney <45561153+kaydelaney@users.noreply.github.com>
2022-05-13 13:42:47 +02:00
kay delaney
90b7a76328 Dashboards: Remove "delete dashboard" button for new dashboards (#48947) 2022-05-13 11:40:04 +01:00
Karl Persson
60bc3e4e5c AccessControl: Let users with data source create permissions list non-core plugins (#48897)
* Only require create and permissions for new data source page

* Let users with permissions to create data sources list non-core plugins

* Keep the admin check as fallback when using rbac as well
2022-05-13 10:30:26 +02:00
Eric Leijonmarck
555867135b Access control: Using RBAC to filter users in list view that you have read access to (#47963)
* Add SQL filter for global user search

* Remove scope requirements from endpoints

Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com>
Co-authored-by: Ieva <ieva.vasiljeva@grafana.com>
Co-authored-by: Karl Persson <kalle.persson@grafana.com>
2022-05-13 09:26:34 +02:00
tomxwang
a51c2774b8 convert UsersActionBar tests to RTL (#48737) 2022-05-12 13:16:22 -07:00
Chrysa Dikonimaki
ab91af202c Convert packages/grafana-ui/src/components/Logs/LogMessageAnsi.test.tsx to RTL (#48918)
* convert LogLabels tests toRTL

* convert LogMessageAnsi tests to RTL

* convert LogMessageAnsi to RTL fix

* remove comment from LogMessageAnsi tests
2022-05-12 13:11:35 -07:00
Karl Persson
1c679e814b AccessControl: Only return action and scope for user permissions and make them unique (#48939)
* Only return action and scope for user permissions and make them unique
2022-05-12 17:15:18 +02:00
Todd Treece
6cbaa18cf6 Prometheus: Add golden JSON tests (#48941) 2022-05-12 17:09:58 +02:00
Yuriy Tseretyan
186ba26b59 Alerting: refactor rule API to create rule group in a single place (#48915)
* extract method toGettableRuleGroupConfig
2022-05-12 10:42:31 -04:00
Andres Martinez Gotor
6c9cf4843f AzureMonitor: Style improvements to ResourcePicker (#48875)
Co-authored-by: Kevin Yu <kevinwcyu@users.noreply.github.com>
Co-authored-by: Isabella Siu <isabella.siu@grafana.com>
Co-authored-by: Sarah Zinger <sarah.zinger@grafana.com>
2022-05-12 16:32:29 +02:00
Yuriy Tseretyan
369fcc5e9a Alerting: scheduler to use short version of model for alert rule (#48916)
* scheduler to use a short version of alert rule model
2022-05-12 09:55:05 -04:00
kay delaney
c8a0e52a59 Search: Improve tab navigation (#48932) 2022-05-12 12:41:20 +01:00
Karl Persson
58fa119270 sort user permissions by scope (#48928) 2022-05-12 11:46:56 +02:00
Todd Treece
e1a9ce4cc4 Prometheus: Move existing query logic to new buffered package (#48668) 2022-05-12 05:34:09 -04:00
Gábor Farkas
44e7602ad2 loki: backend-mode: add "limit" dataframe meta attribute (#48894) 2022-05-12 06:56:09 +00:00
Adam Simpson
a1217ef8da AzureMonitor: begin moving metrics query editor to use @grafana/experimental (#48878)
* feat: migrate Azure Metrics Query Editor Field to experimental UI

* feat: ensure tests pass with experimental feature flag enabled

* feat: avoid duplicate unit tests for experimental MetricsQueryEditor
2022-05-12 02:54:43 +00:00
selvavm
906484b809 Transformation: Added variance and standard deviation (#48844)
* Transformation: Added variance and standard deviation for sample and population. Modified mean calculation approach

* Transformation: Removed existing mean calculation

* Transformation: Added testcases for variance and Standard deviation

* Update docs/sources/panels/calculation-types.md

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

Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com>
2022-05-11 17:16:41 -07:00
Ryan McKinley
3a32a73459 Search: use bluge index for frontend search (playground) (#48847) 2022-05-11 15:32:13 +00:00
Gabriel MABILLE
d31d300ce1 Accesscontrol: Rename scope permissions:delegate (#48898) 2022-05-11 17:22:43 +02:00
Connor Lindsey
233a96d818 Tracing: Add ability to write trace to metrics query (#48824)
* Tracing: Add ability to write trace to metrics query
2022-05-11 07:39:02 -07:00
Yuriy Tseretyan
99156b40bd Alerting: Move alertRuleRegistry to its own file (#48890)
* move alertRuleRegistry to its own file
* move tests to separate file
2022-05-11 10:04:50 -04:00
Yuriy Tseretyan
dc33e09b24 simplify getting a slice of keys (#48889) 2022-05-11 09:44:31 -04:00
Maria Alexandra
d5a881598f Search (Playground) Implement Delete and Move actions in New Search (#48863) 2022-05-11 14:02:05 +02:00
Gábor Farkas
270e38cfcf loki: backend-mode: handle derived fields (#48873) 2022-05-11 09:29:04 +02:00
Joan López de la Franca Beltran
6c4eae710f Encryption: Split database transactions within migration/rollback commands (#48394) 2022-05-11 02:22:14 +02:00
Chrysa Dikonimaki
7e5ea3f5a0 convert LogLabels tests toRTL (#48887) 2022-05-10 15:53:14 -07:00
Andreas Christou
2bd9e9aca5 AzureMonitor: Add support for selecting multiple options when using the equals and not equals dimension filters (#48650)
* Add support for multiselect

- Add filters param to Dimensions
- Update existing tests
- Add MultiSelect component
- Add helper function to determine valid options
- Update labels hook to account for custom values
- Update go type
- Add function to build valid filters string

* Additional go tests

- Ensure query targets are built correctly

* Update DimensionFields frontend test

- Corrently rerender components
- Additional test for multiple labels selection
- Better selection of options in react-select components

* Fix lint issue

* Reset filters when operator or dimension changes

* Terminology

* Update test

* Add backend migration

- Update types (deprecate Filter field)
- Add migration logic
- Update tests
- Update dimension filters buliding

* Add migration test code

* Simplify some logic

* Add frontend deprecation notice

* Add frontend migration logic and migration tests

* Update setting of filter values

* Update DimensionFields test

* Fix linting issues

* PR comment updates

- Remove unnecessary if/else condition
- Don't set filter default value as queries should be migrated
- Add comment explaining why sw operator only accepts one value
- Remove unnecessary test for merging of old and new filters

* Nit on terminology

Co-authored-by: Andres Martinez Gotor <andres.martinez@grafana.com>

* Rename migrations for clarity

Co-authored-by: Andres Martinez Gotor <andres.martinez@grafana.com>
2022-05-10 15:05:48 +01:00
Karl Persson
61772a66b6 AccessControl: Create own interface and impl for each permission service (#48871)
* Create own interfaces for team, folder, dashboard and data source permissions services
* Remove service container and inject them individually
2022-05-10 15:48:47 +02:00
Serge Zaitsev
31ff23f542 Fix: add default nop trace exporter to opentelemetry (#48869) 2022-05-10 11:29:36 +02:00
George Robinson
897db011eb Add error options for rendering to return errors on failure (#48864) 2022-05-09 19:11:24 +01:00
Gábor Farkas
7b9929fffe loki: framing_test: more infinity/nan test cases (#48855) 2022-05-09 11:47:50 +00:00
Andres Martinez Gotor
b1bde7667f CloudMonitoring: Allow to set a custom value or disable graph_period (#48646) 2022-05-09 13:43:10 +02:00
Ieva
6923b4c6c6 Dashboard: Fix dashboard update permission check (#48746)
* Change dash permission check for dashboards that are moved to a different folder
2022-05-09 12:01:03 +02:00
Joe Blubaugh
53a4f3913c Alerting: Apply Custom Headers to datasource queries. (#47860)
Unlike dashboard queries, alerting queries were not correctly applying
custom headers to datasource queries. This change mimics the dashboard
query code to apply custom headers.

Fixes #44460

Signed-off-by: Joe Blubaugh <joe.blubaugh@grafana.com>
2022-05-09 08:13:47 +00:00
Ryan McKinley
d6d358ef26 Search: create bluge based index (#48606) 2022-05-09 01:00:09 -07:00
Shirley
5c2dee19d5 CloudWatch: Refactor tests, remove unused parameters (#48815) 2022-05-08 09:27:03 +02:00
Alexander Weaver
99eaa0fc20 Put identifier in path (#48831) 2022-05-06 16:06:30 -05:00
Alexander Weaver
809aa38103 POST routes to PUT routes (#48828) 2022-05-06 14:33:30 -05:00
Sofia Papagiannaki
bb66c03f9a Alerting: modify prometheus endpoints for proxying using the datasource UID (#48052)
* Modify prometheus endpoints to expect the data source UID

* Update frontend
2022-05-06 15:05:02 -04:00
Jean-Philippe Quéméner
30d9cc81ec Alerting: check provenance of alert rules in current API (#48694) 2022-05-06 20:55:27 +02:00
JitaC
e16dc72c94 Docs:Cleanup alerting docs (#48826)
* Remove What's new reference.

* Moved messaging templates to under contact points. fixed broken relrefs.

* Fixed some more reflrefs

* Fixed a few more broken relrefs and adjusted weight
2022-05-06 13:52:30 -04:00
Emil Tullstedt
51ff2b8c58 Logging: Unify logging fakes (#48822) 2022-05-06 17:44:22 +02:00
Yuriy Tseretyan
3ffe447c80 Add new features to DiffReport and Diff (#48788)
* simplify String for Diff
* add IsAddOperation and IsDeleteOperation to Diff
* add method Paths to DiffReport
2022-05-06 11:06:00 -04:00
Gábor Farkas
66a0916d00 Transformers: mark extract-fields transform as stable (#48810) 2022-05-06 07:21:59 -07:00
Ryan McKinley
42098a7a27 Heatmap (new): exemplars tooltip stub (#48795) 2022-05-06 07:21:14 -07:00
Gilles De Mey
2d6ab03e4f Alerting: automatically select last expression (#48787) 2022-05-06 15:39:24 +02:00
Adam Gabryś
4fbd974471 Doc: correct grammar in labels description (#47300)
Co-authored-by: Adam Gabryś <adam.gabrys@sap.com>
2022-05-06 09:20:42 -04:00
Alex Khomenko
529fddf502 DashboardPickerByID: add optionLabel prop (#47556)
* DashboardPicker: add optionLabel prop

* DashboardPicker: fix label prop

* Update picker type
2022-05-06 11:08:13 +00:00
Alex Khomenko
25b4aa8d86 RolePicker: Fix menu position on smaller screens (#48429)
* RolePicker: Fix menu position on smaller screens

* RolePicker: Add comment

* Add offset for the bottom position
2022-05-06 13:05:58 +02:00
Krzysztof Dąbrowski
5be23b40b6 LDAP: allow Grafana Admin mapping without org_role field (#37189) 2022-05-06 12:12:42 +02:00
Piotr Jamróz
101ae4b828 Chore: Generate missing theme JSON (#48802) 2022-05-06 12:05:40 +02:00
renovate[bot]
4b5d295c8c Update typescript-eslint monorepo to v5.22.0 (#46998)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-05-06 10:01:44 +01:00
Will Browne
f135a5c8a4 Plugins: Refactor plugin resource call with and without data source (#48754)
* refactor plugin resource call with/without ds

* check err

* fix imports

* only validate req on ds path

* Update warn log

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

Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
2022-05-06 10:58:02 +02:00
Gábor Farkas
c4edab884e logs: simpler nanoscecond timestamp handling (#48773) 2022-05-06 10:55:12 +02:00
Szymon Szypulski
b6c5f29373 Cloudwatch: Add support for new AWS/RDS EBS* metrics (#48798)
Add support for the missing AWS/RDS metrics, EBSIOBalance% and
EBSByteBalance%. Change is based on the official AWS blog post[1]. Those
metrics work on for Nitro instances.

1. https://aws.amazon.com/blogs/compute/improving-application-performance-and-reducing-costs-with-amazon-ebs-optimized-instance-burst-capability/
2022-05-06 10:38:15 +02:00
Ieva
3c78196d0b fix a bug (#48782) 2022-05-06 09:36:11 +01:00
Karl Persson
817cf52744 Access control: Allow users with permission to update team, dashboard and folder permissions to list users in OSS (#48275)
* Remove banner when missing permissions to list users

* For OSS allow users to list other users if they have permissions to
write either team, dashboard or folder permissions
2022-05-06 10:31:53 +02:00
Joan López de la Franca Beltran
9826a694a8 Encryption: Add Prometheus metrics (#48603) 2022-05-06 10:21:55 +02:00
Ryan McKinley
0e1dffc655 Search: manage selection in state (#48793) 2022-05-06 10:16:12 +02:00
Ashley Harrison
bcb0bfce3a Navigation: Add create icons to expanded menu (#48768)
* add create icons to expanded menu

* update translations
2022-05-06 09:14:00 +01:00
Konrad Lalik
ee8e125134 Alerting: Fix notification route removal (#48774)
* Fix notification route removal

* fix tests

Co-authored-by: gillesdemey <gilles.de.mey@gmail.com>
2022-05-06 09:34:10 +02:00
Stephanie Closson
454e804657 Heatmap (new): add exemplar mapping function (#48780) 2022-05-05 15:27:28 -07:00
Connor Lindsey
c1b5ea3e54 Tracing: Add trace to metrics config behind feature toggle (#46298)
* Add trace to metrics behind feature flag
2022-05-05 14:46:18 -06:00
Nathan Marrs
34fefa1d47 Fix to geomap editor crash (#48786) 2022-05-05 13:28:03 -07:00
Alexander Weaver
0f56462fbe Alerting: Provisioning message templates (#48665)
* Generate API for writing templates

* Persist templates app logic layer

* Validate templates

* Extract logic, make set and delete methods

* Drop post route for templates

* Fix response details, wire up remainder of API

* Authorize routes

* Mirror some existing tests on new APIs

* Generate mock for prov store

* Wire up prov store mock, add tests using it

* Cover cases for both storage paths

* Add happy path tests and fix bugs if file contains no template section

* Normalize template content with define statement

* Tests for deletion

* Fix linter error

* Move provenance field to DTO

* empty commit

* ID to name

* Fix in auth too
2022-05-05 15:21:42 -05:00
Leon Sorokin
6de77283c6 Prometheus: make parsing of Infinity variants case-insensitive (#48660) 2022-05-05 12:38:26 -05:00
Josh Hunt
1a633812a7 DashboardSettings: Update active tab to use new brand gradient (#48755)
* DashboardSettings: Update active tab to use new brand gradient

* Remove colons from gradients
2022-05-05 17:10:06 +01:00
Ashley Harrison
10db618204 FileUpload: associate the label with the input (#48766)
* FileUpload: associate the label with the input

* generate a unique id and set the correct role

* add a test to prevent regressions
2022-05-05 17:07:27 +01:00
sam boyer
ea96c42545 schemas: Update to cuetsy v0.0.1 (#48753)
* Add explicit cuetsy annotations to all models.cue

* Update to first cuetsy release

* Clean up cuetsify a bit; remove unification

* Update changes to news codegen output
2022-05-05 11:56:53 -04:00
Ieva
a5672758d8 Access control: further reduce access control feature toggle checks (#48171)
* reduce the usage of access control flag further by removing it from SQL store methods

* fixing tests

* fix another test

* linting

* remove AC feature toggle use from API keys

* remove unneeded function
2022-05-05 17:31:14 +02:00
Torkel Ödegaard
fca52a1c83 CommandPalette: Make dashboard nav work when under grafana is under sub path (#48744) 2022-05-05 17:15:59 +02:00
Todd Treece
ec666f8785 Converter: Add result type to frame meta (#48769) 2022-05-05 16:57:24 +02:00
Ivana Huckova
250b72cc1b Elasticsearch: Remove support for versions after their end of the life (<7.10.0) (#48715)
* Elasticsearch: Remove support for versions after their EOL

* Update docs

* Remove old versions from config

* Update pkg/tsdb/elasticsearch/elasticsearch.go

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

* Fix tests

* Fix typecheck errors

Co-authored-by: Gábor Farkas <gabor.farkas@gmail.com>
2022-05-05 16:16:34 +02:00
Josh Hunt
b04fb8522d QueryEditor: Set data source type in mixed query data source ref (#48734) 2022-05-05 15:09:00 +01:00
L-M-K-B
a98fae32fc Laura/chore/refactor test of secondary actions (#48745)
* Chore: transfer three tests to testing-library

* Chore: transfer last test to testing-library

* chore: add suggestion from code review

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

Co-authored-by: Piotr Jamróz <pm.jamroz@gmail.com>
2022-05-05 15:55:59 +02:00
Josh Hunt
32a26d87a4 Chore: Generate JSON theme files (#48762) 2022-05-05 15:35:08 +02:00
Josh Hunt
af57804513 Tooltip: Make tooltip use secondary background color for legible links (#48748) 2022-05-05 14:28:45 +01:00
Connor Lindsey
08bee1e682 Trace to logs: Only show loki and splunk datasources in settings (#48723) 2022-05-05 06:28:28 -06:00
Shirley
b35ca8c08d CloudWatch: Pass label in GetMetricData API request when dynamic label feature toggle is enabled (#48574) 2022-05-05 13:59:23 +02:00
Sofia Papagiannaki
610247d52a Alerting: modify ruler endpoints for proxying using the datasource UID (#48046)
* Modify ruler endpoints to expect the data source UID

* Update frontend

* Apply suggestion from code review
2022-05-05 14:58:32 +03:00
Konrad Lalik
65d7d466d7 Alerting: Improved RBAC for Alert managers (#48344)
* Initial support for grafana or cloud only alert managers

* Handle missing alert manager

* Refactor code, fix tests

* Fix redirect url

* Bring back the test

* Improve missing alert manager warning, add useAlertManagerSourceName tests

* Fix lint errors

* Rename alert manager hook

* Refactor alert manager label creation

* Improve warnings' messages

* Fix linter

* Fix warning condition in RuleEditor
2022-05-05 13:34:58 +02:00
Dimitris Sotirakis
696405ba7b Remove folder (#48617) 2022-05-05 12:19:35 +01:00
Gábor Farkas
da74dba7c8 Loki: backend: use streaming JSON parser, try2 (#48752)
* converter: remove __name__ customization because Loki does not do that

Loki does not handle __name__ in a special way.
for Prometheus, the caller can implement the formatting
by themselves

* converter: change labels-formatting

the labels.String() method does not handle strange values well

* loki: backend: use streaming-json parser

* more idiomatic code

Co-authored-by: Todd Treece <360020+toddtreece@users.noreply.github.com>

* simpler row-length check

* simpler code

* fixed converter/prom tests

Co-authored-by: Todd Treece <360020+toddtreece@users.noreply.github.com>
2022-05-05 13:09:01 +02:00
Jguer
8ed3fb1f2d AccessControl: don't pull builtin role assignments when refactor is enabled (#48675) 2022-05-05 13:02:34 +02:00
Gábor Farkas
02aa1cd1c5 loki backend mode forward-oauth (#48401)
* loki: backend: add forward oauth credentials functionality

* removed obsolete comment
2022-05-05 12:42:50 +02:00
Alex Khomenko
9b8cdab123 TagsInput: Do not trigger submit on Enter (#48743)
* TagsInput: Do not trigger submit on Enter

* Comment
2022-05-05 12:37:04 +02:00
Gábor Farkas
3cade2f669 Revert "Loki: backend: use streaming JSON parser (#47656)" (#48747)
This reverts commit 46b40b6e82.
2022-05-05 12:02:53 +02:00
Marcus Efraimsson
7e332d6f97 Chore: Add PR Check action enforcing changelog decision (#48728) 2022-05-05 11:38:46 +02:00
Giordano Ricci
143810bb95 Explore: simplify support for multiple query editors (#48701)
* Explore: simplify support for multiple query editors

* CloudWatch: remove usage of deprecated plugin methods

* Apply suggestions from code review

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

* Update docs/sources/developers/plugins/add-support-for-explore-queries.md

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

* Update docs/sources/developers/plugins/add-support-for-explore-queries.md

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

* run prettier

Co-authored-by: JitaC <70489351+achatterjee-grafana@users.noreply.github.com>
2022-05-05 10:36:50 +01:00
Josh Hunt
1cd9175075 PanelEdit: Add gap between variables, like in Dashboard view (#48718) 2022-05-05 09:42:39 +01:00
idafurjes
abb1618291 Add OTLP exporter for OpenTelemetry (#47987)
* Add OTLP exporter for OpenTelemtry

* Fix lint

* Refactore parse settings

* Add configuration for propagation + fix tests

* Fix tests and lint

* Fix alerting tests

* Add coments to config

* Add propagation to custom.ini
2022-05-05 10:37:26 +02:00
Javier López
3372cb7897 make @grafana/ui run properly in SSR environments (#46288)
* allow SSR

* fix rollup commonjs default flag changed breaking in SSR

* revert wrong change

* avoid using dynamic imports

* fix test

* allow icon load in packaged version

* fix SelectBase to run on SSR

* add extra check for fixing tests

* revert wrong change

* allow SSR

* revert wrong change

* don't include emotion in the bundle

* fix wrong merge changes

* remove unneeded icon change

* use forked version of uplot

* remove unneeded bundle exceptions

* fix typescript issues

* update to latest uplot
2022-05-05 10:06:21 +02:00
ying-jeanne
0d14c27eb9 Chore: add Folderuid into panel-library API (#48577)
* add folderuid into interface

* panellibrary id/uid things

* modify doc

* update doc

* correct some comments
2022-05-05 10:04:54 +02:00
Gábor Farkas
60cabaea0a loki: use metadataRequest in testDatasource (#48431) 2022-05-05 09:43:36 +02:00
Gábor Farkas
46b40b6e82 Loki: backend: use streaming JSON parser (#47656)
* converter: remove __name__ customization because Loki does not do that

Loki does not handle __name__ in a special way.
for Prometheus, the caller can implement the formatting
by themselves

* converter: change labels-formatting

the labels.String() method does not handle strange values well

* loki: backend: use streaming-json parser

* more idiomatic code

Co-authored-by: Todd Treece <360020+toddtreece@users.noreply.github.com>

* simpler row-length check

* simpler code

Co-authored-by: Todd Treece <360020+toddtreece@users.noreply.github.com>
2022-05-05 08:47:40 +02:00
L-M-K-B
83a5ca95c7 Chore: transfer LiveLogs.test to testing-library (#48678)
* Chore: transfer LiveLogs.test to testing-library

* Chore: improve readability and third test

* Chore: improve test and component after code review
2022-05-05 08:40:21 +02:00
Todd Treece
9529c35efa Converter: Add support for parsing prometheus string (#48727) 2022-05-04 20:26:32 -04:00
Ryan McKinley
2d574f352c Search: add actions row header to new search layout (#48735) 2022-05-05 01:25:27 +02:00
Todd Treece
35300a816a Prometheus: Add support for streaming scalar parsing (#48725) 2022-05-04 16:03:48 -04:00
Adela Almasan
5df91bdcf1 Canvas: Inline edit (#48222)
Canvas inline edit panel

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2022-05-04 14:15:07 -05:00
Todd Treece
6e6f6e3cce Converter: Add support for parsing error & warning from prometheus results (#48721) 2022-05-04 12:01:18 -07:00
Josiah (Jay) Goodson
570ff074f6 Transformations: Add an All Unique Values Reducer (#48653) 2022-05-04 11:58:46 -07:00
Jeff Levin
dac8abfc2c chore: update contribution docs (#46942)
* add bus deprecation note in contribution docs
2022-05-04 10:38:04 -08:00
Maria Alexandra
6e530d45bc grafana/ui: Add default type="button" to <Button> (#48183) 2022-05-04 18:36:14 +02:00
Josh Hunt
2f1d404949 Switch PanelEditor to v2 theme (#48717) 2022-05-04 16:55:49 +01:00
Adela Almasan
efe09d6a8b Geomap: Legend and scale overlapping (#47594)
Updated legend bottom left custom style when scale is shown
2022-05-04 10:14:19 -05:00
gotjosh
7313310080 Alerting: Fix & Cut the changelog (#48714) 2022-05-04 16:05:48 +01:00
renovate[bot]
3da6878f58 Update dependency @react-types/shared to v3.12.0 (#48708)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-05-04 15:25:53 +01:00
JitaC
5bc91187f1 Hide what's new topic (#48704) 2022-05-04 10:16:00 -04:00
Ashley Harrison
06d3c27bc1 Select: Portal menu by default (#48176)
* Remove menuShouldPortal from all <Select /> components

* fix unit tests

* leave menuShouldPortal as an escape hatch

* Fix import order
2022-05-04 15:12:59 +01:00
Karl Persson
2738d1c557 Access Control: Move dashboard actions and create scope provider (#48618)
* Move dashboard actions and create scope provider
2022-05-04 16:12:09 +02:00
renovate[bot]
00dbea91ea Update dependency lru-cache to v7.9.0 (#47480)
* Update dependency lru-cache to v7.9.0

* update snapshot

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2022-05-04 15:07:27 +01:00
Adam Simpson
b2644de6c8 AzureMonitor: add feature toggle azureMonitorExperimentalUI for migrating to experimental UI (#48658)
* feat: add feature toggle azureMonitorExperimentalUI

Add QueryHeader which adds an experimental header to AzureMonitor. This work is documented in #44432.
2022-05-04 13:54:09 +00:00
Yuriy Tseretyan
f85e758972 unhide alert rule's data sources during migraiton (#48559) 2022-05-04 09:31:05 -04:00
renovate[bot]
7b4bc3eda6 Update dependency @react-aria/utils to v3.12.0 (#48674)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-05-04 14:28:06 +01:00
Joao Silva
2e5f797666 Variables: Fixes issue with null variables breaking the dropdown (#48644) 2022-05-04 14:27:22 +01:00
Ashley Harrison
8fcae1ef3c Navigation: change Search Dashboards back to sentence case (Search dashboards) (#48272)
* revert search dashboards to sentence case

* Saved Items -> Saved items
2022-05-04 14:24:10 +01:00
Josh Hunt
51c3d9d664 I18n: Developer documentation (#48415)
* Docs: Add developer documentation for localisation

* touch up docs

* more assertive

* add example for variable names

* Add naming conventions

* Rewrite 'what lingui does' section
2022-05-04 13:46:04 +01:00
achatterjee-grafana
082cfbdb06 Docs: Refactor alerting documentation (part 1) (#48664)
* Initial commit

* Moved files, ad fixed broken relrefs.

* Fixed other broken relrefs

* More changes.

* Fixing broken relrefs

* More changes.

* Fixed last of the broken links

* More re-org.

* Added aliases and some weight adjustments

* More aliases.

* Fix fundamentals topic.

* Fixed remaining metadata issues

* Ran prettier
2022-05-04 08:22:11 -04:00
Alexander Kubyshkin
f00ffb190c Escape backslashes in regexps in Loki label browser (#45809, #47039). (#47412)
* Escape backslashes in regexps in Loki label browser (#45809, #47039).

* Escape values in Loki Query Builder.

* Escape more values in Loki Query Builder.
2022-05-04 12:49:04 +02:00
Gábor Farkas
b0f41b9772 update latest.json to 8.5.2 (#48690) 2022-05-04 12:10:54 +02:00
Torkel Ödegaard
b71aa912c6 TimeRange: Fixes updating time range from url and browser history (#48657) 2022-05-04 11:36:15 +02:00
Grot (@grafanabot)
f45dc224d9 ReleaseNotes: Updated changelog and release notes for 8.5.2 (#48681) 2022-05-04 11:35:22 +02:00
Gilles De Mey
e04d8fca7b Alerting: correctly show all alerts in a folder (#48684) 2022-05-04 11:35:08 +02:00
kay delaney
bb7e556efc Templating: Prefix variable picker element IDs (#48405) 2022-05-04 11:04:15 +02:00
Zoltán Bedi
b420179be4 GraphNG: Fix thresholds by color not following data update (#48571)
* GraphNG: Fix thresholds by  color not following data update

* Refactor dynamicSeriesColor to time series

* avoid exposing frames on builder
rely on seriesIdx & cached alignedFrame to grab field
handle dynamic fill recoloring
only recolor when not in a special gradient mode

* bail when opacity = 0

Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
2022-05-04 10:41:03 +02:00
kay delaney
713e624790 DashboardModel: Tidy up some of the older code (#48355) 2022-05-04 09:39:41 +01:00
Krzysztof Dąbrowski
c41397a6e7 LDAP: validate organization role during parsing (#37188)
* LDAP: validate organization role during parsing

* Trigger a new build

* Check if grafana_admin is present
2022-05-04 09:35:10 +02:00
renovate[bot]
18f089d1bd Update dependency @babel/preset-env to v7.17.10 (#48638)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-05-04 09:32:18 +02:00
Nathan Marrs
ff38f24044 Canvas: Refactor group to frame (#48671) 2022-05-03 22:58:00 -07:00
Erik Sundell
0d60b1ce0a CloudWatch: Display dynamic label field in case feature is enabled (#48614)
* move metrics editor related files to a separate folder

* cleanup

* add tests

* remove snapshot test

* nit

* remove unsued import

* remove snapshot
2022-05-04 07:36:18 +02:00
Nathan Marrs
66d7105b34 Canvas: Group constraint support (#48563) 2022-05-03 19:51:01 -07:00
Jeff Levin
38fc0c68e4 Update documentation to explicitly state we should not be putting migrations behind feature flags (#48663) 2022-05-03 15:10:59 -08:00
Jeff Levin
b88644cb83 public dashboards: add public dashboard table (#48470)
* add public dashboard table migration
2022-05-03 15:08:40 -08:00
Adela Almasan
0b5ffcfcf0 Geomap: Legend style update (#48641)
Legend style update
2022-05-03 15:03:41 -05:00
Joey Tawadrous
09634b518c Traces Panel: Add new Traces Panel visualization (#47534)
* Panel

* Support tempo dash variables

* Support tempo explore variables

* Only show span links for explore

* Cleanup

* Added tests

* apply variables to search

* Tests for search variables

* Handling no data

* Interpolation and tests

* TracesPanel tests

* More tests

* Fix for backend test

* Manager integration test fix

* Traces doc and updated visualizations index doc

* Logs for this span

* Search, scrollToTop, other improvements

* Refactor to extract common code

* Removed TopOfViewRefType optional

* Remove topOfViewRef optional

* Removed another optional and fixed tests

* Test

* Only show search bar if trace

* Support traces panel in add to dashboard

* Self review

* Update betterer

* Linter fixes

* Updated traces doc

* Ahh, moved the for more info too

* Updated betterer.results

* Added new icon

* Updated expectedListResp.json
2022-05-03 17:42:36 +01:00
renovate[bot]
46e53cf42c Update dependency @rollup/plugin-node-resolve to v13.3.0 (#48645)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-05-03 17:17:55 +01:00
Will Browne
4ecd57f49c Plugins: Introduce HTTP 207 Multi Status response to api/ds/query (#48550)
* feature toggles

* return HTTP 207 from ds/query

* add ft check

* add API test

* add 207 check for qr

* change to OR

* revert check

* add explicit toggle check for cloudwatch

* remove unused import

* remove from defaults.ini

* add status codes to md and update swagger

* new fangled http api tests pattern

* update swagger

* Update docs/sources/http_api/data_source.md

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

* add missing word and reformat

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
2022-05-03 18:02:20 +02:00
Ryan McKinley
88eeb878a4 API: add stars HTTP endpoint (#48612)
Co-authored-by: Ying WANG <ying.wang@grafana.com>
2022-05-03 08:52:19 -07:00
Ashley Harrison
b231cbcf86 Fix lockfile... (#48643) 2022-05-03 15:57:24 +01:00
Josh Hunt
5dabb55b39 Navigation: Enable new navigation by default (#48447) 2022-05-03 16:28:40 +02:00
renovate[bot]
e1a15bab21 Update dependency @microsoft/api-extractor-model to v7.17.2 (#47917)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-05-03 15:21:21 +01:00
renovate[bot]
48964efdf6 Update dependency sass to v1.51.0 (#47453)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-05-03 15:20:46 +01:00
renovate[bot]
070d18c1c3 Update dependency @microsoft/api-extractor to v7.23.0 (#47090)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-05-03 15:20:21 +01:00
Ivana Huckova
769be876a5 Loki, Prometheus: Remember preferred editor (#48580)
* Loki: Remember default editor

* Loki: Add tests

* Prometheus: Set default editor type

* Fix and refactor tests

* Remove unused import
2022-05-03 14:50:13 +02:00
Ivana Huckova
4661c9ca47 Query history: Cleanup (#48303)
* Query history: Clean up stale history after 14 days

* Add unstarring sleanup

* Add wraapping

* Update sql for mysql database

* Update

* Remove fmt.Print

* Refactor and simplify solution

* Update pkg/services/queryhistory/database.go

Co-authored-by: Emil Tullstedt <emil.tullstedt@grafana.com>

* Adjust SQL to limit number of deleted queries

* Add limit enforcmenet to cleanup

* Change limit

* Update

Co-authored-by: Emil Tullstedt <emil.tullstedt@grafana.com>
2022-05-03 14:49:58 +02:00
Ivana Huckova
cd462c5b21 Loki: add documentation for query builder (#48523) 2022-05-03 14:49:34 +02:00
Shirley
27821e0bc1 CloudWatch: Migrate alias to dynamic labels (#48555) 2022-05-03 13:41:51 +01:00
jcolladokuri
3ee99821bc AzureMonitor: Updates allowed namespaces (#48468) 2022-05-03 14:41:05 +02:00
Ashley Harrison
806ea058ed Chore: convert Slider tests to RTL (#48262)
* convert Slider tests to RTL

* slight update

* don't need to check they're in the document

* Update packages/grafana-ui/src/components/Slider/Slider.test.tsx

Co-authored-by: Levente Balogh <balogh.levente.hu@gmail.com>

* check below minimum value as well

Co-authored-by: Levente Balogh <balogh.levente.hu@gmail.com>
2022-05-03 13:33:30 +01:00
Andreas Christou
7f4b1b767e Add new DynamoDB metrics & dimensions (#48551) 2022-05-03 13:32:09 +01:00
Jguer
6a303bb6b8 AccessControl: Rename builtin role roles to basic roles (#48519)
* AccessControl: Rename grafana:builtins roles to basic

* AccessControl: rename macro references to basic

Co-authored-by: gamab <gabi.mabs@gmail.com>
2022-05-03 13:59:16 +02:00
Dimitris Sotirakis
20f62e1841 CI: Split main tests pipeline (#48628)
* Split tests pipeline

* Rename dependencies
2022-05-03 13:54:47 +02:00
Erik Sundell
929d3134d1 Cloudwatch: Dynamic labels frontend migration (#48579)
* migrate metric queries

* restructure migrations

* self review

* cleanup tests

* ensure alias is not changed

* apply pr feedback
2022-05-03 13:52:17 +02:00
Kristina
bc58e2edab Fix command palette casing (#48590) 2022-05-03 06:25:47 -05:00
Leon Sorokin
a927608cf5 Chore: uPlot 1.6.20 (#48596) 2022-05-03 05:22:14 -06:00
Andreas Gerstmayr
21034e31de chore: remove executable permissions of source files and docs (#46303) 2022-05-03 12:08:14 +02:00
Gilles De Mey
2d9d12380c Alerting: updated alerting creation order (#48548) 2022-05-03 11:27:34 +02:00
Ashley Harrison
d774deab99 convert test to RTL (#48291) 2022-05-03 08:45:50 +01:00
Karl Persson
7acf5bd7e8 Docs: Add api keys roles, actions and scopes documentation (#48448)
* Document fixed roles for api keys writer and reader

* Document permissions for api keys

* Fix annotation Actions

Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com>
2022-05-03 09:34:08 +02:00
Gábor Farkas
7d369a1dea Loki: backend: use json-field (#48486)
* fixed strings

* loki: backend: use json-field
2022-05-03 08:03:25 +02:00
Sarah Zinger
a8354a0319 Azure Monitor: add search feature to resource picker. (#48234)
Co-authored-by: Andres Martinez Gotor <andres.mgotor@gmail.com>
2022-05-03 03:57:56 +02:00
Guilherme Caulada
2e9c38c951 Secrets: Add unified secrets table to reencryption (#48582)
* Add secrets table to reencryption

* Add updated column check for b64Secret reencryption

* Use field values for b64Secret to clarify booleans
2022-05-02 18:15:46 -03:00
achatterjee-grafana
815fc42da3 add alias to fix 404 error (#48599) 2022-05-02 15:58:35 -04:00
Isabella Siu
66cbf2c422 CloudWatch: remove references to json in template variable docs (#48593)
* CloudWatch: remove references to json in docs

* docs comments
2022-05-02 15:21:53 -04:00
Artur Wierzbicki
de75dd6aad Search: remove dev-mode from the feature flag 2022-05-02 23:01:29 +04:00
Adam Simpson
9db95826a4 Variables: allow Regex tooltip links to be clickable (#48560)
Fixes #48558
2022-05-02 17:44:23 +00:00
Brendan O'Handley
4867a6b15f Graphite Datasource: add responseType: 'text' to http options to return full list of functions (#47663)
* add response type text to graphite datasource http options to return full list of functions

* add comment for adding response type text to call to  graphite /functions endpoint

* Add tests for invalid and valid JSON mocking backendSrv fromFetch

* remove unnecessary code from tests

* remove extra logic for graphite /functions endpoint returning {} #46681

* add graphite functions list logic back in to see why alert test broke

* fix conflict message

* fix conflicts

* fix issues with rebase, add responseType text back in, remove extra graphite functions list logic checks

* add email for license/cla check
2022-05-02 13:05:31 -04:00
Ryan McKinley
a8f3b17262 SaveDashboard: remove feature flag for save drawer (#48462) 2022-05-02 09:29:22 -07:00
Ivana Huckova
da1d34e83d Elasticsearch: Add deprecation notice for < 7.10 versions (#48506)
* Elasticsearch: Add deprecation notice for old versions

* Add option to remove notice

* Remove deprecation from editor

* Update

* Update public/app/plugins/datasource/elasticsearch/configuration/ConfigEditor.tsx

* Simplify

* Update documentation

* Update

* Update docs/sources/datasources/elasticsearch.md

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

Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
2022-05-02 17:08:47 +02:00
Ivana Huckova
656cd4c8dd Logs: Fix pagination skipping entries (#48413)
* Logs: Add pagination range to prevent pagination from skipping entries

* Revert "Logs: Add pagination range to prevent pagination from skipping entries"

This reverts commit 2e7a6b3870.

* Refactor

* Update
2022-05-02 16:46:47 +02:00
Guilherme Caulada
2533f21015 DataSource: Fix secure json data reset on datasource update (#48557)
* Fix secure json data reset on datasource update

* Update fillWithSecureJSONData to use DecryptedValues

* Remove unecessary conversion

* Move fillWithSecureJsonData logic to datasource service

* Add sanity check for nil secure json data
2022-05-02 11:29:13 -03:00
Adam Simpson
c57924e332 A11y: Fix remaining focus issues with Switch (#48376)
* refactor: replace uses of checked prop for <Switch> with value prop

* fix: remove spaces from ids

The ID format is stated as follows([source][1]):

> ID and NAME tokens must begin with a letter ([A-Za-z]) and may be followed by any number of letters, digits ([0-9]),
hyphens ("-"), underscores ("_"), colons (":"), and periods (".").

Since `QueryHeaderSwitch` is used in two places I created a new variable that replaces spaces with a dash in the label.

[1]: https://www.w3.org/TR/html401/types.html#type-name

* fix: allow Switch in AlertingSettings to be focused by keyboard

* fix: allow Switch in PromSettings to be focused by keyboard

Fixes #46472

Co-authored-by: Elfo404 <me@giordanoricci.com>
2022-05-02 13:50:44 +00:00
Kristina
a98a872929 Command Palette - use same focus overlay as modals, override monaco keybinding for prometheus (#48391)
* Command Palette - use same focus overlay as modals, override whatever captures command K in monaco

* Pass the key event out of monaco
2022-05-02 08:22:33 -05:00
Ivana Huckova
f90622e0d0 Shortcuts: Add shortcut to show shortcuts to the list of shortcuts (#48395)
* Shortcuts: Add shortcut for shortcuts

* Update public/app/core/components/help/HelpModal.tsx

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

Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
2022-05-02 14:55:44 +02:00
Sergey Kostrukov
9047058c43 Auth Proxy: non-ASCII headers encoding tests (#47110) 2022-05-02 13:08:20 +02:00
Peter Holmberg
69ee917c89 SSE: Add constant for data source name (#48443)
* add property for expressions datasource name

* remove console log
2022-05-02 11:42:20 +02:00
ying-jeanne
bde368be55 Chore : Replace dashboardid with dashboardUID in annotation API (#48481)
* replace dashboardid with dashboardUID in annotation API

* add some tests

* modify some docs and add uid into get endpoint

* rebase with main

* add map for avoiding too much retrieve on dashboards
2022-05-02 11:35:36 +02:00
L-M-K-B
b8460051a6 Chore: transfer TimeSyncButton.test to testing-library (#48404) 2022-05-02 11:20:12 +02:00
Jean-Philippe Quéméner
0a87ef06af Alerting: add safeguard for migrations that might cause dataloss (#48526)
* Alerting: add safeguard for migrations that might cause dataloss

* add test for panic

* add documentation
2022-05-02 10:38:42 +02:00
Erik Sundell
a5c570a5f6 Cloudwatch: Refactor metrics query editor (#48537)
* refactor metrics query editor to return a function component

* add tests for metrics query editor

* add simple render tests for panel query editor

* remove obsolete test

* pr feedback
2022-05-02 10:09:24 +02:00
Jack Westbrook
39ee365b82 Swagger: Add integrity attributes (#48396) 2022-05-02 09:49:49 +02:00
Karl Persson
de50f39c12 Access Control: Refactor scope resolvers with support to resolve into several scopes (#48202)
* Refactor Scope resolver to support resolving into several scopes

* Change permission evaluator to match at least one of passed scopes
2022-05-02 09:29:30 +02:00
Karl Persson
9622e7457e Fix permission query for postgres (#48543) 2022-05-02 09:25:23 +02:00
Isabella Siu
74c2c2ccf0 CloudWatch: add generic filter component to variable editor (#47907)
* CloudWatch: add generic filter component to variable editor

* remove multi-text-select object

* remove hidden

* andres comments

* migration between 8.5 and this

* add waitFors to tests

* more await tweaks

* actually fix tests

* use popoverContent tooltip

* fix template variable handling

* prettier fix

* fix prettier 2

* feat: make tooltip links in query variable editor clickable

* fix template stuff

Co-authored-by: Adam Simpson <adam@adamsimpson.net>
2022-04-29 16:42:59 -04:00
Alexander Weaver
a96510d03c Alerting: Fix test intermittency caused by port conflicts (#48552)
* Get golang to find an open port for us

* Update pkg/tests/api/alerting/api_notification_channel_test.go

Co-authored-by: gotjosh <josue.abreu@gmail.com>

* Fix merge

Co-authored-by: gotjosh <josue.abreu@gmail.com>
2022-04-29 12:07:19 -05:00
Yuriy Tseretyan
54acec69a3 provision alertmanager and manage prom alerts (#48475) 2022-04-29 12:53:14 -04:00
Andreas Christou
d7c16e06d2 AzureMonitor: Add support for not equals and startsWith operators when creating Azure Metrics dimension filters. (#48077)
* Allow dimension operator selection

- Add dimension operators and function to update the operator in the query
- Add logic to ensure the same dimension cannot be selected multiple times (Azure restriction)
- Add selection component

* Update backend logic to default operation and filter to eq '*'

- This must be done as the ne and sw operators do not work with the wildcard filter

* Add tests on dimension operators

* Correct placement of 'and' when building query

* Add comment and simplify filtering logic

* Allow multiSelect for eq and ne operators

- Pass PanelData to DimensionFields component
- Add logic to retrieve labels from PanelData
- Add MultiSelect component for relevant operators
- Update frontend types to allow filter to be an array of strings
- Update backend types to allow filter to be an array of strings
- Update filter string building

* Improve setting of labels

* Update go tests

* Update frontend tests

- Add panelData mock (to be expanded later)
- Update null check in DimensionFields

* Allow custom value and set default

* Add frontend test and fix lint issues

* Improved handling of options for sw operator

* Remove changes related to multiselect

* Add check on refId to ensure dimension labels are correct for query

* Extract custom hook for setting dimension labels

* Add documentation around Azure Monitor metrics dimensions

* Update MetricQueryEditor tests

- Add missing data prop

* Correctly set field values

* Add additional expect for onQueryChange

* Correctly set operators

- Simplify onFilterInputChange

* Ensure no duplicate filters appear

* Ensure that filters are displayed correctly for saved queries

* Update dimension filter test

* Include additional test around changing dimension labels

* Pass panel data through new metrics query editor
2022-04-29 17:01:13 +01:00
Alexander Emelin
87ae3e0644 Search: handle a couple of corner cases when parsing dashboard data (#48521) 2022-04-29 08:49:38 -07:00
Shirley
da035e823f CloudWatch: Pass feature toggles to backend (#48547) 2022-04-29 17:47:46 +02:00
Gabriel MABILLE
2cc276567d AccessControl: Hide basic roles (#48549)
Co-authored-by: Jguer <joao.guerreiro@grafana.com>

Co-authored-by: Jguer <joao.guerreiro@grafana.com>
2022-04-29 17:35:41 +02:00
Dimitris Sotirakis
b414ac5d8c Remove references from pr and main starlark (#48544) 2022-04-29 16:15:40 +01:00
renovate[bot]
18f7da97ac Update dependency webpack-dev-server to v4.8.1 (#47465)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-04-29 16:15:17 +02:00
Todd Treece
54e5152d37 Chore: Update grafana-plugin-sdk-go to v0.134.0 (#48540) 2022-04-29 16:14:32 +02:00
Ieva
d828dc0904 Service accounts: doc fixes (#48518)
* some doc fixes

* Update docs/sources/administration/service-accounts/add-service-account-token.md

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

* Update docs/sources/administration/service-accounts/add-service-account-token.md

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

* Update create-service-account.md

Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
2022-04-29 15:50:09 +02:00
Karl Persson
6c6137f45a Access control: Pass access control metadata for api keys (#48445)
* Move ApiKeyDTO to dtos package

* Add access control filter to api keys

* pass user in GetApiKeysQuery

* Add api key metadata to DTO

* Remove scope all requirement from get api keys endpoint

* Handle api key access control metadata in frondend
2022-04-29 15:30:24 +02:00
Serge Zaitsev
e9a2a06651 Chore: do not run husky hooks on backend-only changes (#48439) 2022-04-29 14:01:02 +01:00
Levente Balogh
5283a8b13d Levitate: use a custom breaking change label (#48494)
* chore: temporarily rename the breaking-change label assigned by Levitate

* chore: use 'levitate breaking change' as a label
2022-04-29 14:44:50 +02:00
ying-jeanne
1667a7c0da Chore: Modify patch and update of preference to take homedashboarduid than h… (#48281)
* modify patch and update of preference to take homedashboarduid than homedashboardid

* to be tested

* use getdashboard

* update doc
2022-04-29 14:37:33 +02:00
Mitch Seaman
4988350160 service account copy edits and cross-refs (#48515) 2022-04-29 10:39:02 +00:00
Jean-Philippe Quéméner
9e3a01a1be Alerting: skip flaky test (#48500) 2022-04-29 12:32:30 +02:00
Will Browne
c8a71a2f91 Plugins: Ensure catching all appropriate 4xx api/ds/query scenarios (#47565)
* catch ds 404s

* catch plugin errs

* go step back
2022-04-29 12:08:40 +02:00
Shirley
7bb4f5cd9b CloudWatch: Add dynamic labels feature toggle (#48498) 2022-04-29 11:43:04 +02:00
Karl Persson
c207ea30eb Access Control: Remove unused option (#48317)
* Remove unused option
2022-04-29 11:05:51 +02:00
Joey Tawadrous
412dbc21e3 Traces: Filter by service/span name and operation in Tempo and Jaeger (#48209)
* Filter search options in Tempo

* Tests for filtering search options in Tempo

* Filter search options in Jaeger

* Tests for filtering search options in Jaeger

* Self review

* Fuzzy search
2022-04-29 09:52:11 +01:00
Karl Persson
9e84e20ade Pass dash id (#48269) 2022-04-29 10:23:07 +02:00
Andrej Ocenas
bd9cec8827 Prometheus: Fix disappearing multi values in metric label values (#48127) 2022-04-29 10:22:49 +02:00
Ivana Huckova
b92fe0e0f5 Query history: Add from and to parameters (#48212)
* Query history: Add from and to parameters

* Update docs/sources/http_api/query_history.md

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

* Update docs/sources/http_api/query_history.md

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

* Update docs/sources/http_api/query_history.md

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

* Implement Grafana relative time range

Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
2022-04-29 09:55:33 +02:00
Timur Olzhabayev
17eca4505c Making FileUpload component accessible via keyboard (#47497) 2022-04-29 09:47:33 +02:00
Sofia Papagiannaki
3e752a0db1 Alerting: modify alertmanager endpoints for proxying using the datasource UID (#47978)
* Alerting: enable proxying alertmanager calls using the datasource UID

* Remove use of datasource ID from the API

* Update frontend
2022-04-29 10:25:22 +03:00
Agnès Toulet
49491bc73e grafana-ui: Add checkbox value field (#48436)
* grafana-ui: Add checkbox value field

* better naming + comment
2022-04-29 09:06:01 +02:00
Gábor Farkas
62cd722726 Loki: minor backend-dataframe-format changes (#48320)
* loki: backend: better dataframe field names

* loki: backend: add dataframe-type to metric dataframes

* loki: backend: only add stats to the first metric dataframe
2022-04-29 09:04:37 +02:00
Kyle Schouviller
7b224adf9f AzureAd Oauth: Fix strictMode to reject users without an assigned role (#48474)
* AzureAd Oauth: Fix strictMode to reject users without an assigned role

Signed-off-by: kyschouv <kyschouv@microsoft.com>

* AzureAd OAuth: Add test for strictMode auth when no role claims are returned

Signed-off-by: kyschouv <kyschouv@microsoft.com>
2022-04-29 08:13:19 +02:00
Isabella Siu
ce8becdfe2 Cloudwatch: Update variable query docs (#48307)
* Cloudwatch: Update variable query docs

* andres comments

* 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-04-28 16:54:27 -04:00
Christopher Moyer
fa5744c887 Docs: corrects aliases (#48454)
* corrects aliases

* Update docs/sources/administration/manage-organizations/_index.md

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

* Update docs/sources/enterprise/access-control/rbac-fixed-basic-role-definitions.md

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

* Update docs/sources/enterprise/access-control/plan-rbac-rollout-strategy.md

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

* Update docs/sources/administration/manage-organizations/_index.md

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

* Update docs/sources/enterprise/access-control/custom-role-actions-scopes.md

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

* incorporated feedback

* Update docs/sources/enterprise/access-control/plan-rbac-rollout-strategy.md

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

* Update docs/sources/enterprise/access-control/rbac-fixed-basic-role-definitions.md

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

* Update docs/sources/administration/manage-organizations/_index.md

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

* fixes quotes

* changed quotes

Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
2022-04-28 15:14:23 -05:00
Jean-Philippe Quéméner
9e21e4d1c1 Alerting: indicate whether an alertrule is provisioned (#48458) 2022-04-28 21:27:34 +02:00
achatterjee-grafana
7048bf9f0d added aliases (#48461) 2022-04-28 15:25:09 -04:00
Santiago
d9de621d20 Fix Discord notifications not being sent due to templating issues (#48208)
* empty URLs fixed

* move comment

* test cases
2022-04-28 15:58:07 -03:00
Alexander Weaver
735822e48a Alerting: Add provisioning GET routes for message templates (#48367)
* Template service

* Add GET routes and implement them

* Generate mock for persist layer

* Unit tests for reading templates

* Set up composition root and get integration tests working

* Fix prealloc issue

* Extract setup boilerplate

* Update AuthorizationTest

* Rebase and resolve

* Fix linter error
2022-04-28 13:51:57 -05:00
Artur Wierzbicki
d4616cfe26 Search: support auth filter based on access control/rbac (#48350)
* #45498: add rbac support in searchv2

* to revert: fix dependency cycle

* Revert "to revert: fix dependency cycle"

This reverts commit 1ffbee73ec.

* added a TODO for caching user permissions

* add orgId to `getDashboardReadFilter`

* use orgId from signedInUser

* goimport
2022-04-28 22:16:23 +04:00
Torkel Ödegaard
5a9aad3e86 QueryGroup: More efficient way to scroll to bottom when adding new queries (#48399) 2022-04-28 20:07:36 +02:00
Alexander Emelin
4551f05994 Search: fix missing dashboards due to empty uid, log errors (#48361) 2022-04-28 19:29:09 +03:00
Josh Hunt
eeaa160ae8 Fix: Prevent automatic parsing of string data types to numbers (#46035)
* Fix: Render unitless strings as strings from displayProcessor

Co-authored-by: kay delaney <kay@grafana.com>
Co-authored-by: Alexandra Vargas <alexa1866@gmail.com>
Co-authored-by: joshhunt <josh@trtr.co>
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
Co-authored-by: Joao Silva <joao.silva@grafana.com>

* update tests

* Rename none unit

* rename none unit to Number

Co-authored-by: kay delaney <kay@grafana.com>
Co-authored-by: Alexandra Vargas <alexa1866@gmail.com>
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
Co-authored-by: Joao Silva <joao.silva@grafana.com>
2022-04-28 16:07:22 +01:00
Dimitris Sotirakis
c3ba6f962b CI: Run docs pipeline only upon changes to root markdown files (#48433)
* Run docs pipeline only upon changes to root markdown files

* Include latest/json
2022-04-28 17:41:46 +03:00
Artur Wierzbicki
484bd0b557 Storage: use FlagStorageLocalUpload for HTTP API 2022-04-28 18:33:02 +04:00
tomxwang
af8fbc16d6 no value should use decimals (#48155) 2022-04-28 15:04:57 +01:00
Ryan McKinley
fee291c3c8 Save Drawer: reduce the number of diff elements we show (#48309) 2022-04-28 07:02:33 -07:00
Piotr Jamróz
f0f3134cb1 Explore: Fix legend toggling (#47823) 2022-04-28 15:55:16 +02:00
Marcus Efraimsson
9b0b391949 Chore: Update latest.json for v8.5.1 (#48435) 2022-04-28 15:21:16 +02:00
Dominik Prokop
f1082afd1b Docs: Update axis placement docs (#48163)
* Docs: Update axis placement docs

* Update docs/sources/visualizations/bar-chart.md

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

* Update docs/sources/visualizations/time-series/change-axis-display.md

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

Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com>
2022-04-28 05:52:10 -07:00
Grot (@grafanabot)
9fcbfe2c1c ReleaseNotes: Updated changelog and release notes for 8.5.1 (#48425) 2022-04-28 14:48:48 +02:00
Gábor Farkas
ae926c2144 loki: better resource-call urls (#48250) 2022-04-28 14:28:57 +02:00
Leonard Gram
9688d7d7aa Release: downgrade to centos 7 in verify repo as 8 doesn't have a valid mirror list (#48422) 2022-04-28 14:28:41 +02:00
Karl Persson
0c998a1fbd Docs: Change access control scopes for dashboards, folders and data sources to be based on uid:s (#48397)
* Change to uid based scopes
2022-04-28 14:25:20 +02:00
Dimitris Sotirakis
a7a5476ac2 CI: Split publish-packages pipeline (#48414)
* Split publish packages pipeline

* Small refactoring
2022-04-28 14:53:32 +03:00
Ivana Huckova
da49e94069 Loki: Enable new visual query builder by default (#48346) 2022-04-28 13:03:59 +02:00
Torkel Ödegaard
4fef50272f Select: Improve usability slightly (#47796)
* Select: Improve usability slightly

* Latest change

* Fixed test

* Updated test
2022-04-28 12:25:51 +02:00
gotjosh
d451d02628 Alerting Changelog: Cut & Fix (#48402) 2022-04-28 11:20:35 +01:00
Dimitris Sotirakis
67752ad88c Reorder dependencies for npm release steps (#48403) 2022-04-28 12:15:28 +02:00
Todd Treece
6f4131ad15 Chore: Update grafana-plugin-sdk-go to v0.133.0 (#48382) 2022-04-28 06:14:49 -04:00
Ashley Harrison
b9787db68e Chore: Convert AbstractList tests to RTL (#48284) 2022-04-28 11:30:19 +02:00
Joao Silva
cc114e24ca Navigation: Fixes closing submenus on scrolling (#48207) 2022-04-28 10:19:10 +01:00
L-M-K-B
ab144bf05e Chore: Refactor run button and remove component incl. test (#48348) 2022-04-28 11:07:49 +02:00
Artur Wierzbicki
736be74128 Chore: Add Usage stats providers registry (#48357)
* add usage stats providers

* migrate thumbnails service to `registry.ProvidesUsageStats`

* snake -> camel

* lint fix

* migrate accesscontrol to `registry.ProvidesUsageStats`

* add accesscontrol to usage stats providers registry

* fix test

* added a note about errors
2022-04-28 13:06:49 +04:00
Dimitris Sotirakis
ff23f78b51 Split frontend and backend pipelines (#48362) 2022-04-28 12:04:03 +03:00
Karl Persson
e9a93ebfc9 Access Control: Move access control middlewares to domain package (#48322)
* Move access control middleware to domain package
2022-04-28 10:46:18 +02:00
Andres Martinez Gotor
6edefe5147 AzureMonitor: Remove deprecated code (#48328) 2022-04-28 10:27:39 +02:00
Torkel Ödegaard
07bd261cff Graph: Deprecate Graph (old) and make it no longer a visualization option for new panels (#48034)
* Graph: Make old graph deprecated, no longer selectable

* Fixing snapshot
2022-04-28 08:20:51 +00:00
Nathan Marrs
86971b1b30 Fix layer action / constraint change adhering to inline editing state (#48390) 2022-04-27 21:09:27 -07:00
Nathan Marrs
b990d3c9e3 Canvas: Fix selecto breaking on enter / exit panel edit mode (#48387) 2022-04-27 20:51:02 -07:00
Sarah Zinger
3ae90efda2 Azure Monitor: refactor resource picker (#48312)
* Refactor Resource Picker to split up data logic from view logic.
2022-04-27 20:06:21 -04:00
Christopher Moyer
3343519154 corrects aliases (#48378) 2022-04-27 16:45:03 -05:00
Nathan Marrs
fb25cf11e7 Address crash by properly updating currentLayer and refreshing selection to force update instance state (#48373) 2022-04-27 13:33:07 -07:00
Michael Mandrus
6945f1c483 SAML: Implement Name Templates for assertion_attribute_name option (#48022)
* provide public getter for config template variable regex

* add code comment

* Add documentation on assertion_name_mapping templates

* Add missing piece of SAML documentation while I'm in here.

* Update docs/sources/enterprise/saml/configure-saml.md

Co-authored-by: Emil Tullstedt <emil.tullstedt@grafana.com>

* Add a bit more documentation on error handling.

Co-authored-by: Emil Tullstedt <emil.tullstedt@grafana.com>
2022-04-27 16:29:15 -04:00
Alexander Weaver
60ec10566f Extract Route validation from serialization methods so it can be re-used (#47649)
* Extract validation and reject invalid policies

* Validation in dedicated file

* Tests for validation

* Extract root route validation

* Update call and drop TODO

* empty commit to kick actions

* Normalization should be idempotent

* Cleaner representation of validation errors, chain errors properly

* Make internal validate unexported

* Fix missed rename

* Genericize error message

* Improve method names

* Rebase, fix

* Update asserts
2022-04-27 15:15:41 -05:00
An
900d9bf9a1 FileStorage: Add upload form (#46749)
* move upload to http

* use storage from grafanads

* rever gomod changes

* fix test

* wip

* add upload func

* update upload func

* writing to uploads

* edit response from service

* use dropzone for UI

* modify response struct in service

* better read file

* set content type for svg

* restrict file types upload

* add test and clean up errors

* pass test

* fix backend lint errors

* limit type of files on FE

* add TODO for after merge

* rebase with storage changes

* comment out unused function

* update UI to not have 2 uploads

* only call upload on select

* use utils function to find * in path

* show preview on drag over

* not allowing upload of svg

* add preview to upload tab

* no console.log

* resolve conflicts

* refactor log line

* fix failing BE test

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
Co-authored-by: Artur Wierzbicki <artur.wierzbicki@grafana.com>
2022-04-27 15:12:48 -04:00
Yuriy Tseretyan
4b417c8f3e use NaN if condition value is nil (#48370) 2022-04-27 15:59:13 -03:00
Jean-Philippe Quéméner
a3256bafa7 Alerting: indicate whether contact point is provisioned (#48323) 2022-04-27 20:53:36 +02:00
cianooooo
e8f4b58a8b Alerting: Add additional customisation to ngalert MS Teams notifier (#46372)
Makes the Title and Section Title of the Teams message customisable.
Closes #46366
2022-04-27 13:03:15 -04:00
Sarah Zinger
ebfb70dc12 Azure Monitor: Scroll on resource picker fix and general clean up (#48311)
* Fix bug where resource picker doesn't open automatically to a previously selected resource.
2022-04-27 12:57:18 -04:00
Santiago
9237729c19 Make clear that the two example templates must be used together (#48305)
* make clear that the two templates work in conjunction

* PR review changes

* Update docs/sources/alerting/unified-alerting/message-templating/_index.md

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

* Update docs/sources/alerting/unified-alerting/message-templating/_index.md

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

* make numbered steps

Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
2022-04-27 11:43:45 -04:00
Christopher Moyer
6be21d66e6 updates server users alias (#48363) 2022-04-27 11:09:08 -04:00
Christopher Moyer
a20b3e2d59 Docs: Fine-grained access control refactor (#47536)
* fleshing out About topic

* docs, fgac refactor initial draft

* updated FGAC with service account details

* finalized restructure

* make prettier, corrects spelling

* fixes typo

* adds rollout strategy topic

* started name change

* renamed to rbac throughout docs

* copy edit to about and actions and scopes docs

* finishes content reorg

* draft of refactored refactored docs

* corrects relrefs

* formatting tweaks

* fixes typo

* copy updates to about rbac

* rbac rollout docs edits

* update rbac role assignment docs

* content update to manage rbac roles doc

* sort and reorder roles reference in rbac docs

* alphabetize permissions table

* Update docs/sources/enterprise/settings-updates.md

Co-authored-by: Mitch Seaman <mjseaman@users.noreply.github.com>

* incorporates feedback, makes prettier

* update http api references in rbac docs

* fix broken refs and improve wording on enabling RBAC provisioning

Co-authored-by: eleijonmarck <eric.leijonmarck@gmail.com>
Co-authored-by: Mitchel Seaman <mitchel.seaman@gmail.com>
Co-authored-by: Mitch Seaman <mjseaman@users.noreply.github.com>
2022-04-27 09:51:56 -05:00
Leon Sorokin
647f749652 TimeSeries: properly stack series with missing datapoints (#48321) 2022-04-27 09:31:15 -05:00
Christopher Moyer
9d129bde76 Docs: clarifies viewer can edit prose (#48352)
* clarifies viewer can edit prose

* updates task title
2022-04-27 09:10:33 -05:00
Christopher Moyer
bb7bd6a920 corrects aliases (#48354) 2022-04-27 08:59:08 -05:00
Ivana Huckova
a60c32275e LabelFilter: Use EditorField instead of Field (#48339) 2022-04-27 15:13:11 +02:00
Piotr Jamróz
361cc18b45 Query History: Move filtering to service layer (#48008)
* Load Rich History when the container is opened

* Store rich history for each pane separately

* Do not update currently opened query history when an item is added

It's impossible to figure out if the item should be added or not, because filters are applied in the backend. We don't want to replicate that filtering logic in frontend. One way to make it work could be by refreshing both panes.

* Test starring and deleting query history items when both panes are open

* Remove e2e dependency on ExploreId

* Fix unit test

* Assert exact queries

* Simplify test

* Fix e2e tests

* Fix toolbar a11y

* Reload the history after an item is added

* Fix unit test

* Remove references to Explore from generic PageToolbar component

* Update test name

* Fix test assertion

* Add issue item to TODO

* Improve test assertion

* Simplify test setup

* Move query history settings to persistence layer

* Fix test import

* Fix unit test

* Fix unit test

* Test local storage settings API

* Code formatting

* Fix linting errors

* Add an integration test

* Add missing aria role

* Fix a11y issues

* Fix a11y issues

* Use divs instead of ul/li

Otherwis,e pa11y-ci reports the error below claiming there are no children with role=tab:

Certain ARIA roles must contain particular children
   (https://dequeuniversity.com/rules/axe/4.3/aria-required-children?application=axeAPI)

   (#reactRoot > div > main > div:nth-child(3) > div > div:nth-child(1) > div >
   div:nth-child(1) > div > div > nav > div:nth-child(2) > ul)

   <ul class="css-af3vye" role="tablist"><li class="css-1ciwanz"><a href...</ul>

* Clean up settings tab

* Remove redundant aria label

* Remove redundant container

* Clean up test assertions

* Move filtering to persistence layer

* Move filtering to persistence layer

* Simplify applying filters

* Split applying filters and reloading the history

* Debounce updating filters

* Update tests

* Fix waiting for debounced results

* Clear results when switching tabs

* Improve test coverage

* Update docs

* Revert extra handling for uid (will be added when we introduce remote storage)

* Fix betterer conflicts

* Fix imports

* Fix imports

* Simplify test setup

* Simplify assertion

* Improve readability

* Remove unnecessary casting

* Mock backend in integration tests
2022-04-27 15:07:44 +02:00
Kristina
a320e942a6 Explore Split Logs - use unique IDs and save state vals to unique place (#48300)
* Explore Split Logs - use unique IDs and save state vals to unique place

* Remove exploreID from store
2022-04-27 07:47:33 -05:00
Marcus Efraimsson
199cacc7b6 Plugins Catalog: Fix styling of hyperlinks (#48196)
Adds some styling (default hyperlink color and underline on hover) to 
plugin header and body hyperlinks.

Fixes #48078
2022-04-27 14:34:47 +02:00
Erik Sundell
f58a2d879e Cloudwatch: Use new annotation API (#48102)
* use new annotation api

* fix bad merge
2022-04-27 12:41:48 +02:00
Artur Wierzbicki
25e153e4e7 Search: in-memory index (#47709)
* #45498: add entity events table

* #45498: add entity events service

* #45498: hook up entity events service to http server

* #45498: use `dashboards.id` rather than `uid` and `org_id` in grn

* Update pkg/services/entityevents/service.go

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

* #45498: move entityeventsservice to services/store

* #45498: add null check

* #45498: rename

* #45498: fix comment

* #45498: switch grn back to uid

* Search: listen for updates (#47719)

* #45498: wire entity event service with searchv2

* load last event id before building index for org 1

* fix service init in integration tests

* depend on required subset of event store methods

* Update pkg/services/sqlstore/migrations/entity_events_mig.go

Co-authored-by: Alexander Emelin <frvzmb@gmail.com>

* #45498: pointer receiver

* #45498: mockery!

* #45498: add entity events service to background services

* dashboard query pagination, allow queries while re-indexing

* log level cleanups, use rlock, add comments

* fix lint, check feature toggle in search v2 service

* use unix time for event created column

* add missing changes for created column

* fix integration tests init

* log re-index execution times on info level

* #45498: fix entityEventsService tests

* #45498: save events on dashboard delete

* use camel case for log labels

* formatting

* #45498: rename grn to entityid

* #45498: add `IsDisabled` to entityEventsService

* #45498: remove feature flag from migration

* better context usage, fix capacity, comments/cleanups

* replace print with logger

* Revert "#45498: remove feature flag from migration"

This reverts commit ed23968898.

* revert:revert:revert conditional feature flag

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
Co-authored-by: Alexander Emelin <frvzmb@gmail.com>
2022-04-27 12:29:39 +04:00
Torkel Ödegaard
8764040fe3 Plugins: Fix double page paddings on plugin admin pages (#48315) 2022-04-27 09:56:44 +02:00
Joe Blubaugh
103087a1a5 Unified Alerting: Validate PostableSilence API. (#46892)
Invalid PostableSilences could be passed to the Alerting API - if they
are passed all the way down into the alertmanager data layer, they can
cause a panic. This change adds validation to avoid a panic in the
alertmanager.
2022-04-27 15:55:47 +08:00
Sriram
7798b08b1e fixes invalid no data alerts in influx datasource (#48295) 2022-04-27 08:20:31 +01:00
Ryan McKinley
5294a2af48 Testdata: show settings for current simulation (#48017)
Co-authored-by: An Le <an.le@grafana.com>
2022-04-26 13:45:42 -07:00
Connor Lindsey
0da50294fe Service Graph: Display alert if no metrics found (#48214) 2022-04-26 11:43:18 -06:00
Alexander Weaver
078a578803 Drop ProvenanceOrgAdapter and build into store API instead (#48137) 2022-04-26 10:30:57 -05:00
Gilles De Mey
9b95d77be9 Alerting: use a single move operation for alert rules (#48125) 2022-04-26 16:38:29 +02:00
Kevin Yu
1be45d1ed9 Azure Monitor: reset resource uri when resource changes (#48235) 2022-04-26 07:36:37 -07:00
Matthew Jacobson
0301d956da Alerting: Create fewer contact points on migration (#47291)
* Alerting: Create fewer contact points on migration

Previously a new contact point was created for every unique combination
of channels attached to any legacy alert. This was very hard to maintain,
requiring modifications in every generated contact point.

This change deduplicates the generated contact points to a more
reasonable state. There should now only be one contact point per legacy
channel, and we attached multiple contact points to a route by nesting
them. The sole exception to this is if there were multiple default
legacy channels, in which case we create a redundant contact point
containing all of them used only in the root policy. This allows for a
much simpler notification policy structure.

Co-authored-by: gotjosh <josue.abreu@gmail.com>
2022-04-26 16:17:30 +02:00
Konrad Lalik
5f594addbf Alerting: Fix folder permissions (#48189)
* Use the folder view permission in alerting

* Add tests
2022-04-26 15:57:00 +02:00
kay delaney
3b4d237ade Notifications: Hide display of trace ID behind feature flag (#48057)
* Notifications: Hide display of trace ID behind feature flag
2022-04-26 14:31:27 +01:00
Connor Lindsey
4e6c3be7ab Tracing: Add string unit to trace search results to prevent Infinity bug (#48206) 2022-04-26 07:09:40 -06:00
Jguer
8126331f66 Update cron library for ldap sync (#47983)
* ldap: update cron library

* Update docs/sources/enterprise/enhanced_ldap.md
2022-04-26 14:14:48 +02:00
kay delaney
706d3d1161 UI/Field: Undefined defaults no longer override child props (#48182)
Closes #48131
2022-04-26 12:51:42 +01:00
Kristina
090afc9ae0 Bind command palette specific overrides and reset when no longer relevant (#48217)
* Bind command palette specific overrides and reset when no longer relevant

* Use original global escape instead of resetting the whole keybinding profile
2022-04-26 06:31:13 -05:00
Zoltán Bedi
9df26c7b7c Table: Fix filter crashes table (#48258) 2022-04-26 13:26:48 +02:00
Dimitris Sotirakis
430b9ae5cb CI: Rename main pipelines (#48245)
* Rename main pipelines

* Rename dependencies
2022-04-26 11:40:13 +01:00
Ashley Harrison
53fcb7e171 Transformations: Allow more complex regex expressions in Rename by regex (#48179)
* Support proper regex in renameByRegex transformation

* remove unused import
2022-04-26 11:28:04 +01:00
Ashley Harrison
e420252d45 move saved items feature behind separate feature toggle (#48117) 2022-04-26 11:27:01 +01:00
Gábor Farkas
c73b9d1818 Loki: do not use the old labels-api (#48185)
* loki: do not use old labels-api

* adjust allowed-url-list

* fixed tests
2022-04-26 11:51:26 +02:00
Emil Tullstedt
fc0346fe5b Dashboards: Use home dashboard from org again (#48244)
* Dashboards: Use home dashboard from org again

* Set homeDashboardID

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
2022-04-26 11:46:26 +02:00
Ivana Huckova
c0ee94a04d Update grafana/experimental and fix Cloudwatch components (#48132)
* Update grafana/experimental and fix components

* Simplify
2022-04-26 11:28:34 +02:00
Ivana Huckova
98161be9ad Query history: Pass config to frontend and add missing documentation (#48204)
* Query history: Pass config to frontend and add missing documentation

* Update
2022-04-26 11:15:08 +02:00
Leon Sorokin
fe7b594bbd TimeSeries: update frame.length when syncing bar widths (#48223) 2022-04-25 23:57:59 -05:00
Kevin Yu
eef22c05e1 AzureMonitor: build azure portal deep link with resource uri (#47947)
* AzureMonitor: build azure portal deep link with resource uri

* extract resource name from the metrics api query

* extract func for getting resource name from metrics url

* add additional valid characters to regex
2022-04-26 04:30:28 +02:00
Ryan McKinley
e0aeb83786 Export: introduce export plumbing (behind dev feature flag) (#48091) 2022-04-25 16:59:18 -07:00
achatterjee-grafana
7311c9757a Docs: Break down alerting HA topics (#48143)
* Initial commit

* Added some refinement to the alerting HA topics.

* Update docs/sources/administration/set-up-for-high-availability.md

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

* Updates from Chris's review. Also fixed a couple of broken relrefs

* Ran prettier

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
2022-04-25 15:53:09 -04:00
Guilherme Caulada
53e9bf47db Secrets: Implement tests and debug log improvements on unified secrets (#48213)
* Add test for decrypted values on datasource service

* Add debug log when fail to parse secure json fields

* Fix minor import issue

* Refactor encJson to json and simplejson to sjson on tests
2022-04-25 15:12:44 -03:00
Adam Simpson
6c0a5b121e CloudWatch: prevent log groups from being removed on query change. (#47994)
* CloudWatch: prevent log groups from being removed on query change.

Previously when a query was changed the existing log groups for that query were "dropped". The fix is to combine the
new query with the existing query object in memory to preserve the log groups.

fixes #33626

* CloudWatch: fix typos in runWithRetry documentation

* chore: fix eslint issue
2022-04-25 17:59:52 +00:00
Kat Yang
098563179b Chore: Remove final x from sqlstore (#48086)
* Chore: Remove final x from everywhere

* Fix errors

* Fix: fix lint and nil pointer err

* Remove x from the sqlstore 🎉
2022-04-25 13:07:11 -04:00
Guilherme Caulada
a367ad730c Secrets: Implement basic unified secret store service (#45804)
* wip: Implement kvstore for secrets

* wip: Refactor kvstore for secrets

* wip: Add format key function to secrets kvstore sql

* wip: Add migration for secrets kvstore

* Remove unused Key field from secrets kvstore

* Remove secret values from debug logs

* Integrate unified secrets with datasources

* Fix minor issues and tests for kvstore

* Create test service helper for secret store

* Remove encryption tests from datasources

* Move secret operations after datasources

* Fix datasource proxy tests

* Fix legacy data tests

* Add Name to all delete data source commands

* Implement decryption cache on sql secret store

* Fix minor issue with cache and tests

* Use secret type on secret store datasource operations

* Add comments to make create and update clear

* Rename itemFound variable to isFound

* Improve secret deletion and cache management

* Add base64 encoding to sql secret store

* Move secret retrieval to decrypted values function

* Refactor decrypt secure json data functions

* Fix expr tests

* Fix datasource tests

* Fix plugin proxy tests

* Fix query tests

* Fix metrics api tests

* Remove unused fake secrets service from query tests

* Add rename function to secret store

* Add check for error renaming secret

* Remove bus from tests to fix merge conflicts

* Add background secrets migration to datasources

* Get datasource secure json fields from secrets

* Move migration to secret store

* Revert "Move migration to secret store"

This reverts commit 7c3f872072.

* Add secret service to datasource service on tests

* Fix datasource tests

* Remove merge conflict on wire

* Add ctx to data source http transport on prometheus stats collector

* Add ctx to data source http transport on stats collector test
2022-04-25 13:57:45 -03:00
Leon Sorokin
0ca32f0c61 TimeSeries: use positive stacks for 0-valued series (#48197) 2022-04-25 11:46:00 -05:00
Joao Silva
ebe34ddcba Navigation: Remove the 'active' indicator from the Home icon when collapsed (#48192) 2022-04-25 17:12:58 +01:00
gotjosh
25c07ff85e Alerting: Wrap legacy alerting metrics with legacy_ (#48190)
* Alerting: Wrap legacy alerting metrics with `legacy_`
2022-04-25 17:19:36 +02:00
Isabella Siu
801a2a240a Cloudwatch: fix template variables in variable queries (#48140) 2022-04-25 10:33:49 -04:00
Ieva
ea25f7e1ca fix argument ordering (#48124) 2022-04-25 15:26:46 +02:00
Kristina
b30d9f2732 Explore: Fix height on horizontal drawer and query inspector (#47832)
* Move tab height and horizontal drawer height to themable variables so they can be referred to. Add a default height to tabbed container so it can set an explicit height. Add overflow: scroll to inspector content

* Use height variable that changes on resize

* Use css to set height
2022-04-25 07:48:55 -05:00
Kevin Yu
9829195829 AzureMonitor: fix the encoding of the metrics query deep link to Azure Portal (#48139) 2022-04-25 05:39:34 -07:00
Andres Martinez Gotor
c1c94f478a Chore: Fix e2e selector (#48168) 2022-04-25 13:27:22 +02:00
Gábor Farkas
d8a754c4a0 loki: send metadata requests through backend (#48063) 2022-04-25 13:16:14 +02:00
George Robinson
c5547123bc Remove redundant queries in GetAlertRules and GetOrgAlertRules and replace with ListAlertRules (#48108) 2022-04-25 11:42:42 +01:00
Andres Martinez Gotor
7cfab77650 AzureMonitor: Remove workaround in Logs editor (#48104) 2022-04-25 12:34:12 +02:00
Erik Sundell
cb2c6fe6bc AzureMonitor: Remove unused angular code (#48110)
* remove unsued code

* fix import
2022-04-25 12:30:33 +02:00
Ieva
68ca5b2e05 Access control: refactor RBAC checks (#48107)
* refactor RBAC checks

* fix a test

* another test fix

* and another
2022-04-25 10:42:09 +02:00
Artur Wierzbicki
2e599643f6 Previews: refactor (#47728)
* #44449: return standard thumb service even if auth setup fails

* #44449: remove dashboardPreviewsScheduler feature flag

* #44449: externalize dashboardPreviews config

* #44449: disable previews by default

* #44449: rename logger

* #44449: dashboardPreviewsAdmin feature requires dev mode

* #44449: retrigger CII
2022-04-25 01:55:10 +04:00
Torkel Ödegaard
70a7b73839 Preferences: Fixes broken preferences after recent merge (#48157)
* Preferences: Fixes broken preferences after recent merge

* Added check

* Shorter syntax

* Fixed test

* Remove error, and remove duplicate call
2022-04-24 17:50:10 +02:00
Christopher Moyer
ea52663dd9 Docs: Combines thresholds docs into a single topic (#47985)
* start updates

* combines content into single topic

* completes draft update

* Update docs/sources/panels/configure-thresholds/_index.md

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

* incorporates feedback

* Update docs/sources/panels/configure-thresholds/_index.md

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

* Update docs/sources/panels/configure-thresholds/_index.md

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

* Update docs/sources/panels/configure-thresholds/_index.md

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

* incorporates final feedback

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
2022-04-23 08:29:16 -05:00
Leon Sorokin
1c977281c8 TimeSeries: sync minimum bar width across all bar series (#48030) 2022-04-22 19:33:25 -05:00
Nathan Marrs
2b2f275a08 Canvas: Support scale + center constraints (#48085) 2022-04-22 14:02:36 -07:00
Yuriy Tseretyan
75ba4e98c6 Alerting: Remove unused features from ticker + metric + tests (#47828)
* remove not used code:
  - remove offset in ticket because it is not used
  - remove unused ticker and scheduler methods

* use duration for interval
* add metrics grafana_alerting_ticker_last_consumed_tick_timestamp_seconds, grafana_alerting_ticker_next_tick_timestamp_seconds, grafana_alerting_ticker_interval_seconds
2022-04-22 15:09:47 -04:00
Alexander Weaver
8310789ef1 Indicate whether routes are provisioned when GETting Alertmanager configuration (#47857)
* Test composition simplification from last PR

* Policies use proper API model everywhere

* Expose policy provenance in API, miss some dep injection

* Complete injection

* fix args

* Tests for provenance value

* Extract test helpers so tests are very readable

* Single source adapter struct that was copied in 3 places

* Drop redundant test

* Resolve merge conflicts on changelog
2022-04-22 11:57:56 -05:00
achatterjee-grafana
f915767fdc Update what's new with correct image link (#48133) 2022-04-22 12:44:11 -04:00
Ashley Harrison
a7f02094b1 Navigation: Add scroll indicators (#48115)
* Attach nav item menus to a portal that's a sibling of the chevron to prevent incorrect stacking

* add scrollbar to navbar

* Make clickable area of grafana logo full size

* hide vertical track as well

* initial attempt at a scroll overlay

* fix indentation

* Extract into a separate component

* Add arrows

* fix unit tests

* Fix imports in new component

* add comment
2022-04-22 17:21:52 +01:00
owensmallwood
7dc28d4083 Adds replace directive for tidwall/gjson (#48083)
* Adds replace directive for tidwall/gjson

* uses more recent version of gjson
2022-04-22 09:32:00 -06:00
Ashley Harrison
277a83215c Use jest.fakeTimers instead of mocking Date.now (#48121) 2022-04-22 16:00:37 +01:00
Ezequiel Victorero
e9ad2207be Chore: bump github.com/containerd/containerd to 1.6.2 (#48003) 2022-04-22 11:59:10 -03:00
Gabriel MABILLE
94fd03f44f LDAP: Fix debug view to display the actual computed mapping in ldap.go (#48103)
* LDAP debug fix with Org role inheritance

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

* ldap debug coherent with ldap.go

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

Co-authored-by: Jguer <joao.guerreiro@grafana.com>
2022-04-22 15:45:54 +02:00
Ezequiel Victorero
1566fa2ede Chore: bump github.com/microcosm-cc/bluemonday to 1.0.18 CVE-2021-29272 (#48011) 2022-04-22 10:40:27 -03:00
Josh Hunt
3c6e0e8ef8 Chore: ESlint import order (#44959)
* Add and configure eslint-plugin-import

* Fix the lint:ts npm command

* Autofix + prettier all the files

* Manually fix remaining files

* Move jquery code in jest-setup to external file to safely reorder imports

* Resolve issue caused by circular dependencies within Prometheus

* Update .betterer.results

* Fix missing // @ts-ignore

* ignore iconBundle.ts

* Fix missing // @ts-ignore
2022-04-22 14:33:13 +01:00
Alexandre de Verteuil
147a1600e7 Syntax fix in whats-new-in-v8-5.md (#48111) 2022-04-22 09:15:31 -04:00
Ezequiel Victorero
00a08afaac Toolkit: Bump axios from 0.21.2 to 0.26.1 (#47904) 2022-04-22 14:56:25 +02:00
Gilles De Mey
2713de2bd1 Alerting: fix alert creation interval layout bug (#48112) 2022-04-22 14:29:36 +02:00
Ashley Harrison
5f83fc3c61 Navigation: Use correct component for custom branding (#48101)
* Use correct component for whitelabelling

* extract logic into reusable function
2022-04-22 11:04:23 +01:00
Ashley Harrison
a34da3e248 Navigation: Implement scrolling navbar + fix clickable area of grafana logo (#48045)
* Attach nav item menus to a portal that's a sibling of the chevron to prevent incorrect stacking

* add scrollbar to navbar

* Make clickable area of grafana logo full size

* hide vertical track as well

* prettier...
2022-04-22 11:04:04 +01:00
kay delaney
3606527359 Templating: Expose more informative action names for keyed actions (#48076) 2022-04-22 10:57:02 +01:00
Ashley Harrison
11bc5e1a06 Navigation: Prevent chevron overlaying navbar menus (#47988)
* Attach nav item menus to a portal that's a sibling of the chevron to prevent incorrect stacking

* Make sure hover menus size correctly

* refactor into separate component

* Fix focus behaviour

* fix test again...
2022-04-22 10:38:47 +01:00
Ivana Huckova
28665a869b Prometheus: Add report interaction for editor modes (#47940)
* Prometheus: Add report interaction for editor modes

* Add new query

* Fix test

* Update public/app/plugins/datasource/prometheus/querybuilder/components/PromQueryEditorSelector.tsx

* Add app to feature tracking

* Update
2022-04-22 10:46:16 +02:00
Giordano Ricci
6899f23a22 Explore: prevent direct access to explore if disabled via feature toggle (#47714)
* Explore: prevent explore route to be registered if explore is disabled

* add feature toggle page
2022-04-22 09:03:24 +01:00
Gábor Farkas
f2814046d1 loki: logrowcontext: explicitly name fields (#48043) 2022-04-22 08:43:33 +02:00
Artur Wierzbicki
87dc1bfc88 Chore: enforce feature naming convention (#48053)
* enforce feature naming convention

* fix link

* add comment

* fix lint

* move the feature name check test to toggles_gen_test
2022-04-22 08:23:30 +04:00
Kristina
3e7db088ac Command Palette Scaffolding + Explore (#47445)
* Add feature flag and scaffodling

* start adding actions

* WIP

* move action files

* Start adding styles

* Fix implementation based on feedback

* Add more hackathon code back to command palette

* Cleanup

* Cleanup unused service files for simple MVP pass

* Move type def to library

* WIP

* Move provider to proper place to pick up other routes’ actions

* Build actions off navbar, add explore actions

* Work around undefined typescript stuff

* Fix based on feedback

* close palette on ESC

* Fix based on PR feedback pt 1

* Move styles to classes

* Move another inline style to a class

* Enable command palette by default

* change around async hook structure

* Add simple feature tracking

* Code cleanup, and be sure the command is accurate

* Change to only render if there are actions, and only add actions once past login
2022-04-21 16:50:34 -05:00
achatterjee-grafana
75d528d7bd Docs: resize images in what's news 8.5 (#48082)
* Updated image size.

* Few more resizing. Also, added link for signup for beta testing (nav bar).

* Few minor tweaks

* Fixed a typo
2022-04-21 17:03:58 -04:00
Artur Wierzbicki
9f0b6a5754 Storage: refactor filtering, improve performance (#47403)
* Storage: refactor filtering, improve performance

* added a comment to `newpathfilter`

* after merge fixes
2022-04-21 23:27:43 +04:00
Yuriy Tseretyan
53a6c0210d Alerting: tests for ticker (#47986) 2022-04-21 19:58:05 +01:00
Alexander Kubyshkin
4fbc481d1f Fix Date picker content when pane is splitted (#46900). Show narrow(m… (#47206)
* Fix Date picker content when pane is splitted (#46900). Show narrow(mobile) content version.

* Change from boolean to value override and use it in calendar styles. Change calendar modal to be in center of screen.

* Be sure width division only happens on split view

Co-authored-by: Kristina Durivage <kristina.durivage@grafana.com>
2022-04-21 12:49:52 -05:00
owensmallwood
6910da6221 upgrades sentry-go to 0.13.0 and replaces gin with v1.7.7 due to CVE https://github.com/advisories/GHSA-h395-qcrw-5vmq (#48000) 2022-04-21 11:23:54 -06:00
Kat Yang
8e606dd751 Chore: Remove x from session (#48074) 2022-04-21 13:20:18 -04:00
George Robinson
d66fc6ed1a Alerting: Add GetRuleGroups to RuleStore (#48036)
This commit adds a new method GetRuleGroups to RuleStore which returns the set of rule groups across all organizations.
2022-04-21 17:59:22 +01:00
Ashley Harrison
9595b56f0d Chore: fix flakey frontend test (#48071)
* remove unnecessary rerender

* removed unused act import
2022-04-21 17:44:06 +01:00
Joao Silva
94d2155f44 Annotations: Fixes data source showing as a uid in annotation settings (#48073) 2022-04-21 17:08:11 +01:00
Andres Martinez Gotor
f50cd90301 Cloudwatch: Update grafana-aws-sdk (#48039) 2022-04-21 17:20:03 +02:00
owensmallwood
9a4bd1f2d4 Usage insights query caching (#47893)
* Updates queryResponse tests to include new cachedResponse bool

* Adds cachedResponse bool to QueryResponse

* Adds tests to assert the correct query counts (totalQueries and cachedQueries) are dispatched for data-requests

* Adds totalQueries and cachedQueries counts to the data-request events

* Adds new metrics and their descriptions to docs

* uses more descriptive variable name

* changes naming

* removes hyphen in docs

* extracts calculations to own lines prior to assignment
2022-04-21 09:16:13 -06:00
Will Browne
f3743bb652 update latest.json for 8.5.0 (#48065) 2022-04-21 16:49:32 +02:00
Gabriel MABILLE
836f5c1f4a LDAP: Fix Debug mapping roles and groups (#48059)
Co-authored-by: Jguer <joao.guerreiro@grafana.com>

Co-authored-by: Jguer <joao.guerreiro@grafana.com>
2022-04-21 16:38:55 +02:00
Dimitris Sotirakis
412be1f1cf Add yarn-install when publishing npm packages (#48061) 2022-04-21 16:31:39 +02:00
idafurjes
d99d095ac6 Add endpoint with UID for dashboard permissions (#47753)
* Replace sequential IDs with UID for dashboard permossion

* Add back endpoint with id

* Rename parameter from dashboarUid->uid and add swagger definitions for endpoints

* Generate swagger json

* Add deprecated to swagger and docs

* Add deprecated comment in the api.go

* Add model for POST body

* Fix model post body for endpoint

* Generate spec with enterprise
2022-04-21 16:24:03 +02:00
Grot (@grafanabot)
3b256afb9e ReleaseNotes: Updated changelog and release notes for 8.5.0 (#48060) 2022-04-21 16:20:07 +02:00
lean.dev
600ad35978 Upgrading version of github.com/tidwall/match to v1.1.1 (#47996)
To fix CVE-2020-26066 security issue
2022-04-21 10:47:03 -03:00
Garrett Guillotte
d93bcd547e Docs: Clarify transformation functions reference docs (#46903)
* Docs: Remove 'Reference' prefix from all reference topic filenames: Per issue #46818, prefixing reference topics with "Reference" can damage usability. Remove the prefix from filenames.

* Docs: Remove "Reference:" prefix from titles and ToC headings: Per issue #46818, prefixing reference topics with "Reference" can damage usability. Remove the prefix from titles and ToC headings. H1s retain the prefix to emphasize the nature of the doc without affecting the docs' discoverability.

* Docs: Move Transformation functions reference alongside Transformation docs
* Docs: Update links to reference docs in Transformation docs
* Docs: Update links to reference docs in Panels docs
* Docs: Update links to query options reference across docs
* Docs: Update links to standard field definitions reference across docs
* Docs: Update links to calculation types reference across docs
* Docs: Update links to transformation functions reference across docs
* Docs: Rename apply transformation doc filename to add transformation
* Docs: Rename apply transformation doc to add transformation
* Docs: Update links to add transformation doc across docs
* Docs: Update relrefs in Transformation functions reference
2022-04-21 15:16:22 +02:00
Shirley
79d328fcbc CloudWatch: Add tests for data frame naming in formatAlias (#47899) 2022-04-21 15:11:23 +02:00
Joao Silva
15ea6d559a Text Panel: Fixes issue with hash anchor links (#47980) 2022-04-21 14:06:58 +01:00
idafurjes
dbcaedac6c Implement preference service (#47870)
* Implement preference service

* Adjust wire.go

* Fix integration test user

* Fix api pref tests

* Fix a11y error

Co-authored-by: Alexandra Vargas <alexa1866@gmail.com>
Co-authored-by: Emil Tullstedt <emil.tullstedt@grafana.com>
2022-04-21 15:03:17 +02:00
renovate[bot]
03cf38e659 Update dependency @testing-library/user-event to v14.1.1 (#47008)
* Update dependency @testing-library/user-event to v14.1.1

* make this test more consistent

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2022-04-21 13:44:36 +01:00
Vardan Torosyan
a0553de8dd Rename FGAC to RBAC in the codebase (#48051) 2022-04-21 14:31:02 +02:00
Ivana Huckova
ce6aed21a7 Loki: Show raw query and patterns only in query builder (#48049) 2022-04-21 14:23:03 +02:00
Kat Yang
eb05f6ead8 Chore: Remove x from dashboard snapshots (#48001) 2022-04-21 08:20:47 -04:00
Ashley Harrison
d832bde270 Upgrade @testing-library/user-event to v14 (#47898)
* Update dependency @testing-library/user-event to v14

* everything is async...

* everything is async pt.2

* Fix cascader tests

* hack the yarn.lock file to remove the old version of @testing-library/dom

* some more fixes!

* MOAR FIXES

* more fixes

* remove a bunch of places where we're wrapping in act()

* down to 7 failing tests...

* Fix arrow tests

* Fix rest of NavBarItem tests

* Fix last tests

* Use {Enter} instead of {enter}

* Revert "Use {Enter} instead of {enter}"

This reverts commit e72453bb52.

* remove some unused act imports

* Fix LibraryPanelsSearch tests

* more stable test

* More consistent test...

Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-04-21 13:15:21 +01:00
Gabriel MABILLE
9ed7e48454 AccessControl: Modify provisioning to prevent built-in role assignment (#48031)
* Add basic and managed prefixes to avoid magic strings
For now let's stick with grafana_builtins
add function isBasic to RoleDTO
add function isBasic to Role

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

* Add team store to wire

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

Co-authored-by: Jguer <joao.guerreiro@grafana.com>
2022-04-21 14:14:45 +02:00
Ashley Harrison
b727c324b8 Hide navbar behind ready check to prevent flicker of navbar on login (#47968) 2022-04-21 13:07:10 +01:00
Ivana Huckova
52768d87c4 Update button name to make it more clear (#48042) 2022-04-21 12:24:11 +02:00
Eric Leijonmarck
8677552dda Service accounts: rename feature toggle (#48037)
* refactor: renaming service-accounts to serviceAccounts

* refactor: renaming service-accounts to serviceAccounts in docs

* tests
2022-04-21 10:41:37 +01:00
Ursula Kallio
ae8038c5c6 Use verb "to set up" instead of noun "setup" (#48029) 2022-04-21 11:36:14 +02:00
Joao Silva
34d4b571e6 Navigation: Fixes issue with menu closing when hovering back to the trigger (#47992) 2022-04-21 10:12:37 +01:00
Andrej Ocenas
ff5aef194c Prometheus: Highlight operations added in the query builder (#47961)
* Highlight newly added operations

* Better diff for the operations change

* Changed the highlight style
2022-04-21 10:26:27 +02:00
Leon Sorokin
5c3be630f2 TimeSeries: clamp max bar width to 200px (#48021) 2022-04-21 00:05:57 -05:00
Matthew Jacobson
8972418113 Alerting: Add integration test for AddDashAlertMigration (#47730)
* Alerting: Add integration test for AddDashAlertMigration

* Add more targeted test cases

* Apply suggestions from code review

Co-authored-by: gotjosh <josue.abreu@gmail.com>

* Reorganize file and improve comments

* Replace custom sort+trim with go-cmp

* Add test for AddDashAlertMigration

* Rename test cases to standard format

* Apply suggestions from code review

Co-authored-by: gotjosh <josue.abreu@gmail.com>

* Remove test-only snapshots of PostableUserConfig et al.

* Organize imports

* Fix linting

Co-authored-by: gotjosh <josue.abreu@gmail.com>
2022-04-21 04:02:23 +02:00
achatterjee-grafana
b034bd18b5 Docs: Adding What's New for the 8.5 release (#47995)
* initial commit

* more changes

* more changes

* run prettier check
2022-04-20 16:04:55 -04:00
Kat Yang
68478e908a Chore: Remove x from team (#47905)
* Chore: Remove x from team

* Update pkg/services/sqlstore/team.go

Co-authored-by: ying-jeanne <74549700+ying-jeanne@users.noreply.github.com>

* Update pkg/services/sqlstore/team.go

Co-authored-by: ying-jeanne <74549700+ying-jeanne@users.noreply.github.com>

* Refactor dialects and add ISAdminOfTeams to Store

* Add IsAdminOfTeams to mockstore

Co-authored-by: ying-jeanne <74549700+ying-jeanne@users.noreply.github.com>
2022-04-20 15:11:37 -04:00
Ryan McKinley
72b5af8d9b Testdata: add basic tank simulation (#47990) 2022-04-20 12:01:09 -07:00
Alexander Emelin
ce89d7e874 Comments: fix wrong SQL query generated if Settings are not empty (#47552) 2022-04-20 11:59:32 -07:00
Alex Khomenko
6c1994cb86 Use trialExpiry for determining if a user is on trial (#47975) 2022-04-20 21:37:54 +03:00
Nathan Marrs
d442608eb9 Canvas: Implement new constraint system (#47911)
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2022-04-20 09:59:49 -07:00
Yuriy Tseretyan
c1f766a374 Alerting: Fix navlinks for legacy alerting (#47972)
* split building legacy and ng alert nav links.
2022-04-20 11:49:20 -04:00
Yuriy Tseretyan
c1ec122f75 Alerting: Update RBAC documentation with information about alerting (#47858)
Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
2022-04-20 11:35:57 -04:00
kay delaney
e19e934178 UserListAdminPage: Reset page when changing filters (#47958) 2022-04-20 16:02:33 +01:00
Andreas Christou
d0b41f882e Transformations: Support escaped characters in key-value pair parsing (#47901)
* Additional logic to handle quoted values

* Simple test with quoted values that include spaces

* Update test description

* Updating logic to account for nested quotes

- Adding additional test for nested quotes

* Strip out line breaks and carriage returns pre-processing

* Fix typo in test result

* Update key-value logic to avoid regexp

- Minor changes to account for null values

* Correct escaping on test

* Additional tests

- Test for null values
- Test for nested separator characters
- Update quoting
2022-04-20 15:46:54 +01:00
Gilles De Mey
459c64fd44 Alerting: adds variable replacement to panel filters (#47962) 2022-04-20 16:29:55 +02:00
Marcus Efraimsson
0afc542998 Chore: Try to fix flaky reverse proxy test (#47957) 2022-04-20 16:24:06 +02:00
Jack Westbrook
7341124b1e Chore: Update latest.json to 8.4.7 (#47956) 2022-04-20 15:52:38 +02:00
Emil Tullstedt
d76e5d7c6a Usage stats: Detect Prometheus flavors (#47942)
* Naïve Prometheus flavor detector

* Add concurrency and memoization

* Remove concurrency

* Fix tests

* close response body

* Add tests
2022-04-20 13:51:33 +00:00
Joe Blubaugh
3d91047e6e Alerting: Notification URL points to alert view page instead of alert edit page (#47752)
Before this change, notifications generated by the Grafana Alertmanager
pointed to '/alerting/:ruleID/edit'. This change instead points them to
the view path '/alerting/grafana/:ruleID/view'. The view page has a
better UX, including timeseries display. It's also where many alert
state improvements will land in the next few versions of Grafana.

Fixes #45301

Signed-off-by: Joe Blubaugh <joe.blubaugh@grafana.com>
2022-04-20 21:43:55 +08:00
Sofia Papagiannaki
54962c2f0c Alerting: Rename Recipient path parameter to DatasourceID (#47949) 2022-04-20 16:20:17 +03:00
Grot (@grafanabot)
6eb41f9cb3 ReleaseNotes: Updated changelog and release notes for 8.4.7 (#47952) 2022-04-20 15:08:56 +02:00
kay delaney
db8d85e2f2 Folders: Fix flaky test (#47953) 2022-04-20 15:03:33 +02:00
Alex Khomenko
9c0aa09a85 Feature Highlights: update upgrade components UI (#47885)
* Highlights: add action prop

* Highlight team sync for trial users

* Add badges for trial highlights

* Move events to UpgradeBox

* Fix undefined license settings

* Update snapshot

* Update public/app/features/datasources/state/navModel.ts

Co-authored-by: Agnès Toulet <35176601+AgnesToulet@users.noreply.github.com>

* Update public/app/features/datasources/state/navModel.ts

Co-authored-by: Agnès Toulet <35176601+AgnesToulet@users.noreply.github.com>

* Update public/app/features/datasources/state/navModel.ts

Co-authored-by: Agnès Toulet <35176601+AgnesToulet@users.noreply.github.com>

* Update copy and event handling

Co-authored-by: Agnès Toulet <35176601+AgnesToulet@users.noreply.github.com>
2022-04-20 15:08:49 +03:00
Torkel Ödegaard
68aac0bd90 Prometheus/Loki: Fixes the query type option when multiple queries present (#47846) 2022-04-20 14:01:01 +02:00
Kevin Yu
01c22ee366 Azure Monitor: Migrate metrics queries to use a resource URI (#47696)
* migrate old query to new query

* remove new prefixed data fetchers

* fix lint

* add test cases for v7 and v8 query versions

* add mock ids in test

* add clarifying comment

* add types for azure monitor api data fetchers

* add additional comment to explain the types
2022-04-20 05:00:39 -07:00
Gábor Farkas
79c06fdddc Loki: add backend-forward mode to queries, update log-row-context (#47726)
* loki: add helper function to sort dataframe by time

* loki: add direction-attribute to queries

* loki: make log-row-context code backward-compatible

* better comment

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

* fixed test

* simplified code

Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
2022-04-20 13:52:15 +02:00
Ashley Harrison
e8fc6637ec Wrap individual meta items in zIndex: 0 (#47935) 2022-04-20 12:47:50 +01:00
Ivana Huckova
5c4459a723 Prometheus: Remove running of query on raw query toggle (#47938) 2022-04-20 13:33:59 +02:00
Ashley Harrison
8b4b57a6c6 Don't set autofocus on logarithmic base select (#47927) 2022-04-20 12:05:37 +02:00
kay delaney
8ae5dd74e6 Dashboards: Defer loading of plugin exports until panel is visible (#47361) 2022-04-20 11:56:19 +02:00
kay delaney
c48d8d1d48 Frontend: Add notification persistence behind feature flag (#47871) 2022-04-20 10:42:32 +01:00
Gilles De Mey
be3f52abb1 Alerting: grafana managed group names (#47785) 2022-04-20 11:41:33 +02:00
Giordano Ricci
c1490a464a Explore: minor copy changes (#47922)
* Explore: minor copy changes

* fix tests
2022-04-20 10:37:26 +01:00
kay delaney
ff60f39e96 Revert "DataLinks: Encode variable params for data link URLs (#46100)" (#47763)
This reverts commit b47f5433d7.
2022-04-20 10:15:36 +01:00
JM
1696a9abee Dashboard: remove name requirement from CleanLibraryPanelsForDashboard (#44692)
Co-authored-by: kay delaney <kay@grafana.com>
2022-04-20 10:05:59 +01:00
kay delaney
f9f4a4cbf6 Export: Explicitly include default datasources in exported dashboard json (#47244)
* Export: Explicitly include default datasources in exported dashboard json
2022-04-20 10:02:26 +01:00
Vardan Torosyan
cbd2d09d70 Update API Keys UI to adjust based on users permissions (#47802)
* Update API Keys UI to adjust based on users permissions

Since API Keys support now RBAC we need to ensure that UI
is adjusted based on the user permissions.

* Applying PR suggestions
2022-04-20 09:45:45 +02:00
Ieva
1588cd393a check that the user has RBAC permissions to save dashboard annotation (#47882) 2022-04-20 09:43:42 +02:00
Peter Holmberg
39d3c8afd7 Alerting: Fix issue with Slack contact point validation (#47559)
* secureFields and secureSettings

* revert channelIndex

* readd lost code

* use specific return

* register secure fields and use not hard coded index

* fix for determineReadOnly

* fix lint error

* fix test suite

Co-authored-by: gillesdemey <gilles.de.mey@gmail.com>
2022-04-20 09:40:57 +02:00
Sofia Papagiannaki
e58a015baf Swagger: annotate RoleType as enumeration (#47902) 2022-04-20 10:27:25 +03:00
Andres Martinez Gotor
70802447a5 AzureMonitor: Update kusto-monaco package (#47897) 2022-04-20 09:27:04 +02:00
Emil Tullstedt
24038d9985 Chore: Update Go version (#47914)
* Remove makefile (it's not used anymore)

* Directly download and install nodejs package

The Packages file for deb.nodesource.com/node_16.x doesn't list older
versions, so only the most recent version of nodejs is available. We
don't want to require every update to the build container to have to
update nodejs if a never version is available, so I manually download
the deb and install it with dpkg.

* Update Go version

* Update lib.star

* Generate new .drone.yml
2022-04-20 09:14:12 +02:00
Leon Sorokin
aa98123e72 TimeSeries: always try to detect & fix reverse-sorted time field (#47906) 2022-04-19 23:20:09 -05:00
Ryan McKinley
89fa35a53f Testdata: introduce basic simulation framework (#47863) 2022-04-20 02:42:29 +02:00
Ryan McKinley
f4e285b8b4 Timeseries: add zoom to data button (#47862) 2022-04-19 17:24:54 -07:00
Konrad Lalik
785145c045 Alerting: FGAC bug bash fixes (#47873)
* Improve new alert and new silence buttons permission handling

* Prevent loading alert rules when no sufficient permissions provided

* Improve add and edit rule permissions

* Add new rule CTA button for non-editors

* Update mock

* Fix imports
2022-04-19 18:43:33 +02:00
Yuriy Tseretyan
0c31399e34 Alerting: Fix nav-links for RBAC and other (#47798) 2022-04-19 11:47:28 -04:00
Kat Yang
a4081aebb7 Chore: Remove x from Org User (#47850)
* Chore: Remove x from org users

* Chore: Remove x.Dialect() from org users

* :poo:

* Update pkg/services/sqlstore/org_users.go

Co-authored-by: ying-jeanne <74549700+ying-jeanne@users.noreply.github.com>

* Update pkg/services/sqlstore/org_users.go

Co-authored-by: ying-jeanne <74549700+ying-jeanne@users.noreply.github.com>

* Update pkg/services/sqlstore/org_users.go

Co-authored-by: ying-jeanne <74549700+ying-jeanne@users.noreply.github.com>

Co-authored-by: ying-jeanne <74549700+ying-jeanne@users.noreply.github.com>
2022-04-19 10:55:49 -04:00
Ivana Huckova
677327ea07 Show error when operations, but no stream selector (#47890) 2022-04-19 16:54:08 +02:00
Isabella Siu
992c0604f9 CloudWatch: add dimensions component to variable editor (#47596) 2022-04-19 10:50:18 -04:00
Andres Martinez Gotor
2d8d9bc137 AzureMonitor: Fix Microsoft.ClassicCompute/domainNames namespace (#47877) 2022-04-19 16:23:52 +02:00
Gilles De Mey
69eb6efd6e Alerting: add confirmation modal for deleting notification policies (#47819) 2022-04-19 15:55:54 +02:00
Ivana Huckova
a068712ac2 Loki: Updates to raw query and run query button (#47874)
* Loki: Create toggle-able raw query

* Update name
2022-04-19 15:29:40 +02:00
Ivana Huckova
2aa6f4d17b Loki: Fix showing of default visual query only if no expression (#47764)
* AutoSizeInput: Fix updating of value

* Update

* Revert "Update"

This reverts commit a3b527e0c6.

* Revert "AutoSizeInput: Fix updating of value"

This reverts commit d4b4ae0a10.

* Fix showing of default visual query only if no expression

* Update public/app/plugins/datasource/loki/querybuilder/components/LokiQueryBuilderContainer.tsx

* Update public/app/plugins/datasource/loki/querybuilder/components/LokiQueryBuilderContainer.tsx

* Update

* Update
2022-04-19 15:29:27 +02:00
Peter Holmberg
4570615afc Alerting: Display alert instances instead of alert rules when creating silence (#47396)
* modify matchers util for instances

* filter alerts

* change label to include instances

* re add empty case
2022-04-19 15:08:19 +02:00
Ashley Harrison
bb5f77703c prevent horizontal scrollbar on firefox during expand animation (#47758) 2022-04-19 10:31:59 +01:00
Andrej Ocenas
378ce4f685 Prometheus: Add documentation for the query builder (#47324)
* Update documentation for the query builder

* Review feedback

* Update docs and add pictures
2022-04-19 11:25:28 +02:00
Joe Blubaugh
7d5cb170c6 Alerting: Sort StateHistoryItem after fetch instead of on render. (#47842)
PR #47674 attempted to sort a read-only managed async array. This change
moves the sort logic to the fetch code so sort happens once on fetch, to
a mutable array, rather than trying on each render for an immutable
array.

Signed-off-by: Joe Blubaugh <joe.blubaugh@grafana.com>
2022-04-19 16:05:28 +08:00
Kat Yang
c98d835f81 Chore: Remove remaining x from user (#47854) 2022-04-18 15:19:01 -04:00
Shirley
4f26129aa4 CloudWatch: Run query on blur in logs query field (#47454)
* Cloudwatch: add test to ensure RunQuery is fired onBlur of LogQuery

Also remove the `onBlur` prop for the `QueryField` in `LogsQueryField` since `QueryField` is configured to re-run
queries `onBlur` by default.

Co-authored-by: Sarah Zinger <sarah.zinger@grafana.com>
Co-authored-by: Isabella Siu <isabella.siu@grafana.com>
Co-authored-by: Adam Simpson <adam@adamsimpson.net>
2022-04-18 18:05:10 +00:00
Adela Almasan
858a1bd24e Geomap: Add color scale in legend (#47803)
Added color scale in geomap legend
2022-04-18 09:19:20 -05:00
Joe Blubaugh
516c8b60ee Unified Alerting: Stable order for state history annotations (#47674)
This change sorts the State History list returned by the backend by the
id in addition to the timeEnd and time fields by which it is
already sorted. This results in a stable view of the State History
table.

Fixes #45873

Signed-off-by: Joe Blubaugh <joe.blubaugh@grafana.com>
2022-04-18 10:42:45 +08:00
sam boyer
5e11af0121 schema: Finish converting dashboard schema datasource references to objects (#47806)
* coremodel: finish string -> object datasource ref

Seems we missed updating a couple of the datasource references from
strings to objects.

* cue fmt

* Also fix dashboard in scuemata dashboard schema

* Update devenv/dev-dashboards/panel-graph/graph-ng-stacking2.json

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

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2022-04-15 19:41:07 +02:00
Ryan McKinley
031a8e140a Chore: upgrade gocloud.dev and go mod tidy (#47797) 2022-04-15 07:48:44 -07:00
Dimitris Sotirakis
4510519941 Update grabpl (#47824) 2022-04-15 16:00:26 +02:00
Petros Kolyvas
67ff5f5815 Docs: Addition of more prominent link to docker conf (#46504)
* Docs: Addition of more prominent link to docker conf

Saw a comment on Reddit indicating a lack of information - docs were available, just a little hard to find. 

Added a note pointing our community to where they might find docker image configuration help.

* Update docs/sources/installation/docker.md

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

Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
2022-04-15 09:14:09 -04:00
Florian Cassayre
d4f7ea9f01 Chore: Fix typos (#47816) 2022-04-15 14:10:34 +02:00
ying-jeanne
7ddae870e7 fix status code 200 (#47818) 2022-04-15 08:01:58 -04:00
Sofia Papagiannaki
f263cad8ab Devenv: fix alert_webhook_listener (#44820) 2022-04-15 13:32:20 +02:00
Josh Hunt
720c6aac62 Dashboard: Add vertical spacing between variables when they wrap (#47762) 2022-04-15 11:05:53 +00:00
Ashley Harrison
7905957ee8 Navigation: Add shortcut to add new alert rule to alerting section behind feature toggle (#47713)
* Add new alert rule to alerting section

* Check access control for ability to create
2022-04-15 10:32:53 +01:00
Gabriel MABILLE
5579dcaa6f Chore: Fix TeamStore interface (#47810) 2022-04-15 10:33:28 +02:00
Armand Grillet
adbe374754 Alerting: fix SCC-S1017 linting issue in codebase (#47683) 2022-04-15 09:57:45 +02:00
Dimitris Sotirakis
508cc58a63 CI: Remove unused --github-token flag (#47773)
* Remove github token flag

* Minor cleanup

* Update grabpl
2022-04-15 10:42:58 +03:00
ying-jeanne
24468fdd67 Swagger: update swagger for datasource proxy api (#47690)
* update the swagger for datasource proxy api

* add enterprise spec changes
2022-04-15 10:31:54 +03:00
Eric Leijonmarck
b43e9b50b4 Service accounts: RBAC the service account UI (#47788)
* WIP

* fix: bug for saving name did not remove edit

* refactor: better error msg

* Display the column Roles even when user can't see the role picker

* Remove spaces when building the search query request

* Disable Edit button and fix token addition and deletion

* Fix the error message text

Co-authored-by: Vardan Torosyan <vardants@gmail.com>
2022-04-14 23:06:08 +01:00
sam boyer
2a178bd73c Introduce coremodels framework (extracted from intent-api) (#47653)
* Copy over most of coremodel from intent-api branch

* Fix import paths

* Fix incorrect provider name

* Add root compgen file, fixup componentroot.yaml

* go mod tidy

* Remove compgen for now

* Add dashboard coremodel

* Remove datasource coremodel, for now

* Tweak comments on dashboard struct model

* devenv: add dashboard testing directly

* Fixup dashboard schema for openness, heatmap

* Update Thema to tip

* Fix wire/registry references

* Fix hclog version
2022-04-14 14:54:35 -04:00
Alexander Weaver
758364e78b Alerting: Refactor GET/POST alerting config routes to be more extensible (#47229)
* Refactor GET am config to be extensible

* Extract post config route

* Fix tests

* Remove temporary duplication

* Fix broken test due to layer shift

* Fix duplicated error message

* Properly return 400 on config rejection

* Revert weird half method extraction

* Move things to notifier package and avoid redundant interface

* Simplify documentation

* Split encryption service and depend on minimal abstractions

* Properly initialize things all the way up to the composition root

* Encryption -> Crypto

* Address misc feedback

* Missing docstring

* Few more simple polish improvements

* Unify on MultiOrgAlertmanager. Discover bug in existing test

* Fix rebase conflicts

* Misc feedback, renames, docs

* Access crypto hanging off MultiOrgAlertmanager rather than having a separate API to initialize
2022-04-14 13:06:21 -05:00
Torkel Ödegaard
a126c07e54 DashboardPage: Remember scroll position when coming back panel edit / view panel (#47639)
* DashboardPage: Remember scroll position when coming back panel edit / view panel

* Use scollElement callback

* Fixed ts issue
2022-04-14 19:58:08 +02:00
Dominik Prokop
6a8f9b7ebc Table panel: Fix horizontal scrolling when pagination is enabled (#47776)
* Table panel: Fix horizontal scrolling when pagination is enabled

* Fix failing test
2022-04-14 09:35:37 -07:00
Serge Zaitsev
41012af997 Tracing: Use common traceID context value for opentracing and opentelemetry (#46411)
* use common traceID context value for opentracing and opentelemetry

* support sampled trace IDs as well

* inject traceID into NormalResponse on errors

* Finally the test passed

* fix the test

* fix linter

* change the function parameter

Co-authored-by: Ying WANG <ying.wang@grafana.com>
2022-04-14 17:54:49 +02:00
Kristina
ab4c7f14aa Explore: Follow up NoData work (#47745)
* Use theme styles and add basic test for rendering

* Use util function for response
2022-04-14 10:22:09 -05:00
Andy Lindberg
388b3bf908 Grafana/UI: Bundle raw SVG icon strings (#47665)
* Build: bundle raw svg icon strings in grafana/ui

* remove @rollup/plugin-image
2022-04-14 16:49:56 +02:00
Torkel Ödegaard
057ff5bcf5 Prometheus: Query builder UX tweaks and feedback link (#47655)
* Prometheus: Query builder UX tweaks and feedback link

* Remove .

* Fixed link

* added option to hide feedback links

* feedback link setting name change

* move config check

* fixed ts issue
2022-04-14 15:18:03 +02:00
Vardan Torosyan
782ec05d8c Create fixed roles for reading API Keys and service accounts and fix listing of service account tokens (#47767)
* Create fixed roles for reading API Keys and service accounts

* Handle PR comments and fix the listing of token
2022-04-14 15:09:55 +02:00
Giordano Ricci
f79e0c68cc Docs: remove outdated section from Explore docs (#47768) 2022-04-14 08:53:40 -04:00
idafurjes
ecd6cd4a92 Split preference store (#46843)
* Split preference store

* Chore: Add tests to pref

* Fix preference in wire

* Rename and adjust

* Add pref service test

* Rename methods, add tests

* Rename Preferences to Preference, names IDs correctly

* Fix lint

* Refactor Save

* Refactor upsert
Add new logic for QueryHistory
Rename some fields according to go naming conventions
Refactore tests

* Roll back ID that breaks tests

* Rename Id to ID in UpdatePreferenceQuery

* Use preference as a model to modify store

* Move pref store fakes to pref test file

* Add integration tag for store tests

* Adjust test

Co-authored-by: yangkb09 <yangkb09@gmail.com>
2022-04-14 14:22:00 +02:00
Jean-Philippe Quéméner
060ccacbf9 Alerting: unwrap upsert into insert and update function (#47731)
* Alerting: unwrap upsert into insert and update function

* add changelog entry

* remove changelog entry

* rename upsertrule to updaterule

* use directly alertrule model for inserts

* add test for updating a rule with a conflicting name
2022-04-14 14:21:36 +02:00
Nathan Rodman
c63086822d Alerting: Add FGAC to alerts tab in panel editor (#47732)
* add FGAC for alert panel tab

* add test for panel tabs

* Refactor condition

Co-authored-by: Konrad Lalik <konrad.lalik@grafana.com>
2022-04-14 14:19:15 +02:00
Dimitris Sotirakis
90892050d0 CI: Remove initialize step (#47622)
* Remove initialize step from pr.star

* Remove initialize step from main.star

* Remove initialize step from release.star

* Reorder dependencies

* Re-add identify runner step

* Add enterprise steps

* Remove is_downstream variable from starlark logic (#47715)

* Make init steps depend on init-enterprise for enterprise pipelines

* Exclude shellcheck from enterprise pipelines

* Add init steps to enterprise integration tests pipeline

* Add dependency for windows enterprise step

* Update grabpl version
2022-04-14 14:56:14 +03:00
Ieva
e50bd5cac8 Access control: expose SA frontend to users with the right permissions (#47727)
* expose frontend to users with permissions

* cover the ui endpoints

* fix permissions
2022-04-14 12:40:15 +01:00
Torkel Ödegaard
6f31a69bfd QueryEditorRow: Show query errors next to query in a consistent way across Grafana (#47613)
* Show query errors under each query row

* Testing a more plain error box

* Font size

* Make it green

* Nit UI

* Slight simplification of condition

* New design

* Update

Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
2022-04-14 12:57:56 +02:00
Sofia Papagiannaki
c8189e4808 API: enable proxying datasource calls using the datasource UID (#47634)
* Introduce additional routes
2022-04-14 13:28:13 +03:00
renovate[bot]
7916f3b638 Update dependency @betterer/regexp to v5.3.0 (#47759)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-04-14 09:16:28 +00:00
renovate[bot]
86ca14f7e6 Update dependency @betterer/betterer to v5.3.0 (#47757)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-04-14 11:01:04 +02:00
Ivana Huckova
5df05e31bb Loki: Use single string expr as a state for the visual editor (#47566)
* Loki: Use expr as state for visual editor

* Loki: Use query with line filter as default for visual editor

* Refactor based on feedback

* fix background for query text row

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
2022-04-14 10:59:39 +02:00
renovate[bot]
4c99e681b1 Update dependency @betterer/cli to v5.3.0 (#47703)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-04-14 09:46:58 +01:00
Torkel Ödegaard
e3590e1a9b Panels: Use the No value option when showing the no data message (#47675)
* Performance: Create separate div for portal root to limit reflow -> recalc style

* refactoring

* NoData: Use field config No value option as text when display no data message

* Use PanelDataErrorView in TabelPanel

* Add PanelDataErrorView to PieChart

* Updated
2022-04-14 10:10:03 +02:00
Ivana Huckova
aceedb3a32 Query history: Add migration endpoint (#47551)
* Add endpoint for migration

* Check for createdAt

* Query history: Remove returning of dtos

* Query history: Fix CreatedAt

* Refactor based on suggestions

* Insert into table in batches
2022-04-14 09:33:41 +02:00
Ryan McKinley
17e44c306c Heatmap: hover legend regardless of tooltip state (#47600) 2022-04-13 20:45:30 -07:00
Alexander Weaver
c266a4ac81 Alerting: Remove mis-behaving fake and fix masked test failure in AM config API (#47747)
* Remove misbehaving fake

* Fix bug and inject logger
2022-04-13 19:31:57 -05:00
Santiago
694a7e73dc notification template docs updated (#47744) 2022-04-13 16:47:53 -04:00
Jean-Philippe Quéméner
388ecb4037 Alerting: Provisioning API - Contact points (#47197) 2022-04-13 22:15:55 +02:00
Santiago
5fb80498b1 Apply templating on alert notifications on OK state (#47355)
* OK notifications using previous evaluation data

* copy rule.EvalMatches to avoid changes to the underlying array

* test cases added/modified

* delete trailing newline

* fix double newline in go import

* add change to the changelog

* specify that this only affects legacy alerting (changelog)

* use current eval data instead of prev eval data

* create evalMatch just once

* code comments, renamings, getTemplateMatches() function

* changelog and docs updated
2022-04-13 17:04:10 -03:00
Alexander Emelin
e00db6a826 Live: collect more usage stats – enabled, ha enabled, num nodes, channels, subs (#47378) 2022-04-13 12:27:03 -07:00
Yuriy Tseretyan
884c885289 Alerting: Support OK option for Error state (#47670)
* support OK state for Error
2022-04-13 14:45:29 -04:00
Eric Leijonmarck
17bd741fc0 SAML: fix pkcs8 doc and refactoring SAML docs (#47337)
* refactoring: saml docs

* refactoring: relreferences

* adding error as presented in issue

* refactor: update sentence

* refactor: more relref fixes that was missing

* refactor: more relref fixes that was missing

* Apply suggestions from code review

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

* refactor: move saml with okta

* fix: spell and small corrections

* add: enterprise tag

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
2022-04-13 17:18:59 +01:00
Ieva
a245531f0c Access control: service account role check (#47710)
* forbid setting role higher than user's role

* change response code

* can assign API key permissions to non-admin users

* add: assign viewer role directly upon creation

* refactor: add AddSATcommand infavor of AddAPIkey

* refactor: frontend fixes for ServiceAccountToken

Co-authored-by: eleijonmarck <eric.leijonmarck@gmail.com>
2022-04-13 18:11:03 +02:00
ying-jeanne
f62c261900 fix terminal format (#47718) 2022-04-13 17:37:56 +02:00
Leon Sorokin
dfdfe3f428 TimeSeries & BarChart: refactor stacking (#47373)
Co-authored-by: Zoltán Bedi <zoltan.bedi@gmail.com>
Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2022-04-13 10:29:03 -05:00
Jguer
3456793e0f AccessControl: fix value copying in method access and add LogID (#47694)
* AccessControl: fix value copying in method access and add LogID

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

* Lint.

Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com>
Co-authored-by: gamab <gabi.mabs@gmail.com>
2022-04-13 17:22:53 +02:00
Konrad Lalik
a30ab51550 Alerting: FGAC for alert rule view and edit page (#47441)
* Add permission check to the find route, add query not accessible warning for the view page

* Hide grafana or mimir rule buttons depending on user's permissions

* Add grafana and cloud read rules checking on the alert rules list view

* Improve missing data source handling, refactor edit and remove permissions handling

* Add tests for rule edit permissions

* PR feedback
2022-04-13 17:19:54 +02:00
Connor Lindsey
939a778111 NodeGraph: Detect dataframes more accurately based on fields (#47213)
* NodeGraph: Detect dataframes more accurately based on fields

* Make get fields case insensitive

* Update node graph docs
2022-04-13 17:18:40 +02:00
Alex
6db470c11e Explore: no data returned (#46987)
* Explore: no data message

display no data text when query executed succesfully but no data was
returned

* Explore: 'no-data' display logic and styling fix

* pipeline trigger

* Revert "pipeline trigger"

This reverts commit f08d246ba767e66344ad252577523f391832ec18.

* Add more parameters for when to show no data

* Change check to use frame length

Co-authored-by: Kristina Durivage <kristina.durivage@grafana.com>
2022-04-13 10:17:07 -05:00
Andres Martinez Gotor
a57716f868 AzureMonitor: Include macros and template variables as suggestions (#47689) 2022-04-13 15:56:32 +02:00
kay delaney
38809d73c2 Nav: Icon clickable area fills all available space (#47334)
Closes #47255
2022-04-13 14:41:48 +01:00
Serge Zaitsev
e86b6662a1 Chore: Remove bus.Bus field (#47695)
* Chore: Remove bus.Bus field

* fix integration test
2022-04-13 15:24:13 +02:00
renovate[bot]
337d5bf423 Update dependency @betterer/betterer to v5.2.1 (#47700)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-04-13 13:10:24 +00:00
renovate[bot]
59a0c715f4 Update dependency react-select-event to v5.5.0 (#47308)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-04-13 13:51:06 +01:00
Jack Westbrook
c3db3121b0 Chore: Bump moment to 2.29.2 (#47680)
* chore: bump moment to 2.29.2

* chore(yarn): clean up remaining moment nested deps
2022-04-13 14:46:58 +02:00
Eric Leijonmarck
673a2ab49e fix: bug where disabled didnt disable the use of service account (#47688) 2022-04-13 13:40:58 +01:00
Dimitris Sotirakis
ab5e2e10ce Remove brackets (#47691) 2022-04-13 14:06:22 +02:00
Konrad Lalik
d7516f11b3 Add permission checking to alert rules in the folders view (#47686) 2022-04-13 14:05:29 +02:00
renovate[bot]
32511f3d06 Update Storybook updates to v6.4.21 (#47523)
* Update Storybook updates to v6.4.21

* chore(yarn): update yarnrc storybook versions

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com>
2022-04-13 12:26:19 +02:00
Vardan Torosyan
463f00b93f Reload permissions cache when adding a datasource (#47658) 2022-04-13 11:58:18 +02:00
Artur Wierzbicki
46dc1e98fa Previews: track oss adoption 2022-04-13 11:54:49 +02:00
Dimitris Sotirakis
1957863b67 Update grabpl (#47643) 2022-04-13 12:22:39 +03:00
Shirley
fe3a27a2ab Fix wildcard on branches-ignore backport (#47679)
Fixes https://github.com/grafana/code-coverage/issues/11
2022-04-13 11:15:22 +02:00
ying-jeanne
06d2d44031 put the default logger format and feature toggle to fallback to old logger (#47584) 2022-04-13 11:02:19 +02:00
dependabot[bot]
232d880fe0 Bump go.opentelemetry.io/otel/trace from 1.2.0 to 1.6.3 (#47544)
Bumps [go.opentelemetry.io/otel/trace](https://github.com/open-telemetry/opentelemetry-go) from 1.2.0 to 1.6.3.
- [Release notes](https://github.com/open-telemetry/opentelemetry-go/releases)
- [Changelog](https://github.com/open-telemetry/opentelemetry-go/blob/main/CHANGELOG.md)
- [Commits](https://github.com/open-telemetry/opentelemetry-go/compare/v1.2.0...v1.6.3)

---
updated-dependencies:
- dependency-name: go.opentelemetry.io/otel/trace
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-04-13 10:58:20 +03:00
Jack Westbrook
b8e3c77adb Chore: Bump minimist to 1.2.6 (#47401) 2022-04-13 09:52:51 +02:00
Torkel Ödegaard
6042beab43 Performance: Create separate div for portal root to limit reflow -> recalc style (#47633)
* Performance: Create separate div for portal root to limit reflow -> recalc style

* refactoring
2022-04-13 07:39:22 +02:00
Artur Wierzbicki
a4381ebc91 Previews: create crawler auth setup service (#47349)
* #46968: add `RetrieveServiceAccountIdByName` to serviceaccounts service

* #46968: improve error logging in rendering service

* #46968: add oss crawler account setup

* #46968: fix tests

* #46968: switch back to ROLE_ADMIN

* #46968: rename to crawlerAuth

* comment crawler_auth.go
2022-04-12 19:34:04 +02:00
Piotr Jamróz
5cb5141c72 Query History: Move local storage specific settings to persistence layer (#47500)
* Load Rich History when the container is opened

* Store rich history for each pane separately

* Do not update currently opened query history when an item is added

It's impossible to figure out if the item should be added or not, because filters are applied in the backend. We don't want to replicate that filtering logic in frontend. One way to make it work could be by refreshing both panes.

* Test starring and deleting query history items when both panes are open

* Remove e2e dependency on ExploreId

* Fix unit test

* Assert exact queries

* Simplify test

* Fix e2e tests

* Fix toolbar a11y

* Reload the history after an item is added

* Fix unit test

* Remove references to Explore from generic PageToolbar component

* Update test name

* Fix test assertion

* Add issue item to TODO

* Improve test assertion

* Simplify test setup

* Move query history settings to persistence layer

* Fix test import

* Fix unit test

* Fix unit test

* Test local storage settings API

* Code formatting

* Fix linting errors

* Add an integration test

* Add missing aria role

* Fix a11y issues

* Fix a11y issues

* Use divs instead of ul/li

Otherwis,e pa11y-ci reports the error below claiming there are no children with role=tab:

Certain ARIA roles must contain particular children
   (https://dequeuniversity.com/rules/axe/4.3/aria-required-children?application=axeAPI)

   (#reactRoot > div > main > div:nth-child(3) > div > div:nth-child(1) > div >
   div:nth-child(1) > div > div > nav > div:nth-child(2) > ul)

   <ul class="css-af3vye" role="tablist"><li class="css-1ciwanz"><a href...</ul>

* Clean up settings tab

* Remove redundant aria label

* Remove redundant container

* Clean up test assertions
2022-04-12 18:55:39 +02:00
Ieva
d0abe1bb3d Annotation FGAC checks for comments (#47468)
* typo

* remove unwanted change

* remove unwanted change
2022-04-12 17:30:50 +01:00
Gábor Farkas
a15c2021fe Loki: improve backend-compatibility (#47579)
* loki: annotation queries: make them ready for the backend-mode

* removed unused code
2022-04-12 18:23:19 +02:00
Artur Wierzbicki
712b239d5a Storage: remove pointer on write path (#47580)
* remove pointer to contents in UpsertFileCommand

* add command to UpsertFileCommand

* fix client after API refactor
2022-04-12 16:58:09 +02:00
Piotr Jamróz
7f5e8bb00f Temporarily skip a test that is intermittently timing out and causing build failures. (#47637) 2022-04-12 16:48:37 +02:00
Kristin Laemmert
884e06ec45 chore: go mod tidy (#47648) 2022-04-12 10:46:22 -04:00
Andres Martinez Gotor
35f52aee55 AzureMonitor: Fix Kusto editor schema (#47576) 2022-04-12 16:42:33 +02:00
Dimitris Sotirakis
3e030d137f CI: Remove unused downstream build pipelines (#47646)
* Remove unused downstream build pipelines

* Prettify
2022-04-12 16:36:49 +02:00
Ryan McKinley
f80a0d2a9b PanelQueryRunner: use refId from results if the key value was not set in the packet (#47598) 2022-04-12 07:24:46 -07:00
Shirley
4b889eb336 Change to pointer receiver in mock call (#47575) 2022-04-12 16:22:28 +02:00
Andres Martinez Gotor
6592ac537a AzureMonitor: Skip App Insights check for v9 (#47624) 2022-04-12 16:20:32 +02:00
Andrej Ocenas
95009995e4 Prometheus: Move count_values from function to aggregation (#47260)
* Move count_values from function to aggregation

* Fix typos

* Fix loki operations

* Fix error that change the aggregation variant on blur

* Fix loki ops
2022-04-12 16:08:50 +02:00
Maria Alexandra
85de0d88c7 Navigation: Show only + icons in overlay menu for new NavBar (#47347)
* Nav: Show overlay icons based on allowed list

* user essentials mob! 🔱

* Navigation: clean up and use new backend prop to show plus icons and
improve visual styling

* Nav: Fix top padding

* refactor to not use showIconInNavbar in NavBarMenuItem

* remove a missed bit

* refactor icon into const

Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2022-04-12 14:51:40 +01:00
kay delaney
f10047b708 Dashboard: Refactor panel cleanup (#47323) 2022-04-12 14:12:03 +01:00
Andrej Ocenas
c449aadc1b Prometheus: Fix executing query onBlur in Explore (#47561) 2022-04-12 14:55:57 +02:00
ying-jeanne
e979690011 Linter: fix linter for golangci-lint version v1.45.0 (#47623)
* Update golangci-lint to v1.45.2

Version 1.45.0 added support for Go 1.18:

https://github.com/golangci/golangci-lint/blob/master/CHANGELOG.md#v1450

Signed-off-by: Marcelo E. Magallon <marcelo.magallon@grafana.com>

* Linter: fix some lints issue for golangci-lint version 1.45.2

Co-authored-by: Marcelo E. Magallon <marcelo.magallon@grafana.com>
Co-authored-by: Gábor Farkas <gabor.farkas@gmail.com>
2022-04-12 08:15:16 -04:00
Dominik Prokop
98cbecc4a5 Allow queries import when changing data source type (#47435)
* Enable queries import when changing datasource

* Supporting empty imports

* Review applied
2022-04-12 04:52:55 -07:00
Agnès Toulet
3b2ca399e2 Chore: update latest.json (#47627) 2022-04-12 13:52:27 +02:00
Torkel Ödegaard
7181efd1cf Explore: Allow users to save Explore queries to dashboards (#47083)
* Select: Expose AsyncSelectProps interface

* DashboardPicker: Add a generic DashboardPicker component

* Dashboard Service: improve types

* Explore: allow saving explore state in a new panel in an existing dashboard

* Handle saving provisioned dashboards error

* Improve test coverage

* simplify test setup

* Strip base path from url when redirecting to a dashboard

* Keep existing variables when saving to an existing dashboard

* group assertions in test

* SearchCard: handle undefined in meta.updated

* Change required error message

* Add to dashboard alternative

* Add to existing is working

* Add to dashboard form

* remove default add-panel when creating a dashboard from explore

* types cleanup

* remove unneeded BE change

* simplify selector

* Add explore2Dashboard feature toggle

* add tests

* Small refactor & add tests

* small DashboardPicker improvements

* use partial from lodash

* Better error handling

* improve tests & disable button when there are no queries

* rename addPanelToDashboard function

* remove localStorage item if opening tab fails

* UI touchups & tracking

* Fix tests & remove close reporting

* remove echologger debug

* fix adding a panel to an existing dashboard

* Enable explore2Dashboard by default and add docs

* Ensure each panel in dashboards has a valid ID

* force CI restart

Co-authored-by: Elfo404 <me@giordanoricci.com>
2022-04-12 13:26:07 +02:00
Gábor Farkas
d95468a4bb Loki: use millisecond-steps (#47572)
* loki: use millisecond-steps

* better comment

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

* better comment

Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
2022-04-12 12:30:39 +02:00
Gábor Farkas
8db35b9b0b loki: backend-mode: allow for dashboards too (#47578) 2022-04-12 12:16:05 +02:00
Ieva
a5530d36a7 Access-control: documentation for general folder uid restrictions (#47567)
* add caveats for general folder

* expand the list of resources covered by fgac

* Update folder.md

remove unneeded comment
2022-04-12 12:12:18 +02:00
felixdoerre
9024340487 fix: postgresql ipv6 host should not be enclosed in square brackets (#47522) 2022-04-12 11:11:11 +01:00
Gábor Farkas
eca61e6dd7 loki: removed unused fields, params, attributes (#47571)
* loki: refactor: removed unused param

* loki: removed unused attribute

* loki: removed unused fields

* loki: remove unused query.format

* loki: removed unused prop
2022-04-12 12:09:47 +02:00
Grot (@grafanabot)
9a0f626948 ReleaseNotes: Updated changelog and release notes for 8.4.6 (#47612)
* ReleaseNotes: Updated changelog and release notes for 8.4.6

* update changelog and release notes

Co-authored-by: Agnès Toulet <agnes.toulet@gmail.com>
2022-04-12 12:03:19 +02:00
Gábor Farkas
68511e7712 loki: use single-dataframe format on the backend (#47069) 2022-04-12 11:58:48 +02:00
Ivana Huckova
201557c6fc Query history: Save user preferences in database (#47506) 2022-04-12 11:42:42 +02:00
Dimitris Sotirakis
cfaf058b20 Storybook: Add store-storybook command (#47557)
* Add store-storybook command

* Update grabpl version
2022-04-12 12:26:45 +03:00
Gabriel MABILLE
8bd825e16c AccessControl: Make the built-in role definitions public (#47525)
* AccessControl: Make the built-in role definitions public

* Add context to RegisterFixedRoles

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

* Making BuiltInRolesWithParents public to the AccessControl package

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

Co-authored-by: Jguer <joao.guerreiro@grafana.com>
2022-04-12 09:53:43 +02:00
ying-jeanne
0bf889e058 Fix unmaarshal of double pointer (#47586)
* Fix unmaarshal of double pointer

* update sdk version
2022-04-12 09:30:34 +02:00
Garrett Guillotte
42431e6ad4 Explore/Logs: Improve and add descriptions of Explore's Escape newlines feature (#46709)
* Explore/Logs: Clarify phrasing of newline escape fix tooltip

Rewrite the tooltip for the smart feature in PR #31352 that
replaces incorrectly escaped newlines in log lines.

-   Clarify the functionality of the feature to emphasize its
    interactivity.
-   Remove language suggesting that the feature is experimental,
    when we intended to suggest reviewing the results manually for
    correctness.

* Docs: Document escape newlines feature

Describe and provide steps for using the "Escape newlines" feature
in Explore added in PR #31352.

* Rewrite topic lead to clarify conditional behavior

* Describe reversion of replacements as a standalone task

Reverting the replacements is a separate action, so it should have
its own task. This also describes the option's transformation and
tightens the task language.

* Remove Grafana 7 version qualifier

* Clarify escape sequence detection lede on task

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

* Clarify "Remove escaping" state change

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

* Clarify confidence of tooltip content

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

Co-authored-by: Fiona Artiaga <89225282+GrafanaWriter@users.noreply.github.com>
Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
2022-04-12 09:22:28 +02:00
Joe Blubaugh
51c98b182d Unified Alerting: UI explains "match all" case in Notification Policies. (#47574)
This change makes it explicit in the UI that a notification policy with no matching labels matches all alerts that it processes. There are visual changes in both the Notification Policy editor, and in the Notification Policy table where matching columns are shown.

It's valid to have a notification policy with no label matchers attached. Such a policy matches all alerts sent to it. It's a common stumbling block for users. Where are all my alerts going?

Co-authored-by: gillesdemey <gilles.de.mey@gmail.com>
2022-04-12 10:42:17 +08:00
jcolladokuri
7a8437020d Azure Monitor: Bug Fix for for template variables (#47478) 2022-04-11 19:36:51 -04:00
Yuriy Tseretyan
af9353caec Alerting: Add check for datasource permission in alert rule read API (#47087)
* add check for access to rule's data source in GET APIs

* use more general method GetAlertRules instead of GetNamespaceAlertRules.
* remove unused GetNamespaceAlertRules.

Tests:
* create a method to generate permissions for rules
* extract method to create RuleSrv
* add tests for RouteGetNamespaceRulesConfig
2022-04-11 17:37:44 -04:00
Jamie DeMichele
614fd04653 CloudWatch: Added missing MemoryDB Namespace metrics (#47290)
CloudWatch: Added missing MemoryDB metrics
2022-04-11 16:35:50 -04:00
Kristin Laemmert
8f6877e12a chore: remove all remaining uses of golang.org/x/net/context (#47564)
* chore: remove all remaining uses of  golang.org/x/net/context

This PR finishes the work started in #47532, replacing all calls to that package with the stdlib context and using http.NewRequestWithContext to include the context where necessary.

Bonus: small formatting fixes to goimports in these files.

closes #44178

* tweak: use context.Background in favor of TODO for tests
2022-04-11 14:20:10 -04:00
ying-jeanne
03ba91e8a4 add feature toggle with new format (#47336)
* add feature toggle with new format

* fix some comments ❤️

* Update pkg/infra/log/term/terminal_logger.go

Co-authored-by: Emil Tullstedt <emil.tullstedt@grafana.com>

Co-authored-by: Emil Tullstedt <emil.tullstedt@grafana.com>
2022-04-11 18:50:29 +02:00
Ashley Harrison
fb0f30e30b Navigation: wrap long items in the menu correctly (#47431)
* start implementing wrapping behaviour

* handle more cases

* minWidth > width to preserve mobile behaviour

* Better css
2022-04-11 17:19:33 +01:00
Connor Lindsey
1ed83eb9b2 Tracing: Add README files for tracing datasource plugins 2022-04-11 18:16:38 +02:00
Yuriy Tseretyan
48519f9ebb Alerting: reduce database calls in prometheus-comptible rules API (#47080)
* move validation at the beginning of method
* remove usage of GetOrgRuleGroups because it is not necessary. All information is already available in memory.
* remove unused method
2022-04-11 10:54:29 -04:00
Eric Leijonmarck
7be8fe027f Add docs for service accounts 8.5 (#46801)
* initial doc for service accounts

* service account token calls complete

* service account tasks

* Update docs/sources/http_api/serviceaccount.md

* adding a token to the service account

* removed unused file

* refactor: review comments

* feat: add API key documentation

* fix: spelling

* Update docs/sources/administration/service-accounts/about-service-accounts.md

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

* Update docs/sources/administration/service-accounts/about-service-accounts.md

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

* Update docs/sources/http_api/serviceaccount.md

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

* Update docs/sources/administration/service-accounts/enable-service-accounts.md

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

* Update docs/sources/administration/service-accounts/enable-service-accounts.md

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

* Update docs/sources/administration/service-accounts/enable-service-accounts.md

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

* Update docs/sources/administration/service-accounts/enable-service-accounts.md

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

* Update docs/sources/administration/service-accounts/enable-service-accounts.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>

* Update docs/sources/administration/api-keys/about-api-keys.md

* refactor: based on review

* removed the permissions for apikeys, as they are not necessary

* Apply suggestions from code review

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

* Update docs/sources/administration/service-accounts/create-service-account.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>

* update based on review

* Fix formatting of bullet points

* formatting

* refcator

Co-authored-by: Jguer <joao.guerreiro@grafana.com>
Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
Co-authored-by: Vardan Torosyan <vardants@gmail.com>
2022-04-11 15:45:02 +01:00
Kristin Laemmert
bda3dd24e4 chore: remove golang.org/x/net/context in favor of stdlib (#47532)
This PR removes golang.org context imports under pkg/services/* and replaces them with the stdlib context.

Closes #44178
2022-04-11 08:46:21 -04:00
Ieva
ef4c2672b3 Access control: SQL filtering for annotation listing (#47467)
* pass in user to attribute scope resolver

* add SQL filter to annotation listing

* check annotation FGAC permissions before exposing them for commenting

* remove the requirement to be able to list all annotations from annotation listing endpoint

* adding tests for annotation listing

* remove changes that got moved to a different PR

* unused var

* Update pkg/services/sqlstore/annotation.go

Co-authored-by: Ezequiel Victorero <evictorero@gmail.com>

* remove unneeded check

* remove unneeded check

* undo accidental change

* undo accidental change

* doc update

* move tests

* redo the approach for passing the user in for scope resolution

* accidental change

* cleanup

* error handling

Co-authored-by: Ezequiel Victorero <evictorero@gmail.com>
2022-04-11 13:18:38 +01:00
Marcus Efraimsson
4bc582570e Instrumentation: Proxy status code correction and various improvements (#47473)
For a proxied request, e.g. Grafana's datasource or plugin proxy:
If the request is cancelled, e.g. from the browser, the HTTP status code is 
now 499 Client closed request instead of 502 Bad gateway.
If the request times out, e.g. takes longer time than allowed, the HTTP status 
code is now 504 Gateway timeout instead of 502 Bad gateway.
This also means that request metrics and logs will get their status codes 
adjusted according to above.

Fixes #46337
Fixes #46338
2022-04-11 13:17:08 +02:00
Aleksandr Stepanov
c0104db72d bugfix: fix proper type of setting maxConcurrentShardRequests (#47120) 2022-04-11 10:29:49 +02:00
Sofia Papagiannaki
2478785aaf Release engineering squad owns pkg/build (#47546) 2022-04-11 10:28:40 +02:00
Jack Westbrook
398f2b3d18 Build: Fix failing recompile of Grafana packages (#47492)
* build(packages): remove incremental as cache fails to recompile

* build(packages): remove tsBuildInfoFile property from tsconfig files
2022-04-11 09:41:03 +02:00
Michael Mandrus
4318ffdd46 SAML: Allow disabling of SAML signups (#47481)
* Add new error message for signup not allowed errors

* Add documentation on new SAML signup option

* Accept documentation feedback

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

* Accept documentation feedback

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

* run prettier:write

Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
2022-04-08 18:47:07 -04:00
Nathan Marrs
99bb6ebd2b Search: Update tag filter options dynamically (#47165) 2022-04-08 12:18:52 -07:00
Kevin Yu
ebe5f3646f AzureMonitor: Use Resource Picker in Metrics Query Editor (#47164)
* wip: new metrics query editor

* prepend subscriptions to url path

* remove duplicated setQueryValue file

* add tests for new metrics query editor

* wip start extracting resource field into a shared component

* fix query editor test

* fix up backend tests

* move azure monitor specific getters to azure_monitor_datasource

* use existing useAsyncState hook

* extract useAsyncState into separate file

* add datahooks tests

* extract resource field component

* cleanup

* clarify variable names

* remove logs query specific resource field component

* add url_builder test

* add azure_monitor_datasources tests

* address comments

* add types

* pass resourceUri to resource field component

* add test to check we reset the query fields when changing resources
2022-04-08 08:49:46 -07:00
Josh Hunt
e3b123c3fc GrafanaUI: Change chevron directions for open/closed state (#47386) 2022-04-08 16:37:25 +01:00
Eric Leijonmarck
883ce5ad30 Service accounts: UI polish improvements (#47461)
* ui polishes

* change icon
2022-04-08 16:23:03 +01:00
Gilles De Mey
7e844064a4 Alerting: fix collapsable toggle text regression (#47517) 2022-04-08 17:15:19 +02:00
Serge Zaitsev
18e93c7077 Chore: Remove bus (#47511)
* Chore: Remove bus

* remove unused const
2022-04-08 16:15:06 +02:00
brendamuir
1a88612e82 fixed dashboard spelling (#47515) 2022-04-08 17:09:01 +03:00
Gilles De Mey
c530100d45 fix: don't allow editing rule types for existing rules (#47512) 2022-04-08 15:26:33 +02:00
Serge Zaitsev
b31c7d3654 Chore: Remove bus from alerting rule (#47508)
* Chore: Remove bus from alerting rule

* fix alerting tests

* fix provide service
2022-04-08 14:30:25 +02:00
Serge Zaitsev
ad432108e6 Chore: Remove bus from dashboards provisioning (#47495)
* Chore: Remove bus from dashboards provisioning

* fix symlink test, make it run on darwin

* remove unused mock
2022-04-08 13:56:38 +02:00
Emil Tullstedt
3df625e9f4 UsageStats: Move stats collection to separate service (#47381)
* Remove specific stats from usage stats service

* Create statscollector service

* refactor

* Update and move tests

Mostly equivalent tests to before, but they've been divided over the two
services and removed the behavior driven legacy from GoConvey to
reduce the complexity of the tests.

* Collect featuremgmr metrics (copied over from #47407)

I removed the metrics registration from the feature manager in the merge
and re-add them in this commit. Separated to make things easier to
review.
2022-04-08 13:41:26 +02:00
Konrad Lalik
87383b1c8b Alerting: FGAC for alert rules page (#47418)
* Apply FGAC on the alert rules list page

* Add tests for edit, delete and silence buttons

* Unify access-control helpers

* Fix import

* Add route permissions for alert groups, unify access control helpers

* Improve buttons with data source explore permission

* Fix test
2022-04-08 13:34:02 +02:00
Artur Wierzbicki
f1a1070d41 UsageStats: track enabled features (#47407)
* #47127: include enabled features in the usage stats reports

* #47127: convert feature names to snake cased metric names

* #47127: remove dead code

* #47127: lint fix

* #47127: convert GetUsageStats to return `map[string]interface{}`

* #47127: fix testssssssss

* #47127: fix testssssssss
2022-04-08 12:42:33 +02:00
Josh Hunt
416da59c43 Routing: Fix links to different port from being treated as internal links (#45192)
* Add some failing tests that trigger the bug

* start at refactor of stripBaseFromUrl
2022-04-08 10:44:17 +01:00
Gábor Farkas
beed3fd5de loki: remove unused reverse-attribute (#47494) 2022-04-08 12:24:09 +03:00
Gábor Farkas
9574f447bb grafana-data: removed DataQueryRequest.reverse (#47487) 2022-04-08 12:00:16 +03:00
Serge Zaitsev
2cf88cfec8 Chore: Remove bus from contexthandler (#47458)
* Chore: remove bus from contexthandler

* remove bus from orgredirect
2022-04-08 10:33:19 +02:00
dependabot[bot]
c8514756be Bump actions/checkout from 2 to 3 (#46068)
Bumps [actions/checkout](https://github.com/actions/checkout) from 2 to 3.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v2...v3)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-04-08 09:26:30 +01:00
Dimitris Sotirakis
ce2a9252c2 Replace with secret (#47488) 2022-04-08 10:06:45 +02:00
Gábor Farkas
e1438990ae Loki: use the same dataframe-format for both live and normal queries (#47153)
* loki: use single dataframe-format for both live and normal queries

* better comment

* better function-name

* simplified code

* logs_model: added test
2022-04-08 09:57:06 +02:00
Ivana Huckova
7ab910af48 Query history: Search in comments (#46761) 2022-04-08 09:35:34 +02:00
Joe Blubaugh
631dd718a2 47470: Add additional delay to silences in test. (#47482)
This test of silence cleanup was flaky because of its use of real wall
time. In CI environments with slow execution, delays could cause the
test to fail. This change mitigates the problem by increasing the end time of
silences in the test.

After Prometheus merges this PR: https://github.com/prometheus/alertmanager/pull/2867
we can make the test fully deterministic by using a fake clock.

Fixes #47470

Signed-off-by: Joe Blubaugh <joe.blubaugh@grafana.com>
2022-04-08 14:52:08 +08:00
Jeff Levin
4a4d87dbdc add public dashboards feature flag (#47364) 2022-04-07 10:30:19 -08:00
Alexander Weaver
c3ad36ba72 Temporarily skip intermittent test (#47471) 2022-04-07 12:52:00 -05:00
Stephanie Closson
222325c7f1 Fix: Parse exemplars before parsing heatmap data (#47463)
* parse exemplars before parsing the heatmap. Exemplars are overlayed. Not part of the main heatmap

* added tests
2022-04-07 13:49:54 -03:00
Christopher Moyer
883f9f718f Docs: corrects typos (#47464) 2022-04-07 18:25:58 +02:00
renovate[bot]
74a5650156 Update dependency jest-junit to v13.1.0 (#47446)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-04-07 18:23:22 +02:00
gotjosh
94f72acbb3 Alerting: Introduce an internal changelog (#47390)
* Alerting: Introduce an internal changelog

Please note that this is not intented to replace Grafana's "add to changelog" label. It is _mostly_ for internal consumption of the Alerting team that owns this part of Grafana.

* Fix markdown formatting

* Fix changelog entry
2022-04-07 15:24:26 +01:00
Agnès Toulet
59388bf546 Config: fix buildInfo initialization (#47402)
* Config: fix buildInfo initialization

* change default to be parseable

* apply default values for buildInfo
2022-04-07 16:17:37 +02:00
renovate[bot]
21d82132bb Update dependency webpack to v5.72.0 (#47309)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-04-07 15:54:26 +02:00
Josh Hunt
b857f8339e TestData: Interpolate variables in more fields (#47158)
* TestData: Interpolate variables in more fields

* only interpolate variables if the field is set

* Correctly type scenarioId which can be undefined
2022-04-07 14:45:14 +01:00
ying-jeanne
29b8d5d295 remove the parallele to avoid concurrency (#47447) 2022-04-07 15:45:03 +02:00
renovate[bot]
fba31c2708 Update dependency @testing-library/dom to v8.13.0 (#47423)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-04-07 14:25:16 +01:00
Tania
1c13bfdd1b Chore: Update pre version (#47438) 2022-04-07 14:32:37 +02:00
Tania
4b8a202232 Update latest json (#47437) 2022-04-07 14:14:18 +02:00
Ashley Harrison
d95782845d Navigation: add aria-label to NavBarToggle (#47434)
* add aria-label to NavBarToggle

* use open/close instead
2022-04-07 14:14:01 +02:00
Grot (@grafanabot)
af71e77e6c ReleaseNotes: Updated changelog and release notes for 8.5.0-beta1 (#47433)
* ReleaseNotes: Updated changelog and release notes for 8.5.0-beta1

* Update release notes

* Update changelog

Co-authored-by: Tania <yalyna.ts@gmail.com>
2022-04-07 13:38:38 +02:00
Josh Hunt
41642fd5f4 Modify the Server Error scenario to return frontend errors (#47157) 2022-04-07 10:59:49 +01:00
renovate[bot]
c3fe027d58 Update dependency @reduxjs/toolkit to v1.8.0 (#45950)
* Update dependency @reduxjs/toolkit to v1.8.0

* Fix type errors

* simplified code

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: kay delaney <kay@grafana.com>
Co-authored-by: Piotr Jamróz <pm.jamroz@gmail.com>
Co-authored-by: Gábor Farkas <gabor.farkas@gmail.com>
2022-04-07 11:27:58 +02:00
kay delaney
0cff2d5980 Library panels: Fix issue where query editor options wouldn't be updated (#47242)
Closes #47241
2022-04-07 09:39:54 +01:00
Giordano Ricci
ca286a238d Explore: Add explore2Dashboard feature toggle (#47395) 2022-04-07 09:26:01 +01:00
Timur Olzhabayev
25235b3167 Removing plugin list panel (#46914)
The core plugin named plugin list panel is removed
2022-04-07 09:54:27 +02:00
Gábor Farkas
6e0826a986 loki: do not convert NaN to null (#45389) 2022-04-07 09:44:04 +02:00
Victor Marin
0639ccbdff Histogram Panel: Take decimal into consideration (#47330) 2022-04-07 09:56:23 +03:00
Dimitris Sotirakis
0845ba1abb Make gsutil command don't fail if dir doesn't exist (#47394) 2022-04-07 09:30:09 +03:00
Nathan Marrs
015a31644c Search: clean up styling (#47221) 2022-04-06 16:59:24 -07:00
achatterjee-grafana
916749897c Updated exemplar configuration details (#47411)
* Updated exemplar configuration details

* Added a new property, rearranged existing properties, and ran prettier.
2022-04-06 15:56:47 -04:00
achatterjee-grafana
ee91561bf6 Revert "Updated exemplar specific data source configuration properties."
This reverts commit 0b897b6318.
2022-04-06 14:47:19 -04:00
achatterjee-grafana
c621cdb986 Revert "Few more changes. Also ran prettier to fix spacing issues."
This reverts commit 8665745a14.
2022-04-06 14:46:55 -04:00
achatterjee-grafana
8665745a14 Few more changes. Also ran prettier to fix spacing issues. 2022-04-06 14:43:36 -04:00
achatterjee-grafana
0b897b6318 Updated exemplar specific data source configuration properties. 2022-04-06 14:34:26 -04:00
Melori Arellano
b2f24e9d5b DOCS: Update Query variable section (#46132)
* DOCS: Update Query variable section

Add that the terms query expects a keyword field type. Updated the field names to remove the @ symbol that could mislead a user into thinking that is part of the query. I left one query example using the field name only and one using the fieldname.keyword syntax. Both are valid depending on the field mapping in the index.

* Update docs/sources/datasources/elasticsearch.md

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

* Update docs/sources/datasources/elasticsearch.md

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

* Update docs/sources/datasources/elasticsearch.md

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

Co-authored-by: Giordano Ricci <me@giordanoricci.com>
Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
2022-04-06 13:23:51 -04:00
Russ
38c842cf4a UI: Export sparkline from @grafana/ui and fix a broken storybook page (#47280)
* Chore: export sparkline from @grafana/ui

* fix: add missing config to BigValue story

* chore: tag Sparkline internal
2022-04-06 19:11:33 +02:00
Nathan Rodman
49505b9a3b Alerting: fgac for notification policies and contact points (#46939)
* add FGAC actions for silences table

* redirect users without permissions

* add permissions checks to routes

* add fgac to notifications and contact points

* fgac for notification policies

* fix mute timing authorization

* use consistent naming for checking grafana alertmanager

* tests for fgac in contact points and notification policies

* bump up timeout on rule editor test

* use new permissions util

* break out route evaluation into util

* Remove test timeout

* Change permissions for the alert-notifiers endpoint

* Use signed in handler for alert-notifiers when unified alerting enabled

Co-authored-by: Konrad Lalik <konrad.lalik@grafana.com>
2022-04-06 18:24:33 +02:00
Martin
460b8e85d7 Build: bump gonum library version to fix #46759 (#46997) 2022-04-06 18:10:58 +02:00
Ashley Harrison
04c037b2cb Navigation: implement full-width mobile menu (#47383)
* navigation: implement proper mobile menu

* Update public/app/core/components/NavBar/Next/NavBarMenu.tsx

Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com>

* animation feedback

Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com>
2022-04-06 16:53:59 +01:00
Kristina
b9e6ed3a8a Convert Rich History tests to RTL (#47220)
* Migrate enzyme tests to RTL

* Convert rich history card tests

* Fix Lint errors

* Fix tests based on feedback

* Fix second await
2022-04-06 10:26:33 -05:00
Serge Zaitsev
d153d896c5 Chore: Remove bus from contexthandler (#47374)
* Chore: Remove bus from contexthandler

* fix tests

* try different wire binding

* maybe remove a few more dispatches

* fix tests
2022-04-06 16:31:26 +02:00
Vardan Torosyan
8853fe5b91 Add Grafana AuthNZ team as a code owner (#47362) 2022-04-06 15:40:27 +02:00
Sam Jewell
bc28e36089 Fix docs links for interval global variable (#43424)
And $__interval_ms too
These docs were added in PR #13148 over 3 years ago, but since then the
content has moved without the links being updated to match.
2022-04-06 08:54:31 -04:00
5634 changed files with 236518 additions and 90326 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -1,5 +1,69 @@
import { regexp } from '@betterer/regexp';
import { BettererFileTest } from '@betterer/betterer';
import { ESLint, Linter } from 'eslint';
import { existsSync } from 'fs';
export default {
'no enzyme tests': () => regexp(/from 'enzyme'/g).include('**/*.test.*'),
'better eslint': () => countEslintErrors().include('**/*.{ts,tsx}'),
'no undocumented stories': () => countUndocumentedStories().include('**/*.story.tsx'),
};
function countUndocumentedStories() {
return new BettererFileTest(async (filePaths, fileTestResult) => {
filePaths.forEach((filePath) => {
if (!existsSync(filePath.replace(/\.story.tsx$/, '.mdx'))) {
// In this case the file contents don't matter:
const file = fileTestResult.addFile(filePath, '');
// Add the issue to the first character of the file:
file.addIssue(0, 0, 'No undocumented stories are allowed, please add an .mdx file with some documentation');
}
});
});
}
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 rules: Partial<Linter.RulesRecord> = {
'@typescript-eslint/no-explicit-any': 'error',
};
if (!filePath.endsWith('.test.tsx') && !filePath.endsWith('.test.ts')) {
rules['@typescript-eslint/consistent-type-assertions'] = [
'error',
{
assertionStyle: 'never',
},
];
}
const runner = new ESLint({
baseConfig: {
...linterOptions,
rules,
},
useEslintrc: false,
cwd: baseDirectory,
});
const lintResults = await runner.lintFiles([filePath]);
lintResults
.filter((lintResult) => lintResult.source)
.forEach((lintResult) => {
const { messages } = lintResult;
const file = fileTestResult.addFile(filePath, '');
messages.forEach((message, index) => {
file.addIssue(0, 0, message.message, `${index}`);
});
});
})
);
});
}

1
.bingo/.gitignore vendored
View File

@@ -5,6 +5,7 @@
# But not these files:
!.gitignore
!*.mod
!*.sum
!README.md
!Variables.mk
!variables.env

View File

@@ -1,4 +1,4 @@
# Auto generated binary variables helper managed by https://github.com/bwplotka/bingo v0.5.1. DO NOT EDIT.
# Auto generated binary variables helper managed by https://github.com/bwplotka/bingo v0.6. DO NOT EDIT.
# All tools are designed to be build inside $GOBIN.
BINGO_DIR := $(dir $(lastword $(MAKEFILE_LIST)))
GOPATH ?= $(shell go env GOPATH)
@@ -17,11 +17,11 @@ GO ?= $(shell which go)
# @echo "Running drone"
# @$(DRONE) <flags/args..>
#
DRONE := $(GOBIN)/drone-v1.4.0
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.4.0"
@cd $(BINGO_DIR) && $(GO) build -mod=mod -modfile=drone.mod -o=$(GOBIN)/drone-v1.4.0 "github.com/drone/drone-cli/drone"
@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"
WIRE := $(GOBIN)/wire-v0.5.0
$(WIRE): $(BINGO_DIR)/wire.mod

View File

@@ -4,4 +4,4 @@ go 1.17
replace github.com/docker/docker => github.com/docker/engine v17.12.0-ce-rc1.0.20200309214505-aa6a9891b09c+incompatible
require github.com/drone/drone-cli v1.4.0 // drone
require github.com/drone/drone-cli v1.5.0 // drone

1030
.bingo/drone.sum Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -1,4 +1,4 @@
# Auto generated binary variables helper managed by https://github.com/bwplotka/bingo v0.5.1. DO NOT EDIT.
# Auto generated binary variables helper managed by https://github.com/bwplotka/bingo v0.6. DO NOT EDIT.
# All tools are designed to be build inside $GOBIN.
# Those variables will work only until 'bingo get' was invoked, or if tools were installed via Makefile's Variables.mk.
GOBIN=${GOBIN:=$(go env GOBIN)}
@@ -8,7 +8,7 @@ if [ -z "$GOBIN" ]; then
fi
DRONE="${GOBIN}/drone-v1.4.0"
DRONE="${GOBIN}/drone-v1.5.0"
WIRE="${GOBIN}/wire-v0.5.0"

1421
.drone.yml

File diff suppressed because it is too large Load Diff

View File

@@ -20,3 +20,6 @@ vendor
# Auto-generated localisation files
public/locales/_build/
public/locales/**/*.js
# Auto-generated icon file
packages/grafana-ui/src/components/Icon/iconBundle.ts

View File

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

17
.github/CODEOWNERS vendored
View File

@@ -28,6 +28,7 @@ go.sum @grafana/backend-platform
.drone.yml @grafana/grafana-release-eng
.drone.star @grafana/grafana-release-eng
/scripts/drone/ @grafana/grafana-release-eng
/pkg/build/ @grafana/grafana-release-eng
# Cloud Datasources backend code
/pkg/tsdb/cloudwatch @grafana/cloud-datasources
@@ -57,7 +58,9 @@ go.sum @grafana/backend-platform
/pkg/services/live/ @grafana/grafana-edge-squad
/pkg/services/searchV2/ @grafana/grafana-edge-squad
/pkg/services/store/ @grafana/grafana-edge-squad
/pkg/services/export/ @grafana/grafana-edge-squad
/pkg/infra/filestore/ @grafana/grafana-edge-squad
pkg/tsdb/testdatasource/sims/ @grafana/grafana-edge-squad
# Alerting
/pkg/services/ngalert @grafana/alerting-squad-backend
@@ -164,3 +167,17 @@ lerna.json @grafana/frontend-ops
# Cloud middleware
/grafana-mixin/ @grafana/hosted-grafana-team
# Grafana authentication and authorization
/pkg/services/accesscontrol @grafana/grafana-authnz-team
/pkg/services/auth @grafana/grafana-authnz-team
/pkg/services/dashboards/accesscontrol.go @grafana/grafana-authnz-team
/pkg/services/datasources/permissions @grafana/grafana-authnz-team
/pkg/services/datasources/permissions/accesscontrol.go @grafana/grafana-authnz-team
/pkg/services/guardian @grafana/grafana-authnz-team
/pkg/services/ldap @grafana/grafana-authnz-team
/pkg/services/login @grafana/grafana-authnz-team
/pkg/services/multildap @grafana/grafana-authnz-team
/pkg/services/oauthtoken @grafana/grafana-authnz-team
/pkg/services/teamguardian @grafana/grafana-authnz-team
/pkg/services/serviceaccounts @grafana/grafana-authnz-team

43
.github/ISSUE_TEMPLATE/4-UX-design.yaml vendored Normal file
View File

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

View File

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

View File

@@ -20,6 +20,7 @@
"history", // we should bump this together with react-router-dom
"@mdx-js/react", // storybook peer-depends on it's 1.x version, we should upgrade this when we upgrade storybook
"monaco-editor", // due to us exposing this via @grafana/ui/CodeEditor's props bumping can break plugins
"node-fetch", // we should bump this once we move to esm modules
"react-hook-form", // due to us exposing these hooks via @grafana/ui form components bumping can break plugins
"react-icons", // jaeger-ui-components is being refactored to use @grafana/ui icons instead
"react-router-dom", // we should bump this together with history
@@ -28,7 +29,6 @@
"systemjs",
"copy-webpack-plugin", // try to upgrade with newer yarn release. Not working with 3.1.1
"ts-loader", // we should remove ts-loader and use babel-loader instead
"typescript", // >4.5.x doesn't seem to work on windows with pnp currently. probably similar to https://github.com/yarnpkg/berry/issues/3722
"ora" // we should bump this once we move to esm modules
],
"ignorePaths": ["packages/grafana-toolkit/package.json", "emails/**", "plugins-bundled/**", "**/mocks/**"],

View File

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

View File

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

View File

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

View File

@@ -10,8 +10,11 @@ on:
- 'public/app/plugins/datasource/cloud-monitoring/**'
branches-ignore:
- dependabot/**
- backport-**
- backport-*
jobs:
workflow-call:
uses: grafana/code-coverage/.github/workflows/code-coverage.yml@v0.1.2
uses: grafana/code-coverage/.github/workflows/code-coverage.yml@v0.1.6
with:
frontend-path-regexp: public\/app\/plugins\/datasource\/(grafana-azure-monitor-datasource|cloud-monitoring|cloudwatch)
backend-path-regexp: pkg\/tsdb\/(azuremonitor|cloudmonitoring|cloudwatch)

View File

@@ -33,7 +33,7 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
# We must fetch at least the immediate parents so that if this is
# a pull request then we can checkout the head.

View File

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

View File

@@ -11,7 +11,7 @@ jobs:
working-directory: './pr'
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
path: './pr'
@@ -51,7 +51,7 @@ jobs:
working-directory: './base'
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
path: './base'
ref: ${{ github.event.pull_request.base.ref }}
@@ -92,15 +92,15 @@ jobs:
GITHUB_STEP_NUMBER: 7
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Get built packages from pr
uses: actions/download-artifact@v2
uses: actions/download-artifact@v3
with:
name: buildPr
- name: Get built packages from base
uses: actions/download-artifact@v2
uses: actions/download-artifact@v3
with:
name: buildBase

View File

@@ -14,7 +14,7 @@ jobs:
ARTIFACT_NAME: 'levitate'
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: 'Download artifact'
uses: actions/github-script@v6
@@ -61,7 +61,7 @@ jobs:
const script = require('./.github/workflows/scripts/json-file-to-job-output.js');
await script({ core, filePath });
- name: Check if "breaking change" label exists
- name: Check if "levitate breaking change" label exists
id: does-label-exist
uses: actions/github-script@v6
env:
@@ -74,7 +74,7 @@ jobs:
repo: context.repo.repo,
});
const labels = data.map(({ name }) => name);
const doesExist = labels.includes('breaking change');
const doesExist = labels.includes('levitate breaking change');
return doesExist ? 1 : 0;
@@ -117,7 +117,7 @@ jobs:
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_LEVITATE_WEBHOOK_URL }}
- name: Add "breaking change" label
- name: Add "levitate breaking change" label
if: ${{ steps.levitate-run.outputs.exit_code == 1 && steps.does-label-exist.outputs.result == 0 }}
uses: actions/github-script@v6
env:
@@ -129,10 +129,10 @@ jobs:
issue_number: process.env.PR_NUMBER,
owner: context.repo.owner,
repo: context.repo.repo,
labels: ['breaking change']
labels: ['levitate breaking change']
})
- name: Remove "breaking change" label
- name: Remove "levitate breaking change" label
if: ${{ steps.levitate-run.outputs.exit_code == 0 && steps.does-label-exist.outputs.result == 1 }}
uses: actions/github-script@v6
env:
@@ -144,7 +144,7 @@ jobs:
issue_number: process.env.PR_NUMBER,
owner: context.repo.owner,
repo: context.repo.repo,
name: 'breaking change'
name: 'levitate breaking change'
})
# This is very weird, the actual request goes through (comes back with a 201), but does not assign the team.

16
.github/workflows/doc-validator.yml vendored Normal file
View File

@@ -0,0 +1,16 @@
name: "doc-validator"
on:
pull_request:
paths: ["docs/sources/**"]
workflow_dispatch:
jobs:
doc-validator:
runs-on: "ubuntu-latest"
container:
image: "grafana/doc-validator:latest"
steps:
- name: "Checkout code"
uses: "actions/checkout@v3"
- name: "Run doc-validator tool"
# Ensure that the CI always passes until all errors are resolved.
run: "doc-validator ./docs/sources || true"

View File

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

View File

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

View File

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

View File

@@ -5,9 +5,10 @@ on:
- opened
- reopened
- synchronize
- ready_for_review
- ready_for_review
- labeled
- unlabeled
- edited
issues:
types:
- milestoned
@@ -20,7 +21,7 @@ jobs:
if: github.event.pull_request.draft == false
steps:
- name: Checkout Actions
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
repository: "grafana/grafana-github-actions"
path: ./actions

View File

@@ -13,7 +13,7 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
# We must fetch at least the immediate parents so that if this is
# a pull request then we can checkout the head.

View File

@@ -15,7 +15,7 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
# We must fetch at least the immediate parents so that if this is
# a pull request then we can checkout the head.

View File

@@ -13,7 +13,7 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
# We must fetch at least the immediate parents so that if this is
# a pull request then we can checkout the head.

View File

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

View File

@@ -3,7 +3,7 @@ name: publish_docs
on:
push:
branches:
- main
- v9.0.x
paths:
- 'docs/sources/**'
- 'packages/grafana-*/**'
@@ -14,10 +14,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- 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@v2.5.1
uses: actions/setup-node@v3.2.0
id: generate-docs
with:
node-version: '16'
@@ -41,7 +41,7 @@ jobs:
host: github.com
github_pat: '${{ secrets.GH_BOT_ACCESS_TOKEN }}'
source_folder: docs/sources
target_folder: content/docs/grafana/next
target_folder: content/docs/grafana/latest
allow_no_changes: 'true'
- shell: bash
run: |

View File

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

View File

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

View File

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

1
.gitignore vendored
View File

@@ -165,3 +165,4 @@ public/locales/**/*.js
deployment_tools_config.json
.betterer.cache

View File

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

View File

@@ -21,3 +21,7 @@ vendor
# Auto-generated localisation files
public/locales/_build/
public/locales/**/*.js
# Auto-generated theme files
theme.light.generated.json
theme.dark.generated.json

File diff suppressed because one or more lines are too long

786
.yarn/releases/yarn-3.2.1.cjs vendored Executable file

File diff suppressed because one or more lines are too long

View File

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

View File

@@ -61,18 +61,26 @@ const moduleWrapper = tsserver => {
//
// Ref: https://github.com/microsoft/vscode/issues/105014#issuecomment-686760910
//
// Update Oct 8 2021: VSCode changed their format in 1.61.
// Update 2021-10-08: VSCode changed their format in 1.61.
// Before | ^zip:/c:/foo/bar.zip/package.json
// After | ^/zip//c:/foo/bar.zip/package.json
//
// Update 2022-04-06: VSCode changed the format in 1.66.
// Before | ^/zip//c:/foo/bar.zip/package.json
// After | ^/zip/c:/foo/bar.zip/package.json
//
case `vscode <1.61`: {
str = `^zip:${str}`;
} break;
case `vscode`: {
case `vscode <1.66`: {
str = `^/zip/${str}`;
} break;
case `vscode`: {
str = `^/zip${str}`;
} break;
// To make "go to definition" work,
// We have to resolve the actual file system path from virtual path
// and convert scheme to supported by [vim-rzip](https://github.com/lbrayner/vim-rzip)
@@ -160,8 +168,12 @@ const moduleWrapper = tsserver => {
typeof parsedMessage.arguments.hostInfo === `string`
) {
hostInfo = parsedMessage.arguments.hostInfo;
if (hostInfo === `vscode` && process.env.VSCODE_IPC_HOOK && process.env.VSCODE_IPC_HOOK.match(/Code\/1\.([1-5][0-9]|60)\./)) {
hostInfo += ` <1.61`;
if (hostInfo === `vscode` && process.env.VSCODE_IPC_HOOK) {
if (/(\/|-)1\.([1-5][0-9]|60)\./.test(process.env.VSCODE_IPC_HOOK)) {
hostInfo += ` <1.61`;
} else if (/(\/|-)1\.(6[1-5])\./.test(process.env.VSCODE_IPC_HOOK)) {
hostInfo += ` <1.66`;
}
}
}

View File

@@ -61,18 +61,26 @@ const moduleWrapper = tsserver => {
//
// Ref: https://github.com/microsoft/vscode/issues/105014#issuecomment-686760910
//
// Update Oct 8 2021: VSCode changed their format in 1.61.
// Update 2021-10-08: VSCode changed their format in 1.61.
// Before | ^zip:/c:/foo/bar.zip/package.json
// After | ^/zip//c:/foo/bar.zip/package.json
//
// Update 2022-04-06: VSCode changed the format in 1.66.
// Before | ^/zip//c:/foo/bar.zip/package.json
// After | ^/zip/c:/foo/bar.zip/package.json
//
case `vscode <1.61`: {
str = `^zip:${str}`;
} break;
case `vscode`: {
case `vscode <1.66`: {
str = `^/zip/${str}`;
} break;
case `vscode`: {
str = `^/zip${str}`;
} break;
// To make "go to definition" work,
// We have to resolve the actual file system path from virtual path
// and convert scheme to supported by [vim-rzip](https://github.com/lbrayner/vim-rzip)
@@ -160,8 +168,12 @@ const moduleWrapper = tsserver => {
typeof parsedMessage.arguments.hostInfo === `string`
) {
hostInfo = parsedMessage.arguments.hostInfo;
if (hostInfo === `vscode` && process.env.VSCODE_IPC_HOOK && process.env.VSCODE_IPC_HOOK.match(/Code\/1\.([1-5][0-9]|60)\./)) {
hostInfo += ` <1.61`;
if (hostInfo === `vscode` && process.env.VSCODE_IPC_HOOK) {
if (/(\/|-)1\.([1-5][0-9]|60)\./.test(process.env.VSCODE_IPC_HOOK)) {
hostInfo += ` <1.61`;
} else if (/(\/|-)1\.(6[1-5])\./.test(process.env.VSCODE_IPC_HOOK)) {
hostInfo += ` <1.66`;
}
}
}

View File

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

View File

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

View File

@@ -1,3 +1,945 @@
<!-- 9.0.6 START -->
# 9.0.6 (2022-08-01)
### Features and enhancements
- **Access Control:** Allow org admins to invite new users to their organization. [#52904](https://github.com/grafana/grafana/pull/52904), [@IevaVasiljeva](https://github.com/IevaVasiljeva)
### Bug fixes
- **Grafana/toolkit:** Fix incorrect image and font generation for plugin builds. [#52927](https://github.com/grafana/grafana/pull/52927), [@academo](https://github.com/academo)
- **Prometheus:** Fix adding of multiple values for regex operator. [#52978](https://github.com/grafana/grafana/pull/52978), [@ivanahuckova](https://github.com/ivanahuckova)
- **UI/Card:** Fix card items always having pointer cursor. [#52809](https://github.com/grafana/grafana/pull/52809), [@gillesdemey](https://github.com/gillesdemey)
<!-- 9.0.6 END -->
<!-- 9.0.5 START -->
# 9.0.5 (2022-07-26)
### Features and enhancements
- **Access control:** Show dashboard settings to users who can edit dashboard. [#52535](https://github.com/grafana/grafana/pull/52535), [@grafanabot](https://github.com/grafanabot)
- **Alerting:** Allow the webhook notifier to support a custom Authorization header. [#52515](https://github.com/grafana/grafana/pull/52515), [@gotjosh](https://github.com/gotjosh)
- **Chore:** Upgrade to Go version 1.17.12. [#52523](https://github.com/grafana/grafana/pull/52523), [@sakjur](https://github.com/sakjur)
- **Plugins:** Add signature wildcard globbing for dedicated private plugin type. [#52163](https://github.com/grafana/grafana/pull/52163), [@wbrowne](https://github.com/wbrowne)
- **Prometheus:** Don't show errors from unsuccessful API checks like rules or exemplar checks. [#52193](https://github.com/grafana/grafana/pull/52193), [@darrenjaneczek](https://github.com/darrenjaneczek)
### Bug fixes
- **Access control:** Allow organisation admins to add existing users to org (#51668). [#52553](https://github.com/grafana/grafana/pull/52553), [@vtorosyan](https://github.com/vtorosyan)
- **Alerting:** Fix alert panel instance-based rules filtering. [#52583](https://github.com/grafana/grafana/pull/52583), [@konrad147](https://github.com/konrad147)
- **Apps:** Fixes navigation between different app plugin pages. [#52571](https://github.com/grafana/grafana/pull/52571), [@torkelo](https://github.com/torkelo)
- **Cloudwatch:** Upgrade grafana-aws-sdk to fix auth issue with secret keys. [#52420](https://github.com/grafana/grafana/pull/52420), [@sarahzinger](https://github.com/sarahzinger)
- **Grafana/toolkit:** Fix incorrect image and font generation for plugin builds. [#52661](https://github.com/grafana/grafana/pull/52661), [@academo](https://github.com/academo)
- **Loki:** Fix `show context` not working in some occasions. [#52458](https://github.com/grafana/grafana/pull/52458), [@svennergr](https://github.com/svennergr)
- **RBAC:** Fix permissions on dashboards and folders created by anonymous users. [#52615](https://github.com/grafana/grafana/pull/52615), [@gamab](https://github.com/gamab)
<!-- 9.0.5 END -->
<!-- 9.0.4 START -->
# 9.0.4 (2022-07-20)
### Features and enhancements
- **Browse/Search:** Make browser back work properly when visiting Browse or search. [#52271](https://github.com/grafana/grafana/pull/52271), [@torkelo](https://github.com/torkelo)
- **Logs:** Improve getLogRowContext API. [#52130](https://github.com/grafana/grafana/pull/52130), [@gabor](https://github.com/gabor)
- **Loki:** Improve handling of empty responses. [#52397](https://github.com/grafana/grafana/pull/52397), [@gabor](https://github.com/gabor)
- **Plugins:** Always validate root URL if specified in signature manfiest. [#52332](https://github.com/grafana/grafana/pull/52332), [@wbrowne](https://github.com/wbrowne)
- **Preferences:** Get home dashboard from teams. [#52225](https://github.com/grafana/grafana/pull/52225), [@sakjur](https://github.com/sakjur)
- **SQLStore:** Support Upserting multiple rows. [#52228](https://github.com/grafana/grafana/pull/52228), [@joeblubaugh](https://github.com/joeblubaugh)
- **Traces:** Add more template variables in Tempo & Zipkin. [#52306](https://github.com/grafana/grafana/pull/52306), [@joey-grafana](https://github.com/joey-grafana)
- **Traces:** Remove serviceMap feature flag. [#52375](https://github.com/grafana/grafana/pull/52375), [@joey-grafana](https://github.com/joey-grafana)
### Bug fixes
- **Access Control:** Fix missing folder permissions. [#52410](https://github.com/grafana/grafana/pull/52410), [@IevaVasiljeva](https://github.com/IevaVasiljeva)
- **Access control:** Fix org user removal for OSS users. [#52473](https://github.com/grafana/grafana/pull/52473), [@IevaVasiljeva](https://github.com/IevaVasiljeva)
- **Alerting:** Fix Slack notification preview. [#50230](https://github.com/grafana/grafana/pull/50230), [@ekrucio](https://github.com/ekrucio)
- **Alerting:** Fix Slack push notifications. [#52391](https://github.com/grafana/grafana/pull/52391), [@grobinson-grafana](https://github.com/grobinson-grafana)
- **Alerting:** Fixes slack push notifications. [#50267](https://github.com/grafana/grafana/pull/50267), [@jgillick](https://github.com/jgillick)
- **Alerting:** Preserve new-lines from custom email templates in rendered email. [#52253](https://github.com/grafana/grafana/pull/52253), [@alexweav](https://github.com/alexweav)
- **Insights:** Fix dashboard and data source insights pages. (Enterprise)
- **Log:** Fix text logging for unsupported types. [#51306](https://github.com/grafana/grafana/pull/51306), [@papagian](https://github.com/papagian)
- **Loki:** Fix incorrect TopK value type in query builder. [#52226](https://github.com/grafana/grafana/pull/52226), [@ivanahuckova](https://github.com/ivanahuckova)
<!-- 9.0.4 END -->
<!-- 9.0.3 START -->
# 9.0.3 (2022-07-14)
### Features and enhancements
- **Access Control:** Allow dashboard admins to query org users. [#51652](https://github.com/grafana/grafana/pull/51652), [@IevaVasiljeva](https://github.com/IevaVasiljeva)
- **Access control:** Allow organisation admins to add existing users to org. [#51668](https://github.com/grafana/grafana/pull/51668), [@IevaVasiljeva](https://github.com/IevaVasiljeva)
- **Alerting:** Add method to provisioning API for obtaining a group and its rules. [#51761](https://github.com/grafana/grafana/pull/51761), [@alexweav](https://github.com/alexweav)
- **Alerting:** Add method to provisioning API for obtaining a group and its rules. [#51398](https://github.com/grafana/grafana/pull/51398), [@alexweav](https://github.com/alexweav)
- **Alerting:** Allow filtering of contact points by name. [#51933](https://github.com/grafana/grafana/pull/51933), [@alexweav](https://github.com/alexweav)
- **Alerting:** Disable /api/admin/pause-all-alerts with Unified Alerting. [#51895](https://github.com/grafana/grafana/pull/51895), [@joeblubaugh](https://github.com/joeblubaugh)
- **Analytics:** Add total queries and cached queries in usage insights logs. (Enterprise)
- **Annotations:** Use point marker for short time range annotations. [#51520](https://github.com/grafana/grafana/pull/51520), [@codeincarnate](https://github.com/codeincarnate)
- **AzureMonitor:** Update UI to experimental package. [#52123](https://github.com/grafana/grafana/pull/52123), [@asimpson](https://github.com/asimpson)
- **AzureMonitor:** Update resource and namespace metadata. [#52030](https://github.com/grafana/grafana/pull/52030), [@despian](https://github.com/despian)
- **CloudWatch:** Remove simplejson in favor of 'encoding/json'. [#51062](https://github.com/grafana/grafana/pull/51062), [@asimpson](https://github.com/asimpson)
- **DashboardRow:** Collapse shortcut prevent to move the collapsed rows. [#51589](https://github.com/grafana/grafana/pull/51589), [@ivanortegaalba](https://github.com/ivanortegaalba)
- **Insights:** Add dashboard UID to exported logs. (Enterprise)
- **Navigation:** Highlight active nav item when Grafana is served from subpath. [#51767](https://github.com/grafana/grafana/pull/51767), [@kianelbo](https://github.com/kianelbo)
- **Plugins:** InfluxDB datasource - set epoch query param value as "ms". [#51651](https://github.com/grafana/grafana/pull/51651), [@itsmylife](https://github.com/itsmylife)
- **Plugins:** InfluxDB update time range query. [#51833](https://github.com/grafana/grafana/pull/51833), [@itsmylife](https://github.com/itsmylife)
- **StateTimeline:** Try to sort time field. [#51569](https://github.com/grafana/grafana/pull/51569), [@zoltanbedi](https://github.com/zoltanbedi)
### Bug fixes
- **API:** Do not validate/save legacy alerts when saving a dashboard if legacy alerting is disabled. [#51883](https://github.com/grafana/grafana/pull/51883), [@papagian](https://github.com/papagian)
- **Access Control:** Fix missing folder permissions. [#52153](https://github.com/grafana/grafana/pull/52153), [@IevaVasiljeva](https://github.com/IevaVasiljeva)
- **Alerting:** Add method to reset notification policy tree back to the default. [#51934](https://github.com/grafana/grafana/pull/51934), [@alexweav](https://github.com/alexweav)
- **Alerting:** Fix Teams notifier not failing on 200 response with error. [#52254](https://github.com/grafana/grafana/pull/52254), [@JacobsonMT](https://github.com/JacobsonMT)
- **Alerting:** Fix bug where state did not change between Alerting and Error. [#52204](https://github.com/grafana/grafana/pull/52204), [@grobinson-grafana](https://github.com/grobinson-grafana)
- **Alerting:** Fix consistency errors in OpenAPI documentation. [#51935](https://github.com/grafana/grafana/pull/51935), [@alexweav](https://github.com/alexweav)
- **Alerting:** Fix normalization of alert states for panel annotations. [#51637](https://github.com/grafana/grafana/pull/51637), [@gillesdemey](https://github.com/gillesdemey)
- **Alerting:** Provisioning API respects global rule quota. [#52180](https://github.com/grafana/grafana/pull/52180), [@alexweav](https://github.com/alexweav)
- **CSRF:** Fix additional headers option. [#50629](https://github.com/grafana/grafana/pull/50629), [@sakjur](https://github.com/sakjur)
- **Chore:** Bump parse-url to 6.0.2 to fix security vulnerabilities. [#51796](https://github.com/grafana/grafana/pull/51796), [@jackw](https://github.com/jackw)
- **Chore:** Fix CVE-2020-7753. [#51752](https://github.com/grafana/grafana/pull/51752), [@jackw](https://github.com/jackw)
- **Chore:** Fix CVE-2021-3807. [#51753](https://github.com/grafana/grafana/pull/51753), [@jackw](https://github.com/jackw)
- **Chore:** Fix CVE-2021-3918. [#51745](https://github.com/grafana/grafana/pull/51745), [@jackw](https://github.com/jackw)
- **Chore:** Fix CVE-2021-43138. [#51751](https://github.com/grafana/grafana/pull/51751), [@jackw](https://github.com/jackw)
- **Chore:** Fix CVE-2022-0155. [#51755](https://github.com/grafana/grafana/pull/51755), [@jackw](https://github.com/jackw)
- **Custom Branding:** Fix login logo size. (Enterprise)
- **Dashboard:** Fixes tooltip issue with TimePicker and Setting buttons. [#51836](https://github.com/grafana/grafana/pull/51836), [@torkelo](https://github.com/torkelo)
- **Dashboard:** Prevent unnecessary scrollbar when viewing single panel. [#52122](https://github.com/grafana/grafana/pull/52122), [@lpskdl](https://github.com/lpskdl)
- **Logs:** Fixed wrapping log lines from detected fields. [#52108](https://github.com/grafana/grafana/pull/52108), [@svennergr](https://github.com/svennergr)
- **Loki:** Add missing operators in label filter expression. [#51880](https://github.com/grafana/grafana/pull/51880), [@ivanahuckova](https://github.com/ivanahuckova)
- **Loki:** Fix error when changing operations with different parameters. [#51779](https://github.com/grafana/grafana/pull/51779), [@svennergr](https://github.com/svennergr)
- **Loki:** Fix suggesting of correct operations in query builder. [#52034](https://github.com/grafana/grafana/pull/52034), [@ivanahuckova](https://github.com/ivanahuckova)
- **Plugins:** InfluxDB variable interpolation fix. [#51917](https://github.com/grafana/grafana/pull/51917), [@itsmylife](https://github.com/itsmylife)
- **Plugins:** InfluxDB variable interpolation fix for influxdbBackendMigration feature flag. [#51624](https://github.com/grafana/grafana/pull/51624), [@itsmylife](https://github.com/itsmylife)
- **Reports:** Fix line breaks in message. (Enterprise)
- **Reports:** Fix saving report formats. (Enterprise)
- **SQLstore:** Fix fetching an inexistent playlist. [#51962](https://github.com/grafana/grafana/pull/51962), [@papagian](https://github.com/papagian)
- **Security:** Fixes for CVE-2022-31107 and CVE-2022-31097. [#52279](https://github.com/grafana/grafana/pull/52279), [@kminehart](https://github.com/kminehart)
- **Snapshots:** Fix deleting external snapshots when using RBAC. [#51897](https://github.com/grafana/grafana/pull/51897), [@idafurjes](https://github.com/idafurjes)
- **Table:** Fix scrollbar being hidden by pagination. [#51501](https://github.com/grafana/grafana/pull/51501), [@zoltanbedi](https://github.com/zoltanbedi)
- **Templating:** Changing between variables with the same name now correctly triggers a dashboard refresh. [#51490](https://github.com/grafana/grafana/pull/51490), [@ashharrison90](https://github.com/ashharrison90)
- **Time series panel:** Fix an issue with stacks being not complete due to the incorrect data frame length. [#51910](https://github.com/grafana/grafana/pull/51910), [@dprokop](https://github.com/dprokop)
- **[v9.0.x] Snapshots:** Fix deleting external snapshots when using RBAC (#51897). [#51904](https://github.com/grafana/grafana/pull/51904), [@idafurjes](https://github.com/idafurjes)
<!-- 9.0.3 END -->
<!-- 9.0.2 START -->
# 9.0.2 (2022-06-28)
### Features and enhancements
- **Alerting:** Add support for images in Pushover alerts. [#51372](https://github.com/grafana/grafana/pull/51372), [@grobinson-grafana](https://github.com/grobinson-grafana)
- **Alerting:** Don't stop the migration when alert rule tags are invalid. [#51253](https://github.com/grafana/grafana/pull/51253), [@gotjosh](https://github.com/gotjosh)
- **Alerting:** Don't stop the migration when alert rule tags are invalid (…. [#51341](https://github.com/grafana/grafana/pull/51341), [@gotjosh](https://github.com/gotjosh)
- **Alerting:** Skip the default data source if incompatible. [#51452](https://github.com/grafana/grafana/pull/51452), [@gillesdemey](https://github.com/gillesdemey)
- **AzureMonitor:** Parse non-fatal errors for Logs. [#51320](https://github.com/grafana/grafana/pull/51320), [@andresmgot](https://github.com/andresmgot)
- **OAuth:** Restore debug log behavior. [#51244](https://github.com/grafana/grafana/pull/51244), [@Jguer](https://github.com/Jguer)
- **Plugins:** Improved handling of symlinks. [#51324](https://github.com/grafana/grafana/pull/51324), [@marefr](https://github.com/marefr)
### Bug fixes
- **Alerting:** Code-gen parsing of URL parameters and fix related bugs. [#51353](https://github.com/grafana/grafana/pull/51353), [@alexweav](https://github.com/alexweav)
- **Alerting:** Code-gen parsing of URL parameters and fix related bugs. [#50731](https://github.com/grafana/grafana/pull/50731), [@alexweav](https://github.com/alexweav)
- **Annotations:** Fix annotation autocomplete causing panels to crash. [#51164](https://github.com/grafana/grafana/pull/51164), [@ashharrison90](https://github.com/ashharrison90)
- **Barchart:** Fix warning not showing. [#51190](https://github.com/grafana/grafana/pull/51190), [@joshhunt](https://github.com/joshhunt)
- **CloudWatch:** Enable custom session duration in AWS plugin auth. [#51322](https://github.com/grafana/grafana/pull/51322), [@sunker](https://github.com/sunker)
- **Dashboards:** Fixes issue with the initial panel layout counting as an unsaved change. [#51315](https://github.com/grafana/grafana/pull/51315), [@JoaoSilvaGrafana](https://github.com/JoaoSilvaGrafana)
- **Plugins:** Use a Grafana specific SDK logger implementation for core plugins. [#51229](https://github.com/grafana/grafana/pull/51229), [@marefr](https://github.com/marefr)
- **Search:** Fix pagination in the new search page. [#51366](https://github.com/grafana/grafana/pull/51366), [@ArturWierzbicki](https://github.com/ArturWierzbicki)
<!-- 9.0.2 END -->
<!-- 9.0.1 START -->
# 9.0.1 (2022-06-21)
### Features and enhancements
- **Alerting:** Add support for image annotation in Alertmanager alerts. [#50686](https://github.com/grafana/grafana/pull/50686), [@grobinson-grafana](https://github.com/grobinson-grafana)
- **Alerting:** Add support for images in SensuGo alerts. [#50718](https://github.com/grafana/grafana/pull/50718), [@grobinson-grafana](https://github.com/grobinson-grafana)
- **Alerting:** Add support for images in Threema alerts. [#50734](https://github.com/grafana/grafana/pull/50734), [@grobinson-grafana](https://github.com/grobinson-grafana)
- **Alerting:** Adds Mimir to Alertmanager data source implementation. [#50943](https://github.com/grafana/grafana/pull/50943), [@gillesdemey](https://github.com/gillesdemey)
- **Alerting:** Invalid setting of enabled for unified alerting should return error. [#49876](https://github.com/grafana/grafana/pull/49876), [@grobinson-grafana](https://github.com/grobinson-grafana)
- **AzureMonitor:** Clean namespace when changing the resource. [#50311](https://github.com/grafana/grafana/pull/50311), [@andresmgot](https://github.com/andresmgot)
- **AzureMonitor:** Update supported namespaces and filter resources by the right type. [#50788](https://github.com/grafana/grafana/pull/50788), [@andresmgot](https://github.com/andresmgot)
- **CLI:** Allow relative symlinks in zip archives when installing plugins. [#50537](https://github.com/grafana/grafana/pull/50537), [@marefr](https://github.com/marefr)
- **Dashboard:** Don't show unsaved changes modal for automatic schema changes. [#50822](https://github.com/grafana/grafana/pull/50822), [@torkelo](https://github.com/torkelo)
- **Dashboard:** Unsaved changes warning should not trigger when only pluginVersion has changed. [#50677](https://github.com/grafana/grafana/pull/50677), [@torkelo](https://github.com/torkelo)
- **Expression:** Execute hidden expressions. [#50636](https://github.com/grafana/grafana/pull/50636), [@yesoreyeram](https://github.com/yesoreyeram)
- **Geomap:** Support showing tooltip content on click (not just hover). [#50985](https://github.com/grafana/grafana/pull/50985), [@ryantxu](https://github.com/ryantxu)
- **Heatmap:** Remove alpha flag from new heatmap panel. [#50733](https://github.com/grafana/grafana/pull/50733), [@ryantxu](https://github.com/ryantxu)
- **Instrumentation:** Define handlers for requests that are not handled with named handlers. [#50613](https://github.com/grafana/grafana/pull/50613), [@bergquist](https://github.com/bergquist)
- **Log Panel:** Improve log row hover contrast and visibility. [#50908](https://github.com/grafana/grafana/pull/50908), [@Seyaji](https://github.com/Seyaji)
- **Logs:** Handle backend-mode errors in histogram. [#50535](https://github.com/grafana/grafana/pull/50535), [@gabor](https://github.com/gabor)
- **Loki:** Do not show histogram for instant queries. [#50711](https://github.com/grafana/grafana/pull/50711), [@gabor](https://github.com/gabor)
- **Loki:** Handle data source configs with path in the url. [#50971](https://github.com/grafana/grafana/pull/50971), [@gabor](https://github.com/gabor)
- **Loki:** Handle invalid query type values. [#50755](https://github.com/grafana/grafana/pull/50755), [@gabor](https://github.com/gabor)
- **OAuth:** Redirect to login if no oauth module is found or if module is not configured. [#50661](https://github.com/grafana/grafana/pull/50661), [@kalleep](https://github.com/kalleep)
- **OptionsUI:** Move internal options editors out of @grafana/ui. [#50739](https://github.com/grafana/grafana/pull/50739), [@ryantxu](https://github.com/ryantxu)
- **Prometheus:** Don't show undefined for step in collapsed options in query editor when value is "auto". [#50511](https://github.com/grafana/grafana/pull/50511), [@aocenas](https://github.com/aocenas)
- **Prometheus:** Show query patterns in all editor modes for Prometheus and Loki. [#50263](https://github.com/grafana/grafana/pull/50263), [@ivanahuckova](https://github.com/ivanahuckova)
- **Tempo:** Add link to Tempo Search with node service selected. [#49776](https://github.com/grafana/grafana/pull/49776), [@joey-grafana](https://github.com/joey-grafana)
- **Time Series Panel:** Add Null Filling and "No Value" Support. [#50907](https://github.com/grafana/grafana/pull/50907), [@codeincarnate](https://github.com/codeincarnate)
- **TimeSeries:** Add an option to set legend width. [#49126](https://github.com/grafana/grafana/pull/49126), [@bobrik](https://github.com/bobrik)
- **Timeseries:** Improve cursor Y sync behavior. [#50740](https://github.com/grafana/grafana/pull/50740), [@ryantxu](https://github.com/ryantxu)
- **Traces:** Do not use red in span colors as this looks like an error. [#50074](https://github.com/grafana/grafana/pull/50074), [@joey-grafana](https://github.com/joey-grafana)
### Bug fixes
- **Alerting:** Fix AM config overwrite when SQLite db is locked during sync. [#50951](https://github.com/grafana/grafana/pull/50951), [@JacobsonMT](https://github.com/JacobsonMT)
- **Alerting:** Fix alert instances filtering for prom rules. [#50850](https://github.com/grafana/grafana/pull/50850), [@konrad147](https://github.com/konrad147)
- **Alerting:** Fix alert rule page crashing when datasource contained URL unsafe characters. [#51105](https://github.com/grafana/grafana/pull/51105), [@gillesdemey](https://github.com/gillesdemey)
- **Alerting:** Fix automatically select newly created folder option. [#50949](https://github.com/grafana/grafana/pull/50949), [@gillesdemey](https://github.com/gillesdemey)
- **Alerting:** Fix removal of notification policy without labels matchers. [#50678](https://github.com/grafana/grafana/pull/50678), [@konrad147](https://github.com/konrad147)
- **CloudWatch:** Allow hidden queries to be executed in case an ID is provided. [#50987](https://github.com/grafana/grafana/pull/50987), [@sunker](https://github.com/sunker)
- **Dashboard:** Prevent non-repeating panels being dropped from repeated rows when collapsed/expanded. [#50764](https://github.com/grafana/grafana/pull/50764), [@ashharrison90](https://github.com/ashharrison90)
- **Dashboards:** Fix folder picker not showing correct results when typing too fast. [#50303](https://github.com/grafana/grafana/pull/50303), [@joshhunt](https://github.com/joshhunt)
- **Datasource:** Prevent panic when proxying for non-existing data source. [#50667](https://github.com/grafana/grafana/pull/50667), [@wbrowne](https://github.com/wbrowne)
- **Explore:** Fix log context scroll to bottom. [#50600](https://github.com/grafana/grafana/pull/50600), [@ivanahuckova](https://github.com/ivanahuckova)
- **Explore:** Revert "Remove support for compact format URLs (#49350)". [#50873](https://github.com/grafana/grafana/pull/50873), [@gelicia](https://github.com/gelicia)
- **Expressions:** Fixes dashboard schema migration issue that casued Expression datasource to be set on panel level. [#50945](https://github.com/grafana/grafana/pull/50945), [@torkelo](https://github.com/torkelo)
- **Formatting:** Fixes valueFormats for a value of 0. [#50719](https://github.com/grafana/grafana/pull/50719), [@JoaoSilvaGrafana](https://github.com/JoaoSilvaGrafana)
- **GrafanaData:** Fix week start for non-English browsers. [#50582](https://github.com/grafana/grafana/pull/50582), [@AgnesToulet](https://github.com/AgnesToulet)
- **LibraryPanel:** Resizing a library panel to 6x3 no longer crashes the dashboard on startup. [#50400](https://github.com/grafana/grafana/pull/50400), [@ashharrison90](https://github.com/ashharrison90)
- **LogRow:** Fix placement of icon. [#51010](https://github.com/grafana/grafana/pull/51010), [@ivanahuckova](https://github.com/ivanahuckova)
- **Loki:** Fix bug in labels framing. [#51015](https://github.com/grafana/grafana/pull/51015), [@gabor](https://github.com/gabor)
- **Loki:** Fix issues with using query patterns. [#50414](https://github.com/grafana/grafana/pull/50414), [@ivanahuckova](https://github.com/ivanahuckova)
- **Loki:** Fix showing of duplicated label values in dropdown in query builder. [#50680](https://github.com/grafana/grafana/pull/50680), [@ivanahuckova](https://github.com/ivanahuckova)
- **MSSQL:** Fix ParseFloat error. [#50815](https://github.com/grafana/grafana/pull/50815), [@zoltanbedi](https://github.com/zoltanbedi)
- **Panels:** Fixes issue with showing 'Cannot visualize data' when query returned 0 rows. [#50485](https://github.com/grafana/grafana/pull/50485), [@torkelo](https://github.com/torkelo)
- **Playlists:** Disable Create Playlist buttons for users with viewer role. [#50840](https://github.com/grafana/grafana/pull/50840), [@asymness](https://github.com/asymness)
- **Plugins:** Fix typo in plugin data frames documentation. [#50554](https://github.com/grafana/grafana/pull/50554), [@osisoft-mbishop](https://github.com/osisoft-mbishop)
- **Prometheus:** Fix body not being included in resource calls if they are POST. [#50833](https://github.com/grafana/grafana/pull/50833), [@aocenas](https://github.com/aocenas)
- **RolePicker:** Fix submenu position on horizontal space overflow. [#50769](https://github.com/grafana/grafana/pull/50769), [@Clarity-89](https://github.com/Clarity-89)
- **Tracing:** Fix trace links in traces panel. [#50028](https://github.com/grafana/grafana/pull/50028), [@connorlindsey](https://github.com/connorlindsey)
### Deprecations
Support for compact Explore URLs is deprecated and will be removed in a future release. Until then, when navigating to Explore using the deprecated format the URLs are automatically converted. If you have existing links pointing to Explore update them using the format generated by Explore upon navigation.
You can identify a compact URL by its format. Compact URLs have the left (and optionally right) url parameter as an array of strings, for example `&left=["now-1h","now"...]`. The standard explore URLs follow a key/value pattern, for example `&left={"datasource":"test"...}`. Please be sure to check your dashboards for any hardcoded links to Explore and update them to the standard URL pattern. Issue [#50873](https://github.com/grafana/grafana/issues/50873)
<!-- 9.0.1 END -->
<!-- 9.0.0 START -->
# 9.0.0 (2022-06-10)
### Features and enhancements
- **API:** Add GET /api/annotations/:annotationId endpoint. [#47739](https://github.com/grafana/grafana/pull/47739), [@scottbock](https://github.com/scottbock)
- **API:** Add endpoint for updating a data source by its UID. [#49396](https://github.com/grafana/grafana/pull/49396), [@papagian](https://github.com/papagian)
- **AccessControl:** Add enterprise only setting for rbac permission cache. [#49006](https://github.com/grafana/grafana/pull/49006), [@kalleep](https://github.com/kalleep)
- **AccessControl:** Document basic roles changes and provisioning V2. [#48910](https://github.com/grafana/grafana/pull/48910), [@gamab](https://github.com/gamab)
- **AccessControl:** Enable RBAC by default. [#48813](https://github.com/grafana/grafana/pull/48813), [@IevaVasiljeva](https://github.com/IevaVasiljeva)
- **AddDataSourceConfig:** Remove deprecated checkHealth prop. [#50296](https://github.com/grafana/grafana/pull/50296), [@kaydelaney](https://github.com/kaydelaney)
- **Alerting:** Add Image URLs to Microsoft Teams notifier. [#49385](https://github.com/grafana/grafana/pull/49385), [@joeblubaugh](https://github.com/joeblubaugh)
- **Alerting:** Add RBAC actions and role for provisioning API routes. [#50459](https://github.com/grafana/grafana/pull/50459), [@yuri-tceretian](https://github.com/yuri-tceretian)
- **Alerting:** Add Screenshot URLs to Pagerduty Notifier. [#49377](https://github.com/grafana/grafana/pull/49377), [@joeblubaugh](https://github.com/joeblubaugh)
- **Alerting:** Add a "Reason" to Alert Instances to show underlying cause of state. [#49259](https://github.com/grafana/grafana/pull/49259), [@joeblubaugh](https://github.com/joeblubaugh)
- **Alerting:** Add a general screenshot service and alerting-specific image service. [#49293](https://github.com/grafana/grafana/pull/49293), [@joeblubaugh](https://github.com/joeblubaugh)
- **Alerting:** Add image url or file attachment to email notifications. [#49381](https://github.com/grafana/grafana/pull/49381), [@joeblubaugh](https://github.com/joeblubaugh)
- **Alerting:** Add image_urls to OpsGenie notification details. [#49379](https://github.com/grafana/grafana/pull/49379), [@joeblubaugh](https://github.com/joeblubaugh)
- **Alerting:** Add notification policy flow chart. [#49405](https://github.com/grafana/grafana/pull/49405), [@peterholmberg](https://github.com/peterholmberg)
- **Alerting:** Attach image URL to alerts in Webhook notifier format. [#49378](https://github.com/grafana/grafana/pull/49378), [@joeblubaugh](https://github.com/joeblubaugh)
- **Alerting:** Attach image URLs or upload files to Discord notifications. [#49439](https://github.com/grafana/grafana/pull/49439), [@alexweav](https://github.com/alexweav)
- **Alerting:** Attach image URLs to Google Chat notifications. [#49445](https://github.com/grafana/grafana/pull/49445), [@alexweav](https://github.com/alexweav)
- **Alerting:** Attach screenshot data to Unified Alerting notifications. [#49374](https://github.com/grafana/grafana/pull/49374), [@joeblubaugh](https://github.com/joeblubaugh)
- **Alerting:** Create folder for alerting when start from the scratch. [#48866](https://github.com/grafana/grafana/pull/48866), [@yuri-tceretian](https://github.com/yuri-tceretian)
- **Alerting:** Modify alertmanager endpoints for proxying using the datasource UID. [#47978](https://github.com/grafana/grafana/pull/47978), [@papagian](https://github.com/papagian)
- **Alerting:** Modify endpoint for testing a datasource rule using the UID. [#48070](https://github.com/grafana/grafana/pull/48070), [@papagian](https://github.com/papagian)
- **Alerting:** Modify prometheus endpoints for proxying using the datasource UID. [#48052](https://github.com/grafana/grafana/pull/48052), [@papagian](https://github.com/papagian)
- **Alerting:** State Manager takes screenshots. [#49338](https://github.com/grafana/grafana/pull/49338), [@joeblubaugh](https://github.com/joeblubaugh)
- **Alerting:** Use UID scope for folders authorization. [#48970](https://github.com/grafana/grafana/pull/48970), [@yuri-tceretian](https://github.com/yuri-tceretian)
- **Alerting:** modify ruler endpoints for proxying using the datasource UID. [#48046](https://github.com/grafana/grafana/pull/48046), [@papagian](https://github.com/papagian)
- **Angular:** Adds back two angular directives that are still used by remaining angular bits and plugins. [#50380](https://github.com/grafana/grafana/pull/50380), [@torkelo](https://github.com/torkelo)
- **Azure Monitor:** Add Resource Picker to Metrics Queries. [#49029](https://github.com/grafana/grafana/pull/49029), [@sarahzinger](https://github.com/sarahzinger)
- **Azure Monitor:** Add search feature to resource picker. [#48234](https://github.com/grafana/grafana/pull/48234), [@sarahzinger](https://github.com/sarahzinger)
- **AzureMonitor:** Add support for selecting multiple options when using the equals and not equals dimension filters. [#48650](https://github.com/grafana/grafana/pull/48650), [@aangelisc](https://github.com/aangelisc)
- **AzureMonitor:** Remove deprecated code. [#48328](https://github.com/grafana/grafana/pull/48328), [@andresmgot](https://github.com/andresmgot)
- **Build:** Change names to PascalCase to match. [#48949](https://github.com/grafana/grafana/pull/48949), [@zuchka](https://github.com/zuchka)
- **Chore:** Remove deprecated DataSourceAPI methods. [#49313](https://github.com/grafana/grafana/pull/49313), [@ifrost](https://github.com/ifrost)
- **Chore:** Upgrade typescript to 4.6.4. [#49016](https://github.com/grafana/grafana/pull/49016), [@kaydelaney](https://github.com/kaydelaney)
- **Cloud Monitoring:** Use new annotation API. [#49026](https://github.com/grafana/grafana/pull/49026), [@kevinwcyu](https://github.com/kevinwcyu)
- **CloudMonitoring:** Allow to set a custom value or disable graph_period. [#48646](https://github.com/grafana/grafana/pull/48646), [@andresmgot](https://github.com/andresmgot)
- **CloudWatch:** Add generic filter component to variable editor. [#47907](https://github.com/grafana/grafana/pull/47907), [@iwysiu](https://github.com/iwysiu)
- **CloudWatch:** Added missing AWS/AppRunner metrics. [#49174](https://github.com/grafana/grafana/pull/49174), [@Aton-Kish](https://github.com/Aton-Kish)
- **CloudWatch:** Enable support for dynamic labels with migrated alias patterns. [#49173](https://github.com/grafana/grafana/pull/49173), [@sunker](https://github.com/sunker)
- **Cloudwatch:** Pass label in deep link. [#49160](https://github.com/grafana/grafana/pull/49160), [@sunker](https://github.com/sunker)
- **Cloudwatch:** Use new annotation API. [#48102](https://github.com/grafana/grafana/pull/48102), [@sunker](https://github.com/sunker)
- **Dashboard:** Validate dashboards against schema on save. [#48252](https://github.com/grafana/grafana/pull/48252), [@sdboyer](https://github.com/sdboyer)
- **DashboardPickerByID:** Add option to exclude dashboards. [#49211](https://github.com/grafana/grafana/pull/49211), [@Clarity-89](https://github.com/Clarity-89)
- **DashboardPickerById:** Add optionLabel prop. [#47556](https://github.com/grafana/grafana/pull/47556), [@Clarity-89](https://github.com/Clarity-89)
- **Dashboards:** Display values of 0 with the configured decimal places. [#48155](https://github.com/grafana/grafana/pull/48155), [@wx1322](https://github.com/wx1322)
- **Data:** Remove deprecated types and functions from valueMappings. [#50035](https://github.com/grafana/grafana/pull/50035), [@kaydelaney](https://github.com/kaydelaney)
- **Elasticsearch:** Remove browser access mode. [#49014](https://github.com/grafana/grafana/pull/49014), [@gabor](https://github.com/gabor)
- **Elasticsearch:** Remove support for versions after their end of the life (<7.10.0). [#48715](https://github.com/grafana/grafana/pull/48715), [@ivanahuckova](https://github.com/ivanahuckova)
- **Encryption:** Add support for multiple data keys per day. [#47765](https://github.com/grafana/grafana/pull/47765), [@joanlopez](https://github.com/joanlopez)
- **Encryption:** Enable envelope encryption by default. [#49301](https://github.com/grafana/grafana/pull/49301), [@joanlopez](https://github.com/joanlopez)
- **Explore:** Remove support for legacy, compact format URLs. [#49350](https://github.com/grafana/grafana/pull/49350), [@gelicia](https://github.com/gelicia)
- **Explore:** Skip Angular error handling when Angular support is disabled. [#49311](https://github.com/grafana/grafana/pull/49311), [@ifrost](https://github.com/ifrost)
- **Explore:** simplify support for multiple query editors. [#48701](https://github.com/grafana/grafana/pull/48701), [@Elfo404](https://github.com/Elfo404)
- **FeatureToggles:** Support changing feature toggles with URL parameters. [#50275](https://github.com/grafana/grafana/pull/50275), [@ryantxu](https://github.com/ryantxu)
- **FileUpload:** Make component accessible by keyboard navigation. [#47497](https://github.com/grafana/grafana/pull/47497), [@tolzhabayev](https://github.com/tolzhabayev)
- **Formatting:** Make SI number formats more robust. [#50117](https://github.com/grafana/grafana/pull/50117), [@kaydelaney](https://github.com/kaydelaney)
- **Graph:** Deprecate Graph (old) and make it no longer a visualization option for new panels. [#48034](https://github.com/grafana/grafana/pull/48034), [@torkelo](https://github.com/torkelo)
- **IconButton:** IconButtons are now correctly aligned in Safari. [#48759](https://github.com/grafana/grafana/pull/48759), [@ashharrison90](https://github.com/ashharrison90)
- **Logger:** Enable new logging format by default. [#47584](https://github.com/grafana/grafana/pull/47584), [@ying-jeanne](https://github.com/ying-jeanne)
- **Loki:** Add more query patterns. [#50248](https://github.com/grafana/grafana/pull/50248), [@ivanahuckova](https://github.com/ivanahuckova)
- **Loki:** Enable new visual query builder by default. [#48346](https://github.com/grafana/grafana/pull/48346), [@ivanahuckova](https://github.com/ivanahuckova)
- **Loki:** use the same dataframe-format for both live and normal queries. [#47153](https://github.com/grafana/grafana/pull/47153), [@gabor](https://github.com/gabor)
- **OAuth:** Make allowed email domain case insensitive. [#49252](https://github.com/grafana/grafana/pull/49252), [@Jguer](https://github.com/Jguer)
- **Panels:** Use the No value option when showing the no data message. [#47675](https://github.com/grafana/grafana/pull/47675), [@torkelo](https://github.com/torkelo)
- **Plugins:** Remove plugin list panel. [#46914](https://github.com/grafana/grafana/pull/46914), [@tolzhabayev](https://github.com/tolzhabayev)
- **Query History:** Enable new query history by default. [#49407](https://github.com/grafana/grafana/pull/49407), [@ifrost](https://github.com/ifrost)
- **QueryEditorRow:** Show query errors next to query in a consistent way across Grafana. [#47613](https://github.com/grafana/grafana/pull/47613), [@torkelo](https://github.com/torkelo)
- **SAML:** Implement Name Templates for assertion_attribute_name option. [#48022](https://github.com/grafana/grafana/pull/48022), [@mmandrus](https://github.com/mmandrus)
- **Service accounts:** Do not display service accounts assigned to team. [#48995](https://github.com/grafana/grafana/pull/48995), [@eleijonmarck](https://github.com/eleijonmarck)
- **Settings:** Use Grafana Azure SDK to pass Azure env vars for external plugins. [#48954](https://github.com/grafana/grafana/pull/48954), [@kostrse](https://github.com/kostrse)
- **Shortcuts:** Add shortcut to show shortcuts to the list of shortcuts. [#48395](https://github.com/grafana/grafana/pull/48395), [@ivanahuckova](https://github.com/ivanahuckova)
- **Traces Panel:** Add new Traces Panel visualization. [#47534](https://github.com/grafana/grafana/pull/47534), [@joey-grafana](https://github.com/joey-grafana)
- **Traces:** Filter by service/span name and operation in Tempo and Jaeger. [#48209](https://github.com/grafana/grafana/pull/48209), [@joey-grafana](https://github.com/joey-grafana)
- **Transformations:** Allow more complex regex expressions in `Rename by regex`. [#48179](https://github.com/grafana/grafana/pull/48179), [@ashharrison90](https://github.com/ashharrison90)
- **grafana/ui:** Add default type="button" to <Button>. [#48183](https://github.com/grafana/grafana/pull/48183), [@axelavargas](https://github.com/axelavargas)
### Bug fixes
- **Alerting:** Fix database unavailable removes rules from scheduler. [#49874](https://github.com/grafana/grafana/pull/49874), [@grobinson-grafana](https://github.com/grobinson-grafana)
- **AzureMonitor:** Fix auto-selection of time-grain for metrics. [#49278](https://github.com/grafana/grafana/pull/49278), [@aangelisc](https://github.com/aangelisc)
- **DataSources:** Fixes issue with expressions not being queried. [#50446](https://github.com/grafana/grafana/pull/50446), [@JoaoSilvaGrafana](https://github.com/JoaoSilvaGrafana)
- **GraphNG:** Fix thresholds by color not following data update. [#48571](https://github.com/grafana/grafana/pull/48571), [@zoltanbedi](https://github.com/zoltanbedi)
- **Jaeger:** Update operations dropdown. [#49329](https://github.com/grafana/grafana/pull/49329), [@joey-grafana](https://github.com/joey-grafana)
- **Login:** Fix mismatching label on auth_module in user list. [#49177](https://github.com/grafana/grafana/pull/49177), [@Jguer](https://github.com/Jguer)
- **Playlists:** Save button now correctly creates a new playlist. [#50381](https://github.com/grafana/grafana/pull/50381), [@ashharrison90](https://github.com/ashharrison90)
- **RBAC:** Fix migrations running in the wrong order causing inheritance problem in enterprise. [#50452](https://github.com/grafana/grafana/pull/50452), [@gamab](https://github.com/gamab)
- **RBAC:** Fix migrations running into the wrong order. (Enterprise)
- **ServiceAccounts:** Add identifiable token prefix to service account tokens. [#49011](https://github.com/grafana/grafana/pull/49011), [@Jguer](https://github.com/Jguer)
- **Traces:** Fix missing CopyButton on KeyValueTables and overlapping of panels. [#49271](https://github.com/grafana/grafana/pull/49271), [@svennergr](https://github.com/svennergr)
### Breaking changes
The `@grafana/ui` package helper function `selectOptionInTest` used in frontend tests has been removed as it caused testing libraries to be bundled in the production code of Grafana. If you were using this helper function in your tests please update your code accordingly:
```js
// before
import { selectOptionInTest } from '@grafana/ui';
// ...test usage
await selectOptionInTest(selectEl, 'Option 2');
// after
import { select } from 'react-select-event';
// ...test usage
await select(selectEl, 'Option 2', { container: document.body });
```
Issue [#50442](https://github.com/grafana/grafana/issues/50442)
Removed deprecated `checkHealth` prop from the `@grafana/e2e` `addDataSource` config. Previously this value defaulted to `false`, and has not been used in end-to-end tests since Grafana 8.0.3. Issue [#50296](https://github.com/grafana/grafana/issues/50296)
Removes the deprecated `LegacyBaseMap`, `LegacyValueMapping`, `LegacyValueMap`, and `LegacyRangeMap` types, and `getMappedValue` function from grafana-data. Migration is as follows:
| Old | New |
| ------------- | ------------- |
| `LegacyBaseMap` | `MappingType` |
| `LegacyValueMapping` | `ValueMapping` |
| `LegacyValueMap` | `ValueMap` |
| `LegacyRangeMap` | `RangeMap` |
| `getMappedValue` | `getValueMappingResult` | Issue [#50035](https://github.com/grafana/grafana/issues/50035)
This change fixes a bug in Grafana where intermittent failure of database, network between Grafana and the database, or error in querying the database would cause all alert rules to be unscheduled in Grafana. Following this change scheduled alert rules are not updated unless the query is successful.
The `get_alert_rules_duration_seconds` metric has been renamed to `schedule_query_alert_rules_duration_seconds`. Issue [#49874](https://github.com/grafana/grafana/issues/49874)
- Any secret (data sources credential, alert manager credential, etc, etc) created or modified with Grafana v9.0 won't be decryptable from any previous version (by default) because the way encrypted secrets are stored into the database has changed. Although secrets created or modified with previous versions will still be decryptable by Grafana v9.0.
- If required, although generally discouraged, the `disableEnvelopeEncryption` feature toggle can be enabled to keep envelope encryption disabled once updating to Grafana v9.0.
- In case of need to rollback to an earlier version of Grafana (i.e. Grafana v8.x) for any reason, after being created or modified any secret with Grafana v9.0, the `envelopeEncryption` feature toggle will need to be enabled to keep backwards compatibility (only from `v8.3.x` a bit unstable, from `8.5.x` stable).
- As a final attempt to deal with issues related with the aforementioned situations, the `grafana-cli admin secrets-migration rollback` command has been designed to move back all the Grafana secrets encrypted with envelope encryption to legacy encryption. So, after running that command it should be safe to disable envelope encryption and/or roll back to a previous version of Grafana.
- Alternatively or complementarily to all the points above, backing up the Grafana database before updating could be a good idea to prevent disasters (although the risk of getting some secrets corrupted only applies to those updates/created with after updating to Grafana v9.0). Issue [#49301](https://github.com/grafana/grafana/issues/49301)
- According to the dynamic labels documentation, you can use up to five dynamic values per label. Theres currently no such restriction in the alias pattern system, so if more than 5 patterns are being used the GetMetricData API will return an error.
- Dynamic labels only allow ${LABEL} to be used once per query. Theres no such restriction in the alias pattern system, so in case more than 1 is being used the GetMetricData API will return an error.
- When no alias is provided by the user, Grafana will no longer fallback with custom rules for naming the legend.
- In case a search expression is being used and no data is returned, Grafana will no longer expand dimension values, for instance when using a multi-valued template variable or star wildcard `*` in the dimension value field. Ref https://github.com/grafana/grafana/issues/20729
- Time series might be displayed in a different order. Using for example the dynamic label `${PROP('MetricName')}`, might have the consequence that the time series are returned in a different order compared to when the alias pattern `{{metric}}` is used
Issue [#49173](https://github.com/grafana/grafana/issues/49173)
In Elasticsearch, browser access mode was deprecated in grafana 7.4.0 and removed in 9.0.0. If you used this mode, please switch to server access mode on the datasource configuration page. Issue [#49014](https://github.com/grafana/grafana/issues/49014)
Environment variables passed from Grafana to external Azure plugins have been renamed:
- `AZURE_CLOUD` renamed to `GFAZPL_AZURE_CLOUD`
- `AZURE_MANAGED_IDENTITY_ENABLED` renamed to `GFAZPL_MANAGED_IDENTITY_ENABLED`
- `AZURE_MANAGED_IDENTITY_CLIENT_ID` renamed to `GFAZPL_MANAGED_IDENTITY_CLIENT_ID`
There are no known plugins which were relying on these variables. Moving forward plugins should read Azure settings only via Grafana Azure SDK which properly handles old and new environment variables. Issue [#48954](https://github.com/grafana/grafana/issues/48954)
Removes support for for ElasticSearch versions after their end-of-life, currently versions < 7.10.0. To continue to use ElasticSearch data source, upgrade ElasticSearch to version 7.10.0+.
Issue [#48715](https://github.com/grafana/grafana/issues/48715)
Application Insights and Insight Analytics queries in Azure Monitor were deprecated in Grafana 8.0 and finally removed in 9.0. Deprecated queries will no longer be executed. Please refer to the [documentation](https://grafana.com/docs/grafana/latest/datasources/azuremonitor/deprecated-application-insights/) for more information about this change.
Issue [#48328](https://github.com/grafana/grafana/issues/48328)
**grafana/ui: Button now specifies a default type="button"**
The `Button` component provided by @grafana/ui now specifies a default `type="button"` when no type is provided. In previous versions, if the attribute was not specified for buttons associated with a `<form>` the default value was `submit` per the [specification](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#attr-type)
You can preserve the old behavior by explicitly setting the type attribute: `<Button type="submit" />`
[Github Issue #41863](https://github.com/grafana/grafana/issues/41863).
Issue [#48183](https://github.com/grafana/grafana/issues/48183)
The `Rename by regex` transformation has been improved to allow global patterns of the form `/<stringToReplace>/g`. Depending on the regex match used, this may cause some transformations to behave slightly differently. You can guarantee the same behaviour as before by wrapping the `match` string in forward slashes (`/`), e.g. `(.*)` would become `/(.*)/` Issue [#48179](https://github.com/grafana/grafana/issues/48179)
`<Select />` menus will now portal to the document body by default. This is to give more consistent behaviour when positioning and overlaying. If you were setting `menuShouldPortal={true}` before you can safely remove that prop and behaviour will be the same. If you weren't explicitly setting that prop, there should be no visible changes in behaviour but your tests may need updating. Please see the original PR (https://github.com/grafana/grafana/pull/36398) for migration guides. If you were setting `menuShouldPortal={false}` this will continue to prevent the menu from portalling.
Issue [#48176](https://github.com/grafana/grafana/issues/48176)
Grafana alerting endpoint prefixed with `api/v1/rule/test` that tests a rule against a Corte/Loki data source now expects the data source UID as a path parameter instead of the data source numeric identifier. Issue [#48070](https://github.com/grafana/grafana/issues/48070)
Grafana alerting endpoints prefixed with `api/prometheus/` that proxy requests to a Cortex/Loki data source now expect the data source UID as a path parameter instead of the data source numeric identifier. Issue [#48052](https://github.com/grafana/grafana/issues/48052)
Grafana alerting endpoints prefixed with `api/ruler/` that proxy requests to a Cortex/Loki data source now expect the data source UID as a path parameter instead of the data source numeric identifier. Issue [#48046](https://github.com/grafana/grafana/issues/48046)
Grafana alerting endpoints prefixed with `api/alertmanager/` that proxy requests to an Alertmanager now expect the data source UID as a path parameter instead of the data source numeric identifier. Issue [#47978](https://github.com/grafana/grafana/issues/47978)
The format of log messages have been updated, `lvl` is now `level` and `eror`and `dbug` has been replaced with `error` and `debug`. The precision of timestamps has been increased. To smooth the transition, it is possible to opt-out of the new log format by enabling the feature toggle `oldlog`. This option will be removed in a future minor release. Issue [#47584](https://github.com/grafana/grafana/issues/47584)
In the Loki data source, the dataframe format used to represent Loki logs-data has been changed to a more efficient format. The query-result is represented by a single dataframe with a "labels" column, instead of the separate dataframes for every labels-value. When displaying such data in explore, or in a logs-panel in the dashboard will continue to work without changes, but if the data was loaded into a different dashboard-panel, or Transforms were used, adjustments may be necessary. For example, if you used the "labels to fields" transformation with the logs data, please switch to the "extract fields" transformation. Issue [#47153](https://github.com/grafana/grafana/issues/47153)
### Deprecations
`setExploreQueryField`, `setExploreMetricsQueryField` and `setExploreLogsQueryField` are now deprecated and will be removed in a future release. If you need to set a different query editor for Explore, conditionally render based on `props.app` in your regular query editor. Please refer to https://grafana.com/docs/grafana/latest/developers/plugins/add-support-for-explore-queries/ for more information.
Issue [#48701](https://github.com/grafana/grafana/issues/48701)
### Plugin development fixes & changes
- **Chore:** Remove react-testing-lib from bundles. [#50442](https://github.com/grafana/grafana/pull/50442), [@jackw](https://github.com/jackw)
- **Select:** Portal menu by default. [#48176](https://github.com/grafana/grafana/pull/48176), [@ashharrison90](https://github.com/ashharrison90)
<!-- 9.0.0 END -->
<!-- 9.0.0-beta3 START -->
# 9.0.0-beta3 (2022-06-06)
### Features and enhancements
- **Alerting:** Add provenance guard to config api. [#50147](https://github.com/grafana/grafana/pull/50147), [@JohnnyQQQQ](https://github.com/JohnnyQQQQ)
- **Alerting:** Make folder filter clearable in Alert list panel. [#50093](https://github.com/grafana/grafana/pull/50093), [@peterholmberg](https://github.com/peterholmberg)
- **Alerting:** Provisioning API - Alert rules. [#47930](https://github.com/grafana/grafana/pull/47930), [@JohnnyQQQQ](https://github.com/JohnnyQQQQ)
- **Alerting:** Remove Image Upload code from Slack notifier. [#50062](https://github.com/grafana/grafana/pull/50062), [@joeblubaugh](https://github.com/joeblubaugh)
- **Alerting:** Remove double quotes from matchers. [#50038](https://github.com/grafana/grafana/pull/50038), [@gotjosh](https://github.com/gotjosh)
- **Cloudwatch:** Dynamic labels autocomplete. [#49794](https://github.com/grafana/grafana/pull/49794), [@sunker](https://github.com/sunker)
- **Datasource:** Remove deprecated max_idle_connections_per_host setting. [#49948](https://github.com/grafana/grafana/pull/49948), [@marefr](https://github.com/marefr)
- **Datasource:** Remove support for unencrypted passwords. [#49987](https://github.com/grafana/grafana/pull/49987), [@marefr](https://github.com/marefr)
- **Dependencies:** Update to Golang version `1.17.11`. [#50253](https://github.com/grafana/grafana/pull/50253), [@dsotirakis](https://github.com/dsotirakis)
- **Loki:** Run query when pressing Enter on line-filters. [#49913](https://github.com/grafana/grafana/pull/49913), [@svennergr](https://github.com/svennergr)
- **Metrics:** Remove support for using summaries instead of histogram for HTTP instrumentation. [#49985](https://github.com/grafana/grafana/pull/49985), [@bergquist](https://github.com/bergquist)
- **Plugins:** Remove deprecated /api/tsdb/query metrics endpoint. [#49916](https://github.com/grafana/grafana/pull/49916), [@wbrowne](https://github.com/wbrowne)
- **Plugins:** Support headers field for check health. [#49930](https://github.com/grafana/grafana/pull/49930), [@marefr](https://github.com/marefr)
- **Prometheus/Loki:** Add raw query and syntax highlight in explain mode. [#50070](https://github.com/grafana/grafana/pull/50070), [@aocenas](https://github.com/aocenas)
- **Prometheus:** Migrate metadata queries to use resource calls. [#49921](https://github.com/grafana/grafana/pull/49921), [@srclosson](https://github.com/srclosson)
- **RBAC:** Make RBAC action names more consistent. [#49730](https://github.com/grafana/grafana/pull/49730), [@IevaVasiljeva](https://github.com/IevaVasiljeva)
- **RBAC:** Make RBAC action names more consistent. (Enterprise)
- **Settings:** Sunset non-duration based login lifetime config. [#49944](https://github.com/grafana/grafana/pull/49944), [@sakjur](https://github.com/sakjur)
- **[9.0.x] Alerting:** Update alert rule diff to not see difference between nil and empty map. [#50198](https://github.com/grafana/grafana/pull/50198), [@yuri-tceretian](https://github.com/yuri-tceretian)
### Bug fixes
- **Alerting:** Fix alert list panel showing firing alerts with no instances. [#50069](https://github.com/grafana/grafana/pull/50069), [@gillesdemey](https://github.com/gillesdemey)
- **Alerting:** Fix notification policy "Override grouping" form save. [#50031](https://github.com/grafana/grafana/pull/50031), [@JacobsonMT](https://github.com/JacobsonMT)
- **Alerting:** Remove double quotes from matchers. [#50046](https://github.com/grafana/grafana/pull/50046), [@alexweav](https://github.com/alexweav)
- **Alerting:** Use correct permission scope for external AM updates. [#50159](https://github.com/grafana/grafana/pull/50159), [@gillesdemey](https://github.com/gillesdemey)
- **Datasource:** Fix allowed cookies to be forwarded as header to backend datasources. [#49541](https://github.com/grafana/grafana/pull/49541), [@marefr](https://github.com/marefr)
- **Licensing:** Fix trial expiration warning. (Enterprise)
- **Loki:** Fix uncaught errors if `labelKey` contains special characters. [#49887](https://github.com/grafana/grafana/pull/49887), [@svennergr](https://github.com/svennergr)
- **Prometheus:** Fix aligning of labels of exemplars after backend migration. [#49924](https://github.com/grafana/grafana/pull/49924), [@aocenas](https://github.com/aocenas)
- **SharePDF:** Fix repeated datasource variables in PDF. (Enterprise)
- **State Timeline:** Fix Null Value Filling and Value Transformation. [#50054](https://github.com/grafana/grafana/pull/50054), [@codeincarnate](https://github.com/codeincarnate)
- **Usage stats:** Divide collection into multiple functions to isolate failures. [#49928](https://github.com/grafana/grafana/pull/49928), [@sakjur](https://github.com/sakjur)
### Breaking changes
Removes support for storing/using datasource `password` and `basicAuthPassword` unencrypted which was [deprecated in Grafana v8.1.0](https://grafana.com/docs/grafana/latest/installation/upgrading/#use-of-unencrypted-passwords-for-data-sources-no-longer-supported). Please use `secureJsonData.password` and `secureJsonData.basicAuthPassword`. Issue [#49987](https://github.com/grafana/grafana/issues/49987)
Removes the option to instrument HTTP request in Grafana using summaries instead of histograms. Issue [#49985](https://github.com/grafana/grafana/issues/49985)
Removes support for deprecated dataproxy.max_idle_connections_per_host setting. Please use max_idle_connections instead. Issue [#49948](https://github.com/grafana/grafana/issues/49948)
Removes the deprecated `getFormStyles` function from grafana-ui.
Prefer using `GrafanaTheme2` and the `useStyles2` hook. Issue [#49945](https://github.com/grafana/grafana/issues/49945)
The configuration options `auth.login_maximum_inactive_lifetime_days` and `auth.login_maximum_lifetime_days` were deprecated in Grafana v7.2.0 and have now been removed. Use `login_maximum_inactive_lifetime_duration` and `login_maximum_lifetime_duration` to customize the maximum lifetime of a login session. Issue [#49944](https://github.com/grafana/grafana/issues/49944)
Removed the deprecated `isFocused` and `isInvalid` props from the `InlineLabel` component. These props haven't done anything for a while, so migration is just a matter of removing the props. Issue [#49929](https://github.com/grafana/grafana/issues/49929)
Removed the deprecated `onColorChange` prop from `ColorPicker`. Moving forward the `onChange` prop should be used. Issue [#49923](https://github.com/grafana/grafana/issues/49923)
`/api/tsdb/query` API has been removed. Use [/api/ds/query](https://grafana.com/docs/grafana/latest/http_api/data_source/#query-a-data-source) instead.
Issue [#49916](https://github.com/grafana/grafana/issues/49916)
`onClipboardCopy` and `onClipboardError` APIs have been changed such that the callback's argument is just the text that's been copied rather than the old `ClipboardEvent` interface.
Migration should just be a matter of going from
```tsx
<ClipboardButton
{/*other props... */}
onClipboardCopy={(e) => {
console.log(`Text "${e.text}" was copied!`);
}}
/>
```
to
````tsx
<ClipboardButton
{/* other props... */}
onClipboardCopy={(copiedText) => {
console.log(`Text "${copiedText}" was copied!`);
}}
/>
```
Issue [#49847](https://github.com/grafana/grafana/issues/49847)
The following RBAC action renames have been carried out:
- `users.authtoken:update` -> `users.authtoken:write`;
- `users.password:update` -> `users.password:write`;
- `users.permissions:update` -> `users.permissions:write`;
- `users.quotas:update` -> `users.quotas:write`;
- `org.users.role:update` -> `org.users:write`;
- `alert.instances:update` -> `alert.instances:write`;
- `alert.rules:update` -> `alert.rules:write`;
- `users.authtoken:list` -> `users.authtoken:read`;
- `users.quotas:list` -> `users.quotas:read`;
- `users.teams:read` -> replaced by `users.read` + `teams:read`
We've added a migration from the old action names to the new names and have updated our documentation. But you will have to update any scripts and provisioning files that are using the old action names. Issue [#49730](https://github.com/grafana/grafana/issues/49730)
The following RBAC action renames have been carried out:
- `reports.admin:write` -> `reports:write`;
- `reports.admin:create` -> `reports:create`;
- `licensing:update` -> `licensing:write`;
- `roles:list` -> `roles:read`;
- `teams.roles:list` -> `teams.roles:read`;
- `users.roles:list` -> `users.roles:read`;
- `users.permissions:list` -> `users.permissions:read`
We've added a migration from the old action names to the new names and have updated our documentation. But you will have to update any scripts and provisioning files that are using the old action names. Issue [#3372](https://github.com/grafana/grafana/issues/3372)
### Plugin development fixes & changes
- **UI:** Remove deprecated getFormStyles function. [#49945](https://github.com/grafana/grafana/pull/49945), [@kaydelaney](https://github.com/kaydelaney)
- **InlineLabel:** Remove deprecated props. [#49929](https://github.com/grafana/grafana/pull/49929), [@kaydelaney](https://github.com/kaydelaney)
- **ColorPicker:** Remove deprecated onColorChange prop. [#49923](https://github.com/grafana/grafana/pull/49923), [@kaydelaney](https://github.com/kaydelaney)
- **ClipboardButton:** Simplify callbacks. [#49847](https://github.com/grafana/grafana/pull/49847), [@kaydelaney](https://github.com/kaydelaney)
<!-- 9.0.0-beta3 END -->
<!-- 9.0.0-beta2 START -->
# 9.0.0-beta2 (2022-05-31)
### Features and enhancements
- **Alerting:** Add legacy indicator to navbar. [#49511](https://github.com/grafana/grafana/pull/49511), [@peterholmberg](https://github.com/peterholmberg)
- **Alerting:** Add templated subject config to email notifier. [#49742](https://github.com/grafana/grafana/pull/49742), [@JacobsonMT](https://github.com/JacobsonMT)
- **Alerting:** Enable Unified Alerting for open source and enterprise. [#49834](https://github.com/grafana/grafana/pull/49834), [@grobinson-grafana](https://github.com/grobinson-grafana)
- **Alerting:** Make alertmanager datasource stable. [#49485](https://github.com/grafana/grafana/pull/49485), [@gillesdemey](https://github.com/gillesdemey)
- **Angular:** Remove deprecated angular modal support and libs. [#49781](https://github.com/grafana/grafana/pull/49781), [@torkelo](https://github.com/torkelo)
- **AuthProxy:** Remove deprecated ldap_sync_ttl setting. [#49902](https://github.com/grafana/grafana/pull/49902), [@kalleep](https://github.com/kalleep)
- **Build:** Enable long term caching for frontend assets. [#47625](https://github.com/grafana/grafana/pull/47625), [@jackw](https://github.com/jackw)
- **Chore:** Remove deprecated TextDisplayOptions export. [#49705](https://github.com/grafana/grafana/pull/49705), [@kaydelaney](https://github.com/kaydelaney)
- **Chore:** Remove deprecated `surface` prop from IconButton. [#49715](https://github.com/grafana/grafana/pull/49715), [@kaydelaney](https://github.com/kaydelaney)
- **Chore:** Remove usage of deprecated getColorForTheme function. [#49519](https://github.com/grafana/grafana/pull/49519), [@kaydelaney](https://github.com/kaydelaney)
- **DatePicker:** Add minDate prop. [#49503](https://github.com/grafana/grafana/pull/49503), [@alexanderzobnin](https://github.com/alexanderzobnin)
- **Notification history:** Enable by default. [#49502](https://github.com/grafana/grafana/pull/49502), [@ashharrison90](https://github.com/ashharrison90)
- **Prometheus:** Add pluginVersion to query. [#49414](https://github.com/grafana/grafana/pull/49414), [@toddtreece](https://github.com/toddtreece)
- **Prometheus:** Enable prometheusStreamingJSONParser by default. [#49475](https://github.com/grafana/grafana/pull/49475), [@toddtreece](https://github.com/toddtreece)
- **Prometheus:** Predefined scopes for Azure authentication. [#49557](https://github.com/grafana/grafana/pull/49557), [@kostrse](https://github.com/kostrse)
- **Prometheus:** Streaming JSON parser performance improvements. [#48792](https://github.com/grafana/grafana/pull/48792), [@toddtreece](https://github.com/toddtreece)
- **ValueMapping:** Add support for regex replacement over multiple lines. [#49607](https://github.com/grafana/grafana/pull/49607), [@ashharrison90](https://github.com/ashharrison90)
### Bug fixes
- **Accessibility:** Pressing escape in a Modal or DashboardSettings correctly closes the overlay. [#49500](https://github.com/grafana/grafana/pull/49500), [@ashharrison90](https://github.com/ashharrison90)
- **Alerting:** Validate alert notification UID length. [#45546](https://github.com/grafana/grafana/pull/45546), [@wbrowne](https://github.com/wbrowne)
- **BackendSrv:** Throw an error when fetching an invalid JSON. [#47493](https://github.com/grafana/grafana/pull/47493), [@leventebalogh](https://github.com/leventebalogh)
- **Fix:** Timeseries migration regex override. [#49629](https://github.com/grafana/grafana/pull/49629), [@zoltanbedi](https://github.com/zoltanbedi)
- **Loki:** Fix unwrap parsing in query builder. [#49732](https://github.com/grafana/grafana/pull/49732), [@ivanahuckova](https://github.com/ivanahuckova)
- **Navigation:** Position hamburger menu correctly in mobile view. [#49603](https://github.com/grafana/grafana/pull/49603), [@ashharrison90](https://github.com/ashharrison90)
- **PanelEditor:** Fixes issue with Table view and multi data frames. [#49854](https://github.com/grafana/grafana/pull/49854), [@JoaoSilvaGrafana](https://github.com/JoaoSilvaGrafana)
- **Preferences:** Fix updating of preferences for Navbar and Query History. [#49677](https://github.com/grafana/grafana/pull/49677), [@ivanahuckova](https://github.com/ivanahuckova)
- **TimeRange:** Fixes issue when zooming out on a timerange with timespan 0. [#49622](https://github.com/grafana/grafana/pull/49622), [@JoaoSilvaGrafana](https://github.com/JoaoSilvaGrafana)
- **Variables:** Fixes DS variables not being correctly used in panel queries. [#49323](https://github.com/grafana/grafana/pull/49323), [@JoaoSilvaGrafana](https://github.com/JoaoSilvaGrafana)
### Breaking changes
Drop support for deprecated setting ldap_sync_ttl under [auth.proxy]
Only sync_ttl will work from now on Issue [#49902](https://github.com/grafana/grafana/issues/49902)
Removes support for deprecated `heading` and `description` props. Moving forward, the `Card.Heading` and `Card.Description` components should be used. Issue [#49885](https://github.com/grafana/grafana/issues/49885)
Removes the deprecated `link` variant from the `Button` component.
To migrate, replace any usage of `variant="link"` with `fill="text"`. Issue [#49843](https://github.com/grafana/grafana/issues/49843)
Removes the deprecated `surface` prop from the `IconButton` component. This prop hasn't actually done anything for a while, so it should be safe to just remove any instances of its usage.
Issue [#49715](https://github.com/grafana/grafana/issues/49715)
Removes the deprecated `TextDisplayOptions` export from `@grafana/data` in favor of `VizTextDisplayOptions` from `@grafana/schema`. To migrate, just replace usage of `TextDisplayOptions` with `VizTextDisplayOptions`. Issue [#49705](https://github.com/grafana/grafana/issues/49705)
Removed support for the deprecated `getColorForTheme(color: string, theme: GrafanaTheme)` function in favor of the
`theme.visualization.getColorByName(color: string)` method. The output of this method is identical to the removed function, so migration should just be a matter of rewriting calls of `getColorForTheme(myColor, myTheme)` to `myTheme.visualization.getColorByName(myColor)`.
Issue [#49519](https://github.com/grafana/grafana/issues/49519)
In the Prometheus data source, for consistency and performance reasons, we changed how we represent `NaN` (not a number) values received from Prometheus. In the past versions, we converted these to `null` in the frontend (for dashboard and explore), and kept as `NaN` in the alerting path. Starting with this version, we will always keep it as `NaN`. This change should be mostly invisible for the users. Issue [#49475](https://github.com/grafana/grafana/issues/49475)
Plugins using custom Webpack configs could potentially break due to the changes between webpack@4 and webpack@5. Please refer to the [official migration guide](https://webpack.js.org/migrate/5/) for assistance.
Webpack 5 does not include polyfills for node.js core modules by default (e.g. `buffer`, `stream`, `os`). This can result in failed builds for plugins. If polyfills are required it is recommended to create a custom webpack config in the root of the plugin repo and add the required fallbacks:
```js
// webpack.config.js
module.exports.getWebpackConfig = (config, options) => ({
...config,
resolve: {
...config.resolve,
fallback: {
os: require.resolve('os-browserify/browser'),
stream: require.resolve('stream-browserify'),
timers: require.resolve('timers-browserify'),
},
},
});
```
Please refer to the webpack build error messages or the [official migration guide](https://webpack.js.org/migrate/5/) for assistance with fallbacks.
**Which issue(s) this PR fixes**:
<!--
- Automatically closes linked issue when the Pull Request is merged.
Usage: "Fixes #<issue number>", or "Fixes (paste link of issue)"
-->
Fixes #
**Special notes for your reviewer**:
It does not bump the following dependencies to the very latest due to the latest versions being ES modules:
- ora
- globby
- execa
- chalk
Issue [#47826](https://github.com/grafana/grafana/issues/47826)
We have changed the internals of `backendSrv.fetch()` to throw an error when the response is an incorrect JSON.
```javascript
// PREVIOUSLY: this was returning with an empty object {} - in case the response is an invalid JSON
return await getBackendSrv().post(`${API_ROOT}/${id}/install`);
// AFTER THIS CHANGE: the following will throw an error - in case the response is an invalid JSON
return await getBackendSrv().post(`${API_ROOT}/${id}/install`);
```
**When is the response handled as JSON?**
- If the response has the `"Content-Type: application/json"` header, OR
- If the backendSrv options ([`BackendSrvRequest`](https://github.com/grafana/grafana/blob/e237ff20a996c7313632b2e28f38032012f0e340/packages/grafana-runtime/src/services/backendSrv.ts#L8)) specify the response as JSON: `{ responseType: 'json' }`
**How does it work after this change?**
- In case it is recognised as a JSON response and the response is empty, it returns an empty object `{}`
- In case it is recognised as a JSON response and it has formatting errors, it throws an error
**How to migrate?**
Make sure to handle possible errors on the callsite where using `backendSrv.fetch()` (or any other `backendSrv` methods). Issue [#47493](https://github.com/grafana/grafana/issues/47493)
### Plugin development fixes & changes
- **UI/Card:** Remove deprecated props. [#49885](https://github.com/grafana/grafana/pull/49885), [@kaydelaney](https://github.com/kaydelaney)
- **UI/Button:** Remove deprecated "link" variant. [#49843](https://github.com/grafana/grafana/pull/49843), [@kaydelaney](https://github.com/kaydelaney)
- **Toolkit:** Bump dependencies. [#47826](https://github.com/grafana/grafana/pull/47826), [@jackw](https://github.com/jackw)
<!-- 9.0.0-beta2 END -->
<!-- 9.0.0-beta1 START -->
# 9.0.0-beta1 (2022-05-24)
### Features and enhancements
- **AccessControl:** Add setting for permission cache. (Enterprise)
- **AccessControl:** Check dashboard permissions for reports. (Enterprise)
- **Auth:** Remove grafana ui dependency to the aws sdk. [#43559](https://github.com/grafana/grafana/pull/43559), [@sunker](https://github.com/sunker)
- **BasicRoles:** Add API endpoint to reset basic roles permissions to factory. (Enterprise)
- **LDAP Mapping:** Allow Grafana Admin mapping without org role. [#37189](https://github.com/grafana/grafana/pull/37189), [@krzysdabro](https://github.com/krzysdabro)
- **Licensing:** Only enforce total number of users. (Enterprise)
- **Loki:** do not convert NaN to null. [#45389](https://github.com/grafana/grafana/pull/45389), [@gabor](https://github.com/gabor)
- **Report:** API support for multiple dashboards. (Enterprise)
- **Report:** Support sending embedded image in the report email. (Enterprise)
- **Report:** UI for multiple dashboards. (Enterprise)
- **Reporting:** Remove redundant empty attachment when export to CSV is enabled. (Enterprise)
- **SAML:** Implement Name Templates for assertion_attribute_name option. (Enterprise)
- **SSE/Alerting:** Support prom instant vector responses. [#44865](https://github.com/grafana/grafana/pull/44865), [@kylebrandt](https://github.com/kylebrandt)
- **Tracing:** Add trace to metrics config behind feature toggle. [#46298](https://github.com/grafana/grafana/pull/46298), [@connorlindsey](https://github.com/connorlindsey)
### Bug fixes
- **Fix:** Prevent automatic parsing of string data types to numbers. [#46035](https://github.com/grafana/grafana/pull/46035), [@joshhunt](https://github.com/joshhunt)
- **Prometheus:** Fix inconsistent labels in exemplars resulting in marshal json error. [#46135](https://github.com/grafana/grafana/pull/46135), [@hanjm](https://github.com/hanjm)
### Breaking changes
In the Loki data source, for consistency and performance reasons, we changed how we represent `NaN` (not a number) values received from Loki. In the past versions, we converted these to `null` in the frontend (for dashboard and explore), and kept as `NaN` in the alerting path. Starting with this version, we will always keep it as `NaN`. This change should be mostly invisible for the users. Issue [#45389](https://github.com/grafana/grafana/issues/45389)
The dependency to [grafana/aws-sdk](https://github.com/grafana/grafana-aws-sdk-react) is moved from [grafana/ui](https://github.com/grafana/grafana/blob/main/packages/grafana-ui/package.json) to the plugin. This means that any plugin that use SIGV4 auth need to pass a SIGV4 editor component as a prop to the `DataSourceHttpSettings` component. Issue [#43559](https://github.com/grafana/grafana/issues/43559)
<!-- 9.0.0-beta1 END -->
<!-- 8.5.4 START -->
# 8.5.4 (2022-05-30)
### Features and enhancements
- **Alerting:** Remove disabled flag for data source when migrating alerts. [#48559](https://github.com/grafana/grafana/pull/48559), [@yuri-tceretian](https://github.com/yuri-tceretian)
- **Alerting:** Show notification tab of legacy alerting only to editor. [#49624](https://github.com/grafana/grafana/pull/49624), [@yuri-tceretian](https://github.com/yuri-tceretian)
- **Alerting:** Update migration to migrate only alerts that belong to existing org\dashboard. [#49192](https://github.com/grafana/grafana/pull/49192), [@yuri-tceretian](https://github.com/yuri-tceretian)
- **AzureMonitor:** Do not quote variables when a custom "All" variable option is used. [#49428](https://github.com/grafana/grafana/pull/49428), [@andresmgot](https://github.com/andresmgot)
- **AzureMonitor:** Update allowed namespaces. [#48468](https://github.com/grafana/grafana/pull/48468), [@jcolladokuri](https://github.com/jcolladokuri)
- **CloudMonitor:** Correctly encode default project response. [#49510](https://github.com/grafana/grafana/pull/49510), [@aangelisc](https://github.com/aangelisc)
- **Cloudwatch:** Add support for new AWS/RDS EBS\* metrics. [#48798](https://github.com/grafana/grafana/pull/48798), [@szymonpk](https://github.com/szymonpk)
- **InfluxDB:** Use backend for influxDB by default via feature toggle. [#48453](https://github.com/grafana/grafana/pull/48453), [@yesoreyeram](https://github.com/yesoreyeram)
- **Legend:** Use correct unit for percent and count calculations. [#49004](https://github.com/grafana/grafana/pull/49004), [@dprokop](https://github.com/dprokop)
- **LokI:** use millisecond steps in Grafana 8.5.x. [#48630](https://github.com/grafana/grafana/pull/48630), [@gabor](https://github.com/gabor)
- **Plugins:** Introduce HTTP 207 Multi Status response to api/ds/query. [#48550](https://github.com/grafana/grafana/pull/48550), [@wbrowne](https://github.com/wbrowne)
- **Reporting:** Improve PDF file size using grid layout. (Enterprise)
- **Transformations:** Add an All Unique Values Reducer. [#48653](https://github.com/grafana/grafana/pull/48653), [@josiahg](https://github.com/josiahg)
- **Transformers:** avoid error when the ExtractFields source field is missing. [#49368](https://github.com/grafana/grafana/pull/49368), [@wardbekker](https://github.com/wardbekker)
- **[v8.5.x] Alerting:** Update migration to migrate only alerts that belong to existing org\dashboard. [#49199](https://github.com/grafana/grafana/pull/49199), [@grafanabot](https://github.com/grafanabot)
- **[v8.5.x] Reporting:** Improve PDF file size using grid layout. (Enterprise)
### Bug fixes
- **Alerting:** Allow disabling override timings for notification policies. [#48648](https://github.com/grafana/grafana/pull/48648), [@gillesdemey](https://github.com/gillesdemey)
- **Alerting:** Allow serving images from custom url path. [#49022](https://github.com/grafana/grafana/pull/49022), [@gillesdemey](https://github.com/gillesdemey)
- **Alerting:** Apply Custom Headers to datasource queries. [#47860](https://github.com/grafana/grafana/pull/47860), [@joeblubaugh](https://github.com/joeblubaugh)
- **Alerting:** Fix RBAC actions for notification policies. [#49185](https://github.com/grafana/grafana/pull/49185), [@yuri-tceretian](https://github.com/yuri-tceretian)
- **Alerting:** Fix access to alerts for viewer with editor permissions when RBAC is disabled. [#49270](https://github.com/grafana/grafana/pull/49270), [@yuri-tceretian](https://github.com/yuri-tceretian)
- **Alerting:** Fix anonymous access to alerting. [#49203](https://github.com/grafana/grafana/pull/49203), [@yuri-tceretian](https://github.com/yuri-tceretian)
- **Alerting:** correctly show all alerts in a folder. [#48684](https://github.com/grafana/grafana/pull/48684), [@gillesdemey](https://github.com/gillesdemey)
- **AzureMonitor:** Fixes metric definition for Azure Storage queue/file/blob/table resources. [#49101](https://github.com/grafana/grafana/pull/49101), [@aangelisc](https://github.com/aangelisc)
- **Dashboard:** Fix dashboard update permission check. [#48746](https://github.com/grafana/grafana/pull/48746), [@IevaVasiljeva](https://github.com/IevaVasiljeva)
- **DashboardExport:** Fix exporting and importing dashboards where query data source ended up as incorrect. [#48410](https://github.com/grafana/grafana/pull/48410), [@torkelo](https://github.com/torkelo)
- **FileUpload:** clicking the `Upload file` button now opens the modal correctly. [#48766](https://github.com/grafana/grafana/pull/48766), [@ashharrison90](https://github.com/ashharrison90)
- **GrafanaUI:** Fix color of links in error Tooltips in light theme. [#49327](https://github.com/grafana/grafana/pull/49327), [@joshhunt](https://github.com/joshhunt)
- **LibraryPanels:** Fix library panels not connecting properly in imported dashboards. [#49161](https://github.com/grafana/grafana/pull/49161), [@joshhunt](https://github.com/joshhunt)
- **Loki:** Improve unpack parser handling. [#49074](https://github.com/grafana/grafana/pull/49074), [@gabor](https://github.com/gabor)
- **RolePicker:** Fix menu position on smaller screens. [#48429](https://github.com/grafana/grafana/pull/48429), [@Clarity-89](https://github.com/Clarity-89)
- **TimeRange:** Fixes updating time range from url and browser history. [#48657](https://github.com/grafana/grafana/pull/48657), [@torkelo](https://github.com/torkelo)
- **TimeSeries:** Fix detection & rendering of sparse datapoints. [#48841](https://github.com/grafana/grafana/pull/48841), [@leeoniya](https://github.com/leeoniya)
- **Timeseries:** Fix outside range stale state. [#49633](https://github.com/grafana/grafana/pull/49633), [@ryantxu](https://github.com/ryantxu)
- **Tooltip:** Fix links not legible in Tooltips when using light theme. [#48748](https://github.com/grafana/grafana/pull/48748), [@joshhunt](https://github.com/joshhunt)
- **Tooltip:** Sort decimals using standard numeric compare. [#49084](https://github.com/grafana/grafana/pull/49084), [@dprokop](https://github.com/dprokop)
- **Transforms:** Labels to fields, fix label picker layout. [#49304](https://github.com/grafana/grafana/pull/49304), [@torkelo](https://github.com/torkelo)
- **Variables:** Fixes issue with data source variables not updating queries with variable. [#49478](https://github.com/grafana/grafana/pull/49478), [@torkelo](https://github.com/torkelo)
- **[v8.5.x] Alerting:** Fix RBAC actions for notification policies (#49185). [#49348](https://github.com/grafana/grafana/pull/49348), [@yuri-tceretian](https://github.com/yuri-tceretian)
- **[v8.5.x] Alerting:** Fix access to alerts for viewer with editor permissions when RBAC is disabled. [#49427](https://github.com/grafana/grafana/pull/49427), [@konrad147](https://github.com/konrad147)
- **[v8.5.x] Alerting:** Fix anonymous access to alerting. [#49268](https://github.com/grafana/grafana/pull/49268), [@yuri-tceretian](https://github.com/yuri-tceretian)
### Breaking changes
For a data source query made via /api/ds/query :
- If the `DatasourceQueryMultiStatus` feature is enabled and
- The data source response has an error set as part of the `DataResponse`, the resulting HTTP status code is now `207 Multi Status` instead of `400 Bad gateway`
- If the `DatasourceQueryMultiStatus` feature is **not** enabled and
- The data source response has an error set as part of the `DataResponse`, the resulting HTTP status code is `400 Bad Request` (no breaking change)
--> Issue [#48550](https://github.com/grafana/grafana/issues/48550)
<!-- 8.5.4 END -->
<!-- 8.5.3 START -->
# 8.5.3
### Bug fixes
- **Security:** fixes CVE-2022-29170. [#49240](https://github.com/grafana/grafana/pull/49240), [@xlson](https://github.com/xlson)
<!-- 8.5.3 END -->
<!-- 8.5.2 START -->
# 8.5.2 (2022-05-03)
### Features and enhancements
- **Alerting:** Add safeguard for migrations that might cause dataloss. [#48526](https://github.com/grafana/grafana/pull/48526), [@JohnnyQQQQ](https://github.com/JohnnyQQQQ)
- **AzureMonitor:** Add support for not equals and startsWith operators when creating Azure Metrics dimension filters. [#48077](https://github.com/grafana/grafana/pull/48077), [@aangelisc](https://github.com/aangelisc)
- **Elasticsearch:** Add deprecation notice for < 7.10 versions. [#48506](https://github.com/grafana/grafana/pull/48506), [@ivanahuckova](https://github.com/ivanahuckova)
- **Traces:** Filter by service/span name and operation in Tempo and Jaeger. [#48209](https://github.com/grafana/grafana/pull/48209), [@joey-grafana](https://github.com/joey-grafana)
### Bug fixes
- **AzureAd Oauth:** Fix strictMode to reject users without an assigned role. [#48474](https://github.com/grafana/grafana/pull/48474), [@kyschouv](https://github.com/kyschouv)
- **CloudWatch:** Fix variable query tag migration. [#48587](https://github.com/grafana/grafana/pull/48587), [@iwysiu](https://github.com/iwysiu)
- **Plugins:** Ensure catching all appropriate 4xx api/ds/query scenarios. [#47565](https://github.com/grafana/grafana/pull/47565), [@wbrowne](https://github.com/wbrowne)
<!-- 8.5.2 END -->
<!-- 8.5.1 START -->
# 8.5.1 (2022-04-27)
### Bug fixes
- **Azure Monitor:** Fix space character encoding for metrics query link to Azure Portal. [#48139](https://github.com/grafana/grafana/pull/48139), [@kevinwcyu](https://github.com/kevinwcyu)
- **CloudWatch:** Prevent log groups from being removed on query change. [#47994](https://github.com/grafana/grafana/pull/47994), [@asimpson](https://github.com/asimpson)
- **Cloudwatch:** Fix template variables in variable queries. [#48140](https://github.com/grafana/grafana/pull/48140), [@iwysiu](https://github.com/iwysiu)
- **Explore:** Prevent direct access to explore if disabled via feature toggle. [#47714](https://github.com/grafana/grafana/pull/47714), [@Elfo404](https://github.com/Elfo404)
- **InfluxDB:** Fixes invalid no data alerts. [#48295](https://github.com/grafana/grafana/pull/48295), [@yesoreyeram](https://github.com/yesoreyeram)
- **Navigation:** Prevent navbar briefly showing on login. [#47968](https://github.com/grafana/grafana/pull/47968), [@ashharrison90](https://github.com/ashharrison90)
- **Plugins Catalog:** Fix styling of hyperlinks. [#48196](https://github.com/grafana/grafana/pull/48196), [@marefr](https://github.com/marefr)
- **Table:** Fix filter crashes table. [#48258](https://github.com/grafana/grafana/pull/48258), [@zoltanbedi](https://github.com/zoltanbedi)
- **TimeSeries:** Properly stack series with missing datapoints. [#48321](https://github.com/grafana/grafana/pull/48321), [@leeoniya](https://github.com/leeoniya)
<!-- 8.5.1 END -->
<!-- 8.5.0 START -->
# 8.5.0 (2022-04-21)
### Features and enhancements
- **Alerting:** Add contact points provisioning API. [#47197](https://github.com/grafana/grafana/pull/47197), [@JohnnyQQQQ](https://github.com/JohnnyQQQQ)
- **Alerting:** Add resolved count to notification title when both firing and resolved present. [#46697](https://github.com/grafana/grafana/pull/46697), [@JacobsonMT](https://github.com/JacobsonMT)
- **Alerting:** Alert rule should wait For duration when execution error state is Alerting. [#47052](https://github.com/grafana/grafana/pull/47052), [@grobinson-grafana](https://github.com/grobinson-grafana)
- **Alerting:** Classic conditions can now display multiple values. [#46971](https://github.com/grafana/grafana/pull/46971), [@gotjosh](https://github.com/gotjosh)
- **Alerting:** Display query from grafana-managed alert rules on `/api/v1/rules`. [#45969](https://github.com/grafana/grafana/pull/45969), [@gotjosh](https://github.com/gotjosh)
- **Alerting:** Enhance support for arbitrary group names in managed alerts. [#47785](https://github.com/grafana/grafana/pull/47785), [@gillesdemey](https://github.com/gillesdemey)
- **Alerting:** add field for custom slack endpoint. [#45751](https://github.com/grafana/grafana/pull/45751), [@nathanrodman](https://github.com/nathanrodman)
- **Azure Monitor :** Adding json formatting of error messages in Panel Header Corner and Inspect Error Tab. [#44877](https://github.com/grafana/grafana/pull/44877), [@yaelleC](https://github.com/yaelleC)
- **Azure Monitor:** Add 2 more Curated Dashboards for VM Insights. [#45187](https://github.com/grafana/grafana/pull/45187), [@jcolladokuri](https://github.com/jcolladokuri)
- **CloudWatch:** Handle new error codes for MetricInsights. [#47033](https://github.com/grafana/grafana/pull/47033), [@Gabrielopesantos](https://github.com/Gabrielopesantos)
- **Dashboards:** show changes in save dialog. [#46557](https://github.com/grafana/grafana/pull/46557), [@ryantxu](https://github.com/ryantxu)
- **DataSource:** Default data source is no longer a persisted state but just the default data source for new panels. [#45132](https://github.com/grafana/grafana/pull/45132), [@torkelo](https://github.com/torkelo)
- **DataSourcePlugin API:** Allow queries import when changing data source type. [#47435](https://github.com/grafana/grafana/pull/47435), [@dprokop](https://github.com/dprokop)
- **Explore:** Remove return to panel button. [#45018](https://github.com/grafana/grafana/pull/45018), [@gelicia](https://github.com/gelicia)
- **Explore:** allow users to save Explore state to a new panel in a new dashboard. [#45148](https://github.com/grafana/grafana/pull/45148), [@Elfo404](https://github.com/Elfo404)
- **Instrumentation:** Proxy status code correction and various improvements. [#47473](https://github.com/grafana/grafana/pull/47473), [@marefr](https://github.com/marefr)
- **Logging:** Introduce feature toggle to activate gokit/log format. [#47336](https://github.com/grafana/grafana/pull/47336), [@ying-jeanne](https://github.com/ying-jeanne)
- **NewsPanel:** Add support for Atom feeds. [#45390](https://github.com/grafana/grafana/pull/45390), [@kaydelaney](https://github.com/kaydelaney)
- **Plugins:** Add deprecation notice for /api/tsdb/query endpoint. [#45238](https://github.com/grafana/grafana/pull/45238), [@wbrowne](https://github.com/wbrowne)
- **Plugins:** Adding support for traceID field to accept variables. [#45559](https://github.com/grafana/grafana/pull/45559), [@vinisdl](https://github.com/vinisdl)
- **PostgreSQL:** \_\_unixEpochGroup to support arithmetic expression as argument. [#46764](https://github.com/grafana/grafana/pull/46764), [@s0nik42](https://github.com/s0nik42)
- **Profile/Help:** Expose option to disable profile section and help menu. [#46308](https://github.com/grafana/grafana/pull/46308), [@cameronwaterman](https://github.com/cameronwaterman)
- **Prometheus:** Enable new visual query builder by default. [#46634](https://github.com/grafana/grafana/pull/46634), [@torkelo](https://github.com/torkelo)
- **SAML:** Allow disabling of SAML signups. [#47481](https://github.com/grafana/grafana/pull/47481), [@mmandrus](https://github.com/mmandrus)
- **SAML:** Allow disabling of SAML signups. (Enterprise)
- **Table:** New pagination option. [#45732](https://github.com/grafana/grafana/pull/45732), [@zoltanbedi](https://github.com/zoltanbedi)
- **TablePanel:** Add cell inspect option. [#45620](https://github.com/grafana/grafana/pull/45620), [@dprokop](https://github.com/dprokop)
- **Tempo / Trace Viewer:** Support Span Links in Trace Viewer. [#45632](https://github.com/grafana/grafana/pull/45632), [@Shachi16](https://github.com/Shachi16)
- **Tempo:** Download span references in data inspector. [#47074](https://github.com/grafana/grafana/pull/47074), [@connorlindsey](https://github.com/connorlindsey)
- **Tempo:** Separate trace to logs and loki search datasource config. [#46655](https://github.com/grafana/grafana/pull/46655), [@connorlindsey](https://github.com/connorlindsey)
- **Trace View:** Show number of child spans. [#44393](https://github.com/grafana/grafana/pull/44393), [@tharun208](https://github.com/tharun208)
- **Transformations:** Support escaped characters in key-value pair parsing. [#47901](https://github.com/grafana/grafana/pull/47901), [@aangelisc](https://github.com/aangelisc)
### Bug fixes
- **Azure Monitor:** Bug Fix for incorrect variable cascading for template variables. [#47478](https://github.com/grafana/grafana/pull/47478), [@jcolladokuri](https://github.com/jcolladokuri)
- **CloudWatch:** List all metrics properly in SQL autocomplete. [#45898](https://github.com/grafana/grafana/pull/45898), [@sunker](https://github.com/sunker)
- **CloudWatch:** Run query on blur in logs query field. [#47454](https://github.com/grafana/grafana/pull/47454), [@fridgepoet](https://github.com/fridgepoet)
- **Dashboard:** Template variables are now correctly persisted when clicking breadcrumb links. [#46790](https://github.com/grafana/grafana/pull/46790), [@ashharrison90](https://github.com/ashharrison90)
- **DashboardPage:** Remember scroll position when coming back panel edit / view panel. [#47639](https://github.com/grafana/grafana/pull/47639), [@torkelo](https://github.com/torkelo)
- **Panel Edit:** Options search now works correctly when a logarithmic scale option is set. [#47927](https://github.com/grafana/grafana/pull/47927), [@ashharrison90](https://github.com/ashharrison90)
- **Postgres:** Return tables with hyphenated schemes. [#45754](https://github.com/grafana/grafana/pull/45754), [@zuchka](https://github.com/zuchka)
- **Table panel:** Fix horizontal scrolling when pagination is enabled. [#47776](https://github.com/grafana/grafana/pull/47776), [@dprokop](https://github.com/dprokop)
- **Variables:** Ensure variables in query params are correctly recognised. [#47049](https://github.com/grafana/grafana/pull/47049), [@ashharrison90](https://github.com/ashharrison90)
- **Variables:** Fix crash when changing query variable datasource. [#44957](https://github.com/grafana/grafana/pull/44957), [@joshhunt](https://github.com/joshhunt)
- **Visualizations:** Stack negative-valued series downwards. [#47373](https://github.com/grafana/grafana/pull/47373), [@leeoniya](https://github.com/leeoniya)
### Breaking changes
For a proxied request, e.g. Grafana's datasource or plugin proxy:
- If the request is cancelled, e.g. from the browser/by the client, the HTTP status code is now `499 Client closed request` instead of `502 Bad gateway`
- If the request times out, e.g. takes longer time than allowed, the HTTP status code is now `504 Gateway timeout` instead of `502 Bad gateway`. Issue [#47473](https://github.com/grafana/grafana/issues/47473)
The change in behavior is that negative-valued series are now stacked downwards from 0 (in their own stacks), rather than downwards from the top of the positive stacks. We now automatically group stacks by Draw style, Line interpolation, and Bar alignment, making it impossible to stack bars on top of lines, or smooth lines on top of stepped lines. Issue [#47373](https://github.com/grafana/grafana/issues/47373)
The meaning of the default data source has now changed from being a persisted property in a panel. Before when you selected the default data source for a panel and later changed the default data source to another data source it would change all panels who were configured to use the default data source. From now on the default data source is just the default for new panels and changing the default will not impact any currently saved dashboards. Issue [#45132](https://github.com/grafana/grafana/issues/45132)
The Tooltip component provided by `@grafana/ui` is no longer automatically interactive (that is you can hover onto it and click a link or select text). It will from now on by default close automatically when you mouse out from the trigger element. To make tooltips behave like before set the new `interactive` property to true.
Issue [#45053](https://github.com/grafana/grafana/issues/45053)
### Deprecations
`/api/tsdb/query` API has been deprecated and will be removed in a future release. Use [/api/ds/query](https://grafana.com/docs/grafana/latest/http_api/data_source/#query-a-data-source) instead. Issue [#45238](https://github.com/grafana/grafana/issues/45238)
### Plugin development fixes & changes
- **Card:** Increase clickable area when meta items are present. [#47935](https://github.com/grafana/grafana/pull/47935), [@ashharrison90](https://github.com/ashharrison90)
- **Loki:** Fix operator description propup from being shortened. [#46575](https://github.com/grafana/grafana/pull/46575), [@glintik](https://github.com/glintik)
- **Tooltips:** Make tooltips non interactive by default. [#45053](https://github.com/grafana/grafana/pull/45053), [@torkelo](https://github.com/torkelo)
<!-- 8.5.0 END -->
<!-- 8.5.0-beta1 START -->
# 8.5.0-beta1 (2022-04-06)
### Features and enhancements
- Add config option to enable/disable reporting. (Enterprise)
- **Alerting:** Accurately set value for prom-compatible APIs. [#47216](https://github.com/grafana/grafana/pull/47216), [@gotjosh](https://github.com/gotjosh)
- **Alerting:** Provisioning API - Notification Policies. [#46755](https://github.com/grafana/grafana/pull/46755), [@alexweav](https://github.com/alexweav)
- **Alerting:** Notification URL points to alert view page instead of alert edit page. [#47752](https://github.com/grafana/grafana/pull/47752), [@joeblubaugh](https://github.com/joeblubaugh)
- **Analytics:** Enable grafana and plugin update checks to be operated independently. [#46352](https://github.com/grafana/grafana/pull/46352), [@wbrowne](https://github.com/wbrowne)
- **Azure Monitor:** Add support for multiple template variables in resource picker. [#46215](https://github.com/grafana/grafana/pull/46215), [@sarahzinger](https://github.com/sarahzinger)
- **Caching:** Add separate TTL for resources cache. (Enterprise)
- **Caching:** add support for TLS configuration for Redis Cluster. (Enterprise)
- **NewsPanel:** Remove Use Proxy option and update documentation with recommendations. [#47189](https://github.com/grafana/grafana/pull/47189), [@joshhunt](https://github.com/joshhunt)
- **OAuth:** Sync GitHub OAuth user name to Grafana if it's set. [#45438](https://github.com/grafana/grafana/pull/45438), [@pallxk](https://github.com/pallxk)
### Bug fixes
- **Plugins:** Fix Default Nav URL for dashboard includes. [#47143](https://github.com/grafana/grafana/pull/47143), [@wbrowne](https://github.com/wbrowne)
### Breaking changes
When user is using Github OAuth, GitHub login is showed as both Grafana login and name. Now the GitHub name is showed as Grafana name, and GitHub login is showed as Grafana Login. Issue [#45438](https://github.com/grafana/grafana/issues/45438)
The meaning of the default data source has now changed from being a persisted property in a panel. Before when you selected the default data source for a panel and later changed the default data source to another data source it would change all panels who were configured to use the default data source. From now on the default data source is just the default for new panels and changing the default will not impact any currently saved dashboards. Issue [#45132](https://github.com/grafana/grafana/issues/45132)
<!-- 8.4.7 START -->
# 8.4.7 (2022-04-19)
### Features and enhancements
- **CloudWatch:** Added missing MemoryDB Namespace metrics. [#47290](https://github.com/grafana/grafana/pull/47290), [@james-deee](https://github.com/james-deee)
- **Histogram Panel:** Take decimal into consideration. [#47330](https://github.com/grafana/grafana/pull/47330), [@mdvictor](https://github.com/mdvictor)
- **TimeSeries:** Sort tooltip values based on raw values. [#46738](https://github.com/grafana/grafana/pull/46738), [@dprokop](https://github.com/dprokop)
### Bug fixes
- **API:** Include userId, orgId, uname in request logging middleware. [#47183](https://github.com/grafana/grafana/pull/47183), [@marefr](https://github.com/marefr)
- **Elasticsearch:** Respect maxConcurrentShardRequests datasource setting. [#47120](https://github.com/grafana/grafana/pull/47120), [@alexandrst88](https://github.com/alexandrst88)
<!-- 8.4.7 END -->
<!-- 8.5.0-beta1 END -->
<!-- 8.4.6 START -->
# 8.4.6 (2022-04-12)
- **Security:** Fixes CVE-2022-24812. For more information, see our [blog](https://grafana.com/blog/2022/04/12/grafana-enterprise-8.4.6-released-with-high-severity-security-fix/)
<!-- 8.4.6 END -->
<!-- 8.4.5 START -->
# 8.4.5 (2022-03-31)
@@ -395,7 +1337,7 @@ The access mode "browser" is deprecated in the following data sources and will b
### Features and enhancements
- **AccessControl:** Apply fine-grained access control to licensing. (Enterprise)
- **AccessControl:** Apply role-based access control to licensing. (Enterprise)
- **Alerting:** Add UI for contact point testing with custom annotations and labels. [#40491](https://github.com/grafana/grafana/pull/40491), [@nathanrodman](https://github.com/nathanrodman)
- **Alerting:** Make alert state indicator in panel header work with Grafana 8 alerts. [#38713](https://github.com/grafana/grafana/pull/38713), [@domasx2](https://github.com/domasx2)
- **Alerting:** Option for Discord notifier to use webhook name. [#40463](https://github.com/grafana/grafana/pull/40463), [@Skyebold](https://github.com/Skyebold)
@@ -4372,3 +5314,4 @@ repo on July 1st. Make sure you have switched to the new repo by then. The new r
- **Dashboard**: Panel property `minSpan` replaced by `maxPerRow`. Dashboard migration will automatically migrate all dashboard panels using the `minSpan` property to the new `maxPerRow` property [#12991](https://github.com/grafana/grafana/pull/12991)
For older release notes, refer to the [CHANGELOG_ARCHIVE.md](https://github.com/grafana/grafana/blob/master/CHANGELOG_ARCHIVE.md)
````

View File

@@ -20,14 +20,13 @@ COPY emails emails
ENV NODE_ENV production
RUN yarn build
FROM golang:1.17.8-alpine3.15 as go-builder
FROM golang:1.17.12-alpine3.15 as go-builder
RUN apk add --no-cache gcc g++ make
WORKDIR /grafana
COPY go.mod go.sum embed.go Makefile build.go package.json ./
COPY cue cue
COPY packages/grafana-schema packages/grafana-schema
COPY public/app/plugins public/app/plugins
COPY public/api-spec.json public/api-spec.json

View File

@@ -21,7 +21,7 @@ COPY emails emails
ENV NODE_ENV production
RUN yarn build
FROM golang:1.17.8 AS go-builder
FROM golang:1.17.12 AS go-builder
WORKDIR /src/grafana
@@ -29,7 +29,6 @@ COPY go.mod go.sum embed.go ./
COPY Makefile build.go package.json ./
COPY .bingo .bingo
COPY pkg pkg/
COPY cue cue/
COPY cue.mod cue.mod/
COPY packages/grafana-schema packages/grafana-schema/
COPY public/app/plugins public/app/plugins/

View File

@@ -80,7 +80,6 @@ The current team members are:
- Emil Tullstedt ([Grafana Labs](https://grafana.com/))
- Erik Sundell ([Grafana Labs](https://grafana.com/))
- Fredrik Enestad ([Embark Studios](https://www.embark-studios.com/))
- Hugo Häggmark ([Grafana Labs](https://grafana.com/))
- Ivana Huckova ([Grafana Labs](https://grafana.com/))
- Jeroen Op 't Eynde ([Grafana Labs](https://grafana.com/))
- Jessica Müller ([Grafana Labs](https://grafana.com/))

5
HALL_OF_FAME.md Normal file
View File

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

View File

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

View File

@@ -35,7 +35,7 @@ node_modules: package.json yarn.lock ## Install node modules.
##@ Swagger
SPEC_TARGET = public/api-spec.json
MERGED_SPEC_TARGET := public/api-merged.json
NGALERT_SPEC_TARGET = pkg/services/ngalert/api/tooling/post.json
NGALERT_SPEC_TARGET = pkg/services/ngalert/api/tooling/api.json
$(SPEC_TARGET): $(API_DEFINITION_FILES) ## Generate API spec
docker run --rm -it \
@@ -50,13 +50,13 @@ $(SPEC_TARGET): $(API_DEFINITION_FILES) ## Generate API spec
-x "github.com/prometheus/alertmanager" \
-i /grafana/pkg/api/docs/tags.json
swagger-api-spec: gen-go $(SPEC_TARGET) $(MERGED_SPEC_TARGET)
swagger-api-spec: gen-go $(SPEC_TARGET) $(MERGED_SPEC_TARGET) validate-api-spec
$(NGALERT_SPEC_TARGET):
+$(MAKE) -C pkg/services/ngalert/api/tooling post.json
+$(MAKE) -C pkg/services/ngalert/api/tooling api.json
$(MERGED_SPEC_TARGET): $(SPEC_TARGET) $(NGALERT_SPEC_TARGET) ## Merge generated and ngalert API specs
go run pkg/api/docs/merge/merge_specs.go -o=public/api-merged.json $(<) pkg/services/ngalert/api/tooling/post.json
go run pkg/api/docs/merge/merge_specs.go -o=public/api-merged.json $(<) pkg/services/ngalert/api/tooling/api.json
ensure_go-swagger_mac:
@hash swagger &>/dev/null || (brew tap go-swagger/go-swagger && brew install go-swagger)
@@ -67,7 +67,7 @@ ensure_go-swagger_mac:
-x "github.com/prometheus/alertmanager" \
-i pkg/api/docs/tags.json
swagger-api-spec-mac: gen-go --swagger-api-spec-mac $(MERGED_SPEC_TARGET)
swagger-api-spec-mac: gen-go --swagger-api-spec-mac $(MERGED_SPEC_TARGET) validate-api-spec
validate-api-spec: $(MERGED_SPEC_TARGET) ## Validate API spec
docker run --rm -it \

View File

@@ -9,6 +9,9 @@ app_mode = production
# instance name, defaults to HOSTNAME environment variable value or hostname if HOSTNAME var is empty
instance_name = ${HOSTNAME}
# force migration will run migrations that might cause dataloss
force_migration = false
#################################### Paths ###############################
[paths]
# Path to where grafana can store temp files, sessions, and the sqlite3 db (if that is used)
@@ -122,7 +125,7 @@ path = grafana.db
# For "sqlite3" only. cache mode setting used for connecting to the database
cache_mode = private
# For "mysql" only if lockingMigration feature toggle is set. How many seconds to wait before failing to lock the database for the migrations, default is 0.
# 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
#################################### Cache server #############################
@@ -230,6 +233,9 @@ application_insights_connection_string =
# Optional. Specifies an Application Insights endpoint URL where the endpoint string is wrapped in backticks ``.
application_insights_endpoint_url =
# Controls if the UI contains any links to user feedback forms
feedback_links_enabled = true
#################################### Security ############################
[security]
# disable creation of admin user on first start of grafana
@@ -299,7 +305,7 @@ content_security_policy = false
# $ROOT_PATH is server.root_url without the protocol.
content_security_policy_template = """script-src 'self' 'unsafe-eval' 'unsafe-inline' 'strict-dynamic' $NONCE;object-src 'none';font-src 'self';style-src 'self' 'unsafe-inline' blob:;img-src * data:;base-uri 'self';connect-src 'self' grafana.com ws://$ROOT_PATH wss://$ROOT_PATH;manifest-src 'self';media-src 'none';form-action 'self';"""
# Controls if old angular plugins are supported or not. This will be disabled by default in Grafana v9.
# Controls if old angular plugins are supported or not. This will be disabled by default in future release
angular_support_enabled = true
[security.encryption]
@@ -471,6 +477,8 @@ token_url = https://gitlab.com/oauth/token
api_url = https://gitlab.com/api/v4
allowed_domains =
allowed_groups =
role_attribute_path =
role_attribute_strict = false
#################################### Google Auth #########################
[auth.google]
@@ -576,8 +584,6 @@ enabled = false
header_name = X-WEBAUTH-USER
header_property = username
auto_sign_up = true
# Deprecated, use sync_ttl instead
ldap_sync_ttl = 60
sync_ttl = 60
whitelist =
headers =
@@ -605,7 +611,7 @@ allow_sign_up = true
# LDAP background sync (Enterprise only)
# At 1 am every day
sync_cron = "0 0 1 * * *"
sync_cron = "0 1 * * *"
active_sync_enabled = true
#################################### AWS ###########################
@@ -637,6 +643,12 @@ managed_identity_enabled = false
# Should be set for user-assigned identity and should be empty for system-assigned identity
managed_identity_client_id =
#################################### Role-based Access Control ###########
[rbac]
enabled = true
# If enabled, cache permissions in a in memory cache (Enterprise only)
permission_cache = true
#################################### SMTP / Emailing #####################
[smtp]
enabled = false
@@ -829,6 +841,22 @@ max_attempts = 3
# The interval string is a possibly signed sequence of decimal numbers, followed by a unit suffix (ms, s, m, h, d), e.g. 30s or 1m.
min_interval = 10s
[unified_alerting.screenshots]
# Enable screenshots in notifications. This option requires the Grafana Image Renderer plugin.
# For more information on configuration options, refer to [rendering].
capture = false
# The maximum number of screenshots that can be taken at the same time. This option is different from
# concurrent_render_request_limit as max_concurrent_screenshots sets the number of concurrent screenshots
# that can be taken at the same time for all firing alerts where as concurrent_render_request_limit sets
# the total number of concurrent screenshots across all Grafana services.
max_concurrent_screenshots = 5
# Uploads screenshots to the local Grafana server or remote storage such as Azure, S3 and GCS. Please
# see [external_image_storage] for further configuration options. If this option is false then
# screenshots will be persisted to disk for up to temp_data_lifetime.
upload_external_image_storage = false
#################################### Alerting ############################
[alerting]
# Enable the legacy alerting sub-system and interface. If Unified Alerting is already enabled and you try to go back to legacy alerting, all data that is part of Unified Alerting will be deleted. When this configuration section and flag are not defined, the state is defined at runtime. See the documentation for more details.
@@ -910,7 +938,7 @@ enabled = true
#################################### Query History #############################
[query_history]
# Enable the Query history
enabled = false
enabled = true
#################################### Internal Grafana Metrics ############
# Metrics available at HTTP URL /metrics and /metrics/plugins/:pluginId
@@ -944,6 +972,7 @@ url = https://grafana.com
url = https://grafana.com
#################################### Distributed tracing ############
# Opentracing is deprecated use opentelemetry instead
[tracing.jaeger]
# jaeger destination (ex localhost:6831)
address =
@@ -970,6 +999,15 @@ disable_shared_zipkin_spans = false
[tracing.opentelemetry.jaeger]
# jaeger destination (ex http://localhost:14268/api/traces)
address =
# Propagation specifies the text map propagation format: w3c, jaeger
propagation =
# This is a configuration for OTLP exporter with GRPC protocol
[tracing.opentelemetry.otlp]
# otlp destination (ex localhost:4317)
address =
# Propagation specifies the text map propagation format: w3c, jaeger
propagation =
#################################### External Image Storage ##############
[external_image_storage]
@@ -1131,9 +1169,21 @@ license_path =
# enable = feature1,feature2
enable =
# The new prometheus visual query builder
# The new prometheus visual query builder
promQueryBuilder = true
# The new loki visual query builder
lokiQueryBuilder = true
# Experimental Explore to Dashboard workflow
explore2Dashboard = true
# Experimental Command Palette
commandPalette = true
# Use dynamic labels in CloudWatch datasource
cloudWatchDynamicLabels = true
# feature1 = true
# feature2 = false
@@ -1167,3 +1217,22 @@ default_baselayer_config =
# Enable or disable loading other base map layers
enable_custom_baselayers = true
#################################### Dashboard previews #####################################
[dashboard_previews.crawler]
# Number of dashboards rendered in parallel. Default is 6.
thread_count =
# Timeout passed down to the Image Renderer plugin. It is used in two separate places within a single rendering request:
# First during the initial navigation to the dashboard and then when waiting for all the panels to load. Default is 20s.
# This setting should be expressed as a duration. Examples: 10s (seconds), 1m (minutes).
rendering_timeout =
# Maximum duration of a single crawl. Default is 1h.
# This setting should be expressed as a duration. Examples: 10s (seconds), 1m (minutes).
max_crawl_duration =
# Minimum interval between two subsequent scheduler runs. Default is 12h.
# This setting should be expressed as a duration. Examples: 10s (seconds), 1m (minutes).
scheduler_interval =

View File

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

View File

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

View File

@@ -9,6 +9,9 @@
# instance name, defaults to HOSTNAME environment variable value or hostname if HOSTNAME var is empty
;instance_name = ${HOSTNAME}
# force migration will run migrations that might cause dataloss
;force_migration = false
#################################### Paths ####################################
[paths]
# Path to where grafana can store temp files, sessions, and the sqlite3 db (if that is used)
@@ -123,7 +126,7 @@
# For "sqlite3" only. cache mode setting used for connecting to the database. (private, shared)
;cache_mode = private
# For "mysql" only if lockingMigration feature toggle is set. How many seconds to wait before failing to lock the database for the migrations, default is 0.
# 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
################################### Data sources #########################
@@ -230,6 +233,9 @@
# Rudderstack Config url, optional, used by Rudderstack SDK to fetch source config
;rudderstack_config_url =
# Controls if the UI contains any links to user feedback forms
;feedback_links_enabled = true
#################################### Security ####################################
[security]
# disable creation of admin user on first start of grafana
@@ -299,7 +305,7 @@
# $ROOT_PATH is server.root_url without the protocol.
;content_security_policy_template = """script-src 'self' 'unsafe-eval' 'unsafe-inline' 'strict-dynamic' $NONCE;object-src 'none';font-src 'self';style-src 'self' 'unsafe-inline' blob:;img-src * data:;base-uri 'self';connect-src 'self' grafana.com ws://$ROOT_PATH wss://$ROOT_PATH;manifest-src 'self';media-src 'none';form-action 'self';"""
# Controls if old angular plugins are supported or not. This will be disabled by default in Grafana v9.
# Controls if old angular plugins are supported or not. This will be disabled by default in future release
;angular_support_enabled = true
[security.encryption]
@@ -588,7 +594,7 @@
# LDAP background sync (Enterprise only)
# At 1 am every day
;sync_cron = "0 0 1 * * *"
;sync_cron = "0 1 * * *"
;active_sync_enabled = true
#################################### AWS ###########################
@@ -617,6 +623,11 @@
# Should be set for user-assigned identity and should be empty for system-assigned identity
;managed_identity_client_id =
#################################### Role-based Access Control ###########
[rbac]
;enabled = true
# If enabled, cache permissions in a in memory cache (Enterprise only)
;permission_cache = true
#################################### SMTP / Emailing ##########################
[smtp]
;enabled = false
@@ -892,7 +903,7 @@
#################################### Query History #############################
[query_history]
# Enable the Query history
;enabled = false
;enabled = true
#################################### Internal Grafana Metrics ##########################
# Metrics available at HTTP URL /metrics and /metrics/plugins/:pluginId
@@ -926,6 +937,7 @@
;url = https://grafana.com
#################################### Distributed tracing ############
# Opentracing is deprecated use opentelemetry instead
[tracing.jaeger]
# Enable by setting the address sending traces to jaeger (ex localhost:6831)
;address = localhost:6831
@@ -952,6 +964,15 @@
[tracing.opentelemetry.jaeger]
# jaeger destination (ex http://localhost:14268/api/traces)
; address = http://localhost:14268/api/traces
# Propagation specifies the text map propagation format: w3c, jaeger
; propagation = jaeger
# This is a configuration for OTLP exporter with GRPC protocol
[tracing.opentelemetry.otlp]
# otlp destination (ex localhost:4317)
; address = localhost:4317
# Propagation specifies the text map propagation format: w3c, jaeger
; propagation = w3c
#################################### External image storage ##########################
[external_image_storage]

View File

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

View File

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

View File

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

View File

@@ -136,17 +136,23 @@ Running the backend tests on Windows currently needs some tweaking, so use the b
go run build.go test
```
### Run PostgreSQL and MySQL integration tests
### Run SQLLite, PostgreSQL and MySQL integration tests
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:
By default, Grafana runs SQLite to run tests with SQLite.
```bash
go test -covermode=atomic -tags=integration ./pkg/...
```
To run PostgreSQL and MySQL integration tests locally, start the Docker blocks for MySQL and/or PostgreSQL test data sources by running `make devenv sources=mysql_tests,postgres_tests`. When your test data sources are running, you can execute integration tests by running:
```bash
GRAFANA_TEST_DB=mysql go test -covermode=atomic -tags=integration ./pkg/...
```
and/or
```
```bash
GRAFANA_TEST_DB=postgres go test -covermode=atomic -tags=integration ./pkg/...
```

194
contribute/localization.md Normal file
View File

@@ -0,0 +1,194 @@
# Localisation
Grafana uses the [LinguiJS](https://github.com/lingui/js-lingui) framework for managing translating phrases in the Grafana frontend.
## tl;dr
- Use `<Trans id="search-results.panel-link">Go to {panel.title}</Trans>` in code to add a translatable phrase
- Translations are stored in .po files in `public/locales/{locale}/messages.po`
- If a particular phrase is not available in the a language then it will fall back to English
## How to add a new translation phrase
1. Use one of `@lingui/macro`'s React components with the `id`, ensuring it conforms to the guidelines below, with the default english translation. e.g.
```jsx
import { Trans } from @lingui/macro
const SearchTitle = ({term}) => (
<Trans id="search-page.results-title">
Results for {term}
</Trans>
);
```
Prefer using the JSX components (compared to the plain javascript functions, see below) where possible for phrases. Many props can (and probably should) be changed to accept the `React.ReactNode` instead of `string` for phrases put into the DOM.
Note that Lingui must be able to statically analyse the code to extract the phrase, so the `id` can not be dynamic. e.g. the following will not work:
```jsx
const ErrorMessage = ({ id, message }) => <Trans id={`errors.${id}`}>There was an error: {message}</Trans>;
```
2. Upon reload, the default English phrase will appear on the page.
3. Before submitting your PR, run the `yarn i18n:extract` command to extract the messages you added into the `messages.po` file and make them available for translation.
## How translations work in Grafana
Grafana uses the [LinguiJS](https://github.com/lingui/js-lingui) framework for managing translating phrases in the Grafana frontend. It:
- Marks up phrases within our code for extraction
- Extracts phrases into messages catalogues for translating in external systems
- "Compiles" the catalogues to a format that can be used in the website
- Manages the user's locale and putting the translated phrases in the UI
### Phrase ID naming convention
We set explicit IDs for phrases to make it easier to identify phrases out of context, and to track where they're used. IDs follow a naming scheme that includes _where_ the phrase is used. The exception is the rare case of single reoccuring words like "Cancel", but default to using a feature/phrase specific phrase.
Message IDs are made of _up to_ three segments in the format `feature.area.phrase`. For example:
- `dashboard.header.refresh-label`
- `explore.toolbar.share-tooltip`
For components used all over the site, use just two segments:
- `footer.update`
- `navigation.home`
### Top-level provider
In [AppWrapper.tsx](/public/app/AppWrapper.tsx) the app is wrapped with `I18nProvider` from `public/app/core/localisation.tsx` where the Lingui instance is created with the user's preferred locale. This sets the appropriate context and allows any component from `@lingui/macro` to use the translations for the user's preferred locale.
### Message format
Lingui uses the [ICU MessageFormat](https://unicode-org.github.io/icu/userguide/format_parse/messages/) for the phrases in the .po catalogues. ICU has special syntax especially for describing plurals across multiple languages. For more details see the [Lingui docs](https://lingui.js.org/ref/message-format.html).
### Plain JS usage
See [Lingui Docs](https://lingui.js.org/ref/macro.html#t) for more details.
Sometimes you may need to translate a string cannot be represented in JSX, such as `placeholder` props. Use the `t` macro for this.
```jsx
import { t } from "@lingui/macro"
const placeholder = t({
id: 'form.username-placeholder',
message: `Username`
});
return <input type="value" placeholder={placeholder}>
```
While the `t` macro can technically be used outside of React functions (e.g, in actions/reducers), aim to keep all UI phrases within the React UI functions.
## Examples
See the [Lingui docs](https://lingui.js.org/ref/macro.html#usage) for more details.
### Basic usage
For fixed phrases:
```jsx
import { Trans } from '@lingui/macro';
<Trans id="page.greeting">Hello user!</Trans>;
```
You can include variables, just like regular JSX. Prefer using "simple" variables to make the extracted phrase easier to read for translators
```jsx
import { Trans } from '@lingui/macro';
// Bad - translators will see: Hello {0}
<Trans id="page.greeting">Hello {user.name}!</Trans>;
// Good - translators will see: Hello {userName}
const userName = user.name;
<Trans id="page.greeting">Hello {userName}!</Trans>;
```
Variables must be strings (or, must support calling `.toString()`, which we almost never want).
```jsx
import { Trans } from '@lingui/macro';
// This will not work
const userName = <strong>user.name</strong>;
<Trans id="page.greeting">Hello {userName}!</Trans>;
// Instead, put the JSX inside the phrase directly
const userName = user.name;
<Trans id="page.greeting">
Hello <strong>{userName}</strong>!
</Trans>;
```
### React components and HTML tags
Both HTML tags and React components can be included in a phase. The Lingui macro will replace them with placeholder tags for the translators
```js
import { Trans } from "@lingui/macro"
const randomVariable = "variable"
<Trans id="page.explainer">
Click <button>here</button> to <a href="https://grafana.com">learn more.</a>
</Trans>
// ↓ is transformed by macros into ↓
<Trans
id="page.explainer"
defaults="Click <0>here</0> to <1>learn more</1>"
components={[
<button />,
<Text />
]}
/>
// ↓ is in the messages.po file like ↓
msgid "page.explainer"
msgstr "Click <0>here</0> to <1>learn more</1>"
```
### Plurals
See the [Lingui docs](https://lingui.js.org/ref/macro.html#id1) for more details.
Plurals require special handling to make sure they can be translating according to the rules of each locale (which may be more complex that you think!). Use the `<Plural />` component and specify the plural forms for the default language (English). The message will be extracted into a form where translators can extend it with rules for other locales.
```js
import { Plural } from "@lingui/macro"
<Plural
id="sharing.shared-with"
value={sharedCount}
none="Not shared with anyone"
one="Shared with one person"
other="Shared with # people"
/>
// ↓ is transformed by macros into ↓
<Trans
id="example.plurals"
values={{ sharedCount }}
defaults="{sharedCount, plural, none {Not shared with anyone}, one {Shared with one person}, other {Shared with # people}"
/>
// sharedCount = 0 -> Not shared with anyone
// sharedCount = 1 -> Shared with one person
// sharedCount = 3 -> Shared with # people
```
### Date and time
[Lingui has functions](https://lingui.js.org/ref/core.html#I18n.date) to format dates and times according to the convention to the user's preferred locale, based on the browser [Intl.DateTimeFormat](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat) API. However, as displaying dates and times is fundamental to Grafana, guidelines have not been established for this yet.
## Documentation
[Grafana's documentation](https://grafana.com/docs/grafana/latest/) is not yet open for translation and should be authored in American English only.

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -36,7 +36,7 @@
"id": 2,
"panels": [],
"repeat": "row",
"title": "Row title $row",
"title": "Row $row",
"type": "row"
},
{
@@ -111,7 +111,7 @@
"sort": "none"
}
},
"title": "Panel Title",
"title": "Row $row non-repeating panel",
"type": "timeseries"
},
{
@@ -188,7 +188,7 @@
},
"repeat": "horizontal",
"repeatDirection": "h",
"title": "Horizontal repeating $horizontal",
"title": "Row $row repeating panel $horizontal",
"type": "timeseries"
}
],

View File

@@ -34,7 +34,7 @@
},
"id": 11,
"options": {
"content": "## Global variables\n\n* `__dashboard` = `${__dashboard}`\n* `__dashboard.name` = `${__dashboard.name}`\n* `__dashboard.uid` = `${__dashboard.uid}`\n* `__org.name` = `${__org.name}`\n* `__org.id` = `${__org.id}`\n* `__user.id` = `${__user.id}`\n* `__user.login` = `${__user.login}`\n* `__user.email` = `${__user.email}`\n \n## Formats\n\n* `Server:raw` = `${Server:raw}`\n* `Server:regex` = `${Server:regex}`\n* `Server:lucene` = `${Server:lucene}`\n* `Server:glob` = `${Server:glob}`\n* `Server:pipe` = `${Server:pipe}`\n* `Server:distributed` = `${Server:distributed}`\n* `Server:csv` = `${Server:csv}`\n* `Server:html` = `${Server:html}`\n* `Server:json` = `${Server:json}`\n* `Server:percentencode` = `${Server:percentencode}`\n* `Server:singlequote` = `${Server:singlequote}`\n* `Server:doublequote` = `${Server:doublequote}`\n* `Server:sqlstring` = `${Server:sqlstring}`\n* `Server:date` = `${Server:date}`\n* `Server:text` = `${Server:text}`\n* `Server:queryparam` = `${Server:queryparam}`\n\n",
"content": "## Global variables\n\n* `__dashboard` = `${__dashboard}`\n* `__dashboard.name` = `${__dashboard.name}`\n* `__dashboard.uid` = `${__dashboard.uid}`\n* `__org.name` = `${__org.name}`\n* `__org.id` = `${__org.id}`\n* `__user.id` = `${__user.id}`\n* `__user.login` = `${__user.login}`\n* `__user.email` = `${__user.email}`\n \n## Formats\n\n* `Server:raw` = `${Server:raw}`\n* `Server:regex` = `${Server:regex}`\n* `Server:lucene` = `${Server:lucene}`\n* `Server:glob` = `${Server:glob}`\n* `Server:pipe` = `${Server:pipe}`\n* `Server:distributed` = `${Server:distributed}`\n* `Server:csv` = `${Server:csv}`\n* `Server:html` = `${Server:html}`\n* `Server:json` = `${Server:json}`\n* `Server:percentencode` = `${Server:percentencode}`\n* `Server:singlequote` = `${Server:singlequote}`\n* `Server:doublequote` = `${Server:doublequote}`\n* `Server:sqlstring` = `${Server:sqlstring}`\n* `Server:date` = `${Server:date}`\n* `Server:text` = `${Server:text}`\n* `Server:queryparam` = `${Server:queryparam}`\n\n## Sanitization\n\n * `1 < 2`\n\n## Link interpolation\n\n* [Example: ${__url_time_range}](https://example.com/?${__url_time_range})",
"mode": "markdown"
},
"pluginVersion": "7.1.0",

View File

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

View File

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

File diff suppressed because it is too large Load Diff

View File

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

File diff suppressed because one or more lines are too long

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -1,2 +0,0 @@
script.inline: on
script.indexed: on

View File

@@ -1,15 +0,0 @@
elasticsearch5:
image: elasticsearch:5.0.2
command: elasticsearch
ports:
- '10200:9200'
- '10300:9300'
fake-elastic5-data:
image: grafana/fake-data-gen
links:
- elasticsearch5
environment:
FD_SERVER: elasticsearch5
FD_DATASOURCE: elasticsearch
FD_PORT: 9200

View File

@@ -1,15 +0,0 @@
elasticsearch56:
image: elasticsearch:5.6.16
command: elasticsearch
ports:
- '13200:9200'
- '13300:9300'
fake-elastic56-data:
image: grafana/fake-data-gen
links:
- elasticsearch56
environment:
FD_SERVER: elasticsearch56
FD_DATASOURCE: elasticsearch
FD_PORT: 9200

View File

@@ -1,25 +0,0 @@
# You need to run 'sysctl -w vm.max_map_count=262144' on the host machine
elasticsearch6:
image: docker.elastic.co/elasticsearch/elasticsearch-oss:6.7.1
command: elasticsearch
ports:
- "11200:9200"
- "11300:9300"
fake-elastic6-data:
image: grafana/fake-data-gen
links:
- elasticsearch6
environment:
FD_SERVER: elasticsearch6
FD_DATASOURCE: elasticsearch6
FD_PORT: 9200
filebeat6:
image: docker.elastic.co/beats/filebeat-oss:6.7.1
command: filebeat -e -strict.perms=false
volumes:
- ./docker/blocks/elastic6/filebeat.yml:/usr/share/filebeat/filebeat.yml:ro
- /var/log:/var/log:ro
- ../data/log:/var/log/grafana:ro

View File

@@ -1,2 +0,0 @@
script.inline: on
script.indexed: on

File diff suppressed because it is too large Load Diff

View File

@@ -1 +0,0 @@
http-bind-address: :8086

View File

@@ -5,6 +5,7 @@
- '8086:8086'
environment:
INFLUXD_REPORTING_DISABLED: 'true'
INFLUXD_HTTP_BIND_ADDRESS: ':8086'
DOCKER_INFLUXDB_INIT_MODE: 'setup'
DOCKER_INFLUXDB_INIT_USERNAME: 'grafana'
DOCKER_INFLUXDB_INIT_PASSWORD: 'grafana12345'
@@ -12,7 +13,6 @@
DOCKER_INFLUXDB_INIT_BUCKET: 'mybucket'
DOCKER_INFLUXDB_INIT_ADMIN_TOKEN: 'mytoken'
volumes:
- ./docker/blocks/influxdb/config.yaml:/etc/influxdb2/config.yaml
- ./docker/blocks/influxdb/setup_influxql.sh:/docker-entrypoint-initdb.d/setup_influxql.sh
telegraf:

View File

@@ -57,7 +57,7 @@ export default (data) => {
requests.push({ method: 'GET', url: '/api/annotations?from=1580825186534&to=1580846786535' });
for (let n = 0; n < batchCount; n++) {
requests.push({ method: 'POST', url: '/api/tsdb/query', body: payload });
requests.push({ method: 'POST', url: '/api/ds/query', body: payload });
}
let responses = client.batch(requests);

View File

@@ -62,7 +62,7 @@ export default (data) => {
requests.push({ method: 'GET', url: '/api/annotations?dashboardId=2074&from=1548078832772&to=1548082432772' });
for (let n = 0; n < batchCount; n++) {
requests.push({ method: 'POST', url: '/api/tsdb/query', body: payload });
requests.push({ method: 'POST', url: '/api/ds/query', body: payload });
}
let responses = client.batch(requests);

View File

@@ -59,7 +59,7 @@ export default (data) => {
requests.push({ method: 'GET', url: '/api/annotations?dashboardId=2074&from=1548078832772&to=1548082432772' });
for (let n = 0; n < batchCount; n++) {
requests.push({ method: 'POST', url: '/api/tsdb/query', body: payload });
requests.push({ method: 'POST', url: '/api/ds/query', body: payload });
}
let responses = client.batch(requests);

View File

@@ -58,7 +58,7 @@ export default (data) => {
requests.push({ method: 'GET', url: '/api/annotations?dashboardId=2074&from=1548078832772&to=1548082432772' });
for (let n = 0; n < batchCount; n++) {
requests.push({ method: 'POST', url: '/api/tsdb/query', body: payload });
requests.push({ method: 'POST', url: '/api/ds/query', body: payload });
}
let responses = client.batch(requests);

63
docs/sources/_index.md Executable file → Normal file
View File

@@ -1,31 +1,38 @@
+++
title = "Grafana documentation"
description = "Guides, Installation and Feature Documentation"
keywords = ["grafana", "installation", "documentation"]
aliases = ["/docs/grafana/v1.1", "/docs/grafana/latest/guides/reference/admin", "/docs/grafana/v3.1"]
+++
---
aliases:
- /docs/grafana/latest/
- /docs/grafana/latest/guides/reference/admin/
- /docs/grafana/v1.1/
- /docs/grafana/v3.1/
description: Guides, Installation and Feature Documentation
keywords:
- grafana
- installation
- documentation
title: Grafana documentation
---
# Grafana documentation
## Installing Grafana
<div class="nav-cards">
<a href="{{< relref "installation/debian.md" >}}" class="nav-cards__item nav-cards__item--install">
<a href="{{< relref "setup-grafana/installation/debian/" >}}" class="nav-cards__item nav-cards__item--install">
<div class="nav-cards__icon fa fa-linux">
</div>
<h5>Install on Linux</h5>
</a>
<a href="{{< relref "installation/mac.md" >}}" class="nav-cards__item nav-cards__item--install">
<a href="{{< relref "setup-grafana/installation/mac/" >}}" class="nav-cards__item nav-cards__item--install">
<div class="nav-cards__icon fa fa-apple">
</div>
<h5>Install on macOS</h5>
</a>
<a href="{{< relref "installation/windows.md" >}}" class="nav-cards__item nav-cards__item--install">
<a href="{{< relref "setup-grafana/installation/windows/" >}}" class="nav-cards__item nav-cards__item--install">
<div class="nav-cards__icon fa fa-windows">
</div>
<h5>Install on Windows</h5>
</a>
<a href="{{< relref "installation/docker.md" >}}" class="nav-cards__item nav-cards__item--install">
<a href="{{< relref "setup-grafana/installation/docker/" >}}" class="nav-cards__item nav-cards__item--install">
<img src="/static/img/logos/logo-docker.svg">
<h5>Run Docker image</h5>
</a>
@@ -44,27 +51,27 @@ aliases = ["/docs/grafana/v1.1", "/docs/grafana/latest/guides/reference/admin",
## Guides
<div class="nav-cards">
<a href="{{< relref "getting-started/getting-started.md" >}}" class="nav-cards__item nav-cards__item--guide">
<a href="{{< relref "getting-started/build-first-dashboard/" >}}" class="nav-cards__item nav-cards__item--guide">
<h4>Getting started</h4>
<p>Learn the basics of using Grafana.</p>
</a>
<a href="{{< relref "basics/_index.md" >}}" class="nav-cards__item nav-cards__item--guide">
<a href="{{< relref "basics/" >}}" class="nav-cards__item nav-cards__item--guide">
<h4>Grafana basics</h4>
<p>Learn basic observability.</p>
</a>
<a href="{{< relref "administration/configuration.md" >}}" class="nav-cards__item nav-cards__item--guide">
<a href="{{< relref "setup-grafana/configure-grafana/" >}}" class="nav-cards__item nav-cards__item--guide">
<h4>Configure Grafana</h4>
<p>Review the configuration and setup options.</p>
</a>
<a href="{{< relref "basics/timeseries.md" >}}" class="nav-cards__item nav-cards__item--guide">
<a href="{{< relref "basics/timeseries/" >}}" class="nav-cards__item nav-cards__item--guide">
<h4>Intro to time series</h4>
<p>Learn about time series data.</p>
</a>
<a href="{{< relref "administration/provisioning.md" >}}" class="nav-cards__item nav-cards__item--guide">
<a href="{{< relref "administration/provisioning/" >}}" class="nav-cards__item nav-cards__item--guide">
<h4>Provisioning</h4>
<p>Learn how to automate your Grafana configuration.</p>
</a>
<a href="{{< relref "whatsnew/whats-new-in-v8-0.md" >}}" class="nav-cards__item nav-cards__item--guide">
<a href="{{< relref "whatsnew/whats-new-in-v8-0/" >}}" class="nav-cards__item nav-cards__item--guide">
<h4>What's new in v8.0</h4>
<p>Explore the features and enhancements in the latest release.</p>
</a>
@@ -74,51 +81,51 @@ aliases = ["/docs/grafana/v1.1", "/docs/grafana/latest/guides/reference/admin",
## Data source guides
<div class="nav-cards">
<a href="{{< relref "datasources/graphite.md" >}}" class="nav-cards__item nav-cards__item--ds">
<a href="{{< relref "datasources/graphite/" >}}" class="nav-cards__item nav-cards__item--ds">
<img src="/static/img/docs/logos/icon_graphite.svg" >
<h5>Graphite</h5>
</a>
<a href="{{< relref "datasources/elasticsearch.md" >}}" class="nav-cards__item nav-cards__item--ds">
<a href="{{< relref "datasources/elasticsearch/" >}}" class="nav-cards__item nav-cards__item--ds">
<img src="/static/img/docs/logos/icon_elasticsearch.svg" >
<h5>Elasticsearch</h5>
</a>
<a href="{{< relref "datasources/influxdb/_index.md" >}}" class="nav-cards__item nav-cards__item--ds">
<a href="{{< relref "datasources/influxdb/" >}}" class="nav-cards__item nav-cards__item--ds">
<img src="/static/img/docs/logos/icon_influxdb.svg" >
<h5>InfluxDB</h5>
</a>
<a href="{{< relref "datasources/prometheus.md" >}}" class="nav-cards__item nav-cards__item--ds">
<a href="{{< relref "datasources/prometheus/" >}}" class="nav-cards__item nav-cards__item--ds">
<img src="/static/img/docs/logos/icon_prometheus.svg" >
<h5>Prometheus</h5>
</a>
<a href="{{< relref "datasources/google-cloud-monitoring/_index.md" >}}" class="nav-cards__item nav-cards__item--ds">
<a href="{{< relref "datasources/google-cloud-monitoring/" >}}" class="nav-cards__item nav-cards__item--ds">
<img src="/static/img/docs/logos/icon_cloudmonitoring.svg">
<h5>Google Cloud Monitoring</h5>
</a>
<a href="{{< relref "datasources/aws-cloudwatch/_index.md" >}}" class="nav-cards__item nav-cards__item--ds">
<a href="{{< relref "datasources/aws-cloudwatch/" >}}" class="nav-cards__item nav-cards__item--ds">
<img src="/static/img/docs/logos/icon_cloudwatch.svg">
<h5>AWS CloudWatch</h5>
</a>
<a href="{{< relref "datasources/azuremonitor/_index.md" >}}" class="nav-cards__item nav-cards__item--ds">
<a href="{{< relref "datasources/azuremonitor/" >}}" class="nav-cards__item nav-cards__item--ds">
<img src="/static/img/docs/logos/icon_azure_monitor.jpg">
<h5>Azure Monitor</h5>
</a>
<a href="{{< relref "datasources/loki.md" >}}" class="nav-cards__item nav-cards__item--ds">
<a href="{{< relref "datasources/loki/" >}}" class="nav-cards__item nav-cards__item--ds">
<img src="/static/img/docs/logos/icon_loki.svg">
<h5>Loki</h5>
</a>
<a href="{{< relref "datasources/mysql.md" >}}" class="nav-cards__item nav-cards__item--ds">
<a href="{{< relref "datasources/mysql/" >}}" class="nav-cards__item nav-cards__item--ds">
<img src="/static/img/docs/logos/icon_mysql.png" >
<h5>MySQL</h5>
</a>
<a href="{{< relref "datasources/postgres.md" >}}" class="nav-cards__item nav-cards__item--ds">
<a href="{{< relref "datasources/postgres/" >}}" class="nav-cards__item nav-cards__item--ds">
<img src="/static/img/docs/logos/icon_postgres.svg" >
<h5>Postgres</h5>
</a>
<a href="{{< relref "datasources/mssql.md" >}}" class="nav-cards__item nav-cards__item--ds">
<a href="{{< relref "datasources/mssql/" >}}" class="nav-cards__item nav-cards__item--ds">
<img src="/static/img/docs/logos/sql_server_logo.svg">
<h5>Microsoft SQL Server</h5>
</a>
<a href="{{< relref "datasources/opentsdb.md" >}}" class="nav-cards__item nav-cards__item--ds">
<a href="{{< relref "datasources/opentsdb/" >}}" class="nav-cards__item nav-cards__item--ds">
<img src="/static/img/docs/logos/icon_opentsdb.png" >
<h5>OpenTSDB</h5>
</a>

View File

@@ -1,14 +1,13 @@
+++
title = "Administration"
description = "Administration"
weight = 40
+++
---
aliases:
- /docs/grafana/latest/administration/
description: Administration
title: Administration
weight: 40
---
# Administration
This section includes information for Grafana administrators, team administrators, and users performing administrative tasks:
- [Change Preferences]({{< relref "preferences" >}})
- [Configuration]({{< relref "configuration" >}})
- [Configure Docker image]({{< relref "configure-docker" >}})
- [Security]({{< relref "security" >}})
{{< section >}}

View File

@@ -0,0 +1,46 @@
---
aliases:
- /docs/grafana/latest/administration/api-keys/about-api-keys/
- /docs/grafana/latest/administration/api-keys/
- /docs/grafana/latest/administration/api-keys/create-api-key/
description: This section contains information about API keys in Grafana
keywords:
- API keys
- Service accounts
menuTitle: API keys
title: API keys
weight: 700
---
# API keys
An API key is a randomly generated string that external systems use to interact with Grafana HTTP APIs.
When you create an API key, you specify a **Role** that determines the permissions associated with the API key. Role permissions control that actions the API key can perform on Grafana resources.
> **Note:** If you use Grafana v8.5 or newer, use service accounts instead of API keys. For more information, refer to [Service accounts]({{< relref "../service-accounts/" >}}).
{{< section >}}
## Create an API key
Create an API key when you want to manage your computed workload with a user.
This topic shows you how to create an API key using the Grafana UI. You can also create an API key using the Grafana HTTP API. For more information about creating API keys via the API, refer to [Create API key via API]({{< relref "../../developers/http_api/create-api-tokens-for-org/#how-to-create-a-new-organization-and-an-api-token" >}}).
### Before you begin:
- Ensure you have permission to create and edit API keys. For more information about permissions, refer to [About users and permissions]({{< relref "../roles-and-permissions/#" >}}).
**To create an API key:**
1. Sign in to Grafana, hover your cursor over **Configuration** (the gear icon), and click **API Keys**.
1. Click **New API key**.
1. Enter a unique name for the key.
1. In the **Role** field, select one of the following access levels you want to assign to the key.
- **Admin**: Enables a user to use APIs at the broadest, most powerful administrative level.
- **Editor** or **Viewer** to limit the key's users to those levels of power.
1. In the **Time to live** field, specify how long you want the key to be valid.
- The maximum length of time is 30 days (one month). You enter a number and a letter. Valid letters include `s` for seconds,`m` for minutes, `h` for hours, `d `for days, `w` for weeks, and `M `for month. For example, `12h` is 12 hours and `1M` is 1 month (30 days).
- If you are unsure about how long an API key should be valid, we recommend that you choose a short duration, such as a few hours. This approach limits the risk of having API keys that are valid for a long time.
1. Click **Add**.

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