Compare commits

..

260 Commits

Author SHA1 Message Date
Grot (@grafanabot)
92461d8d1e "Release: Updated versions in package to 9.1.6" (#531) 2022-09-20 12:06:14 +02:00
Ieva
c048378ad5 V9.1.3.1 security patch (#492)
* apply security fix for admin only folder migration (#482)

* Data source: prevent from using auth proxy header as custom data source header (#474)

* applying changes from 446/fix-user-escalation-through-auth-proxy

* linting

* only validate custom headers if auth proxy is enabled

* import ordering

* add links to CVE

* clean up

* remove typo

Co-authored-by: Karl Persson <kalle.persson@grafana.com>
(cherry picked from commit 0100a6aa9645313b25a79a17d947cbf936cc4e76)
2022-09-20 11:41:29 +02:00
Grot (@grafanabot)
d646f49ea0 Mention the need for Subscription Reader role (#51844) (#55436)
Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com>
Co-authored-by: Andres Martinez Gotor <andres.mgotor@gmail.com>
Co-authored-by: Garrett Guillotte <100453168+gguillotte-grafana@users.noreply.github.com>
(cherry picked from commit e25612092b)

Co-authored-by: Andrea Spadaccini <andrea.spadaccini@gmail.com>
2022-09-20 03:32:25 -04:00
Nathan Marrs
90364a9173 Geomap: Sync v9.1.x with main (#55428)
* sync geomap

* Geomap: Add devenv dashboard for v9.1 of geomap (#53638)

* Geomap: Spatial operations location options transform e2e test (#54162)

* Devenv: Geomap global vs local field coloring (#54253)

* Geomap: cleanup (#54328)

* Geomap: Layer types e2e (#54666)

* Geomap: Map control options e2e (#54809)

* update betterer

* add missing icon for measure tools

* Geomap: Update language to match documentation and remove beta (#53703)

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

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
Co-authored-by: Adela Almasan <88068998+adela-almasan@users.noreply.github.com>
Co-authored-by: Drew Slobodnjak <60050885+drew08t@users.noreply.github.com>
2022-09-19 18:05:53 -07:00
ismail simsek
89410ffd0c Before requesting the metadata check the access mode (#55403)
* Before requesting the metadata check the access mode

* Update tests

* Update tests again
2022-09-19 18:56:51 +02:00
Grot (@grafanabot)
04ec76aaf3 Plugins: Expose emotion/react to plugins to prevent load failures (#55297) (#55400)
(cherry picked from commit db17a88193)

Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com>
2022-09-19 17:37:30 +02:00
Grot (@grafanabot)
404abe2be6 ElasticSearch: Fix dispatching queries at a wrong time (#55225) (#55367)
* Loki: Fix running queries without an `expr`

* rever previous change

* only dispatch `initQuery` if the DS is uninitialized

* moved `isUninitialized` to static var

(cherry picked from commit a3ff758874)

Co-authored-by: Sven Grossmann <Svennergr@gmail.com>
2022-09-19 12:06:14 +02:00
Grot (@grafanabot)
4c1225219c Azure Monitor: Fix migration issue with MetricDefinitionsQuery template variable query types (#55262) (#55359)
* updated imported dashboards

* Adds check for MetricDefinitionsQuery in migration

* Removed delete from migratio

* switched back to const for migratedQ

* Added depreacted to MetricDefinitionQuery

(cherry picked from commit 1e9f5a5080)

Co-authored-by: Yaelle Chaudy <42030685+yaelleC@users.noreply.github.com>
2022-09-19 11:33:31 +02:00
Grot (@grafanabot)
2f1f764364 TablePanel/StatPanel: Fix values not being visible when background transparent (#55092) (#55362)
* TablePanel/StatPanel: Fix values not being visible when background transparent

* Maintain backwards compatibility

(cherry picked from commit 32c4245efd)

Co-authored-by: Victor Marin <36818606+mdvictor@users.noreply.github.com>
2022-09-19 10:59:47 +02:00
Grot (@grafanabot)
3d55cc9b47 CloudWatch: Enable feature adoption tracking in the plugin (#54299) (#55354)
* improve typing for DashboardLoadedEvent

* cleanup

* add cloudwatch tracking event

* add test

* revert test change

* fix typo

* remove optional

* pr feedback

* reactor test

* revert changes to api and azure

* cleanup

* refactoring test

* pr feedback

(cherry picked from commit 469f915b8c)

Co-authored-by: Erik Sundell <erik.sundell87@gmail.com>
2022-09-19 09:36:17 +02:00
Jo
5f51a1425b Backport: Revert changes to oauth behavior to v9.1.x (#55302)
* OAuth: Allow assigning Server Admin (#54780)

* extract errors to errors file

* implement oauth server admin assignment

* add server admin tests

* deduplicate autoAssignOrgRole

* deduplicate strict setting

* deduplicate strict setting

* add support for generic oauth

* add role attribute strict support for generic oauth

* add support for github/gitlab

* assignGrafanaAdmin option is here to stay

* unify similar errors

* add config option

* add okta server admin mapping

* remove never used Company attribute

* unify generic oauth role extract with other methods

* case insensitive role match as in azure

* add ini settings

* add server admin to devenv

* remove duplicate fields

* add documentation to oauth

* fix titlecase test

* implement doc feedback

(cherry picked from commit ef245874da)

* Auth: Restore legacy behavior and add deprecation notice for empty org role in oauth (#55118)

* Auth: Add deprecation notice for empty org role

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

* fix recasts

* fix azure tests missing logger

* Adding test to gitlab oauth

* Covering more cases

* Cover more options

* Add role attributestrict check fail

* Adding one more edge case test

* Using legacy for gitlab

* Yet another edge case YAEC

* Reverting github oauth to legacy

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

* Not using token

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

* Nit.

* Adding warning in docs

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

* add warning to generic oauth

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

* Be more precise

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

* Adding warning to github oauth

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

* Adding warning to gitlab oauth

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

* Adding warning to okta oauth

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

* Add docs about mapping to AzureAD

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

* Clarify oauth_skip_org_role_update_sync

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

* Nit.

* Nit on Azure AD

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

* Reorder docs index

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

* Fix typo

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

Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com>
Co-authored-by: gamab <gabi.mabs@gmail.com>
(cherry picked from commit 00e7324bf6)

* Auth: Allow admins to manually change oauth user role if `oauth_skip_org_role_update_sync` is enabled  (#55182)

* Auth: Allow admins to change oauth user info it it's not synced.

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

* Update public/app/features/admin/UserAdminPage.tsx

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

* Add missing import

* Simplify init

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

* SAML: Add option to skip org role sync (#55230)

* SAML: Add option to skip org role sync

* Modify frontend accordingly

* Remove update from config option name

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

* Remove update from config option name

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

* Fix typo

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

Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com>
Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>
Co-authored-by: gamab <gabi.mabs@gmail.com>
Co-authored-by: Josh Hunt <joshhunt@users.noreply.github.com>
(cherry picked from commit 3e2e9f93b9)

* Update gitlab_oauth_test.go

* Update gitlab_oauth_test.go
2022-09-19 09:33:47 +02:00
Grot (@grafanabot)
93db981c89 Docs: adds set up section with alertmanager, provisioning sections (#55291) (#55321)
* Docs: adding setup, provisioning docs

* add set up, alertmanager

* Adds link to provisioning from set up page

* renames topics in set up section

* fixes alertmanager link

* removing article for alertmanager

* first connection to oncall

* updating armands intro text

* getting rid of blank line

(cherry picked from commit c0c4409abc)

Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com>
2022-09-16 18:44:54 +01:00
Leo
81626ba88d [v9.1.x] Browse: Hide dashboard actions if user does not have enough permission (#55279)
* Browse: Hide dashboard actions if user does not have enough permission (#55218)

* hide dashboard actions if user does not have enough permission

* improve test description

(cherry picked from commit 896d684065)

* fix broken test on backport pr
2022-09-16 15:51:00 +02:00
Grot (@grafanabot)
aff26ac8ae Fix header/footer not sticky (#55285) (#55294)
(cherry picked from commit 18f33871d1)

Co-authored-by: Victor Marin <36818606+mdvictor@users.noreply.github.com>
2022-09-16 13:38:10 +03:00
Grot (@grafanabot)
8fe0c9452e Docs: RBAC update for insights and query caching (#52544) (#55280)
* Doc: RBAC update for insights and query caching

* Fix RBAC actions table order

* Fix RBAC role definitions & assignments tables

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

Co-authored-by: Agnès Toulet <35176601+AgnesToulet@users.noreply.github.com>
2022-09-16 10:23:52 +02:00
Grot (@grafanabot)
b67d62c016 Inspect: Hide Actions tab when it is empty (#55272) (#55274)
(cherry picked from commit 6947e276d6)

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2022-09-16 01:35:00 -04:00
Grot (@grafanabot)
d3d45680d4 adjusts structure of tasks (#55268) (#55270)
(cherry picked from commit dd0be3012c)

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
2022-09-15 17:35:23 -05:00
Grot (@grafanabot)
946622f7c6 Provisioning Contact points: Support disableResolveMessage via YAML too (#54122) (#55254)
Signed-off-by: Michael Musenbrock <michael.musenbrock@gmail.com>
(cherry picked from commit 099d3cdf72)

Co-authored-by: Michael Musenbrock <michael.musenbrock@gmail.com>
2022-09-15 16:53:00 -05:00
Grot (@grafanabot)
b0124f0648 Alerting: Fix send resolved notifications (#54793) (#55256)
This commit fixes a bug where we did not send resolved alerts to Alertmanager for resolved alert instances. This meant that resolved notifications did not have the annotations from the resolved state, and a result did not also have the resolved screenshot.

(cherry picked from commit 5561f935e6)

Co-authored-by: George Robinson <george.robinson@grafana.com>
2022-09-15 19:55:01 +01:00
Grot (@grafanabot)
48676a95a1 Fix download link in macOS install instructions (#55133) (#55140)
The link was pointing to non-existing `7.3.0-381ff45epre` version.

Updated to point to main download page, as with other platforms.

(cherry picked from commit 1366b87b34)

Co-authored-by: Adrian Serrano <adrisr83@gmail.com>
2022-09-15 10:56:22 -07:00
Grot (@grafanabot)
ced6d5591a small fix for new variable editor types (#55195) (#55259)
(cherry picked from commit 331f3e2a58)

Co-authored-by: Brendan O'Handley <brendan.ohandley@grafana.com>
2022-09-15 12:36:27 -05:00
Grot (@grafanabot)
b1d62efb9f When generating the pubdash url, use the base url from the Grafana config. This allows the url generation to work in the case that Grafana is hosted on a subpath. (#55204) (#55251)
Support subpaths when generating public dashboard url

(cherry picked from commit 5121e32722)

Co-authored-by: owensmallwood <owen.smallwood@grafana.com>
2022-09-15 10:46:46 -06:00
Grot (@grafanabot)
32fcbd78b5 Fix broken image rendering troubleshooting links (#55210) (#55252)
(cherry picked from commit ebcbb66548)

Co-authored-by: Kim Nylander <104772500+knylander-grafana@users.noreply.github.com>
2022-09-15 11:09:31 -05:00
Grot (@grafanabot)
131b857bd2 InfluxDB: add scopedVars to tags to fix repeated panels querying all selected variables (#54934) (#55245)
* add scoped vars for tags in influx to fix repeated panels

* test for adding scopedVars to tags

(cherry picked from commit cd6b7ba688)

Co-authored-by: Brendan O'Handley <brendan.ohandley@grafana.com>
2022-09-15 10:05:41 -05:00
Eric Leijonmarck
f500459303 [v9.1.x] fix: min metric to hourly metric (#55244)
* fixed merge

* fixed merge

* fixed merge
2022-09-15 16:21:59 +02:00
Grot (@grafanabot)
85dc4fc505 Search: Fixes folder section not displaying dashboards (#55231) (#55240) 2022-09-15 14:35:09 +01:00
Grot (@grafanabot)
1c9091f85d Migrate user_id to BIGINT (#55084) (#55235)
(cherry picked from commit 7352c181c2)

Co-authored-by: Piotr Jamróz <pm.jamroz@gmail.com>
2022-09-15 14:46:21 +02:00
Grot (@grafanabot)
99039d8cf6 Docs: create new explore page for concepts (#55161) (#55213)
* Docs: create new explore page for concepts

* Updates weighting of explore section to appear at top

* Weight for fundamentals page

(cherry picked from commit ab774b47fb)

Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com>
2022-09-15 11:45:02 +01:00
Joao Silva
41a300a4f4 Search: Avoid requesting all dashboards when in Folder View (#55188) 2022-09-14 15:56:56 -07:00
Grot (@grafanabot)
4d28c496b6 Geomap: Add Africa, Australia, Oceania, South Asia, and East Asia as initial view options (#55142) (#55191)
* add remaining continents + Asian regions

* capitalize South-East Asia

* Limit max zoom to 4 for view regions

Co-authored-by: drew08t <drew08@gmail.com>
(cherry picked from commit 6f0c4c7f82)

Co-authored-by: matt abrams <37156449+zuchka@users.noreply.github.com>
2022-09-14 14:58:07 -04:00
Grot (@grafanabot)
e962b2fd5d Query patterns: Feature tracking (#55164) (#55177)
* Query patterns: Feature tracking before redesign

* Update

(cherry picked from commit 926a3396ab)

Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
2022-09-14 11:04:49 -04:00
Grot (@grafanabot)
2760c71038 AzureMonitor: Explain custom and metric namespace properties (#55048) (#55173)
(cherry picked from commit 65bdee3a90)

Co-authored-by: Adam Simpson <adam@adamsimpson.net>
2022-09-14 10:42:53 -04:00
Grot (@grafanabot)
4cfc7a94df Panel: Disable legends when showLegend is false prior to schema v37 (#55126) (#55165)
(cherry picked from commit bed531f5fb)

Co-authored-by: Ivan Ortega Alba <ivanortegaalba@gmail.com>
2022-09-14 08:48:04 -04:00
Grot (@grafanabot)
3425aace85 Alerting: Fix legacy migration crash when rule name is too long (#55053) (#55128)
* Extract standardized UID field length to constant

* Extract default length to constant

* Truncate rule names that are too long

* Add tests for name normalization

* Fix whitespace lint error

* Another linter fix

* Empty commit to kick build

(cherry picked from commit 9f45e2e706)

Co-authored-by: Alexander Weaver <weaver.alex.d@gmail.com>
2022-09-13 15:12:16 -04:00
Grot (@grafanabot)
887cde9b0d adds section shortcode, adjust topic titles (#55000) (#55002)
(cherry picked from commit b6237a43e6)

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
2022-09-13 09:23:46 -05:00
Grot (@grafanabot)
714925777a ReleaseNotes: Updated changelog and release notes for 9.1.5 (#55091) (#55093)
(cherry picked from commit 4ff5fe718b)
2022-09-13 09:22:32 -04:00
Grot (@grafanabot)
58d5bc8f8f "Release: Updated versions in package to 9.1.5" (#55090) 2022-09-13 15:12:26 +02:00
Grot (@grafanabot)
aa20e2125c PanelMenu: Remove hide legend action as it was showing on all panel types (#54876) (#55063)
* PanelMenu: Remove hide legend action

* Fix test

* Updated

(cherry picked from commit ab045184e4)

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
2022-09-13 04:37:29 -04:00
Grot (@grafanabot)
25e991c523 Fix StateTimeline zoom function (#55033) (#55046)
(cherry picked from commit 64869e3d90)

Co-authored-by: Victor Marin <36818606+mdvictor@users.noreply.github.com>
2022-09-12 12:58:11 -04:00
Joey Tawadrous
7852384e10 Traces: More visible span colors (#55029) 2022-09-12 16:44:50 +03:00
Grot (@grafanabot)
ef4749bcb4 PluginLoader: Alias slate-react as @grafana/slate-react (#55027) (#55032)
(cherry picked from commit f578adfede)

Co-authored-by: kay delaney <45561153+kaydelaney@users.noreply.github.com>
2022-09-12 09:35:51 -04:00
Grot (@grafanabot)
c80fb0c116 Cloudwatch: Fix annotation query serialization issue (#54884) (#55022)
* pass period as string and let backend handle conversion

* adding unit test

* adding unit test

(cherry picked from commit ab72d47850)

Co-authored-by: Erik Sundell <erik.sundell87@gmail.com>
2022-09-12 13:50:01 +02:00
Domas
28997ed169 Frontend logging: handle logging endpoints without expensive middleware (#54960) (#55019)
(cherry picked from commit b5c67fe0dd)
2022-09-12 13:38:03 +03:00
Grot (@grafanabot)
a41e6ae453 AzureMonitor: Fix custom namespaces (#54937) (#55018)
(cherry picked from commit 879ee82b83)

Co-authored-by: Adam Simpson <adam@adamsimpson.net>
2022-09-12 06:28:32 -04:00
Grot (@grafanabot)
f80a9388cf Alerting: remove interpolation of annotations from alert rule file provisioning (#54975) (#54996)
(cherry picked from commit bc4d929c67)

Co-authored-by: Jean-Philippe Quéméner <JohnnyQQQQ@users.noreply.github.com>
2022-09-12 11:01:03 +02:00
Grot (@grafanabot)
1c05c66f33 PanelOptions: fix timezones editor save key (#55009) (#55011)
(cherry picked from commit 7979463bbf)

Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
2022-09-10 12:42:52 -04:00
Christopher Moyer
fb0eb5ed60 Docs/refactors variables topics (#54470) (#54995)
* refactor and partial relref fix

* finishes variables refactor

* Update docs/sources/variables/add-template-variables/index.md

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

* removes duplicate general options, adds links to general options within tasks

* adds configure variable selection options topic

* starts phase II of refactoring

* incorporates feedback, updates relrefs

* corrects final relrefs

* updates alias

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
(cherry picked from commit 7147d17567)
2022-09-09 13:15:04 -05:00
Grot (@grafanabot)
e8e631d336 hide overflow content for single left pane (#54882) (#54994)
(cherry picked from commit d5e28426ee)

Co-authored-by: Leo <108552997+lpskdl@users.noreply.github.com>
2022-09-09 18:13:44 +02:00
Grot (@grafanabot)
c4afe31c8e ReleaseNotes: Updated changelog and release notes for 9.1.4 (#54987) (#54989)
(cherry picked from commit 1a285d2d0e)
2022-09-09 17:00:24 +02:00
Grot (@grafanabot)
a78a93130d "Release: Updated versions in package to 9.1.4" (#54986) 2022-09-09 16:58:57 +02:00
Grot (@grafanabot)
2e3292dbd3 CloudWatch: Fix display name of metric and namespace (#54860) (#54971)
* convert value to option

* add unit test

* fix lint issue

(cherry picked from commit a37fa758a2)

Co-authored-by: Erik Sundell <erik.sundell87@gmail.com>
2022-09-09 08:30:58 -04:00
Artur Wierzbicki
e1f5d698e6 Search: Add substring matcher (#54895)
* Search: Add substring matcher (#54813)

* search: bring back substring search

* lint fix

* search: bring back ngram

* search: bring back ngram

* search: more tests

* fix tests
2022-09-09 14:20:20 +02:00
Jean-Philippe Quéméner
19a58da54c Alerting: make sure to update contact point references when updating (#54896) (#54952)
(cherry picked from commit e41f78a56d)
2022-09-09 14:15:57 +02:00
Grot (@grafanabot)
2619aead7f fix bug in loki's adhoc filters (#54920) (#54956)
(cherry picked from commit 20b07fae6f)

Co-authored-by: Sven Grossmann <Svennergr@gmail.com>
2022-09-09 12:23:24 +02:00
Grot (@grafanabot)
c4f57481fd Alerting: validate am config changes before persisting (#54908) (#54944)
(cherry picked from commit d88f1c8e35)

Co-authored-by: Jean-Philippe Quéméner <JohnnyQQQQ@users.noreply.github.com>
2022-09-09 04:53:02 -04:00
Grot (@grafanabot)
ea2ac956cd AzureMonitor: Fix metric namespace list (#54826) (#54945)
(cherry picked from commit 366129c14e)

Co-authored-by: Andres Martinez Gotor <andres.martinez@grafana.com>
2022-09-09 04:28:40 -04:00
Grot (@grafanabot)
afe763b4a3 DisplayProcessor: Handle reverse-ordered data when auto-showing millis (#54923) (#54930)
(cherry picked from commit 085db83cd9)

Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
2022-09-08 14:01:15 -04:00
Grot (@grafanabot)
3cb113d02a Docs: moves reporting docs per customer request (#54591) (#54911)
* moves reporting docs per customer request

* corrects relrefs

* adjusts link and menutitle

* corrects typo

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

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
2022-09-08 09:09:38 -05:00
Grot (@grafanabot)
512a90e3e5 ignore non-actionable errors in grafana agent (#54824) (#54906)
(cherry picked from commit 9dd4eab553)

Co-authored-by: Domas <domasx2@gmail.com>
2022-09-08 09:38:37 -04:00
Grot (@grafanabot)
3339fc2210 [v9.1.x] Alerting: Change the rule yaml data to reflect Prom-based rule format (#54898)
Co-authored-by: Konrad Lalik <konrad.lalik@grafana.com>
2022-09-08 14:29:38 +02:00
Grot (@grafanabot)
ed52d422c1 instrumentation: dont instrument ErrSkip at all (#54880) (#54883)
Signed-off-by: bergquist <carl.bergquist@gmail.com>
(cherry picked from commit b4e3c89f60)

Co-authored-by: Carl Bergquist <carl.bergquist@gmail.com>
2022-09-08 05:27:38 -04:00
Sven Grossmann
bb398e9aac Chore: Upgrade @grafana/lezer-logql to 0.0.19 (#54879) 2022-09-08 10:38:28 +02:00
Grot (@grafanabot)
0e7ab2ea01 Heatmap: Add option to reverse color scheme (#54365) (#54861)
(cherry picked from commit 4223d3a6a7)

Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
2022-09-07 12:22:35 -04:00
Grot (@grafanabot)
1bf8c8563d Alerting: Sanitize invalid label/annotation names for external alertmanagers (#54537) (#54859)
* Alerting: Sanitize invalid label/annotation names for external alertmanagers

Grafana's built-in Alertmanager supports both Unicode label keys and values; however, if using an external
Prometheus Alertmanager label keys must be compatible with their data model.
This means label keys must only contain ASCII letters, numbers, as well as underscores and match the regex
`[a-zA-Z_][a-zA-Z0-9_]*`.

Any invalid characters will now be removed or replaced by the Grafana alerting engine before being sent to
the external Alertmanager according to the following rules:

- `Whitespace` will be removed.
- `ASCII characters` will be replaced with `_`.
- `All other characters` will be replaced with their lower-case hex representation.

* Prefix hex replacements with `0x`

* Refactor for clarity

* Apply suggestions from code review

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

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

Co-authored-by: Matthew Jacobson <matthew.jacobson@grafana.com>
2022-09-07 11:52:00 -04:00
Grot (@grafanabot)
48ee6e6cb8 Alerting: Resetting the notification policy tree to the default policy will also restore default contact points (#54608) (#54855)
* Add test that resetting the route restores the default receiver

* Return error instead of panic

* Adjust error string to match styleguide

(cherry picked from commit b193eaed6e)

Co-authored-by: Alexander Weaver <weaver.alex.d@gmail.com>
2022-09-07 10:46:32 -05:00
Grot (@grafanabot)
8f76cf81be BarChart: fix stale colorByField being used in value mappings (#54820) (#54856)
(cherry picked from commit 75de42fba7)

Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
2022-09-07 10:50:50 -04:00
Dimitris Sotirakis
67baeb765f Add package publishing step (#53553) (#54846)
Issue: https://github.com/grafana/deployment_tools/issues/36289
Based on the new image: https://github.com/grafana/deployment_tools/tree/master/docker/package-publish
This is a new step meant to replace the store-packages command. It will greatly improve publishing performace and it publishes to a common repository shared with all Grafana products

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

Co-authored-by: Julien Duchesne <julien.duchesne@grafana.com>
2022-09-07 08:55:30 -04:00
Grot (@grafanabot)
6205d11afc TimeSeries: omit non-integer y ticks when decimals: 0 (#54679) (#54808)
(cherry picked from commit bf052cb35e)

Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
2022-09-06 18:03:57 -04:00
Grot (@grafanabot)
9c3e1968da [v9.1.x] Alerting: Fix incorrect propagation of org ID and other fields in rule provisioning endpoints (#54807)
* Fix incorrect propagation of org ID in rule endpionts (#54603)

(cherry picked from commit b8d1474609)

* Work around OrgId -> OrgID rename in backport

Co-authored-by: Alexander Weaver <weaver.alex.d@gmail.com>
2022-09-06 15:20:15 -05:00
Grot (@grafanabot)
e7988dbb5a Dashboard: Unsaved changes warning fixes (#54706) (#54803)
* Quick test of alternative method

* change order of if condition again for better readability

* Think I have something that is working

* Update

(cherry picked from commit e5c32c8cc9)

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
2022-09-06 20:05:18 +02:00
Grot (@grafanabot)
35d51435f4 Alerting: Telegram: truncate long messages (#54339) (#54796)
Truncate messages longer than 4096 characters

(cherry picked from commit b593d371ef)

Co-authored-by: Ilya Galimyanov <ilyaxa1@gmail.com>
2022-09-06 18:29:18 +01:00
kay delaney
eac9f6dd57 Chore: Update slate and related packages (#54566) (#54795)
* Chore: Update slate and related packages

(cherry picked from commit a70aba1384)
2022-09-06 11:22:33 -04:00
Grot (@grafanabot)
456d785f2f ReleaseNotes: Updated changelog and release notes for 9.1.3 (#54759) (#54762)
(cherry picked from commit fe848e93b3)
2022-09-06 07:01:43 -04:00
Grot (@grafanabot)
6267d4a3d5 "Release: Updated versions in package to 9.1.3" (#54758) 2022-09-06 12:54:08 +02:00
Karl Persson
843ca0a355 [v9.1.x] RBAC: Fix resolver issue on wildcard resulting in wrong status code (#54692)
* RBAC: Fix resolver issue on wildcard resulting in wrong status code for endpoints (#54208)

* RBAC: Test evaluation before attaching mutator

* RBAC: Return error if no resolver is found for scope

* RBAC: Sync changes to evaluation in mock

* RBAC: Check for resolver not found error and just fail the evaluation in that case

(cherry picked from commit 552d3fec8d)
2022-09-06 09:08:49 +02:00
Dominik Prokop
6e300048ed 54570 manual backport (#54716) 2022-09-05 17:18:50 +02:00
Grot (@grafanabot)
6f255cb089 LibraryElements: Fix inability to delete library panels under MySQL (#54600) (#54711)
Closes #53456

(cherry picked from commit 65c3ad6721)

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

* refactor: make content after slider accessible

* refactor: add a comment with todo

(cherry picked from commit f5f93ccd96)

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

* refactor: adjust attributes

(cherry picked from commit 95ec6f6c0f)

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

* Apply suggestions from code review

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

* fix focus issues & tests

* remove unused import

* TypeScript work in progress

* Move react select props to types.ts

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

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

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

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

* add appropriate warnings to docs

* remove unimplemented login_token assumptions

* Update conf/sample.ini

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

* Fix broken link

* Update docs/sources/datasources/tempo.md

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

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

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

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

* Apply suggestions from code review

* Update docs/sources/datasources/tempo.md

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

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

* Prettier update

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

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

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

* Apply suggestions from code review

(cherry picked from commit 101c087fc7)

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

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

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

(cherry picked from commit d706320d0a)

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

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

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

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

* Add signed in middleware to all routes

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

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

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

* Externalize react-router

* fixing test

(cherry picked from commit e5fba788d6)

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

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

* add tests for PluginList with app sub url

* remove unnecessary comments

(cherry picked from commit fc348e6279)

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

(cherry picked from commit 56369457d4)

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

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

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

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

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

* Added ds_version prop

* Added ds_version to tests

* Extracted event name to tracking file

* Extracted event to tracking file

* Removed ds_version - useless for core plugin

* Addressed comments

* Added note to event documentation

(cherry picked from commit 711c504b39)

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

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

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

(cherry picked from commit 87375f570d)

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

(cherry picked from commit c9661a5be1)

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

* PermissionList: Display inherited indicator

(cherry picked from commit cc78486535)

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

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

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

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

* refactors manage dashboard topics

* Apply suggestions from code review

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

* incorporates review feedback

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

* fixes typo

* incorporates feedback

* completes splitting out reporting and playlists

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

* makes prettier

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

* Search: lint

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

* Search: revert readiness check query type

* Search: remove println

* remove sleep, get coffee

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

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

* Do not show Changes tab if there are no changes

* Fix comments

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

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

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

* starts add cloud disclaimer

* adds disclaimer to JWT and Org sections

* adds final Cloud disclaimer to the Loki data source

(cherry picked from commit 3f0636083d)

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

* Adhoc variable: Correctly preselect datasource when provisioning

* Fix test

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

(cherry picked from commit 8eac5706fd)

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

* removed unused import

* Tweak tests

* Fix tests

* Renamed query function - added 'Azure'

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

This reverts commit a046bcdd7c.

* Adressed comments

* Fix uncaught error issue

* revert last commit

* Add back errorMessage check

(cherry picked from commit d0d6562f63)

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

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

* Fix mixed datasource targets migration

(cherry picked from commit f9a49aa3ed)

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

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

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

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

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

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

* Apply suggestions from code review

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

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

* stat sparkline, too

* better types

(cherry picked from commit 530dd63ac6)

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

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

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

(cherry picked from commit 666f84be57)

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

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

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

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

* completes refactor and copy edit

(cherry picked from commit 1da4aa25a8)

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

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

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

* Fix vertical scrollbar with virtualized rendering

* betterer

* Refactor prop

(cherry picked from commit cbe4fb4dab)

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

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

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

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

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

* Update snapshot

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

* drop unneeded change

* remove explicit axis.show

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

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

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

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

(cherry picked from commit e877c1da90)

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

* add more expect.length in tests

(cherry picked from commit 2a0ae74f96)

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

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

* linter

(cherry picked from commit 59e638acb9)

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

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

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

* Docs: Add 9.1 to What's New index

* Docs: Update docs index What's New link

(cherry picked from commit 1f692d4020)

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

(cherry picked from commit 25e546ad21)

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

(cherry picked from commit 6d69d7acb8)

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

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

* Add datasource tests

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

* Simplify test and pass templateSrv appropriately

* Fix lint issue

* Simplify test and add type that supports parital nested objects

* Update test and remove unneeded util function

* Rename to avoid duplicate mock

(cherry picked from commit d4f382892d)

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

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

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

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

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

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

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

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

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

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

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

* add back launch.json

* add back launch.json

(cherry picked from commit 806fb8ab7a)

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

* Fix DTO embedding when getting/putting alert rule groups

* Drop usage of word 'Domain'

* Rename var as well

(cherry picked from commit f093c249ac)

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

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

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

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

* ColorPickerInput: Add tests

* ColorInput: Add isClearable prop

(cherry picked from commit 7944f3a692)

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

This reverts commit de956fc3d8.

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

This reverts commit 7eabd7c83a.

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

This reverts commit 53933972b6.

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

This reverts commit 35d98104ad.

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

This reverts commit 9498ee3d54.

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

This reverts commit 4155dc8eca.

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

This reverts commit fa560d96b6.

* These changes are okay

* These should also be fine + betterer update

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

* UserRolePicker: Require both UserRolsAdd and UserRolesRemove for chaning
roles

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

* UserOrgs: Dont try to fetch roles with wrong permission

* RolePicker: make usage consistent with allowed actions

* RolePickerMenu: Remove unused property

* UserOrgs: Check for correct permission

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

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

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

* RolePicker: Always close on update

* RolePicker: Fix issue with updating immutable value

* ServiceAccountsListItem: Pass correct value to RolePicker

* ServiceAccountCreatePage: Pass correct value

(cherry picked from commit 7e16d5b4b4)

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

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

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

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

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

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

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

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

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

(cherry picked from commit 5e1d628f21)

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

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

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

* Extract group change detection logic to dedicated file

* GroupDiff -> GroupDelta for consistency

* Calculate deltas and handle backwards compatible requests

* Separate changes and insert/update/delete as needed

* Regenerate files

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

* Quota checking, delete unused file

* Mark modified records as provisioned

* Validation + a couple API layer tests

* Address linter errors

* Fix issue with UID assignment and rule creation

* Propagate top level group fields to all rules

* Tests for repeated updates and versioning

* Tests for quota and provenance checks

* Fix linter errors

* Regenerate

* Factor out some shared logic

* Drop unnecessary multiple nilchecks

* Use alternative strategy for rolling UIDs on inserted rules

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

* Address feedback

* Add missing nil-check

(cherry picked from commit b198559225)

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

* Add a limit transform

* Simplify filter code

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

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

*  Use rbac dashboard filter if enabled

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

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

(cherry picked from commit f4a5e034b3)

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

(cherry picked from commit e4c45c4f98)

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

* Update dataFrameFieldIndex for multiple frames

(cherry picked from commit 3893c46976)

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

(cherry picked from commit 8f9a372ce2)

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

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

* fix linting issue

(cherry picked from commit 7aeb8b4cdf)

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

* remove duplicate check for annotations in fix

(cherry picked from commit 85db523dd5)

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

(cherry picked from commit 7f43839813)

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

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

* Create reusable createlogRow mock

(cherry picked from commit 84b2498150)

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

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

* return 0 instead of NaN always

(cherry picked from commit 2fea3f0d9a)

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

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

* linting

(cherry picked from commit b590c1c60f)

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

* Update, add more tests

* Update based on suggestions

* Update

* Update tests to use it.each

(cherry picked from commit bf3fa4a445)

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

* simplify test

(cherry picked from commit 1ec9007fe0)

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

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

* API: Fix response status when snapshot key is empty

* Apply suggestions from code review

(cherry picked from commit 5fec6cc4f5)

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

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

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

* remove unneeded function

(cherry picked from commit 610abc2af0)

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

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

* handle correlation not found

* add tests

* fix lint errors

* add bad request to API spec

* change casing

* fix casing in docs

* fix tests

* update spec

(cherry picked from commit 09c4dbdb9f)

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

(cherry picked from commit dc775c7577)

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

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

* fix datalinks for state and status panels

* Add close button on tooltip

* fix links from all series displayed in tooltip

* Allow annotations creation, tweak UI

* Nits

* Remove unused property

* fix returns made from review

* setupUPlotConfig renamed to addTooltipSupport

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

* Change var keyword to const (#53206)

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

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

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

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

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

* Docs: Pass CI

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

* Docs: Pass CI

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

* Docs: Pass CI

* Docs: Pass CI

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

* Docs: Add 9.1 to What's New index

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

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

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

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

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

File diff suppressed because it is too large Load Diff

View File

@@ -29,17 +29,17 @@ $(DRONE): $(BINGO_DIR)/drone.mod
@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"
GOLANGCI_LINT := $(GOBIN)/golangci-lint-v1.49.0
$(GOLANGCI_LINT): $(BINGO_DIR)/golangci-lint.mod
@# Install binary/ries using Go 1.14+ build command. This is using bwplotka/bingo-controlled, separate go module with pinned dependencies.
@echo "(re)installing $(GOBIN)/golangci-lint-v1.49.0"
@cd $(BINGO_DIR) && $(GO) build -mod=mod -modfile=golangci-lint.mod -o=$(GOBIN)/golangci-lint-v1.49.0 "github.com/golangci/golangci-lint/cmd/golangci-lint"
SWAGGER := $(GOBIN)/swagger-v0.30.2
SWAGGER := $(GOBIN)/swagger-v0.29.0
$(SWAGGER): $(BINGO_DIR)/swagger.mod
@# Install binary/ries using Go 1.14+ build command. This is using bwplotka/bingo-controlled, separate go module with pinned dependencies.
@echo "(re)installing $(GOBIN)/swagger-v0.30.2"
@cd $(BINGO_DIR) && $(GO) build -mod=mod -modfile=swagger.mod -o=$(GOBIN)/swagger-v0.30.2 "github.com/go-swagger/go-swagger/cmd/swagger"
@echo "(re)installing $(GOBIN)/swagger-v0.29.0"
@cd $(BINGO_DIR) && $(GO) build -mod=mod -modfile=swagger.mod -o=$(GOBIN)/swagger-v0.29.0 "github.com/go-swagger/go-swagger/cmd/swagger"
GOLANGCI_LINT := $(GOBIN)/golangci-lint-v1.40.1
$(GOLANGCI_LINT): $(BINGO_DIR)/golangci-lint.mod
@# Install binary/ries using Go 1.14+ build command. This is using bwplotka/bingo-controlled, separate go module with pinned dependencies.
@echo "(re)installing $(GOBIN)/golangci-lint-v1.40.1"
@cd $(BINGO_DIR) && $(GO) build -mod=mod -modfile=golangci-lint.mod -o=$(GOBIN)/golangci-lint-v1.40.1 "github.com/golangci/golangci-lint/cmd/golangci-lint"
WIRE := $(GOBIN)/wire-v0.5.0
$(WIRE): $(BINGO_DIR)/wire.mod

View File

@@ -1,174 +1,5 @@
module _ // Auto generated by https://github.com/bwplotka/bingo. DO NOT EDIT
go 1.19
go 1.17
require github.com/golangci/golangci-lint v1.49.0 // cmd/golangci-lint
require (
4d63.com/gochecknoglobals v0.1.0 // indirect
github.com/Antonboom/errname v0.1.7 // indirect
github.com/Antonboom/nilnil v0.1.1 // indirect
github.com/BurntSushi/toml v1.2.0 // indirect
github.com/Djarvur/go-err113 v0.0.0-20210108212216-aea10b59be24 // indirect
github.com/GaijinEntertainment/go-exhaustruct/v2 v2.3.0 // indirect
github.com/Masterminds/semver v1.5.0 // indirect
github.com/OpenPeeDeeP/depguard v1.1.0 // indirect
github.com/alexkohler/prealloc v1.0.0 // indirect
github.com/alingse/asasalint v0.0.11 // indirect
github.com/ashanbrown/forbidigo v1.3.0 // indirect
github.com/ashanbrown/makezero v1.1.1 // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/bkielbasa/cyclop v1.2.0 // indirect
github.com/blizzy78/varnamelen v0.8.0 // indirect
github.com/bombsimon/wsl/v3 v3.3.0 // indirect
github.com/breml/bidichk v0.2.3 // indirect
github.com/breml/errchkjson v0.3.0 // indirect
github.com/butuzov/ireturn v0.1.1 // indirect
github.com/cespare/xxhash/v2 v2.1.2 // indirect
github.com/charithe/durationcheck v0.0.9 // indirect
github.com/chavacava/garif v0.0.0-20220630083739-93517212f375 // indirect
github.com/curioswitch/go-reassign v0.1.2 // indirect
github.com/daixiang0/gci v0.6.3 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/denis-tingaikin/go-header v0.4.3 // indirect
github.com/esimonov/ifshort v1.0.4 // indirect
github.com/ettle/strcase v0.1.1 // indirect
github.com/fatih/color v1.13.0 // indirect
github.com/fatih/structtag v1.2.0 // indirect
github.com/firefart/nonamedreturns v1.0.4 // indirect
github.com/fsnotify/fsnotify v1.5.4 // indirect
github.com/fzipp/gocyclo v0.6.0 // indirect
github.com/go-critic/go-critic v0.6.4 // indirect
github.com/go-toolsmith/astcast v1.0.0 // indirect
github.com/go-toolsmith/astcopy v1.0.1 // indirect
github.com/go-toolsmith/astequal v1.0.2 // indirect
github.com/go-toolsmith/astfmt v1.0.0 // indirect
github.com/go-toolsmith/astp v1.0.0 // indirect
github.com/go-toolsmith/strparse v1.0.0 // indirect
github.com/go-toolsmith/typep v1.0.2 // indirect
github.com/go-xmlfmt/xmlfmt v0.0.0-20191208150333-d5b6f63a941b // indirect
github.com/gobwas/glob v0.2.3 // indirect
github.com/gofrs/flock v0.8.1 // indirect
github.com/golang/protobuf v1.5.2 // indirect
github.com/golangci/check v0.0.0-20180506172741-cfe4005ccda2 // indirect
github.com/golangci/dupl v0.0.0-20180902072040-3e9179ac440a // indirect
github.com/golangci/go-misc v0.0.0-20220329215616-d24fe342adfe // indirect
github.com/golangci/gofmt v0.0.0-20190930125516-244bba706f1a // indirect
github.com/golangci/lint-1 v0.0.0-20191013205115-297bf364a8e0 // indirect
github.com/golangci/maligned v0.0.0-20180506175553-b1d89398deca // indirect
github.com/golangci/misspell v0.3.5 // indirect
github.com/golangci/revgrep v0.0.0-20220804021717-745bb2f7c2e6 // indirect
github.com/golangci/unconvert v0.0.0-20180507085042-28b1c447d1f4 // indirect
github.com/google/go-cmp v0.5.8 // indirect
github.com/gordonklaus/ineffassign v0.0.0-20210914165742-4cc7213b9bc8 // indirect
github.com/gostaticanalysis/analysisutil v0.7.1 // indirect
github.com/gostaticanalysis/comment v1.4.2 // indirect
github.com/gostaticanalysis/forcetypeassert v0.1.0 // indirect
github.com/gostaticanalysis/nilerr v0.1.1 // indirect
github.com/hashicorp/errwrap v1.0.0 // indirect
github.com/hashicorp/go-multierror v1.1.1 // indirect
github.com/hashicorp/go-version v1.6.0 // indirect
github.com/hashicorp/hcl v1.0.0 // indirect
github.com/hexops/gotextdiff v1.0.3 // indirect
github.com/inconshreveable/mousetrap v1.0.0 // indirect
github.com/jgautheron/goconst v1.5.1 // indirect
github.com/jingyugao/rowserrcheck v1.1.1 // indirect
github.com/jirfag/go-printf-func-name v0.0.0-20200119135958-7558a9eaa5af // indirect
github.com/julz/importas v0.1.0 // indirect
github.com/kisielk/errcheck v1.6.2 // indirect
github.com/kisielk/gotool v1.0.0 // indirect
github.com/kulti/thelper v0.6.3 // indirect
github.com/kunwardeep/paralleltest v1.0.6 // indirect
github.com/kyoh86/exportloopref v0.1.8 // indirect
github.com/ldez/gomoddirectives v0.2.3 // indirect
github.com/ldez/tagliatelle v0.3.1 // indirect
github.com/leonklingele/grouper v1.1.0 // indirect
github.com/lufeee/execinquery v1.2.1 // indirect
github.com/magiconair/properties v1.8.6 // indirect
github.com/maratori/testpackage v1.1.0 // indirect
github.com/matoous/godox v0.0.0-20210227103229-6504466cf951 // indirect
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-isatty v0.0.16 // indirect
github.com/mattn/go-runewidth v0.0.9 // indirect
github.com/matttproud/golang_protobuf_extensions v1.0.1 // indirect
github.com/mbilski/exhaustivestruct v1.2.0 // indirect
github.com/mgechev/revive v1.2.3 // indirect
github.com/mitchellh/go-homedir v1.1.0 // indirect
github.com/mitchellh/mapstructure v1.5.0 // indirect
github.com/moricho/tparallel v0.2.1 // indirect
github.com/nakabonne/nestif v0.3.1 // indirect
github.com/nbutton23/zxcvbn-go v0.0.0-20210217022336-fa2cb2858354 // indirect
github.com/nishanths/exhaustive v0.8.1 // indirect
github.com/nishanths/predeclared v0.2.2 // indirect
github.com/olekukonko/tablewriter v0.0.5 // indirect
github.com/pelletier/go-toml v1.9.5 // indirect
github.com/pelletier/go-toml/v2 v2.0.2 // indirect
github.com/phayes/checkstyle v0.0.0-20170904204023-bfd46e6a821d // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/polyfloyd/go-errorlint v1.0.2 // indirect
github.com/prometheus/client_golang v1.12.1 // indirect
github.com/prometheus/client_model v0.2.0 // indirect
github.com/prometheus/common v0.32.1 // indirect
github.com/prometheus/procfs v0.7.3 // indirect
github.com/quasilyte/go-ruleguard v0.3.17 // indirect
github.com/quasilyte/gogrep v0.0.0-20220120141003-628d8b3623b5 // indirect
github.com/quasilyte/regex/syntax v0.0.0-20200407221936-30656e2c4a95 // indirect
github.com/quasilyte/stdinfo v0.0.0-20220114132959-f7386bf02567 // indirect
github.com/ryancurrah/gomodguard v1.2.4 // indirect
github.com/ryanrolds/sqlclosecheck v0.3.0 // indirect
github.com/sanposhiho/wastedassign/v2 v2.0.6 // indirect
github.com/sashamelentyev/interfacebloat v1.1.0 // indirect
github.com/sashamelentyev/usestdlibvars v1.13.0 // indirect
github.com/securego/gosec/v2 v2.13.1 // indirect
github.com/shazow/go-diff v0.0.0-20160112020656-b6b7b6733b8c // indirect
github.com/sirupsen/logrus v1.9.0 // indirect
github.com/sivchari/containedctx v1.0.2 // indirect
github.com/sivchari/nosnakecase v1.7.0 // indirect
github.com/sivchari/tenv v1.7.0 // indirect
github.com/sonatard/noctx v0.0.1 // indirect
github.com/sourcegraph/go-diff v0.6.1 // indirect
github.com/spf13/afero v1.8.2 // indirect
github.com/spf13/cast v1.5.0 // indirect
github.com/spf13/cobra v1.5.0 // indirect
github.com/spf13/jwalterweatherman v1.1.0 // indirect
github.com/spf13/pflag v1.0.5 // indirect
github.com/spf13/viper v1.12.0 // indirect
github.com/ssgreg/nlreturn/v2 v2.2.1 // indirect
github.com/stbenjam/no-sprintf-host-port v0.1.1 // indirect
github.com/stretchr/objx v0.4.0 // indirect
github.com/stretchr/testify v1.8.0 // indirect
github.com/subosito/gotenv v1.4.0 // indirect
github.com/sylvia7788/contextcheck v1.0.6 // indirect
github.com/tdakkota/asciicheck v0.1.1 // indirect
github.com/tetafro/godot v1.4.11 // indirect
github.com/timakin/bodyclose v0.0.0-20210704033933-f49887972144 // indirect
github.com/timonwong/logrlint v0.1.0 // indirect
github.com/tomarrell/wrapcheck/v2 v2.6.2 // indirect
github.com/tommy-muehle/go-mnd/v2 v2.5.0 // indirect
github.com/ultraware/funlen v0.0.3 // indirect
github.com/ultraware/whitespace v0.0.5 // indirect
github.com/uudashr/gocognit v1.0.6 // indirect
github.com/yagipy/maintidx v1.0.0 // indirect
github.com/yeya24/promlinter v0.2.0 // indirect
gitlab.com/bosi/decorder v0.2.3 // indirect
go.uber.org/atomic v1.7.0 // indirect
go.uber.org/multierr v1.6.0 // indirect
go.uber.org/zap v1.17.0 // indirect
golang.org/x/exp v0.0.0-20220722155223-a9213eeb770e // indirect
golang.org/x/exp/typeparams v0.0.0-20220613132600-b0d781184e0d // indirect
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4 // indirect
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4 // indirect
golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab // indirect
golang.org/x/text v0.3.7 // indirect
golang.org/x/tools v0.1.12 // indirect
google.golang.org/protobuf v1.28.0 // indirect
gopkg.in/ini.v1 v1.66.6 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
honnef.co/go/tools v0.3.3 // indirect
mvdan.cc/gofumpt v0.3.1 // indirect
mvdan.cc/interfacer v0.0.0-20180901003855-c20040233aed // indirect
mvdan.cc/lint v0.0.0-20170908181259-adc824a0674b // indirect
mvdan.cc/unparam v0.0.0-20220706161116-678bad134442 // indirect
)
require github.com/golangci/golangci-lint v1.40.1 // cmd/golangci-lint

File diff suppressed because it is too large Load Diff

View File

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

View File

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

View File

@@ -12,9 +12,9 @@ BRA="${GOBIN}/bra-v0.0.0-20200517080246-1e3013ecaff8"
DRONE="${GOBIN}/drone-v1.5.0"
GOLANGCI_LINT="${GOBIN}/golangci-lint-v1.49.0"
SWAGGER="${GOBIN}/swagger-v0.29.0"
SWAGGER="${GOBIN}/swagger-v0.30.2"
GOLANGCI_LINT="${GOBIN}/golangci-lint-v1.40.1"
WIRE="${GOBIN}/wire-v0.5.0"

View File

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

2484
.drone.yml

File diff suppressed because it is too large Load Diff

View File

@@ -1,7 +1,7 @@
{
"extends": ["@grafana/eslint-config"],
"root": true,
"plugins": ["@emotion", "lodash", "jest", "import", "jsx-a11y"],
"plugins": ["@emotion", "lodash", "jest", "import"],
"settings": {
"import/internal-regex": "^(app/)|(@grafana)",
"import/external-module-folders": ["node_modules", ".yarn"]
@@ -18,82 +18,7 @@
"newlines-between": "always",
"alphabetize": { "order": "asc" }
}
],
"no-restricted-imports": [
"warn",
{
"paths": [
{
"name": "react-redux",
"importNames": ["useDispatch", "useSelector"],
"message": "Please import from app/types instead."
}
]
}
],
// Use typescript's no-redeclare for compatibility with overrides
"no-redeclare": "off",
"@typescript-eslint/no-redeclare": ["error"],
// these are all the rules listed in the strict preset
// we should fix them one by one and mark them as errors
// once they're all fixed, we can remove them all and instead extend the strict preset
// with "extends": ["plugin:jsx-a11y/strict"]
"jsx-a11y/alt-text": "off",
"jsx-a11y/anchor-has-content": "error",
"jsx-a11y/anchor-is-valid": "off",
"jsx-a11y/aria-activedescendant-has-tabindex": "error",
"jsx-a11y/aria-props": "error",
"jsx-a11y/aria-proptypes": "error",
"jsx-a11y/aria-role": "off",
"jsx-a11y/aria-unsupported-elements": "error",
"jsx-a11y/autocomplete-valid": "error",
"jsx-a11y/click-events-have-key-events": "off",
"jsx-a11y/heading-has-content": "error",
"jsx-a11y/html-has-lang": "error",
"jsx-a11y/iframe-has-title": "off",
"jsx-a11y/img-redundant-alt": "off",
"jsx-a11y/interactive-supports-focus": [
"off",
{
"tabbable": [
"button",
"checkbox",
"link",
"progressbar",
"searchbox",
"slider",
"spinbutton",
"switch",
"textbox"
]
}
],
"jsx-a11y/label-has-associated-control": "off",
"jsx-a11y/media-has-caption": "error",
"jsx-a11y/mouse-events-have-key-events": "off",
"jsx-a11y/no-access-key": "error",
"jsx-a11y/no-autofocus": "off",
"jsx-a11y/no-distracting-elements": "error",
"jsx-a11y/no-interactive-element-to-noninteractive-role": "error",
"jsx-a11y/no-noninteractive-element-interactions": [
"off",
{
"body": ["onError", "onLoad"],
"iframe": ["onError", "onLoad"],
"img": ["onError", "onLoad"]
}
],
"jsx-a11y/no-noninteractive-element-to-interactive-role": "off",
"jsx-a11y/no-noninteractive-tabindex": "off",
"jsx-a11y/no-redundant-roles": "error",
"jsx-a11y/no-static-element-interactions": "off",
"jsx-a11y/role-has-required-aria-props": "off",
"jsx-a11y/role-supports-aria-props": "off",
"jsx-a11y/scope": "error",
"jsx-a11y/tabindex-no-positive": "off"
]
},
"overrides": [
{
@@ -110,13 +35,6 @@
"react/jsx-uses-react": "off",
"react/react-in-jsx-scope": "off"
}
},
{
"files": ["public/dashboards/scripted*.js"],
"rules": {
"no-redeclare": "error",
"@typescript-eslint/no-redeclare": "off"
}
}
]
}

65
.github/CODEOWNERS vendored
View File

@@ -11,27 +11,12 @@
# In each subsection folders are ordered first by depth, then alphabetically.
# This should make it easy to add new rules without breaking existing ones.
# Documentation
# Documentation owner: Jita Chatterjee
/docs/ @grafana/docs-squad
/contribute/ @grafana/docs-squad
/docs/sources/developers/plugins/ @grafana/docs-squad @grafana/plugins-platform-frontend @grafana/plugins-platform-backend
/docs/sources/developers/plugins/backend @grafana/docs-squad @grafana/plugins-platform-backend
# Administration, data sources, querying, release updates: Garrett Guillotte
# Set up, dashboards/visualization, best practices: Chris Moyer
# Alerting: Brenda Muir
/docs/sources/administration/ @gguillotte-grafana
/docs/sources/alerting @brendamuir
/docs/sources/best-practices/ @chri2547
/docs/sources/dashboards/ @chri2547
/docs/sources/datasources/ @gguillotte-grafana
/docs/sources/enterprise/ @gguillotte-grafana
/docs/sources/explore/ @gguillotte-grafana
/docs/sources/getting-started/ @chri2547
/docs/sources/old-alerting @brendamuir
/docs/sources/panels/ @chri2547
/docs/sources/release-notes/ @gguillotte-grafana
/docs/sources/visualization/ @chri2547
/docs/sources/whatsnew/ @gguillotte-grafana
/contribute/ @marcusolsson @grafana/docs-squad
/docs/sources/developers/plugins/ @marcusolsson @grafana/docs-squad @grafana/plugins-platform-frontend @grafana/plugins-platform-backend
/docs/sources/developers/plugins/backend @marcusolsson @grafana/docs-squad @grafana/plugins-platform-backend
/docs/sources/enterprise/ @osg-grafana @grafana/docs-squad
# Backend code
*.go @grafana/backend-platform
@@ -39,13 +24,6 @@ go.mod @grafana/backend-platform
go.sum @grafana/backend-platform
/.bingo @grafana/backend-platform
# Backend code, developers environment
/devenv/docker/blocks/auth @grafana/grafana-authnz-team
# Logs code, developers environment
/devenv/docker/blocks/loki* @grafana/observability-logs
/devenv/docker/blocks/elastic* @grafana/observability-logs
# Continuous Integration
.drone.yml @grafana/grafana-release-eng
.drone.star @grafana/grafana-release-eng
@@ -62,10 +40,10 @@ go.sum @grafana/backend-platform
/pkg/tsdb/influxdb @grafana/observability-metrics
/pkg/tsdb/elasticsearch @grafana/observability-logs
/pkg/tsdb/graphite @grafana/observability-metrics
/pkg/tsdb/jaeger @grafana/observability-traces-and-profiling
/pkg/tsdb/jaeger @grafana/observability-logs-and-traces
/pkg/tsdb/loki @grafana/observability-logs
/pkg/tsdb/zipkin @grafana/observability-traces-and-profiling
/pkg/tsdb/tempo @grafana/observability-traces-and-profiling
/pkg/tsdb/zipkin @grafana/observability-logs-and-traces
/pkg/tsdb/tempo @grafana/observability-logs-and-traces
# BI backend code
/pkg/tsdb/mysql @grafana/grafana-bi-squad
@@ -82,7 +60,7 @@ go.sum @grafana/backend-platform
/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
pkg/tsdb/testdatasource/sims/ @grafana/grafana-edge-squad
# Alerting
/pkg/services/ngalert @grafana/alerting-squad-backend
@@ -100,7 +78,6 @@ go.sum @grafana/backend-platform
/pkg/plugins @grafana/plugins-platform-backend
/pkg/services/datasourceproxy @grafana/plugins-platform-backend
/pkg/services/datasources @grafana/plugins-platform-backend
/pkg/plugins/pfs @grafana/plugins-platform-backend @grafana/grafana-as-code
# Dashboard previews / crawler (behind feature flag)
/pkg/services/thumbs @grafana/grafana-edge-squad
@@ -118,12 +95,11 @@ go.sum @grafana/backend-platform
/packages/grafana-ui/.storybook @grafana/plugins-platform-frontend
/packages/grafana-ui/src/components/DateTimePickers @grafana/grafana-bi-squad
/packages/grafana-ui/src/components/GraphNG @grafana/grafana-bi-squad
/packages/grafana-ui/src/components/Logs @grafana/observability-logs
/packages/grafana-ui/src/components/Table @grafana/grafana-bi-squad
/packages/grafana-ui/src/components/TimeSeries @grafana/grafana-bi-squad
/packages/grafana-ui/src/components/uPlot @grafana/grafana-bi-squad
/packages/grafana-ui/src/utils/storybook @grafana/plugins-platform-frontend
/packages/jaeger-ui-components/ @grafana/observability-traces-and-profiling
/packages/jaeger-ui-components/ @grafana/observability-logs-and-traces
/plugins-bundled @grafana/plugins-platform-frontend
# public folder
/public/app/core/components/TimePicker @grafana/grafana-bi-squad
@@ -142,8 +118,7 @@ go.sum @grafana/backend-platform
/public/app/plugins/panel/heatmap @grafana/grafana-bi-squad
/public/app/plugins/panel/histogram @grafana/grafana-bi-squad
/public/app/plugins/panel/logs @grafana/observability-logs
/public/app/plugins/panel/nodeGraph @grafana/observability-traces-and-profiling
/public/app/plugins/panel/traces @grafana/observability-traces-and-profiling
/public/app/plugins/panel/nodeGraph @grafana/observability-logs-and-traces
/public/app/plugins/panel/piechart @grafana/grafana-bi-squad
/public/app/plugins/panel/state-timeline @grafana/grafana-bi-squad
/public/app/plugins/panel/status-history @grafana/grafana-bi-squad
@@ -156,6 +131,8 @@ go.sum @grafana/backend-platform
/scripts/build/release-packages.sh @grafana/plugins-platform-frontend
/scripts/circle-release-next-packages.sh @grafana/plugins-platform-frontend
/scripts/ci-frontend-metrics.sh @grafana/user-essentials @grafana/plugins-platform-frontend @grafana/grafana-bi-squad
/scripts/ci-reference-docs-build.sh @grafana/plugins-platform-frontend
/scripts/ci-reference-docs-lint.sh @grafana/plugins-platform-frontend
/scripts/grunt @grafana/frontend-ops
/scripts/webpack @grafana/frontend-ops
/scripts/generate-a11y-report.sh @grafana/user-essentials
@@ -170,7 +147,7 @@ lerna.json @grafana/frontend-ops
.betterer.results @joshhunt
# @grafana/ui component documentation
*.mdx @jessover9000 @grafana/plugins-platform-frontend
*.mdx @marcusolsson @jessover9000 @grafana/plugins-platform-frontend
# Core datasources
/public/app/plugins/datasource/cloudwatch @grafana/aws-plugins
@@ -178,7 +155,7 @@ lerna.json @grafana/frontend-ops
/public/app/plugins/datasource/grafana-azure-monitor-datasource @grafana/cloud-provider-plugins
/public/app/plugins/datasource/graphite @grafana/observability-metrics
/public/app/plugins/datasource/influxdb @grafana/observability-metrics
/public/app/plugins/datasource/jaeger @grafana/observability-traces-and-profiling
/public/app/plugins/datasource/jaeger @grafana/observability-logs-and-traces
/public/app/plugins/datasource/loki @grafana/observability-logs
/public/app/plugins/datasource/mssql @grafana/grafana-bi-squad
/public/app/plugins/datasource/mysql @grafana/grafana-bi-squad
@@ -186,8 +163,8 @@ lerna.json @grafana/frontend-ops
/public/app/plugins/datasource/postgres @grafana/grafana-bi-squad
/public/app/plugins/datasource/prometheus @grafana/observability-metrics
/public/app/plugins/datasource/cloud-monitoring @grafana/cloud-provider-plugins
/public/app/plugins/datasource/zipkin @grafana/observability-traces-and-profiling
/public/app/plugins/datasource/tempo @grafana/observability-traces-and-profiling
/public/app/plugins/datasource/zipkin @grafana/observability-logs-and-traces
/public/app/plugins/datasource/tempo @grafana/observability-logs-and-traces
/public/app/plugins/datasource/alertmanager @grafana/alerting-squad
# Cloud middleware
@@ -206,11 +183,3 @@ lerna.json @grafana/frontend-ops
/pkg/services/oauthtoken @grafana/grafana-authnz-team
/pkg/services/teamguardian @grafana/grafana-authnz-team
/pkg/services/serviceaccounts @grafana/grafana-authnz-team
# Grafana Partnerships Team
/pkg/infra/httpclient/httpclientprovider/sigv4_middleware.go @grafana/grafana-partnerships-team
# Schema framework and code generation
/pkg/codegen @grafana/grafana-as-code
/pkg/framework/coremodel @grafana/grafana-as-code
/public/app/plugins/*gen.go @grafana/grafana-as-code

View File

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

View File

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

View File

@@ -16,7 +16,7 @@
"d3-scale-chromatic", // we should bump this once we move to esm modules
"execa", // we should bump this once we move to esm modules
"history", // we should bump this together with react-router-dom
"@mdx-js/react", // storybook peer-depends on its 1.x version, we should upgrade this when we upgrade storybook
"@mdx-js/react", // storybook peer-depends on it's 1.x version, we should upgrade this when we upgrade storybook
"monaco-editor", // due to us exposing this via @grafana/ui/CodeEditor's props bumping can break plugins
"node-fetch", // we should bump this once we move to esm modules
"react-hook-form", // due to us exposing these hooks via @grafana/ui form components bumping can break plugins

1
.github/teams.yml vendored
View File

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

View File

@@ -3,12 +3,12 @@ on:
workflow_dispatch:
inputs:
version:
description: 'Needs to match, exactly, the name of a milestone. The version to be released please respect: major.minor.patch or major.minor.patch-beta<number> format. example: 7.4.3 or 7.4.3-beta1'
required: true
default: '7.x.x'
workflow_call:
inputs:
version_call:
description: 'Needs to match, exactly, the name of a milestone. The version to be released please respect: major.minor.patch or major.minor.patch-beta<number> format. example: 7.4.3 or 7.4.3-beta1'
description: Needs to match, exactly, the name of a version
required: true
type: string
secrets:

View File

@@ -14,7 +14,7 @@ on:
jobs:
workflow-call:
uses: grafana/code-coverage/.github/workflows/code-coverage.yml@v0.1.11
uses: grafana/code-coverage/.github/workflows/code-coverage.yml@v0.1.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

@@ -12,8 +12,9 @@ jobs:
steps:
- uses: actions/checkout@v3
with:
with:
path: './pr'
- uses: actions/setup-node@v3
with:
node-version: 16.16.0
@@ -21,7 +22,7 @@ jobs:
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn config get cacheFolder)"
- name: Restore yarn cache
uses: actions/cache@v2
id: yarn-cache
@@ -30,18 +31,15 @@ jobs:
key: yarn-cache-folder-${{ hashFiles('**/yarn.lock', '.yarnrc.yml') }}
restore-keys: |
yarn-cache-folder-
- name: Install dependencies
run: yarn install --immutable
- name: Build packages
run: yarn packages:build
- name: Pack packages
run: yarn packages:pack --out ./%s.tgz
- name: Zip built tarballed packages
run: zip -r ./pr_built_packages.zip ./packages/**/*.tgz
- name: Zip built packages
run: zip -r ./pr_built_packages.zip ./packages/**/dist
- name: Upload build output as artifact
uses: actions/upload-artifact@v3
@@ -58,7 +56,7 @@ jobs:
steps:
- uses: actions/checkout@v3
with:
with:
path: './base'
ref: ${{ github.event.pull_request.base.ref }}
@@ -69,7 +67,7 @@ jobs:
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn config get cacheFolder)"
- name: Restore yarn cache
uses: actions/cache@v2
id: yarn-cache
@@ -78,18 +76,15 @@ jobs:
key: yarn-cache-folder-${{ hashFiles('**/yarn.lock', '.yarnrc.yml') }}
restore-keys: |
yarn-cache-folder-
- name: Install dependencies
run: yarn install --immutable
- name: Build packages
run: yarn packages:build
- name: Pack packages
run: yarn packages:pack --out ./%s.tgz
- name: Zip built tarballed packages
run: zip -r ./base_built_packages.zip ./packages/**/*.tgz
- name: Zip built packages
run: zip -r ./base_built_packages.zip ./packages/**/dist
- name: Upload build output as artifact
uses: actions/upload-artifact@v3
@@ -116,12 +111,12 @@ jobs:
uses: actions/download-artifact@v3
with:
name: buildBase
- name: Unzip artifact from pr
run: unzip -j pr_built_packages.zip -d ./pr && rm pr_built_packages.zip
run: unzip pr_built_packages.zip -d ./pr && rm pr_built_packages.zip
- name: Unzip artifact from base
run: unzip -j base_built_packages.zip -d ./base && rm base_built_packages.zip
run: unzip base_built_packages.zip -d ./base && rm base_built_packages.zip
- name: Get link for the Github Action job
id: job
@@ -133,7 +128,7 @@ jobs:
- name: Detect breaking changes
id: breaking-changes
run: ./scripts/check-breaking-changes.sh
run: ./scripts/check-breaking-changes.sh
env:
FORCE_COLOR: 3
GITHUB_JOB_LINK: ${{ steps.job.outputs.link }}
@@ -148,7 +143,7 @@ jobs:
with:
name: levitate
path: levitate/
- name: Exit
run: exit ${{ steps.breaking-changes.outputs.is_breaking }}
shell: bash

View File

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

View File

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

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

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

View File

@@ -3,7 +3,7 @@ name: publish_docs
on:
push:
branches:
- v9.2.x
- v9.1.x
paths:
- 'docs/sources/**'
- 'packages/grafana-*/**'
@@ -31,6 +31,7 @@ jobs:
restore-keys: |
yarn-
- run: yarn install --immutable
- run: ./scripts/ci-reference-docs-build.sh
- name: publish-to-git
uses: ./.github/actions/website-sync
id: publish

View File

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

View File

@@ -4,11 +4,11 @@ on:
inputs:
version:
required: true
description: 'Needs to match, exactly, the name of a milestone. The version to be released please respect: major.minor.patch or major.minor.patch-beta<number> format. example: 7.4.3 or 7.4.3-beta1'
description: Needs to match, exactly, the name of a milestone
workflow_call:
inputs:
version_call:
description: 'Needs to match, exactly, the name of a milestone. The version to be released please respect: major.minor.patch or major.minor.patch-beta<number> format. example: 7.4.3 or 7.4.3-beta1'
description: Needs to match, exactly, the name of a milestone
required: true
type: string
secrets:
@@ -35,9 +35,9 @@ jobs:
token: ${{ secrets.GH_BOT_ACCESS_TOKEN }}
metricsWriteAPIKey: ${{ secrets.GRAFANA_MISC_STATS_API_KEY }}
- name: Run update changelog (workflow invoked)
if: ${{ inputs.version != '' }}
if: ${{ inputs.version_call != '' }}
uses: ./actions/update-changelog
with:
version_call: ${{ inputs.version }}
version_call: ${{ inputs.version_call }}
token: ${{ secrets.token }}
metricsWriteAPIKey: ${{ secrets.metricsWriteAPIKey }}

14
.gitignore vendored
View File

@@ -40,8 +40,6 @@ tsconfig.tsbuildinfo
# Enterprise devenv
/devenv/docker/blocks/grafana-enterprise
/devenv/docker/blocks/saml-enterprise
# This is the new place of the block, but I leave the previous here for a while
/devenv/docker/blocks/auth/saml-enterprise
/tmp
tools/phantomjs/phantomjs
@@ -61,7 +59,6 @@ public/css/*.min.css
*.sublime-workspace
*.swp
.idea/
.fleet/
*.iml
*.tmp
.DS_Store
@@ -76,9 +73,7 @@ public/css/*.min.css
# devenv
/devenv/docker-compose.yaml
/devenv/docker-compose.override.yaml
/devenv/.env
/devenv/docker/blocks/tempo/tempo-data/
conf/custom.ini
/conf/provisioning/**/custom.yaml
@@ -130,13 +125,6 @@ pkg/cmd/grafana-server/__debug_bin
/packages/**/compiled
/packages/**/.rpt2_cache
/packages/**/tsdoc-metadata.json
/packages/**/package.tgz
/packages/grafana-toolkit/sass
## CI places the packages in a different location
/npm-artifacts/*.tgz
# Ignore frontend build manifest
manifest.json
# Ignore go local build dependencies
/scripts/go/bin/**
@@ -174,8 +162,6 @@ compilation-stats.json
!pkg/services/featuremgmt/toggles_gen.go
!pkg/coremodel/**/*_gen.go
!pkg/framework/**/*_gen.go
!pkg/plugins/pfs/**/*_gen.go
!public/app/plugins/**/*_gen.go
# Auto-generated internationalization files
public/locales/_build/

View File

@@ -1,48 +1,3 @@
var dashboardSettings = [
{
url: '${HOST}/d/O6f11TZWk/panel-tests-bar-gauge?orgId=1&editview=settings',
wait: 500,
rootElement: '.main-view',
threshold: 0,
},
{
url: '${HOST}/d/O6f11TZWk/panel-tests-bar-gauge?orgId=1&editview=annotations',
wait: 500,
rootElement: '.main-view',
threshold: 0,
},
{
url: '${HOST}/d/O6f11TZWk/panel-tests-bar-gauge?orgId=1&editview=templating',
wait: 500,
rootElement: '.main-view',
threshold: 0,
},
{
url: '${HOST}/d/O6f11TZWk/panel-tests-bar-gauge?orgId=1&editview=links',
wait: 500,
rootElement: '.main-view',
threshold: 0,
},
{
url: '${HOST}/d/O6f11TZWk/panel-tests-bar-gauge?orgId=1&editview=versions',
wait: 500,
rootElement: '.main-view',
threshold: 0,
},
{
url: '${HOST}/d/O6f11TZWk/panel-tests-bar-gauge?orgId=1&editview=permissions',
wait: 500,
rootElement: '.main-view',
threshold: 9,
},
{
url: '${HOST}/d/O6f11TZWk/panel-tests-bar-gauge?orgId=1&editview=dashboard_json',
wait: 500,
rootElement: '.main-view',
threshold: 2,
},
];
var config = {
defaults: {
concurrency: 1,
@@ -88,7 +43,12 @@ var config = {
rootElement: '.main-view',
threshold: 0,
},
...dashboardSettings,
{
url: '${HOST}/d/O6f11TZWk/panel-tests-bar-gauge?orgId=1&editview=settings',
wait: 500,
rootElement: '.main-view',
threshold: 0,
},
{
url: '${HOST}/?orgId=1&search=open',
wait: 500,
@@ -101,7 +61,7 @@ var config = {
rootElement: '.main-view',
// the unified alerting promotion alert's content contrast is too low
// see https://github.com/grafana/grafana/pull/41829
threshold: 5,
threshold: 4,
},
{
url: '${HOST}/datasources',

View File

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

View File

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

File diff suppressed because one or more lines are too long

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -3,40 +3,37 @@ enableTelemetry: false
nodeLinker: pnp
packageExtensions:
"@mdx-js/loader@1.6.22":
'@mdx-js/loader@1.6.22':
peerDependencies:
react: 17.0.1
"@npmcli/run-script@4.1.3":
dependencies:
which: ^2.0.2
"@storybook/addon-docs@6.4.21":
'@storybook/addon-docs@6.4.21':
peerDependencies:
"@storybook/manager-webpack5": 6.4.21
"@storybook/addon-essentials@6.4.21":
'@storybook/manager-webpack5': 6.4.21
'@storybook/addon-essentials@6.4.21':
peerDependencies:
"@storybook/components": 6.4.21
"@storybook/core-events": 6.4.21
"@storybook/manager-webpack5": 6.4.21
"@storybook/theming": 6.4.21
"@storybook/core-server@6.4.21":
'@storybook/components': 6.4.21
'@storybook/core-events': 6.4.21
'@storybook/manager-webpack5': 6.4.21
'@storybook/theming': 6.4.21
'@storybook/core-server@6.4.21':
peerDependencies:
"@babel/core": ^7.0.0
"@storybook/core@6.4.21":
'@babel/core': ^7.0.0
'@storybook/core@6.4.21':
peerDependencies:
"@babel/core": ^7.0.0
"@storybook/manager-webpack5": 6.4.21
"@storybook/csf-tools@6.4.21":
'@babel/core': ^7.0.0
'@storybook/manager-webpack5': 6.4.21
'@storybook/csf-tools@6.4.21':
peerDependencies:
"@babel/core": ^7.0.0
"@storybook/react@6.4.21":
'@babel/core': ^7.0.0
'@storybook/react@6.4.21':
peerDependencies:
"@storybook/manager-webpack5": 6.4.21
'@storybook/manager-webpack5': 6.4.21
doctrine@3.0.0:
dependencies:
assert: 2.0.0
moveable@0.30.0:
dependencies:
"@daybrush/utils": 1.7.0
'@daybrush/utils': 1.7.0
framework-utils: ^1.1.0
rc-time-picker@3.7.3:
peerDependencies:
@@ -51,9 +48,9 @@ packageExtensions:
react-simple-compat: 1.2.2
react-compat-moveable@0.18.0:
dependencies:
"@egjs/agent": ^2.2.1
"@egjs/children-differ": ^1.0.1
"@scena/matrix": 1.1.1
'@egjs/agent': ^2.2.1
'@egjs/children-differ': ^1.0.1
'@scena/matrix': 1.1.1
css-to-mat: ^1.0.3
gesto: ^1.9.0
overlap-area: ^1.0.0
@@ -65,17 +62,20 @@ packageExtensions:
webpack: 4.41.5
react-icons@2.2.7:
peerDependencies:
prop-types: "*"
prop-types: '*'
react-resizable@3.0.4:
peerDependencies:
react-dom: 17.0.1
'@npmcli/run-script@4.1.3':
dependencies:
which: ^2.0.2
plugins:
- path: .yarn/plugins/@yarnpkg/plugin-typescript.cjs
spec: "@yarnpkg/plugin-typescript"
spec: '@yarnpkg/plugin-typescript'
- path: .yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs
spec: "@yarnpkg/plugin-interactive-tools"
spec: '@yarnpkg/plugin-interactive-tools'
- path: .yarn/plugins/@yarnpkg/plugin-outdated.cjs
spec: "https://mskelton.dev/yarn-outdated/v2"
spec: 'https://mskelton.dev/yarn-outdated/v2'
yarnPath: .yarn/releases/yarn-3.2.3.cjs
yarnPath: .yarn/releases/yarn-3.2.2.cjs

View File

@@ -1,332 +1,3 @@
<!-- 9.2.1 START -->
# 9.2.1 (2022-10-18)
### Features and enhancements
- **Alerting:** Improve notification policies created during migration. [#52071](https://github.com/grafana/grafana/pull/52071), [@JacobsonMT](https://github.com/JacobsonMT)
- **AzureAD:** Add option to force fetch the groups from the Graph API. [#56916](https://github.com/grafana/grafana/pull/56916), [@gamab](https://github.com/gamab)
- **AzureAD:** Add option to force fetch the groups from the Graph API (#56916). [#56947](https://github.com/grafana/grafana/pull/56947), [@gamab](https://github.com/gamab)
- **Docs:** Note end of release notes publication. [#57013](https://github.com/grafana/grafana/pull/57013), [@gguillotte-grafana](https://github.com/gguillotte-grafana)
- **Inspect:** Handle JSON tab crash when the provided object is too big to stringify. [#55939](https://github.com/grafana/grafana/pull/55939), [@TsotosA](https://github.com/TsotosA)
- **TablePanel:** Footer now updates values on column filtering. [#56354](https://github.com/grafana/grafana/pull/56354), [@mdvictor](https://github.com/mdvictor)
### Bug fixes
- **Alerting:** Fix email image embedding on Windows. [#56766](https://github.com/grafana/grafana/pull/56766), [@joeblubaugh](https://github.com/joeblubaugh)
- **Alerting:** Fix mathexp.NoData for ConditionsCmd. [#56816](https://github.com/grafana/grafana/pull/56816), [@grobinson-grafana](https://github.com/grobinson-grafana)
- **Legacy Alerting:** Fix duration calculation when testing a rule. [#56616](https://github.com/grafana/grafana/pull/56616), [@jorgelbg](https://github.com/jorgelbg)
- **Loki:** Propagate additional headers from Grafana to Loki when querying data. [#56896](https://github.com/grafana/grafana/pull/56896), [@alexweav](https://github.com/alexweav)
- **Search:** Sort alphabetically in the folder view, increase the limit of the folder search from 50 to 1000. [#57141](https://github.com/grafana/grafana/pull/57141), [@ArturWierzbicki](https://github.com/ArturWierzbicki)
- **TablePanel:** Fix last table column to be centered. [#56047](https://github.com/grafana/grafana/pull/56047), [@gitstart](https://github.com/gitstart)
### Plugin development fixes & changes
- **Grafana UI:** Export prop types for queryfield, modal and field components. [#57097](https://github.com/grafana/grafana/pull/57097), [@jackw](https://github.com/jackw)
- **Toolkit:** Fix `Cannot use import statement outside...` error in tests. [#57071](https://github.com/grafana/grafana/pull/57071), [@jackw](https://github.com/jackw)
<!-- 9.2.1 END -->
<!-- 9.2.0 START -->
# 9.2.0 (2022-10-11)
### Features and enhancements
- **Alerting:** Add Notification error feedback on contact points view. [#56225](https://github.com/grafana/grafana/pull/56225), [@soniaAguilarPeiron](https://github.com/soniaAguilarPeiron)
- **Alerting:** Allow created by to be manually set when there's no creator for silences. [#55952](https://github.com/grafana/grafana/pull/55952), [@gotjosh](https://github.com/gotjosh)
- **Alerting:** Expose info about notification delivery errors in a new /receivers endpoint. [#55429](https://github.com/grafana/grafana/pull/55429), [@santihernandezc](https://github.com/santihernandezc)
- **Alerting:** Update imported prometheus alertmanager version. [#56228](https://github.com/grafana/grafana/pull/56228), [@joeblubaugh](https://github.com/joeblubaugh)
- **Alerting:** Update imported prometheus alertmanager version. Backport (#56228). [#56430](https://github.com/grafana/grafana/pull/56430), [@joeblubaugh](https://github.com/joeblubaugh)
- **Alerting:** Write and Delete multiple alert instances. [#55350](https://github.com/grafana/grafana/pull/55350), [@joeblubaugh](https://github.com/joeblubaugh)
- **Core:** Implement aria attributes for query rows, improve a11y. [#55563](https://github.com/grafana/grafana/pull/55563), [@L-M-K-B](https://github.com/L-M-K-B)
- **Custom Branding:** Remove custom branding service. (Enterprise)
- **Custom branding:** Remove UI. (Enterprise)
- **DevEnv:** Adds docker block for clickhouse. [#55702](https://github.com/grafana/grafana/pull/55702), [@owensmallwood](https://github.com/owensmallwood)
- **Docker:** removes unneccesary use of edge repo. [#54567](https://github.com/grafana/grafana/pull/54567), [@xlson](https://github.com/xlson)
- **Explore:** Revert split pane resize feature. [#56310](https://github.com/grafana/grafana/pull/56310), [@Elfo404](https://github.com/Elfo404)
- **Frontend:** Make local storage items propagate to different tabs immediately. [#55810](https://github.com/grafana/grafana/pull/55810), [@oscarkilhed](https://github.com/oscarkilhed)
- **PublicDashboards:** Allow disabling an existent public dashboard if it …. [#55778](https://github.com/grafana/grafana/pull/55778), [@evictorero](https://github.com/evictorero)
- **QueryEditorRow:** Only pass error to query editor if panel is not in a loading state. [#56350](https://github.com/grafana/grafana/pull/56350), [@kevinwcyu](https://github.com/kevinwcyu)
- **Reports:** Refresh query variables on time range change. (Enterprise)
- **XYChart:** Beta release. [#55973](https://github.com/grafana/grafana/pull/55973), [@mdvictor](https://github.com/mdvictor)
- **[9.2.x] Alerting:** Start ticker only when scheduler starts (#56339). [#56418](https://github.com/grafana/grafana/pull/56418), [@yuri-tceretian](https://github.com/yuri-tceretian)
### Bug fixes
- **Alerting:** Fix pq: missing FROM-clause for table "a". [#56453](https://github.com/grafana/grafana/pull/56453), [@grobinson-grafana](https://github.com/grobinson-grafana)
- **AzureMonitor:** Correctly update subscriptions value in ARG editor. [#55860](https://github.com/grafana/grafana/pull/55860), [@aangelisc](https://github.com/aangelisc)
- **Chore:** Fix swagger validation failures. (Enterprise)
- **Chore:** Regenerate swagger specification and fix validation failures. [#55750](https://github.com/grafana/grafana/pull/55750), [@joshhunt](https://github.com/joshhunt)
- **Correlations:** Only return correlation for which both source and target datasources exist. [#55454](https://github.com/grafana/grafana/pull/55454), [@Elfo404](https://github.com/Elfo404)
- **Explore:** Prevent panes from disappearing when resizing window in split view. [#55696](https://github.com/grafana/grafana/pull/55696), [@gelicia](https://github.com/gelicia)
- **Links:** Fix opening links from different orgs on the same tab. [#55837](https://github.com/grafana/grafana/pull/55837), [@guicaulada](https://github.com/guicaulada)
- **LogContext:** Fix scroll position in upper context group. [#56370](https://github.com/grafana/grafana/pull/56370), [@svennergr](https://github.com/svennergr)
- **Logs:** Show copy button independently from context. [#55934](https://github.com/grafana/grafana/pull/55934), [@svennergr](https://github.com/svennergr)
- **Loki/Prometheus:** Fix adding of ad hoc filters when jumping from dashboard to explore. [#55915](https://github.com/grafana/grafana/pull/55915), [@ivanahuckova](https://github.com/ivanahuckova)
- **Loki:** Add support for range aggregations with by grouping. [#56184](https://github.com/grafana/grafana/pull/56184), [@ivanahuckova](https://github.com/ivanahuckova)
- **Loki:** Fix label-value escaping in context query. [#56614](https://github.com/grafana/grafana/pull/56614), [@svennergr](https://github.com/svennergr)
- **Loki:** Fix redundant escaping in adhoc filter with regex match. [#56447](https://github.com/grafana/grafana/pull/56447), [@ivanahuckova](https://github.com/ivanahuckova)
- **PanelEdit:** Fixes resize pane border and spacing issues. [#56190](https://github.com/grafana/grafana/pull/56190), [@torkelo](https://github.com/torkelo)
- **PublicDashboards:** Fix dashboard insights query when Public Dashboard feature is enabled. (Enterprise)
- **PublicDashboards:** Fix dashboard insights query when Public Dashboard feature is enabled. (Enterprise)
- **RBAC:** Redirect to /login when forceLogin is set. [#56469](https://github.com/grafana/grafana/pull/56469), [@sakjur](https://github.com/sakjur)
- **SAML:** Fix RelayState generation function. (Enterprise)
- **Security:** Fix CVE-2022-27664. [#55361](https://github.com/grafana/grafana/pull/55361), [@yong-jie-gong](https://github.com/yong-jie-gong)
- **StateTimeline:** Fix tooltip showing erroneously in shared crosshair dashboards. [#55809](https://github.com/grafana/grafana/pull/55809), [@mdvictor](https://github.com/mdvictor)
- **Tempo:** Fix unexpected trimming of leading zeroes in traceID. [#55167](https://github.com/grafana/grafana/pull/55167), [@hanjm](https://github.com/hanjm)
- **Tracing:** Fix bug where errors are not reported to OpenTelemetry. [#55925](https://github.com/grafana/grafana/pull/55925), [@sakjur](https://github.com/sakjur)
<!-- 9.2.0 END -->
<!-- 9.2.0-beta1 START -->
# 9.2.0-beta1 (2022-09-26)
### Features and enhancements
- **AccessControl:** Move GetCacheKey to SignedInUser. [#53591](https://github.com/grafana/grafana/pull/53591), [@mgyongyosi](https://github.com/mgyongyosi)
- **AccessControl:** Move GetCacheKey to SignedInUser. (Enterprise)
- **Admin:** Add support to configure default admin email. [#54363](https://github.com/grafana/grafana/pull/54363), [@mhuangwm](https://github.com/mhuangwm)
- **Admin:** Create/Edit Team/ServiceAccount UI changes. [#53889](https://github.com/grafana/grafana/pull/53889), [@mgyongyosi](https://github.com/mgyongyosi)
- **Alert list panel:** Add view mode "Stat". [#53281](https://github.com/grafana/grafana/pull/53281), [@peterholmberg](https://github.com/peterholmberg)
- **Alerting:** Add alert preview to cloud rules editor. [#54950](https://github.com/grafana/grafana/pull/54950), [@konrad147](https://github.com/konrad147)
- **Alerting:** Add new API endpoint GET /api/v1/ngalert. [#55134](https://github.com/grafana/grafana/pull/55134), [@yuri-tceretian](https://github.com/yuri-tceretian)
- **Alerting:** Add templates autocomplete. [#53655](https://github.com/grafana/grafana/pull/53655), [@konrad147](https://github.com/konrad147)
- **Alerting:** Adds support for editing group details for Grafana managed rules. [#53120](https://github.com/grafana/grafana/pull/53120), [@gillesdemey](https://github.com/gillesdemey)
- **Alerting:** Change default alert state to Error on execution error or timeout. [#55345](https://github.com/grafana/grafana/pull/55345), [@grobinson-grafana](https://github.com/grobinson-grafana)
- **Alerting:** Display alert's 'Created' time in local time instead of UTC. [#54414](https://github.com/grafana/grafana/pull/54414), [@mmusenbr](https://github.com/mmusenbr)
- **Alerting:** Improve Mimir AM interoperability with Grafana. [#53396](https://github.com/grafana/grafana/pull/53396), [@konrad147](https://github.com/konrad147)
- **Alerting:** Improve validation of query and expressions on rule submit. [#53258](https://github.com/grafana/grafana/pull/53258), [@yuri-tceretian](https://github.com/yuri-tceretian)
- **Alerting:** Read group details before saving. [#53586](https://github.com/grafana/grafana/pull/53586), [@gillesdemey](https://github.com/gillesdemey)
- **Alerting:** Resolve stale state. [#49352](https://github.com/grafana/grafana/pull/49352), [@yuri-tceretian](https://github.com/yuri-tceretian)
- **Alerting:** Support for re-ordering alert rules in a group. [#53318](https://github.com/grafana/grafana/pull/53318), [@gillesdemey](https://github.com/gillesdemey)
- **Alerting:** Update embedded Alertmanager v0.24. [#53555](https://github.com/grafana/grafana/pull/53555), [@yuri-tceretian](https://github.com/yuri-tceretian)
- **Alerting:** Update forking request handlers to use the same errors. [#52965](https://github.com/grafana/grafana/pull/52965), [@yuri-tceretian](https://github.com/yuri-tceretian)
- **Alerting:** Write and Delete multiple alert instances. [#52305](https://github.com/grafana/grafana/pull/52305), [@joeblubaugh](https://github.com/joeblubaugh)
- **Annotation:** Optionally allow storing longer annotation tags. [#54754](https://github.com/grafana/grafana/pull/54754), [@papagian](https://github.com/papagian)
- **Auth:** Add SAML common resolutions to cookie issues. [#55395](https://github.com/grafana/grafana/pull/55395), [@Jguer](https://github.com/Jguer)
- **Auth:** Add cli command users-manager for conflict resolution. [#52344](https://github.com/grafana/grafana/pull/52344), [@eleijonmarck](https://github.com/eleijonmarck)
- **Auth:** Add documentation on group overage claims in AzureAD. [#55389](https://github.com/grafana/grafana/pull/55389), [@Jguer](https://github.com/Jguer)
- **Auth:** Extend auth token errors with user ID. [#54633](https://github.com/grafana/grafana/pull/54633), [@IevaVasiljeva](https://github.com/IevaVasiljeva)
- **Auth:** Reduce allocs in permission map. [#55410](https://github.com/grafana/grafana/pull/55410), [@Jguer](https://github.com/Jguer)
- **Auth:** Restore legacy behavior and add deprecation notice for empty org role in oauth. [#55118](https://github.com/grafana/grafana/pull/55118), [@Jguer](https://github.com/Jguer)
- **AzureMonitor:** Automate retrieval of supported Metrics namespaces. [#53203](https://github.com/grafana/grafana/pull/53203), [@aangelisc](https://github.com/aangelisc)
- **Build:** Replace the file-loader loader with asset module in webpack config. [#53088](https://github.com/grafana/grafana/pull/53088), [@academo](https://github.com/academo)
- **Chore:** Group auth docker blocks. [#54274](https://github.com/grafana/grafana/pull/54274), [@linoman](https://github.com/linoman)
- **Chore:** Upgrade Go to 1.19.1. [#54902](https://github.com/grafana/grafana/pull/54902), [@sakjur](https://github.com/sakjur)
- **Cleanup:** Add traces to cleanup jobs. [#55465](https://github.com/grafana/grafana/pull/55465), [@sakjur](https://github.com/sakjur)
- **CloudMonitor:** Remove cloudMonitoringExperimentalUI feature flag. [#55054](https://github.com/grafana/grafana/pull/55054), [@asimpson](https://github.com/asimpson)
- **CloudWatch:** Add AWS/States metrics. [#55427](https://github.com/grafana/grafana/pull/55427), [@jangaraj](https://github.com/jangaraj)
- **CloudWatch:** Add missing AWS/ApiGateway metrics. [#53839](https://github.com/grafana/grafana/pull/53839), [@jangaraj](https://github.com/jangaraj)
- **CloudWatch:** Add missing AWS/Events metrics. [#53831](https://github.com/grafana/grafana/pull/53831), [@jangaraj](https://github.com/jangaraj)
- **CloudWatch:** Enable feature adoption tracking in the plugin. [#54299](https://github.com/grafana/grafana/pull/54299), [@sunker](https://github.com/sunker)
- **CloudWatch:** Log group variable should get all log groups. [#54062](https://github.com/grafana/grafana/pull/54062), [@iwysiu](https://github.com/iwysiu)
- **CloudWatch:** Refactoring - decouple logs and metrics in datasource file. [#55079](https://github.com/grafana/grafana/pull/55079), [@sunker](https://github.com/sunker)
- **Correlations:** Add GetCorrelation(s) HTTP APIs. [#52517](https://github.com/grafana/grafana/pull/52517), [@Elfo404](https://github.com/Elfo404)
- **Custom branding:** Add RBAC (early access). (Enterprise)
- **Custom branding:** Add preview for the settings (early access). (Enterprise)
- **Dashboard:** Support Variables in "Filter by Name" Transformation. [#51804](https://github.com/grafana/grafana/pull/51804), [@Kirchen99](https://github.com/Kirchen99)
- **DashboardQuery:** Expand query options. [#53998](https://github.com/grafana/grafana/pull/53998), [@ryantxu](https://github.com/ryantxu)
- **Docs:** Deprecating packages_api and removing it from our pipelines. [#54473](https://github.com/grafana/grafana/pull/54473), [@tolzhabayev](https://github.com/tolzhabayev)
- **Docs:** Update annotations API docs to include required field. [#52644](https://github.com/grafana/grafana/pull/52644), [@HarryTennent](https://github.com/HarryTennent)
- **Echo:** Add support for Google Analytics 4. [#55446](https://github.com/grafana/grafana/pull/55446), [@joshhunt](https://github.com/joshhunt)
- **Elasticsearch:** Respect time range in ad hoc filters. [#53874](https://github.com/grafana/grafana/pull/53874), [@gabor](https://github.com/gabor)
- **Explore:** Add Mixed Datasource. [#53429](https://github.com/grafana/grafana/pull/53429), [@gelicia](https://github.com/gelicia)
- **Explore:** Add resize to split view, with Min/Max button. [#54420](https://github.com/grafana/grafana/pull/54420), [@gelicia](https://github.com/gelicia)
- **Footer:** Add release notes url to version label. [#52909](https://github.com/grafana/grafana/pull/52909), [@kianelbo](https://github.com/kianelbo)
- **Geomap:** Add Africa, Australia, Oceania, South Asia, and East Asia as initial view options. [#55142](https://github.com/grafana/grafana/pull/55142), [@zuchka](https://github.com/zuchka)
- **Geomap:** Add dynamic initial view options. [#54419](https://github.com/grafana/grafana/pull/54419), [@drew08t](https://github.com/drew08t)
- **Grafana Backend:** Establish a database version support policy. [#54374](https://github.com/grafana/grafana/pull/54374), [@joeblubaugh](https://github.com/joeblubaugh)
- **Grafana UI:** Add implicit submit to TimeRangeForm for A11y. [#52647](https://github.com/grafana/grafana/pull/52647), [@matejkubinec](https://github.com/matejkubinec)
- **Grafana/ui:** Adds all unicons to IconName and script to generate types. [#53820](https://github.com/grafana/grafana/pull/53820), [@academo](https://github.com/academo)
- **GrafanaUI:** Add icon to links on Plugin configuration page. [#55581](https://github.com/grafana/grafana/pull/55581), [@leandro-deveikis](https://github.com/leandro-deveikis)
- **GrafanaUI:** Deprecate logs components. [#55364](https://github.com/grafana/grafana/pull/55364), [@gabor](https://github.com/gabor)
- **GraphPanel:** Panel Description box does not expand to fit markdown table. [#54238](https://github.com/grafana/grafana/pull/54238), [@gitstart](https://github.com/gitstart)
- **Icons:** Move unicons icons to the repository and generate the iconsBundle.js with nodejs. [#53766](https://github.com/grafana/grafana/pull/53766), [@academo](https://github.com/academo)
- **InfluxDB:** Remove browser ('direct' access) mode. [#53529](https://github.com/grafana/grafana/pull/53529), [@obetomuniz](https://github.com/obetomuniz)
- **JWT:** Add support for assigning org roles. [#54277](https://github.com/grafana/grafana/pull/54277), [@nrwiersma](https://github.com/nrwiersma)
- **JWT:** Allow conventional bearer token in Authorization header. [#54821](https://github.com/grafana/grafana/pull/54821), [@nrwiersma](https://github.com/nrwiersma)
- **Live:** Migrate to centrifuge-js v3 (new API and client protocol). [#51977](https://github.com/grafana/grafana/pull/51977), [@FZambia](https://github.com/FZambia)
- Load icons using webpack context instead of react-inlinesvg library. [#53675](https://github.com/grafana/grafana/pull/53675), [@academo](https://github.com/academo)
- **Login:** Allow basic users to reset password when LDAP or Auth Proxy is enabled. [#52331](https://github.com/grafana/grafana/pull/52331), [@krzysdabro](https://github.com/krzysdabro)
- **Login:** Remove single admin team restriction. [#54534](https://github.com/grafana/grafana/pull/54534), [@linoman](https://github.com/linoman)
- **Logs:** Relocate "show context" button, add copy line log button. [#50977](https://github.com/grafana/grafana/pull/50977), [@Seyaji](https://github.com/Seyaji)
- **Loki Query Variables:** Add support to select from existing labels. [#54625](https://github.com/grafana/grafana/pull/54625), [@matyax](https://github.com/matyax)
- **Loki/Prometheus:** Make sections in log/metrics browser resizable. [#54704](https://github.com/grafana/grafana/pull/54704), [@gwdawson](https://github.com/gwdawson)
- **Loki/Prometheus:** Remove beta tag from query builder. [#55150](https://github.com/grafana/grafana/pull/55150), [@ivanahuckova](https://github.com/ivanahuckova)
- **Loki:** Add validation to derived fields url field setting. [#53599](https://github.com/grafana/grafana/pull/53599), [@matyax](https://github.com/matyax)
- **Loki:** Create Variable Query Editor for Loki. [#54102](https://github.com/grafana/grafana/pull/54102), [@matyax](https://github.com/matyax)
- **MSSQL:** Migrate to React. [#51765](https://github.com/grafana/grafana/pull/51765), [@zoltanbedi](https://github.com/zoltanbedi)
- **Metrics:** Instrument requests not matching any handler as `notfound`. [#53949](https://github.com/grafana/grafana/pull/53949), [@bergquist](https://github.com/bergquist)
- **Navigation Bar:** Remove plugins link under Server Admin. [#54386](https://github.com/grafana/grafana/pull/54386), [@academo](https://github.com/academo)
- **Navigation:** Don't round app plugin icon images. [#54543](https://github.com/grafana/grafana/pull/54543), [@joshhunt](https://github.com/joshhunt)
- **OAuth:** Allow assigning Server Admin. [#54780](https://github.com/grafana/grafana/pull/54780), [@Jguer](https://github.com/Jguer)
- **Panel edit:** Run queries when time range changes in table view. [#53111](https://github.com/grafana/grafana/pull/53111), [@axelavargas](https://github.com/axelavargas)
- **Panels:** Add panel debug support helper. [#54678](https://github.com/grafana/grafana/pull/54678), [@ryantxu](https://github.com/ryantxu)
- **Playlists:** Migrate to UIDs and load dashboards in the frontend. [#54125](https://github.com/grafana/grafana/pull/54125), [@ryantxu](https://github.com/ryantxu)
- **Plugins:** Add feature toggles for long running queries. [#54349](https://github.com/grafana/grafana/pull/54349), [@kevinwcyu](https://github.com/kevinwcyu)
- **Plugins:** Add secure JSON fields to plugin setting DTO. [#55313](https://github.com/grafana/grafana/pull/55313), [@wbrowne](https://github.com/wbrowne)
- **Plugins:** Handle app plugin proxy routes per request. [#51835](https://github.com/grafana/grafana/pull/51835), [@marefr](https://github.com/marefr)
- **Plugins:** Use error plane for api/ds/query. [#54750](https://github.com/grafana/grafana/pull/54750), [@wbrowne](https://github.com/wbrowne)
- **Preferences:** Support setting any dashboard as home, not just the starred ones. [#54258](https://github.com/grafana/grafana/pull/54258), [@ryantxu](https://github.com/ryantxu)
- **Prometheus:** Add dashboard uid when tracing header in browsermode. [#53232](https://github.com/grafana/grafana/pull/53232), [@lpskdl](https://github.com/lpskdl)
- **Prometheus:** Throw error on direct access. [#50162](https://github.com/grafana/grafana/pull/50162), [@aocenas](https://github.com/aocenas)
- **Prometheus:** Upgrades http client to 1.30. [#53901](https://github.com/grafana/grafana/pull/53901), [@bergquist](https://github.com/bergquist)
- **Prometheus:** Upgrades the prometheus http client to 1.13. [#47707](https://github.com/grafana/grafana/pull/47707), [@yesoreyeram](https://github.com/yesoreyeram)
- **PublicDashboard:** Add RTK Query with loading and error state. Add MSW dependency for testing. [#55518](https://github.com/grafana/grafana/pull/55518), [@juanicabanas](https://github.com/juanicabanas)
- **PublicDashboards:** Add RBAC to secured endpoints. [#54544](https://github.com/grafana/grafana/pull/54544), [@evictorero](https://github.com/evictorero)
- **PublicDashboards:** Add link to public dashboards docs to sharing modal. [#55186](https://github.com/grafana/grafana/pull/55186), [@guicaulada](https://github.com/guicaulada)
- **PublicDashboards:** Disable form when user does not has permissions. [#54853](https://github.com/grafana/grafana/pull/54853), [@evictorero](https://github.com/evictorero)
- **PublicDashboards:** Dont support exemplars. [#54933](https://github.com/grafana/grafana/pull/54933), [@owensmallwood](https://github.com/owensmallwood)
- **PublicDashboards:** Ignore time range input and changes on public dashboard. [#55412](https://github.com/grafana/grafana/pull/55412), [@guicaulada](https://github.com/guicaulada)
- **PublicDashboards:** Log api layer errors and which datasources fail/succeed. [#55056](https://github.com/grafana/grafana/pull/55056), [@owensmallwood](https://github.com/owensmallwood)
- **PublicDashboards:** Render tag when dashboard meta changes in state. [#55414](https://github.com/grafana/grafana/pull/55414), [@owensmallwood](https://github.com/owensmallwood)
- **PublicDashboards:** Resolve interval for public dashboard data source. [#55489](https://github.com/grafana/grafana/pull/55489), [@guicaulada](https://github.com/guicaulada)
- **PublicDashboards:** Sanitize metadata from public dashboard queries. [#55269](https://github.com/grafana/grafana/pull/55269), [@guicaulada](https://github.com/guicaulada)
- **PublicDashboards:** UI improvements. [#55130](https://github.com/grafana/grafana/pull/55130), [@juanicabanas](https://github.com/juanicabanas)
- **Query editor:** Allow query editors to create new query. [#55028](https://github.com/grafana/grafana/pull/55028), [@ivanahuckova](https://github.com/ivanahuckova)
- **RBAC:** Add cache for oss rbac permissions. [#55098](https://github.com/grafana/grafana/pull/55098), [@kalleep](https://github.com/kalleep)
- **RBAC:** Add endpoints for reading and updating role assignments. (Enterprise)
- **RBAC:** Add permissions to install and configure plugins. [#51829](https://github.com/grafana/grafana/pull/51829), [@gamab](https://github.com/gamab)
- **RBAC:** Display indicator if a permission is inherited. [#54080](https://github.com/grafana/grafana/pull/54080), [@kalleep](https://github.com/kalleep)
- **RBAC:** Only display unique permissions in list. [#54074](https://github.com/grafana/grafana/pull/54074), [@kalleep](https://github.com/kalleep)
- **RBAC:** Refactor delegation check to reduce db queries. (Enterprise)
- **RBAC:** Validate scopes during role creation. (Enterprise)
- **Report:** Keep report data on edit page refresh. (Enterprise)
- **Reports:** Allow CSV only option. (Enterprise)
- **Reports:** Render steps inside ReportPage. (Enterprise)
- **SAML:** Account for all orgs in org_mapping. (Enterprise)
- **SAML:** Add option to skip org role sync. [#55230](https://github.com/grafana/grafana/pull/55230), [@gamab](https://github.com/gamab)
- **SAML:** Add option to skip org role sync. (Enterprise)
- **SAML:** Allow wildcard mapping to add user to all existing orgs. [#55628](https://github.com/grafana/grafana/pull/55628), [@gamab](https://github.com/gamab)
- **SAML:** Do not SAML SLO if user is not SAML authenticated. [#53418](https://github.com/grafana/grafana/pull/53418), [@Jguer](https://github.com/Jguer)
- **SAML:** Improve SAML login flow. (Enterprise)
- **SQL:** Migrate (MS/My/Postgres)SQL configuration pages from Angular to React. [#51891](https://github.com/grafana/grafana/pull/51891), [@oscarkilhed](https://github.com/oscarkilhed)
- **Search:** Migrated impressions to use dashboardUID. [#53090](https://github.com/grafana/grafana/pull/53090), [@lpskdl](https://github.com/lpskdl)
- **Secrets:** Add fallback to secrets kvstore plugin. [#54056](https://github.com/grafana/grafana/pull/54056), [@guicaulada](https://github.com/guicaulada)
- **Secrets:** Convert secret migration to a background service. [#54676](https://github.com/grafana/grafana/pull/54676), [@guicaulada](https://github.com/guicaulada)
- **Secrets:** Implement secrets manager plugin fallback store. [#54496](https://github.com/grafana/grafana/pull/54496), [@guicaulada](https://github.com/guicaulada)
- **Secrets:** Improve error handling for secrets manager plugin. [#54811](https://github.com/grafana/grafana/pull/54811), [@guicaulada](https://github.com/guicaulada)
- **SegmentInput:** Omit allowCustomValue and allowEmptyValue props. [#55352](https://github.com/grafana/grafana/pull/55352), [@timagixe](https://github.com/timagixe)
- **Status History Panel:** Show X-Axis Value in Tooltip. [#54563](https://github.com/grafana/grafana/pull/54563), [@gitstart](https://github.com/gitstart)
- **TeamSync:** Add description to group mapping. (Enterprise)
- **TeamSync:** Prevent team syncing out of orgs mapped by auth method. (Enterprise)
- **Teams:** Add TeamRolePicker to the Create and Edit Team pages. [#53775](https://github.com/grafana/grafana/pull/53775), [@mgyongyosi](https://github.com/mgyongyosi)
- **Tempo:** Set the default query type even if queryType was set to 'clear'. [#53887](https://github.com/grafana/grafana/pull/53887), [@CrypticSignal](https://github.com/CrypticSignal)
- **Tempo:** Wrap the autocomplete value for a tag in double quotes. [#55610](https://github.com/grafana/grafana/pull/55610), [@CrypticSignal](https://github.com/CrypticSignal)
- **TextPanel:** Support code formats. [#53850](https://github.com/grafana/grafana/pull/53850), [@ryantxu](https://github.com/ryantxu)
- **TimeRangePicker:** Absolute timeranges with timezone. [#53763](https://github.com/grafana/grafana/pull/53763), [@mdvictor](https://github.com/mdvictor)
- **TimeSeries:** Support for log scale and negative numbers. [#54812](https://github.com/grafana/grafana/pull/54812), [@leeoniya](https://github.com/leeoniya)
- **TopNav:** Panel edit changes. [#54746](https://github.com/grafana/grafana/pull/54746), [@torkelo](https://github.com/torkelo)
- **Tracing:** Add new [tracing.opentelemetry] custom_attributes config setting. [#54110](https://github.com/grafana/grafana/pull/54110), [@hairyhenderson](https://github.com/hairyhenderson)
- **Transformations:** Add support for an inner join transformation. [#53865](https://github.com/grafana/grafana/pull/53865), [@AlexKaracaoglu](https://github.com/AlexKaracaoglu)
- **Transformers:** Support inner vs outer join. [#53913](https://github.com/grafana/grafana/pull/53913), [@ryantxu](https://github.com/ryantxu)
- **User management:** Use HMAC-SHA256 to generate time limit codes (password reset tokens). [#42334](https://github.com/grafana/grafana/pull/42334), [@andreasgerstmayr](https://github.com/andreasgerstmayr)
- **UsersTable:** Display Disabled flag in Organizations' Users table. [#53656](https://github.com/grafana/grafana/pull/53656), [@mgyongyosi](https://github.com/mgyongyosi)
- **Various Panels:** Add ability to toggle legend with keyboard shortcut. (Enterprise)
### Bug fixes
- **Alerting:** AlertingProxy to elevate permissions for request forwarded to data proxy when RBAC enabled. [#53620](https://github.com/grafana/grafana/pull/53620), [@yuri-tceretian](https://github.com/yuri-tceretian)
- **Auth:** Allow admins to manually change external user's role if `oauth_skip_org_role_update_sync` or saml `skip_org_role_sync` is enabled. [#55182](https://github.com/grafana/grafana/pull/55182), [@Jguer](https://github.com/Jguer)
- **AuthNZ:** Security fixes for CVE-2022-35957 and CVE-2022-36062. [#55503](https://github.com/grafana/grafana/pull/55503), [@IevaVasiljeva](https://github.com/IevaVasiljeva)
- **ContextHandler:** Use standard library style middleware. [#54219](https://github.com/grafana/grafana/pull/54219), [@sakjur](https://github.com/sakjur)
- **ElasticSearch:** Fix lucene formatted variables being wrongly escaped. [#54981](https://github.com/grafana/grafana/pull/54981), [@svennergr](https://github.com/svennergr)
- **FIX:** RBAC prevents deleting empty snapshots. [#54385](https://github.com/grafana/grafana/pull/54385), [@gamab](https://github.com/gamab)
- **Fix:** Adjusting plugin.json schema regex. [#54515](https://github.com/grafana/grafana/pull/54515), [@tolzhabayev](https://github.com/tolzhabayev)
- **Fix:** Wrong swagger meta preventing spec generation. [#54181](https://github.com/grafana/grafana/pull/54181), [@leandro-deveikis](https://github.com/leandro-deveikis)
- **Histogram:** Fix panel hide when clicking on legend. [#53651](https://github.com/grafana/grafana/pull/53651), [@mdvictor](https://github.com/mdvictor)
- **Loki:** Hide loki sample queries from query inspector. [#55158](https://github.com/grafana/grafana/pull/55158), [@ivanahuckova](https://github.com/ivanahuckova)
- **Query Builder:** Fix spelling of "lose" in user visible message. [#53435](https://github.com/grafana/grafana/pull/53435), [@spazm](https://github.com/spazm)
- **RBAC:** Fix resolver issue on wildcard resulting in wrong status code for endpoints. [#54208](https://github.com/grafana/grafana/pull/54208), [@kalleep](https://github.com/kalleep)
- **Reports:** Fix starting value. (Enterprise)
- **StatPanel:** Add padding between horizontal name and value. [#55299](https://github.com/grafana/grafana/pull/55299), [@JoaoSilvaGrafana](https://github.com/JoaoSilvaGrafana)
- **TablePanel:** Fix FooterRow styling for Safari and Firefox. [#55543](https://github.com/grafana/grafana/pull/55543), [@mdvictor](https://github.com/mdvictor)
- **TablePanel:** Fix vertical scrollbar. [#53457](https://github.com/grafana/grafana/pull/53457), [@mdvictor](https://github.com/mdvictor)
- **Tempo:** Fix typo in the tooltip for "Limit". [#53750](https://github.com/grafana/grafana/pull/53750), [@CrypticSignal](https://github.com/CrypticSignal)
- **Transformations:** Fix clearing of transformation select fields. [#53916](https://github.com/grafana/grafana/pull/53916), [@AlexKaracaoglu](https://github.com/AlexKaracaoglu)
- **Various Panels:** Fix Single right-aligned y-axis hiding gridlines. [#54206](https://github.com/grafana/grafana/pull/54206), [@gitstart](https://github.com/gitstart)
### Breaking changes
Dashboards: Remove the ability to open dashboard settings while panel edit is still open. Issue [#54746](https://github.com/grafana/grafana/issues/54746)
In InfluxDB, browser access mode was deprecated in Grafana 8.0.0 and removed in 9.2.0. If you used this mode, please switch to server access mode on the datasource configuration page. Issue [#53529](https://github.com/grafana/grafana/issues/53529)
In Prometheus, browser access mode was deprecated in Grafana 7.4.0 and removed in 9.2.0. If you used this mode, please switch to server access mode on the datasource configuration page. Issue [#50162](https://github.com/grafana/grafana/issues/50162)
Password reset links sent before the upgrade will no longer work and have to be resent. Since the duration of those links are only two hours we decided to not support both token formats. Issue [#42334](https://github.com/grafana/grafana/issues/42334)
### Deprecations
Google Analytics 'Universal Analytics' is deprecated by Google in favor of Google Analytics 4. See [Google's deprecation notice](https://support.google.com/analytics/answer/10089681?hl=en) for more details. After July 2023, Grafana's Google Analytics 'Universal Analytics' integration will be removed, along with the `analytics.google_analytics_ua_id` server config property. Configure Google Analytics 4 using the `analytics.google_analytics_4_id` server config property.
Issue [#55446](https://github.com/grafana/grafana/issues/55446)
The following components and functions related to logs are deprecated in the `grafana-ui` package: `LogLabels`, `LogMessageAnsi`, `LogRows`, `getLogRowStyles`.
Issue [#55364](https://github.com/grafana/grafana/issues/55364)
### Plugin development fixes & changes
- **GrafanaUI:** Add required behavior to Inline Field. [#54867](https://github.com/grafana/grafana/pull/54867), [@gefgu](https://github.com/gefgu)
- **CustomScrollbar:** Add optional scroll indicators to `CustomScrollbar`. [#54705](https://github.com/grafana/grafana/pull/54705), [@ashharrison90](https://github.com/ashharrison90)
- **Build:** Introduce ESM and Treeshaking to NPM package builds. [#51517](https://github.com/grafana/grafana/pull/51517), [@jackw](https://github.com/jackw)
<!-- 9.1.7 START -->
# 9.1.7 (2022-10-04)
### Features and enhancements
- **Chore:** Upgrade Go version to 1.19.1 (backport). [#55733](https://github.com/grafana/grafana/pull/55733), [@sakjur](https://github.com/sakjur)
- **CloudWatch:** Add missing AWS/Prometheus metrics. [#54990](https://github.com/grafana/grafana/pull/54990), [@jangaraj](https://github.com/jangaraj)
- **Explore:** Add feature tracking events. [#54514](https://github.com/grafana/grafana/pull/54514), [@L-M-K-B](https://github.com/L-M-K-B)
- **Graphite:** Add error information to graphite queries tracing. [#55249](https://github.com/grafana/grafana/pull/55249), [@jesusvazquez](https://github.com/jesusvazquez)
- **Prometheus:** Restore FromAlert header. [#55255](https://github.com/grafana/grafana/pull/55255), [@kylebrandt](https://github.com/kylebrandt)
- **SAML:** Account for all orgs in org_mapping (#3855). (Enterprise)
- **Search:** Add search index configuration options. [#55525](https://github.com/grafana/grafana/pull/55525), [@ArturWierzbicki](https://github.com/ArturWierzbicki)
- **Thresholds:** Add option for dashed line style. [#55875](https://github.com/grafana/grafana/pull/55875), [@leeoniya](https://github.com/leeoniya)
### Bug fixes
- **Alerting:** Fix default query's data source when no default datasource specified. [#55435](https://github.com/grafana/grafana/pull/55435), [@konrad147](https://github.com/konrad147)
- **Alerting:** Fix mathexp.NoData cannot be reduced. [#55347](https://github.com/grafana/grafana/pull/55347), [@grobinson-grafana](https://github.com/grobinson-grafana)
- **Alerting:** Skip unsupported file types on provisioning. [#55573](https://github.com/grafana/grafana/pull/55573), [@JohnnyQQQQ](https://github.com/JohnnyQQQQ)
- **AzureMonitor:** Ensure resourceURI template variable is migrated. [#56095](https://github.com/grafana/grafana/pull/56095), [@aangelisc](https://github.com/aangelisc)
- **Dashboard:** Fix plugin dashboard save as button. [#55197](https://github.com/grafana/grafana/pull/55197), [@lpskdl](https://github.com/lpskdl)
- **Docs:** Fix decimals: auto docs for panel edit. [#55477](https://github.com/grafana/grafana/pull/55477), [@joshhunt](https://github.com/joshhunt)
- **Fix:** RBAC handle `error no resolver` found. [#55676](https://github.com/grafana/grafana/pull/55676), [@gamab](https://github.com/gamab)
- **Fix:** RBAC handle `error no resolver` found. (Enterprise)
- **LibraryPanelSearch:** Refactor and fix hyphen issue. [#55314](https://github.com/grafana/grafana/pull/55314), [@kaydelaney](https://github.com/kaydelaney)
- **Live:** Fix live streaming with `live-service-web-worker` feature flag enabled. [#55528](https://github.com/grafana/grafana/pull/55528), [@ArturWierzbicki](https://github.com/ArturWierzbicki)
- **QueryField:** Fix wrong cursor position on autocomplete. [#55576](https://github.com/grafana/grafana/pull/55576), [@svennergr](https://github.com/svennergr)
<!-- 9.1.7 END -->
<!-- 9.2.0-beta1 END -->
<!-- 9.1.6 START -->
# 9.1.6 (2022-09-20)
### Features and enhancements
- **Auth:** Trigger auth token cleanup job. (Enterprise)
- **DataSource:** Adding possibility to hide queries from the inspector. [#54892](https://github.com/grafana/grafana/pull/54892), [@mckn](https://github.com/mckn)
- **Inspect:** Hide Actions tab when it is empty. [#55272](https://github.com/grafana/grafana/pull/55272), [@ryantxu](https://github.com/ryantxu)
- **PanelMenu:** Remove hide legend action as it was showing on all panel types. [#54876](https://github.com/grafana/grafana/pull/54876), [@torkelo](https://github.com/torkelo)
- **Provisioning Contact points:** Support disableResolveMessage via YAML. [#54122](https://github.com/grafana/grafana/pull/54122), [@mmusenbr](https://github.com/mmusenbr)
- **PublicDashboards:** Support subpaths when generating pubdash url. [#55204](https://github.com/grafana/grafana/pull/55204), [@owensmallwood](https://github.com/owensmallwood)
### Bug fixes
- **Alerting:** Fix legacy migration crash when rule name is too long. [#55053](https://github.com/grafana/grafana/pull/55053), [@alexweav](https://github.com/alexweav)
- **Alerting:** Fix send resolved notifications. [#54793](https://github.com/grafana/grafana/pull/54793), [@grobinson-grafana](https://github.com/grobinson-grafana)
- **Azure Monitor:** Fix migration issue with MetricDefinitionsQuery template variable query types. [#55262](https://github.com/grafana/grafana/pull/55262), [@yaelleC](https://github.com/yaelleC)
- **Browse:** Hide dashboard actions if user does not have enough permission. [#55218](https://github.com/grafana/grafana/pull/55218), [@lpskdl](https://github.com/lpskdl)
- **ElasticSearch:** Fix dispatching queries at a wrong time. [#55225](https://github.com/grafana/grafana/pull/55225), [@svennergr](https://github.com/svennergr)
- **Panel:** Disable legends when showLegend is false prior to schema v37. [#55126](https://github.com/grafana/grafana/pull/55126), [@ivanortegaalba](https://github.com/ivanortegaalba)
- **Prometheus:** Fix metadata requests for browser access mode. [#55403](https://github.com/grafana/grafana/pull/55403), [@itsmylife](https://github.com/itsmylife)
- **Search:** Avoid requesting all dashboards when in Folder View. [#55169](https://github.com/grafana/grafana/pull/55169), [@JoaoSilvaGrafana](https://github.com/JoaoSilvaGrafana)
- **TablePanel/StatPanel:** Fix values not being visible when background transparent. [#55092](https://github.com/grafana/grafana/pull/55092), [@mdvictor](https://github.com/mdvictor)
<!-- 9.1.6 END -->
<!-- 9.1.5 START -->
# 9.1.5 (2022-09-12)
@@ -721,18 +392,6 @@ In Prometheus, browser access mode was deprecated in Grafana 7.4.0 and removed i
- **Grafana/UI:** Add ColorPickerInput component. [#52222](https://github.com/grafana/grafana/pull/52222), [@Clarity-89](https://github.com/Clarity-89)
- **Plugins:** Validate root URLs when signing private plugins via grafana-toolkit. [#51968](https://github.com/grafana/grafana/pull/51968), [@wbrowne](https://github.com/wbrowne)
<!-- 9.0.9 START -->
# 9.0.9 (2022-09-20)
### Bug fixes
- **AngularPanels:** Fixing changing angular panel options not taking having affect when coming back from panel edit. [#54834](https://github.com/grafana/grafana/pull/54834), [@grafanabot](https://github.com/grafanabot)
- **AuthNZ:** Security fixes for CVE-2022-35957 and CVE-2022-36062. [#55498](https://github.com/grafana/grafana/pull/55498), [@IevaVasiljeva](https://github.com/IevaVasiljeva)
- **FIX:** RBAC prevents deleting empty snapshots (#54385). [#54509](https://github.com/grafana/grafana/pull/54509), [@gamab](https://github.com/gamab)
<!-- 9.0.9 END -->
<!-- 9.0.8 START -->
# 9.0.8 (2022-08-30)
@@ -1465,20 +1124,6 @@ In the Loki data source, for consistency and performance reasons, we changed how
The dependency to [grafana/aws-sdk](https://github.com/grafana/grafana-aws-sdk-react) is moved from [grafana/ui](https://github.com/grafana/grafana/blob/main/packages/grafana-ui/package.json) to the plugin. This means that any plugin that use SIGV4 auth need to pass a SIGV4 editor component as a prop to the `DataSourceHttpSettings` component. Issue [#43559](https://github.com/grafana/grafana/issues/43559)
<!-- 8.5.13 START -->
# 8.5.13 (2022-09-20)
### Features and enhancements
- **Plugins:** Expose @emotion/react to plugins to prevent load failures. [#55297](https://github.com/grafana/grafana/pull/55297), [@jackw](https://github.com/jackw)
### Bug fixes
- **AuthNZ:** Security fixes for CVE-2022-35957 and CVE-2022-36062. [#55495](https://github.com/grafana/grafana/pull/55495), [@IevaVasiljeva](https://github.com/IevaVasiljeva)
<!-- 8.5.13 END -->
<!-- 8.5.11 START -->
# 8.5.11 (2022-08-30)

View File

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

View File

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

View File

@@ -21,8 +21,6 @@ pkg/coremodel/
pkg/framework/coremodel/
grafana-mixin/
cue/
public/img/icons/solid/
public/img/icons/unicons/
```
The following directories and their subdirectories are licensed under their original upstream licenses:

View File

@@ -42,27 +42,22 @@ $(MERGED_SPEC_TARGET): $(SPEC_TARGET) $(NGALERT_SPEC_TARGET) $(SWAGGER) ## Merge
# known conflicts DsPermissionType, AddApiKeyCommand, Json, Duration (identical models referenced by both specs)
$(SWAGGER) mixin $(SPEC_TARGET) $(NGALERT_SPEC_TARGET) --ignore-conflicts -o $(MERGED_SPEC_TARGET)
$(SPEC_TARGET): $(SWAGGER) ## Generate API Swagger specification
SWAGGER_GENERATE_EXTENSION=false $(SWAGGER) generate spec -m -w pkg/server -o $(SPEC_TARGET) \
--swagger-api-spec: $(SWAGGER) ## Generate API Swagger specification
SWAGGER_GENERATE_EXTENSION=false $(SWAGGER) generate spec -m -w pkg/server -o public/api-spec.json \
-x "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" \
-x "github.com/prometheus/alertmanager" \
-i pkg/api/swagger_tags.json
swagger-api-spec: gen-go $(SPEC_TARGET) $(MERGED_SPEC_TARGET) validate-api-spec
swagger-api-spec: gen-go --swagger-api-spec $(MERGED_SPEC_TARGET) validate-api-spec
validate-api-spec: $(MERGED_SPEC_TARGET) $(SWAGGER) ## Validate API spec
$(SWAGGER) validate $(<)
clean-api-spec:
rm $(SPEC_TARGET) $(MERGED_SPEC_TARGET) $(OAPI_SPEC_TARGET)
##@ OpenAPI 3
OAPI_SPEC_TARGET = public/openapi3.json
openapi3-gen: swagger-api-spec ## Generates OpenApi 3 specs from the Swagger 2 already generated
$(GO) run scripts/openapi3/openapi3conv.go $(MERGED_SPEC_TARGET) $(OAPI_SPEC_TARGET)
rm $(SPEC_TARGET) $(MERGED_SPEC_TARGET)
##@ Building
gen-cue: ## Do all CUE/Thema code generation
@echo "generate code from .cue files"
go generate ./pkg/framework/coremodel
@@ -134,7 +129,7 @@ test: test-go test-js ## Run all tests.
golangci-lint: $(GOLANGCI_LINT)
@echo "lint via golangci-lint"
$(GOLANGCI_LINT) run \
--config .golangci.toml \
--config ./conf/.golangci.toml \
$(GO_FILES)
lint-go: golangci-lint ## Run all code checks for backend. You can use GO_FILES to specify exact files to check
@@ -158,7 +153,7 @@ build-docker-full-ubuntu: ## Build Docker image based on Ubuntu for development.
##@ Services
# create docker-compose file with provided sources and start them
# example: make devenv sources=postgres,auth/openldap
# example: make devenv sources=postgres,openldap
ifeq ($(sources),)
devenv:
@printf 'You have to define sources for this command \nexample: make devenv sources=postgres,openldap\n'

38
api-extractor.json Normal file
View File

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

View File

@@ -13,13 +13,6 @@ ignore-generated-header = false
severity = "warning"
confidence = 3
[linters-settings.depguard]
list-type = "blacklist"
include-go-root = true
packages = ["io/ioutil"]
[[linters-settings.depguard.packages-with-error-message]]
"io/ioutil" = "Deprecated: As of Go 1.16, the same functionality is now provided by package io or package os, and those implementations should be preferred in new code. See the specific function documentation for details."
[linters-settings.gocritic]
enabled-checks = ["ruleguard"]
[linters-settings.gocritic.settings.ruleguard]
@@ -29,12 +22,13 @@ rules = "pkg/ruleguard.rules.go"
disable-all = true
enable = [
"bodyclose",
"deadcode",
"depguard",
"dogsled",
"errcheck",
# "gochecknoinits",
"goconst",
# "gocritic", # Temporarily disabled on 2022-09-09, running into weird bug "ruleguard: execution error: used Run() with an empty rule set; forgot to call Load() first?"
"gocritic",
"goimports",
"goprintffuncname",
"gosec",
@@ -46,10 +40,12 @@ enable = [
"rowserrcheck",
"exportloopref",
"staticcheck",
"structcheck",
"stylecheck",
"typecheck",
"unconvert",
"unused",
"varcheck",
"whitespace",
"gocyclo",
"exhaustive",
@@ -78,13 +74,6 @@ text = "ST1003"
linters = ["stylecheck"]
text = "ST1001"
# Enable when appropriate
# strings.Title has been deprecated since Go 1.18 and an alternative has been available since Go 1.0: The rule Title uses for word boundaries does not handle Unicode punctuation properly.
# Use golang.org/x/text/cases instead.
[[issues.exclude-rules]]
linters = ["staticcheck"]
text = "SA1019"
[[issues.exclude-rules]]
linters = ["gosec"]
text = "G108"

View File

@@ -210,10 +210,7 @@ check_for_updates = true
check_for_plugin_updates = true
# Google Analytics universal tracking code, only enabled if you specify an id here
google_analytics_ua_id =
# Google Analytics 4 tracking code, only enabled if you specify an id here
google_analytics_4_id =
google_analytics_ua_id =
# Google Tag Manager ID, only enabled if you specify an id here
google_tag_manager_id =
@@ -250,9 +247,6 @@ admin_user = admin
# default admin password, can be changed before first start of grafana, or in profile settings
admin_password = admin
# default admin email, created on startup
admin_email = admin@localhost
# used for signing
secret_key = SW2YcwTIb9zpOOhoPsMm
@@ -541,7 +535,6 @@ allowed_domains =
allowed_groups =
role_attribute_strict = false
allow_assign_grafana_admin = false
force_use_graph_api = false
#################################### Okta OAuth #######################
[auth.okta]
@@ -623,17 +616,13 @@ jwk_set_file =
cache_ttl = 60m
expected_claims = {}
key_file =
role_attribute_path =
role_attribute_strict = false
auto_sign_up = false
allow_assign_grafana_admin = false
#################################### Auth LDAP ###########################
[auth.ldap]
enabled = false
config_file = /etc/grafana/ldap.toml
allow_sign_up = true
skip_org_role_sync = false
# LDAP background sync (Enterprise only)
# At 1 am every day
@@ -671,7 +660,7 @@ managed_identity_client_id =
#################################### Role-based Access Control ###########
[rbac]
# If enabled, cache permissions in a in memory cache
# If enabled, cache permissions in a in memory cache (Enterprise only)
permission_cache = true
#################################### SMTP / Emailing #####################
@@ -947,10 +936,6 @@ max_annotations_to_keep =
# Configures the batch size for the annotation clean-up job. This setting is used for dashboard, API, and alert annotations.
cleanupjob_batchsize = 100
# Enforces the maximum allowed length of the tags for any newly introduced annotations. It can be between 500 and 4096 inclusive (which is the respective's column length). Default value is 500.
# Setting it to a higher value would impact performance therefore is not recommended.
tags_length = 500
[annotations.dashboard]
# Dashboard annotations means that annotations are associated with the dashboard they are created on.
@@ -1048,11 +1033,6 @@ zipkin_propagation = false
# Not disabling is the most common setting when using Zipkin elsewhere in your infrastructure.
disable_shared_zipkin_spans = false
[tracing.opentelemetry]
# attributes that will always be included in when creating new spans. ex (key1:value1,key2:value2)
custom_attributes =
[tracing.opentelemetry.jaeger]
# jaeger destination (ex http://localhost:14268/api/traces)
address =
@@ -1237,7 +1217,7 @@ lokiQueryBuilder = true
# Experimental Explore to Dashboard workflow
explore2Dashboard = true
# Command Palette
# Experimental Command Palette
commandPalette = true
# Use dynamic labels in CloudWatch datasource
@@ -1302,19 +1282,3 @@ scheduler_interval =
[storage]
# Allow uploading SVG files without sanitization.
allow_unsanitized_svg_upload = false
#################################### Search ################################################
[search]
# Defines the number of dashboards loaded at once in a batch during a full reindex.
# This is a temporary settings that might be removed in the future.
dashboard_loading_batch_size = 200
# Defines the frequency of a full search reindex.
# This is a temporary settings that might be removed in the future.
full_reindex_interval = 5m
# Defines the frequency of partial index updates based on recent changes such as dashboard updates.
# This is a temporary settings that might be removed in the future.
index_update_interval = 10s

View File

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

View File

@@ -56,7 +56,6 @@ apiVersion: 1
# # <string> state of the alert rule when the query execution
# # fails - possible values: "Error", "Alerting", "OK"
# # default = Alerting
# executionErrorState: Alerting
# # <duration, required> how long the alert condition should be breached before Firing. Before this time has elapsed, the alert is considered to be Pending
# for: 60s
# # <map<string, string>> map of strings to attach arbitrary custom data

View File

@@ -218,9 +218,6 @@
# Google Analytics universal tracking code, only enabled if you specify an id here
;google_analytics_ua_id =
# Google Analytics 4 tracking code, only enabled if you specify an id here
;google_analytics_4_id =
# Google Tag Manager ID, only enabled if you specify an id here
;google_tag_manager_id =
@@ -250,9 +247,6 @@
# default admin password, can be changed before first start of grafana, or in profile settings
;admin_password = admin
# default admin email, created on startup
;admin_email = admin@localhost
# used for signing
;secret_key = SW2YcwTIb9zpOOhoPsMm
@@ -612,19 +606,14 @@
;cache_ttl = 60m
;expected_claims = {"aud": ["foo", "bar"]}
;key_file = /path/to/key/file
;role_attribute_path =
;role_attribute_strict = false
;auto_sign_up = false
;url_login = false
;allow_assign_grafana_admin = false
#################################### Auth LDAP ##########################
[auth.ldap]
;enabled = false
;config_file = /etc/grafana/ldap.toml
;allow_sign_up = true
# prevent synchronizing ldap users organization roles
;skip_org_role_sync = false
# LDAP background sync (Enterprise only)
# At 1 am every day
@@ -916,10 +905,6 @@
# Configures the batch size for the annotation clean-up job. This setting is used for dashboard, API, and alert annotations.
;cleanupjob_batchsize = 100
# Enforces the maximum allowed length of the tags for any newly introduced annotations. It can be between 500 and 4096 inclusive (which is the respective's column length). Default value is 500.
# Setting it to a higher value would impact performance therefore is not recommended.
;tags_length = 500
[annotations.dashboard]
# Dashboard annotations means that annotations are associated with the dashboard they are created on.
@@ -1017,10 +1002,6 @@
# Not disabling is the most common setting when using Zipkin elsewhere in your infrastructure.
;disable_shared_zipkin_spans = false
[tracing.opentelemetry]
# attributes that will always be included in when creating new spans. ex (key1:value1,key2:value2)
;custom_attributes = key1:value1,key2:value2
[tracing.opentelemetry.jaeger]
# jaeger destination (ex http://localhost:14268/api/traces)
; address = http://localhost:14268/api/traces

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -1,10 +0,0 @@
files:
- source: /public/locales/en-US/messages.po
translation: /public/locales/%locale%/%original_file_name%
export_only_approved: true
pull_request_title: 'I18n: Crowdin sync'
pull_request_labels:
- area/internationalization
- no-changelog
- no-backport

View File

@@ -35,7 +35,7 @@ make devenv sources=influxdb,prometheus,elastic5
Some of the blocks support dynamic change of the image version used in the Docker file. The signature looks like this:
```bash
make devenv sources=postgres,auth/openldap,grafana postgres_version=9.2 grafana_version=6.7.0-beta1
make devenv sources=postgres,openldap,grafana postgres_version=9.2 grafana_version=6.7.0-beta1
```

View File

@@ -255,6 +255,7 @@ datasources:
label: "Zipkin traces"
description: "Related traces stored in Zipkin"
jsonData:
something: here
manageAlerts: false
derivedFields:
- name: "traceID"
@@ -284,5 +285,5 @@ datasources:
type: tempo
uid: gdev-tempo
access: proxy
url: http://localhost:3200
url: http://localhost:3101
editable: false

View File

@@ -61,6 +61,96 @@ datasources:
tsdbResolution: 1
tsdbVersion: 1
- name: gdev-elasticsearch-v2-metrics
type: elasticsearch
access: proxy
database: "[metrics-]YYYY.MM.DD"
url: http://elasticsearch:9200
jsonData:
interval: Daily
timeField: "@timestamp"
esVersion: 2
- name: gdev-elasticsearch-v2-logs
type: elasticsearch
access: proxy
database: "[logs-]YYYY.MM.DD"
url: http://elasticsearch:9200
jsonData:
interval: Daily
timeField: "@timestamp"
esVersion: 2
- name: gdev-elasticsearch-v5-metrics
type: elasticsearch
access: proxy
database: "[metrics-]YYYY.MM.DD"
url: http://elasticsearch5:9200
jsonData:
interval: Daily
timeField: "@timestamp"
esVersion: 5
- name: gdev-elasticsearch-v5-logs
type: elasticsearch
access: proxy
database: "[logs-]YYYY.MM.DD"
url: http://elasticsearch5:9200
jsonData:
interval: Daily
timeField: "@timestamp"
esVersion: 5
- name: gdev-elasticsearch-v56-metrics
type: elasticsearch
access: proxy
database: "[metrics-]YYYY.MM.DD"
url: http://elasticsearch5:9200
jsonData:
interval: Daily
timeField: "@timestamp"
esVersion: 56
- name: gdev-elasticsearch-v56-logs
type: elasticsearch
access: proxy
database: "[logs-]YYYY.MM.DD"
url: http://elasticsearch5:9200
jsonData:
interval: Daily
timeField: "@timestamp"
esVersion: 56
- name: gdev-elasticsearch-v6-metrics
type: elasticsearch
access: proxy
database: "[metrics-]YYYY.MM.DD"
url: http://elasticsearch6:9200
jsonData:
interval: Daily
timeField: "@timestamp"
esVersion: 60
- name: gdev-elasticsearch-v6-logs
type: elasticsearch
access: proxy
database: "[logs-]YYYY.MM.DD"
url: http://elasticsearch6:9200
jsonData:
interval: Daily
timeField: "@timestamp"
esVersion: 60
- name: gdev-elasticsearch-v6-filebeat
type: elasticsearch
access: proxy
database: "[filebeat-]YYYY.MM.DD"
url: http://elasticsearch6:9200
jsonData:
interval: Daily
timeField: "@timestamp"
esVersion: 60
- name: gdev-elasticsearch-v7-metrics
type: elasticsearch
access: proxy

View File

@@ -1,10 +1,9 @@
package dashboard_test
package dev_dashboards
import (
"encoding/json"
"io"
"io/fs"
"os"
"path/filepath"
"strings"
"testing"
@@ -17,12 +16,9 @@ import (
)
func TestDevenvDashboardValidity(t *testing.T) {
path, err := filepath.Abs("../../../devenv/dev-dashboards")
m, err := themaTestableDashboards()
require.NoError(t, err)
m, err := themaTestableDashboards(os.DirFS(path))
require.NoError(t, err)
cm, err := dashboard.New(cuectx.ProvideThemaLibrary())
cm, err := dashboard.ProvideCoremodel(cuectx.ProvideThemaLibrary())
require.NoError(t, err)
for path, b := range m {
@@ -45,8 +41,9 @@ func TestDevenvDashboardValidity(t *testing.T) {
}
}
func themaTestableDashboards(in fs.FS) (map[string][]byte, error) {
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 {
@@ -62,7 +59,7 @@ func themaTestableDashboards(in fs.FS) (map[string][]byte, error) {
if err != nil {
return err
}
defer f.Close() //nolint:errcheck
defer f.Close() // nolint: errcheck
b, err := io.ReadAll(f)
if err != nil {
@@ -70,10 +67,7 @@ func themaTestableDashboards(in fs.FS) (map[string][]byte, error) {
}
jtree := make(map[string]interface{})
err = json.Unmarshal(b, &jtree)
if err != nil {
return err
}
json.Unmarshal(b, &jtree)
if oldschemav, has := jtree["schemaVersion"]; !has || !(oldschemav.(float64) > dashboard.HandoffSchemaVersion-1) {
return nil
}

View File

@@ -25,6 +25,7 @@
"fiscalYearStartMonth": 0,
"graphTooltip": 0,
"id": 95,
"iteration": 1652465568602,
"links": [],
"liveNow": false,
"panels": [

View File

@@ -25,6 +25,7 @@
"fiscalYearStartMonth": 0,
"graphTooltip": 0,
"id": 85,
"iteration": 1652465607869,
"links": [],
"liveNow": false,
"panels": [

File diff suppressed because it is too large Load Diff

View File

@@ -49,7 +49,8 @@
"mode": "absolute",
"steps": [
{
"color": "green"
"color": "green",
"value": null
},
{
"color": "red",
@@ -150,7 +151,8 @@
"mode": "absolute",
"steps": [
{
"color": "green"
"color": "green",
"value": null
},
{
"color": "red",
@@ -236,7 +238,8 @@
"mode": "absolute",
"steps": [
{
"color": "green"
"color": "green",
"value": null
},
{
"color": "red",
@@ -357,4 +360,4 @@
"uid": "KVxZKdmVz",
"version": 10,
"weekStart": ""
}
}

View File

@@ -49,7 +49,8 @@
"mode": "absolute",
"steps": [
{
"color": "green"
"color": "green",
"value": null
},
{
"color": "red",
@@ -151,7 +152,8 @@
"mode": "absolute",
"steps": [
{
"color": "green"
"color": "green",
"value": null
},
{
"color": "red",
@@ -257,7 +259,8 @@
"mode": "absolute",
"steps": [
{
"color": "green"
"color": "green",
"value": null
},
{
"color": "red",
@@ -355,7 +358,8 @@
"mode": "absolute",
"steps": [
{
"color": "green"
"color": "green",
"value": null
},
{
"color": "red",
@@ -470,4 +474,4 @@
"uid": "2xuwrgV7z",
"version": 4,
"weekStart": ""
}
}

View File

@@ -3414,7 +3414,8 @@
"mode": "absolute",
"steps": [
{
"color": "green"
"color": "green",
"value": null
},
{
"color": "red",
@@ -3488,4 +3489,4 @@
"uid": "1KxMUdE7k",
"version": 5,
"weekStart": ""
}
}

View File

@@ -1,631 +0,0 @@
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": {
"type": "grafana",
"uid": "-- Grafana --"
},
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations & Alerts",
"target": {
"limit": 100,
"matchAny": false,
"tags": [],
"type": "dashboard"
},
"type": "dashboard"
}
]
},
"editable": true,
"fiscalYearStartMonth": 0,
"graphTooltip": 0,
"id": 1351,
"links": [],
"liveNow": false,
"panels": [
{
"collapsed": false,
"gridPos": {
"h": 1,
"w": 24,
"x": 0,
"y": 0
},
"id": 9,
"panels": [],
"title": "Join by time",
"type": "row"
},
{
"datasource": {
"type": "testdata",
"uid": "PD8C576611E62080A"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisCenteredZero": false,
"axisColorMode": "text",
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
"drawStyle": "line",
"fillOpacity": 0,
"gradientMode": "none",
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"lineInterpolation": "linear",
"lineWidth": 1,
"pointSize": 5,
"scaleDistribution": {
"type": "linear"
},
"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": 8,
"w": 12,
"x": 0,
"y": 1
},
"id": 11,
"options": {
"legend": {
"calcs": [],
"displayMode": "list",
"placement": "bottom",
"showLegend": true
},
"tooltip": {
"mode": "single",
"sort": "none"
}
},
"targets": [
{
"datasource": {
"type": "testdata",
"uid": "PD8C576611E62080A"
},
"refId": "A",
"scenarioId": "random_walk",
"seriesCount": 4
}
],
"title": "Timeseries data",
"type": "timeseries"
},
{
"datasource": {
"type": "datasource",
"uid": "-- Dashboard --"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"custom": {
"align": "auto",
"displayMode": "auto",
"inspect": false
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green"
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 1
},
"id": 13,
"options": {
"footer": {
"fields": "",
"reducer": [
"sum"
],
"show": false
},
"showHeader": true
},
"pluginVersion": "9.2.0-pre",
"targets": [
{
"datasource": {
"type": "datasource",
"uid": "-- Dashboard --"
},
"panelId": 11,
"refId": "A"
}
],
"title": "Same data (as a table)",
"type": "table"
},
{
"datasource": {
"type": "datasource",
"uid": "-- Dashboard --"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"custom": {
"align": "auto",
"displayMode": "auto",
"inspect": false
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green"
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 5,
"w": 24,
"x": 0,
"y": 9
},
"id": 16,
"options": {
"footer": {
"fields": "",
"reducer": [
"sum"
],
"show": false
},
"showHeader": true
},
"pluginVersion": "9.2.0-pre",
"targets": [
{
"datasource": {
"type": "datasource",
"uid": "-- Dashboard --"
},
"panelId": 11,
"refId": "A"
}
],
"title": "OUTER join on time (default)",
"transformations": [
{
"id": "joinByField",
"options": {}
}
],
"type": "table"
},
{
"collapsed": false,
"gridPos": {
"h": 1,
"w": 24,
"x": 0,
"y": 14
},
"id": 5,
"panels": [],
"title": "Join by string field",
"type": "row"
},
{
"datasource": {
"type": "testdata",
"uid": "PD8C576611E62080A"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"custom": {
"align": "auto",
"displayMode": "auto",
"inspect": false
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green"
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 15
},
"id": 2,
"options": {
"footer": {
"fields": "",
"reducer": [
"sum"
],
"show": false
},
"frameIndex": 0,
"showHeader": true
},
"pluginVersion": "9.2.0-pre",
"targets": [
{
"csvContent": "OrderID,CustomerID,Time\n100,A,10000\n101,B,20000\n102,C,30000",
"datasource": {
"type": "testdata",
"uid": "PD8C576611E62080A"
},
"refId": "Orders",
"scenarioId": "csv_content"
},
{
"csvContent": "CustomerID,Name,Country\nA,Customer A,USA\nB,Customer B,Germany\nC,Customer C,Spain\nD,Customer D,Canada",
"datasource": {
"type": "testdata",
"uid": "PD8C576611E62080A"
},
"hide": false,
"refId": "Customers",
"scenarioId": "csv_content"
}
],
"title": "Orders",
"transformations": [],
"type": "table"
},
{
"datasource": {
"type": "datasource",
"uid": "-- Dashboard --"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"custom": {
"align": "auto",
"displayMode": "auto",
"inspect": false
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green"
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 15
},
"id": 3,
"options": {
"footer": {
"fields": "",
"reducer": [
"sum"
],
"show": false
},
"frameIndex": 1,
"showHeader": true
},
"pluginVersion": "9.2.0-pre",
"targets": [
{
"datasource": {
"type": "datasource",
"uid": "-- Dashboard --"
},
"panelId": 2,
"refId": "A"
}
],
"title": "Customers",
"transformations": [],
"type": "table"
},
{
"datasource": {
"type": "datasource",
"uid": "-- Dashboard --"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"custom": {
"align": "auto",
"displayMode": "auto",
"inspect": false
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green"
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": [
{
"matcher": {
"id": "byName",
"options": "CustomerID"
},
"properties": [
{
"id": "custom.width",
"value": 101
}
]
},
{
"matcher": {
"id": "byName",
"options": "OrderID"
},
"properties": [
{
"id": "custom.width",
"value": 89
}
]
}
]
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 23
},
"id": 6,
"options": {
"footer": {
"fields": "",
"reducer": [
"sum"
],
"show": false
},
"frameIndex": 0,
"showHeader": true,
"sortBy": []
},
"pluginVersion": "9.2.0-pre",
"targets": [
{
"datasource": {
"type": "datasource",
"uid": "-- Dashboard --"
},
"panelId": 2,
"refId": "A"
}
],
"title": "OUTER join on CustomerID (keeps missing values)",
"transformations": [
{
"id": "joinByField",
"options": {
"byField": "CustomerID",
"mode": "outer"
}
}
],
"type": "table"
},
{
"datasource": {
"type": "datasource",
"uid": "-- Dashboard --"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"custom": {
"align": "auto",
"displayMode": "auto",
"inspect": false
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green"
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": [
{
"matcher": {
"id": "byName",
"options": "CustomerID"
},
"properties": [
{
"id": "custom.width",
"value": 101
}
]
},
{
"matcher": {
"id": "byName",
"options": "OrderID"
},
"properties": [
{
"id": "custom.width",
"value": 89
}
]
}
]
},
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 23
},
"id": 7,
"options": {
"footer": {
"fields": "",
"reducer": [
"sum"
],
"show": false
},
"frameIndex": 0,
"showHeader": true,
"sortBy": []
},
"pluginVersion": "9.2.0-pre",
"targets": [
{
"datasource": {
"type": "datasource",
"uid": "-- Dashboard --"
},
"panelId": 2,
"refId": "A"
}
],
"title": "INNER join on CustomerID ",
"transformations": [
{
"id": "joinByField",
"options": {
"byField": "CustomerID",
"mode": "inner"
}
}
],
"type": "table"
}
],
"schemaVersion": 37,
"style": "dark",
"tags": [
"gdev",
"transform"
],
"templating": {
"list": []
},
"time": {
"from": "now-6h",
"to": "now"
},
"timepicker": {},
"timezone": "",
"title": "Join by field",
"uid": "gw0K4rmVz",
"version": 6,
"weekStart": ""
}

View File

@@ -1,354 +0,0 @@
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": {
"type": "grafana",
"uid": "-- Grafana --"
},
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations & Alerts",
"target": {
"limit": 100,
"matchAny": false,
"tags": [],
"type": "dashboard"
},
"type": "dashboard"
}
]
},
"editable": true,
"fiscalYearStartMonth": 0,
"graphTooltip": 0,
"id": 1342,
"links": [],
"liveNow": false,
"panels": [
{
"datasource": {
"type": "testdata",
"uid": "PD8C576611E62080A"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green"
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 10,
"w": 12,
"x": 0,
"y": 0
},
"id": 2,
"maxDataPoints": 1,
"options": {
"colorMode": "none",
"graphMode": "none",
"justifyMode": "auto",
"orientation": "auto",
"reduceOptions": {
"calcs": [
"lastNotNull"
],
"fields": "",
"values": false
},
"textMode": "auto"
},
"pluginVersion": "9.2.0-pre",
"targets": [
{
"datasource": {
"type": "testdata",
"uid": "PD8C576611E62080A"
},
"labels": "site=A,measure=speed,state=CA",
"refId": "A",
"scenarioId": "random_walk"
},
{
"datasource": {
"type": "testdata",
"uid": "PD8C576611E62080A"
},
"hide": false,
"labels": "site=B,measure=speed,state=OR",
"refId": "B",
"scenarioId": "random_walk"
},
{
"datasource": {
"type": "testdata",
"uid": "PD8C576611E62080A"
},
"hide": false,
"labels": "site=B,measure=temp",
"refId": "C",
"scenarioId": "random_walk"
},
{
"datasource": {
"type": "testdata",
"uid": "PD8C576611E62080A"
},
"hide": false,
"labels": "site=A,measure=temp",
"refId": "D",
"scenarioId": "random_walk"
}
],
"title": "Labeled values",
"type": "stat"
},
{
"datasource": {
"type": "datasource",
"uid": "-- Dashboard --"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"custom": {
"align": "auto",
"displayMode": "auto",
"inspect": false
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green"
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 10,
"w": 12,
"x": 12,
"y": 0
},
"id": 5,
"maxDataPoints": 1,
"options": {
"footer": {
"fields": "",
"reducer": [
"sum"
],
"show": false
},
"frameIndex": 2,
"showHeader": true
},
"pluginVersion": "9.2.0-pre",
"targets": [
{
"datasource": {
"type": "datasource",
"uid": "-- Dashboard --"
},
"panelId": 2,
"refId": "A"
}
],
"title": "Same values... in a table",
"transformations": [],
"type": "table"
},
{
"datasource": {
"type": "datasource",
"uid": "-- Dashboard --"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"custom": {
"align": "auto",
"displayMode": "auto",
"inspect": false
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green"
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 10
},
"id": 4,
"maxDataPoints": 1,
"options": {
"footer": {
"fields": "",
"reducer": [
"sum"
],
"show": false
},
"showHeader": true
},
"pluginVersion": "9.2.0-pre",
"targets": [
{
"datasource": {
"type": "datasource",
"uid": "-- Dashboard --"
},
"panelId": 2,
"refId": "A"
}
],
"title": "Join by site",
"transformations": [
{
"id": "joinByLabels",
"options": {
"join": [
"site"
],
"value": "measure"
}
}
],
"type": "table"
},
{
"datasource": {
"type": "datasource",
"uid": "-- Dashboard --"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"custom": {
"align": "auto",
"displayMode": "auto",
"inspect": false
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green"
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 10
},
"id": 6,
"maxDataPoints": 1,
"options": {
"footer": {
"fields": "",
"reducer": [
"sum"
],
"show": false
},
"showHeader": true
},
"pluginVersion": "9.2.0-pre",
"targets": [
{
"datasource": {
"type": "datasource",
"uid": "-- Dashboard --"
},
"panelId": 2,
"refId": "A"
}
],
"title": "Join on all labels",
"transformations": [
{
"id": "joinByLabels",
"options": {
"value": "measure"
}
}
],
"type": "table"
}
],
"schemaVersion": 37,
"style": "dark",
"tags": [
"gdev",
"transform"
],
"templating": {
"list": []
},
"time": {
"from": "now-6h",
"to": "now"
},
"timepicker": {},
"timezone": "",
"title": "Join by labels",
"uid": "FVl-9CR4z",
"version": 10,
"weekStart": ""
}

View File

@@ -1,536 +0,0 @@
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": {
"type": "grafana",
"uid": "-- Grafana --"
},
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations & Alerts",
"target": {
"limit": 100,
"matchAny": false,
"tags": [],
"type": "dashboard"
},
"type": "dashboard"
}
]
},
"editable": true,
"fiscalYearStartMonth": 0,
"graphTooltip": 0,
"id": 1394,
"links": [],
"liveNow": false,
"panels": [
{
"datasource": {
"type": "testdata",
"uid": "PD8C576611E62080A"
},
"gridPos": {
"h": 3,
"w": 24,
"x": 0,
"y": 0
},
"id": 9,
"options": {
"content": "Dashboard queries allow re-using the same results from one panel in another panel context.\n\nThis dashboard shows a single panel that makes a real query and applies transformations. The other panels, all use the same results rather than make their own query requests.",
"mode": "markdown"
},
"pluginVersion": "9.2.0-pre",
"type": "text"
},
{
"datasource": {
"type": "testdata",
"uid": "PD8C576611E62080A"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"custom": {
"align": "auto",
"displayMode": "auto",
"inspect": false
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green"
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 18,
"w": 7,
"x": 0,
"y": 3
},
"id": 2,
"options": {
"footer": {
"fields": "",
"reducer": [
"sum"
],
"show": false
},
"showHeader": true
},
"pluginVersion": "9.2.0-pre",
"targets": [
{
"csvFileName": "flight_info_by_state.csv",
"datasource": {
"type": "testdata",
"uid": "PD8C576611E62080A"
},
"refId": "A",
"scenarioId": "csv_file"
},
{
"csvFileName": "population_by_state.csv",
"datasource": {
"type": "testdata",
"uid": "PD8C576611E62080A"
},
"refId": "B",
"scenarioId": "csv_file"
}
],
"title": "Raw data -- with outer join",
"transformations": [
{
"id": "seriesToColumns",
"options": {
"byField": "State",
"mode": "outer"
}
},
{
"id": "organize",
"options": {
"excludeByName": {
"1980 population_by_state.csv": true,
"2000 population_by_state.csv": true,
"DestLocation flight_info_by_state.csv": true,
"Lat flight_info_by_state.csv": true,
"Lng flight_info_by_state.csv": true,
"Price flight_info_by_state.csv": true
},
"indexByName": {},
"renameByName": {
"2020 population_by_state.csv": "2020 population",
"Count flight_info_by_state.csv": "Flight count",
"Price flight_info_by_state.csv": ""
}
}
}
],
"type": "table"
},
{
"datasource": {
"type": "datasource",
"uid": "-- Dashboard --"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"custom": {
"align": "auto",
"displayMode": "auto",
"inspect": false
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green"
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 9,
"w": 11,
"x": 7,
"y": 3
},
"id": 4,
"options": {
"footer": {
"fields": "",
"reducer": [
"sum"
],
"show": false
},
"showHeader": true
},
"pluginVersion": "9.2.0-pre",
"targets": [
{
"datasource": {
"type": "datasource",
"uid": "-- Dashboard --"
},
"panelId": 2,
"refId": "A"
}
],
"title": "Reused data (without transform)",
"type": "table"
},
{
"datasource": {
"type": "datasource",
"uid": "-- Dashboard --"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"custom": {
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
}
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green"
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 9,
"w": 6,
"x": 18,
"y": 3
},
"id": 5,
"options": {
"basemap": {
"config": {},
"name": "Layer 0",
"type": "default"
},
"controls": {
"mouseWheelZoom": true,
"showAttribution": true,
"showDebug": false,
"showMeasure": false,
"showScale": false,
"showZoom": true
},
"layers": [
{
"config": {
"showLegend": true,
"style": {
"color": {
"fixed": "dark-green"
},
"opacity": 0.4,
"rotation": {
"fixed": 0,
"max": 360,
"min": -360,
"mode": "mod"
},
"size": {
"field": "Flight count",
"fixed": 5,
"max": 15,
"min": 2
},
"symbol": {
"fixed": "img/icons/marker/circle.svg",
"mode": "fixed"
},
"textConfig": {
"fontSize": 12,
"offsetX": 0,
"offsetY": 0,
"textAlign": "center",
"textBaseline": "middle"
}
}
},
"location": {
"gazetteer": "public/gazetteer/usa-states.json",
"lookup": "State",
"mode": "lookup"
},
"name": "Flight count",
"tooltip": true,
"type": "markers"
}
],
"tooltip": {
"mode": "details"
},
"view": {
"id": "coords",
"lat": 35.70008,
"lon": -93.558296,
"zoom": 3.09
}
},
"pluginVersion": "9.2.0-pre",
"targets": [
{
"datasource": {
"type": "datasource",
"uid": "-- Dashboard --"
},
"panelId": 2,
"refId": "A",
"withTransforms": true
}
],
"title": "Reused data (without transform)",
"type": "geomap"
},
{
"datasource": {
"type": "datasource",
"uid": "-- Dashboard --"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"custom": {
"align": "auto",
"displayMode": "auto",
"inspect": false
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green"
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 9,
"w": 11,
"x": 7,
"y": 12
},
"id": 6,
"options": {
"footer": {
"fields": "",
"reducer": [
"sum"
],
"show": false
},
"showHeader": true
},
"pluginVersion": "9.2.0-pre",
"targets": [
{
"datasource": {
"type": "datasource",
"uid": "-- Dashboard --"
},
"panelId": 2,
"refId": "A",
"withTransforms": true
}
],
"title": "Reused data (with transform)",
"type": "table"
},
{
"datasource": {
"type": "datasource",
"uid": "-- Dashboard --"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"custom": {
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
}
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green"
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 9,
"w": 6,
"x": 18,
"y": 12
},
"id": 7,
"options": {
"basemap": {
"config": {},
"name": "Layer 0",
"type": "default"
},
"controls": {
"mouseWheelZoom": true,
"showAttribution": true,
"showDebug": false,
"showMeasure": false,
"showScale": false,
"showZoom": true
},
"layers": [
{
"config": {
"showLegend": true,
"style": {
"color": {
"fixed": "dark-green"
},
"opacity": 0.4,
"rotation": {
"fixed": 0,
"max": 360,
"min": -360,
"mode": "mod"
},
"size": {
"field": "2020 population",
"fixed": 5,
"max": 15,
"min": 2
},
"symbol": {
"fixed": "img/icons/marker/circle.svg",
"mode": "fixed"
},
"textConfig": {
"fontSize": 12,
"offsetX": 0,
"offsetY": 0,
"textAlign": "center",
"textBaseline": "middle"
}
}
},
"location": {
"gazetteer": "public/gazetteer/usa-states.json",
"lookup": "State",
"mode": "lookup"
},
"name": "2022 Population",
"tooltip": true,
"type": "markers"
}
],
"tooltip": {
"mode": "details"
},
"view": {
"id": "coords",
"lat": 35.70008,
"lon": -93.558296,
"zoom": 3.09
}
},
"pluginVersion": "9.2.0-pre",
"targets": [
{
"datasource": {
"type": "datasource",
"uid": "-- Dashboard --"
},
"panelId": 2,
"refId": "A",
"withTransforms": true
}
],
"title": "Reused data (with transform)",
"type": "geomap"
}
],
"schemaVersion": 37,
"style": "dark",
"tags": ["devenv"],
"templating": {
"list": []
},
"time": {
"from": "now-6h",
"to": "now"
},
"timepicker": {},
"timezone": "",
"title": "Reuse dashboard queries",
"uid": "fYGWTVW4k"
}

View File

@@ -3,13 +3,14 @@ package main
import (
"fmt"
"io"
"io/ioutil"
"log"
"net/http"
"strings"
)
func hello(w http.ResponseWriter, r *http.Request) {
body, err := io.ReadAll(r.Body)
body, err := ioutil.ReadAll(r.Body)
if err != nil {
return
}

View File

@@ -5,5 +5,5 @@
# root_url = %(protocol)s://%(domain)s:10081/grafana/
apacheproxy:
build: docker/blocks/auth/apache_proxy
build: docker/blocks/apache_proxy
network_mode: host

View File

@@ -5,6 +5,6 @@
# root_url = %(protocol)s://%(domain)s:10081/grafana/
apacheproxy:
build: docker/blocks/auth/apache_proxy_mac
build: docker/blocks/apache_proxy_mac
ports:
- "10081:10081"

View File

@@ -1,32 +0,0 @@
# Auth Docker blocks
This collection of Docker images will help create a developer environment to
interact with different Authentication Providers.
## Usage
Spin up a service with the following command from the base directory of this
repository.
```bash
make devenv=oauth
```
This will add the `oauth/docker-compose` block to the `docker-compose` file used
by the `devenv` target.
## Available Authentication Providers
- [apache_proxy](./apache_proxy)
- [apache_proxy_mac](./apache_proxy_mac)
- [freeipa](./freeipa)
- [jwt_proxy](./jwt_proxy)
- [oauth](./oauth)
- [nginx_proxy](./nginx_proxy)
- [nginx_proxy_mac](./nginx_proxy_mac)
- [oauth](./oauth)
- [openldap](./openldap)
- [openldap-mac](./openldap-mac)
- [openldap-multiple](./openldap-multiple)
- [prometheus_basic_auth_proxy](./prometheus_basic_auth_proxy)
- [saml](./saml)

View File

@@ -1,57 +0,0 @@
oauthkeycloakdb:
image: postgres:12.2
container_name: oauthkeycloakdb
environment:
POSTGRES_DB: keycloak
POSTGRES_USER: keycloak
POSTGRES_PASSWORD: password
volumes:
- ./docker/blocks/auth/jwt_proxy/cloak.sql:/docker-entrypoint-initdb.d/cloak.sql
restart: unless-stopped
oauthkeycloak:
image: quay.io/keycloak/keycloak:12.0.1
container_name: oauthkeycloak
environment:
DB_VENDOR: POSTGRES
DB_ADDR: oauthkeycloakdb
DB_DATABASE: keycloak
DB_USER: keycloak
DB_PASSWORD: password
KEYCLOAK_USER: admin
KEYCLOAK_PASSWORD: admin
PROXY_ADDRESS_FORWARDING: "true"
ports:
- 8087:8080
depends_on:
- oauthkeycloakdb
links:
- "oauthkeycloakdb:oauthkeycloakdb"
restart: unless-stopped
oauthproxy:
image: docker.io/bitnami/oauth2-proxy:7.3.0
container_name: oauthproxy
command: [
"--cookie-secret=yI-CWT5s4sBR2Zd0DDJJlTYc0aQ3jwGH15jYA18ZAQA=",
"--upstream=http://env.grafana.local:3000",
"--provider=keycloak",
"--client-id=grafana-oauth",
"--client-secret=d17b9ea9-bcb1-43d2-b132-d339e55872a8",
"--login-url=http://env.grafana.local:8087/auth/realms/grafana/protocol/openid-connect/auth",
"--redeem-url=http://env.grafana.local:8087/auth/realms/grafana/protocol/openid-connect/token",
"--profile-url=http://env.grafana.local:8087/auth/realms/grafana/protocol/openid-connect/userinfo",
"--validate-url=http://env.grafana.local:8087/auth/realms/grafana/protocol/openid-connect/userinfo",
"--cookie-secure=false",
"--http-address=0.0.0.0:8088",
"--redirect-url=http://env.grafana.local:8088/oauth2/callback",
"--pass-access-token=true",
"--email-domain=*",
]
depends_on:
- oauthkeycloak
extra_hosts:
- "env.grafana.local:host-gateway"
ports:
- 8088:8088
restart: unless-stopped

View File

@@ -1,117 +0,0 @@
# JWT PROXY BLOCK
## Devenv setup jwt auth
To launch the block, use the oauth source. Ex:
```bash
make devenv sources="auth/jwt_proxy"
```
Here is the conf you need to add to your configuration file (conf/custom.ini):
```ini
[auth]
signout_redirect_url = http://env.grafana.local:8088/oauth2/sign_out
[auth.jwt]
enabled = true
header_name = X-Forwarded-Access-Token
username_claim = login
email_claim = email
jwk_set_file = devenv/docker/blocks/auth/oauth/jwks.json
cache_ttl = 60m
expected_claims = {"iss": "http://env.grafana.local:8087/auth/realms/grafana", "azp": "grafana-oauth"}
auto_sign_up = true
role_attribute_path = contains(roles[*], 'grafanaadmin') && 'GrafanaAdmin' || contains(roles[*], 'admin') && 'Admin' || contains(roles[*], 'editor') && 'Editor' || 'Viewer'
role_attribute_strict = false
allow_assign_grafana_admin = true
```
Add *env.grafana.local* to /etc/hosts (Mac/Linux) or C:\Windows\System32\drivers\etc\hosts (Windows):
```ini
127.0.0.1 env.grafana.local
::1 env.grafana.local
```
Access Grafana through:
```sh
http://env.grafana.local:8088
```
## Devenv setup jwt auth iframe embedding
- Add previous configuration and next snippet to grafana.ini
```ini
[security]
allow_embedding = true
```
- Create dashboard and copy UID
- Clone [https://github.com/grafana/grafana-iframe-oauth-sample](https://github.com/grafana/grafana-iframe-oauth-sample)
- Change the dashboard URL in `grafana-iframe-oauth-sample/src/pages/restricted.tsx` to use the dashboard you created (keep URL query values)
- Start sample app from the `grafana-iframe-oauth-sample` folder with: `yarn start`
- Navigate to [http://localhost:4200](http://localhost:4200) and press restricted area
Note: You may need to grant the JWT user in grafana access to the datasources and the dashboard
## Backing up keycloak DB
In case you want to make changes to the devenv setup, you can dump keycloak's DB:
```bash
cd devenv;
docker-compose exec -T oauthkeycloakdb bash -c "pg_dump -U keycloak keycloak" > docker/blocks/auth/jwt_proxy/cloak.sql
```
## Connecting to keycloak:
- keycloak admin: http://localhost:8087
- keycloak admin login: admin:admin
- grafana jwt viewer login: jwt-viewer:grafana
- grafana jwt editor login: jwt-editor:grafana
- grafana jwt admin login: jwt-admin:grafana
# Troubleshooting
## Mac M1 Users
The new arm64 architecture does not build for the latest docker image of keycloak. Refer to https://github.com/docker/for-mac/issues/5310 for the issue to see if it resolved.
Until then you need to build the docker image locally and then run `devenv`.
1. Remove any lingering keycloak image
```sh
$ docker rmi $(docker images | grep 'keycloak')
```
1. Build keycloak image locally
```sh
$ ./docker-build-keycloak-m1-image.sh
```
1. Start from beginning of this readme
## Docker for Windows Users
### Docker for Windows with WSL 2
Port forwarding needs to be set up between the WSL 2 VM (which runs Grafana, in my case it is Ubuntu) and the host system. (https://docs.microsoft.com/en-us/windows/wsl/networking)
Run the following commands from an elevated PowerShell prompt:
1. Change the default WSL 2 distribution if necessary
```powershell
wsl --list # Find the default
wsl -s Ubuntu # Change the default
```
2. Open port 3000 between the Windows host and the WSL 2 VM
```powershell
$hostAddr = '0.0.0.0';
$wslHostAddr = wsl hostname -I;
iex "netsh interface portproxy delete v4tov4 listenport=3000 listenaddress=$hostAddr"
iex "netsh interface portproxy add v4tov4 listenport=3000 listenaddress=$hostAddr connectport=3000 connectaddress=$wslHostAddr"
```
Tested on Win 11 Home, Ubuntu and Docker for Windows v4.11.1 (84025).

View File

@@ -1,56 +0,0 @@
# OpenLDAP for MacOS Docker Block
This Docker block is an updated version from [OpenLDAP](../openldap/) block. This Docker block uses `osixia/openldap` image. The original Docker block was based of `debian:jessie` which is not available for Apple's ARM chip.
## Deployment
First build and deploy the `openldap` container.
```bash
make devenv sources=auth/openldap-mac
```
### Exposed ports
The container will expose port `389` and `636`.
### Background services
The `osixia/openldap` container will update the database with any `*.ldif` file changes inside `./prepopulate` and the `./modules` folder. Remember to rebuild the `devenv` to apply any changes.
## Grafana configuration changes
The following changes are needed at Grafana's configuration file.
```ini
[auth.ldap]
enabled = true
config_file = conf/ldap_dev.toml
```
The configuration between Grafana and the OpenLDAP container is configured at [./conf/ldap.toml](../../../../conf/ldap.toml).
## Available users and groups
- admins
- ldap-admin
- ldap-torkel
- backend
- ldap-carl
- ldap-torkel
- ldap-leo
- frontend
- ldap-torkel
- ldap-tobias
- ldap-daniel
- editors
- ldap-editors
- no groups
- ldap-viewer
## Groups & Users (POSIX)
- admins
- ldap-posix-admin
- no groups
- ldap-posix

View File

@@ -1,15 +0,0 @@
openldap-mac:
container_name: ldap
image: osixia/openldap
environment:
LDAP_ORGANISATION: grafana
LDAP_DOMAIN: grafana.org
LDAP_ADMIN_PASSWORD: grafana
LDAP_SEED_INTERNAL_LDIF_PATH: /tmp/smt/
ports:
- 389:389
- 636:636
restart: unless-stopped
volumes:
- ./docker/blocks/auth/openldap-mac/prepopulate/:/tmp/smt/
- ./docker/blocks/auth/openldap-mac/modules/:/tmp/smt/

View File

@@ -1,33 +0,0 @@
dn: cn=module,cn=config
cn: module
objectClass: olcModuleList
objectClass: top
olcModulePath: /usr/lib/ldap
olcModuleLoad: memberof.la
dn: olcOverlay={0}memberof,olcDatabase={1}hdb,cn=config
objectClass: olcConfig
objectClass: olcMemberOf
objectClass: olcOverlayConfig
objectClass: top
olcOverlay: memberof
olcMemberOfDangling: ignore
olcMemberOfRefInt: TRUE
olcMemberOfGroupOC: groupOfNames
olcMemberOfMemberAD: member
olcMemberOfMemberOfAD: memberOf
dn: cn=module,cn=config
cn: module
objectClass: olcModuleList
objectClass: top
olcModulePath: /usr/lib/ldap
olcModuleLoad: refint.la
dn: olcOverlay={1}refint,olcDatabase={1}hdb,cn=config
objectClass: olcConfig
objectClass: olcOverlayConfig
objectClass: olcRefintConfig
objectClass: top
olcOverlay: {1}refint
olcRefintAttribute: memberof member manager owner

View File

@@ -1,9 +0,0 @@
dn: ou=groups,dc=grafana,dc=org
ou: Groups
objectclass: top
objectclass: organizationalUnit
dn: ou=users,dc=grafana,dc=org
ou: Users
objectclass: top
objectclass: organizationalUnit

View File

@@ -1,108 +0,0 @@
# ldap-admin
dn: cn=ldap-admin,ou=users,dc=grafana,dc=org
mail: ldap-admin@grafana.com
userPassword: grafana
objectClass: person
objectClass: top
objectClass: inetOrgPerson
objectClass: organizationalPerson
sn: ldap-admin
cn: ldap-admin
dn: cn=ldap-editor,ou=users,dc=grafana,dc=org
mail: ldap-editor@grafana.com
userPassword: grafana
objectClass: person
objectClass: top
objectClass: inetOrgPerson
objectClass: organizationalPerson
sn: ldap-editor
cn: ldap-editor
dn: cn=ldap-viewer,ou=users,dc=grafana,dc=org
mail: ldap-viewer@grafana.com
userPassword: grafana
objectClass: person
objectClass: top
objectClass: inetOrgPerson
objectClass: organizationalPerson
sn: ldap-viewer
cn: ldap-viewer
dn: cn=ldap-carl,ou=users,dc=grafana,dc=org
mail: ldap-carl@grafana.com
userPassword: grafana
objectClass: person
objectClass: top
objectClass: inetOrgPerson
objectClass: organizationalPerson
sn: ldap-carl
cn: ldap-carl
dn: cn=ldap-daniel,ou=users,dc=grafana,dc=org
mail: ldap-daniel@grafana.com
userPassword: grafana
objectClass: person
objectClass: top
objectClass: inetOrgPerson
objectClass: organizationalPerson
sn: ldap-daniel
cn: ldap-daniel
dn: cn=ldap-leo,ou=users,dc=grafana,dc=org
mail: ldap-leo@grafana.com
userPassword: grafana
objectClass: person
objectClass: top
objectClass: inetOrgPerson
objectClass: organizationalPerson
sn: ldap-leo
cn: ldap-leo
dn: cn=ldap-tobias,ou=users,dc=grafana,dc=org
mail: ldap-tobias@grafana.com
userPassword: grafana
objectClass: person
objectClass: top
objectClass: inetOrgPerson
objectClass: organizationalPerson
sn: ldap-tobias
cn: ldap-tobias
dn: cn=ldap-torkel,ou=users,dc=grafana,dc=org
mail: ldap-torkel@grafana.com
userPassword: grafana
objectClass: person
objectClass: top
objectClass: inetOrgPerson
objectClass: organizationalPerson
sn: ldap-torkel
cn: ldap-torkel
# admin for posix group (without support for memberOf attribute)
dn: uid=ldap-posix-admin,ou=users,dc=grafana,dc=org
mail: ldap-posix-admin@grafana.com
userPassword: grafana
objectclass: top
objectclass: posixAccount
objectclass: inetOrgPerson
homedirectory: /home/ldap-posix-admin
sn: ldap-posix-admin
cn: ldap-posix-admin
uid: ldap-posix-admin
uidnumber: 1
gidnumber: 1
# user for posix group (without support for memberOf attribute)
dn: uid=ldap-posix,ou=users,dc=grafana,dc=org
mail: ldap-posix@grafana.com
userPassword: grafana
objectclass: top
objectclass: posixAccount
objectclass: inetOrgPerson
homedirectory: /home/ldap-posix
sn: ldap-posix
cn: ldap-posix
uid: ldap-posix
uidnumber: 2
gidnumber: 2

View File

@@ -1,43 +0,0 @@
dn: cn=admins,ou=groups,dc=grafana,dc=org
cn: admins
objectClass: groupOfNames
objectClass: top
member: cn=ldap-admin,ou=users,dc=grafana,dc=org
member: cn=ldap-torkel,ou=users,dc=grafana,dc=org
dn: cn=editors,ou=groups,dc=grafana,dc=org
cn: editors
objectClass: groupOfNames
member: cn=ldap-editor,ou=users,dc=grafana,dc=org
dn: cn=backend,ou=groups,dc=grafana,dc=org
cn: backend
objectClass: groupOfNames
member: cn=ldap-carl,ou=users,dc=grafana,dc=org
member: cn=ldap-leo,ou=users,dc=grafana,dc=org
member: cn=ldap-torkel,ou=users,dc=grafana,dc=org
dn: cn=frontend,ou=groups,dc=grafana,dc=org
cn: frontend
objectClass: groupOfNames
member: cn=ldap-torkel,ou=users,dc=grafana,dc=org
member: cn=ldap-daniel,ou=users,dc=grafana,dc=org
member: cn=ldap-leo,ou=users,dc=grafana,dc=org
# -- POSIX --
# posix admin group (without support for memberOf attribute)
dn: cn=posix-admins,ou=groups,dc=grafana,dc=org
cn: admins
objectClass: top
objectClass: posixGroup
gidNumber: 1
memberUid: ldap-posix-admin
# posix group (without support for memberOf attribute)
dn: cn=posix,ou=groups,dc=grafana,dc=org
cn: viewers
objectClass: top
objectClass: posixGroup
gidNumber: 2
memberUid: ldap-posix

View File

@@ -1 +1 @@
elastic_version=8.4.1
elastic_version=8.2.0

View File

@@ -80,9 +80,6 @@ async function elasticSetupIndexTemplate() {
location: {
type: 'geo_point',
},
shapes: {
type: 'nested',
}
},
},
},
@@ -111,15 +108,6 @@ function getRandomLogItem(counter, timestamp) {
level: chooseRandomElement(['info', 'info', 'error']),
// location: chooseRandomElement(LOCATIONS),
location: makeRandomPoint(),
shapes: Math.random() < 0.5 ? [
{"type": "triangle"},
{"type": "square"},
] : [
{"type": "triangle"},
{"type": "triangle"},
{"type": "triangle"},
{"type": "square"},
],
};
}

View File

@@ -0,0 +1,42 @@
# You need to run 'sysctl -w vm.max_map_count=262144' on the host machine
elasticsearch7:
image: docker.elastic.co/elasticsearch/elasticsearch-oss:7.10.2
command: elasticsearch -E "discovery.type=single-node"
ports:
- "12200:9200"
- "12300:9300"
fake-elastic7-data:
image: grafana/fake-data-gen
links:
- elasticsearch7
environment:
FD_SERVER: elasticsearch7
FD_DATASOURCE: elasticsearch7
FD_PORT: 9200
filebeat7:
image: docker.elastic.co/beats/filebeat-oss:7.17.0
command: filebeat -e -strict.perms=false
volumes:
- ./docker/blocks/elastic7/filebeat.yml:/usr/share/filebeat/filebeat.yml:ro
- /var/log:/var/log:ro
- ../data/log:/var/log/grafana:ro
metricbeat7:
image: docker.elastic.co/beats/metricbeat-oss:7.17.0
command: metricbeat -e -strict.perms=false
user: root
volumes:
- ./docker/blocks/elastic7/metricbeat.yml:/usr/share/metricbeat/metricbeat.yml:ro
- /var/run/docker.sock:/var/run/docker.sock:ro
kibana7:
image: docker.elastic.co/kibana/kibana-oss:7.0.0
ports:
- "5601:5601"
links:
- elasticsearch7
environment:
ELASTICSEARCH_HOSTS: http://elasticsearch7:9200

View File

@@ -0,0 +1,2 @@
script.inline: on
script.indexed: on

View File

@@ -409,7 +409,7 @@ filebeat.inputs:
enabled: true
paths:
- /var/log/grafana/grafana.log
include_lines: ['level=info']
include_lines: ['lvl=info']
fields:
app: grafana
level: info
@@ -417,7 +417,7 @@ filebeat.inputs:
enabled: true
paths:
- /var/log/grafana/grafana.log
include_lines: ['level=eror']
include_lines: ['lvl=eror']
fields:
app: grafana
level: error
@@ -425,7 +425,7 @@ filebeat.inputs:
enabled: true
paths:
- /var/log/grafana/grafana.log
include_lines: ['level=warn']
include_lines: ['lvl=warn']
fields:
app: grafana
level: warning
@@ -433,7 +433,7 @@ filebeat.inputs:
enabled: true
paths:
- /var/log/grafana/grafana.log
include_lines: ['level=dbug']
include_lines: ['lvl=dbug']
fields:
app: grafana
level: debug
@@ -1080,13 +1080,13 @@ filebeat.inputs:
#-------------------------- Elasticsearch output -------------------------------
output.elasticsearch:
# Boolean flag to enable or disable the output module.
enabled: true
#enabled: true
# Array of hosts to connect to.
# Scheme and port can be left out and will be set to the default (http and 9200)
# In case you specify and additional path, the scheme is required: http://localhost:9200/path
# IPv6 addresses should always be defined as: https://[2001:db8::1]:9200
hosts: ["elasticsearch:9200"]
hosts: ["elasticsearch7:9200"]
# Enabled ilm (beta) to use index lifecycle management instead daily indices.
#ilm.enabled: false

View File

@@ -28,7 +28,7 @@ processors:
- add_cloud_metadata: ~
output.elasticsearch:
hosts: ["elasticsearch:9200"]
hosts: ["elasticsearch7:9200"]
index: "metricbeat-%{+yyyy.MM.dd}"
setup.template.name: "metricbeat"

View File

@@ -0,0 +1,44 @@
# You need to run 'sysctl -w vm.max_map_count=262144' on the host machine
elasticsearch77:
image: docker.elastic.co/elasticsearch/elasticsearch:7.7.1
command: elasticsearch
environment:
- "discovery.type=single-node"
ports:
- "13200:9200"
- "13300:9300"
fake-elastic77-data:
image: grafana/fake-data-gen
links:
- elasticsearch77
environment:
FD_SERVER: elasticsearch77
FD_DATASOURCE: elasticsearch7
FD_PORT: 9200
filebeat77:
image: docker.elastic.co/beats/filebeat:7.7.1
command: filebeat -e -strict.perms=false
volumes:
- ./docker/blocks/elastic77/filebeat.yml:/usr/share/filebeat/filebeat.yml:ro
- /var/log:/var/log:ro
- ../data/log:/var/log/grafana:ro
metricbeat77:
image: docker.elastic.co/beats/metricbeat:7.7.1
command: metricbeat -e -strict.perms=false
user: root
volumes:
- ./docker/blocks/elastic77/metricbeat.yml:/usr/share/metricbeat/metricbeat.yml:ro
- /var/run/docker.sock:/var/run/docker.sock:ro
kibana77:
image: docker.elastic.co/kibana/kibana:7.7.1
ports:
- "5601:5601"
links:
- elasticsearch77
environment:
ELASTICSEARCH_HOSTS: http://elasticsearch77:9200

View File

@@ -0,0 +1,3 @@
script.inline: on
script.indexed: on
xpack.license.self_generated.type: basic

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,38 @@
metricbeat.config:
modules:
path: ${path.config}/modules.d/*.yml
# Reload module configs as they change:
reload.enabled: false
metricbeat.autodiscover:
providers:
- type: docker
hints.enabled: true
metricbeat.modules:
- module: docker
metricsets:
- "container"
- "cpu"
- "diskio"
- "healthcheck"
- "info"
#- "image"
- "memory"
- "network"
hosts: ["unix:///var/run/docker.sock"]
period: 10s
enabled: true
processors:
- add_cloud_metadata: ~
output.elasticsearch:
hosts: ["elasticsearch77:9200"]
index: "metricbeat-%{+yyyy.MM.dd}"
setup.template.name: "metricbeat"
setup.template.pattern: "metricbeat-*"
setup.template.settings:
index.number_of_shards: 1
index.number_of_replicas: 1

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