Compare commits

..

319 Commits

Author SHA1 Message Date
Grot (@grafanabot)
b57a137acd "Release: Updated versions in package to 8.2.5" (#41859) 2021-11-18 10:36:42 +01:00
Grot (@grafanabot)
45bb76bd00 Updated content based on Ivana's note. (#41848) (#41855)
(cherry picked from commit e59c3a34fe)

Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
2021-11-18 10:23:57 +01:00
Grot (@grafanabot)
0d2a255fcb Alerting: HA documentation formatting fixes (#41682) (#41708)
* Alerting: HA documentation formatting fixes

* don't change that line

(cherry picked from commit b39859bdfe)

Co-authored-by: gotjosh <josue@grafana.com>
2021-11-18 09:21:52 +01:00
Grot (@grafanabot)
16c589fe66 Docs: Add docs for caching timeouts (#39672) (#41852)
Co-authored-by: Stephanie Hingtgen <stephanie.hingtgen@grafana.com>
(cherry picked from commit c3f1cc6c75)

Co-authored-by: Todd Treece <360020+toddtreece@users.noreply.github.com>
2021-11-18 09:14:03 +01:00
Grot (@grafanabot)
574b804943 Doc: Removed reference to Hosted Grafana (#41843) (#41844)
* Removed extra word

* Removed another ref of hosted grafana.

(cherry picked from commit d3b513ab59)

Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
2021-11-17 20:14:39 -05:00
Grot (@grafanabot)
f512e93294 Transformers: ensure ISO 8601 date strings are not parsed in local TZ (#41835) (#41839)
(cherry picked from commit 6844cf57a0)

Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
2021-11-17 22:25:12 +01:00
Grot (@grafanabot)
995ec00121 Alerting: fix a bug where the metric in the evaluation string was not correctly populated (#41731) (#41793)
Instead of using the frame name as the series name, we now use the name of the series value column if the frame name is not set. Queries to some datasources may end up with an empty frame name, which leads to an empty series name. As the series name is used in the frontend to display which metrics were queried etc. it shouldn't be empty.

(cherry picked from commit 2319c52c85)

Co-authored-by: Jean-Philippe Quéméner <JohnnyQQQQ@users.noreply.github.com>
2021-11-17 11:34:51 +01:00
Grot (@grafanabot)
6ce29a7f8a Docs: Add guidelines for running grafana behind proxy on RPM-based Linux (#41710) (#41766)
* Docs: Add Centos guidelines for running grafana behind proxy

* Apply suggestions from code review

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

Co-authored-by: Sofia Papagiannaki <1632407+papagian@users.noreply.github.com>
2021-11-16 18:19:40 +01:00
Dimitris Sotirakis
7d5f1d74f0 Security Fix: Fine-grained access control enables organization admins to create/modify/delete user roles in other organization (#41705) 2021-11-15 17:10:55 +01:00
Dimitris Sotirakis
a4a108db2d [v8.2.x] Release Notes: Update Release Notes and Changelog for 8.2.4 security fix (#41692)
* 8.2.4: Update CHANGELOG.md and release-notes-8-2-4.md

* Update blog post link
2021-11-15 15:41:01 +01:00
Grot (@grafanabot)
5db2097ebd "Release: Updated versions in package to 8.2.4" (#41683) 2021-11-15 15:20:26 +02:00
Grot (@grafanabot)
12280faa2f Alerting: Document Grafana 8 High Availability setup (#41503) (#41655)
* Alerting: Document Grafana 8 High Availability setup

* Apply suggestions from code review

Co-authored-by: Yuriy Tseretyan <tceretian@gmail.com>

* Wordsmithing

* Apply suggestions from code review

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

* Address review feedback

* Apply suggestions from code review

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

* Update docs/sources/alerting/unified-alerting/high-availability.md

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

* address review feedback

* Prettier

Co-authored-by: Yuriy Tseretyan <tceretian@gmail.com>
Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
Co-authored-by: George Robinson <george.robinson@grafana.com>
(cherry picked from commit dfa14e9500)

Co-authored-by: gotjosh <josue@grafana.com>
2021-11-15 11:18:17 +00:00
Grot (@grafanabot)
20ef79b533 [v8.2.x] Tracing: Show correct tags for each span (#41629)
* Tracing: Add processes for each span (#41473)

(cherry picked from commit bf2ece7281)

* Remove test for backport to fix yarn upgrade related issues

Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
Co-authored-by: Ivana <ivana.huckova@gmail.com>
2021-11-15 11:20:31 +01:00
Grot (@grafanabot)
729495d225 Removed extra word (#41576) (#41579)
(cherry picked from commit 94704f1061)

Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
2021-11-12 09:03:33 -05:00
Grot (@grafanabot)
c5a99b2a32 OAuth: Fix group mapping when use generic OAuth (#41418) (#41628)
* Fix group mapping when use generic OAuth

* Fix lint

* Fix lint

(cherry picked from commit 25ad916473)

Co-authored-by: Selene <selenepinillos@gmail.com>
2021-11-12 11:18:42 +01:00
Grot (@grafanabot)
dffa61149a TimeSeries: guard against pointSize being set < lineWidth (#41577) (#41624)
(cherry picked from commit 7a92faf398)

Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
2021-11-12 07:21:09 +01:00
Grot (@grafanabot)
7aca22fb32 Alerting: Update docs on using the Prometheus Datasource with the Ruler (#41528) (#41598)
* Alerting: Update docs on using the Prometheus Datasource with the Ruler

* Update docs/sources/alerting/unified-alerting/alerting-rules/create-cortex-loki-managed-rule.md

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

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

Co-authored-by: gotjosh <josue@grafana.com>
2021-11-11 17:25:25 +00:00
George Robinson
eddcdd8d66 Alerting: Fix NoDataFound for alert rules using the AND operator (#41305) (#41524)
This commit fixes an issue in alerting where NoDataFound is false
when using the AND operator to compare two conditions in an alert
rule and one of the conditions has no data.

(cherry picked from commit d6ed5d295e)
2021-11-11 16:01:23 +00:00
Grot (@grafanabot)
d3b3f8976c Explore: fix logs panel top action switches labeling (#41350) (#41521)
* Explore: fix logs panel top action switches labeling

* fix typo

Co-authored-by: Maria Alexandra <239999+axelavargas@users.noreply.github.com>

Co-authored-by: Maria Alexandra <239999+axelavargas@users.noreply.github.com>
(cherry picked from commit 2139a3dfa8)

Co-authored-by: Giordano Ricci <me@giordanoricci.com>
2021-11-11 14:39:39 +00:00
Grot (@grafanabot)
ec8e606de0 InfluxDB: fix numeric aliases in queries (#41531) (#41587)
* influxdb: alerting: handle out-of-range numeric aliases

* influxdb: updated documentation

(cherry picked from commit eb47a58029)

Co-authored-by: Gábor Farkas <gabor.farkas@gmail.com>
2021-11-11 09:48:58 +01:00
Grot (@grafanabot)
3110e11330 fix: check lotex endpoint URL (#41429) (#41585)
* fix: check lotex endpoint URL

* Add validation for data sources URLs

Co-authored-by: Santiago <santiagohernandez.1997@gmail.com>
(cherry picked from commit dbe78e47b1)

Co-authored-by: Gilles De Mey <gilles.de.mey@gmail.com>
2021-11-11 08:19:44 +01:00
achatterjee-grafana
fb4875a58e update content (#41575) 2021-11-10 20:43:45 -05:00
Grot (@grafanabot)
c4a5a217cf Tempo: Fix validation of float durations (#41400) (#41538)
* Fix parsing of float numbers in validation

* Adjust test

* Update packages/grafana-data/src/datetime/durationutil.test.ts

* Update packages/grafana-data/src/datetime/durationutil.test.ts

* Remove us from placeholder

(cherry picked from commit 7bc27a3cfc)

Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
2021-11-10 16:27:24 +01:00
Grot (@grafanabot)
5f5e962b2d Alerting: Special alert instance if rule is in state NoData (#40540) (#41525)
* do not suppress NoData state
* extract conversion of state to postable alert + tests
* create a special alert instance if nodata
* use NoData when converting from Keep Last State instead of Alerting
* add silence during migration if NoData is mapped to KeepLastState.

(cherry picked from commit 610643a668)

Co-authored-by: Yuriy Tseretyan <yuriy.tseretyan@grafana.com>
2021-11-10 12:15:23 +01:00
Grot (@grafanabot)
d80013022e Alerting: Parse App URL only once (#39855) (#41522)
(cherry picked from commit 2b4e51f478)

Co-authored-by: Yuriy Tseretyan <yuriy.tseretyan@grafana.com>
2021-11-10 10:44:35 +00:00
Grot (@grafanabot)
49aa3f8d4f Storybook: Fix decorator height (#41468) (#41519)
* fix(storybook): make sure story background fills available height

* fix(storybook): add decorator to prevent badge filling all available height

* docs(badge): use centered story

* revert(badge): remove obsolete Meta typing

(cherry picked from commit cd5277befd)

Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com>
2021-11-10 11:24:19 +01:00
Grot (@grafanabot)
fff0da8fe9 DataProxy: Fix issue overriding response body when response status is 101 (#41364) (#41476)
When a request going through Grafana data source proxy responds with a websocket
upgrade response we cannot override the response body since it produces an error.
This problem seems to have been introduced in Grafana v8.0 by #38962.
In addition #40303 added same problem.

Fixes #41292

(cherry picked from commit 3be452f995)

Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
2021-11-09 15:04:44 +01:00
Grot (@grafanabot)
af84e20232 Alerting: Remove CTA button from read-only notification policy page (#41096) (#41474)
* don't show cta button for read-only prometheus alertmanager

* grammar fix

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

Co-authored-by: Peter Holmberg <peterholmberg@users.noreply.github.com>
Co-authored-by: Gilles De Mey <gilles.de.mey@gmail.com>
Co-authored-by: Peter Holmberg <peter.hlmbrg@gmail.com>
(cherry picked from commit 345af8374c)

Co-authored-by: Domas <domas.lapinskas@grafana.com>
2021-11-09 14:42:46 +01:00
Marcus Efraimsson
4d9f5ec8a2 Chore: Go mod tidy (#41373) 2021-11-09 12:07:14 +01:00
Marcus Andersson
8520ab9232 Chore: Prevent loading error from showing too early (#41426) 2021-11-09 10:03:49 +01:00
Grot (@grafanabot)
ca6ebdd3d8 Docs: Update data source provisioning in regards to HTTP specific settings (#40163) (#41432)
Clarifies documentation in regards to data source provisioning and certain
settings that earlier was explained as applicable to All data sources.

Fixes #19574

Co-authored-by: Will Browne <wbrowne@users.noreply.github.com>
(cherry picked from commit b304965bbe)

Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
2021-11-08 19:34:30 +01:00
Grot (@grafanabot)
859ee3c826 Docs: Added note that only string type is supported for query variables. (#41359) (#41409)
* Added note that only string type is supported for query variables.

* Added doc review.

(cherry picked from commit f346bbb3bb)

Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
Co-authored-by: achatterjee-grafana <aparajita.chatterjee@grafana.com>
2021-11-08 13:09:47 -05:00
Grot (@grafanabot)
022d16d897 Updated a few install topics with references to "Hosted Grafana" (#41106) (#41427)
(cherry picked from commit bda60f3458)

Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
2021-11-08 13:09:08 -05:00
Grot (@grafanabot)
3b8be57b4f Alerting: fix bug where user is able to access rules from namespaces user is not part of (#41403) (#41406)
* Add fix
* Add tests
(cherry picked from commit 6220872633)

Co-authored-by: Yuriy Tseretyan <yuriy.tseretyan@grafana.com>
Co-authored-by: Armand Grillet <2117580+armandgrillet@users.noreply.github.com>
Co-authored-by: Jean-Philippe Quéméner <JohnnyQQQQ@users.noreply.github.com>
Co-authored-by: George Robinson <george.robinson@grafana.com>
Co-authored-by: gotjosh <josue@grafana.com>
2021-11-08 18:57:51 +01:00
Grot (@grafanabot)
adfd39e5fd Chore: Fixed failing e2e due to day light saving time. (#41417) (#41422)
(cherry picked from commit dce851e396)

Co-authored-by: Marcus Andersson <marcus.andersson@grafana.com>
2021-11-08 17:36:10 +01:00
Grot (@grafanabot)
ad3864b9f1 Update config-from-query.md (#41333) (#41361)
(cherry picked from commit e0ad74a815)

Co-authored-by: Dawnpool <57010815+Dawnpool@users.noreply.github.com>
2021-11-06 02:18:38 -04:00
Giordano Ricci
d2e61e4aba Elasticsearch: use field configured in query editor as field for date_histogram aggregations (#41258) (#41358)
* Elasticsearch: use field configured in query editor as field for date_histogram aggregations

* add tests

(cherry picked from commit d524dc6108)
2021-11-05 15:43:42 +00:00
Will Browne
5350c74b39 backport of 41346 (#41365) 2021-11-05 16:19:14 +01:00
Grot (@grafanabot)
f75f86b57c Dashboards: Fix 'Copy' from being appended to new dashboard titles (#41344) (#41348)
(cherry picked from commit cbc00babe4)

Co-authored-by: Josh Hunt <joshhunt@users.noreply.github.com>
2021-11-05 12:34:58 +01:00
Dimitris Sotirakis
0068d6a43c Update CHANGELOG.md (#41343) 2021-11-05 11:36:51 +01:00
Ashley Harrison
bd9c45a170 NewsPanel: Prevent date and title collapsing to single row (#41260) 2021-11-04 09:55:52 +00:00
Dimitris Sotirakis
a73c109d79 Fix blog post link (#41286) 2021-11-03 18:49:17 +02:00
Dimitris Sotirakis
d52f25825b [v8.2.x] Sanitized NavBar children links to remove angular interpolation (#41283)
* Sanitized nav bar links to remove angular interpolation

* NavBar: Add sanitize to children items

(cherry picked from commit a3dc30546f)
(cherry picked from commit 561ca52ab3)

* use replaceAll when sanitizing urls

(cherry picked from commit 8081dc9ee9)
(cherry picked from commit c86d520821)

* switch to global regexp

(cherry picked from commit 1c7ce348ce)
(cherry picked from commit 28e2be2a8a)

* Resolve conflicts

Co-authored-by: Alexandra Vargas <alexa1866@gmail.com>
Co-authored-by: Dan Cech <dcech@grafana.com>
2021-11-03 17:05:29 +01:00
Grot (@grafanabot)
120689b3c6 "Release: Updated versions in package to 8.2.3" (#41279) 2021-11-03 16:30:51 +01:00
Grot (@grafanabot)
ec13ae79bd Update opt-in.md (#41216) (#41271)
Need to change that `true` to `false`.

(cherry picked from commit 1c3c1a52bb)

Co-authored-by: Alexandre de Verteuil <alexandre@grafana.com>
2021-11-03 10:53:18 -04:00
Grot (@grafanabot)
81463cd984 NewsPanel: Prevent small titles being split onto multiple lines (#41193) (#41270)
(cherry picked from commit bb079641d7)

Co-authored-by: Jamie Shears <jsws@users.noreply.github.com>
2021-11-03 15:27:24 +01:00
Dimitris Sotirakis
dad0c5a22e ReleaseNotes: Update release notes for v8.2.3 (#41268) 2021-11-03 15:18:23 +01:00
Josh Hunt
aca8793e40 Dashboard: Disable image renderer link for unsaved dashboards (#41249) (#41251)
(cherry picked from commit 9fc5193ecd)
2021-11-03 11:56:48 +00:00
Grot (@grafanabot)
26f155b86a Alerting: Fix duplicating queries in rule editor (#41091) (#41203)
(cherry picked from commit 69fe2def89)

Co-authored-by: Domas <domas.lapinskas@grafana.com>
2021-11-03 12:13:38 +02:00
Grot (@grafanabot)
a306205a58 Annotations: Ensure legacy annotation editors are cleaned up properly when switching datasource (#41115) (#41208)
* Annotations: Ensure Angular-based annotation editors are cleaned up properly

* Annotations: Remove ng-if instead of wrapping in div

(cherry picked from commit e0b2e0b152)

Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2021-11-02 17:04:29 +01:00
Grot (@grafanabot)
49416ac031 LibraryPanels: Ensure the list can be fully scrolled when adding a library panel (#41196) (#41207)
(cherry picked from commit eb223a6645)

Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2021-11-02 16:51:21 +01:00
Marcus Andersson
1800fab246 PluginsCatalog: Fix so we display the correct badges when a plugin is disabled (#41195) (#41159) 2021-11-02 15:20:16 +01:00
Grot (@grafanabot)
9a2e14d3e5 InfluxDB: Fix regular expression to parse aliases according to documentation (#41186) (#41190)
* Fix regular expression to parse aliases that start with either square brackets or dollar sign

* Fix lint

(cherry picked from commit 8a3e192e6a)

Co-authored-by: Dimitris Sotirakis <dimitrios.sotirakis@grafana.com>
2021-11-02 13:53:37 +01:00
Grot (@grafanabot)
c7cc9629f7 Changing 'Save' button style to primary (#41144) (#41181)
Changing 'Save' button style to primary according to Figma design.

(cherry picked from commit 0599b6180f)

Co-authored-by: Luis Filipe Pessoa <luis.f.pessoa@gmail.com>
2021-11-02 10:38:14 +01:00
Grot (@grafanabot)
6ed1ba3205 Docs: Fixed broken link in the plugin migration guide (#41148) (#41149)
* fixed broken link.

* updated title of link.

(cherry picked from commit d98cb8274c)

Co-authored-by: Marcus Andersson <marcus.andersson@grafana.com>
2021-11-01 11:03:40 -04:00
Grot (@grafanabot)
c0875d5a61 Added note. (#41118) (#41121)
(cherry picked from commit 161d92e12f)

Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
2021-10-29 21:42:28 +02:00
Grot (@grafanabot)
34b37ab3db Added note about small devices. (#41113) (#41116)
(cherry picked from commit 61fbdb60ff)

Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
2021-10-29 14:23:38 -04:00
Grot (@grafanabot)
3f8936316b influxdb: influxql: fix table-format data processing with renamed time field (#41052) (#41101)
(cherry picked from commit 24db1efa9d)

Co-authored-by: Gábor Farkas <gabor.farkas@gmail.com>
2021-10-29 16:19:09 +02:00
Grot (@grafanabot)
edb2644951 Cloudwatch: Add support for AWS/Backup metrics and dimensions (#41077) (#41086)
Add AWS/Backup supported metrics and dimensions based on the official
AWS documentation.

(cherry picked from commit b9e0a41f5a)

Co-authored-by: Szymon Szypulski <szymon.szypulski@gmail.com>
2021-10-29 13:17:22 +02:00
Grot (@grafanabot)
6603c809dd Plugins Catalog: Set external manage link to installation tab (#40994) (#41083)
* feat(catalog): set external manage link to installation tab

* fix(catalog): use pluginCatalogURL when getting external manage link

(cherry picked from commit 5d98155b5f)

Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com>
2021-10-29 13:03:19 +02:00
Grot (@grafanabot)
af225e3370 Tables: fix sorting for NaN values (#40938) (#41054)
Fixes #37236

(cherry picked from commit 97e0e12f40)

Co-authored-by: Derik Evangelista <derik.evangelista@grafana.com>
2021-10-29 11:35:52 +01:00
Grot (@grafanabot)
994b44f3fc Explore: fix footer margin in Query History (#40970) (#41080)
(cherry picked from commit 914d8d6f15)

Co-authored-by: Giordano Ricci <me@giordanoricci.com>
2021-10-29 12:32:04 +02:00
Tania B
8ac788c71a [8.2.x] Fix decrypting secrets in alerting migration (#41057)
* Add support for decrypting secrets with metadata prefix

* Update tests
2021-10-29 13:28:48 +03:00
Grot (@grafanabot)
f230b64700 upgrade ncurses in docker image (#41002) (#41068)
(cherry picked from commit 641a18b92e)

Co-authored-by: Kevin Minehart <kmineh0151@gmail.com>
2021-10-28 23:40:34 +02:00
Grot (@grafanabot)
69c0b0a55c Update brew install path in docs, for brew v3 (#40980) (#41053)
* Update brew install path in docs, for brew v3

* Ran prettier.

Co-authored-by: achatterjee-grafana <aparajita.chatterjee@grafana.com>
Co-authored-by: kay delaney <kay@grafana.com>
(cherry picked from commit d6693ec90d)

Co-authored-by: Sam Jewell <2903904+samjewell@users.noreply.github.com>
2021-10-28 18:06:49 +02:00
achatterjee-grafana
509ef6e3a6 Doc backport 40737 (unified alerting doc changes) (#41048)
* resolve conflicts

* remove .yarn/sdks

* removed duplicate content

Co-authored-by: Kevin Minehart <kmineh0151@gmail.com>
2021-10-28 11:10:13 -04:00
Grot (@grafanabot)
42f0612e5a Loki/Prometheus: Improve facetting message in label browser (#40998) (#41047)
* Chore: Improve Loki/Prometheus facetting message in label browser

* Chore: Remove uneeded console log and comment

(cherry picked from commit 8869df2ffe)

Co-authored-by: Devin Smith <me@devinsmith.co.za>
2021-10-28 16:48:15 +02:00
Grot (@grafanabot)
beb283d16d Dashboard: Fixes lazy loading of panels not in view for mobile layout (#41009) (#41031)
* Dashboard: Fixes lazy loading of panels not in view for mobile layout

* Refactoring and adding more comments

* Removed console.log

(cherry picked from commit 4c52ada7a9)

Co-authored-by: Torkel Ödegaard <torkel@grafana.org>
2021-10-28 13:30:19 +02:00
Grot (@grafanabot)
9400471580 Dashboard: Fix repeats in snapshots (#41018) (#41024)
(cherry picked from commit fbd68c4e96)

Co-authored-by: Hugo Häggmark <hugo.haggmark@grafana.com>
2021-10-28 11:20:32 +02:00
Grot (@grafanabot)
f574408f6a CloudWatch: Handle nested panels when migrating CloudWatch queries (#40993) (#41022)
* support nested targets when migrating cloudwatch queries

* cleanup

* use panelUpgrades array

* bump schema version number

(cherry picked from commit 7521d56cec)

Co-authored-by: Erik Sundell <erik.sundell@grafana.com>
2021-10-28 10:23:39 +02:00
Grot (@grafanabot)
6ceec99f41 Buttons: Improves button styles to make them perfectly symmetrical (#40977) (#41021)
* Buttons: Improves button styles to make them perfectly symmetrical

* Fixed icon vertical centering

(cherry picked from commit 6a2dc11545)

Co-authored-by: Torkel Ödegaard <torkel@grafana.org>
2021-10-28 10:07:17 +02:00
Grot (@grafanabot)
c3e46eaa8f Rendering: Check if default image exists to avoid breaking reports if it's moved (#40930) (#40991)
(cherry picked from commit 37cbed4b48)

Co-authored-by: Selene <selenepinillos@gmail.com>
2021-10-27 16:41:47 +02:00
Grot (@grafanabot)
10135a4851 Alerting: specify Prometheus implementation in YAML example (docs) (#40474) (#40989)
(cherry picked from commit 16f4d02419)

Co-authored-by: Santiago <santiagohernandez.1997@gmail.com>
2021-10-27 16:25:30 +02:00
Grot (@grafanabot)
c6836903d6 Alerting: updated docs regarding multi-org AM (#40982) (#40988)
(cherry picked from commit 0189eaf76c)

Co-authored-by: Armand Grillet <2117580+armandgrillet@users.noreply.github.com>
2021-10-27 16:22:43 +02:00
Grot (@grafanabot)
1952e01e48 Barchart: Fixes barchart switching from palette to thresholds color mode (#40954) (#40974)
(cherry picked from commit 858d654d1c)

Co-authored-by: Torkel Ödegaard <torkel@grafana.org>
2021-10-27 10:15:52 +02:00
Grot (@grafanabot)
808ffb0d51 DashboardLinks: Fix time in links not being updated (#40934) (#40969)
(cherry picked from commit fadf72dd34)

Co-authored-by: Hugo Häggmark <hugo.haggmark@grafana.com>
2021-10-27 07:45:34 +02:00
Grot (@grafanabot)
28f85570a1 Docs: Updated the plugin admin configuration default value (#40942) (#40959)
(cherry picked from commit 6e08e12749)

Co-authored-by: Marcus Andersson <marcus.andersson@grafana.com>
2021-10-26 21:43:10 +02:00
Grot (@grafanabot)
a513ff729e Docs: Fix for clarifications about the image renderer (#40182) (#40960)
* Added time range controls updates

* Added plugins catalog update

* Added enterprise images

* Added community contributions highlights for 8.2

* accessibility statement

* Update docs/sources/whatsnew/whats-new-in-v8-2.md

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

* Update docs/sources/whatsnew/whats-new-in-v8-2.md

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

* Update docs/sources/whatsnew/whats-new-in-v8-2.md

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

* Update docs/sources/whatsnew/whats-new-in-v8-2.md

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

* Update docs/sources/whatsnew/whats-new-in-v8-2.md

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

* Update docs/sources/whatsnew/whats-new-in-v8-2.md

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

* Update docs/sources/whatsnew/whats-new-in-v8-2.md

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

* Update docs/sources/whatsnew/whats-new-in-v8-2.md

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

* Update docs/sources/whatsnew/whats-new-in-v8-2.md

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

* Apply suggestions from code review

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

* Ran prettier:write to see if we can fix the issues

* Fix issues with template info

* Merge fix

* Template fix part 2

* What is a mergfix even

* Additional final fixes

* Markdown link error fix for time picker changes

* Ran prettier -w again to fix linting issues

* What's new fixes for image rendered

Co-authored-by: Fiona Artiaga <89225282+GrafanaWriter@users.noreply.github.com>
Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
(cherry picked from commit dfbb3c4e23)

Co-authored-by: Petros Kolyvas <code@petros.io>
2021-10-26 20:17:12 +02:00
Grot (@grafanabot)
11a4d0b004 bump for CVE-2021-37219 CVE-2021-32574 CVE-2021-36213 (#40947) (#40952)
(cherry picked from commit 728a59f013)

Co-authored-by: Will Browne <wbrowne@users.noreply.github.com>
2021-10-26 17:49:11 +02:00
Grot (@grafanabot)
183fe28769 Plugins Catalog: Fix plugin details header styles (#40917) (#40948)
(cherry picked from commit 41530482ec)

Co-authored-by: James Wang <36892657+jamesxwang@users.noreply.github.com>
2021-10-26 17:03:00 +02:00
Grot (@grafanabot)
ed71f677bd CloudWatch Logs: Fix variable interpolation in queries (#40899) (#40923)
* Interpolate variables in queries

* Remove test

(cherry picked from commit 8cf7e520e8)

Co-authored-by: Andrej Ocenas <mr.ocenas@gmail.com>
2021-10-26 13:16:19 +02:00
Grot (@grafanabot)
c3455c7850 AzureMonitor: Prevent incomplete Logs queries from running (#40512) (#40888)
* AzureMonitor: Prevent incomplete queries from running

* fix

(cherry picked from commit 90b802a62d)

Co-authored-by: Josh Hunt <joshhunt@users.noreply.github.com>
2021-10-25 17:18:01 +01:00
Grot (@grafanabot)
87dc257f6d DataFrame: toDataFrame( ...) should support the query response payload (#40594) (#40842)
(cherry picked from commit aeb868bb06)

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2021-10-25 09:03:09 -07:00
Grot (@grafanabot)
055405eb65 Explore: Fix running queries without a datasource property set (#40805) (#40881)
* Explore: Fix running queries without a datasource property set

* fix test

* adjust test

(cherry picked from commit 2ee54b7ffe)

Co-authored-by: Giordano Ricci <me@giordanoricci.com>
2021-10-25 15:57:46 +02:00
Grot (@grafanabot)
a8ecdca826 Datasources: Set response size metric based on actual bytes read (#40303) (#40867)
Fixes #33372

(cherry picked from commit 889d4683a1)

Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
2021-10-25 13:01:16 +02:00
Grot (@grafanabot)
908a951fc0 Alerting: fix ngalert alertmanager SQL Syntax Errors (#40827) (#40868)
* test kvstore in intregration tests with different databases

* escape 'key' in delete query

* export quote and use it in kvstore

(cherry picked from commit d1aefa1792)

Co-authored-by: Jean-Philippe Quéméner <JohnnyQQQQ@users.noreply.github.com>
2021-10-25 12:23:32 +02:00
Grot (@grafanabot)
543e9c2e50 CloudMonitoring: Fix TypeError in annotation queries (#40740) (#40852)
(cherry picked from commit d5de885633)

Co-authored-by: Junya Hayashi <junya.hayashi@groove-x.com>
2021-10-25 11:19:56 +02:00
Piotr Jamróz
0f2e309b4a Explore: Improve local storage error handling when rich history is added (#39943) (#40830)
* Rich History: improve local storage error handling

* Reduce number of max items and update docs

* Rotate not-starred items and add tests

* Add missing property to initial state

* Unify date in richHistory tests

* Show a warning message that rich history limit has been reached

* Add missing param

(cherry picked from commit ad757b48e7)
2021-10-25 09:09:47 +02:00
Hugo Häggmark
01468d2ac1 LibraryElements: fixes flaky tests (#40791) (#40796)
(cherry picked from commit c70cfe9125)
2021-10-25 06:08:11 +02:00
Grot (@grafanabot)
69b9579e84 Packaging: remove private users setting in systemd unit files (#40815) (#40821)
* Remove privateusers=true from grafana-server.service

(cherry picked from commit ca4b35e596)

Co-authored-by: Kevin Minehart <kmineh0151@gmail.com>
2021-10-22 17:34:45 +02:00
Grot (@grafanabot)
a48e623d52 Explore: fix history settings tab padding (#40752) (#40806)
(cherry picked from commit 35e2a3a126)

Co-authored-by: Giordano Ricci <me@giordanoricci.com>
2021-10-22 13:23:00 +01:00
gotjosh
abd1050f98 [8.2.x] Alerting: Validate contact point configuration during migration to Unified Alerting (#40717) (#40801)
* Alerting: Validate contact point configuration during migration to Unified Alerting (#40717)

* Alerting: Validate contact point configuration during the migration

This minimises the chances of generating broken configuration as part of the migration. Originally, we wanted to generate it and not produce a hard stop in Grafana but this strategy has the chance to avoid delivering notifications for our users.

We now think it's better to hard stop the migration and let the user take care of resolving the configuration manually.

(cherry picked from commit 74fb491b6a)
2021-10-22 12:16:36 +01:00
Grot (@grafanabot)
c7f488580a Alerting: Fix kv_store query to escape reserved word (#40788) (#40795)
(cherry picked from commit a5501b7845)

Co-authored-by: Yuriy Tseretyan <yuriy.tseretyan@grafana.com>
2021-10-22 09:27:19 +02:00
Grot (@grafanabot)
101a6f2f41 Correct price-plans list for this feature (#40283) (#40781)
* Correct price-plans list for this feature

The [Pricing Page][0] states that Enhanced LDAP is only for the Advanced plan
See b59520986c

[0]: https://grafana.com/products/cloud/pricing/

* Also update price plans on Enhanced LDAP page

(cherry picked from commit 6ce87a9655)

Co-authored-by: Sam Jewell <2903904+samjewell@users.noreply.github.com>
2021-10-22 09:18:24 +03:00
Grot (@grafanabot)
4b8993c1a5 Stat: Fixes an issue that could lead to browser crash with specific values (#40777) (#40789)
(cherry picked from commit 80b4ef820a)

Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
2021-10-22 03:34:45 +02:00
Grot (@grafanabot)
d3f9ec7231 Annotations: Allow addition of custom values whilst tags are loading (#40702) (#40768)
(cherry picked from commit 447a088750)

Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2021-10-21 16:22:51 +02:00
Grot (@grafanabot)
681741b224 ReleaseNotes: Updated changelog and release notes for 8.2.2 (#40751) (#40759)
* ReleaseNotes: Updated changelog and release notes for 8.2.2

* Add entry for 8.2.2 release notes

Co-authored-by: Alexandra Vargas <alexa1866@gmail.com>
(cherry picked from commit 84091de394)
2021-10-21 14:30:43 +02:00
Grot (@grafanabot)
6232fe07c0 "Release: Updated versions in package to 8.2.2" (#40750) 2021-10-21 10:46:45 +01:00
Grot (@grafanabot)
db5359f94e Prometheus: Pass scoped vars when creating PromLink query (#40525) (#40561)
(cherry picked from commit 4a3be0f845)

Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
2021-10-21 11:03:21 +02:00
Sofia Papagiannaki
b8a1af0db1 Hide Grafana 8 alerts for disabled org (#40687) (#40745)
(cherry picked from commit 2c28aea654)
2021-10-21 10:43:59 +02:00
Grot (@grafanabot)
867a305532 ValueMappings: Fix so that value mappings work in stat/gauge/bargauge/piechart (#40612) (#40623)
(cherry picked from commit 26dda75db5)

Co-authored-by: Torkel Ödegaard <torkel@grafana.org>
2021-10-21 09:30:13 +01:00
Grot (@grafanabot)
32069ea229 Dahboard: Only show "Another session is editing this dashboard" once per edit session (#40485) (#40487)
(cherry picked from commit 0c5491d6fd)

Co-authored-by: An <an.le@grafana.com>
2021-10-21 09:29:14 +01:00
Grot (@grafanabot)
a90b3956e0 Scale: Fixes handling of NaN percent when data min = data max (#40622) (#40628)
(cherry picked from commit c174664e63)

Co-authored-by: Torkel Ödegaard <torkel@grafana.org>
2021-10-21 09:28:52 +01:00
Armand Grillet
f3b8c1a89d Fix panic when Slack API sends unexpected response (#40721) (#40741)
Co-authored-by: Santiago <santiagohernandez.1997@gmail.com>
2021-10-21 10:49:07 +03:00
Grot (@grafanabot)
be82a39b84 Docs: Add doc for alert groups (#40353) (#40712)
* WIP: add doc for alert groups

* add more messaging around filtering and grouping options

(cherry picked from commit f10511ba1c)

Co-authored-by: Nathan Rodman <nathanrodman@gmail.com>
2021-10-20 11:53:29 -04:00
Grot (@grafanabot)
41941aaeed DashGrid: Fixed auto resize issue with tabel panel (#40688) (#40704)
* Changing how we use the AutoSizer component in the DashGrid.

* updated snapshot.

* fixed failing test.

(cherry picked from commit 0d036a6df5)

Co-authored-by: Marcus Andersson <marcus.andersson@grafana.com>
2021-10-20 17:48:56 +02:00
Grot (@grafanabot)
880d629aff AzureMonitor: Make ResourceNames() case insensitive (#40690) (#40705)
(cherry picked from commit ed68056b88)

Co-authored-by: Andres Martinez Gotor <andres.martinez@grafana.com>
2021-10-20 17:04:28 +02:00
Grot (@grafanabot)
4a7abae6ae Geomap: Avoid exceptions when missing data and values (heatmap and zoom settings) (#40664)
(cherry picked from commit 43878ff05f)

Co-authored-by: nikki-kiga <42276368+nikki-kiga@users.noreply.github.com>
2021-10-20 07:36:04 -07:00
Grot (@grafanabot)
e47b07ed19 Docs: Updated docker image names for consistency (#40426) (#40655)
* Updated the docker image names and added a note

* Updated the example version to current

(cherry picked from commit 38709df33b)

Co-authored-by: Petros Kolyvas <code@petros.io>
2021-10-20 09:37:49 -04:00
Domas
b0c59d1c62 fix unified alerting enabled checks (#40693) (#40697)
(cherry picked from commit 51a152456f)

public/app/features/query/state/DashboardQueryRunner/DashboardQueryRunner.ts
2021-10-20 15:22:11 +02:00
Grot (@grafanabot)
b993a3f2fc Storybook: fix theme colors not updating (#40679) (#40691)
(cherry picked from commit 1e471a6f76)

Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com>
2021-10-20 14:11:40 +02:00
Grot (@grafanabot)
66a0a108ac CloudMonitoring: Allow to manually set filters (#40606) (#40689)
(cherry picked from commit b3027e8221)

Co-authored-by: Andres Martinez Gotor <andres.martinez@grafana.com>
2021-10-20 13:35:58 +02:00
Grot (@grafanabot)
3b32815716 InfluxDB: Fix spelling - "chronograf" rather than "chronograph" (#40587) (#40678)
(cherry picked from commit 6c0d3e97fe)

Co-authored-by: Ben Tasker <88340935+btasker@users.noreply.github.com>
2021-10-20 12:41:49 +02:00
Marcus Andersson
ffee4e0ec7 [v8.2.x] Toolkit: Prevent toolkit from crashing when an error occur (#40670) 2021-10-20 10:25:25 +02:00
Grot (@grafanabot)
f5f737f87f Fix 404 link to time series doc (#40565) (#40652)
(cherry picked from commit e3d1b2c8fe)

Co-authored-by: Fredrik Enestad <fredrik@enestad.com>
2021-10-19 14:55:13 -04:00
Grot (@grafanabot)
d70d30c31e Slider: Adjusts input to enforce min/max values on blur (#40524) (#40637)
* [cr] adjusts slider input to enfore min/max values on blur

* [cr] additional test for blur action, min/max readability

(cherry picked from commit 70f68289f5)

Co-authored-by: Coleman Rollins <crollins199@gmail.com>
2021-10-19 17:15:27 +02:00
Grot (@grafanabot)
7def66fdb6 Variables: Improve display when selecting variables with the same value (#40607) (#40630)
* Variables: Allow selection of different variables with the same value

* Variables: Don't modify this key

(cherry picked from commit e48d77b1eb)

Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2021-10-19 15:41:30 +02:00
Grot (@grafanabot)
7ac477ab48 Grafana-UI: Move Select container styles to outer most container (#40611) (#40621)
* Grafana-UI: Move Select container styles to outer most container

* Update packages/grafana-ui/src/components/Select/Container.tsx

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

* Rename file

Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>
(cherry picked from commit d5a0f719df)

Co-authored-by: Josh Hunt <joshhunt@users.noreply.github.com>
2021-10-19 14:36:26 +02:00
Grot (@grafanabot)
bb71fe0b9c [v8.2.x] Graph: Fix annotation description not being shown on hover (#40608)
Co-authored-by: Maria Alexandra <239999+axelavargas@users.noreply.github.com>
2021-10-19 12:10:44 +02:00
Grot (@grafanabot)
01ffb3852c Table: Tweak to type icon styles (#40596) (#40598)
(cherry picked from commit d179c2a4e9)

Co-authored-by: Torkel Ödegaard <torkel@grafana.org>
2021-10-19 09:26:06 +02:00
Grot (@grafanabot)
41a9638df7 RowsToFields: Fix issue with field names that are numbers (#40580) (#40597)
* RowsToFields: Fix issue with field names that are numbers

* Only add the index accessor if field name does not conflict with it

* fix lint

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

Co-authored-by: Torkel Ödegaard <torkel@grafana.org>
2021-10-19 08:52:53 +02:00
Grot (@grafanabot)
363a94ff21 Annotations: Improve tag search performance (#40567) (#40582)
(cherry picked from commit ec0fcbbf4b)

Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2021-10-18 16:30:02 +02:00
Grot (@grafanabot)
55b6b8a318 frontend logging fixes (#39946) (#40571)
(cherry picked from commit a531c6e26f)

Co-authored-by: Domas <domas.lapinskas@grafana.com>
2021-10-18 14:07:28 +02:00
Grot (@grafanabot)
a3842b4111 Logs: Fix creating of detected fields for each letter in log line (#40507) (#40560)
* Logs: Fix using of JSON parser for strings

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

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

* Update parser typing and documentation

(cherry picked from commit 4e1cf7dea7)

Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
2021-10-18 11:44:09 +02:00
Grot (@grafanabot)
014e5ba0c2 Table panel: Fix filter not working for special characters and allow filter's case sensitivity control (#40458) (#40556)
* Fix filter not working for special characters and allow case sansitive filter control

* Memoize regex

(cherry picked from commit 6201b5b1d9)

Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
2021-10-18 10:58:39 +02:00
Grot (@grafanabot)
3b5deb42c4 Noting non-support of template queries in official documentation (#40169) (#40539)
(cherry picked from commit 99eddac406)

Co-authored-by: Anne E. Ulrich <aeulrich1997@gmail.com>
2021-10-15 18:16:39 -04:00
Grot (@grafanabot)
899999750e Add copyright notice (#39206) (#40538)
* Add copyright notice

* Update docs/sources/copyright/_index.md

Co-authored-by: Ursula Kallio <73951760+osg-grafana@users.noreply.github.com>

* Update docs/sources/copyright/_index.md

Co-authored-by: Robby Milo <robby.milo@grafana.com>

Co-authored-by: Ursula Kallio <73951760+osg-grafana@users.noreply.github.com>
Co-authored-by: Robby Milo <robby.milo@grafana.com>
Co-authored-by: achatterjee-grafana <aparajita.chatterjee@grafana.com>
(cherry picked from commit f238342c17)

Co-authored-by: Nate Walters <89402456+nate-walters-grafana@users.noreply.github.com>
2021-10-15 17:25:15 -04:00
Grot (@grafanabot)
81dfa4a09d Fixed broken relrefs (#40533) (#40535)
(cherry picked from commit c44f51d5c3)

Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
2021-10-15 16:30:21 -04:00
achatterjee-grafana
2e37c96aac Update _index.md (#40257) (#40529)
Clicking the "Getting started with Grafana" link does nothing in this page.  Added the additional "getting-started" to the ref.

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

Co-authored-by: jpapp25 <jeremypapp@gmail.com>
2021-10-15 13:54:44 -04:00
Grot (@grafanabot)
33b7458198 Updated MySQL provisioning doc (#39750) (#40502)
Updated password to secureJsonData for MySQL provisioning

(cherry picked from commit 374041148d)

Co-authored-by: PunkoIvan <punkoivan@gmail.com>
2021-10-15 11:49:29 +02:00
Grot (@grafanabot)
48edcd9577 Some more grammar fixes (#40183) (#40501)
(cherry picked from commit 8b41d85b68)

Co-authored-by: Anne E. Ulrich <aeulrich1997@gmail.com>
2021-10-15 11:49:08 +02:00
Grot (@grafanabot)
07e7dddeaf Fix typo in whats-new-in-v8-0.md (#38661) (#40500)
(cherry picked from commit 060a16041d)

Co-authored-by: Christoph Deil <Deil.Christoph@gmail.com>
2021-10-15 11:48:55 +02:00
Grot (@grafanabot)
6b7b3a3fa3 Text Panel: fixes unnecessary scroll in markdown html tables (#40315) (#40478)
* Text Panel: fixes unnecessary scroll in tables

* uses more robust solution that covers every edge case

* chore: uses variables instead and sets first child margins to zero

* override margin for only h1 and figure elements

* remove override styles for h1,table markdown contents

(cherry picked from commit 51a48e1869)

Co-authored-by: Uchechukwu Obasi <obasiuche62@gmail.com>
2021-10-14 16:37:25 +01:00
Grot (@grafanabot)
39fc1bf710 Fix: State timeline panel not to crash when only one threshold (#40371) (#40457)
(cherry picked from commit 1e9aeb6f19)

Co-authored-by: Zoltán Bedi <zoltan.bedi@gmail.com>
2021-10-14 14:23:41 +02:00
Grot (@grafanabot)
d67b6e23ea Alerting: delete orphaned records from kvstore (#40337) (#40450)
(cherry picked from commit 153c356993)

Co-authored-by: Jean-Philippe Quéméner <JohnnyQQQQ@users.noreply.github.com>
2021-10-14 12:32:57 +02:00
Grot (@grafanabot)
3cc055f59c Prometheus: Remove autocomplete limit for metrics (#39363) (#40448)
* Remove limit on metrics

* Remove unused variable

(cherry picked from commit 46f922fe1a)

Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
2021-10-14 11:49:59 +02:00
Grot (@grafanabot)
83e58575ef CloudWatch: Add AWS Elastic GPUs metrics and dimensions (#40253) (#40436)
* CloudWatch: Added AWS Elastic GPUs metrics and dimensions

* Delete extra space

(cherry picked from commit 665055dbbc)

Co-authored-by: Ilya Stoliar <52413756+ilyastoli@users.noreply.github.com>
2021-10-14 10:09:40 +02:00
Grot (@grafanabot)
81118d3059 make alert tab create alert button work with default datasource (#40334) (#40432)
(cherry picked from commit c43b82d44b)

Co-authored-by: Domas <domas.lapinskas@grafana.com>
2021-10-14 09:14:29 +02:00
Grot (@grafanabot)
8b9bdfa546 Update _index.md (#40421) (#40427)
spelling

(cherry picked from commit b0414f66dc)

Co-authored-by: Arie Heinrich <arie.heinrich@outlook.com>
2021-10-14 04:11:31 +02:00
Grot (@grafanabot)
7689b2f5ec Forbid creation of dashboard permissions with both a user and a team (#40104) (#40412)
These permissions could be created through the API but would not show
correctly in the UI.

(cherry picked from commit 5af96544f3)

Co-authored-by: Jesse Weaver <pianohacker@gmail.com>
2021-10-13 16:10:40 -06:00
Grot (@grafanabot)
fb79d72230 ReleaseNotes: Update changelog and release notes for v8.1.3 (#40384) (#40390)
(cherry picked from commit 415a92331a)

Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
2021-10-13 16:18:20 +02:00
Grot (@grafanabot)
3f86150506 Fix: State timeline tooltip not showing (#40100) (#40374)
* Fix: State timeline tooltip not showing

* Check transformation instead of refId

(cherry picked from commit 7422189a88)

Co-authored-by: Zoltán Bedi <zoltan.bedi@gmail.com>
2021-10-13 12:32:42 +02:00
Marcus Efraimsson
92d768fe66 Prometheus: Fix issue where TCP connections not being reused when querying from Grafana alerting (#40349) (#40368)
Fixes #40366

Co-authored-by: Dave Henderson <dave.henderson@grafana.com>
Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
(cherry picked from commit 23bee50474)

Co-authored-by: Kevin Minehart <kmineh0151@gmail.com>
2021-10-13 11:19:04 +02:00
Grot (@grafanabot)
c57041f13b Application: Make error-template title configurable (#40310) (#40363)
* Fix error-template title

as in index-template.html

* Test: fix for AppTitle

Co-authored-by: Hugo Häggmark <hugo.haggmark@gmail.com>
(cherry picked from commit 3d9e2d8c82)

Co-authored-by: Ben RUBSON <6764151+benrubson@users.noreply.github.com>
2021-10-13 09:08:18 +02:00
Grot (@grafanabot)
ea2976180b [v8.2.x] Alerting: Remove invalid Slack URL as we migrate notification channels (#40356)
* Alerting: Remove invalid Slack URL as we migrate notification channels (#40344)

* Alerting: Remove invalid Slack URL as we migrate notification channels

Grafana will accept any type of utf8 valid string as the Slack URL and will simply fail as we try to deliver the notification of the channel. The Alertmanager will fail to apply a configuration if the URL of the Slack Receiver is invalid.

This change takes that into account by removing the URL for the receiver as we migrate notification channels that do not pass the url validation. As we assume the notification was not being delivered to being with.

* Add a log line when we modify the channel

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

* fix tests

Co-authored-by: gotjosh <josue@grafana.com>
Co-authored-by: Yuriy Tseretyan <yuriy.tseretyan@grafana.com>
2021-10-13 08:51:06 +02:00
Grot (@grafanabot)
82ef926e1b E2E: Fix path for importDashboards (#40111) (#40351)
* Small e2e fix for importDashboards

(cherry picked from commit 47f09fca8d)

Co-authored-by: Sarah Zinger <sarahzinger@users.noreply.github.com>
2021-10-12 20:53:31 -04:00
Grot (@grafanabot)
7bbc0e8684 Example fixes for #40173 (#40175) (#40350)
(cherry picked from commit 24fa93bd58)

Co-authored-by: Paul Dee <647633+systemcrash@users.noreply.github.com>
2021-10-12 22:17:58 +02:00
Grot (@grafanabot)
a652ffa9b4 [v8.2.x] Alerting: Fixes a bug when trying to sync broken alertmanager config (#40342)
* Alerting: Fixes a bug when trying to sync broken alertmanager config (#40338)

* Alerting: Fixes a bug when trying to sync broken alertmanager config

Broken alertmanager configuration has the potential to be introduced as part of a migration e.g. due to incompatible data between what grafana accepts and what the Alertmanager expects. When this happens, we expect an eventually consistent behaviour where we'll keep trying to apply the configuration until it works.

As part of change in https://github.com/grafana/grafana/pull/39237 we introduced a regression that modified this behaviour and instead tried to create a new Alertmanager for that organization everytime, which eventually ended up in a panic due to a duplicate metrics being registered.

This PR fixes that and introduces a test to catch further regressions.

* Remove disable orgs

(cherry picked from commit 48d73cb148)

* remove decryptFn that is not known in 8.2 branch

Co-authored-by: gotjosh <josue@grafana.com>
Co-authored-by: Yuriy Tseretyan <yuriy.tseretyan@grafana.com>
2021-10-12 15:26:00 -04:00
Grot (@grafanabot)
49aadec393 Packaging: Remove ProcSubset option in systemd (#40339) (#40340)
* update service file

(cherry picked from commit fe5e49476b)

Co-authored-by: Kevin Minehart <kmineh0151@gmail.com>
2021-10-12 18:53:25 +02:00
George Robinson
e775fba146 Alerting: Fix error message in ngalert when notifications cannot be sent to alertmanager (#40158) (#40317)
(cherry picked from commit 8318e45452)
2021-10-12 15:28:45 +01:00
Grot (@grafanabot)
2011097d42 Explore: Prevent empty Elasticsearch logs query responses from hiding the logs panel (#40217) (#40329)
* remove return value from addPreferredVisualisationType

* Elasticsearch: send empty series instead when no data is received for a query

(cherry picked from commit b0391d4933)

Co-authored-by: Giordano Ricci <me@giordanoricci.com>
2021-10-12 14:53:56 +01:00
Grot (@grafanabot)
4de5d30719 Explore/Loki: Fix defaulting to instant query when switching from Prometheus (#40216) (#40323)
* Loki: Pass only wanted query props when importing from Prometheus

* Update

* Update public/app/plugins/datasource/loki/language_provider.ts

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

* Add test

* Fix strict error

Co-authored-by: Giordano Ricci <me@giordanoricci.com>
(cherry picked from commit 2f0eccb421)

Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
2021-10-12 13:38:40 +02:00
Grot (@grafanabot)
dad16637ce fix rule form crashing when extra query editor actions are provided (#40319) (#40322)
(cherry picked from commit b1f56b4863)

Co-authored-by: Domas <domas.lapinskas@grafana.com>
2021-10-12 13:16:41 +02:00
Grot (@grafanabot)
128981fb21 Alerting: cleanup alert resources on org removal (#39938) (#40321)
(cherry picked from commit e1dfec49f9)

Co-authored-by: Jean-Philippe Quéméner <JohnnyQQQQ@users.noreply.github.com>
2021-10-12 12:46:03 +02:00
Giordano Ricci
fa4eec8e1d AWS: add OpenSearch to AWS services (#40290) (#40297)
(cherry picked from commit 24af3593a2)
2021-10-11 17:30:08 +02:00
Grot (@grafanabot)
16ebe8999e ReleaseNotes: Updated changelog and release notes for 8.2.1 (#40287) (#40292)
* ReleaseNotes: Updated changelog and release notes for 8.2.1

* Update docs after running prettier:write

Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
(cherry picked from commit 2fd869fd02)
2021-10-11 16:32:10 +02:00
Grot (@grafanabot)
88622d7f09 "Release: Updated versions in package to 8.2.1" (#40262) 2021-10-11 11:35:17 +02:00
Grot (@grafanabot)
0a27bfba5a Dashboard: Fixes rendering of repeating panels (#39991) (#40259)
* Dashboard: Fixes rendering of repeating panels

* Chore: update after PR comments

(cherry picked from commit d8e97fc024)

Co-authored-by: Hugo Häggmark <hugo.haggmark@grafana.com>
2021-10-11 07:06:51 +02:00
Grot (@grafanabot)
a596cf0515 A11y: Fix for Fastpass issues on the Profile page (#40212) (#40258)
* A11y: Fix for Fastpass issues on Profile page

* Chore: small fix

* Chore: fixes the tests

(cherry picked from commit 7706483654)

Co-authored-by: Hugo Häggmark <hugo.haggmark@grafana.com>
2021-10-11 07:06:14 +02:00
Grot (@grafanabot)
a7a935fff0 ReleaseNotes: Updated changelog and release notes for 8.2.0 (#40233) (#40236)
(cherry picked from commit 12b5956af2)
2021-10-08 19:55:30 +02:00
Grot (@grafanabot)
b29b65404c Docs: Add required library for the image renderer (#40201) (#40221)
(cherry picked from commit 4c0bafa53a)

Co-authored-by: Agnès Toulet <35176601+AgnesToulet@users.noreply.github.com>
2021-10-08 10:41:35 -04:00
Grot (@grafanabot)
7539dd5ec6 Add Headers to http client Options (#40214) (#40220)
(cherry picked from commit d023cabae6)

Co-authored-by: Dimitris Sotirakis <dimitrios.sotirakis@grafana.com>
2021-10-08 16:27:07 +02:00
Grot (@grafanabot)
80d7138076 remove systemcallfilters sections from systemd unit files (#40176) (#40219)
(cherry picked from commit cdea812cee)

Co-authored-by: Kevin Minehart <kmineh0151@gmail.com>
2021-10-08 16:17:59 +02:00
Giordano Ricci
3ff6fcdb50 Fix: fix typo in what's new list item title (#40207)
* Fix: fix typo in what's new list item title

* Sync doc with main
2021-10-08 13:25:49 +02:00
Grot (@grafanabot)
54dec97d0a Datasources: Fix deletion of datasource if plugin cannot be found (#40095) (#40209)
* fix(pluginsettings): reject with error so datasource plugin loading failures still render ui

* feat(pluginpage): handle plugin loading error

* refactor(datasources): separate out datasource and meta loading so store has info for deletion

* fix(datasourcesettings): introduce loading flag to wait for datasource and meta loading

* test(datasourcesettings): fix failing test

* test(datasources): assert loading status of datasource settings

* test(datasources): update action tests for latest changes

(cherry picked from commit 7cf3c84c92)

Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com>
2021-10-08 13:04:17 +02:00
Giordano Ricci
904f7699a3 Docs: Whats new in 8.2 (#39945) (#40202)
* Docs: Whats new in 8.2 (#39945)

* Added time range controls updates

* Added plugins catalog update

* Added enterprise images

* Added community contributions highlights for 8.2

* accessibility statement

* Update docs/sources/whatsnew/whats-new-in-v8-2.md

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

* Update docs/sources/whatsnew/whats-new-in-v8-2.md

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

* Update docs/sources/whatsnew/whats-new-in-v8-2.md

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

* Update docs/sources/whatsnew/whats-new-in-v8-2.md

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

* Update docs/sources/whatsnew/whats-new-in-v8-2.md

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

* Update docs/sources/whatsnew/whats-new-in-v8-2.md

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

* Update docs/sources/whatsnew/whats-new-in-v8-2.md

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

* Update docs/sources/whatsnew/whats-new-in-v8-2.md

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

* Update docs/sources/whatsnew/whats-new-in-v8-2.md

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

* Apply suggestions from code review

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

Co-authored-by: Fiona Artiaga <89225282+GrafanaWriter@users.noreply.github.com>
Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
(cherry picked from commit ed0c43b106)

* Add index entry

Co-authored-by: Petros Kolyvas <code@petros.io>
2021-10-08 11:11:04 +01:00
Grot (@grafanabot)
4facd4aedf Folders: Prevents deletion of General folder (#40192) (#40200)
(cherry picked from commit 70e759e0c0)

Co-authored-by: Hugo Häggmark <hugo.haggmark@grafana.com>
2021-10-08 11:48:26 +02:00
Grot (@grafanabot)
37fcce3940 Grammar issues (#40168) (#40177)
(cherry picked from commit 872385dcee)

Co-authored-by: Anne E. Ulrich <aeulrich1997@gmail.com>
2021-10-07 19:32:36 -04:00
Grot (@grafanabot)
4b4c11f566 Packaging: document systemd net bind capability rpm and deb installations (#40165) (#40178)
* add systemd net bind capability docs for rpm and deb

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

Co-authored-by: Kevin Minehart <kmineh0151@gmail.com>
2021-10-07 23:27:09 +02:00
Grot (@grafanabot)
40b61914e6 docs: Add keepCokkies cofiguration option in datasources (#39890) (#40166)
Signed-off-by: Vinayak Kadam <kadamvinayak03@gmail.com>
(cherry picked from commit dbe1ab7d54)

Co-authored-by: Vinayak <vinayak03@users.noreply.github.com>
2021-10-07 16:21:28 -04:00
achatterjee-grafana
11aeb24099 Doc: Fixed issue 40017 (#40152) (#40161)
* Added content as suggested by Will

* removed a few extra words.

* Update docs/sources/administration/configuration.md

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

* Update docs/sources/administration/configuration.md

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

* Update docs/sources/administration/configuration.md

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

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

Co-authored-by: Fiona Artiaga <89225282+GrafanaWriter@users.noreply.github.com>
2021-10-07 13:18:11 -04:00
Giordano Ricci
efc8f111c0 Docs: Update publish.yml for 8.2.0 (#40151) 2021-10-07 16:33:52 +01:00
Grot (@grafanabot)
5a059abb5d ReleaseNotes: Updated changelog and release notes for 8.2.0 (#40141) (#40146)
* ReleaseNotes: Updated changelog and release notes for 8.2.0

* Add link & remove empty line in CHANGELOG

* remove empty line

Co-authored-by: Elfo404 <me@giordanoricci.com>
(cherry picked from commit e7b81e1918)
2021-10-07 15:32:54 +01:00
Marcus Efraimsson
9ae69bedfe [v8.2.x] ReleaseNotes: Updated changelog and release notes (#40022) (#40140)
* ReleaseNotes: Updated changelog and release notes (#40022)

(cherry picked from commit feaa56a7fe)

* Add missing release notes for 8.1.4 and 8.1.5

* ReleaseNotes: Updated changelog and release notes for 8.1.7 (#40081)

(cherry picked from commit 4a91ceeb1e)

Co-authored-by: Grot (@grafanabot) <43478413+grafanabot@users.noreply.github.com>
2021-10-07 13:49:17 +02:00
Grot (@grafanabot)
d7f71e9eae "Release: Updated versions in package to 8.2.0" (#40134) 2021-10-07 12:23:10 +02:00
Grot (@grafanabot)
1be90124f0 Aws: Update AWS authentication documentation (#39236) (#39861)
* wip: adding workspace iam role

* add intro

* minor adjustment

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

Co-authored-by: Ursula Kallio <73951760+osg-grafana@users.noreply.github.com>

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

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

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

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

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

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

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

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

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

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

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

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

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

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

* revert to on behalf of

* remove permissions

Co-authored-by: Ursula Kallio <73951760+osg-grafana@users.noreply.github.com>
Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
(cherry picked from commit b711bc00b9)

Co-authored-by: Erik Sundell <erik.sundell@grafana.com>
2021-10-07 11:49:56 +02:00
Grot (@grafanabot)
2d9aabfcac Search: Fix local storage key (#40127) (#40130)
* Default to 'General' if no folder title is present

* Add bottom padding

(cherry picked from commit 5c7e874008)

Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>
2021-10-07 11:18:47 +02:00
Grot (@grafanabot)
235351ae69 Stat: recompute shared y range during streaming updates (#39485) (#40132)
(cherry picked from commit d3815a851c)

Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
2021-10-07 11:16:30 +02:00
Grot (@grafanabot)
f6199596df Annotations: Improve rendering performance of event markers (#39984) (#39999)
(cherry picked from commit ead8429210)

Co-authored-by: Torkel Ödegaard <torkel@grafana.org>
2021-10-07 10:50:19 +02:00
Grot (@grafanabot)
f15be05dec Fix: prevent queryDisplyText in QueryRowHeader from overflowing (#40094) (#40128)
* Revert "Fix Query Editor Row horizontal overflow (#39419)"

This reverts commit 42b1fa0f62.

* fix: prevent queryDisplyText in QueryRowHeader from overflowing

(cherry picked from commit 95d9722afa)

Co-authored-by: Giordano Ricci <me@giordanoricci.com>
2021-10-07 10:45:45 +02:00
Grot (@grafanabot)
81fcc3a007 CodeEditor: making sure we trigger the latest onSave callback provided to the component (#39835) (#40120)
(cherry picked from commit d9ca3c5c5d)

Co-authored-by: Marcus Andersson <marcus.andersson@grafana.com>
2021-10-07 09:18:47 +02:00
Grot (@grafanabot)
764ec0bd98 TimePicker: fix console error on time picker open (#40067) (#40072)
* TimePicker: fix console error on time picker open

(cherry picked from commit ba31e4ee4d)

Co-authored-by: Oscar Kilhed <oscar.kilhed@grafana.com>
2021-10-07 07:22:46 +01:00
Grot (@grafanabot)
250381f581 Docs: Add documentation for library elements API (#39829) (#40117)
* LibraryElements: Adds api documentation

* Update docs/sources/http_api/library_element.md

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

* Update docs/sources/http_api/library_element.md

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

* Update docs/sources/http_api/library_element.md

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

* Update docs/sources/http_api/library_element.md

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

* Update docs/sources/http_api/library_element.md

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

* Update docs/sources/http_api/library_element.md

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

* Update docs/sources/http_api/library_element.md

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

* Update docs/sources/http_api/library_element.md

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

* Update docs/sources/http_api/library_element.md

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

* Update docs/sources/http_api/library_element.md

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

* Update docs/sources/http_api/library_element.md

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

* Update docs/sources/http_api/library_element.md

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

* Update docs/sources/http_api/library_element.md

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

* Update docs/sources/http_api/library_element.md

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

* Update docs/sources/http_api/library_element.md

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

* Update docs/sources/http_api/library_element.md

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

* Update docs/sources/http_api/library_element.md

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

* Update docs/sources/http_api/library_element.md

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

* Update docs/sources/http_api/library_element.md

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

* Update docs/sources/http_api/library_element.md

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

* Update docs/sources/http_api/library_element.md

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

* Update docs/sources/http_api/library_element.md

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

* Update docs/sources/http_api/library_element.md

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

* Refactor: changes after PR comments

* Apply suggestions from code review

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

* Chore: updates after review

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

Co-authored-by: Hugo Häggmark <hugo.haggmark@grafana.com>
2021-10-07 08:03:07 +02:00
Grot (@grafanabot)
cac6effebd Explore: Add opt-in config for Node Graph in Jaeger, Zipkin, and Tempo (#39958) (#40105)
(cherry picked from commit 3a8d04603f)

Co-authored-by: Connor Lindsey <cblindsey3@gmail.com>
2021-10-06 14:42:07 -06:00
Grot (@grafanabot)
9212b34d46 Doc: Organized the Getting Started section (#39813) (#40039)
* First commit with reorganized and updated content.

* Updated Getting started topic.

* Changed some wording.

* Removed extra word "setting".

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

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

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

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

* Updated doc based on review.

* Fix linting errors

Co-authored-by: Fiona Artiaga <89225282+GrafanaWriter@users.noreply.github.com>
Co-authored-by: Piotr Jamróz <pm.jamroz@gmail.com>
(cherry picked from commit cfc31ce523)

Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
2021-10-06 13:30:46 -04:00
Grot (@grafanabot)
6db0af2223 A11y: Fix fastpass issues for dashboard management pages (#39940) (#40065)
* A11y: Fix fastpass issues for dashboard pages
See #39429

(cherry picked from commit 1ce750471f)

Co-authored-by: kay delaney <45561153+kaydelaney@users.noreply.github.com>
2021-10-06 18:02:54 +01:00
Grot (@grafanabot)
6730d5b657 Tempo: Decrease the default Tempo search limit to 20 (#40030) (#40088)
(cherry picked from commit 3e33330e27)

Co-authored-by: Connor Lindsey <cblindsey3@gmail.com>
2021-10-06 09:30:48 -06:00
Dimitris Sotirakis
dc5ed14290 Remove unnecessary Dockerize steps (#40087) 2021-10-06 18:21:59 +03:00
Grot (@grafanabot)
8b396d5421 Fix typo in "filter by value" example (#40070) (#40086)
(cherry picked from commit 98a9b4adc5)

Co-authored-by: ian moone <lrobin@xee.com>
2021-10-06 11:19:05 -04:00
George Robinson
29638a485b Panel ID annotation cannot be set without Dashboard UID (#40019) (#40063)
(cherry picked from commit 935bd34a30)
2021-10-06 12:17:29 +01:00
Grot (@grafanabot)
7cd58dd7d0 MySql: Fix reset button on config page (#39988) (#40064)
* MySql: Fix reset button on config page

* Use button instead of anchor

* Add aria labels

(cherry picked from commit 7fd7c98540)

Co-authored-by: Zoltán Bedi <zoltan.bedi@gmail.com>
2021-10-06 13:08:02 +02:00
George Robinson
265714866b You can now get alert rules for a dashboard or a panel using /api/v1/rules endpoints. (#39476) (#40008)
Get alert rules for a dashboard and panel in /api/v1/rules

(cherry picked from commit 2a4c1b1aa6)
2021-10-06 11:38:26 +01:00
Grot (@grafanabot)
cb6d6e0497 Docs: update alerting (#39899) (#40058)
* Docs: update alerting

* Apply suggestions from code review

Co-authored-by: Armand Grillet <2117580+armandgrillet@users.noreply.github.com>
(cherry picked from commit 4f2a3f92e4)

Co-authored-by: Sofia Papagiannaki <papagian@users.noreply.github.com>
2021-10-06 12:22:06 +02:00
achatterjee-grafana
a6ef2cda29 Doc: Fix escalation issue 903 (#40034) (#40036)
* First set of reorg of Playlist topic. Also fixed a broken bookmark in Azure authentication topic.

* More re-org.

* Added note requested in issue 903.

* Updated a note added dashboard HTTP API endpoint.

* Update docs/sources/dashboards/playlist.md

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

* Update docs/sources/dashboards/playlist.md

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

* Update docs/sources/dashboards/playlist.md

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

* Update docs/sources/dashboards/playlist.md

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

* Update docs/sources/dashboards/playlist.md

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

* Update docs/sources/dashboards/playlist.md

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

* Updated image position and name.

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

Co-authored-by: Fiona Artiaga <89225282+GrafanaWriter@users.noreply.github.com>
2021-10-05 20:41:20 -04:00
Grot (@grafanabot)
73e89da81c Fix static path matching issue in macaron (#40023) (#40027)
Co-authored-by: Malcolm Holmes <mdh@odoko.co.uk>
(cherry picked from commit 329f96db1a)

Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
2021-10-05 20:04:26 +02:00
Grot (@grafanabot)
218dc8104e AccessControl: rename data source id read action (#39966) (#40009)
(cherry picked from commit 4160429b71)

Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com>
2021-10-05 16:09:32 +02:00
Grot (@grafanabot)
c26dc6487e AccessControl: Document new permissions restricting data source access. (#39091) (#40004)
* Add data sources roles and permissions to docs

Co-authored-by: Ieva <ieva.vasiljeva@grafana.com>
(cherry picked from commit 6aa006b699)

Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com>
2021-10-05 15:25:21 +02:00
Domas
b5521a9eaf Alerting: Alertmanager datasource support for upstream Prometheus AM implementation (#39775) (#39989)
(cherry picked from commit a1d4be0700)
2021-10-05 12:13:11 +03:00
Grot (@grafanabot)
32481e75c5 Alerting: make /api/prometheus/grafana/api/v1/rules faster (#39660) (#39986)
(cherry picked from commit e343b62665)

Co-authored-by: Domas <domas.lapinskas@grafana.com>
2021-10-05 11:11:15 +03:00
Grot (@grafanabot)
3e6bb78e3d TimePicker: Close timepicker with esc (#39962) (#39969)
(cherry picked from commit 3cd7b11eb4)

Co-authored-by: Oscar Kilhed <oscar.kilhed@grafana.com>
2021-10-04 22:52:26 +02:00
Grot (@grafanabot)
d4bec0b178 Docs: Add API endpoints used for templating in Prometheus (#39639) (#39974)
(cherry picked from commit 3e01db9a1e)

Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
2021-10-04 22:28:06 +02:00
Grot (@grafanabot)
815adae389 Some documentation fixes (#39951) (#39973)
* Some documentation fixes

* Address review comments

* Fixed lint issues using prettifier.

Co-authored-by: achatterjee-grafana <aparajita.chatterjee@grafana.com>
(cherry picked from commit ccd7f8a5ba)

Co-authored-by: Michael D <michael@drueing.de>
2021-10-04 15:54:44 -04:00
Kyle Brandt
4be5dd6391 Alerting: Allow more characters in label names so notifications are sent (#38629) (#39965)
Remove validation for labels to be accepted in the Alertmanager, This helps with datasources that produce non-compatible labels.

Adds an "object_matchers" to alert manager routers so we can support labels names with extended characters beyond prometheus/openmetrics. It only does this for the internal Grafana managed Alert Manager.

This requires a change to alert manager, so for now we use grafana/alertmanager which is a slight fork, with the intention of going back to upstream.

The frontend handles the migration of "matchers" -> "object_matchers" when the route is edited and saved. Once this is done, downgrades will not work old versions will not recognize the "object_matchers".

Co-authored-by: Kyle Brandt <kyle@grafana.com>
Co-authored-by: Nathan Rodman <nathanrodman@gmail.com>
(cherry picked from commit 6572017ec7)

cleanup

Co-authored-by: gotjosh <josue@grafana.com>
2021-10-04 09:07:04 -07:00
Grot (@grafanabot)
b4016187ff Doc: Updated Azure AD OAuth2 authentication topic. (#39609) (#39964)
* Updated topic.

* Added bookmarks.

* Update docs/sources/auth/azuread.md

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

* Update docs/sources/auth/azuread.md

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

* Update docs/sources/auth/azuread.md

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

* Fixed bulleted list.

* Updated list again.

* Format change.

* Removed spaces.

* Run prettifier to fix whitespace issues.

Co-authored-by: Fiona Artiaga <89225282+GrafanaWriter@users.noreply.github.com>
(cherry picked from commit 991b5fee3d)

Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
2021-10-04 11:50:19 -04:00
Grot (@grafanabot)
045146184a CloudWatch Logs: Skip caching for Log queries (#39860) (#39893)
* Add x-skip-cache header to queries

* Specify caching works for CW metrics

(cherry picked from commit 3e47fb1432)

Co-authored-by: Andrej Ocenas <mr.ocenas@gmail.com>
2021-10-04 12:34:36 +02:00
Grot (@grafanabot)
2ecde07356 [v8.2.x] CloudWatch Logs: Docs for X-Ray links (#39894)
* CloudWatch Logs: Docs for X-Ray links  (#39725)

(cherry picked from commit 0b89bdd47d)

* Docs: Lint CloudWatch index page

Co-authored-by: Andrej Ocenas <mr.ocenas@gmail.com>
Co-authored-by: Piotr Jamróz <pm.jamroz@gmail.com>
2021-10-04 12:03:36 +02:00
Grot (@grafanabot)
8dd5e88f92 Docs: Move image renderer doc to its own section and add configuration doc (#38759) (#39896)
* Move image renderer doc to its own section and add configuration doc

* revert unwanted changes

* remove unwanted formatting

* revert change

* Improve configuration section

* update default flags for 3.1.0 update

* Clean up and add some links

* fix broken links

* clean up notes & links and small updates

* fix after merge

* fix broken link

* fix typo

* Apply suggestions from code review

Co-authored-by: Ursula Kallio <73951760+osg-grafana@users.noreply.github.com>
Co-authored-by: Mitch Seaman <mjseaman@users.noreply.github.com>

* Apply PR feedback

* Update monitoring.md

* Apply suggestions from code review

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

* Update troubleshooting.md

* add alias for old image rendering doc page

Co-authored-by: Ursula Kallio <73951760+osg-grafana@users.noreply.github.com>
Co-authored-by: Mitch Seaman <mjseaman@users.noreply.github.com>
Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
(cherry picked from commit b7eac0f655)

Co-authored-by: Agnès Toulet <35176601+AgnesToulet@users.noreply.github.com>
Co-authored-by: Agnès Toulet <agnes.toulet@gmail.com>
2021-10-04 09:23:10 +02:00
Grot (@grafanabot)
439b1b7310 A11y: Fix fastpass issues for /org/ pages (#39902) (#39916)
* A11y: Fix fastpass issues for /org/ pages
See #39429

(cherry picked from commit 816d70a7e5)

Co-authored-by: kay delaney <45561153+kaydelaney@users.noreply.github.com>
2021-10-04 10:01:01 +03:00
Grot (@grafanabot)
76ecd3759b Fix folder icons for alert rules (#39873) (#39891)
(cherry picked from commit 0f42b37e21)

Co-authored-by: Noah van der Aa <ndvdaa@gmail.com>
2021-10-01 21:30:21 +02:00
Grot (@grafanabot)
ab53001fd2 Plugins Catalog: fix overflowing text in plugin cards (#39862) (#39866)
* refactor(Plugins/Admin): add a "badge" for displaying available updates

* refactor(Plugins/Admin): rename component

* refactor(Plugins/Admin): use the PluginListItemBadges component

(cherry picked from commit 3ad5ee87a3)

Co-authored-by: Levente Balogh <balogh.levente.hu@gmail.com>
2021-10-01 17:37:20 +02:00
Grot (@grafanabot)
ea030e8bbd Prometheus: metrics browser: handle label values with special characters (#39713) (#39858)
* prometheus: handle label-values with special characters

* added comment

(cherry picked from commit d363c36853)

Co-authored-by: Gábor Farkas <gabor.farkas@gmail.com>
2021-10-01 16:11:03 +02:00
Grot (@grafanabot)
5d2fb57dd8 Plugins: Mock Icon component to prevent console errors (#39901) (#39909)
* feat(grafana-ui): externalise react-inlinesvg for mocking

* feat(grafana-toolkit): mock react-inlinesvg to prevent svg fetch errors in tests

* test(toolkit): remove assertion on array length of moduleNameMapper overrides

* feat(toolkit): set testId to match the Icon name prop in react-inlinesvg mock

(cherry picked from commit cc7f7e30e9)

Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com>
2021-10-01 15:54:19 +02:00
Grot (@grafanabot)
5166c3c8bb A11y: Fix fastpass issues for /org/teams pages (#39848) (#39864)
* A11y: Fix fastpass issues for /org/teams pages
See #39429

(cherry picked from commit 451d023c79)

Co-authored-by: kay delaney <45561153+kaydelaney@users.noreply.github.com>
2021-10-01 14:32:51 +01:00
Grot (@grafanabot)
05c0e83802 DashboardList/AlertList: Fix for missing All folder value (#39772) (#39886)
* DashboardList/AlertList: Fix for missing All folder value

* Refactor: Fixes case where folder does not exist in results

(cherry picked from commit 7c7b21b39e)

Co-authored-by: Hugo Häggmark <hugo.haggmark@grafana.com>
2021-10-01 13:38:38 +02:00
Grot (@grafanabot)
c61395d7dc ReleaseNotes: Updated changelog and release notes for 8.2.0-beta2 (#39832) (#39851)
* ReleaseNotes: Updated changelog and release notes for 8.2.0-beta2

* Update _index.md

* Fix linting errors

* Update CHANGELOG.md

Co-authored-by: Ursula Kallio <73951760+osg-grafana@users.noreply.github.com>

Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
Co-authored-by: Ivana <ivana.huckova@gmail.com>
Co-authored-by: Gábor Farkas <gabor.farkas@gmail.com>
Co-authored-by: Ursula Kallio <73951760+osg-grafana@users.noreply.github.com>
(cherry picked from commit 58aa595527)
2021-09-30 15:02:14 +02:00
Grot (@grafanabot)
a2306d2765 "Release: Updated versions in package to 8.2.0-beta.2" (#39831) 2021-09-30 10:49:00 +02:00
Grot (@grafanabot)
229c45ccda Add fiscal years and search to time picker (#39073) (#39828)
* Add search to time picker

* implement fiscal datemath

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

Co-authored-by: Oscar Kilhed <oscar.kilhed@grafana.com>
2021-09-30 10:07:24 +02:00
Grot (@grafanabot)
1126ea6539 Graphite: Ensure only valid queries are used for interpolation (#39761) (#39827)
* Graphite: Ensure only valid queries are used for interpolation

* Add a unit test

(cherry picked from commit 787e5e78dd)

Co-authored-by: Piotr Jamróz <pm.jamroz@gmail.com>
2021-09-30 10:00:06 +02:00
Grot (@grafanabot)
06015fbdaf Explore: Fix displaying rich history saving error message (#39766) (#39826)
* Explore: Fix displaying rich history saving error message

* Keep generic error message

* remove testing snippet

(cherry picked from commit f8ebcaa0d9)

Co-authored-by: Piotr Jamróz <pm.jamroz@gmail.com>
2021-09-30 09:52:18 +02:00
Grot (@grafanabot)
dc363a05ac A11y: Fixes some fastpass errors for /datasources/* routes (#39577) (#39797)
* A11y: Fixes some fastpass errors for /datasources/* routes
See #39429

(cherry picked from commit 75a55379f1)

Co-authored-by: kay delaney <45561153+kaydelaney@users.noreply.github.com>
2021-09-30 09:24:26 +02:00
Grot (@grafanabot)
70a4fd8a21 Plugins Catalog: Make the catalog the default way to interact with plugins (#39779) (#39822)
* chore(Plugins/Admin): make the Plugins Catalog the default way to interact with plugins

* chore(defaults.ini): change the default value for `plugin_admin_enabled`

* test(Plugins): make the tests pass

(cherry picked from commit c2754eb9cc)

Co-authored-by: Levente Balogh <balogh.levente.hu@gmail.com>
2021-09-30 09:05:55 +02:00
Torkel Ödegaard
91db8910a7 Chore: Tidy up emotion css with better theme breakpoint (#39340) (#39811)
(cherry picked from commit f3475b864c)

Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2021-09-29 20:41:02 +02:00
Grot (@grafanabot)
e69544b6ea Scatter: support bubble and line charts with out-of-order data (alpha) (#39377) (#39809)
Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
(cherry picked from commit 4c8c2f6c96)

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2021-09-29 19:42:50 +02:00
Grot (@grafanabot)
c6fb06721f DashboardRow: Prevent unintended editing of DashboardRow with keyboard shortcut 'e' (#39792) (#39803)
(cherry picked from commit ff009bee9f)

Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2021-09-29 18:11:20 +02:00
Grot (@grafanabot)
900c94fd8a Admin: Show licensed roles and unit membership in UI (#39773) (#39802)
* Extend User type

* Render licensed roles and org units

* Combine admin icon with units

* Extract search users to a new service

* Fix wire provider

* remove mock data

* Fix icon margin

* Fix common_test and remove RouteRegister

* Remove old endpoints

* Fix test

* Add indexes to dashboards and orgs tables

* Fix lint

* Revert docs changes

* undo docs formatting

* Change order of input and filters

* Abstract aria-label into a function

* Add accessible info about user's membership

* UI tweaks

Co-authored-by: spinillos <selenepinillos@gmail.com>
(cherry picked from commit 62dc10829a)

Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>
2021-09-29 18:00:15 +02:00
Grot (@grafanabot)
d6b00710cb PluginsCatalog: Add support for viewing the plugins list as both table and list (#39466) (#39798)
* working version but with duplications.

* refactor(Plugins/Admin): use "fr" instead of "repeat" for grid columns

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

* fix(Plugins/Admin): use PluginIconName instead of IconName

* refactor(Plugins/Admin): store the display-mode on the state

* refactor(Plugins/Admin): use && for conditional rendering

* refactor(Plugins/Admin): rename variable

* refactor(Plugins/Admin): share code between card and row components

* test(PluginListItemRow): add tests

* test(Plugins/Admin): add a simple test for the display-mode switching

* fix(Plugins/Admin): compose styles with css``

* refactor(Plugins/Admin): rename "table" to "grid" for display modes

* test(Plugins/Browse): follow up on renaming "table" to "grid"

Co-authored-by: Levente Balogh <balogh.levente.hu@gmail.com>
Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com>
(cherry picked from commit 2dedbcd3c3)

Co-authored-by: Marcus Andersson <marcus.andersson@grafana.com>
2021-09-29 17:56:43 +02:00
Grot (@grafanabot)
4fe38b169c Docs: Add docs for Redis cluster caching backend configuration (#39687) (#39800)
* caching: add docs for redis cluster config

* address PR comments

Co-authored-by: Ursula Kallio <73951760+osg-grafana@users.noreply.github.com>

Co-authored-by: Ursula Kallio <73951760+osg-grafana@users.noreply.github.com>
(cherry picked from commit 9f1de095b7)

Co-authored-by: Todd Treece <360020+toddtreece@users.noreply.github.com>
2021-09-29 17:56:19 +02:00
Grot (@grafanabot)
bd12923c59 E2E: improvements to the importDashboard flow (#39693) (#39790)
* E2E: improvements to the importDashboard flow

(cherry picked from commit aeeaa67b0a)

Co-authored-by: Sarah Zinger <sarahzinger@users.noreply.github.com>
2021-09-29 11:53:32 -04:00
Grot (@grafanabot)
9570495af5 A11y: Fix fastpass issues for /explore page (#39507) (#39796)
* Fix(A11y): add label to explore short url button

* Grafana-UI(A11y): Set Selects images alt attribute to their option label

* Update packages/grafana-ui/src/components/Select/SingleValue.tsx

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

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

Co-authored-by: Giordano Ricci <me@giordanoricci.com>
2021-09-29 17:46:03 +02:00
Sofia Papagiannaki
368742ab04 Alerting: Remove ngalert feature toggle and introduce two new settings for enabling Grafana 8 alerts and disabling them for specific organisations (#38746) (#39793)
* Remove `ngalert` feature toggle

* Update frontend

Remove all references of ngalert feature toggle

* Update docs

* Disable unified alerting for specific orgs

* Add backend tests

* Apply suggestions from code review

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

* Disabled unified alerting by default

* Ensure backward compatibility with old ngalert feature toggle

* Apply suggestions from code review

Co-authored-by: gotjosh <josue@grafana.com>
(cherry picked from commit 012d4f0905)
2021-09-29 11:21:25 -04:00
Selene
d07ed05918 Extract search users functions into a service (#39002) (#39770)
* Extract search users to a new service

* Fix wire provider

* Fix common_test and remove RouteRegister

* Remove old endpoints

* Fix test

* Add indexes to dashboards and orgs tables

* Fix lint

(cherry picked from commit 02702eb82d)
2021-09-29 17:02:58 +02:00
Grot (@grafanabot)
4699620e23 Plugin Catalog: support Grafana instances that cannot communicate with gcom (#39638) (#39787)
* added possibility to track if remote plugins could be fetched.

* adding hook to detect if remote plugins are available.

* feat(catalog): disable installed/all filter if remote plugins are unavailable

* feat(Plugins/Admin): hide the install controls if GCOM is not available

* refactor(Plugins/Admin): group `@grafana` dependencies

* fix(Plugins/Admin): don't show an error alert if a remote plugin is not available

* feat(Plugins/Admin): prefer to use the local version of the readme

* chore(Plugins/Admin): type the mocked state properly

* test(Plugins/Admin): add tests for the Plugin Details when GCOM is not available

* test(Plugins/Admin): add tests for the Browse when GCOM is not available

Co-authored-by: Marcus Andersson <marcus.andersson@grafana.com>
Co-authored-by: Levente Balogh <balogh.levente.hu@gmail.com>
(cherry picked from commit fffcee7c1f)

Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com>
2021-09-29 16:44:57 +02:00
Grot (@grafanabot)
09461d03ea Update migration to not delete existing Grafana alerts (#39541) (#39736)
* keep existing unified alert rules untouched
* move silences and other alertmanager files to the organization directory (only if it is a single organization deployment)
* assign the existing notification settings and routes to the first organization
* create default notification settings for each organization in the case of multi org deployment

(cherry picked from commit 5d0d7dcb3a)

Co-authored-by: Yuriy Tseretyan <yuriy.tseretyan@grafana.com>
2021-09-29 09:27:44 -04:00
Grot (@grafanabot)
c7e9b1685c OrgPage: Minor typo fix (#39764) (#39777)
(cherry picked from commit 630a120a15)

Co-authored-by: Oscar Kilhed <oscar.kilhed@grafana.com>
2021-09-29 14:37:20 +02:00
Grot (@grafanabot)
20212aaf97 BarGauge: Improve behaviour when working with streaming data (#39737) (#39765)
* BarGauge: Improve behaviour when working with streaming data

* BarGauge: Refactor default min/max into grafana/data

(cherry picked from commit 2058193e98)

Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2021-09-29 11:39:55 +02:00
Grot (@grafanabot)
832321b405 add support for interaction events (#39752) (#39762)
(cherry picked from commit db8c9122aa)

Co-authored-by: Erik Sundell <erik.sundell@grafana.com>
2021-09-29 11:28:15 +02:00
Grot (@grafanabot)
f4bd6d4f84 Docs: alerting fixes (#39717) (#39730)
* Docs: alerting fixes

(cherry picked from commit eead8cd8e1)

Co-authored-by: Sofia Papagiannaki <papagian@users.noreply.github.com>
2021-09-29 12:22:06 +03:00
Grot (@grafanabot)
805cbba81d TimeSeries: Fix shared cursor (#39738) (#39760)
(cherry picked from commit 4682cf5b7c)

Co-authored-by: Zoltán Bedi <zoltan.bedi@gmail.com>
2021-09-29 10:58:14 +02:00
Grot (@grafanabot)
f793c0d2fc Table panel: Make filter case insensitive (#39746) (#39757)
* Expose FilterInput from grafana/ui

* Make table filter case insensitive

* Update packages/grafana-ui/src/components/Table/FilterList.tsx

Co-authored-by: Hugo Häggmark <hugo.haggmark@grafana.com>

Co-authored-by: Oscar Kilhed <oscar.kilhed@grafana.com>
Co-authored-by: Hugo Häggmark <hugo.haggmark@grafana.com>
(cherry picked from commit f887576a27)

Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
2021-09-29 10:05:50 +02:00
Grot (@grafanabot)
b82bc90180 Hooks: Adding possibility to display banner on the top of the page (#39099) (#39755)
* adding working version of notificaion banner trigger.

* Move it to enterprise

* Fixing csss, none of the pages showed our CustomScrollbar or had double scrollbars

* fixing explore

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

Co-authored-by: Marcus Andersson <marcus.andersson@grafana.com>
2021-09-29 08:29:45 +02:00
Grot (@grafanabot)
b37d4152d8 AzureMonitor: move metric deep link code to backend (#39524) (#39727)
(cherry picked from commit bf9be975ac)

Co-authored-by: Isabella Siu <sakurablossom@blueblueworld.com>
2021-09-28 14:31:47 -04:00
Grot (@grafanabot)
2cd112b9da Alerting: Add filtering for Silences (#39109) (#39452)
* Add filtering for Silences page

* Add tests Silences and SilenceEditor

* pr feedback: add field validation and test refactor

* Add test for checking content

* fix overflow for validation error message

* increase login threshold for pa11y

* Make silence filter state its own type and function

(cherry picked from commit d03f75726b)

Co-authored-by: Nathan Rodman <nathanrodman@gmail.com>
2021-09-28 10:35:27 -07:00
Grot (@grafanabot)
e426039d6c Tempo: Improve search form defaults and validation (#39534) (#39749)
* Tempo: add default limit, option to hide Loki search, and run query on hotkey in dropdowns

(cherry picked from commit 06592410b2)

Co-authored-by: Connor Lindsey <cblindsey3@gmail.com>
2021-09-28 11:20:49 -06:00
Grot (@grafanabot)
f28d869db2 Tempo: Show warning if search is not available. Add opt-out config (#39489) (#39747)
* Tempo: Show warning if search is not available. Add opt-out config

(cherry picked from commit 24479ff6b0)

Co-authored-by: Connor Lindsey <cblindsey3@gmail.com>
2021-09-28 10:52:14 -06:00
Grot (@grafanabot)
618a590a05 Tempo: Improve how Tempo Search fetches autocomplete values (#39371) (#39745)
* Improve how tempo search fetches autocomplete values

* Refetch autocomplete options on menu load

(cherry picked from commit 1865689411)

Co-authored-by: Connor Lindsey <cblindsey3@gmail.com>
2021-09-28 10:20:43 -06:00
Grot (@grafanabot)
ce5fe730b8 Tempo: Format tempo search query history text (#39250) (#39743)
* Format tempo search query history text

(cherry picked from commit c57ff8beed)

Co-authored-by: Connor Lindsey <cblindsey3@gmail.com>
2021-09-28 10:13:15 -06:00
Grot (@grafanabot)
6648f8c5a1 Tempo: Run search query with keyboard shortcut from input fields (#39247) (#39741)
* Tempo: Run query with keyboard shortcut from duration fields

(cherry picked from commit 9c4e7eb659)

Co-authored-by: Connor Lindsey <cblindsey3@gmail.com>
2021-09-28 09:50:05 -06:00
Grot (@grafanabot)
d38782bc94 grafana-ui: Improve PartialHighlighter error handling (#39685) (#39739)
* Improve PartialHighlighter error handling

(cherry picked from commit 05bb451a1d)

Co-authored-by: Connor Lindsey <cblindsey3@gmail.com>
2021-09-28 09:45:15 -06:00
Grot (@grafanabot)
2e86425ed9 Alerting: Move alertmanager default config to UnifiedAlertingSettings (#39597) (#39714)
(cherry picked from commit 05eb30e323)

Co-authored-by: Yuriy Tseretyan <yuriy.tseretyan@grafana.com>
Co-authored-by: Sofia Papagiannaki <sofia@grafana.com>
2021-09-28 11:01:18 -04:00
Grot (@grafanabot)
5aaef25a33 Alerting: Optimization of fetching data in multiorg alertmanager (#39237) (#39720)
* Add method GetAllLatestAlertmanagerConfiguration to DBStore
* add method ApplyConfig to AlertManager
* update multiorg alert manager to load all alertmanager configs at once

(cherry picked from commit 1910d85ae0)

Co-authored-by: Yuriy Tseretyan <yuriy.tseretyan@grafana.com>
2021-09-28 09:05:22 -04:00
Grot (@grafanabot)
35dad9c267 Provide reader to alertmanager silence instead of file path (#39305) (#39721)
(cherry picked from commit e1aae0549e)

Co-authored-by: Yuriy Tseretyan <tceretian@gmail.com>
2021-09-28 09:04:22 -04:00
Grot (@grafanabot)
c2d95d4d01 Alerting: Prevent preview if no condition is set (#39659) (#39706)
* prevent preview if no condition is set

* fixes after pr feedback

* watch on type and condition

(cherry picked from commit cc94c55e48)

Co-authored-by: Peter Holmberg <peterholmberg@users.noreply.github.com>
2021-09-28 14:24:19 +02:00
Sofia Papagiannaki
c89e1236fe Alerting: tune rule evaluation via configuration (#35623) (#39712)
* Alerting: Configure max evaluation retries

* Alerting: Enforce minimum rule evaluation interval

* Alerting: Disable rule evaluation from configuration

* Update docs

* Alerting: Configure rule evaluation timeout

* Move options on unified_alerting config section

* Apply suggestions from code review

Co-authored-by: gotjosh <josue@grafana.com>
(cherry picked from commit f6f3a54742)
2021-09-28 14:58:31 +03:00
Grot (@grafanabot)
3d76c772be Plugin Catalog: Use routing for PluginDetails Tabs (#39555) (#39680)
* feat(catalog): introduce id and href to PluginDetailsTabs

* feat(catalog): add hrefs and ids to PluginDetails tabs. Pass queryParams to PluginDetailsBody

* feat(catalog): pass queryParams to PluginsDetailsBody and add page param to PluginListCard

* fix(catalog): prevent flicker of content by waiting for fetch details to finish loading

* feat(catalog): add tab icons to PluginDetails page

* feat(catalog): make breadcrumbs in PluginDetailsHeader aware of page queryparam

* fix(catalog): fix deeplinking to PluginDetails by comparing tabs length

* test(catalog): update tests with correct props and wrap in router

(cherry picked from commit 4dc556445c)

Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com>
2021-09-28 12:00:49 +02:00
Grot (@grafanabot)
1feb7ce022 Plugins Catalog: Remove notice asking user to refresh browser (#39592) (#39681)
(cherry picked from commit 6eceb69d43)

Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com>
2021-09-28 12:00:00 +02:00
Grot (@grafanabot)
2089b58def Loki: Fix creating coontext query for logs with parsed labels (#39648) (#39705)
(cherry picked from commit 79c797c232)

Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
2021-09-28 11:14:49 +02:00
Grot (@grafanabot)
f3479aad2b Add orientation prop to Gauge panel (#39682) (#39698)
(cherry picked from commit 0bb426ec33)

Co-authored-by: Torkel Ödegaard <torkel@grafana.org>
2021-09-28 09:51:14 +02:00
Grot (@grafanabot)
6c92beb7fe Variables: Prevents enter key from refreshing page or changing focus (#39666) (#39697)
(cherry picked from commit 9a178e7ba9)

Co-authored-by: Hugo Häggmark <hugo.haggmark@grafana.com>
2021-09-28 06:41:28 +02:00
Grot (@grafanabot)
06cb288848 Alerting: Move spammy log line to debug in the state manager (#39410) (#39434)
(cherry picked from commit fcbcfd232b)

Co-authored-by: gotjosh <josue@grafana.com>
2021-09-27 15:36:52 +01:00
Grot (@grafanabot)
cac03cc7fe Elasticsearch/Prometheus: Set correct service namespace for SigV4 (#39439) (#39652)
Makes sure to set the SigV4 service namespace for Elasticsearch and Prometheus.

Fixes #38440

(cherry picked from commit 45a844e77e)

Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
2021-09-27 15:18:35 +02:00
Grot (@grafanabot)
ea57ae7470 Update lockfile to correct output after running yarn install (#39646) (#39651)
* Update lockfile to correct output after running `yarn install`

* Chore: Remove caniuse-db since nothing is using it anymore

(cherry picked from commit bbf64722e4)

Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2021-09-27 15:13:41 +02:00
Grot (@grafanabot)
bbfb211408 Plugins Catalog: update the available panels on install/uninstall (#39293) (#39405)
* feat(Plugins/Admin): add a function to update panels

* fix(Plugins/Admin): update the available panels on plugin install / uninstall

(cherry picked from commit c8e94a2443)

Co-authored-by: Levente Balogh <balogh.levente.hu@gmail.com>
2021-09-27 13:50:56 +02:00
Grot (@grafanabot)
07de5e5a5d Bump tmpl from 1.0.4 to 1.0.5 (#39475) (#39644)
Bumps [tmpl](https://github.com/daaku/nodejs-tmpl) from 1.0.4 to 1.0.5.
- [Release notes](https://github.com/daaku/nodejs-tmpl/releases)
- [Commits](https://github.com/daaku/nodejs-tmpl/commits/v1.0.5)

---
updated-dependencies:
- dependency-name: tmpl
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
(cherry picked from commit 057c9a4fe1)

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-09-27 13:10:02 +02:00
Grot (@grafanabot)
7d9308113a Bump prismjs from 1.24.0 to 1.25.0 (#39450) (#39645)
Bumps [prismjs](https://github.com/PrismJS/prism) from 1.24.0 to 1.25.0.
- [Release notes](https://github.com/PrismJS/prism/releases)
- [Changelog](https://github.com/PrismJS/prism/blob/master/CHANGELOG.md)
- [Commits](https://github.com/PrismJS/prism/compare/v1.24.0...v1.25.0)

---
updated-dependencies:
- dependency-name: prismjs
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
(cherry picked from commit 0e60abfe00)

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-09-27 13:09:31 +02:00
Grot (@grafanabot)
5ce3c48c8c InfluxDB: Flux: make $__interval and $__interval_ms work in alerting (#38889) (#39642)
* influxdb: flux: handle $__interval and $__interval_ms in alert-queries

* influxdb: flux: do not handle interval-variable in the frontend

* $__interval should be rounded

* added comment

(cherry picked from commit 9f027e32b7)

Co-authored-by: Gábor Farkas <gabor.farkas@gmail.com>
2021-09-27 12:32:54 +02:00
Grot (@grafanabot)
e90558d3b3 Fix: State timeline panel tooltip error when data is not in sync (#39438) (#39634)
* Fix: State timeline panel tooltip error when data is not in sync

* Move check from tooltip to panel

(cherry picked from commit 24475cfdda)

Co-authored-by: Zoltán Bedi <zoltan.bedi@gmail.com>
2021-09-27 10:15:27 +02:00
Grot (@grafanabot)
e7ca31214b Live: disable centrifuge-js debug mode (#39625) (#39626)
(cherry picked from commit 1d1da09568)

Co-authored-by: Alexander Emelin <frvzmb@gmail.com>
2021-09-26 20:48:56 -07:00
Grot (@grafanabot)
fee11227da PanelOptions: fix array with siblings (#39620) (#39623)
(cherry picked from commit c9ae46a9ad)

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2021-09-25 17:58:09 +02:00
Grot (@grafanabot)
258f3eae32 Options: support array value paths for panel options (#39499) (#39596)
(cherry picked from commit 01deae2105)

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2021-09-23 10:58:14 -07:00
Grot (@grafanabot)
ac1ca2e4b5 Update PageToolbar.tsx (#39572) (#39585)
(cherry picked from commit 0229146c3b)

Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2021-09-23 16:02:47 +02:00
Grot (@grafanabot)
1fc22f6e4d BarGauge: Set cell color to off if numeric value is NaN (#39574) (#39580)
* BarGauge: Set cell color to off if numeric value is NaN

* BarGauge: Pull getCellColor out into a pure function and add unit tests

(cherry picked from commit 6948dbe550)

Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2021-09-23 14:59:52 +02:00
Oscar Kilhed
fa6c44b12a Remove ? as header for piechart table legend (#39521) (#39571)
(cherry picked from commit 71122930b9)
2021-09-23 14:21:31 +02:00
Grot (@grafanabot)
53a11de774 Cleanup kv_store alertmanager namespace when disabling unified alerting (#39554) (#39576)
(cherry picked from commit ba4242bdb9)

Co-authored-by: Sofia Papagiannaki <papagian@users.noreply.github.com>
2021-09-23 13:53:51 +02:00
Grot (@grafanabot)
4ffa29d959 Fix alerts with evaluation interval more than 30 seconds resolving in Alertmanager (#39513) (#39523)
(cherry picked from commit 27609dc2c5)

Co-authored-by: George Robinson <george.robinson@grafana.com>
2021-09-23 13:06:27 +02:00
Grot (@grafanabot)
22563454b7 Variables: Prevents panel from crashing when using adhoc variable in data links (#39546) (#39568)
* Variables: Prevents panel from crashing when using adhoc variable in data links

* Refactor: uses isAdhoc instead

* Chore: updates after PR feedback

(cherry picked from commit af5296bee7)

Co-authored-by: Hugo Häggmark <hugo.haggmark@grafana.com>
2021-09-23 12:24:24 +02:00
Grot (@grafanabot)
345fb89699 Dashboard: Short url generation works for variables values with spaces (#39552) (#39567)
(cherry picked from commit 65d79d9a30)

Co-authored-by: Hugo Häggmark <hugo.haggmark@grafana.com>
2021-09-23 12:20:47 +02:00
Grot (@grafanabot)
5bf35bd49e influxdb: flux: use more precise start and end timestamps (#39415) (#39520)
* influxdb: flux: use more precise start and end timestamps

* added unit test

(cherry picked from commit bf0dc3ef62)

Co-authored-by: Gábor Farkas <gabor.farkas@gmail.com>
2021-09-23 12:13:55 +02:00
Grot (@grafanabot)
aa2dbd63f3 PieChart: Filter NaN values from total calculation (#39503) (#39509)
* Filter NaN values from total calculation

* remove duplicated code, use missing value string for NaN and hidden series

(cherry picked from commit a1d8d6e95e)

Co-authored-by: Oscar Kilhed <oscar.kilhed@grafana.com>
2021-09-23 12:00:36 +02:00
Grot (@grafanabot)
4d1969c9c4 Alerting: fix the migrated silence file content (#39557) (#39564)
(cherry picked from commit 81e82ebbbd)

Co-authored-by: Sofia Papagiannaki <papagian@users.noreply.github.com>
2021-09-23 11:49:22 +02:00
Grot (@grafanabot)
5003b911e2 VersionHistory: Remove global scss causing conflicts elsewhere (#39437) (#39560)
(cherry picked from commit 4aed940738)

Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2021-09-23 11:24:55 +02:00
Grot (@grafanabot)
ef7a2bda39 PieChart: Fix sorting for null values in piechart (#39516) (#39556)
* Fix sorting for null values in piechart

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

Co-authored-by: Oscar Kilhed <oscar.kilhed@grafana.com>
2021-09-23 11:10:24 +02:00
Grot (@grafanabot)
1b8255e317 A11y: Fix fastpass issues for /admin/* pages (#39435) (#39535)
* A11y: Fix fastpass issues for /admin/* pages
See #39429

(cherry picked from commit 00dad0f4e8)

Co-authored-by: kay delaney <45561153+kaydelaney@users.noreply.github.com>
2021-09-22 23:35:05 +01:00
Grot (@grafanabot)
d343d2242d CloudMonitoring: Fix INT64 label unmarshal error (#39441) (#39528)
(cherry picked from commit f76a11c955)

Co-authored-by: Benedikt Spellmeyer <b.spellmeyer@googlemail.com>
2021-09-22 17:42:15 +02:00
Ashley Harrison
a0fe59adef Chore(Navigation): Rename SideMenu -> NavBar (#39483) (#39525)
(cherry picked from commit a4d41d35d0)
2021-09-22 15:38:20 +01:00
Grot (@grafanabot)
04900c63f0 Plugins Catalog: add a few more tests (#39433) (#39470)
* refactor(Plugins/Admin): add an extra line-break between tests

* test(Plugins/Admin): add a couple of more tests for Plugin Details

* fix(Plugins/Admin): fix accidental linting issue

(cherry picked from commit 660afc6279)

Co-authored-by: Levente Balogh <balogh.levente.hu@gmail.com>
2021-09-22 13:46:22 +02:00
Grot (@grafanabot)
e4862a64f7 Explore: prevent eplore from hiding errors containing refId (#39504) (#39508)
* Explore: prevent eplore from hiding errors containing refId

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

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

Co-authored-by: Gábor Farkas <gabor.farkas@gmail.com>
(cherry picked from commit 5f48d0641b)

Co-authored-by: Giordano Ricci <me@giordanoricci.com>
2021-09-22 11:59:38 +02:00
Grot (@grafanabot)
036db0f9d0 Plugins Catalog: add unit tests for data-munging (#39338) (#39432)
* test(Plugins/Admin): add tests for the helper functions

* chore(Plugins/Admin): add `error` field to the CatalogPlugin mock

* test(Plugins/Admin): add new properties `error` & `isDisabled` to test expectations

* refactor(Plugins/Admin): make the `errors` param optional everywhere

* fix(Plugins/Admin): fix a rebase bug

(cherry picked from commit fef8e646ea)

Co-authored-by: Levente Balogh <balogh.levente.hu@gmail.com>
2021-09-22 11:06:07 +02:00
Grot (@grafanabot)
9b9b7e5a45 CloudWatch: Add AWS Gateway ELB metrics and dimensions (#39490) (#39502)
(cherry picked from commit dfb8a4cd13)

Co-authored-by: Ilya Stoliar <52413756+ilyastoli@users.noreply.github.com>
2021-09-22 10:41:48 +02:00
Grot (@grafanabot)
793cd39af3 [v8.2.x] docs: removed nonsense line from standard-options.md (#39383)
* docs: removed nonsense line from standard-options.md (#39381)

(cherry picked from commit 85391c59d0)

* Added extra space.

* Removed space.

Co-authored-by: Nick Reilingh <nreiling@bard.edu>
Co-authored-by: achatterjee-grafana <aparajita.chatterjee@grafana.com>
2021-09-21 10:17:34 -04:00
Grot (@grafanabot)
f5be918e49 Use sdk pkg for gtime (#39354) (#39468)
(cherry picked from commit 64c8d32fe7)

Co-authored-by: Andres Martinez Gotor <andres.martinez@grafana.com>
2021-09-21 13:41:31 +02:00
Grot (@grafanabot)
698c13482a Fix Query Editor Row horizontal overflow (#39419) (#39460)
(cherry picked from commit 42b1fa0f62)

Co-authored-by: Giordano Ricci <me@giordanoricci.com>
2021-09-21 12:18:24 +01:00
Grot (@grafanabot)
88ea42ab9c Chore: Add go-redis v8 dependency (#39442) (#39448)
* adds redis v8 client dependency

* remove go-redis v5 dependency

(cherry picked from commit 1781c8ec7d)

Co-authored-by: Todd Treece <360020+toddtreece@users.noreply.github.com>
2021-09-20 22:52:18 +02:00
Grot (@grafanabot)
9ae43a7aaa Schema: unify bar/point/etc visibility modes (#39378) (#39446)
(cherry picked from commit ad3c7529b0)

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2021-09-20 21:52:52 +02:00
Grot (@grafanabot)
ee7c12592d Live: show popup if local changes exist (#36093) (#39440)
* change tracker

* not needed

(cherry picked from commit a6fbb8d724)

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2021-09-20 18:54:51 +02:00
Grot (@grafanabot)
17a5142901 Plugins Catalog: Fix a11y issues (#39407) (#39416)
* refactor(catalog): fix a11y issues in Browse and PluginListCard

* test(catalog): fix failing PluginListCard tests

(cherry picked from commit 4a11d0dab9)

Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com>
2021-09-20 15:48:28 +02:00
Grot (@grafanabot)
9e825719f6 prometheus: monaco: do not recalculate not-changing function-list (#39406) (#39413)
(cherry picked from commit dc61edc8ac)

Co-authored-by: Gábor Farkas <gabor.farkas@gmail.com>
2021-09-20 14:03:28 +02:00
Grot (@grafanabot)
10c44b4f8d Alerting: Move the unified alerting settings to its own struct (#39350) (#39400)
(cherry picked from commit 2ad82b9354)

Co-authored-by: gotjosh <josue@grafana.com>
2021-09-20 11:02:07 +01:00
Grot (@grafanabot)
395730e2f7 Publishing packages: Add grafana/schema (#39317) (#39325)
(cherry picked from commit 5eb46281a4)

Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
2021-09-20 11:11:53 +02:00
Grot (@grafanabot)
c418e75fcf A11y/Menu: Add keyboard support to Menu component (#38974) (#39403)
(cherry picked from commit d5b885f958)

Co-authored-by: kay delaney <45561153+kaydelaney@users.noreply.github.com>
2021-09-20 09:37:22 +01:00
Grot (@grafanabot)
56db5cc071 Plugins Catalog: show a confirmation modal when uninstalling a plugin (#39244) (#39402)
* feat(Plugins/Admin): show a confirmation modal when uninstalling a plugin

* refactor(Plugins/Admin): use a helper function for showing/hiding the modal

* test(Plugins/Admin): test if the modal disappears after an uninstall

(cherry picked from commit 02f9564607)

Co-authored-by: Levente Balogh <balogh.levente.hu@gmail.com>
2021-09-20 10:14:11 +02:00
Grot (@grafanabot)
e272e239d0 Explore: Fixed default data source loading (#37059) (#39379)
Co-authored-by: Andrej Ocenas <mr.ocenas@gmail.com>
(cherry picked from commit 64f898c5f6)

Co-authored-by: Assaf Dayan <asfdyn@gmail.com>
2021-09-20 10:11:51 +02:00
Grot (@grafanabot)
972ec9cf85 Variables: Prevents unnecessary duplicate requests (#39394) (#39401)
(cherry picked from commit e696a9ab42)

Co-authored-by: Hugo Häggmark <hugo.haggmark@grafana.com>
2021-09-20 09:55:25 +02:00
Grot (@grafanabot)
635e489a59 ConfirmModal: Fix confirm button focus on modal open (#39328) (#39397)
(cherry picked from commit 06012a8da0)

Co-authored-by: Torkel Ödegaard <torkel@grafana.org>
2021-09-20 09:45:43 +02:00
Grot (@grafanabot)
333c1da5c7 PluginsCatalog: adding error information about disabled plugins. (#39171) (#39399)
* added errors in plugin list.

* added error to details page.

* adding badge on details page.

* added some more tests.

* Renamed to disabled and will handle the scenario in the plugin catalog.

* Update public/app/features/plugins/admin/components/PluginDetailsDisabledError.tsx

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

* fixing some nits

* added missing isDisabeld to the mock.

* adding tests to verify scenarios when plugin is disabled.

* fixed issue with formatting after file changed on GH.

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

Co-authored-by: Marcus Andersson <marcus.andersson@grafana.com>
2021-09-20 09:43:24 +02:00
Grot (@grafanabot)
cea17c7e49 ValueMappings: Value mapping and specifying only color should not affect value formatting (decimals, unit, etc) (#39315) (#39398)
(cherry picked from commit a899e9be10)

Co-authored-by: Torkel Ödegaard <torkel@grafana.org>
2021-09-20 09:40:42 +02:00
Grot (@grafanabot)
704ba385aa Make "dist" version of dashboard scuemata directly importable in CUE (#39251) (#39372)
* Update embeds with new paths, remove deprefixing

* Add dist dashboard scuemata, in CUE

Also add tests that ensure all panel plugins with models.cue are
imported by this file, so that we can't go out of sync.

* Remove comment detritus

* Check error return

* Remove hardcoded path prefix from cli validator

(cherry picked from commit 39f2ee7692)

Co-authored-by: sam boyer <sam.boyer@grafana.com>
2021-09-17 17:14:36 -04:00
Grot (@grafanabot)
b21ba77c4f GraphNG: uPlot 1.6.16 (#39260) (#39367)
(cherry picked from commit 474461ba15)

Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
2021-09-17 15:16:36 -05:00
Grot (@grafanabot)
3a002da406 Pipeline: Make Pa11y ci not mandatory on PR stage (#39285) (#39368)
(cherry picked from commit ef36bbbfbd)

Co-authored-by: Maria Alexandra <239999+axelavargas@users.noreply.github.com>
2021-09-17 13:59:10 -05:00
Grot (@grafanabot)
6f52226c66 Alerting: Metrics should have the label org instead of user (#39353) (#39365)
An user within Grafana has a completely different meaning. Multi-tenancy is done via Organizations as a top-level concept.

(cherry picked from commit 35e5bfce40)

Co-authored-by: gotjosh <josue@grafana.com>
2021-09-17 18:52:54 +02:00
Grot (@grafanabot)
ab5ec6e838 namespace should be AWS/Rekognition (#39094) (#39360)
(cherry picked from commit 7d873fa795)

Co-authored-by: Sumit Bopche <sumitbopche01@gmail.com>
2021-09-17 17:52:49 +02:00
Grot (@grafanabot)
71b0ae9094 BarChart: Fix field enumeration for bar value display and legend items (#39308) (#39357)
(cherry picked from commit 29e8728ef0)

Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
2021-09-17 17:23:38 +02:00
Grot (@grafanabot)
3b1abd4bd3 prometheus: monaco-query-field: fix metrics-list (#39347) (#39349)
(cherry picked from commit 73873f99cd)

Co-authored-by: Gábor Farkas <gabor.farkas@gmail.com>
2021-09-17 15:28:35 +02:00
Andres Martinez Gotor
13b8b7721b backport #39322 (#39344) 2021-09-17 15:22:48 +02:00
Grot (@grafanabot)
8a369feb63 Alerting: Support Unified Alerting with Grafana HA (#37920) (#39342)
* Alerting: Support Unified Alerting in Grafana's HA mode.

(cherry picked from commit 7db97097c9)

Co-authored-by: gotjosh <josue@grafana.com>
2021-09-17 13:23:51 +01:00
Grot (@grafanabot)
499b1f4ff2 influxdb: influxql: more robust resultformat-handling (#39330) (#39339)
(cherry picked from commit d116b2d71b)

Co-authored-by: Gábor Farkas <gabor.farkas@gmail.com>
2021-09-17 13:06:44 +02:00
Andres Martinez Gotor
8fcfc4d87e merge main (#39318)
Co-authored-by: Grot (@grafanabot) <43478413+grafanabot@users.noreply.github.com>
2021-09-17 11:23:50 +02:00
Grot (@grafanabot)
c05f195de5 prometheus: monaco: handle multiple query fields at the same time (#39286) (#39320)
(cherry picked from commit 8489575c84)

Co-authored-by: Gábor Farkas <gabor.farkas@gmail.com>
2021-09-17 10:24:18 +02:00
Grot (@grafanabot)
49bec6ce4f prometheus: query-editor: better duration-completions (#39284) (#39314)
(cherry picked from commit f8de33da8d)

Co-authored-by: Gábor Farkas <gabor.farkas@gmail.com>
2021-09-17 09:41:16 +02:00
Grot (@grafanabot)
d8b03490c3 "Release: Updated versions in package to 8.2.0-beta.1" (#39281) 2021-09-16 11:32:27 +02:00
2299 changed files with 68956 additions and 155471 deletions

View File

@@ -1,4 +1,4 @@
# Auto generated binary variables helper managed by https://github.com/bwplotka/bingo v0.5.1. DO NOT EDIT.
# Auto generated binary variables helper managed by https://github.com/bwplotka/bingo v0.4.3. DO NOT EDIT.
# All tools are designed to be build inside $GOBIN.
BINGO_DIR := $(dir $(lastword $(MAKEFILE_LIST)))
GOPATH ?= $(shell go env GOPATH)
@@ -7,22 +7,16 @@ GO ?= $(shell which go)
# Below generated variables ensure that every time a tool under each variable is invoked, the correct version
# will be used; reinstalling only if needed.
# For example for drone variable:
# For example for wire variable:
#
# In your main Makefile (for non array binaries):
#
#include .bingo/Variables.mk # Assuming -dir was set to .bingo .
#
#command: $(DRONE)
# @echo "Running drone"
# @$(DRONE) <flags/args..>
#command: $(WIRE)
# @echo "Running wire"
# @$(WIRE) <flags/args..>
#
DRONE := $(GOBIN)/drone-v1.4.0
$(DRONE): $(BINGO_DIR)/drone.mod
@# Install binary/ries using Go 1.14+ build command. This is using bwplotka/bingo-controlled, separate go module with pinned dependencies.
@echo "(re)installing $(GOBIN)/drone-v1.4.0"
@cd $(BINGO_DIR) && $(GO) build -mod=mod -modfile=drone.mod -o=$(GOBIN)/drone-v1.4.0 "github.com/drone/drone-cli/drone"
WIRE := $(GOBIN)/wire-v0.5.0
$(WIRE): $(BINGO_DIR)/wire.mod
@# Install binary/ries using Go 1.14+ build command. This is using bwplotka/bingo-controlled, separate go module with pinned dependencies.

View File

@@ -1,7 +0,0 @@
module _ // Auto generated by https://github.com/bwplotka/bingo. DO NOT EDIT
go 1.17
replace github.com/docker/docker => github.com/docker/engine v17.12.0-ce-rc1.0.20200309214505-aa6a9891b09c+incompatible
require github.com/drone/drone-cli v1.4.0 // drone

View File

@@ -1,4 +1,4 @@
# Auto generated binary variables helper managed by https://github.com/bwplotka/bingo v0.5.1. DO NOT EDIT.
# Auto generated binary variables helper managed by https://github.com/bwplotka/bingo v0.4.3. DO NOT EDIT.
# All tools are designed to be build inside $GOBIN.
# Those variables will work only until 'bingo get' was invoked, or if tools were installed via Makefile's Variables.mk.
GOBIN=${GOBIN:=$(go env GOBIN)}
@@ -8,7 +8,5 @@ if [ -z "$GOBIN" ]; then
fi
DRONE="${GOBIN}/drone-v1.4.0"
WIRE="${GOBIN}/wire-v0.5.0"

View File

@@ -12,14 +12,7 @@ Dockerfile
docs
dump.rdb
node_modules
**/node_modules
/local
/tmp
*.yml
!.yarnrc.yml
*.md
.yarn/*
!.yarn/patches
!.yarn/releases
!.yarn/plugins
!.yarn/versions
!.yarn/cache

4726
.drone.yml

File diff suppressed because it is too large Load Diff

View File

@@ -6,5 +6,3 @@ devenv
data
dist
e2e/tmp
public/lib/monaco
deployment_tools_config.json

99
.github/CODEOWNERS vendored
View File

@@ -14,20 +14,17 @@
# Documentation owner: Jita Chatterjee
/docs/ @grafana/docs-squad @pkolyvas
/contribute/ @marcusolsson @grafana/docs-squad @pkolyvas
/docs/sources/developers/plugins/ @marcusolsson @grafana/docs-squad @grafana/plugins-platform
/docs/sources/developers/plugins/backend @marcusolsson @grafana/docs-squad @grafana/plugins-platform-backend
/docs/sources/developers/plugins/ @marcusolsson @grafana/docs-squad
/docs/sources/enterprise/ @osg-grafana @grafana/docs-squad
# Backend code
*.go @grafana/backend-platform
go.mod @grafana/backend-platform
go.sum @grafana/backend-platform
/.bingo @grafana/backend-platform
# Continuous Integration
.drone.yml @grafana/grafana-release-eng
.drone.star @grafana/grafana-release-eng
/scripts/drone/ @grafana/grafana-release-eng
.drone.yml @malcolmholmes @dsotirakis @zserge
/scripts/drone/ @malcolmholmes @dsotirakis @zserge
# Cloud Datasources backend code
/pkg/tsdb/cloudwatch @grafana/cloud-datasources @grafana/observability-squad
@@ -43,86 +40,40 @@ go.sum @grafana/backend-platform
/pkg/tsdb/zipkin @grafana/observability-squad
/pkg/tsdb/tempo @grafana/observability-squad
# Database migrations
/pkg/services/sqlstore/migrations @grafana/backend-platform @grafana/hosted-grafana-team
*_mig.go @grafana/backend-platform @grafana/hosted-grafana-team
# Grafana live
/pkg/services/live/ @grafana/grafana-edge-squad
# Unified Alerting
/pkg/services/ngalert @grafana/alerting-squad
/pkg/services/sqlstore/migrations/ualert @grafana/alerting-squad
# Library Services
/pkg/services/libraryelements @grafana/user-essentials
/pkg/services/librarypanels @grafana/user-essentials
# Plugins
/pkg/api/pluginproxy @grafana/plugins-platform-backend
/pkg/plugins @grafana/plugins-platform-backend
/pkg/services/datasourceproxy @grafana/plugins-platform-backend
/pkg/services/datasources @grafana/plugins-platform-backend
# Database migrations
/pkg/services/sqlstore/migrations @grafana/backend-platform @grafana/hosted-grafana-team
*_mig.go @grafana/backend-platform @grafana/hosted-grafana-team
# Backend code docs
/contribute/style-guides/backend.md @grafana/backend-platform
/contribute/architecture/backend @grafana/backend-platform
/contribute/engineering/backend @grafana/backend-platform
/e2e @grafana/user-essentials
/packages @grafana/user-essentials @grafana/plugins-platform-frontend @grafana/grafana-bi-squad
/packages/grafana-e2e-selectors @grafana/user-essentials
/packages/grafana-e2e @grafana/user-essentials
/packages/grafana-toolkit @grafana/plugins-platform-frontend
/packages/grafana-ui/.storybook @grafana/plugins-platform-frontend
/packages/grafana-ui/src/components/DateTimePickers @grafana/grafana-bi-squad
/packages/grafana-ui/src/components/GraphNG @grafana/grafana-bi-squad
/packages/grafana-ui/src/components/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-squad
/plugins-bundled @grafana/plugins-platform-frontend
/public @grafana/user-essentials
/public/app/core/components/TimePicker @grafana/grafana-bi-squad
/public/app/features/canvas/ @grafana/grafana-edge-squad
/public/app/features/dimensions/ @grafana/grafana-edge-squad
/public/app/features/live/ @grafana/grafana-edge-squad
/public/app/features/explore/ @grafana/observability-squad
/public/app/features/plugins @grafana/plugins-platform-frontend
/public/app/plugins/panel/alertlist @grafana/alerting-squad
/public/app/plugins/panel/barchart @grafana/grafana-bi-squad
/public/app/plugins/panel/heatmap @grafana/grafana-bi-squad
/public/app/plugins/panel/histogram @grafana/grafana-bi-squad
/public/app/plugins/panel/nodeGraph @grafana/observability-squad
/public/app/plugins/panel/piechart @grafana/grafana-bi-squad
/public/app/plugins/panel/state-timeline @grafana/grafana-bi-squad
/public/app/plugins/panel/status-history @grafana/grafana-bi-squad
/public/app/plugins/panel/table @grafana/grafana-bi-squad
/public/app/plugins/panel/timeseries @grafana/grafana-bi-squad
/public/app/plugins/panel/geomap @grafana/grafana-edge-squad
/public/app/plugins/panel/canvas @grafana/grafana-edge-squad
/public/app/plugins/panel/candlestick @grafana/grafana-edge-squad
/public/app/plugins/panel/icon @grafana/grafana-edge-squad
/scripts/build/release-packages.sh @grafana/plugins-platform-frontend
/scripts/circle-release-next-packages.sh @grafana/plugins-platform-frontend
/scripts/ci-frontend-metrics.sh @grafana/user-essentials @grafana/plugins-platform-frontend @grafana/grafana-bi-squad
/scripts/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
package.json @grafana/frontend-ops
tsconfig.json @grafana/frontend-ops
lerna.json @grafana/frontend-ops
.babelrc @grafana/frontend-ops
.prettierrc.js @grafana/frontend-ops
.eslintrc @grafana/frontend-ops
.pa11yci.conf.js @grafana/user-essentials
.pa11yci-pr.conf.js @grafana/user-essentials
/e2e @grafana/grafana-frontend-platform
/packages @grafana/grafana-frontend-platform
/plugins-bundled @grafana/grafana-frontend-platform
/public @grafana/grafana-frontend-platform
/scripts/build/release-packages.sh @grafana/grafana-frontend-platform
/scripts/circle-release-next-packages.sh @grafana/grafana-frontend-platform
/scripts/ci-frontend-metrics.sh @grafana/grafana-frontend-platform
/scripts/grunt @grafana/grafana-frontend-platform
/scripts/webpack @grafana/grafana-frontend-platform
package.json @grafana/grafana-frontend-platform
tsconfig.json @grafana/grafana-frontend-platform
lerna.json @grafana/grafana-frontend-platform
.babelrc @grafana/grafana-frontend-platform
.prettierrc.js @grafana/grafana-frontend-platform
.eslintrc @grafana/grafana-frontend-platform
# @grafana/ui component documentation
*.mdx @marcusolsson @jessover9000 @grafana/plugins-platform-frontend
*.mdx @marcusolsson @jessover9000 @grafana/grafana-frontend-platform
/public/app/features/explore/ @grafana/observability-squad
/packages/jaeger-ui-components/ @grafana/observability-squad
# Core datasources
/public/app/plugins/datasource/cloudwatch @grafana/cloud-datasources @grafana/observability-squad

View File

@@ -5,7 +5,7 @@ labels: 'type: bug'
---
<!--
Please use this template to create your bug report. By providing as much info as possible you help us understand the issue, reproduce it and resolve it for you quicker. Therefore take a couple of extra minutes to make sure you have provided all info needed.
Please use this template to create your bug report. By providing as much info as possible you help us understand the issue, reproduce it and resolve it for you quicker. Therefor take a couple of extra minutes to make sure you have provided all info needed.
PROTIP: record your screen and attach it as a gif to showcase the issue.

View File

@@ -1,40 +0,0 @@
{
"extends": [
"config:base"
],
"enabledManagers": ["npm"],
"ignoreDeps": [
"@types/systemjs",
"@types/d3-force", // we should bump this once we move to esm modules
"@types/d3-interpolate", // we should bump this once we move to esm modules
"@types/d3-scale-chromatic", // we should bump this once we move to esm modules
"d3",
"d3-force", // we should bump this once we move to esm modules
"d3-interpolate", // we should bump this once we move to esm modules
"d3-scale-chromatic", // we should bump this once we move to esm modules
"eslint", // wait until `eslint-plugin-react-hooks>4.2.0` is released
"globby", // we should bump this once we move to esm modules
"slate",
"slate-plain-serializer",
"systemjs",
"ts-loader", // we should remove ts-loader and use babel-loader instead
"ora" // we should bump this once we move to esm modules
],
"ignorePaths": ["packages/grafana-toolkit/package.json", "emails/**", "plugins-bundled/**", "**/mocks/**"],
"labels": ["area/frontend", "dependencies"],
"minor": {
"enabled": false
},
"patch": {
"enabled": false
},
"pin": {
"enabled": false
},
"prConcurrentLimit": 10,
"reviewers": ["team:grafana/frontend-ops"],
"separateMajorMinor": false,
"vulnerabilityAlerts": {
"addLabels": ["area/security"]
}
}

View File

@@ -10,7 +10,7 @@ jobs:
runs-on: ubuntu-latest
steps:
# This is a basic workflow to help you get started with Actions
- uses: actions-ecosystem/action-regex-match@v2.0.2
- uses: actions-ecosystem/action-regex-match@v2
id: regex-match
with:
text: ${{ github.event.inputs.version }}
@@ -53,7 +53,7 @@ jobs:
repository: "grafana/grafana-github-actions"
path: ./actions
ref: main
- uses: actions/setup-node@v2.4.1
- uses: actions/setup-node@v2.1.5
with:
node-version: '14'
- name: Install Actions

View File

@@ -3,7 +3,7 @@ name: publish_docs
on:
push:
branches:
- main
- v8.2.x
paths:
- 'docs/sources/**'
- 'packages/grafana-*/**'
@@ -16,21 +16,16 @@ jobs:
steps:
- uses: actions/checkout@v1
- run: git clone --single-branch --no-tags --depth 1 -b master https://grafanabot:${{ secrets.GH_BOT_ACCESS_TOKEN }}@github.com/grafana/website-sync ./.github/actions/website-sync
- uses: actions/cache@v2.1.6
with:
path: '**/node_modules'
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
- name: generate-packages-docs
uses: actions/setup-node@v2.4.1
uses: actions/setup-node@v2.1.5
id: generate-docs
with:
node-version: '14'
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn config get cacheFolder)"
- uses: actions/cache@v2.1.6
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
yarn-
- run: yarn install --immutable
- run: yarn install --pure-lockfile --no-progress
- run: ./scripts/ci-reference-docs-build.sh
- name: publish-to-git
uses: ./.github/actions/website-sync
@@ -41,7 +36,7 @@ jobs:
host: github.com
github_pat: '${{ secrets.GH_BOT_ACCESS_TOKEN }}'
source_folder: docs/sources
target_folder: content/docs/grafana/next
target_folder: content/docs/grafana/latest
allow_no_changes: 'true'
- shell: bash
run: |

20
.gitignore vendored
View File

@@ -7,28 +7,17 @@ awsconfig
/.awcache
/dist
/public/build
public/dist/tsconfig.tsbuildinfo
/public/views/index.html
/public/views/error.html
/emails/dist
/reports
/e2e/tmp
.yarnrc
.yarn/
vendor/
/docs/menu.yaml
/requests
# Yarn
.yarn/*
!.yarn/patches
!.yarn/releases
!.yarn/plugins
!.yarn/sdks
!.yarn/versions
# we temporarily commit this file because yarn downloading it
# somehow produces different checksum values
!.yarn/cache/pa11y-ci-https-1e9675e9e1-668c9119bd.zip
.pnp.*
# Enterprise emails
/emails/templates/enterprise_*
/public/emails/enterprise_*
@@ -64,7 +53,6 @@ public/css/*.min.css
!.vscode/launch.json
.vs/
.eslintcache
.stylelintcache
/data/*
/bin/*
@@ -88,7 +76,6 @@ profile.cov
/pkg/cmd/grafana-server/debug
/pkg/extensions/*
/pkg/server/wireexts_enterprise.go
/pkg/cmd/grafana-cli/runner/wireexts_enterprise.go
!/pkg/extensions/main.go
/public/app/extensions
debug.test
@@ -96,7 +83,6 @@ debug.test
/packaging/**/*.rpm
/packaging/**/*.deb
/packaging/**/*.tar.gz
/packaging/**/*.tar.gz.sha256
# Ignore OSX indexing
.DS_Store
@@ -149,5 +135,3 @@ compilation-stats.json
# auto generated Go files
*_gen.go
deployment_tools_config.json

View File

@@ -1,4 +0,0 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"
yarn run precommit

View File

@@ -2,7 +2,6 @@ var config = {
defaults: {
concurrency: 1,
runners: ['axe'],
useIncognitoBrowserContext: false,
chromeLaunchConfig: {
args: ['--no-sandbox'],
},
@@ -11,102 +10,79 @@ var config = {
urls: [
{
url: '${HOST}/login',
wait: 500,
rootElement: '.main-view',
threshold: 12,
},
{
url: '${HOST}/login',
wait: 500,
actions: [
"wait for element input[name='user'] to be added",
"set field input[name='user'] to admin",
"set field input[name='password'] to admin",
"click element button[aria-label='Login button']",
"wait for element [aria-label='Skip change password button'] to be visible",
],
threshold: 13,
rootElement: '.main-view',
threshold: 3,
},
{
url: '${HOST}/?orgId=1',
wait: 500,
threshold: 0,
threshold: 7,
},
{
url: '${HOST}/d/O6f11TZWk/panel-tests-bar-gauge',
wait: 500,
rootElement: '.main-view',
threshold: 0,
hideElements: '.sidemenu',
threshold: 2,
},
{
url: '${HOST}/d/O6f11TZWk/panel-tests-bar-gauge?orgId=1&editview=settings',
wait: 500,
rootElement: '.main-view',
threshold: 0,
rootElement: '.dashboard-settings',
threshold: 10,
},
{
url: '${HOST}/?orgId=1&search=open',
wait: 500,
rootElement: '.main-view',
threshold: 0,
threshold: 15,
},
{
url: '${HOST}/alerting/list',
wait: 500,
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: 7,
},
{
url: '${HOST}/datasources',
wait: 500,
rootElement: '.main-view',
threshold: 0,
threshold: 36,
},
{
url: '${HOST}/org/users',
wait: 500,
rootElement: '.main-view',
threshold: 0,
threshold: 4,
},
{
url: '${HOST}/org/teams',
wait: 500,
rootElement: '.main-view',
threshold: 0,
threshold: 1,
},
{
url: '${HOST}/plugins',
wait: 500,
rootElement: '.main-view',
threshold: 0,
threshold: 41,
},
{
url: '${HOST}/org',
wait: 500,
rootElement: '.main-view',
threshold: 0,
threshold: 2,
},
{
url: '${HOST}/org/apikeys',
wait: 500,
rootElement: '.main-view',
threshold: 0,
threshold: 5,
},
{
url: '${HOST}/dashboards',
wait: 500,
rootElement: '.main-view',
threshold: 0,
threshold: 8,
},
],
};
function myPa11yCiConfiguration(urls, defaults) {
const HOST_SERVER = process.env.HOST || 'localhost';
const PORT_SERVER = process.env.PORT || '3001';
const PORT_SERVER = process.env.PORT || '3000';
for (var idx = 0; idx < urls.length; idx++) {
urls[idx] = { ...urls[idx], url: urls[idx].url.replace('${HOST}', `${HOST_SERVER}:${PORT_SERVER}`) };
}

View File

@@ -2,7 +2,6 @@ var config = {
defaults: {
concurrency: 1,
runners: ['axe'],
useIncognitoBrowserContext: false,
chromeLaunchConfig: {
args: ['--no-sandbox'],
},
@@ -11,78 +10,58 @@ var config = {
urls: [
{
url: '${HOST}/login',
wait: 500,
rootElement: '.main-view',
},
{
url: '${HOST}/login', //skip password and login
actions: [
"wait for element input[name='user'] to be added",
"set field input[name='user'] to admin",
"set field input[name='password'] to admin",
"click element button[aria-label='Login button']",
"wait for element [aria-label='Skip change password button'] to be visible",
],
wait: 500,
rootElement: '.main-view',
},
{
url: '${HOST}/?orgId=1',
wait: 500,
},
{
url: '${HOST}/d/O6f11TZWk/panel-tests-bar-gauge',
wait: 500,
rootElement: '.main-view',
hideElements: '.sidemenu',
},
{
url: '${HOST}/d/O6f11TZWk/panel-tests-bar-gauge?orgId=1&editview=settings',
wait: 500,
rootElement: '.main-view',
rootElement: '.dashboard-settings',
},
{
url: '${HOST}/?orgId=1&search=open',
wait: 500,
rootElement: '.main-view',
},
{
url: '${HOST}/alerting/list',
wait: 500,
rootElement: '.main-view',
},
{
url: '${HOST}/datasources',
wait: 500,
rootElement: '.main-view',
},
{
url: '${HOST}/org/users',
wait: 500,
rootElement: '.main-view',
},
{
url: '${HOST}/org/teams',
wait: 500,
rootElement: '.main-view',
},
{
url: '${HOST}/plugins',
wait: 500,
rootElement: '.main-view',
},
{
url: '${HOST}/org',
wait: 500,
rootElement: '.main-view',
},
{
url: '${HOST}/org/apikeys',
wait: 500,
rootElement: '.main-view',
},
{
url: '${HOST}/dashboards',
wait: 500,
rootElement: '.main-view',
},
],
@@ -90,10 +69,11 @@ var config = {
function myPa11yCiConfiguration(urls, defaults) {
const HOST_SERVER = process.env.HOST || 'localhost';
const PORT_SERVER = process.env.PORT || '3001';
const PORT_SERVER = process.env.PORT || '3000';
for (var idx = 0; idx < urls.length; idx++) {
urls[idx] = { ...urls[idx], url: urls[idx].url.replace('${HOST}', `${HOST_SERVER}:${PORT_SERVER}`) };
}
return {
defaults: defaults,
urls: urls,

9
.vscode/launch.json vendored
View File

@@ -9,15 +9,6 @@
"program": "${workspaceFolder}/pkg/cmd/grafana-server/",
"env": {},
"args": ["--homepath", "${workspaceFolder}", "--packaging", "dev"]
},
{
"name": "Debug Jest test",
"type": "node",
"request": "launch",
"runtimeArgs": ["--inspect-brk", "${workspaceRoot}/node_modules/.bin/jest", "--runInBand", "${file}"],
"console": "integratedTerminal",
"internalConsoleOptions": "neverOpen",
"port": 9229
}
]
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -1,20 +0,0 @@
#!/usr/bin/env node
const {existsSync} = require(`fs`);
const {createRequire, createRequireFromPath} = require(`module`);
const {resolve} = require(`path`);
const relPnpApiPath = "../../../../.pnp.cjs";
const absPnpApiPath = resolve(__dirname, relPnpApiPath);
const absRequire = (createRequire || createRequireFromPath)(absPnpApiPath);
if (existsSync(absPnpApiPath)) {
if (!process.versions.pnp) {
// Setup the environment to be able to require eslint/bin/eslint.js
require(absPnpApiPath).setup();
}
}
// Defer to the real eslint/bin/eslint.js your application uses
module.exports = absRequire(`eslint/bin/eslint.js`);

View File

@@ -1,20 +0,0 @@
#!/usr/bin/env node
const {existsSync} = require(`fs`);
const {createRequire, createRequireFromPath} = require(`module`);
const {resolve} = require(`path`);
const relPnpApiPath = "../../../../.pnp.cjs";
const absPnpApiPath = resolve(__dirname, relPnpApiPath);
const absRequire = (createRequire || createRequireFromPath)(absPnpApiPath);
if (existsSync(absPnpApiPath)) {
if (!process.versions.pnp) {
// Setup the environment to be able to require eslint/lib/api.js
require(absPnpApiPath).setup();
}
}
// Defer to the real eslint/lib/api.js your application uses
module.exports = absRequire(`eslint/lib/api.js`);

View File

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

View File

@@ -1,6 +0,0 @@
# This file is automatically generated by @yarnpkg/sdks.
# Manual changes might be lost!
integrations:
- vim
- vscode

View File

@@ -1,20 +0,0 @@
#!/usr/bin/env node
const {existsSync} = require(`fs`);
const {createRequire, createRequireFromPath} = require(`module`);
const {resolve} = require(`path`);
const relPnpApiPath = "../../../.pnp.cjs";
const absPnpApiPath = resolve(__dirname, relPnpApiPath);
const absRequire = (createRequire || createRequireFromPath)(absPnpApiPath);
if (existsSync(absPnpApiPath)) {
if (!process.versions.pnp) {
// Setup the environment to be able to require prettier/index.js
require(absPnpApiPath).setup();
}
}
// Defer to the real prettier/index.js your application uses
module.exports = absRequire(`prettier/index.js`);

View File

@@ -1,6 +0,0 @@
{
"name": "prettier",
"version": "2.2.1-sdk",
"main": "./index.js",
"type": "commonjs"
}

View File

@@ -1,20 +0,0 @@
#!/usr/bin/env node
const {existsSync} = require(`fs`);
const {createRequire, createRequireFromPath} = require(`module`);
const {resolve} = require(`path`);
const relPnpApiPath = "../../../../.pnp.cjs";
const absPnpApiPath = resolve(__dirname, relPnpApiPath);
const absRequire = (createRequire || createRequireFromPath)(absPnpApiPath);
if (existsSync(absPnpApiPath)) {
if (!process.versions.pnp) {
// Setup the environment to be able to require stylelint/bin/stylelint.js
require(absPnpApiPath).setup();
}
}
// Defer to the real stylelint/bin/stylelint.js your application uses
module.exports = absRequire(`stylelint/bin/stylelint.js`);

View File

@@ -1,20 +0,0 @@
#!/usr/bin/env node
const {existsSync} = require(`fs`);
const {createRequire, createRequireFromPath} = require(`module`);
const {resolve} = require(`path`);
const relPnpApiPath = "../../../../.pnp.cjs";
const absPnpApiPath = resolve(__dirname, relPnpApiPath);
const absRequire = (createRequire || createRequireFromPath)(absPnpApiPath);
if (existsSync(absPnpApiPath)) {
if (!process.versions.pnp) {
// Setup the environment to be able to require stylelint/lib/index.js
require(absPnpApiPath).setup();
}
}
// Defer to the real stylelint/lib/index.js your application uses
module.exports = absRequire(`stylelint/lib/index.js`);

View File

@@ -1,6 +0,0 @@
{
"name": "stylelint",
"version": "13.13.1-sdk",
"main": "lib/index.js",
"type": "commonjs"
}

View File

@@ -1,20 +0,0 @@
#!/usr/bin/env node
const {existsSync} = require(`fs`);
const {createRequire, createRequireFromPath} = require(`module`);
const {resolve} = require(`path`);
const relPnpApiPath = "../../../../.pnp.cjs";
const absPnpApiPath = resolve(__dirname, relPnpApiPath);
const absRequire = (createRequire || createRequireFromPath)(absPnpApiPath);
if (existsSync(absPnpApiPath)) {
if (!process.versions.pnp) {
// Setup the environment to be able to require typescript/bin/tsc
require(absPnpApiPath).setup();
}
}
// Defer to the real typescript/bin/tsc your application uses
module.exports = absRequire(`typescript/bin/tsc`);

View File

@@ -1,20 +0,0 @@
#!/usr/bin/env node
const {existsSync} = require(`fs`);
const {createRequire, createRequireFromPath} = require(`module`);
const {resolve} = require(`path`);
const relPnpApiPath = "../../../../.pnp.cjs";
const absPnpApiPath = resolve(__dirname, relPnpApiPath);
const absRequire = (createRequire || createRequireFromPath)(absPnpApiPath);
if (existsSync(absPnpApiPath)) {
if (!process.versions.pnp) {
// Setup the environment to be able to require typescript/bin/tsserver
require(absPnpApiPath).setup();
}
}
// Defer to the real typescript/bin/tsserver your application uses
module.exports = absRequire(`typescript/bin/tsserver`);

View File

@@ -1,20 +0,0 @@
#!/usr/bin/env node
const {existsSync} = require(`fs`);
const {createRequire, createRequireFromPath} = require(`module`);
const {resolve} = require(`path`);
const relPnpApiPath = "../../../../.pnp.cjs";
const absPnpApiPath = resolve(__dirname, relPnpApiPath);
const absRequire = (createRequire || createRequireFromPath)(absPnpApiPath);
if (existsSync(absPnpApiPath)) {
if (!process.versions.pnp) {
// Setup the environment to be able to require typescript/lib/tsc.js
require(absPnpApiPath).setup();
}
}
// Defer to the real typescript/lib/tsc.js your application uses
module.exports = absRequire(`typescript/lib/tsc.js`);

View File

@@ -1,184 +0,0 @@
#!/usr/bin/env node
const {existsSync} = require(`fs`);
const {createRequire, createRequireFromPath} = require(`module`);
const {resolve} = require(`path`);
const relPnpApiPath = "../../../../.pnp.cjs";
const absPnpApiPath = resolve(__dirname, relPnpApiPath);
const absRequire = (createRequire || createRequireFromPath)(absPnpApiPath);
const moduleWrapper = tsserver => {
if (!process.versions.pnp) {
return tsserver;
}
const {isAbsolute} = require(`path`);
const pnpApi = require(`pnpapi`);
const isVirtual = str => str.match(/\/(\$\$virtual|__virtual__)\//);
const normalize = str => str.replace(/\\/g, `/`).replace(/^\/?/, `/`);
const dependencyTreeRoots = new Set(pnpApi.getDependencyTreeRoots().map(locator => {
return `${locator.name}@${locator.reference}`;
}));
// VSCode sends the zip paths to TS using the "zip://" prefix, that TS
// doesn't understand. This layer makes sure to remove the protocol
// before forwarding it to TS, and to add it back on all returned paths.
function toEditorPath(str) {
// We add the `zip:` prefix to both `.zip/` paths and virtual paths
if (isAbsolute(str) && !str.match(/^\^?(zip:|\/zip\/)/) && (str.match(/\.zip\//) || isVirtual(str))) {
// We also take the opportunity to turn virtual paths into physical ones;
// this makes it much easier to work with workspaces that list peer
// dependencies, since otherwise Ctrl+Click would bring us to the virtual
// file instances instead of the real ones.
//
// We only do this to modules owned by the the dependency tree roots.
// This avoids breaking the resolution when jumping inside a vendor
// with peer dep (otherwise jumping into react-dom would show resolution
// errors on react).
//
const resolved = isVirtual(str) ? pnpApi.resolveVirtual(str) : str;
if (resolved) {
const locator = pnpApi.findPackageLocator(resolved);
if (locator && dependencyTreeRoots.has(`${locator.name}@${locator.reference}`)) {
str = resolved;
}
}
str = normalize(str);
if (str.match(/\.zip\//)) {
switch (hostInfo) {
// Absolute VSCode `Uri.fsPath`s need to start with a slash.
// VSCode only adds it automatically for supported schemes,
// so we have to do it manually for the `zip` scheme.
// The path needs to start with a caret otherwise VSCode doesn't handle the protocol
//
// Ref: https://github.com/microsoft/vscode/issues/105014#issuecomment-686760910
//
// Update Oct 8 2021: VSCode changed their format in 1.61.
// Before | ^zip:/c:/foo/bar.zip/package.json
// After | ^/zip//c:/foo/bar.zip/package.json
//
case `vscode <1.61`: {
str = `^zip:${str}`;
} break;
case `vscode`: {
str = `^/zip/${str}`;
} break;
// To make "go to definition" work,
// We have to resolve the actual file system path from virtual path
// and convert scheme to supported by [vim-rzip](https://github.com/lbrayner/vim-rzip)
case `coc-nvim`: {
str = normalize(resolved).replace(/\.zip\//, `.zip::`);
str = resolve(`zipfile:${str}`);
} break;
// Support neovim native LSP and [typescript-language-server](https://github.com/theia-ide/typescript-language-server)
// We have to resolve the actual file system path from virtual path,
// everything else is up to neovim
case `neovim`: {
str = normalize(resolved).replace(/\.zip\//, `.zip::`);
str = `zipfile:${str}`;
} break;
default: {
str = `zip:${str}`;
} break;
}
}
}
return str;
}
function fromEditorPath(str) {
switch (hostInfo) {
case `coc-nvim`:
case `neovim`: {
str = str.replace(/\.zip::/, `.zip/`);
// The path for coc-nvim is in format of /<pwd>/zipfile:/<pwd>/.yarn/...
// So in order to convert it back, we use .* to match all the thing
// before `zipfile:`
return process.platform === `win32`
? str.replace(/^.*zipfile:\//, ``)
: str.replace(/^.*zipfile:/, ``);
} break;
case `vscode`:
default: {
return process.platform === `win32`
? str.replace(/^\^?(zip:|\/zip)\/+/, ``)
: str.replace(/^\^?(zip:|\/zip)\/+/, `/`);
} break;
}
}
// Force enable 'allowLocalPluginLoads'
// TypeScript tries to resolve plugins using a path relative to itself
// which doesn't work when using the global cache
// https://github.com/microsoft/TypeScript/blob/1b57a0395e0bff191581c9606aab92832001de62/src/server/project.ts#L2238
// VSCode doesn't want to enable 'allowLocalPluginLoads' due to security concerns but
// TypeScript already does local loads and if this code is running the user trusts the workspace
// https://github.com/microsoft/vscode/issues/45856
const ConfiguredProject = tsserver.server.ConfiguredProject;
const {enablePluginsWithOptions: originalEnablePluginsWithOptions} = ConfiguredProject.prototype;
ConfiguredProject.prototype.enablePluginsWithOptions = function() {
this.projectService.allowLocalPluginLoads = true;
return originalEnablePluginsWithOptions.apply(this, arguments);
};
// And here is the point where we hijack the VSCode <-> TS communications
// by adding ourselves in the middle. We locate everything that looks
// like an absolute path of ours and normalize it.
const Session = tsserver.server.Session;
const {onMessage: originalOnMessage, send: originalSend} = Session.prototype;
let hostInfo = `unknown`;
Object.assign(Session.prototype, {
onMessage(/** @type {string} */ message) {
const parsedMessage = JSON.parse(message)
if (
parsedMessage != null &&
typeof parsedMessage === `object` &&
parsedMessage.arguments &&
typeof parsedMessage.arguments.hostInfo === `string`
) {
hostInfo = parsedMessage.arguments.hostInfo;
if (hostInfo === `vscode` && process.env.VSCODE_IPC_HOOK && process.env.VSCODE_IPC_HOOK.match(/Code\/1\.([1-5][0-9]|60)\./)) {
hostInfo += ` <1.61`;
}
}
return originalOnMessage.call(this, JSON.stringify(parsedMessage, (key, value) => {
return typeof value === `string` ? fromEditorPath(value) : value;
}));
},
send(/** @type {any} */ msg) {
return originalSend.call(this, JSON.parse(JSON.stringify(msg, (key, value) => {
return typeof value === `string` ? toEditorPath(value) : value;
})));
}
});
return tsserver;
};
if (existsSync(absPnpApiPath)) {
if (!process.versions.pnp) {
// Setup the environment to be able to require typescript/lib/tsserver.js
require(absPnpApiPath).setup();
}
}
// Defer to the real typescript/lib/tsserver.js your application uses
module.exports = moduleWrapper(absRequire(`typescript/lib/tsserver.js`));

View File

@@ -1,184 +0,0 @@
#!/usr/bin/env node
const {existsSync} = require(`fs`);
const {createRequire, createRequireFromPath} = require(`module`);
const {resolve} = require(`path`);
const relPnpApiPath = "../../../../.pnp.cjs";
const absPnpApiPath = resolve(__dirname, relPnpApiPath);
const absRequire = (createRequire || createRequireFromPath)(absPnpApiPath);
const moduleWrapper = tsserver => {
if (!process.versions.pnp) {
return tsserver;
}
const {isAbsolute} = require(`path`);
const pnpApi = require(`pnpapi`);
const isVirtual = str => str.match(/\/(\$\$virtual|__virtual__)\//);
const normalize = str => str.replace(/\\/g, `/`).replace(/^\/?/, `/`);
const dependencyTreeRoots = new Set(pnpApi.getDependencyTreeRoots().map(locator => {
return `${locator.name}@${locator.reference}`;
}));
// VSCode sends the zip paths to TS using the "zip://" prefix, that TS
// doesn't understand. This layer makes sure to remove the protocol
// before forwarding it to TS, and to add it back on all returned paths.
function toEditorPath(str) {
// We add the `zip:` prefix to both `.zip/` paths and virtual paths
if (isAbsolute(str) && !str.match(/^\^?(zip:|\/zip\/)/) && (str.match(/\.zip\//) || isVirtual(str))) {
// We also take the opportunity to turn virtual paths into physical ones;
// this makes it much easier to work with workspaces that list peer
// dependencies, since otherwise Ctrl+Click would bring us to the virtual
// file instances instead of the real ones.
//
// We only do this to modules owned by the the dependency tree roots.
// This avoids breaking the resolution when jumping inside a vendor
// with peer dep (otherwise jumping into react-dom would show resolution
// errors on react).
//
const resolved = isVirtual(str) ? pnpApi.resolveVirtual(str) : str;
if (resolved) {
const locator = pnpApi.findPackageLocator(resolved);
if (locator && dependencyTreeRoots.has(`${locator.name}@${locator.reference}`)) {
str = resolved;
}
}
str = normalize(str);
if (str.match(/\.zip\//)) {
switch (hostInfo) {
// Absolute VSCode `Uri.fsPath`s need to start with a slash.
// VSCode only adds it automatically for supported schemes,
// so we have to do it manually for the `zip` scheme.
// The path needs to start with a caret otherwise VSCode doesn't handle the protocol
//
// Ref: https://github.com/microsoft/vscode/issues/105014#issuecomment-686760910
//
// Update Oct 8 2021: VSCode changed their format in 1.61.
// Before | ^zip:/c:/foo/bar.zip/package.json
// After | ^/zip//c:/foo/bar.zip/package.json
//
case `vscode <1.61`: {
str = `^zip:${str}`;
} break;
case `vscode`: {
str = `^/zip/${str}`;
} break;
// To make "go to definition" work,
// We have to resolve the actual file system path from virtual path
// and convert scheme to supported by [vim-rzip](https://github.com/lbrayner/vim-rzip)
case `coc-nvim`: {
str = normalize(resolved).replace(/\.zip\//, `.zip::`);
str = resolve(`zipfile:${str}`);
} break;
// Support neovim native LSP and [typescript-language-server](https://github.com/theia-ide/typescript-language-server)
// We have to resolve the actual file system path from virtual path,
// everything else is up to neovim
case `neovim`: {
str = normalize(resolved).replace(/\.zip\//, `.zip::`);
str = `zipfile:${str}`;
} break;
default: {
str = `zip:${str}`;
} break;
}
}
}
return str;
}
function fromEditorPath(str) {
switch (hostInfo) {
case `coc-nvim`:
case `neovim`: {
str = str.replace(/\.zip::/, `.zip/`);
// The path for coc-nvim is in format of /<pwd>/zipfile:/<pwd>/.yarn/...
// So in order to convert it back, we use .* to match all the thing
// before `zipfile:`
return process.platform === `win32`
? str.replace(/^.*zipfile:\//, ``)
: str.replace(/^.*zipfile:/, ``);
} break;
case `vscode`:
default: {
return process.platform === `win32`
? str.replace(/^\^?(zip:|\/zip)\/+/, ``)
: str.replace(/^\^?(zip:|\/zip)\/+/, `/`);
} break;
}
}
// Force enable 'allowLocalPluginLoads'
// TypeScript tries to resolve plugins using a path relative to itself
// which doesn't work when using the global cache
// https://github.com/microsoft/TypeScript/blob/1b57a0395e0bff191581c9606aab92832001de62/src/server/project.ts#L2238
// VSCode doesn't want to enable 'allowLocalPluginLoads' due to security concerns but
// TypeScript already does local loads and if this code is running the user trusts the workspace
// https://github.com/microsoft/vscode/issues/45856
const ConfiguredProject = tsserver.server.ConfiguredProject;
const {enablePluginsWithOptions: originalEnablePluginsWithOptions} = ConfiguredProject.prototype;
ConfiguredProject.prototype.enablePluginsWithOptions = function() {
this.projectService.allowLocalPluginLoads = true;
return originalEnablePluginsWithOptions.apply(this, arguments);
};
// And here is the point where we hijack the VSCode <-> TS communications
// by adding ourselves in the middle. We locate everything that looks
// like an absolute path of ours and normalize it.
const Session = tsserver.server.Session;
const {onMessage: originalOnMessage, send: originalSend} = Session.prototype;
let hostInfo = `unknown`;
Object.assign(Session.prototype, {
onMessage(/** @type {string} */ message) {
const parsedMessage = JSON.parse(message)
if (
parsedMessage != null &&
typeof parsedMessage === `object` &&
parsedMessage.arguments &&
typeof parsedMessage.arguments.hostInfo === `string`
) {
hostInfo = parsedMessage.arguments.hostInfo;
if (hostInfo === `vscode` && process.env.VSCODE_IPC_HOOK && process.env.VSCODE_IPC_HOOK.match(/Code\/1\.([1-5][0-9]|60)\./)) {
hostInfo += ` <1.61`;
}
}
return originalOnMessage.call(this, JSON.stringify(parsedMessage, (key, value) => {
return typeof value === `string` ? fromEditorPath(value) : value;
}));
},
send(/** @type {any} */ msg) {
return originalSend.call(this, JSON.parse(JSON.stringify(msg, (key, value) => {
return typeof value === `string` ? toEditorPath(value) : value;
})));
}
});
return tsserver;
};
if (existsSync(absPnpApiPath)) {
if (!process.versions.pnp) {
// Setup the environment to be able to require typescript/lib/tsserverlibrary.js
require(absPnpApiPath).setup();
}
}
// Defer to the real typescript/lib/tsserverlibrary.js your application uses
module.exports = moduleWrapper(absRequire(`typescript/lib/tsserverlibrary.js`));

View File

@@ -1,20 +0,0 @@
#!/usr/bin/env node
const {existsSync} = require(`fs`);
const {createRequire, createRequireFromPath} = require(`module`);
const {resolve} = require(`path`);
const relPnpApiPath = "../../../../.pnp.cjs";
const absPnpApiPath = resolve(__dirname, relPnpApiPath);
const absRequire = (createRequire || createRequireFromPath)(absPnpApiPath);
if (existsSync(absPnpApiPath)) {
if (!process.versions.pnp) {
// Setup the environment to be able to require typescript/lib/typescript.js
require(absPnpApiPath).setup();
}
}
// Defer to the real typescript/lib/typescript.js your application uses
module.exports = absRequire(`typescript/lib/typescript.js`);

View File

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

View File

@@ -1,81 +0,0 @@
enableTelemetry: false
nodeLinker: "pnp"
packageExtensions:
"@grafana/slate-react@0.22.10-grafana":
peerDependencies:
slate-react: ">=0.22.0"
"@mdx-js/loader@1.6.22":
peerDependencies:
react: 17.0.1
"@storybook/addon-essentials@6.3.7":
peerDependencies:
"@storybook/components": 6.3.7
"@storybook/core-events": 6.3.7
"@storybook/theming": 6.3.7
"@storybook/addon-knobs@6.3.0":
dependencies:
copy-to-clipboard: ^3.3.1
"@storybook/core-server@6.3.7":
peerDependencies:
"@babel/core": ^7.0.0
"@storybook/core@6.3.7":
peerDependencies:
"@babel/core": ^7.0.0
"@storybook/manager-webpack5": 6.3.7
webpack: 5.51.1
"@storybook/csf-tools@6.3.7":
peerDependencies:
"@babel/core": ^7.0.0
"@storybook/react@6.3.7":
peerDependencies:
"@storybook/manager-webpack5": 6.3.7
doctrine@3.0.0:
dependencies:
assert: 2.0.0
moveable@0.26.0:
dependencies:
"@daybrush/utils": 1.6.0
framework-utils: ^1.1.0
react-simple-compat: 1.2.1
rc-time-picker@3.7.3:
peerDependencies:
react: 17.0.1
react-dom: 17.0.1
rc-trigger@2.6.5:
peerDependencies:
react: 17.0.1
react-dom: 17.0.1
react-compat-moveable@0.14.0:
dependencies:
"@egjs/agent": ^2.2.1
"@egjs/children-differ": ^1.0.1
"@scena/matrix": 1.1.1
css-to-mat: ^1.0.3
gesto: ^1.4.0
overlap-area: ^1.0.0
peerDependencies:
framework-utils: ^1.1.0
react-dev-utils@11.0.4:
peerDependencies:
typescript: 4.4.3
webpack: 5.51.1
react-docgen-typescript-loader@3.7.2:
peerDependencies:
webpack: 4.41.5
react-icons@2.2.7:
peerDependencies:
prop-types: "*"
react-resizable@3.0.4:
peerDependencies:
react-dom: 17.0.1
plugins:
- path: .yarn/plugins/@yarnpkg/plugin-typescript.cjs
spec: "@yarnpkg/plugin-typescript"
- path: .yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs
spec: "@yarnpkg/plugin-interactive-tools"
- path: .yarn/plugins/@yarnpkg/plugin-outdated.cjs
spec: "https://mskelton.dev/yarn-outdated/v2"
yarnPath: .yarn/releases/yarn-3.1.0.cjs

View File

@@ -1,30 +1,3 @@
<!-- 8.2.5 START -->
# 8.2.5 (2021-11-18)
### Bug fixes
- **Alerting:** Fix a bug where the metric in the evaluation string was not correctly populated. [#41731](https://github.com/grafana/grafana/pull/41731), [@JohnnyQQQQ](https://github.com/JohnnyQQQQ)
- **Alerting:** Fix no data behaviour in Legacy Alerting for alert rules using the AND operator. [#41305](https://github.com/grafana/grafana/pull/41305), [@gerobinson](https://github.com/gerobinson)
- **CloudMonitoring:** Ignore min and max aggregation in MQL queries. [#41302](https://github.com/grafana/grafana/pull/41302), [@sunker](https://github.com/sunker)
- **Dashboards:** 'Copy' is no longer added to new dashboard titles. [#41344](https://github.com/grafana/grafana/pull/41344), [@joshhunt](https://github.com/joshhunt)
- **DataProxy:** Fix overriding response body when response is a WebSocket upgrade. [#41364](https://github.com/grafana/grafana/pull/41364), [@marefr](https://github.com/marefr)
- **Elasticsearch:** Use field configured in query editor as field for date_histogram aggregations. [#41258](https://github.com/grafana/grafana/pull/41258), [@Elfo404](https://github.com/Elfo404)
- **Explore:** Fix running queries without a datasource property set. [#40805](https://github.com/grafana/grafana/pull/40805), [@Elfo404](https://github.com/Elfo404)
- **InfluxDB:** Fix numeric aliases in queries. [#41531](https://github.com/grafana/grafana/pull/41531), [@gabor](https://github.com/gabor)
- **Plugins:** Ensure consistent plugin settings list response. [#41346](https://github.com/grafana/grafana/pull/41346), [@wbrowne](https://github.com/wbrowne)
- **Tempo:** Fix validation of float durations. [#41400](https://github.com/grafana/grafana/pull/41400), [@ivanahuckova](https://github.com/ivanahuckova)
- **Tracing:** Correct tags for each span are shown. [#41473](https://github.com/grafana/grafana/pull/41473), [@ivanahuckova](https://github.com/ivanahuckova)
### Breaking changes
### Fix No Data behaviour in Legacy Alerting
In Grafana 8.2.5 and later, this change fixes a bug in the evaluation of alert rules when using the AND operator to compare two or more conditions. In Grafana 8.2.4 and earlier such alert rules would evaluate to `OK` if at least one, but not all, conditions returned no data. This change fixes that bug such that in Grafana 8.2.5 these alert rules now evaluate to `No Data`.
If an alert should evaluate to `OK` when one or all conditions return `No Data` then this can be done via changing `If no data or all values are null` to `OK`. However, this will not preserve the old behaviour in 8.2.4 where an alert will be `OK` if at least one, but not all, conditions return no data and then `No Data` if all conditions return `No Data`. Issue [#41305](https://github.com/grafana/grafana/issues/41305)
<!-- 8.2.5 END -->
<!-- 8.2.4 START -->
# 8.2.4 (2021-11-15)
@@ -175,13 +148,10 @@ In this scenario (upgrade from 8.0.x - 8.1.x with multiple organizations and `ng
### Features and enhancements
- **AccessControl:** Introduce new permissions to restrict access for reloading provisioning configuration. [#38906](https://github.com/grafana/grafana/pull/38906), [@vtorosyan](https://github.com/vtorosyan)
- **Admin:** Update license page UI. (Enterprise)
- **Alerting:** Add UI to edit Cortex/Loki namespace, group names, and group evaluation interval. [#38543](https://github.com/grafana/grafana/pull/38543), [@domasx2](https://github.com/domasx2)
- **Alerting:** Add a Test button to test contact point. [#37475](https://github.com/grafana/grafana/pull/37475), [@domasx2](https://github.com/domasx2)
- **Alerting:** Allow creating/editing recording rules for Loki and Cortex. [#38064](https://github.com/grafana/grafana/pull/38064), [@domasx2](https://github.com/domasx2)
- **Alerting:** Metrics should have the label `org` instead of `user`. [#39353](https://github.com/grafana/grafana/pull/39353), [@gotjosh](https://github.com/gotjosh)
- **Alerting:** Sort notification channels by name to make them easier to locate. [#37426](https://github.com/grafana/grafana/pull/37426), [@jstangroome](https://github.com/jstangroome)
- **Alerting:** Support org level isolation of notification configuration. [#37414](https://github.com/grafana/grafana/pull/37414), [@papagian](https://github.com/papagian)
- **AzureMonitor:** Add data links to deep link to Azure Portal Azure Resource Graph. [#35591](https://github.com/grafana/grafana/pull/35591), [@shuotli](https://github.com/shuotli)
- **AzureMonitor:** Add support for annotations from Azure Monitor Metrics and Azure Resource Graph services. [#37633](https://github.com/grafana/grafana/pull/37633), [@joshhunt](https://github.com/joshhunt)
- **AzureMonitor:** Show error message when subscriptions request fails in ConfigEditor. [#37837](https://github.com/grafana/grafana/pull/37837), [@joshhunt](https://github.com/joshhunt)
@@ -200,7 +170,6 @@ In this scenario (upgrade from 8.0.x - 8.1.x with multiple organizations and `ng
- **Graphite:** Deprecate browser access mode. [#38783](https://github.com/grafana/grafana/pull/38783), [@ifrost](https://github.com/ifrost)
- **InfluxDB:** Improve handling of intervals in alerting. [#37588](https://github.com/grafana/grafana/pull/37588), [@gabor](https://github.com/gabor)
- **InfluxDB:** InfluxQL query editor: Handle unusual characters in tag values better. [#39170](https://github.com/grafana/grafana/pull/39170), [@gabor](https://github.com/gabor)
- Introduce "monitored queries" service. (Enterprise)
- **Jaeger:** Add ability to upload JSON file for trace data. [#37205](https://github.com/grafana/grafana/pull/37205), [@zoltanbedi](https://github.com/zoltanbedi)
- **LibraryElements:** Enable specifying UID for new and existing library elements. [#39019](https://github.com/grafana/grafana/pull/39019), [@hugohaggmark](https://github.com/hugohaggmark)
- **LibraryPanels:** Remove library panel icon from the panel header so you can no longer tell that a panel is a library panel from the dashboard view. [#38749](https://github.com/grafana/grafana/pull/38749), [@hugohaggmark](https://github.com/hugohaggmark)
@@ -213,12 +182,9 @@ In this scenario (upgrade from 8.0.x - 8.1.x with multiple organizations and `ng
- **Postgres/MySQL/MSSQL:** Add setting to limit the maximum number of rows processed. [#38986](https://github.com/grafana/grafana/pull/38986), [@marefr](https://github.com/marefr)
- **Prometheus:** Add browser access mode deprecation warning. [#37578](https://github.com/grafana/grafana/pull/37578), [@ivanahuckova](https://github.com/ivanahuckova)
- **Prometheus:** Add interpolation for built-in-time variables to backend. [#39051](https://github.com/grafana/grafana/pull/39051), [@ivanahuckova](https://github.com/ivanahuckova)
- **Recorded Queries:** Finish rest API endpoints. (Enterprise)
- **Reporting:** enable creating reports from dashboard. (Enterprise)
- **Tempo:** Add ability to upload trace data in JSON format. [#37407](https://github.com/grafana/grafana/pull/37407), [@zoltanbedi](https://github.com/zoltanbedi)
- **TimeSeries/XYChart:** Allow grid lines visibility control in XYChart and TimeSeries panels. [#38502](https://github.com/grafana/grafana/pull/38502), [@dprokop](https://github.com/dprokop)
- **Transformations:** Convert field types to time string number or boolean. [#38517](https://github.com/grafana/grafana/pull/38517), [@nikki-kiga](https://github.com/nikki-kiga)
- **Usage Insights:** Support writing events to Grafana's log. (Enterprise)
- **Value mappings:** Add regular-expression based value mapping. [#38931](https://github.com/grafana/grafana/pull/38931), [@mcdee](https://github.com/mcdee)
- **Zipkin:** Add ability to upload trace JSON. [#37483](https://github.com/grafana/grafana/pull/37483), [@zoltanbedi](https://github.com/zoltanbedi)
@@ -241,11 +207,6 @@ The mandatory `css` prop in `grafana/ui` components has been removed.
Previous versions of `grafana/ui` components were typed incorrectly due to a dependency mismatch between emotion 10 and 11 causing a `css` prop to be added to components that extended react types.
Issue [#38078](https://github.com/grafana/grafana/issues/38078)
### Unified Alerting (Grafana 8 Alerting) data loss
Grafana v8.2 fixed an issue with org isolation for notification configuration but to fix this Grafana will now re-run the migration from old alerting and this will cause complete removal of all new alert rules and notification configurations. This data loss is not something we find acceptable and are working on ways to mitigate it. So in the meantime, if you are an early adopter of unified alerting please wait with trying v8.2 beta.
Issue [#37414](https://github.com/grafana/grafana/issues/37414)
Panel queries and/or annotation queries that used more than one statistic will be converted into one query/annotation per statistic. In case an alerting rule was based on a query row that had more than one statistic, it would now be based only on the first statistic for that query row. New alerting rules will not be created for migrated queries. Please note that in most cases it would not make sense to have an alerting rule that is based on multiple statistics anyway. Issue [#36925](https://github.com/grafana/grafana/issues/36925)
### Deprecations
@@ -377,7 +338,7 @@ Panel queries and/or annotation queries that used more than one statistic will b
### Bug fixes
- **CloudWatch Logs:** Fix crash when no region is selected. [#37639](https://github.com/grafana/grafana/pull/37639), [@aocenas](https://github.com/aocenas)
- **Reporting:** Fix timezone parsing for scheduler. (Enterprise)
- **Reporting:** Fix timezone parsing for scheduler (enterprise)
<!-- 8.1.1 END -->
<!-- 8.1.0 START -->
@@ -388,9 +349,7 @@ Panel queries and/or annotation queries that used more than one statistic will b
- **Alerting:** Deduplicate receivers during migration. [#36812](https://github.com/grafana/grafana/pull/36812), [@codesome](https://github.com/codesome)
- **ColorPicker:** Display colors as RGBA. [#37231](https://github.com/grafana/grafana/pull/37231), [@nikki-kiga](https://github.com/nikki-kiga)
- **Encryption:** Add support for multiple encryption algorithms (aes-gcm). (Enterprise)
- **Select:** Make portalling the menu opt-in, but opt-in _everywhere_. [#37501](https://github.com/grafana/grafana/pull/37501), [@ashharrison90](https://github.com/ashharrison90)
- **TeamSync:** Batch team synchronization. (Enterprise)
- **TimeRangePicker:** Improve accessibility. [#36912](https://github.com/grafana/grafana/pull/36912), [@tskarhed](https://github.com/tskarhed)
### Bug fixes
@@ -490,8 +449,6 @@ Panel queries and/or annotation queries that used more than one statistic will b
- **Prometheus:** Update PromQL typeahead and highlighting. [#36730](https://github.com/grafana/grafana/pull/36730), [@ekpdt](https://github.com/ekpdt)
- **Prometheus:** interpolate variable for step field. [#36437](https://github.com/grafana/grafana/pull/36437), [@zoltanbedi](https://github.com/zoltanbedi)
- **Provisioning:** Improve validation by validating across all dashboard providers. [#26742](https://github.com/grafana/grafana/pull/26742), [@nabokihms](https://github.com/nabokihms)
- **Query cache:** Adding an encryption option for caching. (Enterprise)
- **Reporting:** Use start and end dates for scheduling. (Enterprise)
- **SQL Datasources:** Allow multiple string/labels columns with time series. [#36485](https://github.com/grafana/grafana/pull/36485), [@kylebrandt](https://github.com/kylebrandt)
- **Select:** Portal select menu to document.body. [#36398](https://github.com/grafana/grafana/pull/36398), [@ashharrison90](https://github.com/ashharrison90)
- **Team Sync:** Add group mapping to support team sync in the Generic OAuth provider. [#36307](https://github.com/grafana/grafana/pull/36307), [@wardbekker](https://github.com/wardbekker)
@@ -727,7 +684,7 @@ The following endpoints were deprecated for Grafana v5.0 and support for them ha
- **AzureMonitor:** Support querying subscriptions and resource groups in Azure Monitor Logs. [#34766](https://github.com/grafana/grafana/pull/34766), [@joshhunt](https://github.com/joshhunt)
- **AzureMonitor:** remove requirement for default subscription. [#34787](https://github.com/grafana/grafana/pull/34787), [@kostrse](https://github.com/kostrse)
- **CloudWatch:** Add Lambda@Edge Amazon CloudFront metrics. [#34561](https://github.com/grafana/grafana/pull/34561), [@razor-x](https://github.com/razor-x)
- **CloudWatch:** Add missing AWS AppSync metrics. [#34691](https://github.com/grafana/grafana/pull/34691), [@razor-x](https://github.com/razor-x)
- **CloudWatch:** Add missing AWS and AppSync metrics. [#34691](https://github.com/grafana/grafana/pull/34691), [@razor-x](https://github.com/razor-x)
- **ConfirmModal:** Auto focus delete button. [#34917](https://github.com/grafana/grafana/pull/34917), [@torkelo](https://github.com/torkelo)
- **Explore:** Add caching for queries that are run from logs navigation. [#34297](https://github.com/grafana/grafana/pull/34297), [@ivanahuckova](https://github.com/ivanahuckova)
- **Loki:** Add formatting for annotations. [#34774](https://github.com/grafana/grafana/pull/34774), [@fredr](https://github.com/fredr)
@@ -736,8 +693,6 @@ The following endpoints were deprecated for Grafana v5.0 and support for them ha
- **Overrides:** Include a manual override option to hide something from visualization. [#34783](https://github.com/grafana/grafana/pull/34783), [@torkelo](https://github.com/torkelo)
- **PieChart:** Support row data in pie charts. [#34755](https://github.com/grafana/grafana/pull/34755), [@torkelo](https://github.com/torkelo)
- **Prometheus:** Update default HTTP method to POST for existing data sources. [#34599](https://github.com/grafana/grafana/pull/34599), [@ivanahuckova](https://github.com/ivanahuckova)
- **Reporting:** Enable generating PDF for anonymous users. (Enterprise)
- **SAML:** Make private key and certificate optional. (Enterprise)
- **Time series panel:** Position tooltip correctly when window is scrolled or resized. [#34782](https://github.com/grafana/grafana/pull/34782), [@dprokop](https://github.com/dprokop)
### Bug fixes
@@ -1065,17 +1020,16 @@ Issue [#33352](https://github.com/grafana/grafana/issues/33352)
### Features and enhancements
- **Auditing:** Use nanosecond resolution for audit log timestamps. (Enterprise)
- **AzureMonitor:** Add support for Microsoft.AppConfiguration/configurationStores namespace. [#32123](https://github.com/grafana/grafana/pull/32123), [@deesejohn](https://github.com/deesejohn)
- **TablePanel:** Make sorting case-insensitive. [#32435](https://github.com/grafana/grafana/pull/32435), [@kaydelaney](https://github.com/kaydelaney)
- **AzureMonitor**: Add support for Microsoft.AppConfiguration/configurationStores namespace. [#32123](https://github.com/grafana/grafana/pull/32123), [@deesejohn](https://github.com/deesejohn)
- **TablePanel**: Make sorting case-insensitive. [#32435](https://github.com/grafana/grafana/pull/32435), [@kaydelaney](https://github.com/kaydelaney)
### Bug fixes
- **AzureMonitor:** Add support for Virtual WAN namespaces. [#32935](https://github.com/grafana/grafana/pull/32935), [@joshhunt](https://github.com/joshhunt)
- **Bugfix:** Add proper padding when scrolling is added to bar gauge. [#32411](https://github.com/grafana/grafana/pull/32411), [@mckn](https://github.com/mckn)
- **Datasource:** Prevent default data source named "default" from causing infinite loop. [#32949](https://github.com/grafana/grafana/pull/32949), [@jackw](https://github.com/jackw)
- **Prometheus:** Allow exemplars endpoint in data source proxy. [#32802](https://github.com/grafana/grafana/pull/32802), [@zoltanbedi](https://github.com/zoltanbedi)
- **Table:** Fix table data links so they refer to correct row after sorting. [#32571](https://github.com/grafana/grafana/pull/32571), [@torkelo](https://github.com/torkelo)
- **AzureMonitor**: Add support for Virtual WAN namespaces. [#32935](https://github.com/grafana/grafana/pull/32935), [@joshhunt](https://github.com/joshhunt)
- **Bugfix**: Add proper padding when scrolling is added to bar gauge. [#32411](https://github.com/grafana/grafana/pull/32411), [@mckn](https://github.com/mckn)
- **Datasource**: Prevent default data source named "default" from causing infinite loop. [#32949](https://github.com/grafana/grafana/pull/32949), [@jackw](https://github.com/jackw)
- **Prometheus**: Allow query_exemplars endpoint in data source proxy. [#32802](https://github.com/grafana/grafana/pull/32802), [@zoltanbedi](https://github.com/zoltanbedi)
- **Table**: Fix table data links so they refer to correct row after sorting. [#32571](https://github.com/grafana/grafana/pull/32571), [@torkelo](https://github.com/torkelo)
<!-- 7.5.4 END -->

View File

@@ -1,3 +1,4 @@
# 5.4.5 (2019-08-29)
- **Security**: Urgent security patch release. Please read more in our [blog](https://grafana.com/blog/2019/08/29/grafana-5.4.5-and-6.3.4-released-with-important-security-fix/)
@@ -179,7 +180,7 @@ See [security announcement](https://community.grafana.com/t/grafana-5-3-3-and-4-
- **Alerting**: Link to view full size image in Microsoft Teams alert notifier [#13121](https://github.com/grafana/grafana/issues/13121), thx [@holiiveira](https://github.com/holiiveira)
- **Alerting**: Fixes a bug where all alerts would send reminders after upgrade & restart [#13402](https://github.com/grafana/grafana/pull/13402)
- **Alerting**: Concurrent render limit for graphs used in notifications [#13401](https://github.com/grafana/grafana/pull/13401)
- **Postgres/MySQL/MSSQL**: Add support for replacing $\_\_interval and $\_\_interval_ms in alert queries [#11555](https://github.com/grafana/grafana/issues/11555), thx [@svenklemm](https://github.com/svenklemm)
- **Postgres/MySQL/MSSQL**: Add support for replacing $__interval and $\_\_interval_ms in alert queries [#11555](https://github.com/grafana/grafana/issues/11555), thx [@svenklemm](https://github.com/svenklemm)
# 5.3.0-beta1 (2018-09-06)
@@ -213,18 +214,18 @@ See [security announcement](https://community.grafana.com/t/grafana-5-3-3-and-4-
- **OAuth**: Fix overriding tls_skip_verify_insecure using environment variable [#12747](https://github.com/grafana/grafana/issues/12747), thx [@jangaraj](https://github.com/jangaraj)
- **Prometheus**: Fix graph panel bar width issue in aligned prometheus queries [#12379](https://github.com/grafana/grafana/issues/12379)
- **Prometheus**: Heatmap - fix unhandled error when some points are missing [#12484](https://github.com/grafana/grafana/issues/12484)
- **Prometheus**: Add $**interval, $**interval_ms, \$**range, $**range_s & $\_\_range_ms support for dashboard and template queries [#12597](https://github.com/grafana/grafana/issues/12597) [#12882](https://github.com/grafana/grafana/issues/12882), thx [@roidelapluie](https://github.com/roidelapluie)
- **Prometheus**: Add $__interval, $**interval_ms, \$**range, $__range_s & $\_\_range_ms support for dashboard and template queries [#12597](https://github.com/grafana/grafana/issues/12597) [#12882](https://github.com/grafana/grafana/issues/12882), thx [@roidelapluie](https://github.com/roidelapluie)
- **Elasticsearch**: For alerting/backend, support having index name to the right of pattern in index pattern [#12731](https://github.com/grafana/grafana/issues/12731)
- **Graphite**: Fix for quoting of int function parameters (when using variables) [#11927](https://github.com/grafana/grafana/pull/11927)
- **InfluxDB**: Support timeFilter in query templating for InfluxDB [#12598](https://github.com/grafana/grafana/pull/12598), thx [kichristensen](https://github.com/kichristensen)
- **Postgres/MySQL/MSSQL**: New $\_\_unixEpochGroup and $\_\_unixEpochGroupAlias macros [#12892](https://github.com/grafana/grafana/issues/12892), thx [@svenklemm](https://github.com/svenklemm)
- **Postgres/MySQL/MSSQL**: New $__unixEpochGroup and $\_\_unixEpochGroupAlias macros [#12892](https://github.com/grafana/grafana/issues/12892), thx [@svenklemm](https://github.com/svenklemm)
- **Postgres/MySQL/MSSQL**: Add previous fill mode to \$\_\_timeGroup macro which will fill in previously seen value when point is missing [#12756](https://github.com/grafana/grafana/issues/12756), thx [@svenklemm](https://github.com/svenklemm)
- **Postgres/MySQL/MSSQL**: Use floor rounding in \$\_\_timeGroup macro function [#12460](https://github.com/grafana/grafana/issues/12460), thx [@svenklemm](https://github.com/svenklemm)
- **Postgres/MySQL/MSSQL**: Use metric column as prefix when returning multiple value columns [#12727](https://github.com/grafana/grafana/issues/12727), thx [@svenklemm](https://github.com/svenklemm)
- **Postgres/MySQL/MSSQL**: New $\_\_timeGroupAlias macro. Postgres $\_\_timeGroup no longer automatically adds time column alias [#12749](https://github.com/grafana/grafana/issues/12749), thx [@svenklemm](https://github.com/svenklemm)
- **Postgres/MySQL/MSSQL**: New $__timeGroupAlias macro. Postgres $\_\_timeGroup no longer automatically adds time column alias [#12749](https://github.com/grafana/grafana/issues/12749), thx [@svenklemm](https://github.com/svenklemm)
- **Postgres/MySQL/MSSQL**: Escape single quotes in variables [#12785](https://github.com/grafana/grafana/issues/12785), thx [@eMerzh](https://github.com/eMerzh)
- **Postgres/MySQL/MSSQL**: Min time interval support [#13157](https://github.com/grafana/grafana/issues/13157), thx [@svenklemm](https://github.com/svenklemm)
- **MySQL/MSSQL**: Use datetime format instead of epoch for $\_\_timeFilter, $**timeFrom and \$**timeTo macros [#11618](https://github.com/grafana/grafana/issues/11618) [#11619](https://github.com/grafana/grafana/issues/11619), thx [@AustinWinstanley](https://github.com/AustinWinstanley)
- **MySQL/MSSQL**: Use datetime format instead of epoch for $__timeFilter, $**timeFrom and \$**timeTo macros [#11618](https://github.com/grafana/grafana/issues/11618) [#11619](https://github.com/grafana/grafana/issues/11619), thx [@AustinWinstanley](https://github.com/AustinWinstanley)
- **Postgres**: Escape ssl mode parameter in connectionstring [#12644](https://github.com/grafana/grafana/issues/12644), thx [@yogyrahmawan](https://github.com/yogyrahmawan)
- **Cloudwatch**: Improved error handling [#12489](https://github.com/grafana/grafana/issues/12489), thx [@mtanda](https://github.com/mtanda)
- **Cloudwatch**: AppSync metrics and dimensions [#12300](https://github.com/grafana/grafana/issues/12300), thx [@franciscocpg](https://github.com/franciscocpg)
@@ -1018,7 +1019,7 @@ Pull Request: [#8472](https://github.com/grafana/grafana/pull/8472)
## Enhancements
- **Telegram**: Added Telegram alert notifier [#7098](https://github.com/grafana/grafana/pull/7098), thx [@leonoff](https://github.com/leonoff)
- **Templating**: Make $\_\_interval and $\_\_interval_ms global built in variables that can be used in by any data source (in panel queries), closes [#7190](https://github.com/grafana/grafana/issues/7190), closes [#6582](https://github.com/grafana/grafana/issues/6582)
- **Templating**: Make $__interval and $\_\_interval_ms global built in variables that can be used in by any data source (in panel queries), closes [#7190](https://github.com/grafana/grafana/issues/7190), closes [#6582](https://github.com/grafana/grafana/issues/6582)
- **S3 Image Store**: External s3 image store (used in alert notifications) now support AWS IAM Roles, closes [#6985](https://github.com/grafana/grafana/issues/6985), [#7058](https://github.com/grafana/grafana/issues/7058) thx [@mtanda](https://github.com/mtanda)
- **SingleStat**: Implements diff aggregation method for singlestat [#7234](https://github.com/grafana/grafana/issues/7234), thx [@oliverpool](https://github.com/oliverpool)
- **Dataproxy**: Added setting to enable more verbose logging in dataproxy [#7209](https://github.com/grafana/grafana/pull/7209), thx [@Ricky-N](https://github.com/Ricky-N)

View File

@@ -1,15 +1,12 @@
FROM node:16-alpine3.14 as js-builder
ENV NODE_OPTIONS=--max_old_space_size=8000
WORKDIR /usr/src/app/
WORKDIR /grafana
COPY package.json yarn.lock .yarnrc.yml ./
COPY .yarn .yarn
COPY package.json yarn.lock ./
COPY packages packages
COPY plugins-bundled plugins-bundled
RUN yarn install
RUN apk --no-cache add git
RUN yarn install --pure-lockfile --no-progress
COPY tsconfig.json .eslintrc .editorconfig .browserslistrc .prettierrc.js ./
COPY public public
@@ -22,22 +19,20 @@ RUN yarn build
FROM golang:1.17.0-alpine3.14 as go-builder
RUN apk add --no-cache gcc g++ make
RUN apk add --no-cache gcc g++
WORKDIR /grafana
WORKDIR $GOPATH/src/github.com/grafana/grafana
COPY go.mod go.sum embed.go Makefile build.go package.json ./
COPY ./local/* ./local/
COPY go.mod go.sum embed.go ./
COPY cue cue
COPY cue.mod cue.mod
COPY packages/grafana-schema packages/grafana-schema
COPY public/app/plugins public/app/plugins
COPY pkg pkg
COPY scripts scripts
COPY cue.mod cue.mod
COPY .bingo .bingo
COPY build.go package.json ./
RUN go mod verify
RUN make build-go
RUN go run build.go build
# Final stage
FROM alpine:3.14.2
@@ -48,45 +43,43 @@ ARG GF_UID="472"
ARG GF_GID="0"
ENV PATH="/usr/share/grafana/bin:$PATH" \
GF_PATHS_CONFIG="/etc/grafana/grafana.ini" \
GF_PATHS_DATA="/var/lib/grafana" \
GF_PATHS_HOME="/usr/share/grafana" \
GF_PATHS_LOGS="/var/log/grafana" \
GF_PATHS_PLUGINS="/var/lib/grafana/plugins" \
GF_PATHS_PROVISIONING="/etc/grafana/provisioning"
GF_PATHS_CONFIG="/etc/grafana/grafana.ini" \
GF_PATHS_DATA="/var/lib/grafana" \
GF_PATHS_HOME="/usr/share/grafana" \
GF_PATHS_LOGS="/var/log/grafana" \
GF_PATHS_PLUGINS="/var/lib/grafana/plugins" \
GF_PATHS_PROVISIONING="/etc/grafana/provisioning"
WORKDIR $GF_PATHS_HOME
RUN apk add --no-cache ca-certificates bash tzdata musl-utils
RUN apk add --no-cache openssl ncurses-libs ncurses-terminfo-base --repository=http://dl-cdn.alpinelinux.org/alpine/edge/main
RUN apk upgrade ncurses-libs ncurses-terminfo-base --repository=http://dl-cdn.alpinelinux.org/alpine/edge/main
RUN apk info -vv | sort
RUN apk add --no-cache ca-certificates bash tzdata && \
apk add --no-cache openssl musl-utils
COPY conf ./conf
RUN if [ ! $(getent group "$GF_GID") ]; then \
addgroup -S -g $GF_GID grafana; \
fi
addgroup -S -g $GF_GID grafana; \
fi
RUN export GF_GID_NAME=$(getent group $GF_GID | cut -d':' -f1) && \
mkdir -p "$GF_PATHS_HOME/.aws" && \
adduser -S -u $GF_UID -G "$GF_GID_NAME" grafana && \
mkdir -p "$GF_PATHS_PROVISIONING/datasources" \
"$GF_PATHS_PROVISIONING/dashboards" \
"$GF_PATHS_PROVISIONING/notifiers" \
"$GF_PATHS_PROVISIONING/plugins" \
"$GF_PATHS_PROVISIONING/access-control" \
"$GF_PATHS_LOGS" \
"$GF_PATHS_PLUGINS" \
"$GF_PATHS_DATA" && \
cp "$GF_PATHS_HOME/conf/sample.ini" "$GF_PATHS_CONFIG" && \
cp "$GF_PATHS_HOME/conf/ldap.toml" /etc/grafana/ldap.toml && \
chown -R "grafana:$GF_GID_NAME" "$GF_PATHS_DATA" "$GF_PATHS_HOME/.aws" "$GF_PATHS_LOGS" "$GF_PATHS_PLUGINS" "$GF_PATHS_PROVISIONING" && \
chmod -R 777 "$GF_PATHS_DATA" "$GF_PATHS_HOME/.aws" "$GF_PATHS_LOGS" "$GF_PATHS_PLUGINS" "$GF_PATHS_PROVISIONING"
mkdir -p "$GF_PATHS_HOME/.aws" && \
adduser -S -u $GF_UID -G "$GF_GID_NAME" grafana && \
mkdir -p "$GF_PATHS_PROVISIONING/datasources" \
"$GF_PATHS_PROVISIONING/dashboards" \
"$GF_PATHS_PROVISIONING/notifiers" \
"$GF_PATHS_PROVISIONING/plugins" \
"$GF_PATHS_PROVISIONING/access-control" \
"$GF_PATHS_LOGS" \
"$GF_PATHS_PLUGINS" \
"$GF_PATHS_DATA" && \
cp "$GF_PATHS_HOME/conf/sample.ini" "$GF_PATHS_CONFIG" && \
cp "$GF_PATHS_HOME/conf/ldap.toml" /etc/grafana/ldap.toml && \
chown -R "grafana:$GF_GID_NAME" "$GF_PATHS_DATA" "$GF_PATHS_HOME/.aws" "$GF_PATHS_LOGS" "$GF_PATHS_PLUGINS" "$GF_PATHS_PROVISIONING" && \
chmod -R 777 "$GF_PATHS_DATA" "$GF_PATHS_HOME/.aws" "$GF_PATHS_LOGS" "$GF_PATHS_PLUGINS" "$GF_PATHS_PROVISIONING"
COPY --from=go-builder /grafana/bin/*/grafana-server /grafana/bin/*/grafana-cli ./bin/
COPY --from=js-builder /grafana/public ./public
COPY --from=js-builder /grafana/tools ./tools
COPY --from=go-builder /go/src/github.com/grafana/grafana/bin/*/grafana-server /go/src/github.com/grafana/grafana/bin/*/grafana-cli ./bin/
COPY --from=js-builder /usr/src/app/public ./public
COPY --from=js-builder /usr/src/app/tools ./tools
EXPOSE 3000

View File

@@ -1,16 +1,12 @@
FROM node:16-alpine3.14 as js-builder
ENV NODE_OPTIONS=--max_old_space_size=8000
FROM node:14.15.1-slim AS js-builder
WORKDIR /usr/src/app/
COPY package.json yarn.lock ./
COPY packages packages
COPY .yarnrc.yml ./
COPY .yarn .yarn
COPY plugins-bundled plugins-bundled
RUN yarn install
RUN apt-get update && apt-get install -yq git
RUN yarn install --pure-lockfile
COPY tsconfig.json .eslintrc .editorconfig .browserslistrc .prettierrc.js ./
COPY public public
@@ -26,8 +22,7 @@ FROM golang:1.17.0 AS go-builder
WORKDIR /src/grafana
COPY go.mod go.sum embed.go ./
COPY Makefile build.go package.json ./
COPY .bingo .bingo
COPY build.go package.json ./
COPY pkg pkg/
COPY cue cue/
COPY cue.mod cue.mod/
@@ -35,7 +30,7 @@ COPY packages/grafana-schema packages/grafana-schema/
COPY public/app/plugins public/app/plugins/
RUN go mod verify
RUN make build-go
RUN go run build.go build
FROM ubuntu:20.04

View File

@@ -4,7 +4,7 @@ The main goal of issue triage is to categorize all incoming Grafana issues and m
> **Note:** This information is for Grafana project Maintainers, Owners, and Admins. If you are a Contributor, then you will not be able to perform most of the tasks in this topic.
The core maintainers of the Grafana project are responsible for categorizing all incoming issues and delegating any critical or important issue to other maintainers. Currently one maintainer each week is responsible. Besides that part, triage provides an important way to contribute to an open source project.
The core maintainers of the Grafana project are responsible for categorizing all incoming issues and delegating any critical or important issue to other maintainers. Currently one maintainer each week is responsible. Besides that part, triage provides an important way to contribute to an open source project.
Triage helps ensure issues resolve quickly by:
@@ -18,7 +18,6 @@ If you don't have the knowledge or time to code, consider helping with triage. T
## Simplified flowchart diagram of the issue triage process
<!-- https://textik.com/#610afa78553def29 -->
```
+--------------------------+
+----------------+ New issue opened/ |
@@ -77,16 +76,15 @@ Instructions for setting up filters in Gmail can be found [here](#setting-up-gma
## 2. Ensure the issue contains basic information
Before triaging an issue very far, make sure that the issue's author provided the standard issue information. This will help you make an educated recommendation on how to categorize the issue. The Grafana project utilizes [GitHub issue templates](https://help.github.com/en/articles/creating-issue-templates-for-your-repository) to guide contributors to provide standard information that must be included for each type of template or type of issue.
Before triaging an issue very far, make sure that the issue's author provided the standard issue information. This will help you make an educated recommendation on how to categorize the issue. The Grafana project utilizes [GitHub issue templates](https://help.github.com/en/articles/creating-issue-templates-for-your-repository) to guide contributors to provide standard information that must be included for each type of template or type of issue.
### Standard issue information that must be included
Given a certain [issue template](<[template](https://github.com/grafana/grafana/issues/new/choose)>) have been used by the issue author or depending how the issue is perceived by the issue triage responsible, the following should help you understand what standard issue information that must be included.
Given a certain [issue template]([template](https://github.com/grafana/grafana/issues/new/choose)) have been used by the issue author or depending how the issue is perceived by the issue triage responsible, the following should help you understand what standard issue information that must be included.
#### Bug reports
Should explain what happened, what was expected and how to reproduce it together with any additional information that may help giving a complete picture of what happened such as screenshots, [query inspector](https://community.grafana.com/t/using-grafanas-query-inspector-to-troubleshoot-issues/2630) output and any environment related information that's applicable and/or maybe related to the reported problem:
- Grafana version
- Data source type & version
- Platform & OS Grafana is installed on
@@ -172,12 +170,10 @@ If it's not perfectly clear that it's an actual bug, quickly try to reproduce it
4. Move on to [prioritizing the issue](#4-prioritization-of-issues).
**It can't be reproduced:**
1. Either [ask for more information](#2-ensure-the-issue-contains-basic-information) needed to investigate it more thoroughly.
2. Either [delegate further investigations](#investigation-of-issues) to someone else.
**It works as intended/by design:**
1. Kindly and politely add a comment explaining briefly why we think it works as intended and close the issue.
2. Label the issue `type/works-as-intended`.
@@ -199,7 +195,6 @@ Second, label the issue `type/docs` and at least one `area/*` or `datasource/*`
**Minor typo/error/lack of information:**
There's a minor typo/error/lack of information that adds a lot of confusion for users and given the amount of work is a big win to make sure fixing it:
1. Either update the documentation yourself and open a pull request.
2. Either delegate the work to someone else by assigning that person to the issue and add the issue to next major/minor milestone.
@@ -304,12 +299,12 @@ For some other combinations it may not be possible at all for a maintainer to se
Even if you don't have the time or knowledge to investigate an issue we highly recommend that you [upvote](https://help.github.com/en/articles/about-conversations-on-github#reacting-to-ideas-in-comments) the issue if you happen to have the same problem. If you have further details that may help investigating the issue please provide as much information as possible.
## Automation
## Automation
We have some automation that triggers on comments or labels being added to issues. Many of these automated behaviors are defined in [commands.json](https://github.com/grafana/grafana/blob/main/.github/commands.json). Or in other [GitHub Actions](https://github.com/grafana/grafana/tree/main/.github/workflows)
- Add /duplicate `#<issue number>` to have Grafana label & close issue with an appropriate message.
- Add `bot/question` and the bot will close it with an appropriate message.
* Add /duplicate `#<issue number>` to have Grafana label & close issue with an appropriate message.
* Add `bot/question` and the bot will close it with an appropriate message.
[Read more on bot actions](https://github.com/grafana/grafana/blob/main/.github/bot.md)
@@ -329,7 +324,6 @@ Part of issue triage should also be triaging of external PRs. Main goal should b
If you're using Gmail it's highly recommended that you setup filters to automatically remove email from the inbox and label them accordingly to make it easy for you to understand when you need to act upon a notification or process all incoming issues that haven't been triaged.
This may be setup by personal preference, but here's a working configuration for reference.
1. Follow instructions in [gist](https://gist.github.com/marefr/9167c2e31466f6316c1cba118874e74f)
2. In Gmail, go to Settings -> Filters and Blocked Addresses
3. Import filters -> select xml file -> Open file
@@ -338,7 +332,6 @@ This may be setup by personal preference, but here's a working configuration for
6. Create filters
This will give you a structure of labels in the sidebar similar to the following:
```
- Inbox
...

View File

@@ -7,7 +7,7 @@ WIRE_TAGS = "oss"
-include local/Makefile
include .bingo/Variables.mk
.PHONY: all deps-go deps-js deps build-go build-server build-cli build-js build build-docker-dev build-docker-full lint-go golangci-lint test-go test-js gen-ts test run run-frontend clean devenv devenv-down protobuf drone help
.PHONY: all deps-go deps-js deps build-go build-server build-cli build-js build build-docker-dev build-docker-full lint-go golangci-lint test-go test-js test run run-frontend clean devenv devenv-down protobuf drone help
GO = go
GO_FILES ?= ./pkg/...
@@ -26,13 +26,13 @@ deps: deps-js ## Install all dependencies.
node_modules: package.json yarn.lock ## Install node modules.
@echo "install frontend dependencies"
YARN_ENABLE_PROGRESS_BARS=false yarn install --immutable
yarn install --pure-lockfile --no-progress
##@ Building
gen-go: $(WIRE)
@echo "generate go files"
$(WIRE) gen -tags $(WIRE_TAGS) ./pkg/server ./pkg/cmd/grafana-cli/runner
$(WIRE) gen -tags $(WIRE_TAGS) ./pkg/server
build-go: gen-go ## Build all Go binaries.
@echo "build go files"
@@ -86,7 +86,7 @@ golangci-lint: scripts/go/bin/golangci-lint
--config ./scripts/go/configs/.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
lint-go: golangci-lint # Run all code checks for backend.
# with disabled SC1071 we are ignored some TCL,Expect `/usr/bin/env expect` scripts
shellcheck: $(SH_FILES) ## Run checks for shell scripts.
@@ -147,19 +147,13 @@ clean: ## Clean up intermediate build artifacts.
rm -rf node_modules
rm -rf public/build
gen-ts:
@echo "generating TypeScript definitions"
go get github.com/tkrajina/typescriptify-golang-structs/typescriptify@v0.1.7
tscriptify -interface -package=github.com/grafana/grafana/pkg/services/live/pipeline -import="import { FieldConfig } from '@grafana/data'" -target=public/app/features/live/pipeline/models.gen.ts pkg/services/live/pipeline/config.go
go mod tidy
# This repository's configuration is protected (https://readme.drone.io/signature/).
# Use this make target to regenerate the configuration YAML files when
# you modify starlark files.
drone: $(DRONE)
$(DRONE) starlark --format
$(DRONE) lint .drone.yml
$(DRONE) --server https://drone.grafana.net sign --save grafana/grafana
drone:
drone starlark
drone lint
drone --server https://drone.grafana.net sign --save grafana/grafana
help: ## Display this help.
@awk 'BEGIN {FS = ":.*##"; printf "\nUsage:\n make \033[36m<target>\033[0m\n"} /^[a-zA-Z_-]+:.*?##/ { printf " \033[36m%-15s\033[0m %s\n", $$1, $$2 } /^##@/ { printf "\n\033[1m%s\033[0m\n", substr($$0, 5) } ' $(MAKEFILE_LIST)

View File

@@ -1,4 +1,6 @@
Copyright 2014-2021 Grafana Labs
This software is based on Kibana:
This software is based on Kibana:
Copyright 2012-2013 Elasticsearch BV

View File

@@ -1,27 +1,27 @@
# Plugin development
# Plugin development
This document is not meant as a complete guide for developing plugins but more as a changelog for changes in
Grafana that can impact plugin development. Whenever you as a plugin author encounter an issue with your plugin after
upgrading Grafana please check here before creating an issue.
upgrading Grafana please check here before creating an issue.
## Plugin development resources
- [Grafana plugin developer guide](https://grafana.com/docs/grafana/latest/developers/plugins/)
- [Grafana plugin developer guide](http://docs.grafana.org/plugins/developing/development/)
- [Webpack Grafana plugin template project](https://github.com/CorpGlory/grafana-plugin-template-webpack)
- [Simple JSON datasource plugin](https://github.com/grafana/simple-json-datasource)
## Changes in Grafana v4.6
This version of Grafana has big changes that will impact a limited set of plugins. We moved from systemjs to webpack
for built-in plugins and everything internal. External plugins still use systemjs but now with a limited
set of Grafana components they can import. Plugins can depend on libs like lodash & moment and internal components
like before using the same import paths. However since everything in Grafana is no longer accessible, a few plugins could encounter issues when importing a Grafana dependency.
for built-in plugins and everything internal. External plugins still use systemjs but now with a limited
set of Grafana components they can import. Plugins can depend on libs like lodash & moment and internal components
like before using the same import paths. However since everything in Grafana is no longer accessible, a few plugins could encounter issues when importing a Grafana dependency.
[List of exposed components plugins can import/require](https://github.com/grafana/grafana/blob/main/public/app/features/plugins/plugin_loader.ts#L48)
If you think we missed exposing a crucial lib or Grafana component let us know by opening an issue.
If you think we missed exposing a crucial lib or Grafana component let us know by opening an issue.
### Deprecated components
### Deprecated components
The angular directive `<spectrum-picker>` is now deprecated (will still work for a version more) but we recommend plugin authors
upgrade to new `<color-picker color="ctrl.color" onChange="ctrl.onSparklineColorChange"></color-picker>`

View File

@@ -30,8 +30,8 @@ The Grafana documentation is available at [grafana.com/docs](https://grafana.com
If you're interested in contributing to the Grafana project:
- Start by reading the [Contributing guide](https://github.com/grafana/grafana/blob/HEAD/CONTRIBUTING.md).
- Learn how to set up your local environment, in our [Developer guide](https://github.com/grafana/grafana/blob/HEAD/contribute/developer-guide.md).
- Start by reading the [Contributing guide](/CONTRIBUTING.md).
- Learn how to set up your local environment, in our [Developer guide](/contribute/developer-guide.md).
- Explore our [beginner-friendly issues](https://github.com/grafana/grafana/issues?q=is%3Aopen+is%3Aissue+label%3A%22beginner+friendly%22).
- Look through our [style guide and Storybook](https://developers.grafana.com/ui/latest/index.html).
@@ -40,8 +40,8 @@ If you're interested in contributing to the Grafana project:
- Follow [@grafana on Twitter](https://twitter.com/grafana/).
- Read and subscribe to the [Grafana blog](https://grafana.com/blog/).
- If you have a specific question, check out our [discussion forums](https://community.grafana.com/).
- For general discussions, join us on the [official Slack](https://slack.grafana.com) team.
- For general discussions, join us on the [official Slack](http://slack.raintank.io/) team.
## License
Grafana is distributed under [AGPL-3.0-only](LICENSE). For Apache-2.0 exceptions, see [LICENSING.md](https://github.com/grafana/grafana/blob/HEAD/LICENSING.md).
Grafana is distributed under [AGPL-3.0-only](LICENSE). For Apache-2.0 exceptions, see [LICENSING.md](LICENSING.md).

View File

@@ -1,5 +1,5 @@
# Roadmap
The roadmap is a tentative plan for the core development team. Things change constantly as pull requests come in and priorities change, but it will give you an idea of our current vision and plan.
The roadmap is a tentative plan for the core development team. Things change constantly as pull requests come in and priorities change, but it will give you an idea of our current vision and plan.
To view the Roadmap, go to the Issues tab on GitHub. There you will find three roadmap issues pinned at the top.

View File

@@ -1,10 +1,10 @@
# Reporting security issues
If you think you have found a security vulnerability, please send a report to [security@grafana.com](mailto:security@grafana.com). This address can be used for all of Grafana Labs's open source and commercial products (including but not limited to Grafana, Grafana Cloud, Grafana Enterprise, and grafana.com). We can accept only vulnerability reports at this address.
If you think you have found a security vulnerability, please send a report to [security@grafana.com](mailto:security@grafana.com). This address can be used for all of Grafana Labs's open source and commercial products (including but not limited to Grafana, Grafana Cloud, Grafana Enterprise, and grafana.com). We can accept only vulnerability reports at this address.
Please encrypt your message to us; please use our PGP key. The key fingerprint is:
F988 7BEA 027A 049F AE8E 5CAA D125 8932 BE24 C5CA
F988 7BEA 027A 049F AE8E 5CAA D125 8932 BE24 C5CA
The key is available from [keyserver.ubuntu.com](https://keyserver.ubuntu.com/pks/lookup?search=0xF9887BEA027A049FAE8E5CAAD1258932BE24C5CA&fingerprint=on&op=index).
@@ -15,6 +15,6 @@ Grafana Labs will send you a response indicating the next steps in handling your
## Security announcements
We maintain a category on the community site called [Security Announcements](https://community.grafana.com/c/security-announcements),
where we will post a summary, remediation, and mitigation details for any patch containing security fixes.
where we will post a summary, remediation, and mitigation details for any patch containing security fixes.
You can also subscribe to email updates to this category if you have a grafana.com account and sign on to the community site or track updates via an [RSS feed](https://community.grafana.com/c/security-announcements.rss).

View File

@@ -1,13 +1,10 @@
# Get Grafana help
---
------------------
First, check the official [Grafana documentation](https://grafana.com/docs/).
If you require further help or support then ask a question in the [Grafana community site](https://community.grafana.com/) or [Grafana Slack](http://slack.raintank.io/). You can also search the community site for previously answered questions, in case someone already had your problem and got help.
**Please note:**
**Please note:**
- The Grafana project uses GitHub mainly for tracking bugs and feature requests.
- Do not open an issue just to ask a question. The issue will be closed immediately.
- Only submit issues for bug reports, feature requests, or enhancements.

View File

@@ -13,7 +13,6 @@ Team members and their access to repositories is maintained through [GitHub team
## Proposing changes
Examples of proposed changes are overarching architecture, component design, and specific code or graphical elements. Proposed changes SHOULD cover the big picture and intention, but individual parts SHOULD be split into the smallest possible changes. Changes SHOULD be based on and target the main branch. Depending on size of the proposed change, each change SHOULD be discussed, in increasing order of change size and complexity:
- Directly in a RR (Pull Request) - this MAY be done, but SHOULD not be the common case.
- Issue
- Developer mailing list
@@ -25,7 +24,6 @@ Significant changes MUST be discussed and agreed upon with the relevant subsyste
Depending on the size and complexity of a PR, different requirements MUST be applied. Any team member contributing substantially to a PR MUST NOT count against review requirements.
Commits MUST be merged into main using PRs. They MUST NOT be merged into main directly.
- Every merge MUST be approved by at least one team member.
- Non-trivial changes MUST be approved by at least
- two team members, or
@@ -35,7 +33,6 @@ Commits MUST be merged into main using PRs. They MUST NOT be merged into main di
- the relevant subsystem maintainer.
PRs MUST be [reviewed](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/reviewing-changes-in-pull-requests) and [approved](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/approving-a-pull-request-with-required-reviews) via GitHubs review system.
- Reviewers MAY write comments if approving
- Reviewers MUST write comments if rejecting a PR or if requesting changes.
@@ -43,9 +40,9 @@ Once a PR is approved as per above, any team member MAY merge the PR.
## Backporting a PR
PRs intended for inclusion in the next PATCH release they must be backported to the release branch. The bot can do this automatically. [Read more on backport PRs](https://github.com/grafana/grafana/blob/main/.github/bot.md). Both the source PR and the backport PR should be assigned to the patch release milestone, unless you are backporting to many releases then it can differ.
PRs intended for inclusion in the next PATCH release they must be backported to the release branch. The bot can do this automatically. [Read more on backport PRs](https://github.com/grafana/grafana/blob/main/.github/bot.md). Both the source PR and the backport PR should be assigned to the patch release milestone, unless you are backporting to many releases then it can differ.
Backport PRs are also needed during the beta period to get fixes into the stable release.
Backport PRs are also needed during the beta period to get fixes into the stable release.
# Release workflow
@@ -54,7 +51,6 @@ Backport PRs are also needed during the beta period to get fixes into the stable
Grafana uses trunk-based development.
In particular, we found that the following principles match how we work:
- Main and release branches MUST always build without failure.
- Branches SHOULD be merged often. Larger changes SHOULD be activated with feature flags until they are ready. Long-lived development branches SHOULD be avoided.
- Changes MAY be enabled by default once they are in a complete state
@@ -65,7 +61,6 @@ In particular, we found that the following principles match how we work:
Releases MUST follow [Semantic Versioning](https://semver.org/) in naming and SHOULD follow Semantic Versioning as closely as reasonably possible for non-library software.
Release branches MUST be split from the following branches.
- MAJOR release branches MUST be based on main.
- MINOR release branches MUST be based on main.
- PATCH release branches MUST be split from the relevant MINOR release branchs most current PATCH
@@ -73,7 +68,6 @@ Release branches MUST be split from the following branches.
Security releases follow the same process but MUST be prepared in secret. Security releases MUST NOT include changes which are not related to the security fix. Normal release processes MUST accommodate the security release process. SECURITY.md MUST be followed.
Releases follow the following cadence
- MAJOR: Yearly
- MINOR: Every 4-6 weeks
- PATCH: As needed

View File

@@ -228,9 +228,6 @@ admin_password = admin
# used for signing
secret_key = SW2YcwTIb9zpOOhoPsMm
# key provider used for envelope encryption, default to static value specified by secret_key
encryption_provider = secretKey
# disable gravatar profile images
disable_gravatar = false
@@ -525,7 +522,6 @@ tls_skip_verify_insecure = false
tls_client_cert =
tls_client_key =
tls_client_ca =
use_pkce = false
#################################### Basic Auth ##########################
[auth.basic]
@@ -739,7 +735,7 @@ global_alert_rule = -1
enabled = false
# Comma-separated list of organization IDs for which to disable unified alerting. Only supported if unified alerting is enabled.
disabled_orgs =
disabled_orgs =
# Specify the frequency of polling for admin config changes.
# The interval string is a possibly signed sequence of decimal numbers, followed by a unit suffix (ms, s, m, h, d), e.g. 30s or 1m.
@@ -972,8 +968,6 @@ allow_loading_unsigned_plugins =
plugin_admin_enabled = true
plugin_admin_external_manage_enabled = false
plugin_catalog_url = https://grafana.com/grafana/plugins/
# Enter a comma-separated list of plugin identifiers to hide in the plugin catalog.
plugin_catalog_hidden_plugins =
#################################### Grafana Live ##########################################
[live]

View File

@@ -222,9 +222,6 @@
# used for signing
;secret_key = SW2YcwTIb9zpOOhoPsMm
# key provider used for envelope encryption, default to static value specified by secret_key
;encryption_provider = secretKey
# disable gravatar profile images
;disable_gravatar = false
@@ -504,7 +501,6 @@
;tls_client_cert =
;tls_client_key =
;tls_client_ca =
;use_pkce = false
#################################### Basic Auth ##########################
[auth.basic]
@@ -716,7 +712,7 @@
;enabled = false
# Comma-separated list of organization IDs for which to disable unified alerting. Only supported if unified alerting is enabled.
;disabled_orgs =
;disabled_orgs =
# Specify the frequency of polling for admin config changes.
# The interval string is a possibly signed sequence of decimal numbers, followed by a unit suffix (ms, s, m, h, d), e.g. 30s or 1m.
@@ -945,8 +941,6 @@
;plugin_admin_enabled = false
;plugin_admin_external_manage_enabled = false
;plugin_catalog_url = https://grafana.com/grafana/plugins/
# Enter a comma-separated list of plugin identifiers to hide in the plugin catalog.
;plugin_catalog_hidden_plugins =
#################################### Grafana Live ##########################################
[live]

View File

@@ -4,10 +4,10 @@ Are you looking to take on contributions with bigger impact? These guides help y
Learn more about the backend architecture:
- Part 1: [Services](backend/services.md)
- Part 1: [Services](backend/services.md)
- Part 2: [Communication](backend/communication.md)
- Part 3: [Database](backend/database.md)
Learn more about the frontend architecture:
- Part 1: [Data requests](frontend-data-requests.md)

View File

@@ -1,12 +1,12 @@
# Package hierarchy
The Go package hierarchy in Grafana should be organized logically (Ben Johnson's
[article](https://medium.com/@benbjohnson/standard-package-layout-7cdbc8391fc1) served as inspiration), according to the
[article](https://medium.com/@benbjohnson/standard-package-layout-7cdbc8391fc1) served as inspiration), according to the
following principles:
- Domain types and interfaces should be in "root" packages (not necessarily at the very top, of the hierarchy, but
* Domain types and interfaces should be in "root" packages (not necessarily at the very top, of the hierarchy, but
logical roots)
- Sub-packages should depend on roots - sub-packages here typically contain implementations, for example of services
* Sub-packages should depend on roots - sub-packages here typically contain implementations, for example of services
## Practical example

View File

@@ -121,7 +121,7 @@ You can see an example implementation above of the IsDisabled method and custom
## Run Wire / generate code
When running `make run` it will call `make gen-go` on the first run. `gen-go` in turn will call the wire binary and generate the code in [wire_gen.go](/pkg/server/wire_gen.go) and [wire_gen.go](/pkg/cmd/grafana-cli/runner/wire_gen.go). The wire binary is installed using [bingo](https://github.com/bwplotka/bingo) which will make sure to download and install all the tools needed, including the Wire binary at using a specific version.
When running `make run` it will call `make gen-go` on the first run. `gen-go` in turn will call the wire binary and generate the code in [wire_gen.go](/pkg/server/wire_gen.go). The wire binary is installed using [bingo](https://github.com/bwplotka/bingo) which will make sure to download and install all the tools needed, including the Wire binary at using a specific version.
## OSS vs Enterprise

View File

@@ -3,7 +3,6 @@
[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
This section describes how canceling requests work in Grafana. While data sources can implement their own cancellation concept, we recommend that you use the method we describe here.
A data request can take a long time to finish. During the time between when a request starts and finishes, the user can change context. For example, the user may navigate away or issue the same request again.
@@ -13,35 +12,29 @@ If we wait for canceled requests to complete, it might create unnecessary load o
Grafana uses a concept called _request cancelation_ to cancel any ongoing request that Grafana doesn't need.
#### 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/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:
- When an ongoing request discovers that an additional request with the same `requestId` has started, then Grafana will cancel the ongoing request.
- When an ongoing request discovers that the special "cancel all requests" `requestId` was sent, then Grafana will cancel the ongoing request.
#### 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://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)
## Request queue
Depending on how the web browser implements the protocol for HTTP 1.1, it will limit the number of parallel requests, lets call this limit _max_parallel_browser_request_.
Depending on how the web browser implements the protocol for HTTP 1.1, it will limit the number of parallel requests, lets call this limit _max_parallel_browser_request_.
Unless you have configured Grafana to use HTTP2, the browser limits parallel data requests according to the browser's implementation. For more information on how to enable HTTP2, refer to [Configuration](https://grafana.com/docs/grafana/latest/administration/configuration/#protocol).
Because there is a _max_parallel_browser_request_ limit, if some of the requests take a long time, they will block later requests and make interacting with Grafana very slow.
#### Before Grafana 7.2
Not supported.
Not supported.
#### After Grafana 7.2
Grafana uses a _request queue_ to process all incoming data requests in order while reserving a free "spot" for any requests to the Grafana API.
Grafana uses a _request queue_ to process all incoming data requests in order while reserving a free "spot" for any requests to the Grafana API.
Since the first implementation of the request queue doesn't take into account what browser the user uses, the _request queue_ limit for parallel data source requests is hard-coded to 5.

View File

@@ -62,7 +62,7 @@ We use [pa11y-ci](https://github.com/pa11y/pa11y-ci) to collect accessibility er
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`.
- 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 Grafana instance needs to be running on `http://localhost:3000`.
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.
@@ -95,25 +95,25 @@ The area should use upper camel case, e.g. UpperCamelCase.
Prefer using one of the following areas:
- **Build:** Change the build system, or external dependencies
- **Chore:** Change that don't affect functionality
- **Dashboard:** Change the Dashboard feature
- **Docs:** Change documentation
- **Explore:** Change the Explore feature
- **Plugins:** Change the ... plugin
- **Build:** Changes to the build system, or external dependencies.
- **Chore:** Changes that don't affect functionality.
- **Dashboard:** Changes to the Dashboard feature.
- **Docs:** Changes to documentation.
- **Explore:** Changes to the Explore feature.
- **Plugins:** Changes to any of the plugins.
For changes to data sources, the area is the name of the data source. For example, AzureMonitor, Graphite, or Prometheus.
For changes to data sources, the area should be the name of the data source, e.g., AzureMonitor, Graphite, and Prometheus.
For changes to panels, the area is the name of the panel, suffixed with Panel. For example, GraphPanel, SinglestatPanel, or TablePanel.
For changes to panels, the area should be the name of the panel, suffixed with Panel, e.g., GraphPanel, SinglestatPanel, and TablePanel.
**Examples**
- `Build: Support publishing MSI to grafana.com`
- `Explore: Add Live option for supported data sources`
- `GraphPanel: Fix legend sorting issues`
- `Docs: Change url to URL in all documentation files`
- `Docs: Changed url to URL in all documentation files`
If you're unsure, see the existing [changelog](https://github.com/grafana/grafana/blob/main/CHANGELOG.md) for inspiration or guidance.
If you're unsure, please have a look at the existing [changelog](https://github.com/grafana/grafana/blob/main/CHANGELOG.md) for inspiration/guidance.
### Pull request titles

View File

@@ -10,8 +10,14 @@ Make sure you have the following dependencies installed before setting up your d
- [Git](https://git-scm.com/)
- [Go](https://golang.org/dl/) (see [go.mod](../go.mod#L3) for minimum required version)
- [Node.js (Long Term Support)](https://nodejs.org)
- [Yarn](https://yarnpkg.com)
Additionally you'll need:
- [Node.js](https://nodejs.org) (see `volta.node` property in [package.json](../package.json) for the correct version).
- [Yarn](https://yarnpkg.com) (see `volta.yarn` property in [package.json](../package.json) for the correct version).
We recommend using [Volta](https://github.com/volta-cli/volta) to manage your JS toolchain.
Refer to the [Volta Getting Started Guide](https://docs.volta.sh/guide/getting-started) for setup instructions for your operating system.
### macOS
@@ -20,8 +26,6 @@ We recommend using [Homebrew](https://brew.sh/) for installing any missing depen
```
brew install git
brew install go
brew install node@16
npm install -g yarn
```
### Windows
@@ -48,7 +52,7 @@ Grafana consists of two components; the _frontend_, and the _backend_.
Before we can build the frontend assets, we need to install the dependencies:
```
yarn install --immutable
yarn install --pure-lockfile
```
After the command has finished, we can start building our source code:
@@ -212,7 +216,7 @@ ulimit -a
To change the number of open files allowed, run:
```
ulimit -S -n 4096
ulimit -S -n 2048
```
The number of files needed may be different on your environment. To determine the number of open files needed by `make run`, run:

View File

@@ -17,6 +17,6 @@ mage protobuf
After upgrading the protobuf dependency in Grafana and the plugin SDK, it might be wise to test that things still work,
before making corresponding PRs:
- Test a plugin built with upgraded SDK on upgraded Grafana
- Test a plugin built with non-upgraded SDK on upgraded Grafana
- Test a plugin built with upgraded SDK on non-upgraded Grafana
* Test a plugin built with upgraded SDK on upgraded Grafana
* Test a plugin built with non-upgraded SDK on upgraded Grafana
* Test a plugin built with upgraded SDK on non-upgraded Grafana

View File

@@ -6,12 +6,12 @@ This document defines technical terms used in Grafana.
## TLS/SSL
The acronyms [TLS](https://en.wikipedia.org/wiki/Transport_Layer_Security) (Transport Layer Security and
The acronyms [TLS](https://en.wikipedia.org/wiki/Transport_Layer_Security) (Transport Layer Security and
[SSL](https://en.wikipedia.org/wiki/SSL) (Secure Socket Layer) are both used to describe the HTTPS security layer,
and are in practice synonymous. However, TLS is considered the current name for the technology, and SSL is considered
[deprecated](https://tools.ietf.org/html/rfc7568).
[deprecated](https://tools.ietf.org/html/rfc7568).
As such, while both terms are in use (also in our codebase) and are indeed interchangeable, TLS is the preferred term.
That said however, we have at Grafana Labs decided to use both acronyms in combination when referring to this type of
As such, while both terms are in use (also in our codebase) and are indeed interchangeable, TLS is the preferred term.
That said however, we have at Grafana Labs decided to use both acronyms in combination when referring to this type of
technology, i.e. _TLS/SSL_. This is in order to not confuse those who may not be aware of them being synonymous,
and SSL still being so prevalent in common discourse.

View File

@@ -42,8 +42,8 @@ In the `sqlstore` package we do database operations in tests and while some migh
### Assertions
Use respectively [`assert.*`](https://github.com/stretchr/testify#assert-package) functions to make assertions that
should _not_ halt the test ("soft checks") and [`require.*`](https://github.com/stretchr/testify#require-package)
Use respectively [`assert.*`](https://github.com/stretchr/testify#assert-package) functions to make assertions that
should _not_ halt the test ("soft checks") and [`require.*`](https://github.com/stretchr/testify#require-package)
functions to make assertions that _should_ halt the test ("hard checks"). Typically you want to use the latter type of
check to assert that errors have or have not happened, since continuing the test after such an assertion fails is
chaotic (the system under test will be in an undefined state) and you'll often have segfaults in practice.
@@ -70,10 +70,10 @@ In general, use value types and only reach for pointers when there's a real need
increase the risk of bugs, since a pointer can be nil and dereferencing a nil pointer leads to a panic (AKA segfault).
Valid reasons to use a pointer include (but not necessarily limited to):
- You might need to pass a modifiable argument to a function
- Copying an object might incur a performance hit (benchmark to check your assumptions, copying is often faster than
* You might need to pass a modifiable argument to a function
* Copying an object might incur a performance hit (benchmark to check your assumptions, copying is often faster than
allocating heap memory)
- You might _need_ `nil` to tell if a variable isn't set, although usually it's better to use the type's zero
* You might *need* `nil` to tell if a variable isn't set, although usually it's better to use the type's zero
value to tell instead
## Database
@@ -83,7 +83,7 @@ In database related code, we follow certain patterns.
### Foreign keys
While they can be useful, we don't generally use foreign key constraints in Grafana, for historical and
technical reasons. See this [comment](https://github.com/grafana/grafana/issues/3269#issuecomment-383328548) by Torkel
technical reasons. See this [comment](https://github.com/grafana/grafana/issues/3269#issuecomment-383328548) by Torkel
for context.
### Unique columns
@@ -93,7 +93,7 @@ If a column, or column combination, should be unique, add a corresponding unique
## JSON
The simplejson package is used a lot throughout the backend codebase, but it's legacy, so if at all possible
avoid using it in new code. Use [json-iterator](https://github.com/json-iterator/go) instead, which is a more performant
avoid using it in new code. Use [json-iterator](https://github.com/json-iterator/go) instead, which is a more performant
drop-in alternative to the standard [encoding/json](https://golang.org/pkg/encoding/json/) package. While encoding/json
is a fine choice, profiling shows that json-iterator may be 3-4 times more efficient for encoding. We haven't profiled
its parsing performance yet, but according to json-iterator's own benchmarks, it appears even more superior in this

View File

@@ -1,4 +1,4 @@
# Guidelines for code comments in grafana-\* packages
# Guidelines for code comments in grafana-* packages
This document aims to give you some recommendation on how to add code comments to the exported code in the grafana packages.
@@ -9,12 +9,11 @@ This document aims to give you some recommendation on how to add code comments t
1. [Deprecate an API](#deprecate-an-api)
1. [Specify parameters](#specify-parameters)
1. [Set return values](#set-return-values)
____
---
## Add package description
## Add package description
Each package has an overview explaining the overall responsibility and usage of the package.
Each package has an overview explaining the overall responsibility and usage of the package.
You can document this description with [`@packageDocumentation`](https://api-extractor.com/pages/tsdoc/tag_packagedocumentation/) tag.
@@ -33,34 +32,33 @@ All `exported` apis from the package should have a release tag to indicate its s
Add a tag to mark the stability of the whole exported `class/interface/function/type` etc.
Please place the `release tag` at the bottom of the comment to make it consistent among files and easier to read.
Please place the `release tag` at the bottom of the comment to make it consistent among files and easier to read.
**Do:**
````typescript
```typescript
/**
* Will help to create DataFrame objects and handle
* Will help to create DataFrame objects and handle
* the heavy lifting of creating a complex object.
*
*
* @example
* ```typescript
* const dataFrame = factory.create();
* ```
*
*
* @public
**/
export class DataFrameFactory {
create(): DataFrame {}
create(): DataFrame { }
}
````
```
**Don't**
````typescript
```typescript
/**
* Will help to create DataFrame objects and handle
* Will help to create DataFrame objects and handle
* the heavy lifting of creating a complex object.
*
*
* @public
* @example
* ```typescript
@@ -68,9 +66,9 @@ export class DataFrameFactory {
* ```
**/
export class DataFrameFactory {
create(): DataFrame {}
create(): DataFrame { }
}
````
```
### Partial stability of APIs
@@ -80,61 +78,59 @@ Then override the non-stable parts of the API with the proper [release tag](#rel
**Do:**
````typescript
```typescript
/**
* Will help to create DataFrame objects and handle
* Will help to create DataFrame objects and handle
* the heavy lifting of creating a complex object.
*
*
* @example
* ```typescript
* const dataFrame = factory.create();
* ```
*
*
* @public
**/
export class DataFrameFactory {
create(): DataFrame {}
create(): DataFrame { }
/**
* @beta
**/
createMany(): DataFrames[] {}
/**
* @beta
**/
createMany(): DataFrames[] {}
}
````
```
**Don't**
````typescript
```typescript
/**
* Will help to create DataFrame objects and handle
* Will help to create DataFrame objects and handle
* the heavy lifting of creating a complex object.
*
*
* @example
* ```typescript
* const dataFrame = factory.create();
* ```
**/
export class DataFrameFactory {
/**
* @public
**/
create(): DataFrame {}
/**
* @public
**/
create(): DataFrame { }
/**
* @beta
**/
createMany(): DataFrame[] {}
/**
* @beta
**/
createMany(): DataFrame[] {}
}
````
```
## Deprecate an API
If you want to mark an API as deprecated to signal that this API will be removed in the future, then add the [`@deprecated`](https://api-extractor.com/pages/tsdoc/tag_deprecated/) tag.
If applicable add a reason why the API is deprecated directly after the `@deprecated tag`.
## Specify parameters
If you want to specify the possible parameters that can be passed to an API, then add the [`@param`](https://api-extractor.com/pages/tsdoc/tag_param/) tag.
This attribute can be skipped if the type provided by `typescript` and the function comment or the function name is enough to explain what the parameters are.
@@ -145,17 +141,17 @@ This attribute can be skipped if the type provided by `typescript` and the funct
/**
* Will help to create a resource resolver depending
* on the current execution context.
*
*
* @param context - The current execution context.
* @returns FileResolver if executed on the server otherwise a HttpResolver.
* @public
**/
export const factory = (context: Context): IResolver => {
if (context.isServer) {
return new FileResolver();
}
return new HttpResolver();
};
if (context.isServer) {
return new FileResolver();
}
return new HttpResolver();
}
```
**Don't**
@@ -163,18 +159,18 @@ export const factory = (context: Context): IResolver => {
```typescript
/**
* Will compare two numbers to see if they are equal to each others.
*
*
* @param x - The first number
* @param y - The second number
* @public
**/
export const isEqual = (x: number, y: number): boolean => {
return x === y;
};
return x === y;
}
```
## Set return values
## Set return values
If you want to specify the return value from a function you can use the [`@returns`](https://api-extractor.com/pages/tsdoc/tag_returns/) tag.
This attribute can be skipped if the type provided by `typescript` and the function comment or the function name is enough to explain what the function returns.
@@ -185,17 +181,17 @@ This attribute can be skipped if the type provided by `typescript` and the funct
/**
* Will help to create a resource resolver depending
* on the current execution context.
*
*
* @param context - The current execution context.
* @returns FileResolver if executed on the server otherwise a HttpResolver.
* @public
**/
export const factory = (context: Context): IResolver => {
if (context.isServer) {
return new FileResolver();
}
return new HttpResolver();
};
if (context.isServer) {
return new FileResolver();
}
return new HttpResolver();
}
```
**Don't**
@@ -203,11 +199,11 @@ export const factory = (context: Context): IResolver => {
```typescript
/**
* Will compare two numbers to see if they are equal to each others.
*
*
* @returns true if values are equal
* @public
**/
export const isEqual = (x: number, y: number): boolean => {
return x === y;
};
return x === y;
}
```

View File

@@ -12,18 +12,19 @@ In Markdown, the number of "#" symbols creates different heading levels, similar
- \#\# is \<h2>.
- \#\#\# is \<h3>.
Start your document with a single `#` for the title of the page. Add the sub-headings with two `##`.
Start your document with a single ``#`` for the title of the page. Add the sub-headings with two ``##``.
## Bold and emphasis
- Make text **bold** using two asterisks.
**Example:** It is `**important**` to use GitHub-flavored Markdown emoji consistently.
**Example:** It is ``**important**`` to use GitHub-flavored Markdown emoji consistently.
- Make text `_emphasized_` using single ` _underscores_`. Do not use the single asterisk, it can be easily confused with bold.
- Make text ``_emphasized_`` using single `` _underscores_``. Do not use the single asterisk, it can be easily confused with bold.
**Example:** GitHub-flavored markdown emoji should _only_ appear in specific cases.
## Links and references
Create links to other website by wrapping the display text in square brackets, and the web URL in curved brackets.
@@ -61,13 +62,12 @@ Write the name of the language after the first set of back tics, no spaces, to s
```javascript
function testNum(a) {
if (a > 0) {
return 'positive';
return "positive";
} else {
return 'NOT positive';
return "NOT positive";
}
}
```
## Tables
Construct a table by typing the table headings, and separating them with a "|" character. Then, add a second line of dashes ("-") separated by another "|" character. When constructing the table cells, separate each cell data with another "|".
@@ -82,9 +82,9 @@ Cell one data| Cell two data
Will publish as:
| Heading one | Heading two |
| ------------- | ------------- |
| Cell one data | Cell two data |
Heading one | Heading two
------------|------------
Cell one data| Cell two data
## Lists
@@ -121,20 +121,19 @@ _Do not_ use image shortcodes at this time.
Include images in a document using the following syntax:
```
![Alt text](link to image, starting with /static/img/docs/ if it is to an internal image "Title of image in sentence case")
![Alt text](link to image, starting with /img/docs/ if it is to an internal image "Title of image in sentence case")
```
> **Note:** Alt text does not appear when the user hovers the mouse over the image, but title text does.
**Examples:**
**Examples:**
- \!\[Grafana logo](/link/to/grafanalogo/logo.png "Grafana logo")
- \!\[Example](/static/img/docs/folder_name/alert_test_rule.png "Example title")
- \!\[Grafana logo](/link/to/grafanalogo/logo.png)
- \!\[Example](/img/docs/folder_name/alert_test_rule.png)
This follows the format of "!", alt text wrapped in "[]" and the link URL wrapped in "()".
You can also use HTML such as the following:
```
<img src="example.png"
alt="Example image"

View File

@@ -22,4 +22,4 @@ The above commands use some utils scripts under [_\<repo-root>/e2e_](../../e2e)
## Test suites
All the integration tests are located at _\<repo-root>/e2e/suite\<x>/specs_. The page objects and reusable flows are in the [_\<repo-root>/packages/grafana-e2e_](../../packages/grafana-e2e) package.
All the integration tests are located at _\<repo-root>/e2e/suite\<x>/specs_. The page objects and reusable flows are in the [_\<repo-root>/packages/grafana-e2e_](../../packages/grafana-e2e) package.

View File

@@ -268,7 +268,6 @@ For code that needs to be used by external plugin:
- Use named exports for all code you want to export from a file.
- Use declaration exports (i.e. `export const foo = ...`).
- Avoid using default exports (for example, `export default foo`).
- Export only the code that is meant to be used outside the module.
### Comments
@@ -345,14 +344,6 @@ static defaultProps = { ... }
static defaultProps: Partial<Props> = { ... }
```
### How to declare functional components
We recommend using named regular functions when creating a new react functional component.
```typescript
export function Component(props: Props): ReactElement { ... }
```
## State management
- Don't mutate state in reducers or thunks.

View File

@@ -1,7 +1,6 @@
# Redux framework
Grafana uses [Redux Toolkit](https://redux-toolkit.js.org/) to handle Redux boilerplate code.
> Some of our Reducers are used by Angular and therefore state is to be considered as mutable for those reducers.
## Test functionality
@@ -20,7 +19,6 @@ reducerTester()
```
#### Complex usage
Sometimes you encounter a `resulting state` that contains properties that are hard to compare, such as `Dates`, but you still want to compare that other props in state are correct.
Then you can use `thenStatePredicateShouldEqual` function on `reducerTester` that will return the `resulting state` so that you can expect upon individual properties..
@@ -29,9 +27,9 @@ Then you can use `thenStatePredicateShouldEqual` function on `reducerTester` tha
reducerTester()
.givenReducer(someReducer, initialState)
.whenActionIsDispatched(someAction('reducer tests'))
.thenStatePredicateShouldEqual((resultingState) => {
.thenStatePredicateShouldEqual(resultingState => {
expect(resultingState.data).toEqual('reducer tests');
return true;
return true;
});
```
@@ -42,7 +40,9 @@ Fluent API that simplifies the testing of thunks.
#### Usage
```typescript
const dispatchedActions = await thunkTester(initialState).givenThunk(someThunk).whenThunkIsDispatched(arg1, arg2, arg3);
const dispatchedActions = await thunkTester(initialState)
.givenThunk(someThunk)
.whenThunkIsDispatched(arg1, arg2, arg3);
expect(dispatchedActions).toEqual([someAction('reducer tests')]);
```
@@ -52,7 +52,7 @@ expect(dispatchedActions).toEqual([someAction('reducer tests')]);
It is possible to infer connected props automatically from `mapStateToProps` and `mapDispatchToProps` using a helper type `ConnectedProps` from Redux. For this to work the `connect` call has to be split into two parts.
```typescript
import { connect, ConnectedProps } from 'react-redux';
import { connect, ConnectedProps } from 'react-redux'
const mapStateToProps = (state: StoreState) => {
return {
@@ -75,9 +75,8 @@ const connector = connect(mapStateToProps, mapDispatchToProps);
type Props = OwnProps & ConnectedProps<typeof connector>;
class PanelEditorUnconnected extends PureComponent<Props> {}
class PanelEditorUnconnected extends PureComponent<Props> {};
export const PanelEditor = connector(PanelEditorUnconnected);
```
For more examples, refer to the [Redux docs](https://react-redux.js.org/using-react-redux/static-typing#inferring-the-connected-props-automatically).

View File

@@ -15,37 +15,34 @@ Feel free to add templates to the `templates` folder. Try to make them as generi
## Documentation templates
In an ideal world, each topic will correspond to an information _type_ ([task](doc-task-template.md), [reference](doc-reference-template.md), [concept](doc-concept-template.md)) and contain only that type of information.
In an ideal world, each topic will correspond to an information *type* ([task](doc-task-template.md), [reference](doc-reference-template.md), [concept](doc-concept-template.md)) and contain only that type of information.
However, this is not always practical. For example, you have a series of short topics, you can group them into one topic.
Try to _chunk_ your content. This means you should organize the document so that the same kinds of content are grouped together.
Try to *chunk* your content. This means you should organize the document so that the same kinds of content are grouped together.
### Chunking example
If I was writing content for a site called _Doggie handbook_, I might organize it like this.
If I was writing content for a site called *Doggie handbook*, I might organize it like this.
**Concept**
- What a dog is
- Brief history of dogs
- Why you might want a dog
- Tasks dogs can be trained to do
**Tasks**
- Feed the dog
- Groom the dog
- Train the dog
**Reference**
- List of dog equipment you will need
- Table of breeds that includes breed name, size range, short or long hair, and type of dog
### Audience
Write for an audience that is computer literate and has general technical knowledge, but is not necessarily familiar with Grafana or the finer points of observability.
Write for an audience that is computer literate and has general technical knowledge, but is not necessarily familiar with Grafana or the finer points of observability.
Pretend you are explaining your topic to a brand new Grafana user or developer.
@@ -53,7 +50,7 @@ Pretend you are explaining your topic to a brand new Grafana user or developer.
Thanks to search engines, every page in the documentation might be a reader's entry point. This means that each page needs to be self-contained and make sense on its own. The reader should not need to read other topics in order to perform the task or understand the concept.
However, try to be helpful and link to related information. Using the _Doggie handbook_ example, the concept topic that explains what dogs can be trained to do might link to the Train the dog task.
However, try to be helpful and link to related information. Using the *Doggie handbook* example, the concept topic that explains what dogs can be trained to do might link to the Train the dog task.
## Code templates

View File

@@ -23,20 +23,20 @@ Concepts are topic types for any information that doesn't involve task lists or
## Idea
Concept topics or sections explain _what_ and _why_. They do not explain _how_. If you are a new user, you might look for concept information to learn about what Grafana is, why it might be useful to you, and what the general workflow is.
Concept topics or sections explain *what* and *why*. They do not explain *how*. If you are a new user, you might look for concept information to learn about what Grafana is, why it might be useful to you, and what the general workflow is.
## Workflow
Continuing the example in the previous section, here is a sample Grafana workflow.
Continuing the example in the previous section, here is a sample Grafana workflow.
1. Install Grafana. <link to task for installing Grafana>
1. Set up data sources. <link to data sources concept topic, which links to data source task topics>
1. Create panels. <link to panel concept topic, which links to tasks>
1. Create dashboards. <link to panel concept topic, which links to tasks>
1. Create dashboards. <link to panel concept topic, which links to tasks>
1. Enter queries. <link to query editor concept topic>
1. Add users. <link to user management concept topic, which links to tasks>
1. Create playlists. <link to Playlist topic that contains concept information and tasks>
## Next steps
Concept tasks often link to related information, including _tasks_ related to the concept and _reference_ topics related to the concept.
Concept tasks often link to related information, including *tasks* related to the concept and *reference* topics related to the concept.

View File

@@ -15,9 +15,9 @@ weight = 100
# Reference
The _reference_ topic type is for storing reference information, such as extensive tables, lists, or other information that is used as support for a task. Reference topics are also designed for API information.
The *reference* topic type is for storing reference information, such as extensive tables, lists, or other information that is used as support for a task. Reference topics are also designed for API information.
Often reference topics are linked from _task_ topics, because they contain information the user needs in order to perform a task.
Often reference topics are linked from *task* topics, because they contain information the user needs in order to perform a task.
[Grafana CLI](https://grafana.com/docs/grafana/latest/administration/cli/) is one example of a reference topic.
@@ -41,12 +41,12 @@ The [Glossary](https://grafana.com/docs/grafana/latest/guides/glossary/) provide
While you might not need a heading for each table, headings are a good way to chunk information if you have several tables. They also make the content easy to skim. Use headings or intro paragraphs like this one to explain to the reader what the information in the table is used for.
| | | | | | |
| :-- | :-- | :-: | :-: | --: | --: |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
|:---|:---|:--:|:--:|---:|---:|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
### Empty HTML table

View File

@@ -14,7 +14,7 @@ weight = 100
# Task
A _task_ topic is intended for a procedure that describes how to accomplish a task. It lists a series of steps that users follow to produce an intended outcome. It tells the reader _how_ to do something. [Install Grafana plugins](https://grafana.com/docs/grafana/latest/plugins/installation/) and [Playlist](https://grafana.com/docs/grafana/latest/reference/playlist/) are examples of task topics. Playlist includes a small amount of concept information in the introduction, which is appropriate.
A *task* topic is intended for a procedure that describes how to accomplish a task. It lists a series of steps that users follow to produce an intended outcome. It tells the reader *how* to do something. [Install Grafana plugins](https://grafana.com/docs/grafana/latest/plugins/installation/) and [Playlist](https://grafana.com/docs/grafana/latest/reference/playlist/) are examples of task topics. Playlist includes a small amount of concept information in the introduction, which is appropriate.
Always include an introduction of a short paragraph or two to explain what the task is for, perhaps give the reader an idea of what the outcome will be.
@@ -52,6 +52,6 @@ Thanks to internet search engines, every page in the documentation could be page
## Testing
It is a good practice to have someone else test the task you have written. If they can successfully complete the task using _only_ what the steps you have written, not guessing or using their inherent knowledge, then your task has passed the test. However, it is very common to find you have skipped steps, because _you_ are very familiar with Grafana and the topic you are explaining.
It is a good practice to have someone else test the task you have written. If they can successfully complete the task using *only* what the steps you have written, not guessing or using their inherent knowledge, then your task has passed the test. However, it is very common to find you have skipped steps, because *you* are very familiar with Grafana and the topic you are explaining.
New users or people from other teams are very helpful for these tests.

View File

@@ -1,990 +0,0 @@
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": "-- 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,
"graphTooltip": 0,
"iteration": 1629464729438,
"links": [
{
"asDropdown": true,
"icon": "external link",
"includeVars": false,
"keepTime": false,
"tags": [
"gdev",
"panel-tests"
],
"targetBlank": false,
"title": "Dropdown link",
"tooltip": "",
"type": "dashboards",
"url": ""
},
{
"asDropdown": false,
"icon": "external link",
"includeVars": false,
"keepTime": false,
"tags": [],
"targetBlank": false,
"title": "External link",
"tooltip": "localhost",
"type": "link",
"url": "localhost:3000"
}
],
"panels": [
{
"gridPos": {
"h": 3,
"w": 12,
"x": 0,
"y": 0
},
"id": 34,
"options": {
"content": "# All panels\n\nThis dashboard was created to quickly check accessiblity issues on a lot of panels at the same time ",
"mode": "markdown"
},
"pluginVersion": "8.1.0-pre",
"transparent": true,
"type": "text"
},
{
"gridPos": {
"h": 3,
"w": 12,
"x": 12,
"y": 0
},
"id": 35,
"options": {
"content": "# Another text panel\n\nBecause why not",
"mode": "markdown"
},
"pluginVersion": "8.1.0-pre",
"transparent": true,
"type": "text"
},
{
"collapsed": false,
"gridPos": {
"h": 1,
"w": 24,
"x": 0,
"y": 3
},
"id": 32,
"panels": [],
"title": "Row title",
"type": "row"
},
{
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"fillOpacity": 70,
"lineWidth": 1
},
"mappings": [
{
"options": {
"CRITICAL": {
"color": "red",
"index": 3
},
"HIGH": {
"color": "orange",
"index": 2
},
"LOW": {
"color": "blue",
"index": 0
},
"NORMAL": {
"color": "green",
"index": 1
}
},
"type": "value"
}
],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green"
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 9,
"w": 24,
"x": 0,
"y": 4
},
"id": 41,
"options": {
"alignValue": "left",
"legend": {
"displayMode": "list",
"placement": "bottom"
},
"mergeValues": true,
"rowHeight": 0.99,
"showValue": "auto",
"tooltip": {
"mode": "single"
}
},
"targets": [
{
"refId": "A",
"scenarioId": "csv_metric_values",
"stringInput": "LOW,HIGH,NORMAL,NORMAL,NORMAL,LOW,LOW,NORMAL,HIGH,CRITICAL"
},
{
"refId": "B",
"scenarioId": "csv_metric_values",
"stringInput": "NORMAL,LOW,LOW,CRITICAL,CRITICAL,LOW,LOW,NORMAL,HIGH,CRITICAL"
},
{
"refId": "C",
"scenarioId": "csv_metric_values",
"stringInput": "NORMAL,NORMAL,NORMAL,NORMAL,CRITICAL,LOW,NORMAL,NORMAL,NORMAL,LOW"
}
],
"title": "State timeline",
"type": "state-timeline"
},
{
"fieldConfig": {
"defaults": {
"color": {
"mode": "continuous-GrYlRd"
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green"
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 11,
"w": 9,
"x": 0,
"y": 0
},
"id": 62,
"options": {
"basemap": {
"config": {},
"type": "default"
},
"controls": {
"mouseWheelZoom": true,
"showAttribution": true,
"showDebug": false,
"showScale": false,
"showZoom": true
},
"layers": [
{
"config": {
"color": {
"field": "Price",
"fixed": "dark-green"
},
"fillOpacity": 0.4,
"shape": "circle",
"showLegend": true,
"size": {
"field": "Count",
"fixed": 5,
"max": 15,
"min": 2
}
},
"location": {
"gazetteer": "public/gazetteer/usa-states.json",
"lookup": "State",
"mode": "auto"
},
"type": "markers"
}
],
"view": {
"id": "coords",
"lat": 38.297683,
"lon": -99.228359,
"shared": true,
"zoom": 3.98
}
},
"targets": [
{
"csvFileName": "flight_info_by_state.csv",
"refId": "A",
"scenarioId": "csv_file"
}
],
"title": "Size, color mapped to different fields + share view",
"type": "geomap"
},
{
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"fillOpacity": 80,
"gradientMode": "hue",
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"lineWidth": 1
},
"links": [
{
"title": "Data link",
"url": "/"
}
],
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green"
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 13
},
"id": 4,
"options": {
"bucketOffset": 0,
"combine": false,
"legend": {
"calcs": [],
"displayMode": "list",
"placement": "bottom"
}
},
"title": "Histogram",
"type": "histogram"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 21
},
"id": 28,
"options": {
"dedupStrategy": "none",
"enableLogDetails": true,
"prettifyLogMessage": false,
"showCommonLabels": false,
"showLabels": false,
"showTime": false,
"sortOrder": "Descending",
"wrapLogMessage": false
},
"targets": [
{
"refId": "A",
"scenarioId": "logs"
}
],
"title": "Logs",
"type": "logs"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 21
},
"id": 8,
"options": {
"maxItems": 10,
"query": "",
"showHeadings": true,
"showRecentlyViewed": true,
"showSearch": true,
"showStarred": true,
"tags": []
},
"pluginVersion": "8.1.0-pre",
"title": "Dashboard list",
"type": "dashlist"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 29
},
"id": 30,
"title": "Panel list",
"type": "pluginlist"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 29
},
"id": 6,
"options": {
"alertName": "",
"dashboardAlerts": false,
"maxItems": 20,
"showInstances": false,
"sortOrder": 1,
"stateFilter": {
"firing": true,
"inactive": false,
"pending": true
}
},
"title": "Alert list",
"type": "alertlist"
},
{
"cards": {
},
"color": {
"cardColor": "#b4ff00",
"colorScale": "sqrt",
"colorScheme": "interpolateOranges",
"exponent": 0.5,
"mode": "spectrum"
},
"dataFormat": "timeseries",
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 37
},
"heatmap": {},
"hideZeroBuckets": false,
"highlightCards": true,
"id": 26,
"legend": {
"show": false
},
"reverseYBuckets": false,
"targets": [
{
"refId": "A",
"scenarioId": "exponential_heatmap_bucket_data"
}
],
"title": "Heatmap",
"tooltip": {
"show": true,
"showHistogram": false
},
"type": "heatmap",
"xAxis": {
"show": true
},
"yAxis": {
"format": "short",
"logBase": 1,
"show": true
},
"yBucketBound": "auto"
},
{
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green"
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 37
},
"id": 20,
"options": {
"displayMode": "gradient",
"orientation": "auto",
"reduceOptions": {
"calcs": [
"lastNotNull"
],
"fields": "",
"values": false
},
"showUnfilled": true,
"text": {}
},
"pluginVersion": "8.1.0-pre",
"targets": [
{
"refId": "A",
"scenarioId": "random_walk",
"seriesCount": 10
}
],
"title": "Bar gauge",
"type": "bargauge"
},
{
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
}
},
"mappings": []
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 45
},
"id": 24,
"options": {
"legend": {
"displayMode": "list",
"placement": "bottom"
},
"pieType": "pie",
"reduceOptions": {
"calcs": [
"lastNotNull"
],
"fields": "",
"values": false
},
"tooltip": {
"mode": "single"
}
},
"targets": [
{
"refId": "A",
"scenarioId": "random_walk",
"seriesCount": 6
}
],
"title": "Pie chart",
"type": "piechart"
},
{
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green"
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 45
},
"id": 18,
"options": {
"reduceOptions": {
"calcs": [
"lastNotNull"
],
"fields": "",
"values": false
},
"orientation": "auto",
"showValue": "auto",
"showThresholdLabels": false,
"showThresholdMarkers": true,
"text": {}
},
"pluginVersion": "8.1.0-pre",
"targets": [
{
"refId": "A",
"scenarioId": "random_walk",
"seriesCount": 3
}
],
"title": "Gauge",
"type": "gauge"
},
{
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"custom": {
"align": "auto",
"displayMode": "auto"
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green"
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 53
},
"id": 22,
"options": {
"showHeader": true
},
"pluginVersion": "8.1.0-pre",
"targets": [
{
"refId": "A",
"scenarioId": "table_static"
}
],
"title": "Tabel",
"type": "table"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 53
},
"id": 10,
"options": {
"limit": 10,
"navigateAfter": "10m",
"navigateBefore": "10m",
"onlyFromThisDashboard": false,
"onlyInTimeRange": false,
"showTags": true,
"showTime": true,
"showUser": true
},
"title": "Annotation list",
"type": "annolist"
},
{
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green"
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 61
},
"id": 16,
"options": {
"colorMode": "value",
"graphMode": "area",
"justifyMode": "auto",
"orientation": "auto",
"reduceOptions": {
"calcs": [
"lastNotNull"
],
"fields": "",
"values": false
},
"text": {},
"textMode": "auto"
},
"pluginVersion": "8.1.0-pre",
"title": "Stat",
"type": "stat"
},
{
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
"drawStyle": "line",
"fillOpacity": 0,
"gradientMode": "none",
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"lineInterpolation": "linear",
"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": 9,
"w": 12,
"x": 12,
"y": 61
},
"id": 2,
"links": [],
"options": {
"legend": {
"calcs": [],
"displayMode": "list",
"placement": "bottom"
},
"tooltip": {
"mode": "single"
}
},
"targets": [
{
"refId": "A",
"scenarioId": "random_walk",
"seriesCount": 4,
"spread": 120
}
],
"title": "Graph NG",
"type": "timeseries"
},
{
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisLabel": "",
"axisPlacement": "auto",
"axisSoftMin": 0,
"fillOpacity": 80,
"gradientMode": "none",
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"lineWidth": 1
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green"
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 69
},
"id": 14,
"options": {
"barWidth": 0.97,
"groupWidth": 0.7,
"legend": {
"calcs": [],
"displayMode": "list",
"placement": "bottom"
},
"orientation": "auto",
"showValue": "auto",
"stacking": "none",
"text": {},
"tooltip": {
"mode": "single"
}
},
"targets": [
{
"csvContent": "Series, Value\nBar 2, 20\nBar 3, 25\nBar 3, 55.4",
"refId": "A",
"scenarioId": "csv_content"
}
],
"title": "Bar chart",
"type": "barchart"
},
{
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 77
},
"id": 12,
"options": {
"showImage": true
},
"title": "News panel",
"type": "news"
}
],
"refresh": "",
"schemaVersion": 30,
"style": "dark",
"tags": [
"gdev",
"panel-tests",
"all-panels"
],
"templating": {
"list": [
{
"current": {},
"datasource": "gdev-testdata",
"definition": "*",
"hide": 0,
"includeAll": true,
"multi": true,
"name": "query0",
"options": [],
"query": {
"query": "*",
"refId": "StandardVariableQuery"
},
"refresh": 1,
"regex": "",
"skipUrlSync": false,
"sort": 0,
"type": "query"
},
{
"current": {
"selected": true,
"text": "7",
"value": "7"
},
"hide": 0,
"includeAll": false,
"multi": false,
"name": "query1",
"options": [
{
"selected": false,
"text": "1",
"value": "1"
},
{
"selected": false,
"text": "5",
"value": "5"
},
{
"selected": false,
"text": "6",
"value": "6"
},
{
"selected": true,
"text": "7",
"value": "7"
}
],
"query": "1,5,6,7",
"queryValue": "",
"skipUrlSync": false,
"type": "custom"
},
{
"current": {
"selected": false,
"text": "",
"value": ""
},
"description": "This is some descriptive text",
"hide": 0,
"label": "Plain text",
"name": "text",
"options": [
{
"selected": true,
"text": "",
"value": ""
}
],
"query": "",
"skipUrlSync": false,
"type": "textbox"
}
]
},
"time": {
"from": "now-6h",
"to": "now"
},
"timepicker": {},
"timezone": "",
"title": "Panel tests - All panels",
"uid": "n1jR8vnnz",
"version": 24
}

View File

@@ -2156,7 +2156,6 @@
"style": "dark",
"tags": [
"gdev",
"graph-ng",
"demo"
],
"templating": {

View File

@@ -2746,7 +2746,6 @@
"style": "dark",
"tags": [
"gdev",
"graph-ng",
"demo"
],
"templating": {

View File

@@ -524,8 +524,7 @@
"tags": [
"gdev",
"panel-tests",
"barchart",
"graph-ng"
"barchart"
],
"templating": {
"list": []

View File

@@ -1,522 +0,0 @@
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": "-- 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": 2,
"id": 319,
"links": [],
"liveNow": false,
"panels": [
{
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
"drawStyle": "line",
"fillOpacity": 0,
"gradientMode": "none",
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"lineInterpolation": "linear",
"lineStyle": {
"dash": [
10,
10
],
"fill": "dash"
},
"lineWidth": 1,
"pointSize": 5,
"scaleDistribution": {
"type": "linear"
},
"showPoints": "never",
"spanNulls": false,
"stacking": {
"group": "A",
"mode": "none"
},
"thresholdsStyle": {
"mode": "off"
}
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green"
},
{
"color": "red",
"value": 80
}
]
},
"unit": "currencyUSD"
},
"overrides": [
{
"matcher": {
"id": "byName",
"options": "sma"
},
"properties": [
{
"id": "color",
"value": {
"fixedColor": "orange",
"mode": "fixed"
}
},
{
"id": "custom.lineWidth",
"value": 5
},
{
"id": "custom.lineStyle",
"value": {
"dash": [
0,
20
],
"fill": "dot"
}
}
]
},
{
"matcher": {
"id": "byName",
"options": "bolup"
},
"properties": [
{
"id": "custom.fillBelowTo",
"value": "boldn"
},
{
"id": "custom.fillOpacity",
"value": 8
},
{
"id": "color",
"value": {
"fixedColor": "blue",
"mode": "fixed"
}
}
]
}
]
},
"gridPos": {
"h": 16,
"w": 12,
"x": 0,
"y": 0
},
"id": 2,
"options": {
"colorStrategy": "open-close",
"colors": {
"down": "red",
"up": "green"
},
"fields": {},
"legend": {
"calcs": [],
"displayMode": "list",
"placement": "bottom"
},
"mode": "candles+volume",
"candleStyle": "candles"
},
"targets": [
{
"csvFileName": "ohlc_dogecoin.csv",
"refId": "A",
"scenarioId": "csv_file"
}
],
"title": "Price & Volume",
"type": "candlestick"
},
{
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
"drawStyle": "line",
"fillOpacity": 0,
"gradientMode": "none",
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"lineInterpolation": "linear",
"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
}
]
},
"unit": "currencyUSD"
},
"overrides": []
},
"gridPos": {
"h": 20,
"w": 12,
"x": 12,
"y": 0
},
"id": 7,
"options": {
"colorStrategy": "close-close",
"colors": {
"down": "red",
"up": "green"
},
"fields": {},
"legend": {
"calcs": [],
"displayMode": "list",
"placement": "bottom"
},
"mode": "candles",
"candleStyle": "candles"
},
"targets": [
{
"csvFileName": "ohlc_dogecoin.csv",
"refId": "A",
"scenarioId": "csv_file"
}
],
"title": "Price Only, Hollow Candles",
"transformations": [
{
"id": "filterFieldsByName",
"options": {
"include": {
"names": [
"time",
"open",
"high",
"low",
"close"
]
}
}
}
],
"type": "candlestick"
},
{
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
"drawStyle": "line",
"fillOpacity": 0,
"gradientMode": "none",
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"lineInterpolation": "linear",
"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
}
]
},
"unit": "currencyUSD"
},
"overrides": []
},
"gridPos": {
"h": 10,
"w": 12,
"x": 0,
"y": 16
},
"id": 6,
"options": {
"colorStrategy": "open-close",
"colors": {
"down": "red",
"up": "blue"
},
"fields": { },
"legend": {
"calcs": [],
"displayMode": "list",
"placement": "bottom"
},
"mode": "candles",
"candleStyle": "ohlcbars"
},
"targets": [
{
"csvFileName": "ohlc_dogecoin.csv",
"refId": "A",
"scenarioId": "csv_file"
}
],
"title": "Price Only, OHLC Bars",
"transformations": [
{
"id": "filterFieldsByName",
"options": {
"include": {
"names": [
"time",
"open",
"high",
"low",
"close"
]
}
}
}
],
"type": "candlestick"
},
{
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
"drawStyle": "line",
"fillOpacity": 100,
"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
}
]
},
"unit": "currencyUSD"
},
"overrides": [
{
"matcher": {
"id": "byName",
"options": "open"
},
"properties": [
{
"id": "custom.hideFrom",
"value": {
"legend": true,
"tooltip": true,
"viz": true
}
}
]
},
{
"matcher": {
"id": "byName",
"options": "close"
},
"properties": [
{
"id": "custom.hideFrom",
"value": {
"legend": true,
"tooltip": true,
"viz": true
}
}
]
}
]
},
"gridPos": {
"h": 6,
"w": 12,
"x": 12,
"y": 20
},
"id": 4,
"options": {
"colorStrategy": "open-close",
"colors": {
"down": "red",
"up": "yellow"
},
"fields": {},
"legend": {
"calcs": [],
"displayMode": "list",
"placement": "bottom"
},
"mode": "volume",
"candleStyle": "candles"
},
"targets": [
{
"csvFileName": "ohlc_dogecoin.csv",
"refId": "A",
"scenarioId": "csv_file"
}
],
"title": "Volume Only, Alt Colors, 100% Opacity",
"transformations": [
{
"id": "filterFieldsByName",
"options": {
"include": {
"names": [
"time",
"volume",
"open",
"close"
]
}
}
}
],
"type": "candlestick"
}
],
"refresh": false,
"schemaVersion": 33,
"style": "dark",
"tags": [
"gdev",
"panel-tests",
"graph-ng"
],
"templating": {
"list": []
},
"time": {
"from": "2021-07-13T22:13:30.740Z",
"to": "2021-07-13T22:46:18.921Z"
},
"timepicker": {},
"timezone": "",
"title": "Candlestick",
"uid": "MP-Di9F7k",
"version": 7,
"weekStart": ""
}

View File

@@ -829,8 +829,7 @@
"style": "dark",
"tags": [
"gdev",
"panel-tests",
"graph-ng"
"panel-tests"
],
"templating": {
"list": []

View File

@@ -880,11 +880,7 @@
],
"schemaVersion": 27,
"style": "dark",
"tags": [
"gdev",
"panel-tests",
"graph-ng"
],
"tags": [],
"templating": {
"list": []
},

View File

@@ -1231,8 +1231,7 @@
"style": "dark",
"tags": [
"gdev",
"panel-tests",
"graph-ng"
"panel-tests"
],
"templating": {
"list": []

View File

@@ -413,8 +413,7 @@
"style": "dark",
"tags": [
"gdev",
"panel-tests",
"graph-ng"
"panel-tests"
],
"templating": {
"list": []

View File

@@ -772,11 +772,7 @@
],
"schemaVersion": 26,
"style": "dark",
"tags": [
"gdev",
"panel-tests",
"graph-ng"
],
"tags": ["gdev", "panel-tests"],
"templating": {
"list": []
},

View File

@@ -132,7 +132,7 @@
}
]
},
"pluginVersion": "",
"pluginVersion": "7.5.0-pre",
"targets": [
{
"refId": "A",
@@ -263,7 +263,7 @@
}
]
},
"pluginVersion": "",
"pluginVersion": "7.5.0-pre",
"targets": [
{
"refId": "A",
@@ -351,7 +351,7 @@
"showHeader": true,
"sortBy": []
},
"pluginVersion": "",
"pluginVersion": "7.5.0-pre",
"targets": [
{
"refId": "A",
@@ -387,7 +387,7 @@
},
{
"collapsed": false,
"datasource": "gdev-testdata",
"datasource": null,
"gridPos": {
"h": 1,
"w": 24,
@@ -460,7 +460,7 @@
"value": [
{
"title": "Details",
"url": "http://detail?serverLabel=${__field.labels.server}&valueNumeric=${__value.numeric}"
"url": "http://detail?serverLabel=${__field.labels.server}&valueNumeric=${__value.numeric}"
}
]
}
@@ -479,7 +479,7 @@
"options": {
"showHeader": true
},
"pluginVersion": "",
"pluginVersion": "7.5.0-pre",
"targets": [
{
"alias": "S1",
@@ -571,7 +571,7 @@
}
]
},
"pluginVersion": "",
"pluginVersion": "7.5.0-pre",
"targets": [
{
"refId": "A",
@@ -604,55 +604,6 @@
}
],
"type": "table"
},
{
"datasource": "gdev-testdata",
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"custom": {
"align": "auto",
"displayMode": "auto"
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": 0
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 26
},
"id": 12,
"options": {
"footer": {
"show": true,
"fields": "",
"reducer": [
"sum"
]
},
"showHeader": true
},
"pluginVersion": "",
"title": "Footer",
"type": "table"
}
],
"schemaVersion": 27,
@@ -684,5 +635,5 @@
"timezone": "",
"title": "Panel Tests - React Table",
"uid": "U_bZIMRMk",
"version": 6
"version": 1
}

View File

@@ -414,8 +414,6 @@
"style": "dark",
"tags": [
"gdev",
"panel-tests",
"graph-ng",
"demo"
],
"templating": {

View File

@@ -362,8 +362,7 @@
"style": "dark",
"tags": [
"gdev",
"panel-tests",
"graph-ng"
"panel-tests"
],
"templating": {
"list": []

View File

@@ -1,22 +1,19 @@
# You need to run 'sysctl -w vm.max_map_count=262144' on the host machine
elasticsearch-latest:
image: docker.elastic.co/elasticsearch/elasticsearch:8.0.0-beta1
image: docker.elastic.co/elasticsearch/elasticsearch:7.13.2
command: elasticsearch
environment:
- "discovery.type=single-node"
- "xpack.license.self_generated.type=basic"
- "xpack.security.enabled=false"
ports:
- "14200:9200"
- "14300:9300"
# TODO: uncomment when https://github.com/grafana/fake-data-gen/pull/20 is merged
# fake-elastic-latest-data:
# image: grafana/fake-data-gen
# links:
# - elasticsearch-latest
# environment:
# FD_SERVER: elasticsearch-latest
# FD_DATASOURCE: elasticsearch8
# FD_PORT: 9200
fake-elastic-latest-data:
image: grafana/fake-data-gen
links:
- elasticsearch-latest
environment:
FD_SERVER: elasticsearch-latest
FD_DATASOURCE: elasticsearch7
FD_PORT: 9200

View File

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

View File

@@ -9,7 +9,7 @@
fake-elastic-data:
image: grafana/fake-data-gen
network_mode: bridge
environment:
FD_SERVER: elasticsearch2
FD_DATASOURCE: elasticsearch
FD_DATASOURCE: elasticsearch2
FD_PORT: 9200

View File

@@ -7,6 +7,7 @@
fake-graphite11-data:
image: grafana/fake-data-gen
network_mode: bridge
environment:
FD_DATASOURCE: graphite
FD_PORT: 2103

View File

@@ -10,7 +10,10 @@
fake-graphite09-data:
image: grafana/fake-data-gen
network_mode: bridge
environment:
FD_DATASOURCE: graphite
FD_PORT: 2303
FD_GRAPHITE_VERSION: 0.9

View File

@@ -7,6 +7,7 @@
fake-graphite1-data:
image: grafana/fake-data-gen
network_mode: bridge
environment:
FD_DATASOURCE: graphite
FD_PORT: 2203

View File

@@ -5,22 +5,30 @@
- '8086:8086'
environment:
INFLUXD_REPORTING_DISABLED: 'true'
DOCKER_INFLUXDB_INIT_MODE: 'setup'
DOCKER_INFLUXDB_INIT_USERNAME: 'grafana'
DOCKER_INFLUXDB_INIT_PASSWORD: 'grafana12345'
DOCKER_INFLUXDB_INIT_ORG: 'myorg'
DOCKER_INFLUXDB_INIT_BUCKET: 'mybucket'
DOCKER_INFLUXDB_INIT_ADMIN_TOKEN: 'mytoken'
volumes:
- ./docker/blocks/influxdb/config.yaml:/etc/influxdb2/config.yaml
- ./docker/blocks/influxdb/setup_influxql.sh:/docker-entrypoint-initdb.d/setup_influxql.sh
# Use the influx cli to set up an influxdb instance.
influxdb_cli:
links:
- influxdb
image: influxdb:latest
# The following long command does 2 things:
# 1. It initializes the bucket
# 2. Maps bucket to database to enable backward-compatible access (influxql queries)
# Use these same configurations parameters in your telegraf configuration, mytelegraf.conf.
entrypoint: bash -c "influx setup --bucket mybucket -t mytoken -o myorg --username=grafana --password=grafana12345 --host=http://influxdb:8086 -f && influx -t mytoken -o myorg --host=http://influxdb:8086 bucket list -n mybucket --hide-headers | cut -f 1 | xargs influx -t mytoken -o myorg --host=http://influxdb:8086 v1 dbrp create --db mybucket --rp default --default --bucket-id"
# Wait for the influxd service in the influxdb container has fully bootstrapped before trying to setup an influxdb instance with the influxdb_cli service.
restart: on-failure:10
depends_on:
- influxdb
telegraf:
image: telegraf:latest
links:
- influxdb
depends_on:
- influxdb
- influxdb_cli
volumes:
- ./docker/blocks/influxdb/telegraf.conf:/etc/telegraf/telegraf.conf:ro
- /var/log:/var/log/host

View File

@@ -1,3 +0,0 @@
#!/bin/sh
influx v1 dbrp create --bucket-id "${DOCKER_INFLUXDB_INIT_BUCKET_ID}" --org myorg --db mybucket --rp default --default

View File

@@ -13,6 +13,7 @@
fake-mssql-data:
image: grafana/fake-data-gen
network_mode: bridge
environment:
FD_DATASOURCE: mssql
FD_PORT: 1433
FD_PORT: 1433

View File

@@ -11,6 +11,8 @@
fake-mysql-data:
image: grafana/fake-data-gen
network_mode: bridge
environment:
FD_DATASOURCE: mysql
FD_PORT: 3306

View File

@@ -5,7 +5,7 @@
fake-opentsdb-data:
image: grafana/fake-data-gen
network_mode: bridge
environment:
FD_DATASOURCE: opentsdb
FD_PORT: 4242

View File

@@ -15,6 +15,7 @@
fake-postgres-data:
image: grafana/fake-data-gen
network_mode: bridge
environment:
FD_DATASOURCE: postgres
FD_PORT: 5432

View File

@@ -39,7 +39,7 @@ run() {
done
shift $((OPTIND-1))
docker run -t --network=host -v $PWD:/src -e URL=$url -e SLOW_QUERY=$slowQuery -e K6_OUT=$out -e API_KEY=$apiKey --rm -i loadimpact/k6:master run --vus $vus --duration $duration /src/$testcase.js
docker run -t --network=host -v $PWD:/src -e URL=$url -e SLOW_QUERY=$slowQuery -e K6_OUT=$out -e API_KEY=$apiKey --rm -i loadimpact/k6:master run --vus $vus --duration $duration src/$testcase.js
}
run "$@"

View File

@@ -20,8 +20,6 @@ If you have the grafana/website repo checked out in the same directory as the gr
Edit content in the `sources` directory.
### [Contributing](https://github.com/grafana/grafana/blob/main/contribute/documentation.md)
### Using `relref` for internal links
Use the Hugo shortcode [relref](https://gohugo.io/content-management/cross-references/#use-ref-and-relref) any time you are linking to other internal docs pages.

View File

@@ -8,15 +8,21 @@ weight = 150
# Configuration
Grafana has default and custom configuration files. You can customize your Grafana instance by modifying the custom configuration file or by using environment variables. To see the list of settings for a Grafana instance, refer to [View server settings]({{< relref "view-server/view-server-settings.md" >}}).
Grafana has a number of configuration options that you can specify in a `.ini` configuration file or specified using environment variables.
> **Note:** After you add custom options, [uncomment](#remove-comments-in-the-ini-files) the relevant sections of the configuration file. Restart Grafana for your changes to take effect.
> **Note:** You must restart Grafana for any configuration changes to take effect.
## Configuration file location
To see all settings currently applied to the Grafana server, refer to [View server settings]({{< relref "view-server/view-server-settings.md" >}}).
## Config file locations
The default settings for a Grafana instance are stored in the `$WORKING_DIR/conf/defaults.ini` file. _Do not_ change the location in this file.
Depending on your OS, your custom configuration file is either the `$WORKING_DIR/conf/defaults.ini` file or the `/usr/local/etc/grafana/grafana.ini` file. The custom configuration file path can be overridden using the `--config` parameter.
_Do not_ change `defaults.ini`! Grafana defaults are stored in this file. Depending on your OS, make all configuration changes in either `custom.ini` or `grafana.ini`.
- Default configuration from `$WORKING_DIR/conf/defaults.ini`
- Custom configuration from `$WORKING_DIR/conf/custom.ini`
- The custom configuration file path can be overridden using the `--config` parameter
### Linux
@@ -28,23 +34,25 @@ Refer to [Configure a Grafana Docker image]({{< relref "configure-docker.md" >}}
### Windows
On Windows, the `sample.ini` file is located in the same directory as `defaults.ini` file. It contains all the settings commented out. Copy `sample.ini` and name it `custom.ini`.
`sample.ini` is in the same directory as `defaults.ini` and contains all the settings commented out. Copy `sample.ini` and name it `custom.ini`.
### macOS
By default, the configuration file is located at `/usr/local/etc/grafana/grafana.ini`. For a Grafana instance installed using Homebrew, edit the `grafana.ini` file directly. Otherwise, add a configuration file named `custom.ini` to the `conf` folder to override the settings defined in `conf/defaults.ini`.
By default, the configuration file is located at `/usr/local/etc/grafana/grafana.ini`. For a Grafana instance installed using Homebrew, edit the `grafana.ini` file directly. Otherwise, add a configuration file named `custom.ini` to the `conf` folder to override any of the settings defined in `conf/defaults.ini`.
## Remove comments in the .ini files
## Comments in .ini Files
Grafana uses semicolons (the `;` char) to comment out lines in a `.ini` file. You must uncomment each line in the `custom.ini` or the `grafana.ini` file that you are modify by removing `;` from the beginning of that line. Otherwise your changes will be ignored.
Semicolons (the `;` char) are the standard way to comment out lines in a `.ini` file. If you want to change a setting, you must delete the semicolon (`;`) in front of the setting before it will work.
For example:
**Example**
```
# The HTTP port to use
;http_port = 3000
```
A common problem is forgetting to uncomment a line in the `custom.ini` (or `grafana.ini`) file which causes the configuration option to be ignored.
## Override configuration with environment variables
Do not use environment variables to _add_ new configuration settings. Instead, use environmental variables to _override_ existing options.
@@ -1594,10 +1602,6 @@ Set to `true` if you want to enable external management of plugins. Default is `
Custom install/learn more URL for enterprise plugins. Defaults to https://grafana.com/grafana/plugins/.
### plugin_catalog_hidden_plugins
Enter a comma-separated list of plugin identifiers to hide in the plugin catalog.
<hr>
## [live]
@@ -1789,10 +1793,6 @@ Set this to `true` to have date formats automatically derived from your browser
Used as the default time zone for user preferences. Can be either `browser` for the browser local time zone or a time zone name from the IANA Time Zone database, such as `UTC` or `Europe/Amsterdam`.
### default_week_start
Set the default start of the week, valid values are: `saturday`, `sunday`, `monday` or `browser` to use the browser locale to define the first day of the week. Default is `browser`.
## [expressions]
> **Note:** This feature is available in Grafana v7.4 and later versions.

View File

@@ -143,52 +143,51 @@ Since not all datasources have the same configuration settings we only have the
> **Note:** Datasources tagged with _HTTP\*_ below denotes any data source which communicates using the HTTP protocol, e.g. all core data source plugins except MySQL, PostgreSQL and MSSQL.
| Name | Type | Datasource | Description |
| -------------------------- | ------- | ---------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| tlsAuth | boolean | _HTTP\*_, MySQL | Enable TLS authentication using client cert configured in secure json data |
| tlsAuthWithCACert | boolean | _HTTP\*_, MySQL, PostgreSQL | Enable TLS authentication using CA cert |
| tlsSkipVerify | boolean | _HTTP\*_, MySQL, PostgreSQL | Controls whether a client verifies the server's certificate chain and host name. |
| serverName | string | _HTTP\*_ | Optional. Controls the server name used for certificate common name/subject alternative name verification. Defaults to using the data source URL. |
| timeout | string | _HTTP\*_ | Request timeout in seconds. Overrides dataproxy.timeout option |
| graphiteVersion | string | Graphite | Graphite version |
| timeInterval | string | Prometheus, Elasticsearch, InfluxDB, MySQL, PostgreSQL and MSSQL | Lowest interval/step value that should be used for this data source. |
| httpMode | string | Influxdb | HTTP Method. 'GET', 'POST', defaults to GET |
| maxSeries | number | Influxdb | Max number of series/tables that Grafana processes |
| httpMethod | string | Prometheus | HTTP Method. 'GET', 'POST', defaults to POST |
| customQueryParameters | string | Prometheus | Query parameters to add, as a URL-encoded string. |
| manageAlerts | boolean | Prometheus and Loki | Manage alerts via Alerting UI |
| esVersion | string | Elasticsearch | Elasticsearch version (E.g. `7.0.0`, `7.6.1`) |
| timeField | string | Elasticsearch | Which field that should be used as timestamp |
| interval | string | Elasticsearch | Index date time format. nil(No Pattern), 'Hourly', 'Daily', 'Weekly', 'Monthly' or 'Yearly' |
| logMessageField | string | Elasticsearch | Which field should be used as the log message |
| logLevelField | string | Elasticsearch | Which field should be used to indicate the priority of the log message |
| maxConcurrentShardRequests | number | Elasticsearch | Maximum number of concurrent shard requests that each sub-search request executes per node. Defaults to 5 if esVersion is greater than or equals 7.0.0. When the esVersion is less than 7.0.0 and greater than or equals 5.6.0, then the default value is 256. Option is ignored when esVersion is less than 5.6.0. |
| sigV4Auth | boolean | Elasticsearch and Prometheus | Enable usage of SigV4 |
| sigV4AuthType | string | Elasticsearch and Prometheus | SigV4 auth provider. default/credentials/keys |
| sigV4ExternalId | string | Elasticsearch and Prometheus | Optional SigV4 External ID |
| sigV4AssumeRoleArn | string | Elasticsearch and Prometheus | Optional SigV4 ARN role to assume |
| sigV4Region | string | Elasticsearch and Prometheus | SigV4 AWS region |
| sigV4Profile | string | Elasticsearch and Prometheus | Optional SigV4 credentials profile |
| authType | string | Cloudwatch | Auth provider. default/credentials/keys |
| externalId | string | Cloudwatch | Optional External ID |
| assumeRoleArn | string | Cloudwatch | Optional ARN role to assume |
| defaultRegion | string | Cloudwatch | Optional default AWS region |
| customMetricsNamespaces | string | Cloudwatch | Namespaces of Custom Metrics |
| profile | string | Cloudwatch | Optional credentials profile |
| tsdbVersion | string | OpenTSDB | Version |
| tsdbResolution | string | OpenTSDB | Resolution |
| sslmode | string | PostgreSQL | SSLmode. 'disable', 'require', 'verify-ca' or 'verify-full' |
| tlsConfigurationMethod | string | PostgreSQL | SSL Certificate configuration, either by 'file-path' or 'file-content' |
| sslRootCertFile | string | PostgreSQL | SSL server root certificate file, must be readable by the Grafana user |
| sslCertFile | string | PostgreSQL | SSL client certificate file, must be readable by the Grafana user |
| sslKeyFile | string | PostgreSQL | SSL client key file, must be readable by _only_ the Grafana user |
| encrypt | string | MSSQL | Connection SSL encryption handling. 'disable', 'false' or 'true' |
| postgresVersion | number | PostgreSQL | Postgres version as a number (903/904/905/906/1000) meaning v9.3, v9.4, ..., v10 |
| timescaledb | boolean | PostgreSQL | Enable usage of TimescaleDB extension |
| maxOpenConns | number | MySQL, PostgreSQL and MSSQL | Maximum number of open connections to the database (Grafana v5.4+) |
| maxIdleConns | number | MySQL, PostgreSQL and MSSQL | Maximum number of connections in the idle connection pool (Grafana v5.4+) |
| connMaxLifetime | number | MySQL, PostgreSQL and MSSQL | Maximum amount of time in seconds a connection may be reused (Grafana v5.4+) |
| keepCookies | array | _HTTP\*_ | Cookies that needs to be passed along while communicating with datasources |
| Name | Type | Datasource | Description |
| ----------------------- | ------- | ---------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
| tlsAuth | boolean | _HTTP\*_, MySQL | Enable TLS authentication using client cert configured in secure json data |
| tlsAuthWithCACert | boolean | _HTTP\*_, MySQL, PostgreSQL | Enable TLS authentication using CA cert |
| tlsSkipVerify | boolean | _HTTP\*_, MySQL, PostgreSQL | Controls whether a client verifies the server's certificate chain and host name. |
| serverName | string | _HTTP\*_ | Optional. Controls the server name used for certificate common name/subject alternative name verification. Defaults to using the data source URL. |
| timeout | string | _HTTP\*_ | Request timeout in seconds. Overrides dataproxy.timeout option |
| graphiteVersion | string | Graphite | Graphite version |
| timeInterval | string | Prometheus, Elasticsearch, InfluxDB, MySQL, PostgreSQL and MSSQL | Lowest interval/step value that should be used for this data source. |
| httpMode | string | Influxdb | HTTP Method. 'GET', 'POST', defaults to GET |
| maxSeries | number | Influxdb | Max number of series/tables that Grafana processes |
| httpMethod | string | Prometheus | HTTP Method. 'GET', 'POST', defaults to POST |
| customQueryParameters | string | Prometheus | Query parameters to add, as a URL-encoded string. |
| manageAlerts | boolean | Prometheus and Loki | Manage alerts via Alerting UI |
| esVersion | string | Elasticsearch | Elasticsearch version (E.g. `7.0.0`, `7.6.1`) |
| timeField | string | Elasticsearch | Which field that should be used as timestamp |
| interval | string | Elasticsearch | Index date time format. nil(No Pattern), 'Hourly', 'Daily', 'Weekly', 'Monthly' or 'Yearly' |
| logMessageField | string | Elasticsearch | Which field should be used as the log message |
| logLevelField | string | Elasticsearch | Which field should be used to indicate the priority of the log message |
| sigV4Auth | boolean | Elasticsearch and Prometheus | Enable usage of SigV4 |
| sigV4AuthType | string | Elasticsearch and Prometheus | SigV4 auth provider. default/credentials/keys |
| sigV4ExternalId | string | Elasticsearch and Prometheus | Optional SigV4 External ID |
| sigV4AssumeRoleArn | string | Elasticsearch and Prometheus | Optional SigV4 ARN role to assume |
| sigV4Region | string | Elasticsearch and Prometheus | SigV4 AWS region |
| sigV4Profile | string | Elasticsearch and Prometheus | Optional SigV4 credentials profile |
| authType | string | Cloudwatch | Auth provider. default/credentials/keys |
| externalId | string | Cloudwatch | Optional External ID |
| assumeRoleArn | string | Cloudwatch | Optional ARN role to assume |
| defaultRegion | string | Cloudwatch | Optional default AWS region |
| customMetricsNamespaces | string | Cloudwatch | Namespaces of Custom Metrics |
| profile | string | Cloudwatch | Optional credentials profile |
| tsdbVersion | string | OpenTSDB | Version |
| tsdbResolution | string | OpenTSDB | Resolution |
| sslmode | string | PostgreSQL | SSLmode. 'disable', 'require', 'verify-ca' or 'verify-full' |
| tlsConfigurationMethod | string | PostgreSQL | SSL Certificate configuration, either by 'file-path' or 'file-content' |
| sslRootCertFile | string | PostgreSQL | SSL server root certificate file, must be readable by the Grafana user |
| sslCertFile | string | PostgreSQL | SSL client certificate file, must be readable by the Grafana user |
| sslKeyFile | string | PostgreSQL | SSL client key file, must be readable by _only_ the Grafana user |
| encrypt | string | MSSQL | Connection SSL encryption handling. 'disable', 'false' or 'true' |
| postgresVersion | number | PostgreSQL | Postgres version as a number (903/904/905/906/1000) meaning v9.3, v9.4, ..., v10 |
| timescaledb | boolean | PostgreSQL | Enable usage of TimescaleDB extension |
| maxOpenConns | number | MySQL, PostgreSQL and MSSQL | Maximum number of open connections to the database (Grafana v5.4+) |
| maxIdleConns | number | MySQL, PostgreSQL and MSSQL | Maximum number of connections in the idle connection pool (Grafana v5.4+) |
| connMaxLifetime | number | MySQL, PostgreSQL and MSSQL | Maximum amount of time in seconds a connection may be reused (Grafana v5.4+) |
| keepCookies | array | _HTTP\*_ | Cookies that needs to be passed along while communicating with datasources |
#### Secure Json Data
@@ -451,12 +450,11 @@ The following sections detail the supported settings and secure settings for eac
#### Alert notification `discord`
| Name | Secure setting |
| -------------------- | -------------- |
| url | yes |
| avatar_url | |
| content | |
| use_discord_username | |
| Name | Secure setting |
| ---------- | -------------- |
| url | yes |
| avatar_url | |
| content | |
#### Alert notification `slack`

View File

@@ -51,26 +51,26 @@ These examples show how often and when reminders are sent for a triggered alert.
## List of supported notifiers
| Name | Type | Supports images | Supports alert rule tags |
| --------------------------------------------- | ------------------------- | ------------------ | ------------------------ |
| [DingDing](#dingdingdingtalk) | `dingding` | yes, external only | no |
| [Discord](#discord) | `discord` | yes | no |
| [Email](#email) | `email` | yes | no |
| [Google Hangouts Chat](#google-hangouts-chat) | `googlechat` | yes, external only | no |
| Hipchat | `hipchat` | yes, external only | no |
| [Kafka](#kafka) | `kafka` | yes, external only | no |
| Line | `line` | yes, external only | no |
| Microsoft Teams | `teams` | yes, external only | no |
| [Opsgenie](#opsgenie) | `opsgenie` | yes, external only | yes |
| [Pagerduty](#pagerduty) | `pagerduty` | yes, external only | yes |
| Prometheus Alertmanager | `prometheus-alertmanager` | yes, external only | yes |
| [Pushover](#pushover) | `pushover` | yes | no |
| Sensu | `sensu` | yes, external only | no |
| [Sensu Go](#sensu-go) | `sensugo` | yes, external only | no |
| [Slack](#slack) | `slack` | yes | no |
| Telegram | `telegram` | yes | no |
| Threema | `threema` | yes, external only | no |
| VictorOps | `victorops` | yes, external only | yes |
| [Webhook](#webhook) | `webhook` | yes, external only | yes |
| --------------------------------------------- | ------------------------- | ------------------ | ----------------------- |
| [DingDing](#dingdingdingtalk) | `dingding` | yes, external only | no |
| [Discord](#discord) | `discord` | yes | no |
| [Email](#email) | `email` | yes | no |
| [Google Hangouts Chat](#google-hangouts-chat) | `googlechat` | yes, external only | no |
| Hipchat | `hipchat` | yes, external only | no |
| [Kafka](#kafka) | `kafka` | yes, external only | no |
| Line | `line` | yes, external only | no |
| Microsoft Teams | `teams` | yes, external only | no |
| [Opsgenie](#opsgenie) | `opsgenie` | yes, external only | yes |
| [Pagerduty](#pagerduty) | `pagerduty` | yes, external only | yes |
| Prometheus Alertmanager | `prometheus-alertmanager` | yes, external only | yes |
| [Pushover](#pushover) | `pushover` | yes | no |
| Sensu | `sensu` | yes, external only | no |
| [Sensu Go](#sensu-go) | `sensugo` | yes, external only | no |
| [Slack](#slack) | `slack` | yes | no |
| Telegram | `telegram` | yes | no |
| Threema | `threema` | yes, external only | no |
| VictorOps | `victorops` | yes, external only | yes |
| [Webhook](#webhook) | `webhook` | yes, external only | yes |
### Email
@@ -227,12 +227,11 @@ In DingTalk PC Client:
To set up Discord, you must create a Discord channel webhook. For instructions on how to create the channel, refer to
[Intro to Webhooks](https://support.discord.com/hc/en-us/articles/228383668-Intro-to-Webhooks).
| Setting | Description |
| ------------------------------ | ----------------------------------------------------------------------------------------------------- |
| Webhook URL | Discord webhook URL. |
| Message Content | Mention a group using @ or a user using <@ID> when notifying in a channel. |
| Avatar URL | Optionally, provide a URL to an image to use as the avatar for the bot's message. |
| Use Discord's Webhook Username | Use the username configured in Discord's webhook settings. Otherwise, the username will be 'Grafana.' |
| Setting | Description |
| --------------- | --------------------------------------------------------------------------------- |
| Webhook URL | Discord webhook URL. |
| Message Content | Mention a group using @ or a user using <@ID> when notifying in a channel. |
| Avatar URL | Optionally, provide a URL to an image to use as the avatar for the bot's message. |
Alternately, use the [Slack](#slack) notifier by appending `/slack` to a Discord webhook URL.

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